/* PLANDER — auth pages (login + password recovery) */

.auth-page {
    --auth-bg: #06080c;
    --auth-surface: #0e1319;
    --auth-elevated: #1a222d;
    --auth-border: rgba(255, 255, 255, 0.07);
    --auth-border-hi: rgba(129, 140, 248, 0.3);
    --auth-text: #f1f5f9;
    --auth-muted: #94a3b8;
    --auth-accent: #818cf8;
    --auth-accent-2: #a78bfa;
    --auth-ok: #34d399;
    --auth-danger: #f87171;
    --auth-warn: #fbbf24;

    min-height: 100vh;
    margin: 0;
    font-family: iransans, sans-serif;
    color: var(--auth-text);
    background:
        radial-gradient(ellipse 55% 35% at 100% 0%, rgba(129, 140, 248, 0.12), transparent),
        radial-gradient(ellipse 40% 30% at 0% 100%, rgba(6, 182, 212, 0.05), transparent),
        var(--auth-bg) !important;
}

.auth-wrap {
    max-width: 400px;
    margin: 0 auto;
    padding: 2.5rem 1rem 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-logo {
    text-align: center;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--auth-accent), var(--auth-accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.auth-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.55rem 0.5rem;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--auth-muted);
    text-decoration: none;
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.auth-tab:hover {
    color: var(--auth-text);
    border-color: var(--auth-border-hi);
}

.auth-tab--active {
    color: var(--auth-accent);
    border-color: var(--auth-border-hi);
    background: rgba(129, 140, 248, 0.1);
}

.auth-tab i { font-size: 0.95rem; }

.auth-resend { margin-top: 0.75rem; }

.auth-link--btn {
    width: 100%;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

.auth-card {
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    border-radius: 16px;
    padding: 1.35rem 1.25rem;
}

.auth-title {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0 0 0.3rem;
    text-align: center;
}

.auth-sub {
    font-size: 0.72rem;
    color: var(--auth-muted);
    text-align: center;
    margin: 0 0 1.15rem;
    line-height: 1.55;
}

.auth-form { display: flex; flex-direction: column; gap: 0.75rem; }

.auth-field { display: flex; flex-direction: column; gap: 0.3rem; }

.auth-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--auth-muted);
}

.auth-input {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--auth-border);
    background: var(--auth-elevated);
    color: var(--auth-text);
    font-family: inherit;
    font-size: 0.85rem;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.auth-input::placeholder { color: #64748b; }

.auth-input:focus {
    outline: none;
    border-color: var(--auth-border-hi);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
}

.auth-input--code {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.35em;
    padding: 0.75rem;
}

textarea.auth-input {
    resize: vertical;
    min-height: 4.5rem;
    letter-spacing: normal;
    line-height: 1.6;
}

.auth-optional {
    font-weight: 500;
    opacity: 0.75;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    min-height: 46px;
    margin-top: 0.25rem;
    padding: 0.65rem 1rem;
    border: none;
    border-radius: 11px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(99, 102, 241, 0.45);
}

.auth-btn:active { transform: translateY(0); }

.auth-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    margin-top: 1rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--auth-accent);
    text-decoration: none;
    transition: color 0.15s;
}

.auth-link:hover { color: var(--auth-accent-2); }

.auth-alert {
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-bottom: 0.85rem;
    line-height: 1.45;
}

.auth-alert--error,
.auth-alert--danger {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.28);
    color: #fecaca;
}

.auth-alert--success {
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.28);
    color: #a7f3d0;
}

.auth-alert--warning {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.28);
    color: #fde68a;
}

.auth-alert--info {
    background: rgba(129, 140, 248, 0.1);
    border: 1px solid rgba(129, 140, 248, 0.25);
    color: #c7d2fe;
}

