html,
body {
    width: 100%;
    min-height: 100%;
}

:root {
    --login-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
        Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    --login-text: #111827;
    --login-muted: #6b7280;
    --login-border: #d8e1ef;
    --login-border-strong: #d1d1d1;
    --login-surface: #ffffff;
    --login-surface-soft: #f8fbff;
    --login-shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.1);
    --login-blue-start: #2997ff;
    --login-blue-end: #0a84ff;
    --login-blue-solid: #007aff;
}

body {
    max-width: none;
    padding: 24px;
}

.login-page--office {
    min-height: calc(100vh - 48px);
    min-height: calc(100svh - 48px);
    padding: 12px 0 20px;
    background: #ffffff;
    overflow: hidden;
}

.login-page__footer {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 18px;
    color: var(--login-text);
    font-size: 14px;
    font-weight: 100;
    font-family: var(--login-font-family);
    letter-spacing: 0;
    text-transform: none;
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 48px);
    min-height: calc(100svh - 48px);
}

.login-container--office {
    min-height: auto;
    justify-content: center;
    width: 100%;
    max-width: 100%;
}

.login-form {
    width: 340px;
    background: var(--login-surface);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--login-shadow-soft);
    display: flex;
    flex-direction: column;
}

.login-office-card {
    position: relative;
    width: min(100%, 440px);
    margin: 22px auto 0;
    padding: 28px 26px 20px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.78);
    box-shadow:
        0 18px 40px rgba(15, 23, 42, 0.1),
        0 8px 18px rgba(15, 23, 42, 0.06);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

.login-office-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.14));
    pointer-events: none;
}

.login-office-card__topbar {
    position: relative;
    z-index: 8;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 4px;
    width: 100%;
}

.login-office-card__media {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.login-office-orbit {
    position: relative;
    display: grid;
    place-items: center;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
}

.login-office-orbit__ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    transform-origin: center center;
}

.login-office-orbit__ring--1 {
    width: 5.4px;
    height: 5.4px;
    margin-top: -2.7px;
    margin-left: -2.7px;
    background: transparent;
    transform: rotate(4deg) scale(0.86);
    box-shadow:
        0 -68px 0 0 #c8d0c8,
        26px -63px 0 0 #a8d1dd,
        48px -48px 0 0 #78c9f3,
        63px -26px 0 0 #63c1f4,
        68px 0 0 0 #5db4f1,
        63px 26px 0 0 #67b1f0,
        48px 48px 0 0 #7d9cf2,
        26px 63px 0 0 #a77ff0,
        0 68px 0 0 #d86bd7,
        -26px 63px 0 0 #ee72c3,
        -48px 48px 0 0 #f06f9e,
        -63px 26px 0 0 #ef7a84,
        -68px 0 0 0 #f2856d,
        -63px -26px 0 0 #f59e69,
        -48px -48px 0 0 #f6b471,
        -26px -63px 0 0 #dac6a2;
}

.login-office-orbit__ring--2 {
    width: 4.9px;
    height: 4.9px;
    margin-top: -2.45px;
    margin-left: -2.45px;
    background: transparent;
    transform: rotate(14deg) scale(0.92);
    box-shadow:
        0 -56px 0 0 #d0d5cd,
        21px -52px 0 0 #b7d6dd,
        40px -40px 0 0 #92d0ec,
        52px -21px 0 0 #7bc7ef,
        56px 0 0 0 #74beec,
        52px 21px 0 0 #7cb8eb,
        40px 40px 0 0 #8ca9ee,
        21px 52px 0 0 #aa91ef,
        0 56px 0 0 #cb7fe0,
        -21px 52px 0 0 #e986cf,
        -40px 40px 0 0 #ef85b0,
        -52px 21px 0 0 #ef8c93,
        -56px 0 0 0 #f1987e,
        -52px -21px 0 0 #f3aa7a,
        -40px -40px 0 0 #e8bb8c,
        -21px -52px 0 0 #d7c9b4;
}

