:root {
    --brand: #00b7e5;
    --brand-deep: #087bab;
    --brand-dark: #0d4062;
    --brand-ink: #123b56;
    --brand-soft: #e7f8fc;
    --site-mist: #bed8d7;
    --page: #f4f9fa;
    --surface: #ffffff;
    --text: #173447;
    --muted: #66808f;
    --line: #dbe7eb;
    --danger: #b42318;
    --danger-bg: #fff1f0;
    --info: #075985;
    --info-bg: #edf9fc;
    --shadow: 0 24px 70px rgba(19, 63, 85, 0.14);
    --radius-xl: 30px;
    --radius-lg: 18px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--page);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 85% 8%, rgba(0, 183, 229, 0.10), transparent 30rem),
        var(--page);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
}

.login-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(430px, 0.92fr) minmax(520px, 1.08fr);
}

.brand-panel {
    position: relative;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    overflow: hidden;
    padding: clamp(34px, 5vw, 72px);
    color: #fff;
    background:
        linear-gradient(150deg, rgba(9, 67, 98, 0.98), rgba(8, 123, 171, 0.94) 64%, rgba(0, 183, 229, 0.90)),
        var(--brand-dark);
    isolation: isolate;
}

.brand-panel::before {
    position: absolute;
    z-index: -1;
    right: -170px;
    bottom: -190px;
    width: 520px;
    height: 520px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
    content: "";
    box-shadow:
        0 0 0 54px rgba(255, 255, 255, 0.035),
        0 0 0 108px rgba(255, 255, 255, 0.025);
}

.brand-panel__glow {
    position: absolute;
    z-index: -1;
    top: 11%;
    left: -9rem;
    width: 25rem;
    height: 25rem;
    border-radius: 50%;
    background: rgba(0, 183, 229, 0.27);
    filter: blur(80px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    width: fit-content;
    color: #fff;
    text-decoration: none;
}

.brand img {
    width: 78px;
    height: 78px;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.14));
}

.brand span {
    display: grid;
    gap: 5px;
}

.brand strong {
    font-size: 1.04rem;
    letter-spacing: 0.015em;
}

.brand small {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.72rem;
    letter-spacing: 0.045em;
}

.brand-copy {
    max-width: 620px;
    margin: auto 0 42px;
    padding-top: 72px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 19px;
    color: #bdeffc;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow::before {
    width: 28px;
    height: 2px;
    background: var(--brand);
    content: "";
}

.brand-copy h1 {
    margin: 0;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.7rem, 5vw, 5.2rem);
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.brand-copy h1 span {
    color: #7ce1f6;
    font-style: italic;
}

.brand-copy p {
    max-width: 520px;
    margin: 28px 0 0;
    color: rgba(255, 255, 255, 0.74);
    font-size: 1rem;
    line-height: 1.75;
}

