/* ── Skip-to-content link (a11y) ── */
.tf-skip-nav {
  position: fixed;
  top: -100%;
  left: 16px;
  z-index: 99999;
  padding: 10px 18px;
  background: var(--primary, #e0a830);
  color: #000;
  font-size: 14px;
  font-weight: 600;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top .15s ease;
}
.tf-skip-nav:focus {
  top: 0;
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* ── Mobile touch: suppress tap highlight + remove 300ms tap delay ── */
/* Stops the blue/grey flash on every tap on real devices */
* {
  -webkit-tap-highlight-color: transparent;
}
/* touch-action: manipulation removes the 300ms tap delay on mobile browsers */
a, button, [role="button"],
.btn-primary, .btn-ghost, .tool-btn, .tool-btn-ghost,
.sb-item, .tab, .icon-btn, .mob-nav-item,
.ctx-pop-item, .chip, .toolbox-card, .notif-item {
  touch-action: manipulation;
}

/* ── Global focus-visible — accessible keyboard focus ring ── */
:focus-visible {
  outline: 2px solid var(--primary, #e0a830);
  outline-offset: 2px;
}
/* Remove focus ring for mouse/touch (non-keyboard) interactions */
:focus:not(:focus-visible) {
  outline: none;
}

/* ── Light mode contrast overrides ─────────────────
   Inline color values that use near-white tints for
   dark-mode readability become invisible on light bg.
   Force readable equivalents. ──────────────────── */
/* Hero light overrides — in assets/css/hero.css */
[data-theme="light"] .stat-card-val     { filter: brightness(0.65); }
[data-theme="light"] .tbl td            { color: #1a1d2e; }
[data-theme="light"] .tbl td .mono      { color: #1a1d2e; }
[data-theme="light"] .bar-val           { color: #4a5068 !important; }
[data-theme="light"] .act-time          { color: #7c8299 !important; }
[data-theme="light"] .dr-input:focus,
[data-theme="light"] .dr-textarea:focus { border-color: var(--primary-hover, #c4922a); }
[data-theme="light"] .dr-input:-webkit-autofill,
[data-theme="light"] .dr-textarea:-webkit-autofill { border-color: var(--primary-hover, #c4922a); }
[data-theme="light"] .btn-ghost         { background: var(--surface-inset); color: var(--text); border-color: var(--border-strong); }
/* Badge text colors: bright neons readable on dark, need darkening for light-mode contrast */
[data-theme="light"] .badge-green  { color: #16803a; background: rgba(22,128,58,.10); }
[data-theme="light"] .badge-red    { color: #c0392b; background: rgba(192,57,43,.10); }
[data-theme="light"] .badge-amber  { color: #b45309; background: rgba(180,83,9,.10); }
[data-theme="light"] .badge-blue   { color: #92680a; background: rgba(224,168,48,.10); }
[data-theme="light"] .badge-cyan   { color: #0e7490; background: rgba(14,116,144,.10); }
[data-theme="light"] .badge-purple { color: #6d28d9; background: rgba(109,40,217,.10); }
[data-theme="light"] .badge-teal   { color: #0f766e; background: rgba(15,118,110,.10); }
[data-theme="light"] .badge-indigo { color: var(--accent-indigo); background: var(--accent-indigo-soft); }
[data-theme="light"] .badge-pink   { color: #9d174d; background: rgba(157,23,77,.10); }
[data-theme="light"] .badge-muted  { color: #4a5068; background: rgba(74,80,104,.08); }
/* Asset browser — darken cyan for light backgrounds */
[data-theme="light"] .asset-view-btn.active { color: #0e7490; background: rgba(14,116,144,.1); }
[data-theme="light"] .asset-card:hover { border-color: #0e7490; }
[data-theme="light"] .asset-detail-category { color: #0e7490; }
[data-theme="light"] .asset-palette-swatch:hover,
[data-theme="light"] .asset-palette-swatch.active { border-color: #0e7490; }
[data-theme="light"] .asset-back-btn:hover { color: #0e7490; border-color: #0e7490; }
[data-theme="light"] .asset-col-menu-item.in-col { color: #0e7490; }
[data-theme="light"] .asset-collection-card:hover { border-color: #0e7490; }
[data-theme="light"] #page-assets .tab.active { color: #0e7490; border-bottom-color: #0e7490; }
[data-theme="light"] .asset-source-badge,
[data-theme="light"] .asset-card-source { background: rgba(14,116,144,.15); color: #0e7490; }
[data-theme="light"] .asset-param-row input[type="range"] { accent-color: #0e7490; }
[data-theme="light"] .asset-col-menu-item:hover { background: rgba(14,116,144,.08); }
/* Kids manage — darken pink for light backgrounds */
[data-theme="light"] .km-avatar { background: linear-gradient(135deg, #db2777, #be185d); }
[data-theme="light"] .km-xp-fill { background: linear-gradient(90deg, #db2777, #be185d); }
[data-theme="light"] .km-tab.active { color: #be185d; border-bottom-color: #be185d; background: rgba(190,24,93,0.05); }
[data-theme="light"] .km-tab-avatar { background: linear-gradient(135deg, #db2777, #be185d); }
[data-theme="light"] .km-tab-add:hover { color: #be185d; }
[data-theme="light"] .asset-fav-btn.active { color: #be185d; background: rgba(190,24,93,.15); }
[data-theme="light"] .asset-fav-btn:hover { color: #be185d; background: rgba(190,24,93,.2); }
[data-theme="light"] #asset-drawer-fav.active { color: #be185d !important; }
[data-theme="light"] .toolbox-card      { background: var(--surface) !important; color: var(--text) !important; border-color: var(--border-strong) !important; }

/* ────────────────────────────────
   TOPBAR
──────────────────────────────── */
/* Old v1 fixed topbar removed — v2 topbar is in flex flow via app-v2.html */
.logo {
  display: flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: 15px; letter-spacing: -0.3px;
  margin-right: 28px; min-width: 170px; text-decoration: none; color: var(--text);
}
.logo-mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, var(--primary), #f0c85e);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.search-wrap {
  flex: 1; max-width: 420px;
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-alt); border: 0.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 0 12px; height: 34px;
}
.search-wrap input {
  background: none; border: none; outline: none;
  font-family: var(--font-body); font-size: 13px; color: var(--text); width: 100%;
}
.search-wrap input:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px;
}
.search-wrap input::placeholder { color: var(--text-faint); }
.search-center {
  position: absolute; left: var(--sidebar-w); right: 420px;
  display: flex; justify-content: center;
  pointer-events: none;
}
.search-center .search-wrap { pointer-events: auto; }
.topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 7px;
  background: transparent; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px; color: var(--text-faint); transition: background .12s, color .12s;
}
.icon-btn:hover { background: var(--surface-alt); color: var(--text); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #f0c85e);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: #fff; cursor: pointer;
}

/* ── Notification panel ── */
.notif-wrap { position: relative; }
.notif-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--badge-danger-bg, #c0392b); color: #fff; font-size: 10px; font-weight: 700;
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  pointer-events: none; line-height: 1;
}
.notif-panel {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 360px; max-height: 480px;
  background: var(--surface); border: 0.5px solid var(--border-strong);
  border-radius: 12px; box-shadow: 0 10px 32px rgba(0,0,0,.28);
  overflow: hidden; z-index: 500;
  display: none; flex-direction: column;
  transform-origin: top right;
  animation: notifPanelIn .15s ease;
}
.notif-panel.open { display: flex; }
@keyframes notifPanelIn {
  from { opacity: 0; transform: scale(.96) translateY(-4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
/* Backdrop — closes panel on outside tap (mobile) */
.notif-backdrop {
  display: none; position: fixed; inset: 0; z-index: 499;
  background: transparent;
}
.notif-backdrop.open { display: block; }
.notif-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-ms) var(--space-md); border-bottom: 0.5px solid var(--border);
}
.notif-panel-title { font-size: 14px; font-weight: 600; color: var(--text); }
.notif-mark-all {
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint); background: none; border: none; cursor: pointer;
  transition: background var(--duration), color var(--duration);
}
.notif-mark-all:hover { background: var(--surface-alt); color: var(--primary); }
.notif-panel-body {
  overflow-y: auto; flex: 1; max-height: 400px;
}
.notif-item {
  display: flex; align-items: flex-start; gap: var(--space-sm);
  padding: var(--space-ms) var(--space-md); cursor: pointer;
  transition: background var(--duration); border-bottom: 0.5px solid var(--border);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface-alt); }
.notif-item.unread { background: color-mix(in srgb, var(--primary) 4%, transparent); }
.notif-item.unread:hover { background: var(--primary-subtle); }
.notif-item-icon {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title {
  font-size: 13px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notif-item-msg {
  font-size: 12px; color: var(--text-muted); margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.notif-item-time { font-size: 11px; color: var(--text-faint); margin-top: 3px; }
.notif-item-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary); flex-shrink: 0; margin-top: 5px;
}
.notif-empty {
  padding: 40px 16px; text-align: center;
  font-size: 13px; color: var(--text-faint);
}
/* Classes used by notification-center.js renderPanel() */
.notif-list { overflow-y: auto; flex: 1; max-height: 400px; }
.notif-header-actions { display: flex; align-items: center; gap: 6px; }
.notif-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 0.5px solid var(--border); font-size: 14px; font-weight: 600; color: var(--text); }
.notif-clear-all { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--text-faint); background: none; border: none; cursor: pointer; transition: background .12s, color .12s; }
.notif-clear-all:hover { background: var(--surface-alt); color: var(--danger); }
.notif-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 15px; }
.notif-content { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-body { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.notif-time { font-size: 11px; color: var(--text-faint); margin-top: 3px; }
.notif-reason { font-size: 11px; color: var(--text-faint); margin-top: 3px; font-style: italic; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex-shrink: 0; margin-top: 5px; }

/* ── User dropdown menu ── */
.user-menu-wrap { position: relative; }
.user-avatar-btn {
  display: flex; align-items: center; gap: 7px;
  cursor: pointer; padding: 3px 8px 3px 3px;
  border-radius: 20px; border: 0.5px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}
.user-avatar-btn:hover { border-color: var(--border-strong); background: var(--surface-alt); }
.user-menu {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 220px; background: var(--surface); border: 0.5px solid var(--border-strong);
  border-radius: 12px; box-shadow: 0 10px 32px rgba(0,0,0,.28);
  overflow: hidden; z-index: 500;
}
.user-menu.open { display: block; }
.um-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 0.5px solid var(--border);
}
.um-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #f0c85e);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.um-name { font-size: 13px; font-weight: 600; color: var(--text); }
.um-email { font-size: 11px; color: var(--text-faint); margin-top: 1px; }
.um-divider { height: 1px; background: var(--border); }
.um-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; font-size: 13px; font-weight: 500;
  color: var(--text); cursor: pointer; transition: background 0.12s;
}
.um-item:hover { background: var(--surface-alt); }
.um-icon { font-size: 14px; width: 18px; text-align: center; }
.um-danger { color: var(--accent-red); }
.um-danger:hover { background: var(--accent-red-soft); }

/* ── Search dropdown ── */
#search-results { scrollbar-width: thin; }
.sr-group-label {
  padding: 8px 14px 4px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-faint); user-select: none;
}
.sr-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; cursor: pointer; transition: background 0.1s;
}
.sr-item:hover, .sr-item.sr-active { background: var(--surface-alt); }
.sr-item-icon {
  width: 28px; height: 28px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
}
.sr-item-text { font-size: 12.5px; font-weight: 500; color: var(--text); }
.sr-item-cat { font-size: 10px; color: var(--text-faint); margin-left: auto; text-transform: capitalize; }
.sr-filters {
  display: flex; gap: 4px; padding: 8px 10px 4px; flex-wrap: wrap;
  border-bottom: 0.5px solid var(--border); margin-bottom: 2px;
}
.sr-filter {
  background: transparent; border: 0.5px solid var(--border-strong); border-radius: 12px;
  padding: 3px 10px; font-size: 11px; font-weight: 500; color: var(--text-faint);
  cursor: pointer; transition: background .12s, color .12s, border-color .12s; font-family: var(--font-body);
}
.sr-filter:hover { background: var(--surface-alt); color: var(--text-muted); }
.sr-filter-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.sr-filter-active:hover { background: var(--primary); color: #fff; }
.sr-filter-count { font-weight: 700; font-size: 10px; opacity: .7; }
.sr-recent .sr-recent-x {
  opacity: 0; font-size: 10px; cursor: pointer; padding: 2px 4px; transition: opacity .12s;
}
.sr-recent:hover .sr-recent-x { opacity: .5; }
.sr-recent-x:hover { opacity: 1 !important; }
.search-kbd {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  color: var(--text-faint); background: var(--surface-inset, var(--bg)); border: 0.5px solid var(--border-strong);
  border-radius: 4px; padding: 1px 5px; line-height: 1.4; flex-shrink: 0;
  pointer-events: none; user-select: none;
}

/* ────────────────────────────────
   LAYOUT
──────────────────────────────── */
.layout {
  display: flex;
  margin-top: 54px;
  min-height: calc(100vh - 54px);
}

/* ────────────────────────────────
   SIDEBAR — layout handled by app-v2.html flexbox, not position:fixed
──────────────────────────────── */
/* Old v1 fixed sidebar removed. v2 uses flex layout in .app container. */

/* ── Hover-to-expand mode (future) ── */
/* v1 sidebar classes (.sb-*) removed — v2 uses .nav-item, .nav-section in sidebar.css */

/* @keyframes shimmer and .skeleton defined in app-v2.html inline block */
.skeleton-line {
  height: 14px;
  margin-bottom: 10px;
  border-radius: 4px;
}
.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 65%; }
.skeleton-line.long { width: 90%; }
.skeleton-row {
  display: flex; gap: 16px; padding: 12px 0; border-bottom: 0.5px solid var(--border);
}
.skeleton-row > div { height: 16px; border-radius: 4px; }
.skeleton-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
}
.skeleton-card {
  padding: 20px; border-radius: var(--radius); margin-bottom: 12px;
}

/* ────────────────────────────────
   MAIN CONTENT
   Layout: sidebar (210px left) + settings panel (420px right) are permanent.
   Content always centers between them. Drawers overlay the right panel zone.
   At ≤1200px the right panel collapses (see media query below).
──────────────────────────────── */
.main {
  flex: 1;
  min-width: 0;
  background: var(--bg);
}


/* ── Iframe tool viewer ── */
#tool-viewer {
  max-width: 1080px; /* 984px content + 48px padding each side */
  margin-left: auto;
  margin-right: auto;
}
#tool-viewer-ctx-bar {
  padding-left: 48px;
  padding-right: 48px;
}
/* Reference mockup tabs (admin only) */
.ref-tab-bar {
  display: flex;
  gap: 0;
  padding: 0 48px;
  border-bottom: 0.5px solid var(--border);
}
.ref-tab {
  padding: 8px 16px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.ref-tab:hover { color: var(--text-muted); }
.ref-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
#tool-viewer-content {
  margin-top: 16px;
  padding: 0 48px 48px;
}
@media (max-width: 768px) {
  #tool-viewer-content { padding: 0 0 24px; margin-top: 8px; }
  #tool-viewer-ctx-bar { padding-left: 12px !important; padding-right: 12px !important; }
  #shortcuts-btn { display: none !important; }
}
#tool-viewer-content iframe {
  width: 100%;
  border: none;
  display: block;
  min-height: 200px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-alt);
  box-shadow: 0 0 0 1px var(--border-strong);
  transform: none !important;
  transition: none !important;
}
/* Editor tools: flush iframe, no card frame, no padding */
#tool-viewer.tf-editor-active #tool-viewer-content {
  padding: 0;
  margin-top: 8px;
}
#tool-viewer.tf-editor-active #tool-viewer-content iframe {
  border-radius: 0;
  box-shadow: none;
  background: var(--bg);
}
/* Studio tools (full width): reduced padding, keep card frame */
#tool-viewer.tf-studio-active #tool-viewer-content {
  padding: 0 12px 12px;
  margin-top: 8px;
}

/* Fullscreen mode for tool viewer content */
#tool-viewer-content:fullscreen {
  background: var(--bg);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
#tool-viewer-content:fullscreen iframe {
  border-radius: 0;
  box-shadow: none;
  min-height: 100vh;
  max-height: 100vh;
}

/* ── Inline tool container (no iframe) ── */
.tf-tool-inline {
  background: var(--surface-alt);
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--border-strong);
  padding: var(--tool-pad, 32px);
  font-family: system-ui, sans-serif;
  min-height: 200px;
}
@media (max-width: 768px) {
  .tf-tool-inline { padding: 16px; }
}
/* Editor/studio inline tools: flush, no frame */
#tool-viewer.tf-editor-active .tf-tool-inline,
#tool-viewer.tf-studio-active .tf-tool-inline {
  border-radius: 0;
  box-shadow: none;
  background: var(--bg);
  padding: 0;
}

/* ────────────────────────────────
   Demo switcher removed — dead selectors, not in app-v2.html
──────────────────────────────── */

/* ────────────────────────────────
   PAGE + PANEL VISIBILITY
──────────────────────────────── */
/* .page { display: none; } — defined in app-v2.html inline block */
/* app-v2.html inline sets .page { max-width: 1100px } and overrides at ≥1025px.
   This rule provides the fadeUp animation and box-sizing — max-width here is
   a fallback only (inline wins at desktop via the !important media query). */
.page.active { display: block; animation: fadeUp .18s ease; max-width: 1100px; width: 100%; box-sizing: border-box; }

/* Content is constrained via max-width on .page.active above.
   Toolbox uses the same 1100px. loadTool() temporarily sets max-width:none
   so the tool viewer can use its own width (compact/standard/wide). */
.panel { display: none; }
.panel.active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ────────────────────────────────
   CONTEXT BAR
──────────────────────────────── */
.ctx-bar {
  display: flex; align-items: center; justify-content: flex-end;
  padding: 20px var(--tool-pad, 32px) 0;
}
.ctx-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: var(--radius-sm);
  border: 0.5px solid var(--border-strong); background: transparent;
  color: var(--text-muted); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: color .12s, border-color .12s;
}
.ctx-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-alt); }
/* .ctx-pills/.ctx-pill removed — dead selectors, not in app-v2.html */
.edit-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--radius-sm);
  background: var(--surface-alt); border: 0.5px solid var(--border);
  color: var(--text-muted); font-size: 12px; font-weight: 500;
  cursor: pointer; font-family: var(--font-body); transition: background .15s, color .15s, border-color .15s;
}
.edit-btn:hover { border-color: var(--border-strong); color: var(--text); }

/* Hero component — all hero-* classes defined in assets/css/hero.css */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 11px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.badge-green  { background: rgba(74,222,128,.13);  color: #4ade80; }
.badge-red    { background: rgba(248,113,113,.13); color: #f87171; }
.badge-amber  { background: rgba(251,191,36,.13);  color: #fbbf24; }
.badge-blue   { background: rgba(157,195,255,.12); color: #9dc3ff; }
.badge-cyan   { background: rgba(34,211,238,.12);  color: #22d3ee; }
.badge-purple { background: rgba(167,139,250,.13); color: #a78bfa; }
.badge-teal   { background: rgba(52,211,153,.12);  color: #34d399; }
.badge-indigo { background: var(--accent-indigo-soft); color: var(--accent-indigo); }
.badge-pink   { background: rgba(236,72,153,.13);  color: #f9a8d4; }
.badge-muted  { background: rgba(139,144,168,.12); color: #8b90a8; }

/* .hero-grid, .hero-kpi-label, .hero-kpi, .hero-kpi-sub, .hero-stat-strip,
   .hero-stat, .hero-stat-val, .hero-stat-label — defined in app-v2.html inline block. */

.toolbox-card:hover { border-color: var(--primary); transform: translateY(-1px); }

/* ── Toolbox v2 — tool rows, category headers, search bar, pin button ── */
.tool-row { display:flex; align-items:center; gap:var(--space-sm); padding:var(--space-sm) var(--space-md); min-height:52px; border-bottom:0.5px solid var(--border); cursor:pointer; transition:background var(--duration); }
.tool-row:last-child { border-bottom:none; }
.tool-row:hover { background:var(--surface-alt); }
.tool-icon { width:34px; height:34px; border-radius:var(--radius-sm); background:var(--bg); border:0.5px solid var(--border); display:flex; align-items:center; justify-content:center; font-size:16px; flex-shrink:0; }
.tool-text { flex:1; min-width:0; }
.tool-name { font-size:13px; font-weight:600; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-bottom:2px; }
.tool-desc { font-size:11px; color:var(--text-faint); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tool-right { display:flex; align-items:center; gap:var(--space-xs); flex-shrink:0; }
.badge-new { font-size:9px; font-weight:700; letter-spacing:0.06em; padding:2px 6px; border-radius:4px; background:color-mix(in srgb, var(--primary) 12%, transparent); color:var(--primary); }
.badge-pro { font-size:9px; font-weight:700; letter-spacing:0.06em; padding:2px 6px; border-radius:4px; background:var(--accent-green-soft); color:var(--accent-green); }
.cat-header { display:flex; align-items:center; gap:var(--space-sm); padding:var(--space-sm) var(--space-md); background:var(--bg); border-bottom:0.5px solid var(--border); border-top:0.5px solid var(--border); position:sticky; top:0; z-index:2; }
.cat-icon { width:20px; height:20px; border-radius:5px; display:flex; align-items:center; justify-content:center; font-size:11px; }
.cat-name { font-size:12px; font-weight:600; color:var(--text); }
.cat-count { font-size:11px; color:var(--text-faint); margin-left:auto; }
.pin-btn { width:28px; height:28px; display:flex; align-items:center; justify-content:center; border-radius:var(--radius-sm); background:none; border:none; cursor:pointer; opacity:0.25; font-size:14px; color:var(--text-faint); transition:opacity var(--duration),color var(--duration); }
.pin-btn.pinned { opacity:1; color:var(--primary); }
.tool-search-wrap { padding:var(--space-sm) var(--space-md); background:var(--bg); border-bottom:0.5px solid var(--border); }
.tool-search-inner { display:flex; align-items:center; gap:var(--space-sm); background:var(--surface); border:0.5px solid var(--border); border-radius:var(--radius-sm); padding:0 var(--space-ms); height:36px; }
.tool-search-inner input { flex:1; border:none; outline:none; background:none; font-size:13px; color:var(--text); }
.tool-search-inner input::placeholder { color:var(--text-faint); }

/* ── Settings modal — strip card chrome (modal is already the container) ── */
#settings-modal-body .card {
  background: none; border: none; border-radius: 0; overflow: visible;
}
#settings-modal-body .set-nav-track {
  padding: var(--space-sm) var(--space-xs); border-bottom: var(--border-w) solid var(--border);
  background: var(--surface-inset);
  margin: calc(-1 * var(--space-sm)) calc(-1 * var(--space-sm)) var(--space-sm);
}
#settings-modal-body .set-nav-track::before { background: linear-gradient(to right, var(--surface-inset), transparent); }
#settings-modal-body .set-nav-track::after  { background: linear-gradient(to left,  var(--surface-inset), transparent); }
#settings-modal-body .card-body { padding: 0; }

/* ── TF Modal — page panel overrides when hosted inside modal ── */
#tf-modal-body .page {
  display: block !important;
  max-width: 100%;
  animation: none;
  padding: 0;
}

/* ── Settings shop link ── */
.set-shop-link {
  display: block; width: 100%; text-align: left; background: var(--primary-subtle);
  border: 0.5px solid var(--ring); border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.78rem; font-weight: 600; color: var(--primary);
  cursor: pointer; transition: background var(--duration), border-color var(--duration);
  margin-bottom: var(--space-lg);
}
.set-shop-link:hover { background: color-mix(in srgb, var(--primary) 15%, transparent); border-color: var(--primary); }

/* ── Settings section nav ── */
.set-nav-track {
  position: relative;
  padding: var(--space-md) var(--space-lg);
  border-bottom: var(--border-w) solid var(--border);
  background: var(--surface-inset);
}
@media (max-width: 768px) {
  /* Settings: card edge-to-edge, single 12px content padding */
  #page-settings > .card {
    border-radius: 0;
    border: none;
    padding: 0 !important;
  }
  #page-settings > .card > .card-body { padding: var(--space-ms) !important; }
  .set-nav-track {
    padding: var(--space-sm) var(--space-ms);
  }
  .set-nav-scroll {
    overflow-x: visible;
  }
  .set-nav-btn {
    flex: 1 1 0;
    min-width: 0;
    white-space: nowrap;
    flex-shrink: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: var(--space-xs);
    padding-right: var(--space-xs);
  }
}
/* ── Settings mode segmented control ── */
.set-mode-seg {
  display: flex; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); overflow: hidden;
}
.set-seg {
  flex: 1; padding: var(--space-xs) var(--space-sm);
  background: var(--surface-alt); border: none; border-right: 1px solid var(--border);
  font-family: var(--font-heading); font-size: 0.78rem; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
  min-height: 36px; display: flex; align-items: center; justify-content: center;
}
.set-seg:last-child { border-right: none; }
.set-seg.active { background: var(--primary); color: var(--text-on-primary); }
.set-seg:hover:not(.active) { background: var(--surface-inset); color: var(--text); }

.set-nav-track::before,
.set-nav-track::after { display: none; }
.set-nav-scroll {
  display: flex; gap: var(--space-xs);
  overflow-x: auto; scroll-behavior: smooth;
  scrollbar-width: none; -ms-overflow-style: none;
}
.set-nav-scroll::-webkit-scrollbar { display: none; }
.set-nav-btn {
  padding: var(--space-xs) var(--space-md); background: var(--surface-alt);
  border: 0.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-heading); font-size: 0.78rem; font-weight: 600;
  color: var(--text-muted); cursor: pointer; transition: background var(--duration), color var(--duration), border-color var(--duration);
  min-height: var(--touch-min); white-space: nowrap; flex-shrink: 0;
}
.set-nav-btn:hover { border-color: var(--border-strong); color: var(--text); }
.set-nav-btn.active { background: var(--primary); border-color: var(--primary); color: var(--text-on-primary); }
.set-section.hidden { display: none; }

/* ── Settings page: light mode surface correction ──
   Dark: card bg == surface-inset == surface — all same depth, fine.
   Light: card bg (#fff) is stark white on the warm-beige page (--bg: #f5f2ed).
   Use surface-alt for the card shell so it reads as a tinted panel, not a
   fully-white cover. Inner form fields (dr-input/dr-select use --surface)
   will pop as slightly lighter — creating proper depth hierarchy.
   Note: #settings-modal-body .card already sets background: none — don't override it. ── */
[data-theme="light"] #page-settings > .card {
  background: var(--surface-alt);
}

/* ── Page card — wraps tab-bar + filters + table on list pages ── */
/* ── List bar — compact top bar for list pages ── */
.list-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}
.list-bar-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
  margin: 0;
  white-space: nowrap;
}
.list-bar-search {
  position: relative;
  flex: 1;
  min-width: 140px;
  max-width: 320px;
}
.list-bar-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}
.list-bar-input {
  width: 100%;
  padding: 7px 10px 7px 32px;
  font-size: 0.82rem;
  background: var(--surface-alt, var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  transition: border-color var(--duration);
  box-sizing: border-box;
}
.list-bar-input:focus {
  border-color: var(--primary);
}
.list-bar-input::placeholder {
  color: var(--text-faint);
}
.list-bar-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  margin-left: auto;
}
.list-bar-action {
  white-space: nowrap;
}
@media (max-width: 600px) {
  .list-bar {
    padding: var(--space-sm) var(--space-sm);
  }
  .list-bar-search {
    order: 10;
    flex-basis: 100%;
    max-width: none;
  }
  .list-bar-count {
    margin-left: 0;
  }
}

.page-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: visible;
  margin-bottom: var(--space-md);
}
@media (max-width: 1024px) {
  .page-card { border-radius: 0; border-left: none; border-right: none; margin-bottom: 0; }
}

/* ── Dashboard panels grid ── */
.dash-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--card-gap);
  align-items: stretch;
}
.dash-panels > * { display: flex; flex-direction: column; }
@media (min-width: 1025px) {
  .dash-panels { grid-template-columns: 1.6fr 1fr; gap: var(--space-md); }
}
@media (max-width: 640px) {
  .dash-panels { grid-template-columns: 1fr; }
}

/* ── Row Item component (.ri) — reusable flex list row ── */
.ri { display: flex; align-items: center; gap: 10px; padding: 10px 16px; min-height: 44px; border-bottom: 0.5px solid var(--border); cursor: pointer; transition: background .1s; }
.ri:last-child { border-bottom: none; }
.ri:hover { background: var(--surface-inset); margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.ri-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--surface); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ri-icon svg { width: 14px; height: 14px; stroke: var(--text-faint); fill: none; stroke-width: 1.5; }
.ri-main { flex: 1; min-width: 0; }
.ri-title { font-family: var(--font-heading); font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ri-meta { font-family: var(--font-heading); font-size: 11px; font-weight: 400; color: var(--text-faint); margin-top: 1px; }
.ri-right { text-align: right; flex-shrink: 0; }
.ri-value { font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--text); }
.ri-status { font-family: var(--font-heading); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); margin-top: 1px; }
.ri-status.danger { color: var(--danger, #f87171); }
.ri-status.success { color: var(--success, #4ade80); }
.ri-status.warning { color: var(--warning, #fbbf24); }
.ri-status.info { color: var(--info, #60a5fa); }

/* ── Section block wrapper (used inside .table-wrap for .ri lists) ── */
.section-block { background: var(--bg); padding: 0; border-bottom: 0.5px solid var(--border); }
.section-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; margin-bottom: 0; }
.section-title { font-family: var(--font-heading); font-size: 14px; font-weight: 600; color: var(--text); }
@media (min-width: 1025px) {
  .section-block { background: var(--surface); border-radius: 12px; border: 0.5px solid var(--border); overflow: visible; margin-bottom: 16px; border-bottom: 0.5px solid var(--border); }
  .dash-panels > * { background: var(--surface); border-radius: 12px; border: 0.5px solid var(--border); overflow: visible; }
}
.section-action { font-family: var(--font-heading); font-size: 12px; font-weight: 500; color: var(--primary); cursor: pointer; background: none; border: none; }

/* ── Generic .input class (used by page search bars, inline inputs) ── */
.input {
  background: var(--surface); color: var(--text);
  border: 0.5px solid var(--border-strong); border-radius: 8px;
  outline: none; font-family: var(--font-body);
}
.input:focus { border-color: var(--primary); }
.input:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.input::placeholder { color: var(--text-faint); }
/* .hero-divider, .hero-actions — defined in app-v2.html inline block. */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 20px; border-radius: var(--radius-sm); min-height: var(--touch-min); min-width: var(--touch-min);
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: none; font-family: var(--font-heading);
  transition: filter .15s; color: var(--text-on-primary);
  background: var(--primary);
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-ghost:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ── Global :focus-visible for all interactive elements ── */
.sb-item:focus-visible,
.tab:focus-visible,
.icon-btn:focus-visible,
.mob-nav-item:focus-visible,
.ctx-pop-item:focus-visible,
.notif-mark-all:focus-visible,
.notif-item:focus-visible,
.toggle:focus-visible,
.density-opt:focus-visible,
.term-chip:focus-visible,
.chip:focus-visible,
.toolbox-card:focus-visible,
.dr-select:focus-visible,
.input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
/* Remove default outline for mouse users — :focus-visible handles keyboard only */
.sb-item:focus:not(:focus-visible),
.tab:focus:not(:focus-visible),
.icon-btn:focus:not(:focus-visible),
.toolbox-card:focus:not(:focus-visible) {
  outline: none;
}
.btn-ghost {min-height: var(--touch-min); min-width: var(--touch-min);
  font-size: 13px; font-weight: 600;
  cursor: pointer; background: var(--surface-alt);
  color: var(--text-muted); border: 0.5px solid var(--border);
  font-family: var(--font-heading); transition: background .15s, color .15s, border-color .15s;
}
.btn-ghost:hover { background: var(--surface-inset); color: var(--text); border-color: var(--border-strong); }

/* tool-btn / tool-btn-ghost — used by v2 page modules in SPA context.
   Matches btn-primary / btn-ghost baseline. tool-shared.css scopes its own
   .tool-btn under .tf-tool-content for standalone tools — no conflict. */
.tool-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 10px; min-height: var(--touch-min); min-width: var(--touch-min);
  font-family: var(--font-heading); font-size: 13px; font-weight: 600;
  cursor: pointer; border: none; box-shadow: none;
  transition: filter .15s; color: var(--text-on-primary);
  background: var(--primary);
}
.tool-btn:hover { filter: brightness(1.1); }
.tool-btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 5px 12px; border-radius: 20px; min-height: 0;
  font-size: 11px; font-weight: 600;
  cursor: pointer; background: var(--surface);
  color: var(--text-faint); border: 0.5px solid var(--border);
  font-family: var(--font-heading); transition: color .15s, border-color .15s;
  position: relative; white-space: nowrap;
}
.tool-btn-ghost::before { content: ''; position: absolute; inset: -6px -4px; }
.tool-btn-ghost:hover { color: var(--text); border-color: var(--primary); }
.tool-btn-ghost:hover { background: var(--surface-inset); color: var(--text); border-color: var(--border-strong); }

/* .hero-meta — defined in app-v2.html inline block. */

/* .tab-bar, .tab-btn, .tab-btn:hover, .tab-btn.active, .filter-chips
   — defined in app-v2.html inline block (page-renderer.js components). */

/* ────────────────────────────────
   TABS — legacy (app pages that build their own hero HTML)
──────────────────────────────── */
.tabs {
  display: flex; align-items: center;
  padding: 0 32px;
  border-bottom: 0.5px solid var(--border);
  margin-top: 6px;
}
.tab {
  display: flex; align-items: center; gap: 7px;
  padding: 14px 20px; font-size: 13px; font-weight: 500;
  color: var(--text-muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s; background: none;
  border-top: none; border-left: none; border-right: none;
  font-family: var(--font-body); white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); }
.tab-pill {
  font-size: 10px; font-weight: 600;
  padding: 2px 7px; border-radius: 10px;
  background: var(--surface-alt);
}

/* ────────────────────────────────
   CONTENT AREA
──────────────────────────────── */
.content { padding: 24px 32px 40px; }

/* ────────────────────────────────
   STAT CARDS
──────────────────────────────── */
.stat-row { display: grid; gap: 14px; }
.cols4 { grid-template-columns: repeat(4, 1fr); }
.cols3 { grid-template-columns: repeat(3, 1fr); }
.cols2 { grid-template-columns: repeat(2, 1fr); }
.stat-card {
  background: var(--surface); border: 0.5px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px;
  transition: border-color .12s;
}
.stat-card:hover { border-color: var(--border-strong); }
.stat-card-lbl {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .07em; color: var(--text-faint); margin-bottom: 12px;
}
.stat-card-val {
  font-size: 28px; font-weight: 600;
  font-family: var(--font-mono); letter-spacing: -0.5px; line-height: 1;
}
.stat-card-sub { font-size: 11px; color: var(--text-faint); margin-top: 6px; line-height: 1.3; }

/* ────────────────────────────────
   CARDS
──────────────────────────────── */
.card {
  background: var(--surface-inset); border: 0.5px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
/* Cards that contain search + table directly (no card-head/card-body) */
.card > div:first-child:has(.input) { padding: 16px 20px 0; }
/* Tables inside cards scroll horizontally instead of clipping */
.card table.tbl { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl th, .tbl td { white-space: nowrap; }
.tbl-wrap table.tbl { display: table; overflow-x: visible; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px; border-bottom: 0.5px solid var(--border);
}
.card-title { font-size: 14px; font-weight: 600; }
.card-action { font-size: 12px; font-weight: 500; color: var(--primary); cursor: pointer; transition: color .12s; }
.card-action:hover { color: var(--text); }
.card-body { padding: 20px; }
.card-body-flush { padding: 0; }

/* ────────────────────────────────
   GRID LAYOUTS
──────────────────────────────── */
.two-col-wide  { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.two-col-even  { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.three-col     { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* ────────────────────────────────
   TABLE
──────────────────────────────── */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .07em; color: var(--text-faint);
  padding: 11px 18px; text-align: left; border-bottom: 0.5px solid var(--border);
}
.tbl td { padding: 14px 18px; border-bottom: 0.5px solid var(--border); }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover td { background: var(--surface-alt); }
.mono { font-family: var(--font-mono); }
@media (max-width: 767px) {
  /* Global compact tables on mobile */
  .tbl th { padding: 6px 10px; font-size: 10px; }
  .tbl td { padding: 8px 10px; font-size: 12px; }
  .tbl th, .tbl td { white-space: nowrap; }
  /* Toolbox: full-width stacked list on mobile — keep card styling */
  .toolbox-grid { grid-template-columns: 1fr !important; gap: var(--space-xs) !important; }
  /* Toolbox: horizontal scroll chips */
  #toolbox-cat-chips { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  #toolbox-cat-chips::-webkit-scrollbar { display: none; }
}

/* ────────────────────────────────
   FILTER CHIPS
──────────────────────────────── */
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
/* .chip, .chip:hover, .chip.active — defined in app-v2.html inline block. */
.chips-spacer { flex: 1; }

/* ────────────────────────────────
   BAR CHART LIST
──────────────────────────────── */
.bar-list { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: flex; align-items: center; gap: 12px; }
.bar-lbl { font-size: 12px; color: var(--text-muted); width: 110px; flex-shrink: 0; }
.bar-track { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-alt); overflow: hidden; }
.bar-fill  { height: 100%; border-radius: 3px; }
.bar-val   { font-size: 12px; font-family: var(--font-mono); color: var(--text-muted); width: 80px; text-align: right; flex-shrink: 0; }

/* ────────────────────────────────
   ACTION BUTTONS GRID
──────────────────────────────── */
.action-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.action-btn {
  background: var(--surface-alt); border: 0.5px solid var(--border);
  border-radius: 10px; padding: 18px 8px; text-align: center;
  cursor: pointer; transition: background .15s, border-color .15s;
}
.action-btn:hover { border-color: var(--border-strong); background: var(--surface-inset); }
.action-icon { font-size: 22px; margin-bottom: 8px; }
.action-lbl { font-size: 11px; font-weight: 500; color: var(--text-muted); }

/* ────────────────────────────────
   ACTIVITY FEED
──────────────────────────────── */
.act-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0; border-bottom: 0.5px solid var(--border);
}
.act-item:last-child { border-bottom: none; }
.act-av {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; flex-shrink: 0;
}
.act-text { font-size: 13px; line-height: 1.5; color: var(--text-muted); flex: 1; }
.act-text b { color: var(--text); font-weight: 500; }
.act-time { font-size: 11px; color: var(--text-faint); flex-shrink: 0; padding-top: 2px; }

/* ────────────────────────────────
   EMPTY STATE
──────────────────────────────── */
.empty {
  text-align: center; padding: 64px 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
}
.empty-icon { font-size: 44px; opacity: .4; color: var(--text-faint); }
.empty-title { font-size: 15px; font-weight: 600; color: var(--text); }
.empty-sub { font-size: 12px; color: var(--text-faint); max-width: 360px; }

/* ────────────────────────────────
   UTILITY
──────────────────────────────── */
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.dot-g { background: #4ade80; }
.dot-r { background: #f87171; }
.dot-a { background: #fbbf24; }
.dot-x { background: var(--text-faint); }
.spacer { flex: 1; }

/* ────────────────────────────────
   DRAWER TABS
──────────────────────────────── */
.dr-tabs {
  display: flex; border-bottom: 0.5px solid var(--border);
  background: var(--surface); flex-shrink: 0; overflow-x: auto;
  scrollbar-width: none;
}
.dr-tabs::-webkit-scrollbar { display: none; }
.dr-tab {
  padding: 11px 0; font-size: 12px; font-weight: 500; flex: 1; text-align: center;
  color: var(--text-muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  white-space: nowrap; transition: color .12s, border-color .12s;
  background: none; border-top: none; border-left: none; border-right: none;
  font-family: var(--font-body);
}
.dr-tab:hover { color: var(--text); }
.dr-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.dr-tab-panel { display: none; }
.dr-tab-panel.active { display: block; }

/* ────────────────────────────────
   FORM FIELDS
──────────────────────────────── */
/* .dr-input, .dr-input:focus — defined in app-v2.html inline block. */
.dr-input:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.dr-input:-webkit-autofill,
.dr-input:-webkit-autofill:hover,
.dr-input:-webkit-autofill:focus,
.dr-textarea:-webkit-autofill,
.dr-textarea:-webkit-autofill:hover,
.dr-textarea:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--surface-alt) inset;
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  transition: background-color 9999s ease-in-out 0s, border-color 0s;
}
.dr-textarea:focus { border-color: var(--primary); background: var(--surface-alt); }
.dr-input[type="number"]::-webkit-outer-spin-button,
.dr-input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }
.dr-input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.dr-input[type="date"], input[type="date"] { cursor: pointer; }
.tf-datepicker-wrap { position: relative; }
.tf-datepicker-input { cursor: pointer !important; }
.tf-datepicker-wrap::after {
  content: '📅'; position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 14px; pointer-events: none; opacity: 0.5;
}
/* Receipt drop zone */
.receipt-drop-zone {
  border: 2px dashed var(--border-strong); border-radius: 10px; padding: 24px 16px;
  text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
  color: var(--text-faint); font-size: 13px; min-height: 80px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
}
.receipt-drop-zone:hover { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, transparent); }
.receipt-drop-zone.drag-over { border-color: #4ade80; background: rgba(74,222,128,.06); }
.receipt-drop-zone.has-receipt { border-style: solid; padding: 8px; }
.receipt-drop-zone.has-receipt img {
  max-width: 100%; max-height: 200px; border-radius: 6px; object-fit: contain;
}
.receipt-viewer-overlay {
  position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.85);
  display: flex; align-items: center; justify-content: center; cursor: zoom-out;
}
.receipt-viewer-overlay img {
  max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 8px;
}

/* Date input — show native calendar picker */
input[type="date"].dr-input, input[type="date"].li-input {
  cursor: pointer;
  position: relative;
  color-scheme: dark;
}
[data-theme="light"] input[type="date"].dr-input,
[data-theme="light"] input[type="date"].li-input {
  color-scheme: light;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer; opacity: 0.7; filter: invert(1);
  width: 20px; height: 20px;
}
[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator {
  filter: none; opacity: 0.5;
}
input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
}
.term-chips {
  display: inline-flex; gap: 2px; align-items: center;
}
.term-chip {
  background: none; border: 0.5px solid transparent; color: var(--primary);
  font-size: 10px; cursor: pointer; padding: 1px 5px; border-radius: 4px;
  font-family: var(--font-body); line-height: 1.4; min-width: 24px; text-align: center;
  transition: background .1s, border-color .1s;
}
.term-chip:hover { background: color-mix(in srgb, var(--primary) 10%, transparent); border-color: rgba(224, 168, 48, .2); }
@media (max-width: 768px) {
  .term-chips { gap: 4px; margin-top: 4px; flex-wrap: wrap; }
  .term-chip { font-size: 12px; padding: 6px 10px; min-width: 36px; min-height: 32px; border: 0.5px solid var(--border-strong); border-radius: 6px; }
}
.field-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field-group:last-child { margin-bottom: 0; }
.field-label {
  font-size: 10px; font-weight: 600; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: .07em;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-row-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
.dr-textarea {
  width: 100%; padding: 9px 12px; border-radius: var(--radius-sm);
  background: var(--surface-alt); border: 0.5px solid var(--border);
  color: var(--text); font-family: var(--font-body); font-size: 13px;
  outline: none; resize: vertical; min-height: 72px; transition: border-color .12s;
}
.dr-textarea:focus { border-color: var(--primary); }
.dr-textarea:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

/* ────────────────────────────────
   BUDGET / GOAL ROWS
──────────────────────────────── */
.budget-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 0.5px solid var(--border);
}
.budget-row:last-child { border-bottom: none; }
.budget-emoji { font-size: 16px; flex-shrink: 0; width: 22px; text-align: center; }
.budget-name { font-size: 13px; font-weight: 500; flex: 1; }
.budget-amt {
  font-family: var(--font-mono); font-size: 12px; color: var(--text-muted);
  background: var(--surface-alt); border: 0.5px solid var(--border);
  border-radius: 6px; padding: 3px 8px; width: 80px; text-align: right;
  outline: none; cursor: text;
}
.goal-row {
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px 0; border-bottom: 0.5px solid var(--border);
}
.goal-row:last-child { border-bottom: none; }
.goal-top { display: flex; align-items: center; gap: 8px; }
.goal-name { font-size: 13px; font-weight: 500; flex: 1; }
.goal-amt { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }
.goal-pct { font-size: 11px; color: var(--text-faint); }

/* ────────────────────────────────
   VEHICLE ROWS
──────────────────────────────── */
.vehicle-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  border: 0.5px solid var(--border); background: var(--surface-alt);
  margin-bottom: 7px;
}
.vehicle-icon { font-size: 18px; }
.vehicle-info { flex: 1; }
.vehicle-name { font-size: 13px; font-weight: 500; }
.vehicle-plate { font-size: 11px; color: var(--text-faint); font-family: var(--font-mono); margin-top: 1px; }

/* ────────────────────────────────
   BUSINESS SWITCHER IN DRAWER
──────────────────────────────── */
.biz-switcher {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  border: 0.5px solid var(--border-strong); background: color-mix(in srgb, var(--primary) 10%, transparent);
  margin-bottom: 16px;
}
.biz-logo {
  width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), #f0c85e);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
}
.biz-name { font-size: 13px; font-weight: 600; }
.biz-type { font-size: 11px; color: var(--text-faint); margin-top: 1px; }

/* ────────────────────────────────
   SESSION / CONNECTED ROWS
──────────────────────────────── */
.session-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 0.5px solid var(--border);
}
.session-row:last-child { border-bottom: none; }
.session-icon { font-size: 20px; width: 28px; text-align: center; flex-shrink: 0; }
.session-info { flex: 1; }
.session-name { font-size: 13px; font-weight: 500; }
.session-detail { font-size: 11px; color: var(--text-faint); margin-top: 1px; }

/* ────────────────────────────────
   PROGRESS / MINI BARS
──────────────────────────────── */
.progress { height: 4px; border-radius: 2px; background: var(--surface-alt); overflow: hidden; margin-top: 10px; }
.progress-fill { height: 100%; border-radius: 2px; }

/* ────────────────────────────────
   RIGHT SLIDING DRAWER
──────────────────────────────── */
/* .drawer-overlay, .drawer-overlay.open, .drawer, .drawer.open
   — defined in app-v2.html inline block. */
.drawer-wide { width: min(660px, 95vw); }
textarea.line-desc { display: block; width: 100%; }

.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 0.5px solid var(--border);
  flex-shrink: 0;
}
.drawer-head-left { display: flex; align-items: center; gap: 10px; }
.drawer-icon { font-size: 18px; }
/* .drawer-title, .drawer-close, .drawer-close:hover — defined in app-v2.html inline block. */
.drawer-subtitle { font-size: 12px; color: var(--text-faint); margin-top: 1px; }

/* .drawer-body, .drawer-header, .drawer-footer, .btn-cancel, .btn-cancel:hover,
   .btn-save, .btn-save:hover, .dr-group, .dr-label — defined in app-v2.html inline block. */
/* Prefix input wrapper (e.g. currency $ prefix) */
.input-wrap { position: relative; display: flex; align-items: center; }
.input-prefix { position: absolute; left: 12px; font-size: 13px; color: var(--text-faint); pointer-events: none; }
.has-prefix { padding-left: 28px; }

/* .table-wrap, .data-table and variants, .empty-state — defined in app-v2.html inline block.
   page-renderer.js components. */
.table-wrap .data-table { min-width: 500px; }
.table-empty { padding: 0 !important; text-align: center; }
.table-empty .empty-state { width: 100%; text-align: center; flex: unset; max-height: none; }

.drawer-section {
  padding: 20px 24px;
  border-bottom: 0.5px solid var(--border);
}
.drawer-section:last-child { border-bottom: none; }
.drawer-section-title {
  font-size: 10px; font-weight: 600; letter-spacing: .09em;
  text-transform: uppercase; color: var(--text-faint); margin-bottom: 14px;
}
.drawer-section-desc {
  font-size: 12px; color: var(--text-faint); margin-bottom: 14px; line-height: 1.6;
}

/* Timesheet task rows */
.ts-task-row {
  display: grid;
  grid-template-columns: 1fr 72px 1fr 24px;
  gap: 6px;
  align-items: start;
  margin-bottom: 3px;
}
.ts-task-row .dr-select, .ts-task-row .dr-input { margin: 0; font-size: 12px; padding: 6px 8px; }
#ts-employee-checks {
  max-height: 160px;
  overflow-y: auto;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  margin-top: 6px;
  background: var(--surface-alt);
}

.drawer-foot {
  padding: 16px 24px;
  border-top: 0.5px solid var(--border);
  display: flex; gap: 8px; align-items: center;
  flex-shrink: 0; background: var(--surface);
}
.drawer-foot-note { font-size: 11px; color: var(--text-faint); margin-left: auto; }

/* Mobile line-item cards: hidden on desktop */
.line-mob { display: none; }

/* Toggle switch */
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 0;
}
.toggle-row + .toggle-row { border-top: 0.5px solid var(--border); }
.toggle-info { flex: 1; }
.toggle-label { font-size: 13px; color: var(--text); font-weight: 500; }
.toggle-sub { font-size: 11px; color: var(--text-faint); margin-top: 2px; }
.toggle {
  position: relative; width: 38px; height: 21px;
  cursor: pointer; flex-shrink: 0; margin-left: 14px;
}
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
  position: absolute; inset: 0; border-radius: 11px;
  background: var(--surface-inset); transition: background .15s;
}
.toggle input:checked + .toggle-track { background: var(--primary); }
.toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 15px; height: 15px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform .15s; pointer-events: none;
}
.toggle input:checked ~ .toggle-thumb { transform: translateX(17px); }

/* Radio group */
.radio-group { display: flex; flex-direction: column; gap: 7px; }
.radio-opt {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: var(--radius-sm);
  border: 0.5px solid var(--border); cursor: pointer;
  transition: border-color .12s, background .12s; user-select: none;
}
.radio-opt:hover { border-color: var(--border-strong); background: var(--surface-alt); }
.radio-opt.sel { border-color: var(--primary); background: var(--primary-subtle); }
.radio-dot {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid var(--border-strong); flex-shrink: 0;
  transition: border-color .12s, background .12s; display: flex; align-items: center; justify-content: center;
}
.radio-opt.sel .radio-dot { border-color: var(--primary); background: var(--primary); }
.radio-opt.sel .radio-dot::after {
  content: ''; width: 5px; height: 5px; border-radius: 50%; background: #fff;
  display: block;
}
.radio-lbl { font-size: 13px; font-weight: 500; flex: 1; }
.radio-sub { font-size: 11px; color: var(--text-faint); margin-top: 2px; }

/* Widget drag list */
.widget-list { display: flex; flex-direction: column; gap: 6px; }
.widget-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  border: 0.5px solid var(--border); background: var(--surface-alt);
  cursor: grab; transition: border-color .12s, box-shadow .12s;
}
.widget-row:hover { border-color: var(--border-strong); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.widget-row.drag-over { border-color: var(--primary); background: var(--primary-subtle); }
.widget-handle { color: var(--text-faint); font-size: 13px; line-height: 1; letter-spacing: 1px; }
.widget-icon { font-size: 15px; display: flex; align-items: center; justify-content: center; width: 18px; }
.widget-name { font-size: 13px; font-weight: 500; flex: 1; }
.widget-badge { font-size: 10px; color: var(--text-faint); background: var(--surface-inset); padding: 2px 7px; border-radius: 8px; }

/* ────────────────────────────────
   CONTEXT SWITCHER WIDGET + POPOVER
──────────────────────────────── */
.ctx-widget {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  border: 0.5px solid var(--border-strong); background: var(--surface-alt);
  cursor: pointer; margin-bottom: 4px;
  transition: border-color .12s, background .12s;
  user-select: none; position: relative;
}
.ctx-widget:hover { border-color: var(--border-strong); background: var(--surface-inset); }

.ctx-avatar {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
}
.ctx-avatar.personal { background: linear-gradient(135deg, #059669, var(--accent-teal)); }
.ctx-avatar.biz      { background: linear-gradient(135deg, var(--primary), #f0c85e); }

.ctx-meta { flex: 1; min-width: 0; }
.ctx-name  { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-type  { font-size: 10px; color: var(--text-faint); margin-top: 1px; }

.ctx-chevron { color: var(--text-faint); font-size: 11px; flex-shrink: 0; transition: transform .15s; }
.ctx-widget[aria-expanded="true"] .ctx-chevron { transform: rotate(180deg); }

/* Popover */
.ctx-popover {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  z-index: 500;
  background: var(--surface); border: 0.5px solid var(--border-strong);
  border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.28);
  overflow: hidden;
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity .15s, transform .15s;
}
.ctx-popover.open { opacity: 1; transform: translateY(0); pointer-events: all; }

.ctx-pop-head {
  font-size: 10px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-faint);
  padding: 10px 12px 6px;
}
.ctx-pop-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; cursor: pointer;
  transition: background .1s;
}
.ctx-pop-item:hover { background: var(--surface-alt); }
.ctx-pop-item.active { background: var(--primary-subtle); }

.ctx-pop-item-name  { font-size: 13px; font-weight: 500; }
.ctx-pop-item-sub   { font-size: 10px; color: var(--text-faint); margin-top: 1px; }
.ctx-pop-check { margin-left: auto; color: var(--primary); font-size: 14px; opacity: 0; }
.ctx-pop-item.active .ctx-pop-check { opacity: 1; }

.ctx-pop-divider { height: 1px; background: var(--border); margin: 4px 0; }

.ctx-pop-add {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px 11px; cursor: pointer;
  font-size: 12px; color: var(--text-faint); transition: color .1s;
}
.ctx-pop-add:hover { color: var(--text); }

/* Nav group fade swap */
.sb-nav-group {
  transition: opacity .1s;
}
.sb-nav-group.hidden {
  opacity: 0; pointer-events: none; height: 0; overflow: hidden;
  margin: 0; padding: 0;
}

/* Sidebar divider */
.sb-divider { height: 1px; background: var(--border); margin: 8px 4px; }

/* Color swatch picker */
.swatch-row { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: transform .12s, border-color .12s;
}
.swatch:hover { transform: scale(1.15); }
.swatch.sel { border-color: var(--text); transform: scale(1.1); }

/* ────────────────────────────────
   MOBILE BOTTOM NAV
──────────────────────────────── */
.mob-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 300;
  height: 60px;
  background: var(--surface); border-top: 0.5px solid var(--border);
  align-items: center;
}
.mob-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; padding: 6px 4px;
  cursor: pointer; color: var(--text-faint); font-size: 10px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .06em;
  transition: color .12s; user-select: none;
}
.mob-nav-item svg { opacity: .5; transition: opacity .12s; }
.mob-nav-item.active { color: var(--primary); }
.mob-nav-item.active svg { opacity: 1; }

/* Hide hamburger on desktop */
.mob-menu-btn { display: none !important; }

/* Mobile sidebar overlay */
.mob-sb-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 250;
  background: rgba(0,0,0,.5); opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.mob-sb-overlay.open { opacity: 1; pointer-events: all; }

/* ────────────────────────────────
   RESPONSIVE BREAKPOINTS
──────────────────────────────── */
/* ────────────────────────────────
   QUICK TOOLS — floating utility widgets
──────────────────────────────── */
/* Quick-tool buttons sit inline in .ctx-bar, left of Edit layout */
.qt-bar {
  display: flex; gap: 4px; margin-right: 6px;
}
.qt-btn {
  width: 30px; height: 30px; border-radius: var(--radius-sm);
  background: var(--surface-alt); border: 0.5px solid var(--border);
  color: var(--text-faint); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color .12s, background .12s, border-color .12s;
}
.qt-btn:hover { color: var(--text); background: var(--surface-inset); border-color: var(--border-strong); }
.qt-btn.active { color: var(--primary); border-color: var(--ring); background: var(--primary-subtle); }

/* Panels stack vertically in the right void */
.qt-panels {
  position: fixed; top: 62px; right: 16px; z-index: 190;
  display: flex; flex-direction: column; gap: 10px;
  max-height: calc(100vh - 80px); overflow-y: auto;
}
.qt-panel {
  width: 280px;
  background: var(--surface); border: 0.5px solid var(--border-strong);
  border-radius: var(--radius); box-shadow: 0 8px 32px rgba(0,0,0,.35);
  overflow: hidden; flex-shrink: 0;
}
.qt-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 0.5px solid var(--border);
}
.qt-panel-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); }
.qt-panel-close {
  background: none; border: none; color: var(--text-faint);
  font-size: 18px; cursor: pointer; line-height: 1; padding: 0 2px;
}
.qt-panel-close:hover { color: var(--text); }

/* Tool-specific panel content */
.qt-panel-body { padding: 12px 14px; }
.gn-die-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 5px; margin-bottom: 10px; }
.gn-die-btn { padding: 7px 4px; border-radius: 7px; border: 0.5px solid var(--border-strong); background: var(--surface-alt); color: var(--text); font-size: 11px; font-weight: 700; cursor: pointer; text-align: center; transition: border-color .12s, color .12s, background .12s; }
.gn-die-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-subtle); }
.gn-die-result { font-size: 36px; font-weight: 900; font-family: var(--font-mono); text-align: center; color: var(--primary); min-height: 46px; letter-spacing: -1px; }
.gn-die-label { font-size: 10px; color: var(--text-faint); text-align: center; margin-bottom: 8px; }
.gn-roll-history { font-size: 10px; color: var(--text-faint); margin-top: 6px; line-height: 1.7; max-height: 52px; overflow-y: auto; }
.gn-coin-face { font-size: 44px; text-align: center; display: block; cursor: pointer; transition: transform .2s; user-select: none; }
.gn-coin-face:hover { transform: scale(1.08); }
.gn-coin-label { font-size: 14px; font-weight: 700; color: var(--text); text-align: center; min-height: 20px; }
.gn-coin-tally { font-size: 10px; color: var(--text-faint); text-align: center; margin: 3px 0 10px; min-height: 14px; }
.gn-timer-presets { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.gn-timer-preset { padding: 3px 8px; border-radius: 5px; border: 0.5px solid var(--border-strong); background: var(--surface-alt); color: var(--text-muted); font-size: 10px; font-weight: 600; cursor: pointer; transition: border-color .12s, color .12s, background .12s; }
.gn-timer-preset.on { border-color: var(--primary); color: var(--primary); background: var(--primary-subtle); }
.gn-timer-bar { height: 3px; background: var(--surface-inset); border-radius: 2px; margin-bottom: 3px; overflow: hidden; }
.gn-timer-fill { height: 100%; background: var(--primary); border-radius: 2px; transition: width .5s linear; }
.gn-timer-time { font-size: 30px; font-weight: 900; font-family: var(--font-mono); text-align: center; color: var(--text); letter-spacing: -1px; margin-bottom: 10px; }
.gn-rng-result { font-size: 44px; font-weight: 900; font-family: var(--font-mono); text-align: center; color: var(--primary); min-height: 56px; letter-spacing: -1px; }
.gn-wgf-result { font-size: 20px; font-weight: 900; color: var(--primary); text-align: center; min-height: 28px; margin-bottom: 4px; letter-spacing: -.3px; }
.gn-wgf-sub { font-size: 10px; color: var(--text-faint); text-align: center; min-height: 14px; margin-bottom: 10px; }
.gn-quick-btns { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.gn-quick-result { text-align: center; font-size: 14px; font-weight: 700; color: var(--text); min-height: 20px; margin-top: 8px; }

/* Calculator */
.calc-display {
  padding: 16px 14px 8px; font-size: 28px; font-weight: 300;
  font-family: var(--font-mono); text-align: right;
  color: var(--text); overflow: hidden; white-space: nowrap;
  text-overflow: ellipsis;
}
.calc-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 4px; padding: 8px 10px 10px;
}
.calc-btn {
  height: 38px; border-radius: var(--radius-sm);
  background: var(--surface-alt); border: 0.5px solid var(--border);
  color: var(--text); font-size: 15px; font-family: var(--font-body);
  cursor: pointer; transition: background .1s, transform .1s;
}
.calc-btn:hover { background: var(--surface-inset); }
.calc-btn:active { transform: scale(.95); }
.calc-fn { color: var(--text-muted); }
.calc-op { background: var(--primary-subtle); color: var(--primary); border-color: color-mix(in srgb, var(--primary) 20%, transparent); }
.calc-op:hover { background: color-mix(in srgb, var(--primary) 22%, transparent); }
.calc-eq { background: var(--primary); color: #fff; border-color: var(--primary); }
.calc-eq:hover { background: var(--primary-hover, #c4922a); }
.calc-zero { grid-column: span 2; }

/* Scratch pad */
.qt-notepad {
  width: 100%; height: 200px; padding: 12px 14px;
  background: var(--surface); color: var(--text); border: none; outline: none;
  font-family: var(--font-body); font-size: 13px; line-height: 1.6;
  resize: vertical;
}

/* Timer */
.timer-display {
  text-align: center; font-size: 36px; font-weight: 300;
  font-family: var(--font-mono); padding: 20px 14px 12px; color: var(--text);
}
.timer-controls {
  display: flex; gap: 8px; justify-content: center; padding: 0 14px 16px;
}
body.drawer-open .qt-panels { display: none !important; }

@media (max-width: 1200px) {
  .main { margin-right: 0; }
  .search-center { right: 0; }
  .qt-panels { display: none !important; }
}

@media (max-width: 900px) {
  .stat-row.cols4 { grid-template-columns: repeat(2, 1fr); }
  .three-col { grid-template-columns: repeat(2, 1fr); }
  .two-col-wide { grid-template-columns: 1fr; }
  /* .hero-grid, .hero-stats, .hero-stat, .hero-actions, .hero-meta responsive overrides
     — handled in app-v2.html inline block @media (max-width: 767px). */
  .hero-spark-full { grid-column: 1 / -1; }
}

@media (max-width: 910px) {
  .two-col-even { grid-template-columns: 1fr; }
  /* .hero-body responsive — handled in app-v2.html inline block. */
  .content { padding: 18px 20px 32px; }
  .ctx-bar  { padding: 16px 20px 0; }
  .tabs     { padding: 0 20px; }
}

@media (max-width: 768px) {
  /* Vision board masonry → 2 columns */
  #vb-board { columns: 2 !important; column-gap: 10px !important; }
  /* Photo grid smaller cells */
  #photos-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important; }
  /* Debt cards single column */
  #debt-cards { grid-template-columns: 1fr !important; }
  /* Vehicles single column */
  #vehicles-grid { grid-template-columns: 1fr !important; }
  /* Chores grid */
  #chores-grid { grid-template-columns: 1fr !important; }
  html, body { height: 100%; overflow: hidden; }
  /* v2 layout uses flexbox — no fixed topbar, no body padding needed */
  .layout {
    flex: 1; overflow-y: auto; overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    margin-top: 0;
    min-height: 0;
  }
  .mob-nav {
    display: flex;
    position: static;
    flex-shrink: 0;
    height: 60px;
  }
  /* topbar padding/gap handled by app-v2.html */
  .logo { min-width: 0; margin-right: 0; gap: 6px; font-size: 13px; }
  .logo span:not(.logo-mark) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 90px; }
  .topbar-right { gap: 4px; }
  .icon-btn { width: 30px; height: 30px; }
  .search-center { display: none; }
  .mob-menu-btn { display: flex !important; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform .22s cubic-bezier(.4,0,.2,1);
    z-index: 260; top: 54px;
    box-shadow: 4px 0 24px rgba(0,0,0,.3);
  }
  .sidebar.mob-open { transform: translateX(0); }
  .mob-sb-overlay { display: block; }
  .main { margin-left: 0; }
  body.drawer-open .main { margin-right: 0; }
  .qt-bar { display: none; }
  .page.active { max-width: 100%; }
  .ctx-bar { padding: var(--space-md) var(--space-md) 0; }
  .content { padding: var(--space-md); }
  /* .hero, .hero-body, .hero-grid, .hero-stats, .hero-stat, .hero-kpi, .hero-kpi-sub,
     .hero-actions, .hero-meta responsive overrides — handled in app-v2.html inline block. */
  .hero-spark-full { grid-column: 1 / -1; }
  .two-col-wide, .two-col-even { grid-template-columns: 1fr !important; }
  .stat-row.cols4 { grid-template-columns: repeat(2, 1fr); }
  .stat-row.cols3 { grid-template-columns: repeat(2, 1fr); }
  .three-col { grid-template-columns: 1fr !important; }
  .tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tbl { min-width: 520px; }
  /* Card is the scroll container; table renders as normal table inside */
  .card { overflow-x: auto; overflow-y: hidden; }
  .card table.tbl { display: table; overflow-x: visible; min-width: 520px; }
  /* Sticky actions column pins to card's right scroll edge */
  .tbl th:last-child,
  .tbl td:last-child {
    position: sticky; right: 0; z-index: 2;
    background: var(--surface);
    border-left: 0.5px solid var(--border);
    box-shadow: -3px 0 6px rgba(0,0,0,.15);
    text-align: right; padding-right: 10px; padding-left: 8px;
    min-width: 60px;
  }
  .tbl tbody tr:hover td:last-child { background: var(--surface-alt); }
  .tabs { overflow-x: auto; white-space: nowrap; }
  .card-body { padding: var(--card-pad); }
  .card-head { padding: var(--card-pad) var(--card-pad) 0; }
  .card > div:first-child:has(.input) { padding: var(--card-pad) var(--card-pad) 0; }
  .action-grid { grid-template-columns: repeat(3, 1fr); }
  .drawer { width: 100% !important; max-width: 100% !important; border-left: none; }
  .drawer.drawer-wide { width: 100% !important; max-width: 100% !important; }

  /* ── Line items: mobile card view ── */
  .drawer table[style*="border-collapse"] { display: block !important; width: 100% !important; }
  .drawer table[style*="border-collapse"] > thead { display: none !important; }
  .drawer table[style*="border-collapse"] > tbody { display: block !important; width: 100% !important; }
  .inv-line, .est-line { display: block !important; width: 100% !important; }
  /* Hide desktop input cells on mobile */
  .inv-line .line-desk, .est-line .line-desk { display: none !important; }
  /* Show mobile card */
  .line-mob {
    display: block !important;
    padding: 12px 14px;
    background: var(--surface-alt, var(--surface));
    border: 0.5px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color 0.15s;
  }
  .line-mob:active { border-color: var(--primary); }
  .line-mob-desc {
    font-size: 13px; line-height: 1.45; color: var(--text);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden; margin-bottom: 3px; word-break: break-word;
    white-space: pre-wrap;
  }
  .line-mob-desc.line-mob-empty {
    color: var(--text-muted); font-style: italic;
  }
  .line-mob-labels {
    display: flex; align-items: center; gap: 8px;
    font-size: 10px; font-weight: 700; color: var(--text-faint);
    text-transform: uppercase; letter-spacing: 0.8px;
    padding-top: 6px; border-top: 0.5px solid var(--border);
    margin-top: 6px;
  }
  .line-mob-labels span:last-child { margin-left: auto; padding-right: 28px; }
  .line-mob-meta {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: var(--text-muted);
    font-family: var(--font-mono);
    margin-top: 2px;
  }
  .line-mob-amt {
    margin-left: auto; font-weight: 700; color: var(--text);
  }
  .line-mob-x {
    background: none; border: none; color: var(--accent-red);
    font-size: 16px; cursor: pointer; padding: 10px 12px; line-height: 1;
    margin-left: 4px; min-height: 44px; min-width: 44px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .drawer-foot { flex-wrap: wrap; }
  .btn-primary, .btn-ghost {
    min-height: 44px; padding-left: 18px; padding-right: 18px;
  }
  .icon-btn { width: 44px; height: 44px; }
  .sb-item { min-height: 44px; }
  .tab { min-height: 44px; display: inline-flex; align-items: center; }
  .tab-btn { min-height: 44px; display: inline-flex; align-items: center; }
  .mob-nav-item { min-height: 44px; }
  .ctx-pop-item { min-height: 44px; }
  .toggle { width: 44px; height: 26px; }
  .toggle-track { border-radius: 13px; }
  .toggle-thumb { top: 4px; left: 4px; width: 18px; height: 18px; }
  .toggle input:checked ~ .toggle-thumb { transform: translateX(18px); }
}

@media (max-width: 480px) {
  .stat-row.cols4,
  .stat-row.cols3 { grid-template-columns: 1fr; }
  /* .hero-body, .hero-kpi, .hero-actions responsive overrides — handled in app-v2.html inline block. */
  .chips { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .tbl { font-size: 12px; }
  .tbl th, .tbl td { padding: 6px 8px; }
  /* .card, .card-body, .card-head mobile padding — set in @768px block above, no need to repeat */
  .tab { font-size: 12px; padding: 6px 10px; }
  .budget-row { padding: 8px 0; gap: 6px; }
  .bar-row { gap: 8px; }
  .bar-row .bar-val { font-size: 12px; }
  .action-grid { grid-template-columns: repeat(2, 1fr); }
  .search-bar { max-width: 100%; }
  .search-bar input { font-size: 13px; }
  /* Vision board masonry → 1 column on phone */
  #vb-board { columns: 1 !important; }
  /* Photo grid → 2 columns on phone */
  #photos-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 6px !important; }
  /* Notification panel — fixed center on mobile */
  .notif-panel {
    position: fixed; top: 60px; left: 12px; right: 12px;
    width: auto; max-width: 400px; margin: 0 auto;
    max-height: calc(100dvh - 120px);
    transform-origin: top center;
  }
  .notif-backdrop.open { background: rgba(0,0,0,.4); }
  /* Drawer field-rows — stack vertically on narrow screens */
  .field-row { grid-template-columns: 1fr; }
  .field-row-3 { grid-template-columns: 1fr; }
  /* Timesheet task rows — stack on narrow screens */
  .ts-task-row { grid-template-columns: 1fr; }
  /* Toolbox: category filter pills — horizontal scroll, no wrap */
  #toolbox-cat-chips {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  #toolbox-cat-chips::-webkit-scrollbar { display: none; }
  /* Toolbox: tool card grid — bleed 4px into main padding so cards sit ~12px from screen edge */
  #toolbox-all {
    margin-left: -4px;
    margin-right: -4px;
  }
}

/* ── 360px – Small phones ── */
@media (max-width: 360px) {
  /* .hero-stats, .hero-stat-val, .hero-stat-label, .hero-kpi, .hero-body responsive overrides
     — handled in app-v2.html inline block. */
  #toolbox-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .content { padding: 10px 12px; }
  .ctx-bar { padding: 10px 12px 0; }
}

/* .dr-select, .dr-select:focus — defined in app-v2.html inline block. */
.dr-select:hover { border-color: var(--border-strong); }
.dr-select:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

/* Density picker */
.density-row { display: flex; gap: 8px; }
.density-opt {
  flex: 1; padding: 10px 8px; border-radius: var(--radius-sm);
  border: 0.5px solid var(--border); cursor: pointer;
  text-align: center; transition: background .12s, border-color .12s; user-select: none;
}
.density-opt:hover { border-color: var(--border-strong); background: var(--surface-alt); }
.density-opt.sel { border-color: var(--primary); background: var(--primary-subtle); }
.density-icon { font-size: 18px; margin-bottom: 5px; }
.density-lbl { font-size: 11px; font-weight: 500; color: var(--text-muted); }
.density-opt.sel .density-lbl { color: var(--primary); }

/* ── Nav group toggle ── */
.sb-nav-group.hidden { display: none; }

/* ────────────────────────────────
   SCHEDULE VIEW (week + day panels)
   These classes are used by _renderWeek() and _renderDay() in schedule.js.
   The schedule editor itself (sched-*) is in app-v2.html.
──────────────────────────────── */

/* Day card — one card per day in week view */
.sv-day {
  background: var(--surface-inset);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: var(--space-sm);
}
.sv-day:last-child { margin-bottom: 0; }

/* Day header row */
.sv-day-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-ms) var(--space-md);
  border-bottom: 0.5px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
  transition: background var(--duration);
}
.sv-day-name {
  font-family: var(--font-heading); font-size: 13px; font-weight: 700;
  color: var(--text);
}
.sv-day-name.is-today { color: var(--primary); }
.sv-day-meta {
  font-size: 11px; color: var(--text-faint);
  font-family: var(--font-mono);
}

/* Day body */
.sv-day-body { padding: var(--space-sm) var(--space-md); }

/* Project label inside day body */
.sv-proj-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--accent-teal);
  padding: var(--space-sm) 0 var(--space-xs);
}
.sv-proj-label:first-child { padding-top: var(--space-xs); }

/* Employee row: name left, time right — compact */
.sv-emp-row {
  display: flex; align-items: center;
  padding: 5px 4px; margin: 0 -4px;
  border-top: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background var(--duration);
}
.sv-emp-row:hover { background: var(--surface-alt); }
.sv-emp-row:first-of-type { border-top: none; }
.sv-day-head:hover { background: var(--surface-alt); }
.sv-day-empty { padding: var(--space-sm) 0; font-size: 13px; color: var(--text-faint); transition: color var(--duration); }
.sv-day-empty:hover { color: var(--primary); }
.sv-emp-dot {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface-alt);
  border: 0.5px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  flex-shrink: 0; margin-right: var(--space-sm);
  font-family: var(--font-heading);
}
.sv-emp-name {
  flex: 1; font-size: 13px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}
.sv-emp-time {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-faint); flex-shrink: 0;
  margin-left: var(--space-sm);
}

