/* ── Design tokens — matched to precisionsigns.com.au staging ── */
:root {
  /* Brand colours */
  --brand-blue:    #0b6fd3;
  --brand-hover:   #095fb5;
  --brand-active:  #074f96;

  /* Dark surfaces — neutral scale from site */
  --bg-base:       #14171a;
  --bg-surface:    #1f2328;
  --bg-card:       #2f343a;
  --bg-input:      #252a31;
  --border:        #3a4048;
  --border-focus:  #0b6fd3;

  /* Text */
  --text-primary:  #f7f9fb;
  --text-secondary:#9fa7b0;
  --text-muted:    #6f7782;

  /* Accent = brand primary */
  --accent:        #0b6fd3;
  --accent-hover:  #095fb5;
  --accent-glow:   rgba(11,111,211,0.18);

  --danger:        #e04a4a;
  --success:       #3ecf8e;
  --warning:       #f5a623;

  --gold:          #c9a84c;
  --gold-light:    #e8c97a;

  --radius-sm:     4px;
  --radius:        8px;
  --radius-lg:     12px;
  --radius-xl:     16px;

  --shadow-sm:     0 1px 3px rgba(0,0,0,.4);
  --shadow:        0 4px 16px rgba(0,0,0,.5);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.6);

  /* Fonts — Inter Variable is the site's primary sans, Aller is the brand display font */
  --font-sans:     'Inter Variable', 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-display:  'Aller', 'Inter Variable', 'Inter', system-ui, sans-serif;
  --font-mono:     ui-monospace, 'Fira Code', monospace;

  --nav-h:         60px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(10,12,16,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 2rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .02em;
  color: var(--text-primary);
}
.nav-logo svg { color: var(--accent); }
.nav-logo-text {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  white-space: nowrap;
}
.nav-logo-text .sub {
  font-size: .75rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.nav-logo-text .sub::before {
  content: '·';
  margin-right: .4rem;
  color: var(--border);
}
.nav-logo span.sub {
  font-size: .75rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.nav-spacer { flex: 1; }
.nav-actions { display: flex; align-items: center; gap: .75rem; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: .875rem;
  font-weight: 500;
  line-height: 1;
  transition: all .15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-card); }
.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: .35rem .8rem; font-size: .8rem; }
.btn-lg { padding: .7rem 1.6rem; font-size: 1rem; }
.btn-gold {
  background: var(--gold);
  color: #0a0c10;
  border-color: var(--gold);
  font-weight: 600;
}
.btn-gold:hover { background: var(--gold-light); border-color: var(--gold-light); }
.btn:disabled { opacity: .45; pointer-events: none; }

/* ── Page layout ── */
.page { max-width: 1280px; margin: 0 auto; padding: 2rem; }
.page-sm { max-width: 860px; margin: 0 auto; padding: 2rem; }

/* ── Typography ── */
h1 { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.35rem; font-weight: 600; line-height: 1.3; }
h3 { font-size: 1.1rem; font-weight: 600; }
h4 { font-size: .95rem; font-weight: 600; }
.text-muted { color: var(--text-secondary); font-size: .875rem; }
.text-xs { font-size: .75rem; color: var(--text-muted); }
.label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: .35rem;
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.card-sm { padding: 1rem; }
.card + .card { margin-top: 1rem; }

/* ── Form inputs ── */
.form-group { margin-bottom: 1.25rem; }
.input, .textarea, .select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  padding: .55rem .85rem;
  font-size: .9rem;
  transition: border-color .15s ease, box-shadow .15s ease;
  outline: none;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
.select { appearance: none; cursor: pointer; }
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.input-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

/* ── Status badges ── */
.badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.badge-draft    { background: rgba(85,94,114,.25);   color: var(--text-secondary); border: 1px solid var(--border); }
.badge-review   { background: rgba(245,166,35,.15);  color: var(--warning);        border: 1px solid rgba(245,166,35,.3); }
.badge-sent     { background: rgba(74,108,247,.15);  color: var(--accent);         border: 1px solid rgba(74,108,247,.3); }
.badge-accepted { background: rgba(62,207,142,.15);  color: var(--success);        border: 1px solid rgba(62,207,142,.3); }
.badge-declined { background: rgba(224,74,74,.15);   color: var(--danger);         border: 1px solid rgba(224,74,74,.3); }

/* ── Dashboard table ── */
.proposals-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.proposals-table th {
  text-align: left;
  padding: .65rem 1rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.proposals-table td {
  padding: .9rem 1rem;
  border-bottom: 1px solid rgba(42,47,61,.5);
  vertical-align: middle;
}
.proposals-table tr:hover td { background: rgba(255,255,255,.02); }
.proposals-table .proposal-title {
  font-weight: 600;
  color: var(--text-primary);
}
.proposals-table .proposal-client { color: var(--text-secondary); }

/* ── Product cards in builder ── */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1rem;
  transition: border-color .2s ease;
}
.product-card:hover { border-color: rgba(74,108,247,.4); }
.product-card.product-on-hold {
  border-color: var(--warning);
  opacity: .72;
}
.product-card.product-on-hold:hover { border-color: var(--warning); opacity: 1; }
.product-card.product-on-hold .product-card-header {
  background: rgba(245,166,35,.08);
}
.on-hold-badge {
  font-size: .62rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--warning);
  border: 1px solid var(--warning);
  border-radius: 4px;
  padding: .1rem .45rem;
  white-space: nowrap;
}
.btn-hold { color: var(--text-muted); }
.btn-hold:hover { color: var(--warning) !important; }
.product-on-hold .btn-hold { color: var(--success); }
.product-on-hold .btn-hold:hover { color: var(--success) !important; opacity: .8; }
.product-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1.25rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
}
.product-card-header .drag-handle {
  color: var(--text-muted);
  cursor: grab;
  padding: .2rem .3rem;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color .12s;
}
.product-card-header .drag-handle:hover { color: var(--text-primary); }
.product-card-header .drag-handle:active { cursor: grabbing; }
.product-card.drag-above { border-top: 2px solid var(--accent); }
.product-card.drag-below { border-bottom: 2px solid var(--accent); }
.product-card.dragging { opacity: .35; }
.product-card-body { padding: 1.25rem; }

/* ── Render upload zone ── */
.render-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  position: relative;
  overflow: hidden;
}
.render-zone:hover, .render-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.render-zone img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .9;
}
.render-zone .render-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s;
}
.render-zone:hover .render-overlay { opacity: 1; }
.render-zone .upload-hint { color: var(--text-muted); font-size: .82rem; text-align: center; }

