/* ── Agent Bamba — Design System ─────────────────────────────────────────── */
/* Premium metallic skin: deep midnight ground tone, subtle vertical surface
   gradients, hairline highlights on top edges, softened ambient shadows.
   Reads as a polished SaaS product, not a flat dashboard mockup. */
:root {
  --bg:             #050B16;
  --bg-veil:        radial-gradient(circle at 30% -10%, rgba(74, 108, 255, 0.06), transparent 60%),
                    radial-gradient(circle at 90% 110%, rgba(53, 214, 255, 0.04), transparent 60%);
  --surface:        #0B1324;
  --surface-alt:    #101A30;
  --surface-hover:  #131E38;
  --surface-elev:   #0F1A30;
  /* Subtle vertical gradient applied to cards / nav panels for the
     metallic feel. Top edge slightly brighter, bottom edge slightly darker. */
  --surface-gradient: linear-gradient(180deg, #11192E 0%, #0B1324 100%);
  --surface-gradient-alt: linear-gradient(180deg, #16213A 0%, #101A30 100%);
  --border:         #1B2A44;
  --border-subtle:  #142036;
  --border-strong:  #243757;
  /* Hairline highlight — placed at the top of cards and the bottom of
     the header to suggest a polished bezel. */
  --hairline:       rgba(255, 255, 255, 0.05);
  --hairline-strong: rgba(255, 255, 255, 0.08);
  --brand:          #35D6FF;
  --brand-blue:     #4A6CFF;
  --brand-violet:   #7A5CFF;
  --brand-hover:    #5AE0FF;
  /* Premium "champagne" accent — used sparingly for highlights, gear
     icons, and the metallic rim on premium tiles. */
  --accent-warm:    #FFB347;
  --accent-gold:    #C9A66B;
  --accent-gold-soft: rgba(201, 166, 107, 0.18);
  --text:           #EAF2FF;
  --text-muted:     #9CB3D9;
  --text-faint:     #5A7499;
  --success:        #2DD4BF;
  --success-bg:     #0A2A27;
  --success-border: #174E48;
  --warn:           #FFB347;
  --warn-bg:        #1E1505;
  --warn-border:    #3D2D0A;
  --danger:         #F87171;
  --danger-bg:      #1F0A0A;
  --danger-border:  #3D1212;
  --radius:         12px;
  --radius-sm:      8px;
  --radius-lg:      16px;
  /* Layered shadow — soft ambient + tight contact + hairline rim. */
  --shadow:         0 1px 0 rgba(255,255,255,0.04) inset,
                    0 1px 2px rgba(0,0,0,0.35),
                    0 8px 24px rgba(0,0,0,0.22);
  --shadow-elev:    0 1px 0 rgba(255,255,255,0.05) inset,
                    0 4px 12px rgba(0,0,0,0.45),
                    0 16px 40px rgba(0,0,0,0.3);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  background-image: var(--bg-veil);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-size: 14px;
  /* Hairline highlight along the very top of the viewport — sets the
     premium tone before any content paints. */
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-hover);
  text-decoration: underline;
}

/* ── Site header ──────────────────────────────────────────────────────────── */
/* Premium metallic header — vertical surface gradient + hairline highlight
   along the bottom edge to read as a polished bezel. */
.site-header {
  background: linear-gradient(180deg, #131D33 0%, #0B1324 100%);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 var(--hairline-strong),
              0 6px 14px rgba(0, 0, 0, 0.25);
}

.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 56px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo:hover {
  text-decoration: none;
}

.site-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.site-logo-text {
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  flex: 1;
}

/* Two nav surfaces: the desktop-inline copy sits inside the sticky header;
   the mobile drawer (#site-nav, body-root) is the slide-in fixed drawer.
   Default visibility — switched by the @media (max-width: 768px) block. */
.site-nav-desktop { display: flex; }
.site-nav-mobile { display: none; }

.site-nav a {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--surface-hover);
  text-decoration: none;
}

.site-nav a.active {
  color: var(--brand);
}

/* Nav groups — invisible on desktop, sectioned on mobile */
.nav-group { display: contents; }
.nav-group-label { display: none; }

/* Primary nav group — the four product links */
.nav-group-primary { display: contents; }

/* Developer Tools — collapsible secondary menu */
.nav-dev-tools {
  position: relative;
  margin-left: auto;
}
.nav-dev-tools > summary {
  list-style: none;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-faint);
  user-select: none;
}
.nav-dev-tools > summary::-webkit-details-marker { display: none; }
.nav-dev-tools > summary::after {
  content: " ▾";
  font-size: 9px;
  opacity: 0.7;
}
.nav-dev-tools > summary:hover {
  color: var(--text);
  background: var(--surface-hover);
}
.nav-dev-tools[open] > summary { color: var(--text); }
.nav-dev-tools-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  z-index: 50;
}
.nav-dev-tools-menu a {
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.nav-dev-tools-menu a:hover {
  color: var(--text);
  background: var(--surface-hover);
}

/* Developer Tools — grouped subsections */
.nav-dev-section {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}
.nav-dev-section + .nav-dev-section {
  margin-top: 4px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 6px;
}
.nav-dev-section-label {
  display: block;
  padding: 4px 10px 2px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ── Mobile nav toggle + backdrop ─────────────────────────────────────── */
/* (.nav-close is defined later, inside the drawer block, because it needs
   to sit inside the drawer body — not the header — in the new layout.) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 8px;
  background: linear-gradient(180deg, #16213A 0%, #0F1A30 100%);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: auto;
  -webkit-appearance: none;
  appearance: none;
  /* Disable double-tap zoom delay so the click fires on first tap. */
  touch-action: manipulation;
  box-shadow: 0 1px 0 var(--hairline) inset, 0 1px 2px rgba(0, 0, 0, 0.4);
  transition: border-color 0.15s, background 0.15s;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: background 0.15s;
}
.nav-toggle:hover {
  border-color: rgba(53, 214, 255, 0.32);
}
.nav-toggle:hover span { background: var(--brand); }

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  /* Premium backdrop — slightly cooler tint than pure black so the
     drawer reads as glass-on-glass, not a modal over a black slab. */
  background: rgba(5, 11, 22, 0.62);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 1000;
  touch-action: manipulation;
  opacity: 0;
  transition: opacity 0.2s ease-out;
}
.nav-backdrop.open {
  display: block;
  opacity: 1;
}