/* ── Day view: expandable project cards ── */
.sv-proj-card {
  background: var(--surface-inset);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: var(--space-sm);
}
.sv-proj-card:last-child { margin-bottom: 0; }

/* Clickable project header */
.sv-proj-head {
  display: flex; align-items: center;
  padding: var(--space-ms) var(--space-md);
  cursor: pointer;
  background: var(--surface);
  transition: background var(--duration);
  min-height: 52px;
  user-select: none;
}
.sv-proj-head:hover { background: var(--surface-alt); }
.sv-proj-info { flex: 1; min-width: 0; }
.sv-proj-title {
  font-family: var(--font-heading); font-size: 14px; font-weight: 700;
  color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sv-proj-sub {
  font-size: 11px; color: var(--text-muted); margin-top: 2px;
}
.sv-proj-chevron {
  font-size: 15px; color: var(--text-faint); flex-shrink: 0;
  transition: transform var(--duration);
  margin-left: var(--space-sm);
  line-height: 1;
}

/* Expanded state — toggle via JS class */
.sv-proj-card.expanded .sv-proj-chevron { transform: rotate(90deg); }
.sv-proj-body {
  display: none;
  border-top: 0.5px solid var(--border);
}
.sv-proj-card.expanded .sv-proj-body { display: block; }

/* Employee entry inside expanded project */
.sv-entry {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 0.5px solid var(--border);
}
.sv-entry:last-child { border-bottom: none; }
.sv-entry-head {
  display: flex; align-items: center;
  margin-bottom: 0;
}
/* Reuse sv-emp-dot + sv-emp-name + sv-emp-time inside entries */

/* Job sub-row inside an entry */
.sv-job-label {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  margin: var(--space-xs) 0 var(--space-xs) 30px;
}

/* Task list */
.sv-task {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: 3px 0 3px 30px;
  font-size: 12px; color: var(--text);
}
.sv-task.done { color: var(--text-faint); }
.sv-task-check {
  width: 14px; height: 14px; flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 8px; color: transparent;
}
.sv-task.done .sv-task-check {
  background: var(--accent-green-soft);
  border-color: var(--accent-green);
  color: var(--accent-green);
}

/* Day view date line */
.sv-date-line {
  font-size: 12px; color: var(--text-muted);
  margin-bottom: var(--space-sm);
  font-family: var(--font-heading);
}

/* Mobile: give employee dot and time a comfortable touch area */
@media (max-width: 767px) {
  .sv-emp-row { padding: 7px 0; }
  .sv-proj-head { min-height: 56px; }
  .sv-task { padding-left: 0; font-size: 12px; }
  .sv-job-label { margin-left: 0; }
}

/* ── Auth loading overlay ── */
#auth-loading {
  position: fixed; inset: 0; z-index: 1100;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.auth-spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--surface-inset);
  border-top-color: var(--primary);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════
   PRINT STYLES
   ══════════════════════════════════════════════════ */