/* ── Version history sidebar ── */
.versions-list { list-style: none; }
.versions-list li {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .75rem 0;
  border-bottom: 1px solid rgba(42,47,61,.5);
  font-size: .82rem;
}
.versions-list li:last-child { border-bottom: none; }
.version-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: .3rem;
  flex-shrink: 0;
}
.version-dot.latest { background: var(--success); }
.version-meta { color: var(--text-muted); font-size: .75rem; }

/* ── Page header ── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.page-header-left { display: flex; flex-direction: column; gap: .35rem; }
.page-header-actions { display: flex; gap: .75rem; align-items: center; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: .5rem;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--text-muted); }

/* ── Two-column builder layout ── */
.builder-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 1024px) {
  .builder-layout { grid-template-columns: 1fr; }
}
.builder-sidebar { position: sticky; top: calc(var(--nav-h) + 1rem); }

/* ── Mobile sidebar toggle button (hidden on desktop) ── */
.sidebar-mobile-btn {
  display: none;
}

/* ── Mobile breakpoint ── */
@media (max-width: 768px) {
  /* Shrink nav padding and gaps */
  .nav { padding: 0 1rem; gap: .75rem; }
  .nav-actions { gap: .5rem; }

  /* Hide logo text — keep the icon only */
  .nav-logo-text { display: none; }

  /* Hide the sidebar by default */
  .builder-sidebar {
    display: none;
    position: static;
  }
  .builder-sidebar.sidebar-open {
    display: block;
  }

  /* Show the toggle button */
  .sidebar-mobile-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    width: 100%;
    padding: .55rem .9rem;
    margin-bottom: .75rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: .82rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, border-color .15s;
  }
  .sidebar-mobile-btn:hover {
    background: var(--bg-card);
    border-color: rgba(159,167,176,.45);
  }

  /* Reduce page padding on mobile */
  .page { padding: 1rem; }

  /* Stack input rows on mobile */
  .input-row,
  .input-row-3 { flex-direction: column; }
}

/* ── Preview ── */
.preview-page {
  background: #fff;
  color: #111;
  min-height: 100vh;
}
.preview-cover {
  background: #0a0c10;
  color: #fff;
  padding: 5rem 4rem;
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
}
.preview-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(74,108,247,.15) 0%, transparent 60%);
}
.preview-cover-content { position: relative; z-index: 1; }
.preview-cover-logo { margin-bottom: 3rem; }
.preview-cover-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: .75rem;
}
.preview-cover-client { font-size: 1.1rem; color: rgba(255,255,255,.6); }
.preview-meta {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.preview-meta-item { font-size: .82rem; color: rgba(255,255,255,.5); }
.preview-meta-item strong { color: #fff; display: block; font-size: .95rem; }

.preview-section {
  padding: 3rem 4rem;
  border-bottom: 1px solid #eee;
  max-width: 960px;
  margin: 0 auto;
}
.preview-section-title {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 1.5rem;
}
.preview-product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
  page-break-inside: avoid;
}
@media (max-width: 700px) {
  .preview-product { grid-template-columns: 1fr; }
  .preview-cover, .preview-section { padding: 2.5rem 1.5rem; }
}
.preview-product-image {
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
  aspect-ratio: 16/10;
}
.preview-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.preview-product-image .no-render {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: .82rem;
}
.preview-product-info h3 { font-size: 1.15rem; margin-bottom: .35rem; }
.preview-product-info .category {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #4a6cf7;
  margin-bottom: .75rem;
}
.preview-product-specs {
  background: #f8f9fb;
  border-radius: 6px;
  padding: .75rem 1rem;
  font-size: .82rem;
  color: #444;
  margin-top: .75rem;
  white-space: pre-wrap;
}
.preview-client-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem 2rem;
  font-size: .9rem;
}
.preview-client-item { border-bottom: 1px solid #eee; padding: .5rem 0; }
.preview-client-item .key { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #888; margin-bottom: .2rem; }

/* ── Product Library Modal ── */
.lib-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(0,0,0,.6); backdrop-filter: blur(6px);
}
.lib-modal {
  position: fixed; inset: 0; z-index: 401;
  display: flex; flex-direction: column;
  width: min(980px, 96vw); height: min(780px, 92vh);
  margin: auto;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
}
.lib-modal.hidden, .lib-overlay.hidden { display: none; }
.lib-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.lib-filters {
  display: flex; gap: .4rem; padding: .85rem 1.5rem;
  border-bottom: 1px solid var(--border); flex-shrink: 0; flex-wrap: wrap;
}
.lib-filter {
  padding: .35rem .9rem; border-radius: 20px;
  font-size: .75rem; font-weight: 600;
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border); cursor: pointer;
  font-family: inherit; transition: all .15s;
}
.lib-filter:hover { border-color: var(--accent); color: var(--accent); }
.lib-filter.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.lib-grid {
  flex: 1; overflow-y: auto; padding: 1.25rem 1.5rem 1.5rem;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
  align-items: start; align-content: start;
}
.lib-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 10px; transition: border-color .15s;
}
.lib-card:hover { border-color: rgba(11,111,211,.5); }
.lib-card-img {
  background: var(--bg-base); height: 140px;
  border-radius: 10px 10px 0 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: .75rem; position: relative;
}
.lib-card-img img { max-width: 100%; max-height: 116px; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(0,0,0,.5)); }
.lib-card-type {
  position: absolute; top: .5rem; right: .5rem;
  font-size: .58rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: .18rem .45rem; border-radius: 4px;
  background: rgba(11,111,211,.2); color: var(--accent); border: 1px solid rgba(11,111,211,.35);
}
.lib-card-body { padding: .75rem .75rem .5rem; display: flex; flex-direction: column; gap: .3rem; }
.lib-card-code { font-size: .62rem; color: var(--text-muted); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.lib-card-name { font-size: .82rem; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.lib-card-desc { font-size: .71rem; color: var(--text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lib-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: .6rem .75rem; border-top: 1px solid var(--border); background: var(--bg-base);
  border-radius: 0 0 10px 10px;
}
.lib-card-specs { display: flex; gap: .7rem; }
.lib-card-spec { font-size: .62rem; color: var(--text-muted); display: flex; align-items: center; gap: .2rem; }
.lib-add-btn {
  padding: .35rem .85rem; border-radius: 6px; font-size: .75rem; font-weight: 600;
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  font-family: inherit; transition: background .15s; white-space: nowrap;
}
.lib-add-btn:hover { background: var(--accent-hover); }
.lib-add-btn.added { background: var(--success); pointer-events: none; }
.lib-edit-btn {
  width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--border);
  background: transparent; color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, color .15s; flex-shrink: 0;
}
.lib-edit-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── Library Edit Modal ── */
.lib-edit-overlay {
  position: fixed; inset: 0; z-index: 402;
  background: rgba(0,0,0,.4);
}
.lib-edit-modal {
  position: fixed; z-index: 403;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(560px, 94vw);
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  display: flex; flex-direction: column;
}
.lib-edit-modal.hidden, .lib-edit-overlay.hidden { display: none; }
.lib-edit-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem .85rem; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.lib-edit-body {
  padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: .85rem;
  overflow-y: auto; max-height: calc(90vh - 140px);
}
.lib-edit-row { display: flex; gap: .75rem; }
.lib-edit-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: .85rem 1.25rem; border-top: 1px solid var(--border);
  background: var(--bg-surface); flex-shrink: 0;
}
.lib-img-zone {
  border: 1px dashed var(--border); border-radius: 8px;
  background: var(--bg-base); min-height: 130px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: border-color .15s; position: relative;
  overflow: hidden;
}
.lib-img-zone:hover { border-color: var(--accent); }
.lib-img-zone.dragover { border-color: var(--accent); background: var(--accent-glow); }
.lib-img-zone.has-image { border-style: solid; }
.lib-img-zone-prompt { display: flex; flex-direction: column; align-items: center; gap: .4rem; color: var(--text-muted); font-size: .72rem; }
.lib-img-zone .replace-hint {
  position: absolute; inset: 0; background: rgba(0,0,0,.55);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .3rem; color: #fff; font-size: .72rem; opacity: 0; transition: opacity .15s;
}
.lib-img-zone:hover .replace-hint { opacity: 1; }
.lib-card-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .1rem; }
.lib-tag {
  font-size: .58rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: .15rem .45rem; border-radius: 4px;
  background: var(--bg-card); color: var(--text-muted); border: 1px solid var(--border);
}