/* ── Desktop user row (right side of header) ───────────────────────────── */
.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding-left: 12px;
  border-left: 1px solid var(--border-subtle);
}
.nav-user-name {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-user-badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border: 1px solid rgba(201, 166, 107, 0.32);
  border-radius: 999px;
}
.nav-user-cog {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--surface-alt);
  color: var(--text-muted);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.nav-user-cog:hover {
  color: var(--accent-gold);
  border-color: rgba(201, 166, 107, 0.42);
  background: var(--surface-hover);
}

/* Cog dropdown — quick links to the main settings pages. Revealed on
   hover or keyboard focus; the cog itself still links to Settings home. */
.nav-user-settings {
  position: relative;
  display: inline-flex;
}
.nav-user-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 200;
  min-width: 200px;
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  background: var(--surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38);
}
/* Invisible bridge across the 6px gap so the mouse can travel from the
   cog to the menu without crossing dead space and losing :hover. */
.nav-user-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  height: 8px;
}
.nav-user-settings:hover .nav-user-menu,
.nav-user-settings:focus-within .nav-user-menu {
  display: flex;
}
.nav-user-menu a {
  padding: 7px 10px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.nav-user-menu a:hover,
.nav-user-menu a:focus {
  color: var(--accent-gold);
  background: var(--surface-hover);
}
.nav-user-signout-form { margin: 0; display: inline; }
.nav-user-signout {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.nav-user-signout:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

@media (max-width: 768px) {
  /* Hide the desktop inline nav; show the mobile drawer + hamburger. */
  .site-nav-desktop { display: none; }
  .site-nav-mobile { display: flex; }

  /* Header — logo left, hamburger right. */
  .site-header-inner {
    height: auto;
    padding: 10px 16px;
    gap: 12px;
  }
  .site-logo { flex: 1; }
  .nav-toggle { display: flex; }

  /* ── Mobile drawer (premium rebuild) ─────────────────────────────── */
  /* Slide-in from right, body-root so the sticky header's stacking
     context never traps it. Premium metallic skin: vertical surface
     gradient, hairline highlight along the inner left edge, soft
     shadow on the left. */
  .site-nav-mobile {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(340px, 88vw);
    max-width: 100%;
    height: 100%;
    padding: 0;
    background: var(--surface-gradient-alt);
    border-left: 1px solid var(--border-strong);
    box-shadow: -1px 0 0 var(--hairline-strong) inset,
                -12px 0 30px rgba(0, 0, 0, 0.4);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    transition: transform 0.22s ease-out;
    z-index: 1010;
    visibility: hidden;
  }
  .site-nav-mobile.open {
    transform: translateX(0);
    visibility: visible;
  }
}

/* The drawer-internal styles render in both desktop (when toggled with
   a future preview tool) and mobile; using direct child selectors so
   they don't bleed into the desktop inline nav. */

.drawer-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
}
.drawer-topbar-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.nav-close {
  display: none;
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.nav-close:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}
@media (max-width: 768px) {
  .nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
  }
}