@page { margin: 0.5in; }

@media print {

  /* ── 1. Hide non-printable chrome ─────────────── */
  .sidebar,
  .mob-nav,
  .mob-sb-overlay,
  .ctx-bar,
  .hero-glow,
  .hero-orb,
  .hero-actions,
  .btn-primary,
  .btn-ghost,
  .icon-btn,
  .drawer-overlay,
  .search-bar,
  .search-center,
  .tabs,
  .chips,
  .topbar,
  .toast-wrap,
  .qt-bar,
  .qt-panels,
  .mob-menu-btn,
  #auth-loading,
  .toggle,
  .action-grid { display: none !important; }

  /* ── 2. General print optimisation ────────────── */
  *, *::before, *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transition: none !important;
    animation: none !important;
  }

  html, body {
    height: auto !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 12pt;
    line-height: 1.45;
  }

  body {
    display: block !important;
    padding-top: 0 !important;
  }

  /* Show only the active page, full width */
  .layout {
    margin: 0 !important;
    overflow: visible !important;
    height: auto !important;
  }
  .main {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
  .page { display: none !important; }
  .page.active {
    display: block !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  .content {
    padding: 0 !important;
    max-width: 100% !important;
  }

  /* ── Hero section: hide decoration, keep data ── */
  .hero {
    margin: 0 0 12pt !important;
    border: none !important;
    border-radius: 0 !important;
  }
  .hero-body {
    padding: 8pt 0 !important;
  }
  .hero-kpi,
  .hero-kpi-sub,
  .hero-stat-val,
  .hero-stat-lbl,
  .hero-section-label,
  .hero-meta {
    color: #000 !important;
    filter: none !important;
    opacity: 1 !important;
  }
  .hero-grid {
    grid-template-columns: 1fr !important;
  }
  .hero-stats {
    display: flex !important;
    gap: 16pt !important;
    flex-wrap: wrap;
  }

  /* ── Cards ──────────────────────────────────────── */
  .card {
    border: 0.5px solid #ccc !important;
    border-radius: 4pt !important;
    padding: 8pt !important;
    margin-bottom: 10pt;
    page-break-inside: avoid;
    overflow: visible !important;
  }
  .card-head {
    padding: 0 0 6pt !important;
    border-bottom: 0.5px solid #ddd !important;
  }
  .card-body {
    padding: 6pt 0 !important;
  }

  /* ── Stat cards ─────────────────────────────────── */
  .stat-row {
    display: flex !important;
    gap: 10pt !important;
    flex-wrap: wrap;
    page-break-inside: avoid;
    margin-bottom: 10pt;
  }
  .stat-row.cols4 { grid-template-columns: repeat(4, 1fr) !important; }
  .stat-row.cols3 { grid-template-columns: repeat(3, 1fr) !important; }
  .stat-card {
    flex: 1 1 0 !important;
    border: 0.5px solid #ccc !important;
    border-radius: 4pt !important;
    padding: 8pt !important;
    page-break-inside: avoid;
  }
  .stat-card-val {
    color: #000 !important;
    filter: none !important;
  }

  /* ── Tables ─────────────────────────────────────── */
  .tbl-wrap {
    overflow: visible !important;
  }
  .tbl {
    width: 100% !important;
    min-width: 0 !important;
    border-collapse: collapse !important;
    font-size: 10pt !important;
  }
  .tbl th,
  .tbl td {
    border: 0.5px solid #bbb !important;
    padding: 4pt 6pt !important;
    color: #000 !important;
    position: static !important;
    box-shadow: none !important;
    background: transparent !important;
  }
  .tbl th {
    font-weight: 700 !important;
    border-bottom: 2px solid #666 !important;
  }
  .tbl thead { display: table-header-group; }
  .tbl tr { page-break-inside: avoid; }

  /* ── Multi-column layouts ───────────────────────── */
  .two-col-wide,
  .two-col-even,
  .three-col {
    display: block !important;
  }

  /* ── Bar charts (reports) ───────────────────────── */
  .bar-list {
    page-break-inside: avoid;
  }
  .bar-row {
    page-break-inside: avoid;
  }
  .bar-track {
    border: 0.5px solid #ccc !important;
  }
  .bar-fill {
    background: #666 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .bar-val {
    color: #000 !important;
  }
  .bar-lbl {
    color: #000 !important;
  }

  /* ── 3. Invoice / Estimate drawer print ─────── */
  .drawer {
    display: none !important;
  }
  .drawer.open {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
    z-index: auto !important;
  }
  /* When an invoice drawer is open, hide the page behind it */
  body.drawer-open .page.active {
    display: none !important;
  }
  body.drawer-open .main {
    margin: 0 !important;
  }
  .drawer-head {
    border-bottom: 0.5px solid #ccc !important;
    padding: 0 0 8pt !important;
    margin-bottom: 10pt;
  }
  .drawer-head .icon-btn,
  .drawer-head button {
    display: none !important;
  }
  .drawer-body {
    padding: 0 !important;
    overflow: visible !important;
    height: auto !important;
  }
  .drawer-foot {
    display: none !important;
  }
  /* Invoice line-items table */
  .drawer .tbl th,
  .drawer .tbl td {
    border: 0.5px solid #aaa !important;
    padding: 4pt 6pt !important;
  }

  /* ── 4. Links — show URLs after text ────────────── */
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555 !important;
    word-break: break-all;
  }
  a[href^="#"]::after,
  a[href^="javascript"]::after {
    content: "";
  }

  /* ── 5. Budget rows ─────────────────────────────── */
  .budget-row {
    page-break-inside: avoid;
  }
  .budget-bar-track {
    border: 0.5px solid #ccc !important;
  }
  .budget-bar-fill {
    background: #888 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* ── 6. Page break helpers ──────────────────────── */
  h1, h2, h3, h4 {
    page-break-after: avoid;
  }
  .card-title {
    page-break-after: avoid;
  }

}

/* ── Contextual Help Tooltips ─────────────────────────────────────────────── */

.tip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  font-family: system-ui, sans-serif;
  line-height: 1;
  color: var(--text-muted);
  background: transparent;
  border: 1.5px solid var(--text-faint);
  border-radius: 50%;
  cursor: help;
  vertical-align: middle;
  margin-left: 4px;
  position: relative;
  top: -1px;
  transition: color .15s, border-color .15s, background .15s;
  user-select: none;
  flex-shrink: 0;
  opacity: 0.75;
}
.tip-icon:hover {
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 60%, transparent);
  background: var(--primary-subtle);
  opacity: 1;
}

