:root {
    --login-primary: #159ab5;
    --login-primary-dark: #0c738d;
    --login-ink: #183544;
    --login-text: #294555;
    --login-muted: #6d7e88;
    --login-border: #d8e3e8;
    --login-surface: #ffffff;
    --login-danger: #b42318;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-width: 320px;
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body {
    color: var(--login-text);
    background:
        radial-gradient(circle at 8% 10%, rgba(21, 154, 181, 0.12), transparent 27%),
        radial-gradient(circle at 92% 88%, rgba(34, 197, 184, 0.12), transparent 30%),
        #edf7f8;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button {
    border: 0;
}

.login-page {
    width: 100%;
    height: 100vh;
    height: 100svh;
    display: grid;
    place-items: center;
    padding: clamp(12px, 3vmin, 34px);
    overflow: hidden;
}

.login-shell {
    width: min(1380px, 100%);
    height: min(900px, 100%);
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(440px, 0.96fr);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 24px;
    background: var(--login-surface);
    box-shadow: 0 28px 70px rgba(21, 67, 82, 0.18);
}

.login-hero {
    position: relative;
    isolation: isolate;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(34px, 4vw, 64px);
    overflow: hidden;
    color: #ffffff;
    background-image:
        linear-gradient(180deg, rgba(4, 33, 48, 0.28) 0%, rgba(4, 35, 45, 0.08) 36%, rgba(3, 37, 43, 0.84) 100%),
        linear-gradient(90deg, rgba(3, 30, 43, 0.45), rgba(3, 30, 43, 0.02)),
        url('../../images/auth/login-office.png');
    background-position: center;
    background-size: cover;
}

.login-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(145deg, rgba(10, 65, 79, 0.2), transparent 50%);
    pointer-events: none;
}

.login-hero__brand {
    width: fit-content;
    max-width: 245px;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 30px rgba(0, 25, 37, 0.15);
    backdrop-filter: blur(10px);
}

.login-hero__brand img {
    display: block;
    width: 210px;
    max-width: 100%;
    height: auto;
}

.login-hero__copy {
    max-width: 570px;
    margin-block: auto;
    padding-block: 50px;
}

.login-hero__eyebrow,
.login-card__eyebrow {
    display: inline-block;
    margin-bottom: 13px;
    color: #8cf3ef;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.login-hero__copy h1 {
    max-width: 560px;
    margin: 0 0 18px;
    color: #ffffff;
    font-size: clamp(38px, 4vw, 62px);
    font-weight: 750;
    letter-spacing: -0.045em;
    line-height: 1.04;
    text-wrap: balance;
}

.login-hero__copy p {
    max-width: 470px;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(17px, 1.5vw, 22px);
    line-height: 1.55;
}

.login-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.login-feature {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.94);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
}

.login-feature__icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(153, 246, 228, 0.48);
    border-radius: 13px;
    background: rgba(11, 80, 87, 0.34);
    backdrop-filter: blur(8px);
}

.login-feature__icon svg {
    width: 27px;
    height: 27px;
    stroke: #c9fffa;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-panel {
    min-width: 0;
    min-height: 0;
    display: grid;
    place-items: center;
    padding: clamp(28px, 4vmin, 64px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: rgba(38, 70, 83, 0.22) transparent;
    scrollbar-width: thin;
    background:
        radial-gradient(circle at 100% 0%, rgba(21, 154, 181, 0.06), transparent 34%),
        #ffffff;
}

.login-panel::-webkit-scrollbar {
    width: 5px;
}

.login-panel::-webkit-scrollbar-track {
    background: transparent;
}

.login-panel::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(38, 70, 83, 0.22);
}

.login-card {
    width: min(100%, 530px);
}

.login-card__logo {
    display: block;
    width: min(270px, 72%);
    height: auto;
    margin: 0 auto 30px;
}

.login-card__header {
    margin-bottom: 30px;
    text-align: center;
}