/* User profile section at the top of the drawer. */
.drawer-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.drawer-profile-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  background: linear-gradient(135deg, #1F2A4A 0%, #0F1A30 100%);
  border: 1px solid var(--border-strong);
  box-shadow: 0 1px 0 var(--hairline-strong) inset,
              0 2px 8px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.drawer-profile-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.drawer-profile-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.drawer-profile-role {
  display: inline-flex;
  align-items: center;
  width: max-content;
  height: 18px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border: 1px solid rgba(201, 166, 107, 0.32);
  border-radius: 999px;
}
.drawer-profile-role-staff {
  background: rgba(53, 214, 255, 0.1);
  color: var(--brand);
  border-color: rgba(53, 214, 255, 0.28);
}

.drawer-section {
  display: flex;
  flex-direction: column;
  padding: 8px;
  border-bottom: 1px solid var(--border-subtle);
}
.drawer-section-primary { padding: 12px 8px; }
.drawer-section-signout {
  margin-top: auto;
  padding: 16px 14px;
  border-bottom: none;
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-radius: 10px;
  transition: background 0.15s, color 0.15s;
}
.drawer-link:hover {
  background: var(--surface-hover);
  color: var(--text);
  text-decoration: none;
}
.drawer-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #16223A 0%, #0F1A30 100%);
  border: 1px solid var(--border-subtle);
  color: var(--brand);
  box-shadow: 0 1px 0 var(--hairline) inset;
  flex-shrink: 0;
}
.drawer-link-label { flex: 1; min-width: 0; }

/* Developer Tools — collapsible secondary section. Same row treatment
   as the primary links but the menu lives inside a <details>. */
.drawer-section-dev {
  padding: 4px 8px 8px;
}
.drawer-section-dev[open] {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015) 0%, transparent 100%);
}
.drawer-dev-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  border-radius: 10px;
  transition: background 0.15s;
}
.drawer-dev-summary::-webkit-details-marker { display: none; }
.drawer-dev-summary:hover { background: var(--surface-hover); }
.drawer-section-dev[open] .drawer-dev-summary {
  color: var(--text);
  background: var(--surface-hover);
}
.drawer-dev-caret {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-faint);
  transition: transform 0.15s;
}
.drawer-section-dev[open] .drawer-dev-caret { transform: rotate(180deg); }