.tip-popup {
  position: absolute;
  z-index: 9999;
  width: 280px;
  background: var(--surface-alt);
  border: 0.5px solid var(--border-strong);
  border-radius: 10px;
  padding: 14px 16px 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.55), 0 2px 8px rgba(0,0,0,.3);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text);
  display: none;
  opacity: 0;
  transition: opacity .15s ease;
  pointer-events: auto;
}

.tip-popup-title {
  font-weight: 700;
  font-size: 12px;
  color: var(--text);
  margin-bottom: 3px;
  padding-right: 20px;
  line-height: 1.3;
}

.tip-popup-body {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

.tip-popup-use {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 0.5px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.5;
}

.tip-popup-use-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--primary);
  margin-bottom: 2px;
  margin-right: 2px;
}

.tip-popup-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  transition: color .15s;
}
.tip-popup-close:hover { color: var(--text); }

[data-theme="light"] .tip-popup {
  box-shadow: 0 8px 32px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.08);
}
[data-theme="light"] .tip-popup-use-label { color: var(--primary); }

/* ════════════════════════════════════════════════════════
   KIDS MANAGE — Child Cards
   ════════════════════════════════════════════════════════ */

.km-child-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 0;
  margin-bottom: 14px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s ease;
  overflow: hidden;
}
.km-child-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.km-child-card:active {
  transform: scale(0.98);
  transition-duration: 0.1s;
}

