/* ═══════════════════════════════════════════════════════════════
   Account landing — سیناپس entry page
   ═══════════════════════════════════════════════════════════════ */

:root {
    --al-primary: #0ea5e9;
    --al-primary-dark: #0284c7;
    --al-accent: #38bdf8;
    --al-accent-2: #0c4a6e;
    --al-surface: #ffffff;
    --al-text: #0c4a6e;
    --al-text-muted: #475569;
    --al-radius: 22px;
    --al-radius-md: 14px;
    --al-shadow: 0 12px 48px rgba(14, 165, 233, 0.12);
    --al-gradient: linear-gradient(145deg, #0ea5e9 0%, #0284c7 55%, #0c4a6e 100%);
    --al-gradient-soft: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 50%, #f8fafc 100%);
    --al-font: var(--app-font-family, 'Vazirmatn', Tahoma, sans-serif);
}

.account-landing-body {
    min-height: 100dvh;
    margin: 0;
    font-family: var(--al-font);
    background: var(--al-gradient-soft);
    color: var(--al-text);
    position: relative;
    overflow-x: hidden;
}

.account-landing-body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 45% at 10% -5%, rgba(14, 165, 233, 0.16) 0%, transparent 55%),
        radial-gradient(ellipse 55% 35% at 95% 5%, rgba(56, 189, 248, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 45% 30% at 50% 105%, rgba(12, 74, 110, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.account-landing-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100dvh;
    max-width: 1200px;
    margin: 0 auto;
    gap: 0;
}

/* ── Hero panel ── */
.account-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem 2.75rem;
    position: relative;
    overflow: hidden;
}

.account-hero-glow {
    position: absolute;
    top: -20%;
    left: -15%;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.18) 0%, transparent 65%);
    pointer-events: none;
}

.account-hero-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    position: relative;
}

.account-hero-logo {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    filter: drop-shadow(0 6px 20px rgba(13, 148, 136, 0.35));
}

.account-hero-logo svg {
    width: 100%;
    height: 100%;
    display: block;
}

.account-hero-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    background: var(--al-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.account-hero-subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    color: var(--al-text-muted);
    font-weight: 500;
}

.account-hero-intro {
    position: relative;
    margin-bottom: 1.75rem;
}

.account-hero-intro p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.85;
    color: #334155;
}

.account-hero-intro strong {
    color: var(--al-primary-dark);
}

.account-hero-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.account-hero-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.88rem;
    color: #475569;
    padding: 0.55rem 0.85rem;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--al-radius-md);
    backdrop-filter: blur(8px);
    transition: transform 0.2s, box-shadow 0.2s;
}

.account-hero-features li:hover {
    transform: translateX(-3px);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.feature-icon {
    font-size: 1.15rem;
    line-height: 1;
    flex-shrink: 0;
}

.account-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--al-primary-dark);
    background: linear-gradient(135deg, #ecfdf5, #f0f9ff);
    border: 1px solid #99f6e4;
    border-radius: 999px;
    padding: 0.4rem 1rem;
    width: fit-content;
    font-weight: 600;
}

.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
    animation: al-pulse 2s ease-in-out infinite;
}

@keyframes al-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ── Login panel ── */
.account-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 2.5rem;
    background: var(--al-surface);
    border-right: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--al-shadow);
}

.account-panel-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.account-panel-header h2 {
    font-size: 1.45rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    color: var(--al-text);
}

.account-panel-header p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--al-text-muted);
}

.account-options {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.account-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-radius: var(--al-radius-md);
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--al-border, #e2e8f0);
    background: #fafbfc;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    position: relative;
    overflow: hidden;
}

.account-option::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: inherit;
}

.account-option:hover {
    transform: translateX(-4px);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1);
    color: inherit;
}

.account-option:hover::before {
    opacity: 1;
}

.account-option-icon {
    font-size: 1.65rem;
    line-height: 1;
    flex-shrink: 0;
    width: 2.5rem;
    text-align: center;
}