.drawer-dev-menu {
  display: flex;
  flex-direction: column;
  padding: 6px 0 8px;
  margin-top: 4px;
}
.drawer-dev-section {
  display: flex;
  flex-direction: column;
  padding: 4px 0 8px;
}
.drawer-dev-section + .drawer-dev-section {
  border-top: 1px dashed var(--border-subtle);
  margin-top: 4px;
  padding-top: 8px;
}
.drawer-dev-section-label {
  padding: 6px 12px 4px 56px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.drawer-dev-link {
  display: block;
  padding: 9px 12px 9px 56px;
  font-size: 13.5px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.drawer-dev-link:hover {
  color: var(--text);
  background: var(--surface-hover);
  text-decoration: none;
}

.drawer-signout-form { margin: 0; display: block; }
.drawer-signout-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  background: linear-gradient(180deg, #15203A 0%, #0E1828 100%);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
  box-shadow: 0 1px 0 var(--hairline) inset, 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.drawer-signout-btn:hover {
  border-color: rgba(248, 113, 113, 0.45);
  color: var(--danger);
}
.drawer-signout-btn .drawer-link-icon { color: var(--text-muted); }
.drawer-signout-btn:hover .drawer-link-icon { color: var(--danger); }

/* Prevent body scroll when drawer is open on mobile. */
body.nav-open { overflow: hidden; }

/* ── Page layout ──────────────────────────────────────────────────────────── */
.page-shell {
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 20px 56px;
}

/* ── Overflow guardrails (PR-260517-18) ──────────────────────────────────── */
/* A single wide element (a long unbreakable string, a wide table) used to
   make the whole page scroll sideways — on mobile that pushed the header
   and nav off the visible area. These rules keep wide content contained.
   `overflow-x: clip` is used over `hidden` so it never turns <body> into a
   scroll container (which would break the sticky header). */
body {
  overflow-x: clip;
}

/* Long unbreakable tokens in inline code (JIDs, scope keys, message ids)
   wrap instead of forcing the page wider. `pre` already wraps via its own
   rule, so this targets the inline case. */
code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Any table scrolls within its own column rather than widening the page. */
.page-shell table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

/* Legacy topbar — kept for pages not yet updated */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.topbar-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.topbar-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.topbar-nav a {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
}

.topbar-nav a:hover {
  color: var(--text);
  border-color: var(--brand);
  text-decoration: none;
}

/* ── Cards / panels (premium metallic) ───────────────────────────────────── */
/* Subtle vertical gradient (top edge slightly brighter), hairline highlight
   along the top via inset shadow, soft layered ambient shadow. Reads as a
   polished surface, not a flat tile. */
.card {
  background: var(--surface-gradient);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  position: relative;
}
/* Optional hairline-highlight pseudo — placed as a 1px-tall gradient at
   the very top inside the border so it reads as a bezel highlight. */
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--hairline-strong) 20%,
    var(--hairline-strong) 80%,
    transparent 100%);
  border-radius: var(--radius) var(--radius) 0 0;
  pointer-events: none;
}

.card h1 {
  margin: 0 0 8px;
  font-size: 1.3rem;
  color: var(--text);
}

.card h2 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  color: var(--text);
}

.card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: var(--text);
}

/* ── Text helpers ─────────────────────────────────────────────────────────── */
.muted {
  color: var(--text-muted);
}

.faint {
  color: var(--text-faint);
}

.small {
  font-size: 0.875rem;
}

.mono {
  font-family: "SF Mono", "Fira Code", "Cascadia Code", Menlo, Consolas, monospace;
  font-size: 12px;
}

/* ── Status pills / badges ────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}

.badge-success {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
}

.badge-warn {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: var(--warn-border);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-border);
}

.badge-neutral {
  background: var(--surface-alt);
  color: var(--text-muted);
  border-color: var(--border);
}

/* Legacy status pills */
.status-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-ok {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.status-warn {
  background: var(--warn-bg);
  color: var(--warn);
  border: 1px solid var(--warn-border);
}

.status-missing {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

/* ── Metric grid ──────────────────────────────────────────────────────────── */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.metric-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--brand);
}

/* ── Data tables ──────────────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: var(--surface-alt);
  color: var(--text-muted);
  font-weight: 600;
}

.data-table td {
  background: var(--surface);
  color: var(--text);
}

.data-table strong {
  color: var(--text-muted);
  font-weight: 600;
}

/* ── Lists ────────────────────────────────────────────────────────────────── */
.list-reset {
  margin: 0;
  padding-left: 18px;
}