.km-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 12px;
}
.km-avatar {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-pink), color-mix(in srgb, var(--accent-pink) 85%, #000));
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff; font-weight: 700;
  box-shadow: 0 3px 10px color-mix(in srgb, var(--accent-pink) 25%, transparent);
}
.km-card-name-block { flex: 1; min-width: 0; }
.km-card-name { font-weight: 700; font-size: 16px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.km-card-sub { font-size: 11px; color: var(--text-faint); margin-top: 1px; }
.km-card-actions { display: flex; gap: 4px; flex-shrink: 0; }
.km-btn-sm { font-size: 11px !important; padding: 4px 10px !important; }
.km-btn-danger { color: var(--accent-red) !important; }

.km-stats-row {
  display: flex;
  gap: 6px;
  padding: 0 14px 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.km-stats-row::-webkit-scrollbar { display: none; }
.km-pill {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center;
  padding: 6px 14px;
  border-radius: 12px;
  background: var(--surface-alt);
  border: 0.5px solid var(--border);
  min-width: 64px;
}
.km-pill-val {
  font-size: 15px; font-weight: 700; color: var(--text);
  white-space: nowrap;
}
.km-pill-label {
  font-size: 9px; font-weight: 600; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: 0.04em; margin-top: 1px;
}

.km-xp-row {
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px 10px;
}
.km-xp-track {
  flex: 1; height: 10px; background: var(--surface-alt); border-radius: 5px; overflow: hidden;
}
.km-xp-fill {
  height: 100%; border-radius: 5px;
  background: linear-gradient(90deg, var(--accent-pink), color-mix(in srgb, var(--accent-pink) 85%, #000));
  transition: width 0.4s ease;
}
.km-xp-label { font-size: 11px; color: var(--text-faint); white-space: nowrap; font-weight: 600; }

.km-card-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px;
  border-top: 0.5px solid var(--border);
  font-size: 10px; color: var(--text-faint);
  background: var(--surface-alt);
}
.km-card-arrow { font-size: 16px; font-weight: 700; }

/* ── Tab bar ── */
.km-tabs {
  display: flex; overflow-x: auto; scrollbar-width: none; gap: 4px;
  padding: 0 0 12px; margin-bottom: 12px; border-bottom: 2px solid var(--border);
  -webkit-overflow-scrolling: touch;
}
.km-tabs::-webkit-scrollbar { display: none; }
.km-tab {
  flex: 0 0 auto; padding: 8px 16px; border-radius: 12px 12px 0 0;
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  cursor: pointer; transition: color 0.2s, background 0.2s, border-color 0.2s; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.km-tab:hover { color: var(--text); background: var(--surface-alt); }
.km-tab.active { color: var(--accent-pink); border-bottom-color: var(--accent-pink); background: color-mix(in srgb, var(--accent-pink) 5%, transparent); }
.km-tab-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-pink), color-mix(in srgb, var(--accent-pink) 85%, #000));
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; color: #fff; font-weight: 700;
}
.km-tab-add { color: var(--text-faint); border-style: dashed; border-bottom-style: solid; }
.km-tab-add:hover { color: var(--accent-pink); }

/* Responsive: stack actions below name on small screens */
@media (max-width: 520px) {
  .km-card-top { flex-wrap: wrap; }
  .km-card-actions { width: 100%; justify-content: flex-end; margin-top: -4px; }
  .km-stats-row { gap: 4px; }
  .km-pill { padding: 5px 10px; min-width: 56px; }
  .km-pill-val { font-size: 13px; }
}

/* ────────────────────────────────
   3D ASSET BROWSER
──────────────────────────────── */
#page-assets.active { max-width: 1080px; }

.asset-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 32px; border-bottom: 0.5px solid var(--border);
  gap: 12px;
}
.asset-breadcrumb { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-toolbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.asset-count { font-size: 11px; color: var(--text-faint); }
.asset-view-btn { padding: 4px 6px !important; min-width: 0 !important; }
.asset-view-btn.active { color: var(--accent-teal); background: var(--accent-teal-soft); }

/* ── Grid view ── */
.asset-grid {
  padding: 20px 32px; overflow-y: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px; align-content: start;
}

.asset-card {
  background: var(--surface-alt, var(--surface)); border: 0.5px solid var(--border);
  border-radius: 10px; cursor: pointer; transition: border-color .15s, transform .12s;
  overflow: hidden;
}
.asset-card:hover { border-color: var(--accent-teal); transform: translateY(-2px); }
.asset-card-thumb {
  width: 100%; aspect-ratio: 1; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; color: var(--text-faint); overflow: hidden;
  position: relative;
}
.asset-card-thumb canvas { width: 100%; height: 100%; display: block; }
.asset-card-info { padding: 8px 10px; }
.asset-card-name { font-size: 11px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-card-cat { font-size: 10px; color: var(--text-faint); margin-top: 2px; }
.asset-card-badges { display: flex; gap: 3px; margin-top: 4px; }
.asset-card-badges .badge { font-size: 10px; padding: 1px 5px; }

/* ── Detail / viewport view ── */
.asset-detail {
  flex: 1; display: flex; min-height: 0;
}
.asset-viewport-wrap {
  flex: 1; display: flex; flex-direction: column; min-width: 0;
  background: var(--bg);
}
.asset-viewport-wrap canvas {
  flex: 1; width: 100%; display: block;
}
.asset-viewport-bar {
  display: flex; align-items: center; gap: 12px; padding: 8px 16px;
  border-top: 0.5px solid var(--border); font-size: 11px; color: var(--text-faint);
}
.asset-info-dims, .asset-info-polys { font-family: var(--font-mono); }

.asset-detail-sidebar {
  width: 280px; min-width: 280px; border-left: 0.5px solid var(--border);
  padding: 20px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px;
}
.asset-detail-name { font-size: 16px; font-weight: 700; color: var(--text); }
.asset-detail-category { font-size: 11px; color: var(--accent-teal); }
.asset-detail-tags { display: flex; gap: 4px; flex-wrap: wrap; }

.asset-param-panel { display: flex; flex-direction: column; gap: 12px; }
.asset-param-group { }
.asset-param-label { font-size: 11px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.asset-param-row {
  display: flex; align-items: center; gap: 8px;
}
.asset-param-row input[type="range"] { flex: 1; accent-color: var(--accent-teal); }
.asset-param-row input[type="number"] {
  width: 56px; padding: 4px 6px; border: 0.5px solid var(--border-strong); border-radius: 6px;
  background: var(--surface-inset, var(--surface-alt)); color: var(--text); font-size: 11px;
  font-family: var(--font-mono); text-align: right;
}
.asset-param-row select {
  flex: 1; padding: 5px 8px; border: 0.5px solid var(--border-strong); border-radius: 6px;
  background: var(--surface-inset, var(--surface-alt)); color: var(--text); font-size: 11px;
}

.asset-export-bar { margin-top: auto; padding-top: 12px; border-top: 0.5px solid var(--border); }

.asset-back-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; border: 0.5px solid var(--border-strong); border-radius: 8px;
  background: var(--surface-alt, var(--surface)); color: var(--text-muted);
  font-size: 11px; cursor: pointer; transition: color .12s, border-color .12s;
  margin: 12px 24px 0;
}
.asset-back-btn:hover { color: var(--accent-teal); border-color: var(--accent-teal); }

/* Palette swatches */
.asset-palette-row { display: flex; gap: 6px; flex-wrap: wrap; }
.asset-palette-swatch {
  width: 28px; height: 28px; border-radius: 6px; cursor: pointer;
  border: 2px solid transparent; transition: border-color .12s;
}
.asset-palette-swatch:hover, .asset-palette-swatch.active { border-color: var(--accent-teal); }

/* Favorite button on card */
.asset-fav-btn {
  position: absolute; top: 6px; right: 6px;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0,0,0,.45); border: none; color: rgba(255,255,255,.5);
  font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .15s, color .12s, background .12s;
  z-index: 2; line-height: 1;
}
.asset-card:hover .asset-fav-btn { opacity: 1; }
.asset-fav-btn.active { opacity: 1; color: var(--accent-pink); background: color-mix(in srgb, var(--accent-pink) 15%, transparent); }
.asset-fav-btn:hover { color: var(--accent-pink); background: color-mix(in srgb, var(--accent-pink) 20%, transparent); }

/* Collection menu */
.asset-col-menu {
  background: var(--surface-alt, var(--surface)); border: 0.5px solid var(--border-strong);
  border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.3);
  min-width: 180px; padding: 6px 0; z-index: 100;
  right: 0; top: 100%; margin-top: 4px;
}
.asset-col-menu-title {
  padding: 6px 12px; font-size: 11px; font-weight: 600; color: var(--text-muted);
  border-bottom: 0.5px solid var(--border); margin-bottom: 2px;
}
.asset-col-menu-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px;
  font-size: 12px; color: var(--text); cursor: pointer; transition: background .1s;
}
.asset-col-menu-item:hover { background: var(--accent-teal-soft); }
.asset-col-menu-item.in-col { color: var(--accent-teal); }
.asset-col-menu-item.new { color: var(--text-muted); font-style: italic; }
.asset-col-menu-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* Drawer fav button active state */
#asset-drawer-fav.active { color: var(--accent-pink) !important; }

/* Source badge on card */
.asset-card-source {
  position: absolute; bottom: 6px; left: 6px;
  font-size: 9px; padding: 2px 6px; border-radius: 4px;
  background: var(--accent-teal-soft); color: var(--accent-teal); font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
}

/* Tab bar + panels for dashboard */
#page-assets .tab-bar {
  display: flex; gap: 0; padding: 0 32px; border-bottom: 0.5px solid var(--border);
}
#page-assets .tab {
  padding: 10px 18px; font-size: 12px; font-weight: 600; color: var(--text-faint);
  background: none; border: none; border-bottom: 2px solid transparent;
  cursor: pointer; transition: color .12s, border-color .12s;
}
#page-assets .tab:hover { color: var(--text); }
#page-assets .tab.active { color: var(--accent-teal); border-bottom-color: var(--accent-teal); }
#page-assets .tab-panel { display: none; }
#page-assets .tab-panel.active { display: block; }

