/*
 * SIFops — Theme palettes.
 *
 * Six themes, each defined as a [data-theme="<key>"] block on the <html>
 * element. The default theme is also exposed via :root so an unset
 * data-theme attribute still renders correctly.
 *
 * Two parallel sets of CSS custom properties live here:
 *
 *   1. THEMES.md canonical tokens — the semantic theme system going
 *      forward (--bg-app, --bg-card, --bg-sidebar, --border, --accent,
 *      --accent-soft, --success, --warning, --text, --text-secondary,
 *      --text-muted, --text-sidebar). New templates (login, account,
 *      empty stubs) reference these directly.
 *
 *   2. T6.1 legacy shade tokens — the existing dashboard.html uses
 *      ~13 named blue/peach/mint variables (--blue-deep, --blue-primary,
 *      --blue-mist, --accent-peach, etc.). They're kept and re-themed
 *      per palette so the locked T6.1 dashboard visual is preserved
 *      exactly for `default` AND adopts theme-appropriate colors for
 *      the other 5 palettes.
 *
 * Per THEMES.md:
 *   "Layout / interface NEVER changes between themes — only CSS
 *    variable values do."
 *
 * If a theme doesn't define a given variable, the cascade falls through
 * to :root. That's why every variable is defined on :root with a sensible
 * default, and per-theme blocks only override what differs.
 */

/* ===========================================================================
 * Default — :root (also data-theme="default")
 *
 * These are the EXACT hex values from T6.1 index.html lines 12-35. Do not
 * change without also updating the visual screenshot baseline.
 * ===========================================================================
 */