/* ── Alerts / callouts ────────────────────────────────────────────────────── */
.alert {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.alert-warn {
  border-color: var(--warn-border);
  background: var(--warn-bg);
}

.alert-success {
  border-color: var(--success-border);
  background: var(--success-bg);
}

.alert-danger {
  border-color: var(--danger-border);
  background: var(--danger-bg);
}

.success {
  color: var(--success);
}

/* ── Code / pre ───────────────────────────────────────────────────────────── */
pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #020509;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  overflow-x: auto;
  font-family: "SF Mono", "Fira Code", "Cascadia Code", Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: #a9c0e0;
  line-height: 1.6;
}

code {
  font-family: "SF Mono", "Fira Code", "Cascadia Code", Menlo, Consolas, monospace;
  font-size: 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--brand);
}

/* ── Forms ────────────────────────────────────────────────────────────────── */
.form-row {
  margin-bottom: 14px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  max-width: 980px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  background: var(--surface-alt);
  color: var(--text);
  font: inherit;
  transition: border-color 0.15s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(74, 108, 255, 0.15);
}

textarea {
  min-height: 90px;
  resize: vertical;
}

/* ── Settings UI kit (PR-260516-10) ──────────────────────────────────────── */
/* Shared form primitives used by the rebuilt settings pages — checkbox
   reset, toggle switch, field blocks, condensed help, status grid. */

/* The global input rule stretched checkboxes/radios to width:100% with a
   text-input border. Restore native sizing so a bare checkbox looks right. */
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  max-width: none;
  min-height: 0;
  padding: 0;
  margin: 0;
  accent-color: var(--brand-blue);
  cursor: pointer;
}
input[type="checkbox"]:focus,
input[type="radio"]:focus {
  box-shadow: none;
}

/* Toggle switch — a styled checkbox for enable/disable controls. */
.toggle {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}
.toggle > input[type="checkbox"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 24px;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.toggle-track {
  position: relative;
  flex: none;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: var(--border-strong);
  border: 1px solid var(--border-strong);
  transition: background 0.18s ease, border-color 0.18s ease;
}
.toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  transition: transform 0.18s ease;
}
.toggle > input:checked ~ .toggle-track {
  background: var(--success);
  border-color: var(--success);
}
.toggle > input:checked ~ .toggle-track::after {
  transform: translateX(20px);
}
.toggle > input:focus-visible ~ .toggle-track {
  box-shadow: 0 0 0 3px rgba(74, 108, 255, 0.28);
}
.toggle-text strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.toggle-text .toggle-hint {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.5;
}

/* Form field block — label, control, help, consistent rhythm. */
.field {
  margin-bottom: 18px;
}
.field:last-child {
  margin-bottom: 0;
}
.field-label {
  display: block;
  font-weight: 600;
  color: var(--text);
  font-size: 13px;
  margin-bottom: 6px;
}
.field-help {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.5;
}
.field-control {
  max-width: 420px;
}

/* Condensed help — long explanations tucked into a collapsible note. */
.help-note {
  margin-top: 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
}
.help-note > summary {
  cursor: pointer;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  list-style-position: inside;
}
.help-note > summary:hover {
  color: var(--text);
}
.help-note-body {
  padding: 2px 12px 12px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
}
.help-note-body p {
  margin: 6px 0;
}

/* Settings page chrome — intro, section card heading, back link. */
.settings-intro {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}
.settings-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 22px;
  font-size: 13px;
  color: var(--text-muted);
}
.settings-back:hover {
  color: var(--brand);
}
.section-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.section-card-head h2 {
  margin: 0;
}

/* ── Key/value status panels (PR-260516-12) ──────────────────────────────── */
/* `dl.kv` had no rule at all — it fell back to the browser's indented
   definition-list default. A two-column grid aligns label and value. */
dl.kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 24px;
  margin: 0;
}
dl.kv dt {
  align-self: start;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}