/* Collection cards */
.asset-collection-card {
  background: var(--surface-alt, var(--surface)); border: 0.5px solid var(--border);
  border-radius: 10px; padding: 16px; margin-bottom: 10px;
  transition: border-color .15s;
}
.asset-collection-card:hover { border-color: var(--accent-teal); }
.asset-col-card-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.asset-col-card-name { font-size: 14px; font-weight: 600; color: var(--text); }
.asset-col-card-count { font-size: 11px; color: var(--text-faint); }
.asset-col-card-previews { display: flex; gap: 6px; margin-bottom: 10px; }
.asset-col-card-preview {
  width: 40px; height: 40px; border-radius: 6px;
  background: var(--bg); border: 0.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.asset-col-card-preview.more { font-size: 11px; color: var(--text-faint); }
.asset-col-card-preview.empty { font-size: 10px; color: var(--text-faint); }
.asset-col-card-actions { display: flex; gap: 6px; }

/* Upload rows */
.asset-upload-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 0.5px solid var(--border);
}
.asset-upload-row:last-child { border-bottom: none; }
.asset-upload-thumb {
  width: 48px; height: 48px; border-radius: 8px; flex-shrink: 0;
  background: var(--bg); border: 0.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; overflow: hidden;
}
.asset-upload-info { flex: 1; min-width: 0; }
.asset-upload-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-upload-meta { font-size: 11px; color: var(--text-faint); margin-top: 2px; }
.asset-upload-actions { flex-shrink: 0; }