/* ── Toast ── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .65rem 1.1rem;
  font-size: .85rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: .6rem;
  animation: slide-in .2s ease;
}
.toast.success { border-color: rgba(62,207,142,.4); }
.toast.error   { border-color: rgba(224,74,74,.4);  }
@keyframes slide-in {
  from { transform: translateX(1rem); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text-muted);
}
.empty-state svg { margin: 0 auto 1.25rem; opacity: .3; }
.empty-state h3 { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: .5rem; }

/* ── Divider ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }

/* ── Misc utils ── */
.flex   { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.w-full { width: 100%; }
.text-right { text-align: right; }
.font-mono { font-family: var(--font-mono); }
.hidden { display: none !important; }

/* ── Section pill labels (website style) ── */
.section-pill-ui {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: .65rem;
}
.pill-num-ui {
  background: var(--accent);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: .18rem .45rem;
  border-radius: 4px;
  line-height: 1;
}
.pill-label-ui {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Product letter badge ── */
.product-letter-badge {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0;
}

/* ── Renders grid ── */
.renders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: .5rem;
}
.render-thumb {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--bg-input);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.render-thumb img { width: 100%; height: 100%; object-fit: cover; }
.render-thumb.loading { opacity: .6; }
.render-thumb-delete {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,.65);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px; height: 20px;
  font-size: .7rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
}
.render-thumb:hover .render-thumb-delete { opacity: 1; }
.add-render-zone {
  aspect-ratio: 16/10;
  min-height: unset !important;
}

/* ── Page toggle list (sidebar) ── */
.page-toggle-list {
  list-style: none;
  display: flex; flex-direction: column;
}
.page-toggle-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: .5rem 0;
  border-bottom: 1px solid rgba(58,64,72,.4);
  gap: .75rem;
}
.page-toggle-item:last-child { border-bottom: none; }
.page-toggle-label {
  font-size: .78rem; color: var(--text-secondary); line-height: 1.3;
}
.page-toggle-item.locked .page-toggle-label { color: var(--text-muted); }
.page-required-tag {
  flex-shrink: 0;
  font-size: .58rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 3px;
  padding: .15rem .45rem; white-space: nowrap;
}

/* Toggle switch */
.toggle-switch {
  position: relative; display: inline-block;
  width: 34px; height: 19px;
  cursor: pointer; flex-shrink: 0;
}
.toggle-switch input { display: none; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: background .2s, border-color .2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 13px; height: 13px;
  left: 2px; top: 50%; transform: translateY(-50%);
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform .2s, background .2s;
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translate(15px, -50%);
  background: #fff;
}

/* ── Overview image (loaded state — replaces render-zone styles) ── */
.overview-zone-loaded {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: default;
  position: relative;
  background: var(--bg-input);
}
/* Drag-over highlight when replacing via drop */
.overview-zone-loaded.dragover {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.overview-replace-btn {
  position: absolute;
  top: .55rem; right: .55rem;
  z-index: 20;
  background: rgba(15,18,22,.72);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 5px;
  color: rgba(255,255,255,.65);
  font-size: .68rem; font-weight: 500;
  font-family: inherit;
  padding: .28rem .6rem;
  cursor: pointer;
  display: flex; align-items: center; gap: .35rem;
  transition: color .15s, background .15s;
}
.overview-replace-btn:hover { color: #fff; background: rgba(15,18,22,.9); }

/* ── Overview marker system ── */
.overview-img-wrap {
  position: relative;
  width: 100%;
  line-height: 0;
}
.overview-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  pointer-events: none;
  -webkit-user-drag: none;
}
.overview-markers-layer {
  position: absolute;
  inset: 0;
}
.overview-markers-layer.armed {
  cursor: crosshair;
}
.ov-marker-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #fff;
  font-size: .75rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(11,111,211,.6), 0 0 0 2px rgba(255,255,255,.2);
  cursor: grab;
  user-select: none;
  z-index: 5;
}
.ov-marker-pin:active { cursor: grabbing; }
.pin-remove {
  position: absolute;
  top: -7px; right: -7px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .55rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
}
.ov-marker-pin:hover .pin-remove { opacity: 1; }

