/* ── BASE RESET ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }

/* ── BOOT SCREEN ───────────────────────────────────────────────────────────
 * The boot screen is hardcoded to the dark scheme regardless of the user's
 * actual theme. Reasoning: the boot screen renders the moment <body> parses,
 * before any async work happens. At that point we know the user's theme
 * scheme ONLY if it's in localStorage (set by the inline <head> bootstrap),
 * which on first-OAuth-login (or new device, or cleared site data) is
 * empty. If we let the boot screen track data-scheme, it paints with
 * variables.css defaults (dark), then applyTheme() switches to the user's
 * actual theme — producing a visible flash. By locking the boot screen to
 * dark colors AND a dark-filter logo, it's a stable splash that doesn't
 * change. The themed app reveals after boot fades out (boot.js end of
 * boot()), and the user only ever sees a CLEAN transition from
 * theme-neutral splash to themed app — no broken intermediate states.
 *
 * Hardcoded colors here match :root's dark defaults in variables.css. */
#boot {
  position: fixed; inset: 0; z-index: 9999;
  background: #0b0e14;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px;
}
/* Force the dark-scheme filter on the boot logo so the per-scheme rules
 * in components.css (which key off [data-scheme="…"] on <html>) don't
 * tint it amber/cream/etc. while we're still on the dark splash. */
#boot .app-logo { filter: invert(1) hue-rotate(180deg) !important; }
/* Match the dark scheme's --text3 (used for boot-msg) and --border (used
 * for boot-bar track) so they look right against the locked dark bg. */
#boot .boot-msg  { color: #4b5a7a; }
#boot .boot-bar  { background: #1e2740; }
#boot .boot-fill { background: #3b82f6; }
.boot-logo {
  /* Holds the docman SVG. The font properties below were inherited from
     when this slot was a text wordmark; they no longer apply visually
     but are kept for any text-fallback path.
     Width: the user's docman_logo.svg is auto-traced from a raster
     source — its paths carry hundreds of small Bezier segments that
     anti-alias visibly at heavy downscale. 1254 px source rendered at
     320 px is a 3.9× downscale; the "MANAGE. PROTECT. EMPOWER." text
     element (font-size 56 in source) lands at ~14 px on screen, which
     is comfortably above the legibility threshold. At the previous
     200 px it was ~9 px and looked soft.  */
  width: 320px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
}
.boot-logo span { color: var(--accent); }
/* The boot logo is an inline THEME-AWARE <svg> (see index.html). On the
   locked-dark splash it renders with the dark-scheme palette — bright accent
   shield + light wordmark — so it stays legible directly on #boot's dark bg
   with a TRANSPARENT background (no chip). The old white chip was only needed
   back when the logo was a fixed-navy raster that vanished dark-on-dark. */
.boot-bar { width: 180px; height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.boot-fill { height: 100%; background: var(--accent); border-radius: 2px; animation: bootLoad 1.2s cubic-bezier(.4,0,.2,1) forwards; }
.boot-msg { font-size: 11px; color: var(--text3); font-family: var(--font-mono); letter-spacing: .5px; }
@keyframes bootLoad { from { width: 0 } to { width: 100% } }
@keyframes lenderPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(20,184,166,.5); }
  50%       { box-shadow: 0 0 0 5px rgba(20,184,166,0); }
}

/* ── SCROLLBAR ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* ── GLOBAL ANIMATIONS ───────────────────────────────────────────────────── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