/* Empty state */
.asset-empty {
  grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 60px 20px; color: var(--text-faint); text-align: center;
}
.asset-empty-icon { font-size: 36px; margin-bottom: 12px; opacity: .4; }
.asset-empty-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; color: var(--text-muted); }
.asset-empty-sub { font-size: 12px; }

/* Loading skeleton for thumbnails */
.asset-card-thumb.loading {
  background: linear-gradient(90deg, var(--bg) 25%, var(--surface-alt, var(--surface)) 50%, var(--bg) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
/* shimmer removed — use shimmer */

/* ── Responsive ── */
@media (max-width: 900px) {
  .asset-detail { flex-direction: column; }
  .asset-detail-sidebar { width: 100%; min-width: 0; border-left: none; border-top: 0.5px solid var(--border); max-height: 280px; }
}
@media (max-width: 640px) {
  .asset-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); padding: 12px; }
}
@media (max-width: 480px) {
  .asset-toolbar { padding: 10px 16px; }
  .asset-grid { padding: 12px 16px; }
}

/* ── Autocomplete / Dropdown Engine ── */
.tf-ac-wrap { position: relative; }
.tf-ac-dropdown { position: absolute; left: 0; right: 0; top: 100%; z-index: 50;
  background: var(--surface); border: 0.5px solid var(--border-strong);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  max-height: 280px; overflow-y: auto; margin-top: 4px; display: none; }