.auth-alert a,
.auth-alert-link {
    color: #a5b4fc !important;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-alert a:hover,
.auth-alert-link:hover {
    color: #e0e7ff !important;
}

.auth-steps {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.auth-step {
    flex: 1;
    text-align: center;
    padding: 0.35rem 0.25rem;
    border-radius: 8px;
    font-size: 0.58rem;
    font-weight: 700;
    color: var(--auth-muted);
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
}

.auth-step--active {
    color: var(--auth-accent);
    border-color: var(--auth-border-hi);
    background: rgba(129, 140, 248, 0.1);
}

.auth-step--done {
    color: var(--auth-ok);
    border-color: rgba(52, 211, 153, 0.25);
}

.auth-footer {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.62rem;
    color: var(--auth-muted);
}

.auth-footer a {
    color: var(--auth-accent);
    text-decoration: none;
}

.auth-theme-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    margin: 0 auto 1.15rem;
    padding: 0.22rem;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    background: var(--auth-elevated);
    color: inherit;
    cursor: pointer;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.auth-theme-switch:focus-visible {
    outline: 2px solid var(--auth-accent);
    outline-offset: 2px;
}

.auth-theme-switch__opt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2.15rem;
    border-radius: 9px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--auth-muted);
}

.auth-theme-switch__opt svg {
    width: 0.95rem;
    height: 0.95rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.auth-theme-switch__opt--dark svg {
    fill: currentColor;
    stroke: none;
}

html[data-theme="light"] .auth-theme-switch__opt--light,
html[data-theme="dark"] .auth-theme-switch__opt--dark {
    background: var(--auth-surface);
    color: var(--auth-text);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

html[data-theme="light"] .auth-theme-switch__opt--light {
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .auth-page {
    --auth-bg: #f3f5f8;
    --auth-surface: #ffffff;
    --auth-elevated: #f1f5f9;
    --auth-border: rgba(15, 23, 42, 0.1);
    --auth-border-hi: rgba(2, 132, 199, 0.35);
    --auth-text: #0f172a;
    --auth-muted: #64748b;
    --auth-accent: #0284c7;
    --auth-accent-2: #0369a1;
    --auth-ok: #059669;
    --auth-danger: #dc2626;
    --auth-warn: #d97706;
    background:
        radial-gradient(ellipse 55% 35% at 100% 0%, rgba(2, 132, 199, 0.08), transparent),
        radial-gradient(ellipse 40% 30% at 0% 100%, rgba(14, 165, 233, 0.06), transparent),
        var(--auth-bg) !important;
}

html[data-theme="light"] .auth-page .auth-card {
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .auth-page .auth-input::placeholder {
    color: #94a3b8;
}

html[data-theme="light"] .auth-page .auth-btn {
    background: linear-gradient(145deg, #38bdf8, #0284c7);
    box-shadow: 0 4px 18px rgba(2, 132, 199, 0.28);
}

html[data-theme="light"] .auth-page .auth-btn:hover {
    box-shadow: 0 6px 22px rgba(2, 132, 199, 0.38);
}

html[data-theme="light"] .auth-page .auth-alert--error,
html[data-theme="light"] .auth-page .auth-alert--danger {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.22);
    color: #b91c1c;
}

html[data-theme="light"] .auth-page .auth-alert--success {
    background: rgba(5, 150, 105, 0.08);
    border-color: rgba(5, 150, 105, 0.22);
    color: #047857;
}

html[data-theme="light"] .auth-page .auth-alert--warning {
    background: rgba(217, 119, 6, 0.08);
    border-color: rgba(217, 119, 6, 0.22);
    color: #b45309;
}

html[data-theme="light"] .auth-page .auth-alert--info {
    background: rgba(2, 132, 199, 0.08);
    border-color: rgba(2, 132, 199, 0.22);
    color: #0369a1;
}

html[data-theme="light"] .auth-page .auth-alert a,
html[data-theme="light"] .auth-page .auth-alert-link {
    color: #0369a1 !important;
}

html[data-theme="light"] .auth-page .auth-alert a:hover,
html[data-theme="light"] .auth-page .auth-alert-link:hover {
    color: #0c4a6e !important;
}

.auth-page input,
.auth-page select,
.auth-page textarea,
.auth-page button,
.auth-page .auth-btn {
  font-size: 16px;
  min-height: 44px;
}

.auth-page .auth-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 575.98px) {
  .auth-wrap { padding: 1.25rem 0.85rem calc(1.25rem + env(safe-area-inset-bottom, 0px)); }
  .auth-card { width: 100%; }
}

@font-face {
  font-family: "iransans";
  src: url("../fonts/IRANSansWeb_Light.woff") format("woff");
  font-display: swap;
}

body {
  font-family: iransans, Tahoma, sans-serif;
}