.login-office-orbit__ring--3 {
    width: 4.3px;
    height: 4.3px;
    margin-top: -2.15px;
    margin-left: -2.15px;
    background: transparent;
    transform: rotate(25deg) scale(1);
    box-shadow:
        0 -44px 0 0 #dad9d1,
        17px -40px 0 0 #c3d8db,
        31px -31px 0 0 #aad4ea,
        40px -17px 0 0 #95cfef,
        44px 0 0 0 #8cc7ee,
        40px 17px 0 0 #91c2ec,
        31px 31px 0 0 #9bb7eb,
        17px 40px 0 0 #b09eea,
        0 44px 0 0 #ca91df,
        -17px 40px 0 0 #e29bcc,
        -31px 31px 0 0 #eda0b7,
        -40px 17px 0 0 #eea392,
        -44px 0 0 0 #f0ab82,
        -40px -17px 0 0 #efb57d,
        -31px -31px 0 0 #e2c09a,
        -17px -40px 0 0 #d3cabd;
}

.login-office-orbit__ring--4 {
    width: 3.8px;
    height: 3.8px;
    margin-top: -1.9px;
    margin-left: -1.9px;
    background: transparent;
    transform: rotate(37deg) scale(1.08);
    box-shadow:
        0 -32px 0 0 #e3ddd6,
        12px -29px 0 0 #d1dbd9,
        23px -23px 0 0 #bbd8e4,
        29px -12px 0 0 #acd4eb,
        32px 0 0 0 #a2ccec,
        29px 12px 0 0 #a4c7ea,
        23px 23px 0 0 #aabde7,
        12px 29px 0 0 #b9abe5,
        0 32px 0 0 #ca9fdb,
        -12px 29px 0 0 #dba8ca,
        -23px 23px 0 0 #e7aebb,
        -29px 12px 0 0 #ebb096,
        -32px 0 0 0 #ecb68a,
        -29px -12px 0 0 #eabc89,
        -23px -23px 0 0 #ddc2a4,
        -12px -29px 0 0 #d5ccb9;
}

.login-office-orbit__core {
    position: relative;
    z-index: 1;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: auto;
    height: auto;
    color: #05070b;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.08em;
    font-family: var(--login-font-family);
}

.login-office-orbit__main {
    line-height: 0.95;
    background: linear-gradient(
        135deg,
        #f2856d 0%,
        #f6b471 18%,
        #78c9f3 42%,
        #5db4f1 56%,
        #7d9cf2 72%,
        #d86bd7 100%
    );
    box-shadow: none;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-help-popover {
    position: static;
}

.login-help-popover[open] {
    z-index: 12;
}

.login-help-popover__trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #64748b;
    font-family: var(--login-font-family);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

.login-help-popover__trigger::-webkit-details-marker {
    display: none;
}

.login-help-popover__trigger:hover,
.login-help-popover[open] .login-help-popover__trigger {
    border-color: rgba(148, 163, 184, 0.36);
    color: #475569;
    background: rgba(255, 255, 255, 0.9);
}

.login-help-popover__panel {
    position: absolute;
    top: 42px;
    left: 50%;
    right: auto;
    width: min(628px, calc(100vw - 124px));
    padding: 16px 18px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
        0 18px 44px rgba(15, 23, 42, 0.1),
        0 4px 14px rgba(15, 23, 42, 0.05);
    transform: translateX(-50%);
    z-index: 20;
}

.login-help-popover__title {
    margin-bottom: 5px;
    color: #334155;
    font-family: var(--login-font-family);
    font-size: 12px;
    font-weight: 600;
}

.login-help-popover__intro {
    margin: 0 0 8px;
    color: #64748b;
    font-family: var(--login-font-family);
    font-size: 11px;
    line-height: 1.45;
}

.login-help-popover__list {
    margin: 0;
    padding-left: 16px;
    color: #64748b;
    font-family: var(--login-font-family);
    font-size: 11px;
    line-height: 1.45;
}

.login-help-popover__list li + li {
    margin-top: 4px;
}

.login-form--wide {
    width: min(100%, 460px);
}

.login-form--office {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.login-title {
    text-align: center;
    font-family: var(--login-font-family);
    font-weight: 600;
    margin-bottom: 16px;
}

.login-title--compact {
    margin-bottom: 0;
}

.login-title__mark {
    font-weight: 150;
}

.login-title__light {
    font-weight: 100;
}

.login-title--office {
    margin: 0 0 8px;
    font-size: clamp(1.8rem, 3.06vw, 2.23rem);
    line-height: 1.05;
    letter-spacing: -0.07em;
    color: #030712;
    text-align: center;
}

.login-subtitle {
    margin-top: 0;
    margin-bottom: 14px;
    font-weight: 100;
    text-align: center;
    font-size: 8px;
}

.login-switch-link {
    display: block;
    margin-top: 5px;
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.2;
}

.login-mode-switch {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.login-mode-option {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--login-border-strong);
    border-radius: 8px;
    background: var(--login-surface);
    color: #111;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.login-mode-option.is-active {
    background: var(--login-blue-solid);
    color: #fff;
    border-color: var(--login-blue-solid);
}

.login-label {
    margin-top: 10px;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 100;
    font-family: var(--login-font-family);
}

.login-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
}

.login-checkbox input {
    margin: 0;
}

.login-checkbox--office {
    width: 70%;
    margin-top: 10px;
    margin-left: auto;
    margin-right: auto;
    color: #334155;
    font-size: 13px;
}

.login-input {
    display: block;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--login-border-strong);
    border-radius: 6px;
    font-family: var(--login-font-family);
    transition: border-color 0.3s;
}