:root,
[data-theme="default"] {
  /* THEMES.md canonical tokens */
  --bg-app: #fafbff;
  --bg-card: #ffffff;
  --bg-sidebar: #fafbff; /* gradient lives in --bg-sidebar-gradient below */
  --bg-sidebar-gradient: linear-gradient(180deg, #fafbff 0%, #e6efff 100%);
  --border: #e2e8f0;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --success: #10b981;
  --warning: #fdba74;
  --text: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-sidebar: #0f172a; /* dark text on light sidebar in default */

  /* Custom <select> chevron (themed, replaces the native black OS arrow).
     The light-content themes (default/blush/peach/emerald/lavender) inherit
     this slate chevron from :root; the dark theme overrides it below.
     (blush has a dark SIDEBAR but light CONTENT, so its form controls use
     the light slate chevron from :root too.) */
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");

  /* T6.1 legacy shade tokens — kept to preserve the dashboard visual */
  --bg-page: #fafbff;
  --bg-sidebar-from: #fafbff;
  --bg-sidebar-to: #e6efff;
  --bg-soft: #f0f5ff;
  --blue-deep: #0c1733;
  --blue-primary: #2563eb;
  --blue-sky: #3b82f6;
  --blue-powder: #93c5fd;
  --blue-mist: #dbeafe;
  --blue-ice: #f0f5ff;
  --border-blue: #bfdbfe;
  --accent-peach: #fdba74;
  --accent-mint: #6ee7b7;
  --accent-coral: #fb7185;
  --accent-amber: #fcd34d;
  --danger: #ef4444;
  --text-primary: #0f172a;
  --text-subtle: #94a3b8;
}


/* ===========================================================================
 * Theme — blush (Soft Mauve / Neutral Rose)   [replaced `sand` 2026-06-14]
 *
 * Lexi found sand + peach too similar, so sand is replaced by blush.
 * Neutral-leaning rose: DARK deep-mauve sidebar + LIGHT blush-white content
 * (structurally mirrors `dark`/`emerald` — light sidebar text, dark active
 * pill). Layout never changes between themes — only these var values.
 * ===========================================================================
 */
[data-theme="blush"] {
  /* Canonical tokens */
  --bg-app: #faf7f7;
  --bg-card: #ffffff;
  --bg-sidebar: #fdf6f7;                                          /* deep mauve */
  --bg-sidebar-gradient: linear-gradient(180deg, #fdf6f7 0%, #f6e5ea 100%);
  --border: #ede4e6;
  --accent: #b07d83;                                              /* muted rose */
  --accent-soft: #f5eced;                                         /* soft blush */
  --success: #6b9e7a;
  --warning: #d4a054;
  --text: #3d2c30;
  --text-secondary: #8a6e73;
  --text-muted: #b8a0a5;
  --text-sidebar: #3d2c30;        /* dark text — nav labels on the LIGHT sidebar */

  /* Legacy shade tokens — LIGHT blush (Lexi 2026-06-14: the dark mauve sidebar
     read muddy + low-contrast, so flipped to a light pink-white sidebar + rose
     accents, mirroring the default/peach LIGHT structure). Dark text on the
     light sidebar; --blue-mist is a LIGHT rose active pill; --blue-deep is a
     clean deep rose-plum for the dark header bar + shadow. Status colors stay
     standard green/orange/red — not blush-tinted — per Lexi. */
  --bg-page: #faf7f7;
  --bg-sidebar-from: #fdf6f7;
  --bg-sidebar-to: #f6e5ea;
  --bg-soft: #f5eced;
  --blue-deep: #3a1f2e;     /* deep clean rose-plum — dark header bar + shadow */
  --blue-primary: #b07d83;  /* muted rose — accents + active nav text/border */
  --blue-sky: #d4a8ad;      /* secondary rose */
  --blue-powder: #d4a8ad;   /* secondary rose */
  --blue-mist: #f3dde3;     /* light rose — active nav pill on the light sidebar */
  --blue-ice: #faf3f4;
  --border-blue: #e3d2d5;
  --accent-peach: #d4a054;  /* warning orange (status) */
  --accent-mint: #6b9e7a;   /* success green (status) */
  --accent-coral: #d98a5c;  /* On-Hold orange (status — standard, not rose) */
  --accent-amber: #d4a054;  /* warning amber (status) */
  --danger: #ef4444;        /* standard red (status) */
  --text-primary: #3d2c30;
  --text-subtle: #b8a0a5;
}


/* ===========================================================================
 * Theme — peach (Warm Modern / Peach Analytics)
 *
 * Modern SaaS analytics. Peach + amber. Higher contrast, warm cream
 * sidebar, cards are pure white. THEMES.md hex values verbatim.
 * ===========================================================================
 */
[data-theme="peach"] {
  /* Canonical tokens */
  --bg-app: #FDFBF6;
  --bg-card: #FFFFFF;
  --bg-sidebar: #F6F0E5;
  --bg-sidebar-gradient: linear-gradient(180deg, #F6F0E5 0%, #EDE3CE 100%);
  --border: #CECECD;
  --accent: #E3A860;
  --accent-soft: #F8DAB0;
  --success: #68B37B;
  --warning: #E3A860;
  --text: #232323;
  --text-secondary: #6F6F6F;
  --text-muted: #9E9E9E;
  --text-sidebar: #232323;

  /* Legacy shade tokens remapped */
  --bg-page: #FDFBF6;
  --bg-sidebar-from: #F6F0E5;
  --bg-sidebar-to: #EDE3CE;
  --bg-soft: #F8DAB0;
  --blue-deep: #6B3F1E;
  --blue-primary: #E3A860;
  --blue-sky: #D69856;
  --blue-powder: #F0C68F;
  --blue-mist: #F8DAB0;
  --blue-ice: #FDF5E8;
  --border-blue: #E8C58E;
  --accent-peach: #E3A860;
  --accent-mint: #68B37B;
  --accent-coral: #C97B5C;
  --accent-amber: #E3A860;
  --danger: #C75A4D;
  --text-primary: #232323;
  --text-subtle: #9E9E9E;
}


/* ===========================================================================
 * Theme — emerald (Executive Console)
 *
 * Highest contrast. Dark emerald sidebar, light cool body, mint accent.
 * Enterprise / power-user feel. THEMES.md hex values verbatim.
 * ===========================================================================
 */
[data-theme="emerald"] {
  /* Canonical tokens */
  --bg-app: #FCFDFC;
  --bg-card: #F1F5F3;
  --bg-sidebar: #2C514E;
  --bg-sidebar-gradient: linear-gradient(180deg, #2C514E 0%, #1F3F3C 100%);
  --bg-sidebar-secondary: #718A86;
  --border: #D1E0D9;
  --accent: #7EC7B1;
  --accent-soft: #B6DFD2;
  --chart-aqua: #5DB6C7;
  --success: #59B67B;
  --warning: #D9A15B;
  --text: #1F2A28;
  --text-secondary: #5F6C69;
  --text-muted: #8DA09C;
  --text-sidebar: #EAF4F1; /* light text on dark emerald sidebar */

  /* Legacy shade tokens remapped onto emerald palette */
  --bg-page: #FCFDFC;
  --bg-sidebar-from: #2C514E;
  --bg-sidebar-to: #1F3F3C;
  --bg-soft: #E5EFEB;
  --blue-deep: #1F3F3C;
  --blue-primary: #2C514E;
  --blue-sky: #5DB6C7;
  --blue-powder: #B6DFD2;
  --blue-mist: #E5EFEB;
  --blue-ice: #F1F5F3;
  --border-blue: #B6DFD2;
  --accent-peach: #D9A15B;
  --accent-mint: #7EC7B1;
  --accent-coral: #C97B5C;
  --accent-amber: #D9A15B;
  --danger: #C75A4D;
  --text-primary: #1F2A28;
  --text-subtle: #8DA09C;
}


/* ===========================================================================
 * Theme — lavender (Soft Lavender / Modern Fintech)
 *
 * Linear / Stripe / Notion-adjacent. Cleanest, airiest. Lavender + purple.
 * Sidebar light (NOT dark) per THEMES.md note. THEMES.md hex values verbatim.
 * ===========================================================================
 */
[data-theme="lavender"] {
  /* Canonical tokens */
  --bg-app: #FDFCFD;
  --bg-card: #F9F6FA;
  --bg-sidebar: #F2EBF7;
  --bg-sidebar-gradient: linear-gradient(180deg, #F2EBF7 0%, #E4DEF0 100%);
  --bg-surface: #E4DEF0;
  --border: #CCCBD3;
  --accent: #9B6BFF;
  --accent-soft: #B79DFF;
  --chart-lavender: #C8B6F2;
  --success: #68B37B;
  --warning: #D6A45D;
  --text: #2A2438;
  --text-secondary: #6F6880;
  --text-muted: #A8A6B2;
  --text-sidebar: #2A2438;

  /* Legacy shade tokens remapped onto lavender palette */
  --bg-page: #FDFCFD;
  --bg-sidebar-from: #F2EBF7;
  --bg-sidebar-to: #E4DEF0;
  --bg-soft: #ECE4F4;
  --blue-deep: #4B2E83;
  --blue-primary: #9B6BFF;
  --blue-sky: #B79DFF;
  --blue-powder: #C8B6F2;
  --blue-mist: #ECE4F4;
  --blue-ice: #F9F6FA;
  --border-blue: #CCCBD3;
  --accent-peach: #C8B6F2;
  --accent-mint: #68B37B;
  --accent-coral: #C97B9C;
  --accent-amber: #D6A45D;
  --danger: #C75A4D;
  --text-primary: #2A2438;
  --text-subtle: #A8A6B2;
}


/* ===========================================================================
 * Theme — dark (Dark Mode — Forge proposal, awaiting Lexi sign-off)
 *
 * Pure dark. Slate everywhere. Single accent (default-blue family) for
 * status colors only. THEMES.md hex values verbatim. Lexi will review
 * the live preview and may tweak.
 * ===========================================================================
 */
[data-theme="dark"] {
  /* Canonical tokens */
  --bg-app: #0F1419;
  --bg-card: #1A1F24;
  --bg-sidebar: #0A0E12;
  --bg-sidebar-gradient: linear-gradient(180deg, #0A0E12 0%, #060A0E 100%);
  --border: #2A3138;
  --accent: #4A90E2;
  --accent-soft: #2C4A6B;
  --success: #5FAF7B;
  --warning: #D9A15B;
  --text: #E6E6E6;
  --text-secondary: #A8A8A8;
  --text-muted: #6F6F6F;
  --text-sidebar: #E6E6E6;

  /* Lighter chevron so it stays soft-but-visible on the dark control bg. */
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239aa3af' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");

  /* Legacy shade tokens remapped onto dark palette */
  --bg-page: #0F1419;
  --bg-sidebar-from: #0A0E12;
  --bg-sidebar-to: #060A0E;
  --bg-soft: #1A1F24;
  --blue-deep: #1A2B40;
  --blue-primary: #4A90E2;
  --blue-sky: #6BAEEA;
  --blue-powder: #4A90E2;
  --blue-mist: #2C4A6B;
  --blue-ice: #1A1F24;
  --border-blue: #2C4A6B;
  --accent-peach: #D9A15B;
  --accent-mint: #5FAF7B;
  --accent-coral: #C97B5C;
  --accent-amber: #D9A15B;
  --danger: #E55C5C;
  --text-primary: #E6E6E6;
  --text-subtle: #6F6F6F;
}


/* Native checkbox + radio accent — NEUTRAL grey (Lexi 2026-06-14: the native
   controls fell back to the browser's default BLUE highlight; she wants a
   neutral grey, not a theme-colored highlight). Fixed slate so it reads the
   same across all themes (List Builder + everywhere). */
input[type="checkbox"], input[type="radio"] { accent-color: #64748b !important; }


/* ===========================================================================
 * Body background — replaces the hardcoded gradient in T6.1 with a
 * theme-driven one so light themes keep the airy feel and dark theme
 * doesn't show stripes of blue ice.
 *
 * In default this resolves to roughly the same visual as T6.1
 * (linear-gradient blue-mist → bg-page → bg-sidebar-to). For dark/emerald
 * the sidebar tones drive the gradient and it stays cohesive.
 * ===========================================================================
 */
body {
  background:
    linear-gradient(135deg, var(--blue-mist) 0%, var(--bg-page) 42%, var(--bg-sidebar-to) 100%);
  color: var(--text-primary);
}


/* ===========================================================================
 * Shared component classes used across the new templates (login, account,
 * empty stubs). These reuse the dashboard card styling so /account, /login,
 * and the 11 placeholder pages feel like the same product.
 * ===========================================================================
 */
.empty-state-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 18px 42px -34px var(--blue-powder), 0 1px 0 var(--blue-ice);
  border-radius: 18px;
  padding: 48px 56px;
  margin: 64px auto;
  max-width: 520px;
  text-align: center;
}

.empty-state-card h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.empty-state-card p {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0;
}

/* Login standalone card (no chrome) */
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    linear-gradient(135deg, var(--blue-mist) 0%, var(--bg-page) 42%, var(--bg-sidebar-to) 100%);
}

.login-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  /* Card shadow uses color-mix so it adapts to the active theme's deep accent.
     Lexi 2026-05-09: bumped depth a touch so the card lifts more clearly off
     the page background. */
  box-shadow:
    0 40px 100px -24px color-mix(in srgb, var(--blue-deep) 28%, transparent),
    0 16px 40px -10px  color-mix(in srgb, var(--blue-deep) 14%, transparent);
  border-radius: 22px;
  padding: 44px 32px 28px 32px;
}

.login-card h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.login-card .subtitle {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0 0 12px 0;
}

/* Centered login layout (Lexi 2026-05-09) — logo centered at top, heading,
   subtitle. Form labels/inputs stay block-level full-width inside, but the
   text alignment of headings + button is centered. */
.login-card--centered {
  text-align: center;
}

.login-card--centered .login-form {
  text-align: left;
}

.login-card--centered .login-error {
  text-align: left;
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
  margin: 0 0 -22px 0;
  padding: 0;
  overflow: visible;
}

.login-logo-img {
  width: auto;
  max-width: none;
  height: 480px;
  display: block;
  flex: 0 0 auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
}

/* "Sign in with your account and password." footnote — modern iOS/SF Pro feel
   per Lexi 2026-05-09. System font stack picks up SF Pro Text on Apple, Segoe
   UI on Windows, Roboto on Android. Small, clean, light. */
.login-footnote {
  margin: 22px 0 0 0;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue", "Inter", sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--text-muted);
}

.login-logo-placeholder {
  width: 92px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  border: 1px dashed var(--border);
  border-radius: 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.login-heading {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 6px 0;
}

.login-card label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 14px 0 6px 0;
}

.login-form label:first-of-type {
  margin-top: 0;
}

.login-card input[type="email"],
.login-card input[type="password"],
.login-card input[type="text"] {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  font-family: inherit;
}

.login-card input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-card);
}

.login-card button[type="submit"],
.btn-primary {
  width: 100%;
  height: 44px;
  margin-top: 22px;
  background: var(--blue-deep);
  color: #ffffff;
  border: 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: filter 160ms ease;
}

.login-card button[type="submit"]:hover,
.btn-primary:hover {
  filter: brightness(0.95);
}

.login-error {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid var(--danger);
  border-radius: 10px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
}

.login-flash {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid var(--success);
  border-radius: 10px;
  color: var(--success);
  font-size: 13px;
  font-weight: 600;
}


/* ===========================================================================
 * Account page styling — reuses .card from base.html for the section
 * containers, plus custom styling for the theme picker swatches and
 * notifications toggle.
 * ===========================================================================
 */
.account-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 18px 42px -34px var(--blue-powder), 0 1px 0 var(--blue-ice);
  border-radius: 18px;
  padding: 24px 26px;
  margin-bottom: 18px;
}

.account-section h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.account-section .section-sub {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0 0 18px 0;
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--blue-mist);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
}