/* Marker palette */
.marker-palette {
  display: flex; align-items: center; gap: .5rem;
  flex-wrap: wrap;
  padding: .75rem 0 .1rem;
}
.marker-palette-label {
  font-size: .72rem; color: var(--text-muted); font-weight: 500; white-space: nowrap;
}
.marker-chip {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: .72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}
.marker-chip:hover { border-color: var(--brand-blue); color: var(--text-primary); }
.marker-chip.armed {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.marker-chip.placed {
  background: rgba(11,111,211,.12);
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}
.marker-chip.placed.armed {
  background: var(--brand-blue);
  color: #fff;
}
.marker-palette-hint {
  font-size: .72rem;
  color: var(--brand-blue);
  margin-left: .25rem;
}
.chip-count {
  font-size: .52rem; font-weight: 700;
  margin-left: 2px; opacity: .8;
  display: block; line-height: 1;
  margin-top: -2px;
}
.marker-chip.full {
  opacity: .45;
  cursor: default;
}

/* ── Spec tag quick-insert buttons ── */
.spec-tag-row {
  display: flex; flex-wrap: wrap; gap: .3rem;
  margin-bottom: .45rem;
}
.spec-tag {
  display: inline-flex; align-items: center;
  padding: .18rem .52rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: .68rem; font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color .12s, color .12s, background .12s;
  white-space: nowrap;
  line-height: 1.4;
}
.spec-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}
.spec-tag.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.spec-tag.active:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}
.spec-custom-row {
  display: flex; gap: .5rem;
  margin-top: .5rem;
}
.spec-pills-custom {
  display: flex; flex-wrap: wrap; gap: .35rem;
  margin-top: .4rem;
  min-height: 1.4rem;
}
.spec-pill {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .68rem; font-weight: 500;
  background: var(--accent); color: #fff;
  border-radius: 20px;
  padding: .18rem .52rem;
  white-space: nowrap;
}
.spec-pill-remove {
  cursor: pointer; opacity: .65; font-size: .7em;
  line-height: 1;
}
.spec-pill-remove:hover { opacity: 1; }

/* ── Quote section (builder Section 05) ── */
.quote-sub-label {
  font-size: .7rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: .6rem;
}
.quote-table {
  width: 100%; border-collapse: collapse;
}
.quote-table th {
  text-align: left; padding: .42rem .6rem;
  font-size: .68rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.quote-table th.text-right, .quote-table td.text-right { text-align: right; }
.quote-table td {
  padding: .52rem .6rem;
  border-bottom: 1px solid rgba(58,64,72,.35);
  vertical-align: middle;
}
.quote-table tr:last-child td { border-bottom: none; }
.quote-table .input { height: 32px; padding: .28rem .55rem; font-size: .82rem; }
.quote-table tr.qi-on-hold td { opacity: .4; }
.quote-table tr.qi-on-hold .qi-hold { opacity: 1 !important; color: var(--success); }
/* Install price rows */
.install-price-row td { border-bottom: none; padding-top: .1rem; padding-bottom: .35rem; }
.install-price-row + tr td { border-top: 1px solid var(--border); }
.install-price-label { font-size: .74rem; color: var(--text-muted); font-style: italic; }
.install-price-empty .install-price-label { opacity: .45; }
.install-price-empty .quote-currency { opacity: .35; }
.install-price-empty .quote-install-price { opacity: .45; }
.install-price-empty .install-row-total { opacity: .35; }
.qi-hold { color: var(--text-muted); padding: .3rem .4rem !important; }
.qi-hold:hover { color: var(--warning) !important; }
.quote-price-wrap {
  display: inline-flex; align-items: center; gap: .3rem; justify-content: flex-end;
}
.quote-currency { font-size: .8rem; color: var(--text-muted); }
.quote-row-total { font-weight: 600; color: var(--text-primary); }
.quote-totals-box {
  display: flex; flex-direction: column; align-items: flex-end;
  margin-top: 1.25rem; gap: .3rem;
}
.quote-totals-row {
  display: flex; gap: 2rem; align-items: center;
  font-size: .83rem; color: var(--text-secondary);
}
.quote-totals-row span:first-child { min-width: 190px; text-align: right; }
.quote-totals-row span:last-child { min-width: 90px; text-align: right; font-weight: 600; color: var(--text-primary); }
.quote-totals-row.grand {
  font-size: .95rem; font-weight: 700;
  border-top: 1px solid var(--border); padding-top: .4rem; margin-top: .15rem;
}
.quote-totals-row.grand span:last-child { color: var(--accent); }

/* ── Loading spinner ── */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Sports Screen Wizard ── */
.ss-wizard-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.65); backdrop-filter: blur(6px);
}
.ss-wizard-overlay.hidden { display: none; }

.ss-wizard-modal {
  position: fixed; inset: 0; z-index: 501;
  display: flex; flex-direction: column;
  width: min(960px, 96vw); height: min(820px, 94vh);
  margin: auto;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 28px 90px rgba(0,0,0,.65);
}
.ss-wizard-modal.hidden { display: none; }

/* Header */
.ss-wizard-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border); flex-shrink: 0;
  gap: 1rem;
}
.ss-wizard-title-block { display: flex; align-items: center; gap: .875rem; }
.ss-wizard-icon { color: var(--accent); flex-shrink: 0; }
.ss-wizard-title { font-size: 1.05rem; font-weight: 600; color: var(--text-primary); }
.ss-wizard-sub { font-size: .78rem; color: var(--text-muted); margin-top: .15rem; }