dl.kv dd {
  align-self: start;
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

/* ── Send-gate preflight checklist ───────────────────────────────────────── */
.gate-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gate-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--surface-alt);
}
.gate-check-mark {
  flex: none;
  width: 19px;
  height: 19px;
  margin-top: 1px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid transparent;
}
.gate-check.is-ok .gate-check-mark {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
}
.gate-check.is-ok .gate-check-mark::before { content: "\2713"; }
.gate-check.is-fail .gate-check-mark {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-border);
}
.gate-check.is-fail .gate-check-mark::before { content: "\2717"; }
.gate-check-label {
  font-size: 13px;
  color: var(--text);
  line-height: 1.55;
}
.gate-state {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
}
.gate-state.is-ready {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
}
.gate-state.is-denying {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: var(--warn-border);
}

/* ── Rules Summary — neural "brain" mindmap (PR-260516-11) ────────────────── */
/* The deterministic-rules graph is styled as a cranial neural map: two
   glowing hemispheres with a longitudinal fissure, glowing "neuron" nodes
   and faint "synapse" edges (the glow comes from vis-network node/edge
   shadows set per group in the page script). */
.rules-brain {
  position: relative;
  height: 600px;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background:
    /* cranial rim vignette */
    radial-gradient(ellipse 76% 82% at 50% 50%, transparent 56%, rgba(0, 0, 0, 0.66)),
    /* longitudinal fissure between the hemispheres */
    linear-gradient(90deg, transparent calc(50% - 1px),
      rgba(255, 255, 255, 0.055) 50%, transparent calc(50% + 1px)),
    /* left hemisphere glow */
    radial-gradient(ellipse 43% 53% at 31% 47%, rgba(122, 92, 255, 0.22), transparent 72%),
    /* right hemisphere glow */
    radial-gradient(ellipse 43% 53% at 69% 47%, rgba(53, 214, 255, 0.18), transparent 72%),
    /* core ambient */
    radial-gradient(ellipse 72% 78% at 50% 50%, rgba(26, 38, 70, 0.62), transparent 80%),
    #04060d;
}
.rules-brain canvas {
  position: relative;
  z-index: 2;
}
.rules-brain-hint {
  margin: 12px 2px 0;
  color: var(--text-faint);
  font-size: 12px;
}

/* ── Animated-brain progress indicator (PR-260516-15) ─────────────────────── */
/* Shared status panel for triage / sync operations: an SVG brain whose
   neurons pulse while work is in flight, plus a 0–100 % bar. Markup in
   partials/_brain_progress.html, driven by the window.BrainProgress API. */
.brain-progress {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
}
.brain-progress[hidden] {
  display: none;
}
.brain-progress-svg {
  flex: none;
  width: 92px;
  height: 71px;
}
.bp-outline ellipse {
  fill: rgba(74, 108, 255, 0.05);
  stroke: rgba(124, 170, 255, 0.40);
  stroke-width: 2;
}
.bp-outline line {
  stroke: rgba(124, 170, 255, 0.22);
  stroke-width: 2;
}
.brain-progress .synapse {
  stroke: var(--brand);
  stroke-width: 1.4;
  opacity: 0.1;
}
.brain-progress .neuron {
  fill: var(--brand);
  opacity: 0.22;
}
.brain-progress.is-running .neuron {
  animation: bp-neuron 1.5s ease-in-out infinite;
}
.brain-progress.is-running .synapse {
  animation: bp-synapse 2.2s ease-in-out infinite;
}
@keyframes bp-neuron {
  0%, 100% { opacity: 0.2; }
  50%      { opacity: 1; }
}
@keyframes bp-synapse {
  0%, 100% { opacity: 0.06; }
  50%      { opacity: 0.5; }
}
.brain-progress.is-complete .neuron {
  opacity: 1;
  animation: none;
}
.brain-progress.is-complete .synapse {
  opacity: 0.55;
  animation: none;
}
.brain-progress-meter {
  flex: 1;
  min-width: 0;
}
.brain-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 7px;
}
.brain-progress-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.brain-progress-pct {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.brain-progress-bar {
  height: 10px;
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  overflow: hidden;
}
.brain-progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand));
  transition: width 0.35s ease;
}
.brain-progress.is-indeterminate .brain-progress-pct {
  display: none;
}
.brain-progress.is-indeterminate .brain-progress-fill {
  width: 40%;
  transition: none;
  animation: bp-sweep 1.15s ease-in-out infinite;
}
@keyframes bp-sweep {
  0%   { margin-left: -40%; }
  100% { margin-left: 100%; }
}