.login-input--office {
    width: 70%;
    min-width: 70%;
    max-width: 70%;
    min-height: 46px;
    padding: 10px 14px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid var(--login-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
    transition: border-color 0.25s, box-shadow 0.25s, background-color 0.25s;
}

.login-input:focus {
    outline: none;
    border-color: var(--login-blue-solid);
}

.login-input--office:focus {
    border-color: var(--login-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.login-button {
    margin-top: 24px;
    padding: 12px;
    background: var(--login-blue-solid);
    border: none;
    border-radius: 6px;
    font-size: 16px;
    color: #fff;
    cursor: pointer;
    font-family: var(--login-font-family);
    transition: background-color 0.3s;
}

.login-button--office {
    display: block;
    width: min(100%, 220px);
    min-height: 46px;
    margin-top: 14px;
    margin-right: auto;
    margin-left: auto;
    padding: 0 22px;
    border-radius: 12px;
    background: linear-gradient(180deg, var(--login-blue-start) 0%, var(--login-blue-end) 100%);
    box-shadow: 0 10px 20px rgba(10, 132, 255, 0.24);
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.login-button:hover {
    background-color: #005bb5;
}

.login-button--office:hover {
    background: linear-gradient(180deg, #3aa2ff 0%, #157fff 100%);
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(10, 132, 255, 0.28);
}

.login-office-step + .login-office-step {
    margin-top: 8px;
}

.login-error {
    background-color: #ffe5e5;
    color: #c30000;
    padding: 10px 14px;
    border: 1px solid #ffb3b3;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
    text-align: center;
    font-family: var(--login-font-family);
}

.login-error--compact {
    margin-top: 12px;
    margin-bottom: 0;
}

.login-error--office {
    width: 70%;
    margin-right: auto;
    margin-bottom: 14px;
    margin-left: auto;
    border-radius: 12px;
}

.login-message {
    margin-top: 12px;
    padding: 10px 14px;
    border: 1px solid #b7e4c7;
    border-radius: 6px;
    background: #e7f7ec;
    color: #116329;
    font-size: 14px;
    text-align: center;
}

.login-info {
    margin-bottom: 16px;
    padding: 10px 14px;
    border: 1px solid #b6d4fe;
    border-radius: 6px;
    background: #e7f3ff;
    color: #084298;
    font-size: 14px;
    text-align: left;
}

.login-info--office {
    width: 70%;
    margin-right: auto;
    margin-bottom: 14px;
    margin-left: auto;
    border-radius: 12px;
}

.login-section-title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

.login-section-title--office {
    margin-bottom: 8px;
    color: #0f172a;
    font-family: var(--login-font-family);
}

.login-section-subtitle {
    margin: 0 0 14px;
    font-size: 12px;
    line-height: 1.4;
    color: #6b7280;
    text-align: center;
}

.login-section-subtitle--office {
    width: 70%;
    margin-right: auto;
    margin-bottom: 16px;
    margin-left: auto;
    font-family: var(--login-font-family);
    font-weight: 100;
}

.login-help {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.45;
    color: #6b7280;
}

.login-help--office {
    width: 70%;
    margin-right: auto;
    margin-left: auto;
    text-align: left;
    font-family: var(--login-font-family);
    font-weight: 100;
}

.login-agreement {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #dbe3f0;
    border-radius: 8px;
    background: var(--login-surface-soft);
}

.login-agreement-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.login-agreement-grid .login-agreement {
    margin-top: 0;
    height: 100%;
}

.login-agreement .login-section-title {
    text-align: left;
    margin-bottom: 10px;
    font-size: 15px;
}

.login-agreement__text {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.5;
    color: #334155;
}

.login-checkbox--stack {
    align-items: flex-start;
    gap: 8px;
}

.login-checkbox--stack input {
    margin-top: 2px;
}

.login-note {
    margin-top: 8px;
    text-align: center;
    font-size: 11px;
    color: #777;
}

.login-note--office,
.login-note--ip-meta {
    color: var(--login-text);
    font-size: 12px;
    font-weight: 100;
    font-family: var(--login-font-family);
    letter-spacing: 0;
    text-transform: none;
    text-align: center;
}

.login-note--office {
    margin-top: 12px;
}

.login-note--office a {
    color: inherit;
    text-decoration: none;
}

.login-note--office a:hover {
    text-decoration: underline;
}

.login-note--ip-meta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 6px;
}

.login-note__flag {
    font-size: 12px;
    line-height: 1;
}

@media (max-width: 900px) {
    body {
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        margin: 0;
        padding: 0;
        background: #fff;
        overflow: hidden;
    }

    .login-container {
        position: fixed;
        inset: 0;
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        min-height: 100svh;
        align-items: stretch;
        justify-content: stretch;
    }

    .login-form {
        flex: 1 1 auto;
        width: 100%;
        max-width: none;
        min-height: 100vh;
        min-height: 100dvh;
        min-height: 100svh;
        padding: 0 0 24px;
        box-sizing: border-box;
        border-radius: 0;
        border: 0;
        box-shadow: none;
        justify-content: center;
    }

    .login-page--office {
        padding: 0;
    }

    .login-page__footer {
        gap: 10px;
        margin-top: 14px;
        padding: 0 20px 18px;
        font-size: 0.76rem;
        flex-wrap: wrap;
    }

    .login-container--office {
        padding: 0 0 20px;
        justify-content: flex-start;
    }

    .login-office-card {
        width: 100%;
        box-sizing: border-box;
        margin-top: 0;
        padding: 24px 18px 18px;
        border: 0;
        border-radius: 0;
        background: #fff;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .login-office-card::before {
        display: none;
    }

    .login-office-orbit {
        width: 132px;
        height: 132px;
    }

    .login-help-popover__panel {
        top: 38px;
        width: min(420px, calc(100vw - 52px));
        padding: 14px 15px;
        border-radius: 18px;
    }

    .login-form--office {
        min-height: auto;
    }

    .login-office-orbit__ring--1 {
        width: 4.3px;
        height: 4.3px;
        margin-top: -2.15px;
        margin-left: -2.15px;
        box-shadow:
            0 -56px 0 0 #c8d0c8,
            21px -52px 0 0 #a8d1dd,
            40px -40px 0 0 #78c9f3,
            52px -21px 0 0 #63c1f4,
            56px 0 0 0 #5db4f1,
            52px 21px 0 0 #67b1f0,
            40px 40px 0 0 #7d9cf2,
            21px 52px 0 0 #a77ff0,
            0 56px 0 0 #d86bd7,
            -21px 52px 0 0 #ee72c3,
            -40px 40px 0 0 #f06f9e,
            -52px 21px 0 0 #ef7a84,
            -56px 0 0 0 #f2856d,
            -52px -21px 0 0 #f59e69,
            -40px -40px 0 0 #f6b471,
            -21px -52px 0 0 #dac6a2;
    }

    .login-office-orbit__ring--2 {
        width: 3.8px;
        height: 3.8px;
        margin-top: -1.9px;
        margin-left: -1.9px;
        box-shadow:
            0 -46px 0 0 #d0d5cd,
            18px -43px 0 0 #b7d6dd,
            33px -33px 0 0 #92d0ec,
            43px -18px 0 0 #7bc7ef,
            46px 0 0 0 #74beec,
            43px 18px 0 0 #7cb8eb,
            33px 33px 0 0 #8ca9ee,
            18px 43px 0 0 #aa91ef,
            0 46px 0 0 #cb7fe0,
            -18px 43px 0 0 #e986cf,
            -33px 33px 0 0 #ef85b0,
            -43px 18px 0 0 #ef8c93,
            -46px 0 0 0 #f1987e,
            -43px -18px 0 0 #f3aa7a,
            -33px -33px 0 0 #e8bb8c,
            -18px -43px 0 0 #d7c9b4;
    }

    .login-office-orbit__ring--3 {
        width: 3.2px;
        height: 3.2px;
        margin-top: -1.6px;
        margin-left: -1.6px;
        box-shadow:
            0 -36px 0 0 #dad9d1,
            14px -33px 0 0 #c3d8db,
            25px -25px 0 0 #aad4ea,
            33px -14px 0 0 #95cfef,
            36px 0 0 0 #8cc7ee,
            33px 14px 0 0 #91c2ec,
            25px 25px 0 0 #9bb7eb,
            14px 33px 0 0 #b09eea,
            0 36px 0 0 #ca91df,
            -14px 33px 0 0 #e29bcc,
            -25px 25px 0 0 #eda0b7,
            -33px 14px 0 0 #eea392,
            -36px 0 0 0 #f0ab82,
            -33px -14px 0 0 #efb57d,
            -25px -25px 0 0 #e2c09a,
            -14px -33px 0 0 #d3cabd;
    }

    .login-office-orbit__ring--4 {
        width: 2.7px;
        height: 2.7px;
        margin-top: -1.35px;
        margin-left: -1.35px;
        box-shadow:
            0 -26px 0 0 #e3ddd6,
            10px -24px 0 0 #d1dbd9,
            18px -18px 0 0 #bbd8e4,
            24px -10px 0 0 #acd4eb,
            26px 0 0 0 #a2ccec,
            24px 10px 0 0 #a4c7ea,
            18px 18px 0 0 #aabde7,
            10px 24px 0 0 #b9abe5,
            0 26px 0 0 #ca9fdb,
            -10px 24px 0 0 #dba8ca,
            -18px 18px 0 0 #e7aebb,
            -24px 10px 0 0 #ebb096,
            -26px 0 0 0 #ecb68a,
            -24px -10px 0 0 #eabc89,
            -18px -18px 0 0 #ddc2a4,
            -10px -24px 0 0 #d5ccb9;
    }

    .login-office-orbit__core {
        font-size: 1.7rem;
    }

    .login-title--office {
        font-size: 1.44rem;
    }

    .login-agreement-grid {
        grid-template-columns: 1fr;
    }

    .login-input,
    .login-mode-option,
    .login-error,
    .login-message,
    .login-button {
        box-shadow: none;
    }

    .login-input,
    .login-mode-option,
    .login-error,
    .login-message {
        border-left: 0;
        border-right: 0;
        border-top: 0;
        border-radius: 0;
    }
}