/* Progress bar */
.ss-progress-bar {
  display: flex; align-items: center;
  padding: 1rem 2rem; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.ss-progress-step {
  display: flex; flex-direction: column; align-items: center; gap: .35rem;
  flex: 0 0 auto;
}
.ss-progress-dot {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 600; color: var(--text-muted);
  transition: all .2s;
}
.ss-progress-label { font-size: .72rem; color: var(--text-muted); white-space: nowrap; transition: color .2s; }
.ss-progress-step.active .ss-progress-dot { border-color: var(--accent); background: var(--accent); color: #fff; }
.ss-progress-step.active .ss-progress-label { color: var(--text-primary); }
.ss-progress-step.done .ss-progress-dot { border-color: var(--accent); background: transparent; color: var(--accent); }
.ss-progress-step.done .ss-progress-label { color: var(--accent); }
.ss-progress-line { flex: 1; height: 2px; background: var(--border); margin: 0 .75rem; margin-bottom: 1.1rem; }

/* Body */
.ss-wizard-body { flex: 1; overflow-y: auto; padding: 1.5rem 2rem; }
.ss-step-content { max-width: 840px; }
.ss-section-label {
  font-size: .7rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: .75rem;
}

/* Pitch grid */
.ss-pitch-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .625rem;
}
.ss-pitch-card {
  background: var(--bg-base); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: .75rem .625rem;
  cursor: pointer; text-align: center; transition: border-color .15s, background .15s;
  display: flex; flex-direction: column; gap: .2rem;
}
.ss-pitch-card:hover { border-color: rgba(11,111,211,.5); }
.ss-pitch-card.selected { border-color: var(--accent); background: rgba(11,111,211,.08); }
.ss-pitch-name { font-size: .9rem; font-weight: 700; color: var(--text-primary); }
.ss-pitch-brand { font-size: .65rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.ss-pitch-size { font-size: .68rem; color: var(--text-muted); }
.ss-pitch-res { font-size: .65rem; color: var(--text-muted); }
.ss-pitch-card.selected .ss-pitch-name { color: var(--accent); }

/* Cabinet count row */
.ss-cab-row { display: flex; align-items: flex-end; gap: .875rem; }
.ss-field { display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.ss-field-sep { font-size: 1.4rem; color: var(--text-muted); padding-bottom: .4rem; flex: 0 0 auto; }
.ss-label { font-size: .75rem; font-weight: 500; color: var(--text-secondary); }
.ss-label-hint { font-weight: 400; color: var(--text-muted); }
.ss-input {
  background: var(--bg-base); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .5rem .75rem;
  color: var(--text-primary); font-size: .875rem; font-family: inherit;
  transition: border-color .15s;
}
.ss-input:focus { outline: none; border-color: var(--accent); }
.ss-select { cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%236f7782' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .6rem center; padding-right: 2rem;
}

/* Dims preview strip */
.ss-dims-preview {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; margin-top: 1.25rem;
}
.ss-dim-item {
  padding: .75rem 1rem; display: flex; flex-direction: column; gap: .25rem;
  background: var(--bg-base);
}
.ss-dim-item:not(:last-child) { border-right: 1px solid var(--border); }
.ss-dim-val { font-size: .875rem; font-weight: 600; color: var(--text-primary); }
.ss-dim-key { font-size: .68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }

/* Step 2 — Options */
.ss-options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.ss-options-col { display: flex; flex-direction: column; gap: 1rem; }

/* Toggles */
.ss-toggle-list { display: flex; flex-direction: column; gap: .65rem; }
.ss-toggle { display: flex; align-items: center; gap: .625rem; cursor: pointer; }
.ss-toggle input[type=checkbox] { position: absolute; opacity: 0; width: 0; height: 0; }
.ss-toggle-track {
  width: 36px; height: 20px; border-radius: 10px; background: var(--border);
  flex-shrink: 0; position: relative; transition: background .2s;
}
.ss-toggle input:checked ~ .ss-toggle-track { background: var(--accent); }
.ss-toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 14px; height: 14px; border-radius: 50%; background: #fff;
  transition: transform .2s;
}
.ss-toggle input:checked ~ .ss-toggle-track .ss-toggle-thumb { transform: translateX(16px); }
.ss-toggle-label { font-size: .825rem; color: var(--text-secondary); }
.ss-toggle input:checked ~ .ss-toggle-label { color: var(--text-primary); }

/* Step 3 — Review */
.ss-review { max-width: 100%; }
.ss-review-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.ss-review-specs, .ss-review-pricing { display: flex; flex-direction: column; gap: .75rem; }

.ss-spec-table { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.ss-spec-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .45rem .875rem; font-size: .8rem;
  border-bottom: 1px solid var(--border);
}
.ss-spec-row:last-child { border-bottom: none; }
.ss-spec-row span { color: var(--text-muted); }
.ss-spec-row strong { color: var(--text-primary); font-weight: 500; }
.ss-spec-row:nth-child(odd) { background: rgba(255,255,255,.015); }

.ss-cost-table { display: flex; flex-direction: column; gap: 0; }
.ss-cost-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .35rem 0; font-size: .8rem; color: var(--text-secondary);
}
.ss-cost-nil { opacity: .4; }
.ss-cost-divider { height: 1px; background: var(--border); margin: .5rem 0; }
.ss-cost-subtotal { font-size: .8rem; color: var(--text-secondary); }
.ss-cost-total { font-size: .9rem; color: var(--text-primary); padding: .5rem 0; }
.ss-cost-total strong { font-size: 1rem; font-weight: 700; color: var(--accent); }
.ss-cost-gst { font-size: .78rem; }
.ss-cost-inc { padding: .35rem 0; }
.ss-cost-inc strong { font-weight: 600; color: var(--text-primary); }
.ss-cost-total em, .ss-cost-inc em { font-style: normal; font-size: .7rem; color: var(--text-muted); margin-left: .25rem; }
.ss-freight-note { font-size: .7rem; color: var(--text-muted); margin-top: .75rem; border-top: 1px solid var(--border); padding-top: .625rem; }
.ss-rate-hint { font-size: .68rem; color: var(--text-muted); margin-top: .2rem; line-height: 1.3; }

/* Footer */
.ss-wizard-footer {
  display: flex; align-items: center; gap: .75rem;
  padding: 1rem 1.5rem; border-top: 1px solid var(--border); flex-shrink: 0;
}

/* Wizard card in library grid */
.lib-card-wizard { border-color: rgba(11,111,211,.3); }
.lib-card-img-wizard {
  background: linear-gradient(135deg, rgba(11,111,211,.08) 0%, var(--bg-base) 100%);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); position: relative;
}
.lib-card-type-wizard {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
}
.lib-configure-btn {
  display: flex; align-items: center; gap: .4rem;
  background: var(--accent) !important; color: #fff !important;
  border-color: var(--accent) !important;
}
.lib-configure-btn:hover { background: var(--accent-hover) !important; border-color: var(--accent-hover) !important; }

/* Responsive tweaks */
@media (max-width: 640px) {
  .ss-pitch-grid { grid-template-columns: repeat(2, 1fr); }
  .ss-review-cols { grid-template-columns: 1fr; }
  .ss-options-grid { grid-template-columns: 1fr; }
  .ss-dims-preview { grid-template-columns: repeat(2, 1fr); }
  .ss-dim-item:nth-child(2) { border-right: none; }
  .ss-dim-item:nth-child(1), .ss-dim-item:nth-child(2) { border-bottom: 1px solid var(--border); }
}

/* ── Version Chip ── */
.version-chip {
  font-size: .68rem; font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .2rem .6rem;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  letter-spacing: .03em;
  line-height: 1;
}
.version-chip:hover { color: var(--text-secondary); border-color: var(--text-muted); }

/* ── Changelog Modal ── */
.cl-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(2px);
}
.cl-modal {
  position: fixed; z-index: 501;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(480px, 94vw);
  max-height: 82vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0,0,0,.55);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.cl-modal.hidden, .cl-overlay.hidden { display: none; }
