/* Shared entry and license-selector surface. Uses the dashboard theme cookie. */
body.panel-entry {
    --entry-ink: #242b36;
    --entry-muted: #687180;
    --entry-accent: #3568b0;
    --entry-border: #e2e5eb;
    --entry-surface: rgba(250, 250, 252, .92);
    --entry-subtle: rgba(237, 239, 243, .82);
    --entry-hover: rgba(53, 104, 176, .07);
    --entry-field: #fff;
    --entry-shadow: 0 12px 36px rgba(35, 39, 50, .08), inset 0 1px rgba(255, 255, 255, .82);
    min-height: 100vh;
    color: var(--entry-ink);
    color-scheme: light;
    font-family: 'Vazirmatn', 'Vazir', sans-serif;
    background-color: #edeef3;
    background-image:
        radial-gradient(ellipse at 12% 18%, rgba(177, 187, 205, .2), transparent 55%),
        radial-gradient(ellipse at 87% 28%, rgba(194, 183, 216, .18), transparent 52%),
        radial-gradient(ellipse at 52% 95%, rgba(255, 255, 255, .55), transparent 58%),
        linear-gradient(135deg, #f3f4f7, #e9ebf0 55%, #f0eff5);
    background-attachment: fixed;
}

body.panel-entry[data-panel-theme='dark'] {
    --entry-ink: #eceef3;
    --entry-muted: #adb3bf;
    --entry-accent: #9abcf0;
    --entry-border: #383c46;
    --entry-surface: rgba(36, 39, 47, .94);
    --entry-subtle: rgba(47, 50, 60, .9);
    --entry-hover: rgba(154, 188, 240, .08);
    --entry-field: #292d36;
    --entry-shadow: 0 16px 42px rgba(0, 0, 0, .18), inset 0 1px rgba(255, 255, 255, .04);
    color-scheme: dark;
    background-color: #1c1f26;
    background-image:
        radial-gradient(ellipse at 12% 18%, rgba(91, 106, 137, .13), transparent 55%),
        radial-gradient(ellipse at 87% 28%, rgba(115, 96, 140, .12), transparent 52%),
        radial-gradient(ellipse at 52% 95%, rgba(71, 75, 88, .12), transparent 58%),
        linear-gradient(135deg, #191c23, #20232b 55%, #1c1e26);
}

body.panel-entry .entry-card {
    background: var(--entry-surface);
    color: var(--entry-ink);
    border: 1px solid var(--entry-border);
    box-shadow: var(--entry-shadow);
}
body.panel-entry :is(.text-slate-900, .text-slate-800, .text-slate-700, .text-gray-900, .text-gray-800, .text-gray-700) { color: var(--entry-ink); }
body.panel-entry :is(.text-slate-600, .text-slate-500, .text-slate-400, .text-gray-600, .text-gray-500, .text-gray-400) { color: var(--entry-muted); }
body.panel-entry .text-brand { color: var(--entry-accent); }
body.panel-entry :is(.border-slate-100, .border-slate-200, .border-gray-100, .border-gray-200) { border-color: var(--entry-border); }
body.panel-entry :is(.bg-slate-50, .bg-slate-100, .bg-slate-200, .bg-gray-50, .bg-gray-100) { background-color: var(--entry-subtle); }
body.panel-entry :is(button, a).bg-brand,
body.panel-entry .entry-primary { background: #3568b0; border-color: transparent; color: #fff; }
body.panel-entry :is(button, a).bg-brand:hover,
body.panel-entry .entry-primary:hover { background: #2b5693; }
body.panel-entry :is(input, select, textarea) {
    min-height: 46px;
    background: var(--entry-field);
    color: var(--entry-ink);
    border-color: var(--entry-border);
    border-radius: 10px;
}
body.panel-entry :is(input, select, textarea):focus-visible,
body.panel-entry :is(button, a):focus-visible { outline: 2px solid var(--entry-accent); outline-offset: 3px; }
body.panel-entry input::placeholder { color: var(--entry-muted); opacity: .78; }

body.panel-entry .theme-switcher {
    display: inline-flex;
    flex-shrink: 0;
    gap: 4px;
    padding: 4px;
    background: var(--entry-subtle);
    border: 1px solid var(--entry-border);
    border-radius: 12px;
}
body.panel-entry .theme-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 4px 10px;
    border-radius: 8px;
    color: var(--entry-muted);
    font-size: 12px;
    font-weight: 600;
}
body.panel-entry .theme-option svg { width: 17px; height: 17px; }
body.panel-entry .theme-option[aria-pressed='true'] { background: var(--entry-field); color: var(--entry-accent); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }

body.entry-login .entry-login-shell { min-height: 100vh; }
body.entry-login .entry-auth-section { background: rgba(250, 250, 252, .62); }
body.entry-login .entry-auth-card { max-width: 29rem; }
body.entry-login .entry-login-tabs { padding: 4px; background: var(--entry-subtle); border: 1px solid var(--entry-border); }
body.entry-login .login-tab { color: var(--entry-muted); }
body.entry-login .login-tab.bg-white { background: var(--entry-field); color: var(--entry-accent); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
body.entry-login .entry-login-hero {
    color: var(--entry-ink);
    background: transparent;
    padding: clamp(36px, 7vw, 96px);
}
body.entry-login .entry-hero-content {
    max-width: 42rem;
    min-width: 0;
    margin-inline: auto;
    overflow-wrap: anywhere;
}
body.entry-login .entry-login-hero :is(.text-white, .text-slate-100, .text-slate-200) { color: var(--entry-ink); }
body.entry-login .entry-login-hero .entry-hero-kicker { color: var(--entry-accent); }
body.entry-login .entry-check-list { color: var(--entry-muted); }
body.entry-login .entry-check-list p::before { content: '✓'; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-inline-end: 9px; border-radius: 50%; background: var(--entry-hover); color: var(--entry-accent); font-weight: 800; }
body.entry-login :is(#mobile-verify-form, #email-verify-form) .bg-slate-50 { border-color: var(--entry-border); }
body.entry-login :is(#mobile-verify-form, #email-verify-form) button.bg-emerald-500 { background: #3568b0; }

body.entry-licenses .license-page { max-width: 72rem; }
body.entry-licenses .license-page-header { border-radius: 22px; }
body.entry-licenses .license-page-actions { margin-inline-start: auto; }
body.entry-licenses .license-tabs { padding-bottom: 4px; border-bottom: 1px solid var(--entry-border); }
body.entry-licenses .license-tabs button { border-color: transparent; color: var(--entry-muted); }
body.entry-licenses .license-tabs button.bg-brand { background: var(--entry-subtle); color: var(--entry-accent); border-color: var(--entry-border); }
body.entry-licenses .license-card { box-shadow: none; }
body.entry-licenses .license-card:hover { border-color: color-mix(in srgb, var(--entry-accent) 35%, var(--entry-border)); }
body.entry-licenses .license-code { direction: ltr; unicode-bidi: isolate; overflow-wrap: anywhere; }
body.entry-licenses .license-card .bg-emerald-100 { background: rgba(36, 131, 107, .11); color: #24705d; }
body.entry-licenses .license-card .bg-amber-100 { background: #fff3d9; color: #794b0b; }
body.entry-licenses .license-card .bg-red-100 { background: #fff0f1; color: #9e2737; }
body.panel-entry[data-panel-theme='dark'] .license-card .bg-emerald-100 { background: #243d35; color: #9ad8c4; }
body.panel-entry[data-panel-theme='dark'] .license-card .bg-amber-100 { background: #44371f; color: #ffe0a1; }
body.panel-entry[data-panel-theme='dark'] .license-card .bg-red-100 { background: #482c35; color: #ffc1ca; }

@media (max-width: 767px) {
    body.entry-login .entry-auth-section { padding: 28px 20px; }
    body.entry-login .entry-login-hero { min-height: 21rem; }
    body.entry-login .entry-login-hero { padding: 36px 24px; }
    body.entry-licenses .license-page { padding: 20px 14px; }
    body.entry-licenses .license-page-actions { margin-inline-start: 0; width: 100%; }
    body.entry-licenses .license-page-actions > :is(a, .theme-switcher) { flex: 1 1 auto; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    body.panel-entry *, body.panel-entry *::before, body.panel-entry *::after { animation-duration: 0s !important; transition-duration: 0s !important; }
}
