
.auth-screen {
    min-height: calc(100vh - 60px - 120px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 28px 18px 40px;
    background:
        radial-gradient(1200px 600px at 50% -10%, var(--c-primary-50), transparent 70%),
        linear-gradient(180deg, #fff8f1 0%, var(--c-bg) 100%);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--c-bg-elev);
    border-radius: var(--r-xl, 22px);
    padding: 30px 24px 26px;
    box-shadow:
        0 10px 30px rgba(42, 31, 61, 0.08),
        0 1px 0 rgba(255, 255, 255, 0.6) inset;
    border: 1px solid rgba(235, 226, 232, 0.7);
    text-align: center;
}

.auth-icon {
    width: auto; height: auto;
    margin: 0 auto 12px;
    display: block;
    text-align: center;
    font-size: 44px;
    line-height: 1;
    background: none;
    border: 0;
    box-shadow: none;
    border-radius: 0;
}

.auth-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--c-ink);
    margin: 0 0 8px;
    line-height: 1.2;
}

.auth-sub {
    color: var(--c-ink-soft);
    font-size: 14.5px;
    line-height: 1.55;
    margin: 0 0 22px;
}

.auth-sub strong {
    color: var(--c-primary-700);
    font-weight: 700;
}

.auth-form {
    text-align: left;
    margin: 0 0 18px;
}

.auth-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--c-ink);
    margin: 0 0 8px;
    letter-spacing: 0.01em;
}

.auth-phone-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1.5px solid var(--c-line);
    border-radius: 12px;
    padding: 0 14px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-phone-wrap:focus-within {
    border-color: var(--c-primary-300);
    box-shadow: 0 0 0 4px rgba(107, 33, 168, 0.08);
}

.auth-phone-flag {
    font-size: 22px;
    line-height: 1;
}

.auth-input {
    width: 100%;
    border: 1.5px solid var(--c-line);
    border-radius: 12px;
    padding: 14px 14px;
    font-size: 17px;
    color: var(--c-ink);
    background: #fff;
    font-family: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
    -webkit-appearance: none;
}

.auth-phone-wrap .auth-input {
    border: none;
    border-radius: 0;
    padding: 14px 0;
    background: transparent;
    box-shadow: none;
}

.auth-input:focus {
    outline: none;
    border-color: var(--c-primary-300);
    box-shadow: 0 0 0 4px rgba(107, 33, 168, 0.08);
}

.auth-input-otp {
    text-align: center;
    letter-spacing: 0.5em;
    font-weight: 800;
    font-size: 28px;
    padding: 18px 14px;
    font-variant-numeric: tabular-nums;
}

.auth-hint {
    font-size: 12px;
    color: var(--c-ink-mute);
    margin: 8px 2px 16px;
    line-height: 1.4;
}

.auth-hint strong {
    color: var(--c-ink-soft);
    font-weight: 700;
}

.auth-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    color: var(--c-ink-soft);
    line-height: 1.5;
    margin: 14px 0 18px;
    text-align: left;
    cursor: pointer;
}

.auth-checkbox input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--c-primary);
    cursor: pointer;
}

.auth-checkbox a {
    color: var(--c-primary-700);
    text-decoration: underline;
    font-weight: 600;
}

.auth-checkbox strong {
    color: var(--c-ink);
    font-weight: 700;
}

.auth-checkbox-optional {
    margin-top: -6px;
    font-size: 12.5px;
    color: var(--c-ink-soft);
    opacity: .88;
}

.auth-submit {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 14px;
    margin-top: 4px;
}

.auth-alert {
    background: #fff1f0;
    color: var(--c-danger);
    border: 1px solid #f4c4be;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.45;
    margin: 0 0 16px;
    text-align: left;
    font-weight: 500;
}

.auth-trust {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px 20px;
    font-size: 12.5px;
    color: var(--c-ink-mute);
    margin: 18px 0 8px;
    font-weight: 500;
}

.auth-meta {
    font-size: 11.5px;
    color: var(--c-ink-mute);
    margin: 12px 0 0;
    line-height: 1.5;
}

.auth-resend {
    margin: 14px 0 0;
    text-align: center;
}

.auth-resend-btn {
    background: none;
    border: none;
    color: var(--c-primary-700);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background .15s ease;
    font-family: inherit;
}

.auth-resend-btn:hover:not(:disabled) {
    background: var(--c-primary-50);
}