.login-card__eyebrow {
    margin-bottom: 8px;
    color: var(--login-primary-dark);
}

.login-card__header h2 {
    margin: 0 0 8px;
    color: var(--login-ink);
    font-size: clamp(30px, 3vw, 40px);
    font-weight: 760;
    letter-spacing: -0.035em;
    line-height: 1.15;
}

.login-card__header p {
    margin: 0;
    color: var(--login-muted);
    font-size: 15px;
}

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fff5f5;
    color: var(--login-danger);
    font-size: 13px;
    line-height: 1.45;
}

.login-alert__icon {
    width: 20px;
    height: 20px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: var(--login-danger);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.login-alert p {
    margin: 0;
}

.login-alert p + p {
    margin-top: 3px;
}

.login-form,
.login-field {
    display: grid;
}

.login-form {
    gap: 18px;
}

.login-field {
    gap: 7px;
}

.login-field > label {
    color: var(--login-ink);
    font-size: 13px;
    font-weight: 700;
}

.login-field__control {
    position: relative;
}

.login-field__control input {
    width: 100%;
    height: 58px;
    padding: 0 54px 0 51px;
    border: 1px solid var(--login-border);
    border-radius: 11px;
    outline: none;
    background: #fbfdfe;
    color: var(--login-ink);
    font-size: 15px;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.login-field__control input::placeholder {
    color: #91a0a8;
}

.login-field__control input:focus {
    border-color: var(--login-primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(21, 154, 181, 0.11);
}

.login-field__icon,
.password-toggle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.login-field__icon {
    left: 17px;
    width: 23px;
    height: 23px;
    display: grid;
    place-items: center;
    color: #6f818c;
    pointer-events: none;
}

.login-field__icon svg,
.password-toggle svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-toggle {
    right: 10px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 8px;
    border-radius: 8px;
    background: transparent;
    color: #607581;
    cursor: pointer;
    transition: color 0.18s ease, background-color 0.18s ease;
}

.password-toggle:hover {
    background: #eef7f8;
    color: var(--login-primary-dark);
}

.password-toggle__hide,
.password-toggle[aria-pressed="true"] .password-toggle__show {
    display: none;
}

.password-toggle[aria-pressed="true"] .password-toggle__hide {
    display: block;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: var(--login-muted);
    font-size: 12px;
}

.remember-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--login-text);
    cursor: pointer;
    white-space: nowrap;
}

.remember-option input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--login-primary-dark);
}

.login-submit {
    width: 100%;
    min-height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    padding: 12px 20px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--login-primary), var(--login-primary-dark));
    box-shadow: 0 11px 24px rgba(12, 115, 141, 0.22);
    color: #ffffff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 750;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.login-submit:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(12, 115, 141, 0.28);
}

.login-submit:active {
    transform: translateY(0);
}

.login-submit svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 28px 0 20px;
    color: #8a9aa3;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.login-divider::before,
.login-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #dce7eb;
}