.account-option-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.account-option-text strong {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--al-text);
}

.account-option-text small {
    font-size: 0.78rem;
    color: var(--al-text-muted);
}

.account-section-label {
    margin: 0.45rem 0 0;
    padding: 0 0.15rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--al-text-muted);
}

.account-option--primary {
    border-color: #7dd3fc;
    background: linear-gradient(135deg, #f0f9ff 0%, #ecfeff 100%);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.12);
}

.account-option--primary .account-option-icon {
    color: #0284c7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.account-option-arrow {
    font-size: 1rem;
    color: #94a3b8;
    transition: transform 0.18s, color 0.18s;
    flex-shrink: 0;
}

.account-option:hover .account-option-arrow {
    transform: translateX(-4px);
    color: var(--al-primary);
}

.account-option--doctor::before { background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(2, 132, 199, 0.06)); }
.account-option--doctor:hover { border-color: #7dd3fc; background: #f0f9ff; }

.account-option--register::before { background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(12, 74, 110, 0.06)); }
.account-option--register:hover { border-color: #7dd3fc; background: #f0f9ff; }

.account-option--patient::before { background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(14, 165, 233, 0.06)); }
.account-option--patient:hover { border-color: #6ee7b7; background: #ecfdf5; }

.account-option--patient-new::before { background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(251, 191, 36, 0.06)); }
.account-option--patient-new:hover { border-color: #fcd34d; background: #fffbeb; }

.account-option--admin::before { background: linear-gradient(135deg, rgba(100, 116, 139, 0.1), rgba(71, 85, 105, 0.06)); }
.account-option--admin:hover { border-color: #cbd5e1; background: #f1f5f9; }

.account-panel-footer {
    text-align: center;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f1f5f9;
}

.account-admin-link {
    display: inline-block;
    margin-bottom: 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.account-admin-link:hover {
    color: var(--al-primary-dark, #0284c7);
}

.account-panel-footer small {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .account-landing-shell {
        grid-template-columns: 1fr;
        max-width: 520px;
        padding: 1rem;
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .account-hero {
        padding: 1.75rem 1.25rem 1.25rem;
        text-align: center;
        align-items: center;
    }

    .account-hero-brand {
        flex-direction: column;
        text-align: center;
        margin-bottom: 1.25rem;
    }

    .account-hero-intro {
        margin-bottom: 1.25rem;
    }

    .account-hero-intro p {
        font-size: 0.88rem;
    }

    .account-hero-features {
        width: 100%;
        margin-bottom: 1.25rem;
    }

    .account-hero-features li:hover {
        transform: none;
    }

    .account-panel {
        border-right: none;
        border-radius: var(--al-radius);
        box-shadow: var(--al-shadow);
        padding: 1.5rem 1.25rem;
        margin-bottom: 1rem;
    }

    /* Hub landing: Synaps → login cards → features */
    .account-landing-shell:not(.account-landing-shell--auth) {
        padding-bottom: 1.5rem;
    }

    .account-landing-shell:not(.account-landing-shell--auth) .account-hero {
        display: contents;
    }

    .account-landing-shell:not(.account-landing-shell--auth) .account-hero-glow {
        display: none;
    }

    .account-landing-shell:not(.account-landing-shell--auth) .account-hero-brand {
        order: 1;
        margin: 0.75rem 0 1rem;
    }

    .account-landing-shell:not(.account-landing-shell--auth) .account-hero-intro {
        display: none;
    }

    .account-landing-shell:not(.account-landing-shell--auth) .account-panel {
        order: 2;
        margin-bottom: 1rem;
    }

    .account-landing-shell:not(.account-landing-shell--auth) .account-hero-features {
        order: 3;
        width: 100%;
        margin: 0.25rem 0 0.75rem;
        padding: 0 0.15rem;
    }

    .account-landing-shell:not(.account-landing-shell--auth) .account-hero-badge {
        order: 4;
        margin: 0 auto 0.5rem;
    }
}

@media (max-width: 400px) {
    .account-option {
        padding: 0.85rem 0.9rem;
        gap: 0.75rem;
    }

    .account-option-icon {
        font-size: 1.4rem;
        width: 2rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Auth forms (login / register sub-pages)
   ═══════════════════════════════════════════════════════════════ */

.account-landing-shell--auth {
    max-width: 1060px;
}

.account-hero--doctor,
.account-hero--lab,
.account-hero--patient {
    padding-top: 3rem;
}

.account-hero--lab {
    background: linear-gradient(160deg, #faf5ff 0%, #ecfeff 100%);
}

.account-hero--patient {
    background: linear-gradient(160deg, #ecfdf5 0%, #f0f9ff 55%, #e0f2fe 100%);
}

.account-hero--patient .account-hero-glow {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.16) 0%, transparent 65%);
}

.account-hero--patient .account-hero-logo {
    filter: drop-shadow(0 6px 20px rgba(14, 165, 233, 0.35));
}

.auth-demo-box--patient {
    border-color: #99f6e4;
    background: #f0fdfa;
}

.auth-demo-box--patient strong {
    color: #0f766e;
}

.account-option--lab::before { background: linear-gradient(135deg, rgba(167, 139, 250, 0.12), rgba(6, 182, 212, 0.08)); }
.account-option--lab:hover { border-color: #c4b5fd; background: #faf5ff; }

.auth-demo-box {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px dashed #c4b5fd;
    background: #faf5ff;
    font-size: 0.85rem;
}

.auth-demo-box strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #6d28d9;
}

.auth-demo-box__row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.auth-demo-box__hint {
    margin-top: 0.65rem;
    font-size: 0.78rem;
    color: #64748b;
}

.auth-form-submit--lab {
    background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    box-shadow: 0 6px 24px rgba(139, 92, 246, 0.35);
}

.auth-form-submit--lab:hover {
    box-shadow: 0 10px 32px rgba(139, 92, 246, 0.4);
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--al-text-muted);
    text-decoration: none;
    margin-bottom: 1.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #e2e8f0;
    transition: color 0.18s, border-color 0.18s, background 0.18s;
    width: fit-content;
}

.auth-back-link:hover {
    color: var(--al-primary-dark);
    border-color: #99f6e4;
    background: #f0fdfa;
}

.account-hero-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    background: var(--al-gradient);
    border-radius: 999px;
    padding: 0.45rem 1.1rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.3);
}

.auth-form-panel {
    padding: 2.25rem 2.5rem;
}

.auth-form-icon {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.08));
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    border-radius: var(--al-radius-md);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.auth-alert--error {
    background: linear-gradient(135deg, #fef2f2, #fff1f2);
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.auth-alert-icon {
    flex-shrink: 0;
    line-height: 1.4;
}

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

.auth-form-group {
    margin-bottom: 1rem;
}

.auth-form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4rem;
}

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

.auth-form-input-icon {
    position: absolute;
    right: 0.85rem;
    font-size: 1rem;
    line-height: 1;
    pointer-events: none;
    opacity: 0.55;
}

.auth-form-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    font-size: 0.92rem;
    font-family: var(--al-font);
    color: var(--al-text);
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--al-radius-md);
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
    outline: none;
}

.auth-form-input::placeholder {
    color: #94a3b8;
}

.auth-form-input:focus {
    border-color: var(--al-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.auth-form-error {
    display: block;
    font-size: 0.78rem;
    color: #dc2626;
    margin-top: 0.3rem;
}

.auth-form-submit {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.85rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--al-font);
    color: #fff;
    background: var(--al-gradient);
    border: none;
    border-radius: var(--al-radius-md);
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(13, 148, 136, 0.35);
    transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s;
}

.auth-form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(13, 148, 136, 0.4);
}

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

.auth-form-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f1f5f9;
}

.auth-form-link {
    font-size: 0.82rem;
    color: var(--al-text-muted);
    text-decoration: none;
    transition: color 0.18s;
}

.auth-form-link:hover {
    color: var(--al-primary-dark);
}

.auth-form-link--primary {
    font-weight: 700;
    color: var(--al-accent);
}

.auth-form-link--primary:hover {
    color: var(--al-primary-dark);
}

@media (max-width: 900px) {
    .account-landing-shell--auth {
        max-width: 480px;
        display: flex;
        flex-direction: column;
        gap: 0;
        padding-bottom: 1.5rem;
    }

    /* Flatten hero so brand / features / form can be reordered independently */
    .account-landing-shell--auth .account-hero {
        display: contents;
    }

    .account-landing-shell--auth .account-hero-glow {
        display: none;
    }

    .account-landing-shell--auth .auth-back-link {
        order: 1;
        margin: 0.75rem 0 0.5rem;
        align-self: flex-start;
    }

    .account-landing-shell--auth .account-hero-brand {
        order: 2;
        margin-bottom: 1rem;
    }

    .account-landing-shell--auth .account-hero-intro {
        display: none;
    }

    .account-landing-shell--auth .auth-form-panel {
        order: 3;
        margin-bottom: 1rem;
        padding: 1.5rem 1.25rem;
    }

    .account-landing-shell--auth .account-hero-features {
        order: 4;
        width: 100%;
        margin: 0.25rem 0 0;
        padding: 0 0.15rem;
    }

    .account-hero--doctor,
    .account-hero--lab,
    .account-hero--patient {
        padding-top: 1.25rem;
    }
}

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8f4fc 0%, #f0f7ff 50%, #e3edf7 100%);
    padding: 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 60, 120, 0.12);
}