.tf-ac-dropdown.open { display: block; }
.tf-ac-item { padding: 10px var(--space-md); cursor: pointer; display: flex;
  align-items: center; gap: var(--space-sm); font-size: 0.85rem; color: var(--text);
  border-bottom: 0.5px solid var(--border); transition: background 0.1s; }
.tf-ac-item:hover, .tf-ac-item.highlighted { background: var(--surface-alt); }
.tf-ac-item-icon { font-size: 14px; width: 20px; text-align: center; flex-shrink: 0; }
.tf-ac-item-label { flex: 1; min-width: 0; }
.tf-ac-item-sub { font-size: 0.72rem; color: var(--text-faint); display: block; margin-top: 1px; }
.tf-ac-match { color: var(--primary); font-weight: 600; }
.tf-ac-new { padding: 10px var(--space-md); cursor: pointer; display: flex;
  align-items: center; gap: var(--space-sm); font-size: 0.82rem; font-weight: 600;
  color: var(--primary); border-top: 0.5px solid var(--border-strong); }
.tf-ac-new:hover { background: var(--surface-alt); }
.tf-ac-empty { padding: var(--space-md); text-align: center; font-size: 0.8rem; color: var(--text-faint); }

/* ── Period Selector ── */
/* Hero action button — mobile only */
.hero-action-mobile { margin-left: auto; }
@media (min-width: 1025px) { .hero-action-mobile { display: none; } }
.period-selector-wrap { position: relative; }
.period-selector { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; color: var(--text-faint); background: none; border: 0.5px solid var(--border); border-radius: 6px; padding: 4px 10px; cursor: pointer; transition: border-color 0.15s, color 0.15s; position: relative; }
.period-selector::before { content: ''; position: absolute; inset: -8px -4px; }
.period-selector:hover { border-color: var(--primary); color: var(--text); }
.period-selector.active { border-color: var(--primary); color: var(--primary); }
.period-menu { position: absolute; top: calc(100% + 6px); right: 0; background: var(--surface); border: 0.5px solid var(--border); border-radius: 10px; overflow: hidden; z-index: 100; min-width: 160px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); display: none; }
.period-menu.open { display: block; }
.period-menu-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; font-size: 13px; font-weight: 500; color: var(--text); cursor: pointer; border-bottom: 0.5px solid var(--border); transition: background 0.1s; }
.period-menu-item:last-child { border-bottom: none; }
.period-menu-item:hover { background: var(--bg); }
.period-menu-item.active { color: var(--primary); font-weight: 600; }
.period-menu-item.active::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