.login-security {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 17px;
    border: 1px solid #d6efef;
    border-radius: 12px;
    background: linear-gradient(135deg, #effafa, #e8f6f6);
}

.login-security__icon {
    width: 42px;
    height: 42px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 11px;
    background: rgba(21, 154, 181, 0.1);
    color: var(--login-primary-dark);
}

.login-security__icon svg {
    width: 27px;
    height: 27px;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-security > div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.login-security strong {
    color: var(--login-ink);
    font-size: 13px;
}

.login-security span:last-child {
    overflow: hidden;
    color: var(--login-muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--login-primary);
    outline-offset: 3px;
}

@media (max-width: 1120px) {
    .login-page {
        padding: 18px;
    }

    .login-shell {
        grid-template-columns: minmax(0, 0.88fr) minmax(420px, 1.12fr);
    }

    .login-hero {
        padding: 38px;
    }

    .login-hero__copy h1 {
        font-size: clamp(36px, 4.8vw, 50px);
    }

    .login-panel {
        padding: 36px;
    }
}

@media (max-width: 860px) {
    html,
    body {
        height: auto;
        min-height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    html::-webkit-scrollbar,
    body::-webkit-scrollbar {
        width: 0;
        height: 0;
        display: none;
    }

    .login-page {
        height: auto;
        min-height: 100vh;
        min-height: 100svh;
        padding: 12px;
        overflow: visible;
    }

    .login-shell {
        height: auto;
        min-height: calc(100svh - 24px);
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }

    .login-hero {
        min-height: 230px;
        padding: 22px 28px;
        background-position: center 57%;
    }

    .login-hero__brand {
        max-width: 205px;
        padding: 8px 12px;
    }

    .login-hero__brand img {
        width: 175px;
    }

    .login-hero__copy {
        margin: auto 0 0;
        padding: 0;
    }

    .login-hero__copy h1 {
        max-width: 520px;
        margin-bottom: 6px;
        font-size: clamp(27px, 5.2vw, 34px);
    }

    .login-hero__copy p {
        display: none;
    }

    .login-features {
        display: none;
    }

    .login-panel {
        display: grid;
        padding: 24px 32px 28px;
        overflow: visible;
    }

    .login-card__logo {
        display: none;
    }

    .login-card__header {
        margin-bottom: 18px;
    }

    .login-card__header h2 {
        font-size: clamp(27px, 5vw, 34px);
    }

    .login-form {
        gap: 14px;
    }

    .login-field__control input,
    .login-submit {
        min-height: 52px;
        height: 52px;
    }

    .login-divider {
        margin: 18px 0 14px;
    }

    .login-security {
        padding: 12px 14px;
    }
}

@media (max-width: 560px) {
    .login-page {
        padding: 0;
        background: #ffffff;
    }

    .guest .login-shell {
        height: auto;
        min-height: 100svh;
        grid-template-rows: auto auto;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .login-hero {
        min-height: 190px;
        padding: 17px 20px;
    }

    .login-hero__brand {
        max-width: 148px;
        padding: 6px 10px;
    }

    .login-hero__brand img {
        width: 126px;
    }

    .login-hero__eyebrow,
    .login-hero__copy p {
        display: none;
    }

    .login-hero__copy {
        margin-top: auto;
    }

    .login-hero__copy h1 {
        max-width: 380px;
        margin-bottom: 0;
        font-size: clamp(23px, 7vw, 29px);
    }

    .login-panel {
        padding: 20px 20px 24px;
    }

    .login-card__header {
        margin-bottom: 16px;
    }

    .login-card__header h2 {
        font-size: 27px;
    }

    .login-field__control input,
    .login-submit {
        min-height: 50px;
        height: 50px;
    }

    .login-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .login-security span:last-child {
        white-space: normal;
    }
}

@media (min-width: 861px) and (max-height: 820px) {
    .login-page {
        padding: 12px;
    }

    .login-hero {
        padding: 28px;
    }

    .login-hero__copy {
        padding-block: 24px;
    }

    .login-hero__copy h1 {
        margin-bottom: 10px;
        font-size: clamp(32px, 4vw, 46px);
    }

    .login-hero__copy p {
        font-size: 16px;
    }

    .login-feature__icon {
        width: 38px;
        height: 38px;
    }

    .login-panel {
        padding: 22px 32px;
    }

    .login-card__logo {
        width: min(190px, 55%);
        margin-bottom: 14px;
    }

    .login-card__header {
        margin-bottom: 16px;
    }

    .login-card__header h2 {
        font-size: 29px;
    }

    .login-form {
        gap: 12px;
    }

    .login-field__control input,
    .login-submit {
        min-height: 48px;
        height: 48px;
    }

    .login-divider {
        margin: 14px 0 11px;
    }

    .login-security {
        padding: 10px 13px;
    }
}

@media (min-width: 861px) and (max-height: 560px) {
    .login-security,
    .login-divider,
    .login-features {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