button,
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--brand-blue);
  background: var(--brand-blue);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

button:hover,
.btn:hover {
  background: #5a7aff;
  border-color: #5a7aff;
  text-decoration: none;
  color: #fff;
}

.btn-secondary {
  background: var(--surface-alt);
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--brand);
  color: var(--text);
}

/* PR1 — Save buttons are green app-wide so a "commit my data" action is
   visually distinct from navigation and other primary buttons. */
.btn-save {
  background: #2d7d46;
  border-color: #2d7d46;
  color: #fff;
}

button.btn-save:hover,
.btn-save:hover {
  background: #379654;
  border-color: #379654;
  color: #fff;
}

/* PR2 — autosave status pill shown next to a Save button. */
.autosave-status {
  display: inline-block;
  margin-left: 10px;
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}
.autosave-status.autosave-pending { color: var(--text-muted, #b6bccd); }
.autosave-status.autosave-saving  { color: var(--text-muted, #b6bccd); }
.autosave-status.autosave-saved   { color: #7ed8a0; }
.autosave-status.autosave-error   { color: #e87070; }

/* PR3 — per-control toggle autosave feedback (checkboxes / selects). */
.autosave-busy { opacity: 0.45; }
.autosave-ok   { outline: 2px solid #2d7d46; outline-offset: 1px; }
.autosave-fail { outline: 2px solid #e87070; outline-offset: 1px; }

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Icon buttons ─────────────────────────────────────────────────────────── */
.icon-actions {
  align-items: center;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  background: var(--surface);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.15s, color 0.15s;
}

.icon-button:hover {
  text-decoration: none;
  border-color: var(--brand);
  color: var(--text);
}

.compact-actions {
  gap: 6px;
}

.icon-only {
  min-width: 32px;
  padding: 4px 8px;
  justify-content: center;
}

.icon-only.danger {
  border-color: var(--danger-border);
  color: var(--danger);
}

.icon-only.danger:hover {
  background: var(--danger-bg);
}

/* ── Filter grid ──────────────────────────────────────────────────────────── */
.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  align-items: end;
}

.filter-actions {
  align-items: center;
}

/* ── WhatsApp thread previews ─────────────────────────────────────────────── */
.preview-shell {
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
}

.preview-bubble {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.thread-preview-card {
  margin-bottom: 10px;
  border-left: 3px solid #25d366;
  background: var(--surface-alt);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 12px;
}

/* ── WhatsApp Bridge connection card ──────────────────────────────────────── */
.bridge-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.bridge-hero-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
}

.bridge-hero-copy h2 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  color: var(--text);
}

.bridge-hero-copy p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.bridge-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.bridge-qr-panel {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin-top: 8px;
  flex-wrap: wrap;
}

.bridge-qr-frame {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: inline-block;
  flex-shrink: 0;
}

.bridge-qr-frame img {
  display: block;
  width: 200px;
  height: 200px;
  border-radius: 4px;
}

.bridge-scan-steps {
  flex: 1;
  min-width: 200px;
}

.bridge-scan-steps h4 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bridge-steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bridge-steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.bridge-startup-block {
  background: #020509;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-family: "SF Mono", "Fira Code", Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: #a9c0e0;
  margin: 12px 0;
  line-height: 1.7;
}

.bridge-startup-block .prompt {
  color: var(--text-faint);
  user-select: none;
}

.connected-device-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  margin-bottom: 16px;
}

.connected-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
  flex-shrink: 0;
}

/* ── Public policy pages ──────────────────────────────────────────────────── */
.public-policy-page {
  background: var(--bg);
  color: var(--text);
}

.policy-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 56px;
  font-size: 1rem;
  line-height: 1.6;
}

.policy-container h1 {
  margin: 0 0 10px;
  font-size: 2rem;
  line-height: 1.2;
}

.policy-container h2 {
  margin-top: 28px;
  margin-bottom: 8px;
  font-size: 1.25rem;
  line-height: 1.3;
}

.policy-container p,
.policy-container ul {
  margin-top: 0;
  margin-bottom: 14px;
  color: var(--text-muted);
}

.policy-container ul {
  padding-left: 20px;
}

/* ── Scrollbar styling ────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #2A3F60;
}

/* ── Settings tiles (premium SaaS finish) ───────────────────────────────── */
/* Solid-colour icon plates, vertical surface gradient, hairline top
   highlight, soft ambient shadow. Each tile reads as a tactile button. */
.settings-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.settings-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px 16px;
  background: var(--surface-gradient);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease-out,
              border-color 0.15s,
              box-shadow 0.15s;
  overflow: hidden;
}
a.settings-tile, form.settings-tile { color: inherit; }
.settings-tile:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-elev);
  transform: translateY(-1px);
  text-decoration: none;
}
.settings-tile::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--hairline-strong) 30%,
    var(--hairline-strong) 70%,
    transparent 100%);
  border-radius: var(--radius) var(--radius) 0 0;
  pointer-events: none;
}
.settings-tile h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.settings-tile p {
  margin: 0;
  color: var(--text-muted);
}
.settings-tile .btn {
  margin-top: 10px;
  align-self: flex-start;
}

