:root {
    --auth-bg: #eef3f8;
    --auth-panel: #ffffff;
    --auth-ink: #101828;
    --auth-muted: #667085;
    --auth-line: #d9e2ee;
    --auth-brand: #0b4ea2;
    --auth-brand-2: #1769d8;
    --auth-sidebar: #071832;
    --auth-success: #087f5b;
    --auth-warning: #a15c00;
    --auth-danger: #b42318;
}

* {
    box-sizing: border-box;
}

body {
    background: var(--auth-bg);
    color: var(--auth-ink);
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    min-height: 100vh;
}

.auth-page {
    align-items: center;
    display: flex;
    min-height: 100vh;
    padding: 28px;
}

.auth-panel {
    background: var(--auth-panel);
    border: 1px solid var(--auth-line);
    border-radius: 10px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .14);
    display: grid;
    grid-template-columns: minmax(270px, .82fr) minmax(390px, 1.18fr);
    margin: 0 auto;
    max-width: 900px;
    overflow: hidden;
    width: 100%;
}

.auth-brand {
    background-color: #0b2447;
    background-image:
        radial-gradient(circle at 108% 4%, rgba(255, 255, 255, .07) 0 110px, transparent 111px),
        linear-gradient(135deg, #0b2447 0%, #123b70 68%, #0f5caf 100%);
    background-repeat: no-repeat;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 470px;
    padding: 32px;
}

.auth-logo {
    align-items: center;
    background: linear-gradient(135deg, rgba(23, 105, 216, .18), rgba(7, 24, 50, .3));
    border: 1px solid rgba(120, 154, 194, .28);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    min-height: 104px;
    padding: 12px 16px;
}

.auth-logo img {
    display: block;
    filter: drop-shadow(0 7px 13px rgba(0, 10, 35, .24));
    max-height: 82px;
    max-width: 100%;
}

.auth-brand-copy {
    margin-top: 28px;
}

.auth-brand-copy h2 {
    font-size: 21px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 10px;
}

.auth-brand-copy p {
    color: #b9c7d8;
    font-size: 13.5px;
    line-height: 1.55;
    margin: 0;
}

.auth-security-list {
    border-top: 1px solid rgba(255, 255, 255, .12);
    color: #c7d3e2;
    font-size: 12px;
    line-height: 1.55;
    margin-top: 28px;
    padding-top: 18px;
}

.auth-security-item {
    align-items: flex-start;
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.auth-security-item:first-child {
    margin-top: 0;
}

.auth-security-dot {
    background: #65a5f5;
    border-radius: 999px;
    flex: 0 0 6px;
    height: 6px;
    margin-top: 6px;
    width: 6px;
}

.auth-form-side {
    align-items: center;
    display: flex;
    padding: 42px;
}

.auth-form-wrap {
    width: 100%;
}

.auth-eyebrow {
    color: var(--auth-brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .055em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.auth-eyebrow-recovery {
    font-weight: 800;
}

.auth-title {
    color: #0b1f3a;
    font-size: 26px;
    font-weight: 600;
    margin: 0 0 8px;
}

.auth-caption {
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 24px;
}

.auth-label {
    color: #344054;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 7px;
}

.auth-control {
    border: 1px solid #cfd8e5;
    border-radius: 7px;
    min-height: 44px;
}

.auth-control:focus {
    border-color: var(--auth-brand-2);
    box-shadow: 0 0 0 .2rem rgba(23, 105, 216, .13);
}

.auth-btn-primary {
    background: var(--auth-brand);
    border: 1px solid var(--auth-brand);
    border-radius: 7px;
    color: #fff;
    font-weight: 600;
    min-height: 44px;
}

.auth-btn-primary:hover,
.auth-btn-primary:focus {
    background: #083e82;
    border-color: #083e82;
    color: #fff;
}

.auth-link {
    color: var(--auth-brand);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.auth-link:hover,
.auth-link:focus {
    color: #083e82;
    text-decoration: underline;
}

.auth-alert {
    border: 1px solid;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 20px;
    padding: 13px 15px;
}

.auth-alert strong {
    display: block;
    font-size: 13.5px;
    margin-bottom: 3px;
}

.auth-alert-success {
    background: #ecfdf3;
    border-color: #a7f3d0;
    color: #065f46;
}

.auth-alert-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #854d0e;
}

.auth-alert-error {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #9f1239;
}

body.auth-modal-open {
    overflow: hidden;
}

.auth-notice-backdrop {
    align-items: center;
    backdrop-filter: blur(8px);
    background: rgba(20, 32, 54, .42);
    display: none;
    inset: 0;
    justify-content: center;
    padding: 22px;
    position: fixed;
    z-index: 1200;
}

.auth-notice-backdrop.is-open {
    display: flex;
}

.auth-notice-dialog {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border: 1px solid #d9e2ee;
    border-radius: 10px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .25);
    max-width: 460px;
    overflow: hidden;
    padding: 32px 30px 24px;
    position: relative;
    text-align: center;
    width: min(100%, 460px);
}

.auth-notice-dialog::before {
    background: linear-gradient(90deg, #0b4ea2 0%, #1769d8 100%);
    content: "";
    height: 4px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.auth-notice-backdrop.notice-success .auth-notice-dialog::before {
    background: linear-gradient(90deg, #087f5b 0%, #12a174 100%);
}

.auth-notice-backdrop.notice-warning .auth-notice-dialog::before {
    background: linear-gradient(90deg, #d97706 0%, #f59e0b 100%);
}

.auth-notice-close {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #64748b;
    display: inline-flex;
    font-size: 19px;
    height: 34px;
    justify-content: center;
    position: absolute;
    right: 14px;
    top: 14px;
    width: 34px;
}

.auth-notice-close:hover,
.auth-notice-close:focus {
    background: #eef2f7;
    color: #344054;
}

.auth-notice-icon {
    align-items: center;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    color: #0b4ea2;
    display: inline-flex;
    font-size: 28px;
    font-weight: 700;
    height: 66px;
    justify-content: center;
    margin-bottom: 17px;
    width: 66px;
}

.auth-notice-eyebrow {
    color: #1262c6;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .09em;
    margin: 0 0 12px;
    text-transform: uppercase;
}

.notice-success .auth-notice-icon {
    background: #ecfdf3;
    border-color: #a7f3d0;
    color: #087f5b;
}

.notice-warning .auth-notice-icon {
    background: #fffbeb;
    border-color: #fde68a;
    color: #a15c00;
}

.auth-notice-title {
    color: #172335;
    font-size: 21px;
    font-weight: 600;
    margin: 0 0 9px;
}

.auth-notice-message {
    color: #52627a;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 22px;
}

.auth-notice-security {
    background: #f3f7fc;
    border-radius: 7px;
    color: #667085;
    font-size: 12px;
    line-height: 1.45;
    margin: -4px 0 20px;
    padding: 10px 12px;
}

.auth-notice-action {
    min-width: 150px;
}

.auth-info {
    background: #f3f7fc;
    border-left: 4px solid var(--auth-brand-2);
    border-radius: 5px;
    color: #52627a;
    font-size: 12.5px;
    line-height: 1.5;
    margin-top: 18px;
    padding: 12px 14px;
}

.password-wrap {
    position: relative;
}

.password-toggle {
    background: transparent;
    border: 0;
    color: var(--auth-brand);
    font-size: 12px;
    font-weight: 600;
    padding: 8px;
    position: absolute;
    right: 5px;
    top: 31px;
}

.password-rules {
    display: grid;
    gap: 6px;
    grid-template-columns: 1fr 1fr;
    margin: 12px 0 20px;
}

.password-rule {
    color: #7b8798;
    font-size: 11.5px;
}

.password-rule::before {
    content: "○";
    display: inline-block;
    margin-right: 5px;
}

.password-rule.is-valid {
    color: var(--auth-success);
}

.password-rule.is-valid::before {
    content: "✓";
}

.auth-invalid {
    color: var(--auth-danger);
    display: none;
    font-size: 12px;
    margin-top: 6px;
}

.is-invalid + .auth-invalid {
    display: block;
}

.token-state {
    text-align: center;
}

.token-state-icon {
    align-items: center;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    color: #c2410c;
    display: inline-flex;
    font-size: 24px;
    font-weight: 700;
    height: 58px;
    justify-content: center;
    margin-bottom: 16px;
    width: 58px;
}

@media (max-width: 820px) {
    .auth-panel {
        grid-template-columns: 1fr;
        max-width: 500px;
    }

    .auth-brand {
        min-height: auto;
        padding: 22px;
    }

    .auth-brand-copy,
    .auth-security-list {
        display: none;
    }

    .auth-logo {
        min-height: 88px;
    }

    .auth-logo img {
        max-height: 68px;
    }

    .auth-form-side {
        padding: 30px 25px;
    }
}

@media (max-width: 460px) {
    .auth-page {
        padding: 12px;
    }

    .auth-form-side {
        padding: 26px 20px;
    }

    .password-rules {
        grid-template-columns: 1fr;
    }
}