.auth-resend-btn:disabled {
    color: var(--c-ink-mute);
    cursor: not-allowed;
}

.auth-link-back {
    font-size: 13.5px;
    color: var(--c-ink-soft);
    text-decoration: none;
    font-weight: 600;
}

.auth-link-back:hover {
    color: var(--c-primary-700);
}

@media (max-width: 380px) {
    .auth-card {
        padding: 24px 18px 22px;
        border-radius: 18px;
    }
    .auth-title { font-size: 23px; }
    .auth-input-otp { font-size: 24px; letter-spacing: 0.4em; }
    .auth-trust { gap: 10px 14px; font-size: 11.5px; }
}

.auth-tabs {
    display: flex;
    gap: 6px;
    margin: 14px 0 18px;
    background: rgba(0,0,0,0.04);
    padding: 4px;
    border-radius: 12px;
}
.auth-tab {
    flex: 1;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 9px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: #6b7280;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.auth-tab.is-active {
    background: #fff;
    color: #0a0a0a;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.auth-pane { display: none; }
.auth-pane.is-active { display: block; }

.auth-pane-sub {
    margin: 0 0 18px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    text-align: center;
}
.auth-pane-foot {
    margin: 16px 0 0;
    font-size: 12.5px;
    color: #6b7280;
    text-align: center;
}
.auth-link {
    color: #6b21a8;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}
.auth-link:hover { color: #4a2272; }

.auth-flash {
    padding: 11px 14px;
    background: rgba(16, 185, 129, 0.10);
    border: 1px solid rgba(16, 185, 129, 0.30);
    color: #047857;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    margin-bottom: 14px;
}


body.theme-azarath .auth-screen {
    background:
        radial-gradient(ellipse at 50% -20%, rgba(244, 197, 66, 0.10) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 110%, rgba(106, 27, 154, 0.14) 0%, transparent 50%),
        #0a0a0a;
    min-height: calc(100vh - 60px - 80px);
    padding-top: 36px;
}

body.theme-azarath .auth-card {
    background: linear-gradient(180deg, #1a0d2e 0%, #14091f 100%);
    border: 1px solid rgba(244, 197, 66, 0.28);
    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(244, 197, 66, 0.08) inset,
        0 0 80px rgba(106, 27, 154, 0.12);
    color: #f5e6d3;
}

body.theme-azarath .auth-icon {
    background: none;
    border: 0;
    box-shadow: none;
    color: #0a0a0a;
}

body.theme-azarath .auth-title {
    font-family: 'Playfair Display', Georgia, serif;
    color: #f4c542;
    letter-spacing: 0.04em;
    text-shadow: 0 0 18px rgba(244, 197, 66, 0.25);
}

body.theme-azarath .auth-sub,
body.theme-azarath .auth-pane-sub,
body.theme-azarath .auth-hint {
    color: #c9b8a4;
}
body.theme-azarath .auth-sub strong,
body.theme-azarath .auth-pane-sub strong {
    color: #f4c542;
}
body.theme-azarath .auth-sub code {
    background: rgba(244, 197, 66, 0.18) !important;
    color: #f4c542 !important;
    border: 1px solid rgba(244, 197, 66, 0.3);
}

body.theme-azarath .auth-label {
    color: #f5e6d3;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 11.5px;
}

body.theme-azarath .auth-phone-wrap,
body.theme-azarath .auth-input {
    background: rgba(0, 0, 0, 0.4);
    border: 1.5px solid rgba(245, 230, 211, 0.18);
    color: #f5e6d3;
    border-radius: 10px;
}
body.theme-azarath .auth-input {
    padding: 12px 14px;
}
body.theme-azarath .auth-phone-wrap .auth-input {
    background: transparent;
    border: none;
    color: #f5e6d3;
}
body.theme-azarath .auth-phone-wrap:focus-within,
body.theme-azarath .auth-input:focus {
    border-color: #f4c542;
    box-shadow: 0 0 0 3px rgba(244, 197, 66, 0.18);
    outline: none;
}
body.theme-azarath .auth-input::placeholder {
    color: rgba(245, 230, 211, 0.35);
}

body.theme-azarath .auth-checkbox,
body.theme-azarath .auth-checkbox span {
    color: #d8c8b5;
}
body.theme-azarath .auth-checkbox input[type="checkbox"] {
    accent-color: #f4c542;
}
body.theme-azarath .auth-checkbox a {
    color: #f4c542;
    text-decoration: underline;
    text-underline-offset: 2px;
}
body.theme-azarath .auth-checkbox strong {
    color: #f4c542;
}

body.theme-azarath .btn-primary.auth-submit,
body.theme-azarath .auth-submit {
    background: #f4c542;
    color: #0a0a0a !important;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 14px;
    padding: 14px 18px;
    border: none;
    box-shadow: 0 6px 20px rgba(244, 197, 66, 0.25);
    transition: filter .15s ease, transform .15s ease, box-shadow .15s ease;
}
body.theme-azarath .auth-submit:hover {
    filter: brightness(1.08);
    box-shadow: 0 8px 26px rgba(244, 197, 66, 0.4);
    transform: translateY(-1px);
}

body.theme-azarath .auth-pane-foot {
    color: #a89580;
    border-top: 1px solid rgba(245, 230, 211, 0.10);
    padding-top: 14px;
    margin-top: 16px;
}
body.theme-azarath .auth-link {
    color: #f4c542;
    font-weight: 700;
}
body.theme-azarath .auth-link:hover {
    color: #ffd86a;
    text-decoration: underline;
}

body.theme-azarath .auth-trust {
    color: #a89580;
    border-top: 1px solid rgba(245, 230, 211, 0.08);
    padding-top: 14px;
}
body.theme-azarath .auth-trust span {
    background: rgba(244, 197, 66, 0.05);
    border: 1px solid rgba(244, 197, 66, 0.15);
    color: #d8c8b5;
}
body.theme-azarath .auth-meta {
    color: rgba(168, 149, 128, 0.7);
    font-size: 11px;
}

body.theme-azarath .auth-alert {
    background: rgba(220, 38, 38, 0.12);
    border: 1px solid rgba(220, 38, 38, 0.4);
    color: #fca5a5;
}
body.theme-azarath .auth-alert-info {
    background: rgba(244, 197, 66, 0.10) !important;
    border-color: rgba(244, 197, 66, 0.3) !important;
    color: #f4c542 !important;
}

body.theme-azarath .auth-tab {
    background: rgba(0, 0, 0, 0.3);
    color: #c9b8a4;
    border: 1px solid rgba(245, 230, 211, 0.15);
}
body.theme-azarath .auth-tab.is-active {
    background: #f4c542;
    color: #0a0a0a;
    border-color: #f4c542;
    font-weight: 800;
}

body.theme-azarath { background: #4b5563 !important; }
body.theme-azarath .auth-screen {
    background: #4b5563;
    color: #0a0a0a;
    min-height: 0;
    padding: 0;
}
body.theme-azarath .auth-card {
    margin: 0;
    max-width: none;
}
body.theme-azarath .auth-card {
    background: #f3f4f6;
    color: #0a0a0a;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
body.theme-azarath .auth-icon {
    background: none;
    color: #0a0a0a;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
body.theme-azarath .auth-title { color: #0a0a0a; }
body.theme-azarath .auth-sub { color: #0a0a0a !important; }
body.theme-azarath .auth-sub strong { color: #0a0a0a !important; }
body.theme-azarath .auth-label { color: #0a0a0a; }
body.theme-azarath .auth-pane-sub { color: #0a0a0a !important; }
body.theme-azarath .auth-checkbox { color: #0a0a0a !important; }
body.theme-azarath .auth-hint { color: #0a0a0a; }
body.theme-azarath .auth-meta { color: #374151; }
body.theme-azarath .auth-foot { color: #0a0a0a; }
body.theme-azarath .auth-input,
body.theme-azarath .auth-phone-wrap {
    background: #f3f4f6;
    color: #0a0a0a;
    border: 1px solid #c4c4c8;
    border-radius: 0;
}
body.theme-azarath .auth-input::placeholder { color: #9ca3af; }
body.theme-azarath .auth-input:focus,
body.theme-azarath .auth-phone-wrap:focus-within {
    border-color: #0a0a0a;
    outline: 2px solid #d4d4d8;
}
body.theme-azarath .auth-phone-flag { color: #4b5563; background: transparent; }
body.theme-azarath .auth-hint { color: #6b7280; }
body.theme-azarath .auth-hint strong { color: #0a0a0a; }
body.theme-azarath .auth-btn,
body.theme-azarath .auth-submit {
    background: #1f2937;
    color: #f3f4f6;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
body.theme-azarath .auth-btn:hover,
body.theme-azarath .auth-submit:hover {
    background: #111827;
    box-shadow: none;
    transform: none;
}
body.theme-azarath .auth-btn-secondary {
    background: #f3f4f6;
    color: #0a0a0a;
    border: 1px solid #c4c4c8;
    border-radius: 0;
}
body.theme-azarath .auth-checkbox,
body.theme-azarath .auth-checkbox a { color: #4b5563; }
body.theme-azarath .auth-checkbox a { text-decoration: underline; }
body.theme-azarath .auth-divider { color: #6b7280; }
body.theme-azarath .auth-divider::before,
body.theme-azarath .auth-divider::after { background: #c4c4c8; }
body.theme-azarath .auth-foot { color: #0a0a0a !important; }
body.theme-azarath .auth-foot a { color: #0a0a0a !important; text-decoration: underline; font-weight: 700; }
body.theme-azarath .auth-checkbox-optional {
    color: #0a0a0a !important;
    opacity: 1 !important;
}
body.theme-azarath .auth-checkbox,
body.theme-azarath .auth-checkbox * { color: #0a0a0a !important; }
body.theme-azarath .auth-trust {
    border-top: 1px solid #c4c4c8;
}
body.theme-azarath .auth-trust span {
    background: #f3f4f6;
    border: 1px solid #c4c4c8;
    color: #4b5563;
    border-radius: 0;
}
body.theme-azarath .auth-meta { color: #6b7280; }
body.theme-azarath .auth-alert {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    border-radius: 0;
}
body.theme-azarath .auth-alert-info {
    background: #f3f4f6 !important;
    border-color: #c4c4c8 !important;
    color: #0a0a0a !important;
}
body.theme-azarath .auth-card .auth-alert-info,
body.theme-azarath .auth-card .auth-alert-info * {
    color: #0a0a0a !important;
}
body.theme-azarath .auth-input { color: #0a0a0a !important; }
body.theme-azarath .auth-input::placeholder { color: #9ca3af !important; }
body.theme-azarath .auth-phone-flag { color: #0a0a0a !important; }
body.theme-azarath .auth-tab {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #c4c4c8;
    border-radius: 0;
}
body.theme-azarath .auth-tab.is-active {
    background: #1f2937;
    color: #f3f4f6;
    border-color: #0a0a0a;
}

body.theme-azarath .auth-card a,
body.theme-azarath .auth-card strong,
body.theme-azarath .auth-checkbox a,
body.theme-azarath .auth-hint strong,
body.theme-azarath .auth-sub strong,
body.theme-azarath .auth-foot a {
    color: #0a0a0a !important;
}
body.theme-azarath .auth-card code {
    background: #f3f4f6 !important;
    color: #0a0a0a !important;
    border: 1px solid #c4c4c8;
    border-radius: 0 !important;
}
body.theme-azarath .auth-card a {
    text-decoration: underline;
    text-decoration-color: #6b7280;
}

body.theme-azarath { color-scheme: light; }
body.theme-azarath .auth-input,
body.theme-azarath .auth-phone-wrap {
    background: #ffffff !important;
    color: #0a0a0a !important;
    border: 1px solid #c4c4c8;
    border-radius: 0;
}
body.theme-azarath .auth-input:focus,
body.theme-azarath .auth-phone-wrap:focus-within {
    background: #ffffff !important;
    border-color: #0a0a0a;
    outline: 2px solid #d4d4d8;
}
body.theme-azarath .auth-input:-webkit-autofill,
body.theme-azarath .auth-input:-webkit-autofill:hover,
body.theme-azarath .auth-input:-webkit-autofill:focus,
body.theme-azarath .auth-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #0a0a0a !important;
    caret-color: #0a0a0a;
    transition: background-color 9999s ease-in-out 0s;
}

.auth-trust-free {
    margin: 22px auto 0;
    max-width: 420px;
    padding: 0 18px;
    border-top: 0 !important;
}
body.theme-azarath .auth-trust-free {
    border-top: 0 !important;
    margin-top: 22px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    font-weight: 500;
    gap: 6px 18px;
}
body.theme-azarath .auth-trust-free span {
    background: transparent !important;
    border: 0 !important;
    color: rgba(255, 255, 255, 0.85) !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
