:root {
    --bg: #070709;
    --panel: rgba(18, 18, 24, 0.72);
    --panel-border: rgba(255, 255, 255, 0.08);
    --text: #f8f4ee;
    --muted: #b9b1a6;
    --accent: #facc15;
    --accent-2: #f59e0b;
    --field: rgba(255, 255, 255, 0.06);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Vazirmatn", sans-serif;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    direction: rtl;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: -35%;
    background:
        radial-gradient(circle at 20% 20%, rgba(229, 9, 20, 0.45), transparent 28%),
        radial-gradient(circle at 80% 12%, rgba(255, 138, 0, 0.32), transparent 24%),
        radial-gradient(circle at 50% 90%, rgba(88, 11, 18, 0.8), transparent 32%);
    animation: drift 14s ease-in-out infinite alternate;
    z-index: -2;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(120deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.36)),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 80px);
    z-index: -1;
}

@keyframes drift {
    from { transform: translate3d(-3%, -2%, 0) rotate(0deg) scale(1); }
    to { transform: translate3d(3%, 2%, 0) rotate(8deg) scale(1.08); }
}

.login-shell {
    min-height: 100vh;
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 48px;
    padding: 48px 0;
}

.brand-panel {
    width: 100%;
    display: flex;
    justify-content: center;
}

.brand-panel--stacked {
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    max-width: 520px;
    margin-inline: auto;
    text-align: right;
}

.brand-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
    text-align: right;
}

.brand-subtitle {
    margin: 0;
    color: var(--accent-2);
    font-size: clamp(1.15rem, 2.2vw, 1.65rem);
    font-weight: 900;
    letter-spacing: 0.08em;
}

.brand-copy {
    margin: 14px 0 0;
    max-width: 520px;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.7;
}

.brand-copy a {
    color: var(--accent-2);
}

.brand-mark {
    margin: 0;
    width: 100%;
    display: flex;
    justify-content: center;
}

.brand-mark-image {
    width: auto;
    height: 120px;
    margin: 24px 0 20px;
    display: block;
}

.eyebrow {
    margin: 0;
    color: var(--accent-2);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.72rem;
    font-weight: 800;
}

.login-card {
    position: relative;
    padding: clamp(24px, 5vw, 42px);
    border: 1px solid var(--panel-border);
    border-radius: 32px;
    background: var(--panel);
    box-shadow: 0 36px 100px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(22px);
    overflow: hidden;
}

.login-card p {
    line-height: 1.7;
}

.card-glow {
    position: absolute;
    inset: -40% -20% auto auto;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(229, 9, 20, 0.28);
    filter: blur(32px);
}

.login-header {
    position: relative;
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 28px;
}

.logo-dot {
    width: 14px;
    height: 52px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 40px rgba(229, 9, 20, 0.9);
}

.login-header h2 {
    margin: 4px 0 0;
    font-size: 2.2rem;
}

.alert {
    position: relative;
    margin-bottom: 18px;
    padding: 13px 15px;
    border-radius: 16px;
    color: #ffe8e8;
    background: rgba(229, 9, 20, 0.2);
    border: 1px solid rgba(229, 9, 20, 0.45);
}

.login-form {
    position: relative;
    display: grid;
    gap: 12px;
}

.support-card {
    display: grid;
    gap: 18px;
}

.setup-steps {
    margin: 0;
    padding-inline-start: 18px;
    color: var(--muted);
    line-height: 1.8;
}

.setup-qr {
    display: grid;
    justify-items: center;
    gap: 12px;
    text-align: center;
    margin: 18px 0;
}

.setup-qr img {
    border-radius: 16px;
    background: #fff;
    padding: 10px;
    width: 220px;
    height: 220px;
}

.manual-secret {
    display: grid;
    gap: 8px;
    justify-items: center;
    text-align: center;
}

.manual-secret code {
    direction: ltr;
    user-select: all;
    background: rgba(255, 255, 255, 0.08);
    padding: 10px 12px;
    border-radius: 12px;
}

.login-form label {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.login-form input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 16px;
    padding: 15px 16px;
    color: var(--text);
    background: var(--field);
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.login-form input:focus {
    border-color: rgba(229, 9, 20, 0.8);
    box-shadow: 0 0 0 4px rgba(229, 9, 20, 0.14);
}

.password-wrap { position: relative; }

.toggle-password {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    border: 0;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease;
    outline: none;
}

.toggle-password:hover,
.toggle-password:focus-visible {
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
}

.toggle-password:focus-visible {
    box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.5);
}

.login-button {
    margin-top: 14px;
    border: 0;
    border-radius: 18px;
    padding: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #b20610);
    font-weight: 900;
    letter-spacing: 0.08em;
    cursor: pointer;
    box-shadow: 0 18px 44px rgba(229, 9, 20, 0.35);
    transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
    outline: none;
}

.login-button:hover,
.login-button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 22px 48px rgba(229, 9, 20, 0.45);
}

.login-button:focus-visible {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2), 0 22px 48px rgba(229, 9, 20, 0.45);
}

.login-button:active {
    transform: translateY(0);
    box-shadow: 0 12px 32px rgba(229, 9, 20, 0.3);
}

.login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

@media (max-width: 820px) {
    .login-shell {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 28px 0;
    }

    .brand-content {
        align-items: center;
        text-align: center;
    }
}


/* ==========================================================================
   HOH COMPLETE LIGHT MODE SUITE FOR AUTH
   ========================================================================== */
[data-theme="light"] {
    --bg: #f8fafc;
    --panel: #ffffff;
    --panel-border: rgba(0, 0, 0, 0.1);
    --text: #0f172a;
    --muted: #64748b;
    --accent: #d97706;
    --accent-2: #b45309;
    --field: #f1f5f9;
}

[data-theme="light"] body {
    color: #0f172a !important;
    background: #f8fafc !important;
}

[data-theme="light"] body::before {
    background:
        radial-gradient(circle at 20% 20%, rgba(217, 119, 6, 0.15), transparent 28%),
        radial-gradient(circle at 80% 12%, rgba(245, 158, 11, 0.12), transparent 24%),
        radial-gradient(circle at 50% 90%, rgba(254, 243, 199, 0.5), transparent 32%) !important;
}

[data-theme="light"] body::after {
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.8), rgba(241, 245, 249, 0.6)) !important;
}

[data-theme="light"] .login-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .login-header h2 {
    color: #0f172a !important;
}

[data-theme="light"] .eyebrow {
    color: #d97706 !important;
}

[data-theme="light"] .brand-subtitle {
    color: #0f172a !important;
}

[data-theme="light"] .brand-copy {
    color: #64748b !important;
}

[data-theme="light"] .login-form label {
    color: #334155 !important;
}

[data-theme="light"] .login-form input {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

[data-theme="light"] .login-form input:focus {
    background: #ffffff !important;
    border-color: #d97706 !important;
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12) !important;
}

[data-theme="light"] .plan-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

[data-theme="light"] .plan-card:hover {
    background: #fffbeb !important;
    border-color: #fcd34d !important;
}

[data-theme="light"] .support-box,
[data-theme="light"] .bank-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important;
}
