/* ============================================================================
   FILE: assets/css/public-dark.css
   Theme toggle + dark styles for signed-out pages (login, forgot/reset password,
   logout). Loaded via includes/public_theme.php. Light mode is unchanged.
============================================================================ */

/* ── Toggle button (top-right corner) ─────────────────────────────────── */
.public-theme-toggle {
    position: fixed; z-index: 2000;
    top: calc(16px + env(safe-area-inset-top, 0px)); right: 16px;
    width: 42px; height: 42px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(15, 23, 42, .12); background: rgba(255, 255, 255, .92); color: #0f172a;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .12); cursor: pointer;
    backdrop-filter: blur(6px); transition: transform .15s ease, background .2s ease;
}
.public-theme-toggle:hover { transform: scale(1.06); }
.public-theme-toggle:focus-visible { outline: 2px solid #059669; outline-offset: 2px; }
.public-theme-toggle svg { width: 19px; height: 19px; }
.public-theme-toggle .icon-sun { display: none; }
html.dark-mode .public-theme-toggle { background: rgba(30, 41, 59, .92); border-color: rgba(255, 255, 255, .14); color: #fbbf24; }
html.dark-mode .public-theme-toggle .icon-sun { display: block; }
html.dark-mode .public-theme-toggle .icon-moon { display: none; }

/* ── Shared ─────────────────────────────────────────────────────────────── */
html.dark-mode { color-scheme: dark; --black: #f1f5f9; }

/* ── Login (assets/css/login2.css) ─────────────────────────────────────── */
html.dark-mode,
html.dark-mode body { background: #0b1220; color: #e2e8f0; }
html.dark-mode .page {
    background:
        radial-gradient(ellipse 60% 50% at 18% 12%, rgba(16, 185, 129, .12), transparent 70%),
        radial-gradient(ellipse 50% 40% at 92% 95%, rgba(52, 211, 153, .07), transparent 70%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Ccircle cx='1.5' cy='1.5' r='1.2' fill='rgba(110,231,183,0.13)'/%3E%3C/svg%3E"),
        #0b1220;
}
html.dark-mode .la-hub   { fill: #111827; stroke: rgba(16, 185, 129, .4); }
html.dark-mode .la-card  { fill: rgba(17, 24, 39, .9); stroke: rgba(255, 255, 255, .09); }
html.dark-mode .la-icobox { fill: rgba(16, 185, 129, .14); }
html.dark-mode .la-ico   { stroke: #6ee7b7; }
html.dark-mode .la-ico-fill { fill: #6ee7b7; }
html.dark-mode .la-line  { stroke: rgba(255, 255, 255, .12); }
html.dark-mode .la-flow  { stroke: #34d399; }
html.dark-mode .la-node  { fill: #0b1220; stroke: #34d399; }
html.dark-mode .la-title { fill: #f1f5f9; }
html.dark-mode .la-bar { fill: rgba(255, 255, 255, .22); }
html.dark-mode .la-bar-soft { fill: rgba(255, 255, 255, .10); }
html.dark-mode .la-s     { fill: #94a3b8; }
html.dark-mode .la-eyebrow { fill: #6ee7b7; }
html.dark-mode .brand-pill { background: rgba(16, 185, 129, .12); border-color: rgba(16, 185, 129, .3); }
html.dark-mode .brand-pill-text { color: #6ee7b7; }
html.dark-mode .hero-h1,
html.dark-mode .form-hd-title { color: #f1f5f9; }
html.dark-mode .hero-p,
html.dark-mode .form-hd-sub,
html.dark-mode .remember-row span,
html.dark-mode .sec-item { color: #94a3b8; }
html.dark-mode .lp-footer p,
html.dark-mode .divider-text { color: #64748b; }
html.dark-mode .pp-ground { fill: rgba(255, 255, 255, .07); }
html.dark-mode .pp-lan { stroke: #e2e8f0; opacity: .45; }
html.dark-mode .pp-prop { fill: #cbd5e1; stroke: #94a3b8; }
html.dark-mode .pp-navy { fill: #273449; }
html.dark-mode .pp-shoe { fill: #1e293b; }
html.dark-mode .access-note { background: rgba(17, 24, 39, .85); border-color: rgba(16, 185, 129, .3); }
html.dark-mode .access-note h4 { color: #f1f5f9; }
html.dark-mode .access-note p { color: #94a3b8; }
html.dark-mode .access-note-icon { background: rgba(16, 185, 129, .15); color: #6ee7b7; }
html.dark-mode .metric-badge { background: #111827; border-color: #1f2937; color: #cbd5e1; }
html.dark-mode .rp { background: rgba(11, 18, 32, .6); border-left-color: #1f2937; }
html.dark-mode .form-card { background: #111827; box-shadow: 0 20px 50px rgba(0, 0, 0, .45); border-color: #1f2937; }
html.dark-mode .card-logo-row { border-bottom-color: #1f2937; }
html.dark-mode .card-logo-img { background: #fff; padding: 6px 10px; border-radius: 10px; }
html.dark-mode .field-label { color: #cbd5e1; }
html.dark-mode .input-shell { background: #0b1220; border-color: #334155; }
html.dark-mode .input-shell:focus-within { background: #0f172a; }
html.dark-mode .field-input { color: #f1f5f9; }
html.dark-mode .field-input::placeholder { color: #64748b; }
html.dark-mode .field-input:-webkit-autofill { -webkit-text-fill-color: #f1f5f9; -webkit-box-shadow: 0 0 0 1000px #0b1220 inset; }
html.dark-mode .shell-icon,
html.dark-mode .toggle-btn { color: #64748b; }
html.dark-mode .strength-bar,
html.dark-mode .divider-line { background: #1f2937; }
html.dark-mode .alert-error { background: rgba(220, 38, 38, .15); border-color: rgba(248, 113, 113, .35); color: #fca5a5; }
html.dark-mode .alert-success { background: rgba(22, 163, 74, .15); border-color: rgba(74, 222, 128, .35); color: #86efac; }
@media (max-width: 900px) {
    html.dark-mode .rp { background: #0b1220; }
}

/* ── Forgot / reset password (assets/css/forgot_reset.css) ─────────────── */
html.dark-mode .reset-container { box-shadow: 0 20px 50px rgba(0, 0, 0, .45); }
html.dark-mode .alert-success { background: rgba(22, 163, 74, .15); color: #86efac; }

/* ── Logout (assets/css/logout.css) ────────────────────────────────────── */
html.dark-mode .logout-container { box-shadow: 0 20px 50px rgba(0, 0, 0, .45); }
html.dark-mode .btn-secondary { background: transparent; }

/* ── Undo generic portal dark rules that don't fit these pages (global_theme.css) ── */
html.dark-mode .form-hd-tag { color: #34d399; }
html.dark-mode .input-shell .field-input,
html.dark-mode .input-shell .field-input:focus { background: transparent; border: none; }
html.dark-mode .reset-container .header { background: transparent; border-bottom: none; box-shadow: none; }
html.dark-mode .input-container input { background-color: #0b1220; border-color: #334155; color: #f1f5f9; }
html.dark-mode .input-container input:focus { background-color: #0f172a; border-color: #10b981; }
html.dark-mode .input-container i { z-index: 1; }
html.dark-mode .btn-submit,
html.dark-mode .btn-primary,
html.dark-mode .header-icon,
html.dark-mode .logout-icon i { color: #fff; }

/* Forgot/reset inputs: global_theme.css "compact form" rule forces 11px padding with !important,
   which put the field icon on top of the text (both themes) */
.input-container input { padding-left: 45px !important; }