.brand-visual {
    overflow: hidden;
    width: min(100%, 620px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 44px rgba(4, 43, 68, 0.25);
}

.brand-visual img {
    display: block;
    width: 100%;
    height: auto;
    opacity: 0.92;
}

.brand-panel__footer {
    margin: 28px 0 0;
    color: rgba(255, 255, 255, 0.62);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.92rem;
    font-style: italic;
}

.form-panel {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 48px clamp(28px, 7vw, 110px);
    position: relative;
}

.login-card {
    width: min(100%, 480px);
    padding: 44px;
    border: 1px solid rgba(219, 231, 235, 0.9);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

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

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    padding: 7px 11px;
    border-radius: 999px;
    color: var(--brand-deep);
    background: var(--brand-soft);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.status-badge i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 4px rgba(0, 183, 229, 0.13);
}

.login-card h2 {
    margin: 0;
    color: var(--brand-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 2.65rem);
    font-weight: 400;
    letter-spacing: -0.035em;
}

.login-card__header p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.notice {
    margin: -8px 0 24px;
    padding: 13px 15px;
    border: 1px solid;
    border-radius: var(--radius-md);
    font-size: 0.86rem;
    line-height: 1.5;
}

.notice--error {
    border-color: #f8c8c4;
    color: var(--danger);
    background: var(--danger-bg);
}

.notice--info {
    border-color: #b9e7f2;
    color: var(--info);
    background: var(--info-bg);
}

.login-form {
    display: grid;
    gap: 22px;
}

.field {
    display: grid;
    gap: 9px;
}

.field label,
.field__label-row label {
    color: var(--brand-ink);
    font-size: 0.84rem;
    font-weight: 750;
}

.field__label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.muted-link {
    color: var(--brand-deep);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
}

.muted-link:hover,
.muted-link:focus-visible {
    color: var(--brand-dark);
    text-decoration: underline;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrap > svg {
    position: absolute;
    left: 16px;
    fill: none;
    stroke: #73909f;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
    pointer-events: none;
}

.input-wrap input {
    width: 100%;
    height: 54px;
    padding: 0 50px 0 48px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    outline: none;
    color: var(--text);
    background: #fbfdfe;
    font-size: 0.92rem;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.input-wrap input::placeholder {
    color: #9aadb7;
}

.input-wrap input:hover {
    border-color: #b8cdd5;
    background: #fff;
}

.input-wrap input:focus {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 183, 229, 0.12);
}

.password-toggle {
    position: absolute;
    right: 9px;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 0;
    border-radius: 9px;
    color: #73909f;
    background: transparent;
    cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: var(--brand-deep);
    background: var(--brand-soft);
    outline: none;
}

.password-toggle svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.password-toggle .eye-closed {
    display: none;
}

.password-toggle[aria-pressed="true"] .eye-open {
    display: none;
}

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

.caps-warning {
    display: none;
    margin: 0;
    color: #9a6700;
    font-size: 0.76rem;
}

.caps-warning.is-visible {
    display: block;
}

.remember {
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    color: var(--muted);
    font-size: 0.82rem;
    cursor: pointer;
}

.remember input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.remember span {
    display: grid;
    width: 19px;
    height: 19px;
    place-items: center;
    border: 1px solid #b8cbd3;
    border-radius: 6px;
    background: #fff;
    transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.remember span::after {
    width: 8px;
    height: 4px;
    border-bottom: 2px solid white;
    border-left: 2px solid white;
    content: "";
    opacity: 0;
    transform: translateY(-1px) rotate(-45deg);
}

.remember input:checked + span {
    border-color: var(--brand-deep);
    background: var(--brand-deep);
}

.remember input:checked + span::after {
    opacity: 1;
}

.remember input:focus-visible + span {
    box-shadow: 0 0 0 4px rgba(0, 183, 229, 0.16);
}

.submit-button {
    display: flex;
    width: 100%;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 2px;
    border: 0;
    border-radius: var(--radius-md);
    color: #fff;
    background: linear-gradient(110deg, var(--brand-deep), var(--brand));
    box-shadow: 0 12px 25px rgba(0, 156, 203, 0.24);
    font-weight: 800;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.submit-button:hover {
    box-shadow: 0 15px 32px rgba(0, 156, 203, 0.31);
    filter: saturate(1.08);
    transform: translateY(-1px);
}

.submit-button:active {
    box-shadow: 0 8px 18px rgba(0, 156, 203, 0.22);
    transform: translateY(1px);
}

.submit-button:focus-visible {
    outline: 3px solid rgba(0, 183, 229, 0.28);
    outline-offset: 3px;
}

.submit-button svg,
.login-card__footer svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.login-card__footer {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #e7eef1;
    color: #8196a1;
    font-size: 0.72rem;
    line-height: 1.55;
}

.login-card__footer svg {
    flex: 0 0 auto;
    margin-top: 2px;
    color: var(--brand-deep);
}

.page-footer {
    position: absolute;
    right: 30px;
    bottom: 20px;
    left: 30px;
    margin: 0;
    color: #8ca0aa;
    font-size: 0.68rem;
    text-align: center;
}

.mobile-brand {
    display: none;
}

.toast {
    position: fixed;
    z-index: 10;
    right: 22px;
    bottom: 22px;
    max-width: min(390px, calc(100vw - 44px));
    padding: 14px 17px;
    border: 1px solid #b9e7f2;
    border-radius: 12px;
    color: var(--info);
    background: #fff;
    box-shadow: 0 18px 44px rgba(19, 63, 85, 0.18);
    font-size: 0.82rem;
    line-height: 1.5;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1080px) {
    .login-shell {
        grid-template-columns: minmax(360px, 0.8fr) minmax(480px, 1.2fr);
    }

    .brand-panel {
        padding: 40px;
    }

    .brand-copy h1 {
        font-size: clamp(2.6rem, 5vw, 4.1rem);
    }

    .brand-visual {
        display: none;
    }
}

@media (max-width: 820px) {
    .login-shell {
        display: block;
    }

    .brand-panel {
        display: none;
    }

    .form-panel {
        min-height: 100vh;
        flex-direction: column;
        padding: 30px 20px 72px;
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 12px;
        width: min(100%, 480px);
        margin: 0 auto 22px;
    }

    .mobile-brand img {
        width: 56px;
        height: 56px;
        object-fit: contain;
    }

    .mobile-brand div {
        display: grid;
        gap: 3px;
    }

    .mobile-brand strong {
        color: var(--brand-ink);
        font-family: Georgia, "Times New Roman", serif;
        font-size: 1.2rem;
        font-weight: 400;
    }

    .mobile-brand span {
        color: var(--muted);
        font-size: 0.75rem;
    }
}

@media (max-width: 520px) {
    .form-panel {
        justify-content: flex-start;
        padding: 24px 14px 70px;
    }

    .mobile-brand {
        padding: 0 6px;
    }

    .login-card {
        padding: 30px 22px;
        border-radius: 22px;
    }

    .field__label-row {
        align-items: baseline;
    }

    .page-footer {
        bottom: 14px;
    }
}

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