/* Icon plates — 40×40 rounded, solid-colour-on-dark with hairline
   highlight. Each tile chooses a hue via .settings-tile-icon-<hue>. */
.settings-tile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--tile-icon-bg-top) 0%, var(--tile-icon-bg-bot) 100%);
  border: 1px solid var(--tile-icon-border);
  color: var(--tile-icon-fg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset,
              0 2px 6px rgba(0, 0, 0, 0.32);
  flex-shrink: 0;
}
.settings-tile-icon-cyan {
  --tile-icon-bg-top: rgba(53, 214, 255, 0.18);
  --tile-icon-bg-bot: rgba(53, 214, 255, 0.06);
  --tile-icon-border: rgba(53, 214, 255, 0.32);
  --tile-icon-fg: var(--brand);
}
.settings-tile-icon-blue {
  --tile-icon-bg-top: rgba(74, 108, 255, 0.18);
  --tile-icon-bg-bot: rgba(74, 108, 255, 0.06);
  --tile-icon-border: rgba(74, 108, 255, 0.32);
  --tile-icon-fg: #8AA0FF;
}
.settings-tile-icon-violet {
  --tile-icon-bg-top: rgba(122, 92, 255, 0.18);
  --tile-icon-bg-bot: rgba(122, 92, 255, 0.06);
  --tile-icon-border: rgba(122, 92, 255, 0.32);
  --tile-icon-fg: #B5A1FF;
}
.settings-tile-icon-gold {
  --tile-icon-bg-top: rgba(201, 166, 107, 0.20);
  --tile-icon-bg-bot: rgba(201, 166, 107, 0.06);
  --tile-icon-border: rgba(201, 166, 107, 0.38);
  --tile-icon-fg: var(--accent-gold);
}
.settings-tile-icon-green {
  --tile-icon-bg-top: rgba(45, 212, 191, 0.18);
  --tile-icon-bg-bot: rgba(45, 212, 191, 0.06);
  --tile-icon-border: rgba(45, 212, 191, 0.32);
  --tile-icon-fg: var(--success);
}
.settings-tile-icon-teal {
  --tile-icon-bg-top: rgba(96, 198, 217, 0.18);
  --tile-icon-bg-bot: rgba(96, 198, 217, 0.06);
  --tile-icon-border: rgba(96, 198, 217, 0.32);
  --tile-icon-fg: #7FD3E0;
}