.profile-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.profile-email {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.profile-role {
  display: inline-block;
  margin-top: 4px;
  padding: 3px 10px;
  background: var(--blue-mist);
  color: var(--accent);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.theme-card {
  background: var(--bg-app);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease;
  text-align: left;
  font-family: inherit;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.theme-card:hover {
  transform: translateY(-1px);
}

.theme-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.theme-swatch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.theme-swatch span {
  display: block;
}

.theme-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.theme-card-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.theme-card-checkmark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.theme-card.selected .theme-card-checkmark {
  display: inline-flex;
}

/* Notifications toggle */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.toggle-label-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 999px;
  transition: background-color 160ms ease;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  top: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 160ms ease;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* Password form */
.password-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
}

.password-form label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 6px 0 2px 0;
  display: block;
}

.password-form input[type="password"] {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  font-family: inherit;
}

.password-form input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-card);
}

.password-form .btn-primary {
  margin-top: 8px;
  width: auto;
  align-self: flex-start;
  padding: 0 22px;
}

.signout-form .btn-danger {
  height: 40px;
  padding: 0 20px;
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.signout-form .btn-danger:hover {
  background: var(--danger);
  color: #ffffff;
}

.account-flash {
  margin-bottom: 14px;
  padding: 10px 14px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid var(--success);
  border-radius: 10px;
  color: var(--success);
  font-size: 13px;
  font-weight: 600;
}

.account-error {
  margin-bottom: 14px;
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid var(--danger);
  border-radius: 10px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
}


/* ===========================================================================
 * Topbar profile-chip dropdown menu (Forge cmt_bb2e77bb).
 *
 * The chip is now a <button> wrapped in a position:relative div so the
 * menu panel can sit absolutely under it, right-aligned. Items are
 * Account (link) + Sign out (POST form button). The toggle JS at the
 * bottom of base.html handles open/close + click-outside + Escape.
 * ===========================================================================
 */
.profile-chip-wrap {
  position: relative;
  display: inline-block;
}

/* The chip button needs to look identical to T6.1's anchor version. The
   only addition: cursor:pointer and a focus-visible ring for keyboard a11y
   (the chip is now a real interactive control, so the focus indicator
   matters). */
.profile-chip {
  cursor: pointer;
  font-family: inherit;
  /* Reset native button styling so it looks identical to the prior <a>.
     Width/padding/border/background already set by the .profile-chip
     class earlier; here we just clear the default button affordances. */
}

.profile-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 18px 42px -14px color-mix(in srgb, var(--blue-deep) 28%, transparent),
              0 4px 12px -2px  color-mix(in srgb, var(--blue-deep) 10%, transparent);
  padding: 6px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* `hidden` on the panel is the canonical show/hide source of truth (set
   by the toggle JS). The display:none below makes that work even if a
   later style accidentally sets `display: block`. */
.account-menu[hidden] {
  display: none;
}

.account-menu-form {
  margin: 0;
}

.account-menu-item {
  appearance: none;
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease;
}

.account-menu-item:hover,
.account-menu-item:focus-visible {
  background: var(--bg-soft);
  color: var(--accent);
  outline: none;
}

/* Sign out gets a subtle danger tint on hover so it's obvious it ends
   the session. Default state stays neutral so it doesn't shout. */
.account-menu-item-danger:hover,
.account-menu-item-danger:focus-visible {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 8%, transparent);
}

/* ======================================================================
   Global <select> styling — small, clean, themed dropdown chevron.

   Replaces the browser's native black OS arrow (oversized + crammed at the
   edge) with a soft themed chevron (var(--select-chevron)) and proper inner
   right padding so the arrow never touches the box edge. Applies app-wide
   to every single-select (List Builder, contacts, account, modals — any
   <select>). Multi-select listboxes ([multiple]) are excluded — a listbox
   has no dropdown arrow. The selector specificity (0,1,1) intentionally
   beats the per-control class rules (.sif-select / .lb-select = 0,1,0) so
   the chevron + right padding win without touching each template.
   ====================================================================== */
select:not([multiple]) {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: var(--select-chevron);
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 13px 13px;
  padding-right: 34px;
}
/* Legacy Edge/IE: hide the native expand arrow. */
select::-ms-expand { display: none; }