.auth-card-wide {
    max-width: 720px;
}

.auth-brand {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-brand .brand-icon {
    font-size: 2.5rem;
}

.auth-brand h1 {
    font-size: 1.5rem;
    margin: 0.5rem 0 0.25rem;
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.auth-link-card {
    display: block;
    padding: 1.25rem;
    background: #fff;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 16px rgba(0, 60, 120, 0.08);
    transition: transform 0.15s, box-shadow 0.15s;
    text-align: center;
    flex: 1 1 200px;
    max-width: 240px;
}

.auth-link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 60, 120, 0.15);
    color: inherit;
}

.auth-link-card .icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.form-section-title {
    font-weight: 600;
    color: #1a5276;
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid #e8f4fc;
}

.form-section-title:first-child {
    margin-top: 0;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.permission-grid .form-check {
    padding: 0.5rem 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    margin: 0;
}

.permission-grid__full {
    grid-column: 1 / -1;
}

.permission-subgrid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.5rem;
    margin: 0 0 0.5rem;
    padding: 0.75rem 1rem;
    background: #f1f5f9;
    border-radius: 10px;
    border-right: 3px solid #0ea5e9;
}

.permission-subgrid .form-check {
    background: #fff;
}

.admin-sidebar {
    background: linear-gradient(180deg, #2c3e50 0%, #1a252f 100%);
}

.staff-badge {
    font-size: 0.75rem;
}

.account-created-banner {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* ─── OTP digit inputs ─────────────────────────────────────────── */
.otp-digit-group {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    direction: ltr;
    margin: 0.25rem 0 0.75rem;
}

.otp-digit-input {
    width: 2.75rem;
    height: 3.25rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 0.75rem;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    background: #fff;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.otp-digit-input:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}

.auth-form-submit.is-loading,
.auth-form-submit:disabled {
    opacity: 0.75;
    cursor: wait;
}

@media (max-width: 420px) {
    .otp-digit-input {
        width: 2.4rem;
        height: 2.9rem;
        font-size: 1.2rem;
    }
}