.cl-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 1.1rem 1.25rem .9rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.cl-body { overflow-y: auto; padding: .5rem 1.25rem 1rem; flex: 1; }
.cl-entry { padding: .9rem 0; border-bottom: 1px solid var(--border); }
.cl-entry:last-child { border-bottom: none; }
.cl-entry-header { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.cl-version { font-size: .88rem; font-weight: 700; color: var(--accent); }
.cl-current {
  font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  background: var(--accent); color: #fff;
  padding: .15rem .45rem; border-radius: 999px;
}
.cl-date { font-size: .7rem; color: var(--text-muted); margin-left: auto; }
.cl-list { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: .3rem; }
.cl-list li { font-size: .78rem; color: var(--text-secondary); line-height: 1.5; }

/* ── Changelog modal tabs ─────────────────────────────────────────────────── */
.cl-tabs {
  display: flex; border-bottom: 1px solid var(--border);
  background: var(--bg-surface); flex-shrink: 0;
}
.cl-tab {
  flex: 1; padding: .6rem .5rem; font-size: .78rem; font-weight: 500;
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.cl-tab:hover { color: var(--text-primary); }
.cl-tab-active { color: var(--accent); border-bottom-color: var(--accent); }
.cl-tab-pane { flex: 1; overflow-y: auto; min-height: 0; }

/* ── Feedback forms (inside changelog modal) ─────────────────────────────── */
.fb-form-wrap { padding: 1.25rem; }
.fb-form { display: flex; flex-direction: column; gap: .75rem; }
.fb-success {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .75rem; padding: 2rem 1rem; text-align: center;
}
.fb-success p { font-size: .9rem; color: var(--text-secondary); margin: 0; }

/* ── Admin feedback panel ─────────────────────────────────────────────────── */
.fb-admin-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem 1.25rem; cursor: pointer; user-select: none;
  border-bottom: 1px solid var(--border);
}
.fb-admin-header:hover { background: var(--bg-surface); }
.fb-admin-chevron { color: var(--text-muted); transition: transform .2s; flex-shrink: 0; }
.fb-admin-badge {
  font-size: .7rem; font-weight: 600; padding: .15rem .5rem; border-radius: 999px;
  background: rgba(11,111,211,.15); color: var(--accent);
}
.fb-row { border-bottom: 1px solid var(--border); }
.fb-row:last-child { border-bottom: none; }
.fb-row-main {
  display: flex; align-items: center; gap: .75rem; padding: .75rem 1.25rem;
  cursor: pointer; transition: background .12s;
}
.fb-row-main:hover { background: var(--bg-surface); }
.fb-type-badge {
  font-size: .7rem; font-weight: 600; padding: .2rem .55rem; border-radius: 4px;
  flex-shrink: 0; white-space: nowrap;
}
.fb-type-bug     { background: rgba(239,68,68,.12); color: #ef4444; }
.fb-type-feature { background: rgba(11,111,211,.12); color: var(--accent); }
.fb-row-title { font-size: .88rem; font-weight: 500; color: var(--text-primary); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-row-meta  { font-size: .75rem; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.fb-row-chevron { color: var(--text-muted); transition: transform .2s; flex-shrink: 0; }
.fb-status-pill {
  font-size: .68rem; font-weight: 600; padding: .15rem .5rem; border-radius: 999px;
  flex-shrink: 0; white-space: nowrap;
}
.fb-status-new       { background: rgba(245,158,11,.12); color: #f59e0b; }
.fb-status-reviewing { background: rgba(11,111,211,.12); color: var(--accent); }
.fb-status-done      { background: rgba(34,197,94,.12);  color: #22c55e; }
.fb-status-closed    { background: var(--bg-card); color: var(--text-muted); }
.fb-row-body { padding: .75rem 1.25rem 1rem; background: var(--bg-surface); }
.fb-description {
  font-size: .83rem; color: var(--text-secondary); white-space: pre-wrap;
  margin: 0 0 .9rem; line-height: 1.6;
}
.fb-admin-controls { display: flex; flex-direction: column; gap: .5rem; }

/* ── Cabinet Manager Modal ── */
.cab-mgr-overlay {
  position: fixed; inset: 0; z-index: 404;
  background: rgba(0,0,0,.4);
}
.cab-mgr-modal {
  position: fixed; z-index: 405;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(840px, 96vw);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  display: flex; flex-direction: column;
  max-height: 90vh;
}
.cab-mgr-modal.hidden, .cab-mgr-overlay.hidden { display: none; }
.cab-mgr-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem .85rem; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.cab-mgr-body {
  padding: .75rem 1.25rem; overflow-y: auto;
  flex: 1; min-height: 0;
}
.cab-mgr-footer {
  display: flex; align-items: center;
  padding: .85rem 1.25rem; border-top: 1px solid var(--border);
  background: var(--bg-surface); flex-shrink: 0;
  border-radius: 0 0 14px 14px;
}

/* ── Login Page ── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  padding: 1rem;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  box-shadow: 0 24px 64px rgba(0,0,0,.45);
}
.login-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 2rem;
}
.login-logo-text { font-size: 1rem; font-weight: 600; color: var(--text-primary); line-height: 1.2; }
.login-logo-sub { font-size: .72rem; color: var(--text-muted); font-weight: 400; }
.login-error {
  font-size: .78rem;
  color: #f87171;
  background: rgba(248,113,113,.1);
  border: 1px solid rgba(248,113,113,.25);
  border-radius: 6px;
  padding: .5rem .75rem;
  margin-bottom: 1rem;
  display: none;
}
.login-error.visible { display: block; }

/* ── User chip (nav) ── */
.user-chip {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .25rem .75rem;
}

/* ── User Manager Modal ── */
.um-overlay {
  position: fixed; inset: 0; z-index: 600;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(2px);
}
.um-modal {
  position: fixed; z-index: 601;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(680px, 96vw);
  max-height: 88vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.um-modal.hidden, .um-overlay.hidden { display: none; }
.um-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 1rem 1.25rem .85rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.um-eyebrow { font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .2rem; }
.um-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin: 0; }
.um-body { overflow-y: auto; flex: 1; min-height: 0; }
.um-footer {
  display: flex; align-items: center;
  padding: .85rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
  flex-shrink: 0;
  border-radius: 0 0 14px 14px;
}
/* Table */
.um-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.um-table th {
  text-align: left; padding: .6rem 1rem;
  font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted); border-bottom: 1px solid var(--border);
}
.um-table td { padding: .75rem 1rem; border-bottom: 1px solid rgba(58,64,72,.5); vertical-align: middle; }
.um-table tr:last-child td { border-bottom: none; }
.um-table tr:hover td { background: rgba(255,255,255,.02); }
.um-row-inactive { opacity: .5; }
.um-username { font-family: var(--font-mono); font-size: .78rem; color: var(--text-secondary); }
.um-date { font-size: .75rem; color: var(--text-muted); white-space: nowrap; }
/* Role badges */
.um-role-badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.um-role-admin { background: rgba(11,111,211,.18); color: var(--accent); border: 1px solid rgba(11,111,211,.3); }
.um-role-staff { background: rgba(159,167,176,.1); color: var(--text-secondary); border: 1px solid var(--border); }
/* Status */
.um-status { font-size: .78rem; font-weight: 500; }
.um-status-active { color: var(--success); }
.um-status-inactive { color: var(--text-muted); }
/* Form */
.um-form { padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.um-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── Payment Schedule Builder ────────────────────────────────────────────── */
.ps-plan-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin-bottom: .75rem;
  background: var(--bg-surface);
}
.ps-plan-top {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: .75rem;
}
.ps-plan-left { flex: 1; display: flex; flex-direction: column; gap: .35rem; }
.ps-rec-label {
  display: inline-flex; align-items: center; gap: .35rem;
  cursor: pointer; font-size: .78rem;
  color: var(--text-muted);
  user-select: none;
}
.ps-rec-label.is-rec { color: var(--accent); }
.ps-rec-label input[type="checkbox"] { display: none; }
.ps-type-tag {
  display: inline-block;
  font-size: .68rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-input);
  padding: .15rem .5rem; border-radius: 4px;
  align-self: flex-start;
}
.ps-plan-edit-row {
  display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end;
  margin-bottom: .75rem;
}
.ps-preview {
  background: var(--bg-input);
  border-radius: 7px;
  padding: .6rem .85rem;
  font-size: .8rem;
  margin-bottom: .6rem;
}
.ps-preview-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .22rem 0;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
.ps-preview-row:last-of-type { border-bottom: none; }
.ps-preview-finance { color: var(--accent) !important; font-size: .75rem; }
.ps-preview-total {
  display: flex; justify-content: space-between; align-items: center;
  padding: .4rem 0 0;
  margin-top: .3rem;
  border-top: 1px solid var(--border);
  font-weight: 600; color: var(--text-primary);
  font-size: .85rem;
}
.ps-plan-footer {
  margin-top: .5rem;
  padding-top: .5rem;
  border-top: 1px solid var(--border);
}
.ps-dropdown {
  position: absolute;
  bottom: calc(100% + 5px); top: auto; left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 -6px 24px rgba(0,0,0,.4);
  min-width: 220px;
  z-index: 120;
  overflow: hidden;
}
.ps-dropdown-item {
  display: block; width: 100%;
  text-align: left; padding: .58rem .85rem;
  font-size: .82rem; color: var(--text-primary);
  background: none; border: none; cursor: pointer;
  transition: background .12s;
}
.ps-dropdown-item:hover { background: var(--bg-surface); }
.ps-dropdown-divider { height: 1px; background: var(--border); margin: .2rem 0; }
.ps-tmpl-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: .42rem .75rem; gap: .5rem;
  font-size: .82rem; color: var(--text-primary);
  transition: background .12s;
}
.ps-tmpl-item:hover { background: var(--bg-surface); }

/* ── Customer response banner (builder) ─────────────────────────────────── */
.cust-banner {
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.cust-banner-icon {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.cust-banner-body { flex: 1; min-width: 0; }
.cust-banner-top {
  display: flex; align-items: center; gap: .65rem;
  margin-bottom: .35rem; flex-wrap: wrap;
}
.cust-banner-label {
  font-size: .72rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
}
.cust-banner-who {
  font-size: .78rem; color: var(--text-muted);
}
.cust-banner-date {
  font-size: .72rem; color: var(--text-dim); margin-left: auto;
}
.cust-banner-comment {
  font-size: .82rem; color: var(--text-muted);
  line-height: 1.6;
  background: rgba(0,0,0,.2);
  border-radius: 6px; padding: .55rem .8rem;
  margin-top: .35rem;
  border-left: 3px solid var(--border);
  font-style: italic;
}
.cust-banner.banner-accepted {
  background: rgba(34,197,94,.06);
  border-color: rgba(34,197,94,.25);
}
.cust-banner.banner-accepted .cust-banner-icon {
  background: rgba(34,197,94,.15); color: #22c55e;
}
.cust-banner.banner-accepted .cust-banner-label { color: #22c55e; }
.cust-banner.banner-accepted .cust-banner-comment { border-left-color: rgba(34,197,94,.4); }
.cust-banner.banner-declined {
  background: rgba(239,68,68,.05);
  border-color: rgba(239,68,68,.2);
}
.cust-banner.banner-declined .cust-banner-icon {
  background: rgba(239,68,68,.12); color: #ef4444;
}
.cust-banner.banner-declined .cust-banner-label { color: #ef4444; }
.cust-banner.banner-declined .cust-banner-comment { border-left-color: rgba(239,68,68,.35); }
.cust-banner.banner-changes {
  background: rgba(245,158,11,.06);
  border-color: rgba(245,158,11,.25);
}
.cust-banner.banner-changes .cust-banner-icon {
  background: rgba(245,158,11,.12); color: #f59e0b;
}
.cust-banner.banner-changes .cust-banner-label { color: #f59e0b; }
.cust-banner.banner-changes .cust-banner-comment { border-left-color: rgba(245,158,11,.4); }
.cust-banner-payment-pref {
  display: flex; align-items: center; gap: .4rem;
  margin-top: .5rem;
  font-size: .78rem; color: var(--text-muted);
}
.cust-banner-payment-pref svg { color: var(--text-dim); flex-shrink: 0; }
.cust-banner-payment-pref strong { color: var(--text); }

/* ── Share panel ─────────────────────────────────────────────────────────── */
.share-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.55);
  z-index: 300;
  padding: .75rem;
}
.share-panel-head {
  font-size: .65rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: .65rem;
}
.share-panel-hint {
  font-size: .78rem; color: var(--text-muted); line-height: 1.55;
  margin-bottom: .75rem;
}
.share-url-row {
  display: flex; gap: .45rem; margin-bottom: .6rem;
}
.share-status-bar {
  margin-bottom: .6rem;
}
.share-status-chip {
  display: inline-flex; align-items: center;
  font-size: .72rem; font-weight: 600;
  padding: .22rem .65rem; border-radius: 20px;
  white-space: nowrap;
}
.share-chip-pending   { background: rgba(111,119,130,.15); color: var(--text-muted); border: 1px solid var(--border); }
.share-chip-viewed    { background: rgba(245,158,11,.12);  color: #f59e0b;            border: 1px solid rgba(245,158,11,.3); }
.share-chip-accepted  { background: rgba(34,197,94,.12);   color: #22c55e;            border: 1px solid rgba(34,197,94,.3); }
.share-chip-declined  { background: rgba(239,68,68,.1);    color: #ef4444;            border: 1px solid rgba(239,68,68,.25); }
.share-chip-changes   { background: rgba(245,158,11,.12);  color: #f59e0b;            border: 1px solid rgba(245,158,11,.3); }
.share-customer-comment {
  font-size: .72rem; color: var(--text-muted); font-style: italic;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 6px; padding: .45rem .65rem; margin-top: .45rem;
  line-height: 1.55;
}
.share-status-dot {
  display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  flex-shrink: 0; margin-left: 2px;
}

/* ── Customer status chips (dashboard) ───────────────────────────────────── */
.cust-chip {
  display: inline-flex; align-items: center;
  font-size: .7rem; font-weight: 600;
  padding: .18rem .55rem; border-radius: 20px;
  white-space: nowrap;
}
.cust-chip-pending  { background: rgba(111,119,130,.15); color: var(--text-muted); border: 1px solid var(--border); }
.cust-chip-viewed   { background: rgba(245,158,11,.12);  color: #f59e0b;            border: 1px solid rgba(245,158,11,.3); }
.cust-chip-accepted { background: rgba(34,197,94,.12);   color: #22c55e;            border: 1px solid rgba(34,197,94,.3); }
.cust-chip-declined { background: rgba(239,68,68,.1);    color: #ef4444;            border: 1px solid rgba(239,68,68,.25); }

/* ── Storage Manager modal ───────────────────────────────────────────────── */
.sm-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
  margin-bottom: 1.1rem;
}
.sm-stat {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem 1rem;
}
.sm-stat-ok   { border-color: rgba(62,207,142,.35); background: rgba(62,207,142,.06); }
.sm-stat-warn { border-color: rgba(239,68,68,.35);  background: rgba(239,68,68,.06); }
.sm-stat-val {
  font-size: 1.25rem; font-weight: 700;
  color: var(--text-primary); line-height: 1.1;
}
.sm-stat-warn .sm-stat-val { color: #ef4444; }
.sm-stat-ok   .sm-stat-val { color: var(--success); }
.sm-stat-label {
  font-size: .72rem; color: var(--text-muted);
  margin-top: .2rem; line-height: 1.3;
}
.sm-section-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: .55rem;
}
.sm-file-list {
  display: flex; flex-direction: column; gap: .35rem;
  max-height: 240px; overflow-y: auto;
  margin-bottom: .85rem;
}
.sm-file-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .38rem .65rem;
  gap: .75rem;
}
.sm-file-name {
  font-size: .75rem; font-family: var(--font-mono);
  color: var(--text-secondary); word-break: break-all; flex: 1;
}
.sm-file-size {
  font-size: .72rem; color: var(--text-muted);
  white-space: nowrap; flex-shrink: 0;
}
.sm-all-clear {
  display: flex; flex-direction: column; align-items: center;
  gap: .45rem; padding: 1.5rem 1rem;
  color: var(--success); font-size: .85rem; font-weight: 500;
  text-align: center;
}
.sm-all-clear svg { opacity: .85; }
.sm-btn-purge {
  background: rgba(224,74,74,.15);
  color: var(--danger);
  border: 1px solid rgba(224,74,74,.4);
  border-radius: var(--radius-sm);
  padding: .38rem .9rem;
  font-size: .8rem; font-weight: 600;
  cursor: pointer; transition: background .15s, border-color .15s;
}
.sm-btn-purge:hover:not(:disabled) {
  background: rgba(224,74,74,.28);
  border-color: rgba(224,74,74,.65);
}
.sm-btn-purge:disabled { opacity: .45; cursor: not-allowed; }
.cust-chip-changes  { background: rgba(245,158,11,.12);  color: #f59e0b;            border: 1px solid rgba(245,158,11,.3); }

/* ── Auto-title preview ──────────────────────────────────────────────────── */
.title-auto-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: .35rem;
}
.title-auto-preview {
  padding: .45rem .75rem; min-height: 38px;
  background: var(--bg-input); border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; color: var(--text-secondary); font-style: italic;
  display: flex; align-items: center;
}
.title-preview-plain { font-style: normal; color: var(--text-primary); }
.btn-link {
  background: none; border: none; color: var(--brand-blue); font-size: 12px;
  cursor: pointer; padding: 0; line-height: 1;
}
.btn-link:hover { text-decoration: underline; }

/* ── HubSpot autocomplete dropdown ──────────────────────────────────────── */
.hs-search-wrap { position: relative; }
.hs-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 300;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.55); max-height: 320px; overflow-y: auto;
}
.hs-dropdown.hidden { display: none; }
.hs-group-label {
  padding: 8px 12px 4px; font-size: 11px; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em;
  border-top: 1px solid var(--border);
}
.hs-group-label:first-child { border-top: none; }
.hs-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 12px; cursor: pointer; transition: background .12s;
}
.hs-item:hover { background: var(--bg-surface); }
.hs-item-icon { flex-shrink: 0; margin-top: 1px; color: var(--text-muted); }
.hs-item-name { font-size: 13px; font-weight: 500; color: var(--text-primary); line-height: 1.3; }
.hs-item-sub  { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── Dashboard filter bar ────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem 0 .65rem;
  flex-wrap: wrap;
}
.filter-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted);
  margin-right: .1rem; padding-left: .1rem;
}
.filter-pill {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .24rem .7rem; border-radius: 20px;
  font-size: .78rem; font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-surface); border: 1px solid var(--border);
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap; line-height: 1.45;
}
.filter-pill:hover:not(.filter-pill-active) {
  color: var(--text-secondary);
  border-color: rgba(159,167,176,.45);
  background: var(--bg-card);
}
.filter-pill-active {
  color: var(--brand-blue);
  background: rgba(11,111,211,.12);
  border-color: rgba(11,111,211,.45);
  font-weight: 600;
}
.filter-sep {
  width: 1px; height: 18px;
  background: var(--border); margin: 0 .25rem; flex-shrink: 0;
}

/* ── Sortable table headers ──────────────────────────────────────────────── */
.th-sort {
  cursor: pointer; user-select: none; white-space: nowrap;
  transition: color .15s;
}
.th-sort:hover { color: var(--text-secondary); }
.th-sort:hover .sort-icon { opacity: .7; }
.th-sort-active { color: var(--text-primary); }
.sort-icon {
  font-size: .62rem; margin-left: .3rem; opacity: .3;
  transition: opacity .15s; vertical-align: middle;
}
.th-sort-active .sort-icon { opacity: 1; color: var(--brand-blue); }
