/* ═══════════════════════════════════════════════════════════
   Triad Advising — Shared Styles
   Brand CSS variables, typography, layout, and UI components
   shared across all product pages (Rate CRM, Service CRM,
   Parts Exchange).
   ═══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #fefaf6;
  --surface: #ffffff;
  --sidebar-bg: #2e251c;
  --sidebar-hover: #3a3530;
  --sidebar-active: #463313;  /* warmer orange-brown active fill */
  --topbar-bg: #1a1610;
  --amber: #d4872e;
  --amber-light: #fdf3e7;
  --sage: #6b8f6e;
  --charcoal: #1a1610;
  --text: #2c2a26;
  --text-secondary: #78716c;
  --border: #e7e5e4;
  --stone-50: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-400: #78716c;
  --stone-600: #57534e;
  --earth: #44372b;
  --golden: #e8a54e;
  --danger: #c0392b;
  --danger-light: #fdecea;
  --success: #27ae60;
  --success-light: #eafaf1;
  --info: #2980b9;
  --info-light: #ebf5fb;
  --accent-blue: #2980b9;
  --accent-green: #27ae60;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
}

body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; overflow: hidden; }
h1, h2, h3, .heading { font-family: 'Playfair Display', serif; }

/* ── Login Screen ── */
.login-screen {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: var(--bg);
}
.login-card {
  background: var(--surface); border-radius: var(--radius); padding: 2.5rem;
  box-shadow: var(--shadow-md); width: 100%; max-width: 400px; text-align: center;
}
.login-logo { display: flex; align-items: center; justify-content: center; gap: .6rem; margin-bottom: 1.5rem; }
.login-logo svg { width: 40px; height: 40px; }
.login-logo span { font-family: 'Inter', sans-serif; font-size: 1.1rem; font-weight: 700; color: var(--charcoal); text-transform: uppercase; letter-spacing: 0.12em; }
.login-card h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: .5rem; }
.login-card p { font-size: .85rem; color: var(--text-secondary); margin-bottom: 1.5rem; }
.login-field { width: 100%; padding: .75rem 1rem; border: 1.5px solid var(--border); border-radius: 8px; font-size: .95rem; font-family: inherit; transition: border-color .2s; }
.login-field:focus { outline: none; border-color: var(--amber); }
.login-btn {
  width: 100%; padding: .75rem; margin-top: 1rem; border: none; border-radius: 8px;
  background: var(--amber); color: white; font-size: .95rem; font-weight: 600;
  font-family: inherit; cursor: pointer; transition: background .2s;
}
.login-btn:hover { background: #b8741f; }
.login-error { color: var(--danger); font-size: .85rem; margin-top: .75rem; display: none; }

/* ── App Shell ── */
.app { display: none; height: 100vh; flex-direction: column; }
.app.active { display: flex; }
.login-screen.hidden { display: none; }

/* ── Top Bar ── */
.topbar {
  height: 48px; background: var(--topbar-bg); display: flex; align-items: center;
  padding: 0 16px; gap: 16px; flex-shrink: 0; z-index: 100;
}
.topbar-logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.topbar-logo svg { width: 28px; height: 28px; }
.topbar-logo span { font-family: 'Inter', sans-serif; font-size: .8rem; font-weight: 700; color: white; text-transform: uppercase; letter-spacing: 0.12em; white-space: nowrap; }
.topbar-search {
  flex: 1; max-width: 480px; margin: 0 auto;
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px; padding: 0 12px; height: 32px;
}
.topbar-search svg { width: 14px; height: 14px; color: rgba(255,255,255,0.4); flex-shrink: 0; }
.topbar-search input { border: none; background: none; outline: none; color: white; font-size: .8rem; font-family: inherit; flex: 1; }
.topbar-search input::placeholder { color: rgba(255,255,255,0.35); }
.topbar-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.topbar-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 6px; cursor: pointer; transition: background .15s; }
.topbar-icon:hover { background: rgba(255,255,255,0.1); }
.topbar-icon svg { width: 18px; height: 18px; color: rgba(255,255,255,0.6); }
.topbar-avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--amber);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700; color: white; cursor: pointer;
}

/* ── Three Panel Layout ── */
.three-panel { display: flex; flex: 1; overflow: hidden; }

/* ── Left Sidebar ── */
.sidebar {
  width: 208px; height: calc(100vh - 48px); background: var(--sidebar-bg); display: flex; flex-direction: column;
  flex-shrink: 0; overflow: hidden; color: white;
}
.sidebar-switcher {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06); cursor: pointer;
}
.sidebar-switcher .sw-icon {
  width: 22px; height: 22px; border-radius: 5px; background: var(--amber);
  display: flex; align-items: center; justify-content: center; font-size: .6rem; font-weight: 700; color: white;
}
.sidebar-switcher .sw-label { font-size: .82rem; font-weight: 600; flex: 1; }
.sidebar-switcher .sw-chevron { color: rgba(255,255,255,0.35); font-size: .7rem; }
.sidebar-nav { flex: 1; min-height: 0; padding: 8px 0; display: flex; flex-direction: column; gap: 1px; overflow-y: auto; }
.nav-section-label {
  font-family: 'Inter', sans-serif;
  font-size: .65rem; text-transform: uppercase; letter-spacing: .08em;
  color: rgba(255,255,255,0.3); padding: 12px 10px 4px; user-select: none;
  display: flex; align-items: center; justify-content: space-between; cursor: pointer;
  flex-shrink: 0;
}
.nav-section-label:hover { color: rgba(255,255,255,0.5); }
.nav-section-label .section-toggle {
  font-size: .8rem; font-weight: 300; transition: transform .2s ease; display: inline-block;
  color: rgba(255,255,255,0.25); line-height: 1;
}
.nav-section-label:hover .section-toggle { color: rgba(255,255,255,0.45); }
.nav-section-label .section-toggle { transform: rotate(45deg); }
.nav-section-label.collapsed .section-toggle { transform: rotate(0deg); }
.nav-section-group { overflow: hidden; transition: max-height .25s ease, opacity .2s ease; max-height: 500px; opacity: 1; flex-shrink: 0; }
.nav-section-group.collapsed { max-height: 0; opacity: 0; }
.nav-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px;
  margin: 0 8px;  /* floating pill — equal inset on both sides */
  cursor: pointer; font-size: .82rem; font-weight: 500; color: rgba(255,255,255,0.6);
  transition: all .12s; user-select: none; flex-shrink: 0;
}
.nav-item:hover { background: var(--sidebar-hover); color: rgba(255,255,255,0.9); }
.nav-item.active { background: var(--sidebar-active); color: var(--amber); }
.nav-item svg { width: 16px; height: 16px; opacity: .55; flex-shrink: 0; }
.nav-item.active svg { opacity: 1; stroke: var(--amber); }
.nav-badge { margin-left: auto; background: var(--amber); color: #fff; font-size: .6rem; font-weight: 700; padding: 1px 6px; border-radius: 10px; min-width: 18px; text-align: center; }
.nav-badge-red { background: var(--danger); }
.nav-sub { padding-left: 18px; }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.nav-dot.amber { background: var(--amber); }
.nav-dot.sage { background: var(--sage); }
/* Legacy: kept for any pages still using the old bottom Products list. */
.sidebar-products { border-top: 1px solid rgba(255,255,255,0.06); padding: 8px 8px; margin-top: auto; flex-shrink: 0; }
.nav-product { font-size: .78rem; }
.nav-product.active { color: var(--amber); }
.nav-product-soon { opacity: .45; cursor: default; pointer-events: none; }
.nav-soon-badge { margin-left: auto; font-size: .55rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.5); padding: 1px 5px; border-radius: 4px; }

/* ── Product Dropdown (replaces the bottom Products section) ── */
.sidebar-switcher .sw-chevron { transition: transform .15s ease; display: inline-block; }
.sidebar-switcher.open .sw-chevron { transform: rotate(180deg); }
.product-dropdown {
  display: none;
  margin: -2px 10px 6px 10px;
  padding: 4px;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  flex-shrink: 0;
}
.product-dropdown.open { display: block; }
.product-option {
  display: flex;
  align-items: stretch;
  border-radius: 6px;
  transition: background .12s;
}
.product-option + .product-option { margin-top: 1px; }
.product-option:hover { background: rgba(255,255,255,0.06); }
.product-option:hover .product-option-newtab { opacity: 1; }
.product-option.active { background: rgba(224,123,26,0.18); }
.product-option-link {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: .78rem;
  font-weight: 500;
  border-radius: 6px 0 0 6px;
  min-width: 0;
}
.product-option-link:hover { color: #fff; }
.product-option.active .product-option-link { color: var(--amber); }
.product-option-icon { width: 14px; height: 14px; opacity: .8; flex-shrink: 0; }
.product-option.active .product-option-icon { opacity: 1; stroke: var(--amber); }
.product-option-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-option-check { width: 13px; height: 13px; color: var(--amber); flex-shrink: 0; stroke: var(--amber); }
.product-option-newtab {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  color: rgba(255,255,255,0.45);
  opacity: .35;
  text-decoration: none;
  border-radius: 0 6px 6px 0;
  transition: opacity .12s, color .12s, background .12s;
  flex-shrink: 0;
}
.product-option-newtab svg { width: 13px; height: 13px; }
.product-option-newtab:hover { opacity: 1; color: var(--amber); background: rgba(255,255,255,0.08); }
.product-option-newtab:focus-visible { opacity: 1; outline: 1px solid var(--amber); outline-offset: -2px; }
.product-dropdown-hint {
  font-size: .58rem;
  color: rgba(255,255,255,0.4);
  padding: 6px 8px 2px;
  line-height: 1.4;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 4px;
}

.sidebar-admin { border-top: 1px solid rgba(255,255,255,0.06); padding: 8px 0; flex-shrink: 0; }

/* ── List Panel (Middle) ── */
.list-panel {
  width: 280px; background: var(--bg); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; flex-shrink: 0; overflow: hidden;
}
.list-header {
  padding: 16px 14px 12px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.list-header-left h2 { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 600; }
.list-header-left .list-count { font-family: 'Inter', sans-serif; font-size: .7rem; color: var(--text-secondary); margin-top: 2px; }
.list-header-actions { display: flex; gap: 6px; }
.list-search { padding: 0 14px 10px; flex-shrink: 0; }
.list-search input {
  width: 100%; padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px;
  font-size: .8rem; font-family: inherit; background: white;
}
.list-search input:focus { outline: none; border-color: var(--amber); }
.list-body { flex: 1; overflow-y: auto; }
.list-item {
  padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer;
  transition: background .1s; border-left: 3px solid transparent;
}
.list-item:hover { background: var(--stone-50); }
.list-item.selected { background: var(--amber-light); border-left-color: var(--amber); }
.list-item-title { font-size: .85rem; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.list-item-sub { font-size: .73rem; color: var(--text-secondary); margin-top: 2px; }
.phase-pill {
  font-size: .6rem; font-weight: 700; padding: 1px 6px; border-radius: 10px;
  color: white; flex-shrink: 0;
}
.phase-pill-1 { background: var(--amber); }
.phase-pill-2 { background: var(--info); }
.phase-pill-3 { background: var(--sage); }
.phase-pill-4 { background: var(--success); }

/* ── Detail Panel (Right) ── */
.detail-panel {
  flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--bg);
}
.detail-header {
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; flex-shrink: 0; background: var(--bg);
}
.detail-header-icon {
  width: 36px; height: 36px; border-radius: 8px; background: var(--amber-light);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.detail-header-icon svg { width: 18px; height: 18px; color: var(--amber); }
.detail-header-info { flex: 1; }
.detail-header-info h2 { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 600; }
.detail-header-info .detail-subtitle { font-family: 'Inter', sans-serif; font-size: .75rem; color: var(--text-secondary); }
.detail-header-actions { display: flex; gap: 6px; flex-shrink: 0; }
.detail-content-wrap { display: flex; flex: 1; overflow: hidden; }
.detail-main { flex: 1; overflow-y: auto; padding: 20px; }
.detail-props {
  width: 200px; background: white; border-left: 1px solid var(--border);
  overflow-y: auto; padding: 16px; flex-shrink: 0;
}
.prop-group { margin-bottom: 14px; }
.prop-label { font-size: .65rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-secondary); margin-bottom: 3px; }
.prop-value { font-size: .82rem; font-weight: 500; }
.prop-avatar { display: flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 500; }
.prop-avatar-circle { width: 22px; height: 22px; border-radius: 50%; background: var(--sage); color: white; display: flex; align-items: center; justify-content: center; font-size: .6rem; font-weight: 700; }

/* ── Cards ── */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-bottom: 1.25rem; }
.stat-card { padding: 1rem; text-align: center; }
.stat-card .stat-label { font-family: 'Inter', sans-serif; font-size: .65rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-secondary); margin-bottom: .3rem; }
.stat-card .stat-value { font-size: 1.4rem; font-weight: 700; }
.stat-card .stat-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; margin: 0 auto .6rem; }
.stat-card .stat-icon svg { width: 18px; height: 18px; }
.stat-card .stat-icon.amber { background: rgba(212,135,46,0.1); color: var(--amber); }
.stat-card .stat-icon.sage { background: rgba(107,143,110,0.1); color: var(--sage); }
.stat-card .stat-icon.info { background: rgba(41,128,185,0.1); color: var(--info); }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .85rem; border: none; border-radius: 6px; font-size: .8rem; font-weight: 600; font-family: inherit; cursor: pointer; transition: all .12s; }
.btn-primary { background: var(--amber); color: white; }
.btn-primary:hover { background: #b8741f; }
.btn-secondary { background: var(--stone-50); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--amber); }
.btn-danger { background: var(--danger-light); color: var(--danger); }
.btn-danger:hover { background: #f5c6c0; }
.btn-sm { padding: .3rem .6rem; font-size: .75rem; }
.btn-xs { padding: .2rem .45rem; font-size: .7rem; }
.btn svg { width: 14px; height: 14px; }
.btn-icon { width: 28px; height: 28px; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--stone-50); border: 1px solid var(--border); cursor: pointer; }
.btn-icon:hover { border-color: var(--amber); }
.btn-icon svg { width: 14px; height: 14px; }

/* ── Table ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .6rem .75rem; font-size: .8rem; border-bottom: 1px solid var(--border); }
th { font-weight: 600; color: var(--text-secondary); font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; background: var(--stone-50); }
tr:hover td { background: rgba(212,135,46,0.03); }
.badge { display: inline-block; padding: .12rem .5rem; border-radius: 20px; font-size: .7rem; font-weight: 600; }
.badge-active { background: var(--success-light); color: var(--success); }
.badge-draft { background: var(--info-light); color: var(--info); }
.badge-expired { background: var(--danger-light); color: var(--danger); }

/* ── Modal ── */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 200;
  align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 600; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-secondary); padding: .25rem; font-size: 1.2rem; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 1.25rem; }
.modal-footer { display: flex; justify-content: flex-end; gap: .5rem; padding: .75rem 1.25rem; border-top: 1px solid var(--border); }

/* ── Form ── */
.form-group { margin-bottom: .85rem; }
.form-group label { display: block; font-size: .75rem; font-weight: 600; color: var(--text-secondary); margin-bottom: .3rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: .55rem .75rem; border: 1.5px solid var(--border); border-radius: 6px;
  font-size: .85rem; font-family: inherit; transition: border-color .2s; background: white;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--amber); }
.form-group textarea { min-height: 80px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-secondary); }
.empty-state svg { width: 48px; height: 48px; margin-bottom: 1rem; opacity: .3; }
.empty-state h3 { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: .3rem; }
.empty-state p { font-size: .85rem; margin-bottom: 1rem; }

/* ── Sections ── */
.section { display: none; }
.section.active { display: flex; flex-direction: column; }

/* ── Search Bar ── */
.search-bar { display: flex; align-items: center; gap: .5rem; background: var(--stone-50); border: 1px solid var(--border); border-radius: 6px; padding: .4rem .7rem; flex: 1; max-width: 280px; }
.search-bar input { border: none; background: none; outline: none; font-size: .8rem; font-family: inherit; flex: 1; }
.search-bar svg { width: 14px; height: 14px; color: var(--text-secondary); }

/* ── Toast ── */
.toast { position: fixed; bottom: 2rem; right: 2rem; background: var(--charcoal); color: white; padding: .65rem 1.15rem; border-radius: 8px; font-size: .8rem; font-weight: 500; box-shadow: var(--shadow-md); transform: translateY(100px); opacity: 0; transition: all .3s; z-index: 300; }
.toast.show { transform: translateY(0); opacity: 1; }

/* ── Notes ── */
.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .75rem; }
.note-card { cursor: pointer; transition: box-shadow .15s; padding: 1rem; }
.note-card:hover { box-shadow: var(--shadow-md); }
.note-card .note-title { font-weight: 600; font-size: .85rem; margin-bottom: .3rem; }
.note-card .note-preview { font-size: .8rem; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.note-card .note-meta { font-size: .7rem; color: var(--text-secondary); margin-top: .6rem; padding-top: .4rem; border-top: 1px solid var(--border); }

/* ── Documents ── */
.doc-list-item { display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; border-bottom: 1px solid var(--border); }
.doc-list-item:last-child { border-bottom: none; }
.doc-icon { width: 36px; height: 36px; border-radius: 6px; background: var(--stone-50); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.doc-icon svg { width: 18px; height: 18px; color: var(--amber); }
.doc-info { flex: 1; }
.doc-info .doc-name { font-size: .82rem; font-weight: 600; }
.doc-info .doc-detail { font-size: .7rem; color: var(--text-secondary); margin-top: .1rem; }
.doc-actions { display: flex; gap: .3rem; }

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

/* ── Simulation Banner ── */
.sim-banner {
  display: none; position: fixed; top: 48px; left: 0; right: 0; z-index: 150;
  background: linear-gradient(135deg, #6c5ce7, #a29bfe); color: white;
  padding: .45rem 1rem; font-size: .8rem; font-weight: 600;
  align-items: center; justify-content: space-between; gap: .75rem;
  box-shadow: 0 2px 8px rgba(108,92,231,0.3);
}
.sim-banner.active { display: flex; }
.sim-banner .sim-info { display: flex; align-items: center; gap: .5rem; }
.sim-banner .sim-info svg { width: 16px; height: 16px; }
.sim-banner .sim-exit { background: rgba(255,255,255,0.2); color: white; border: 1px solid rgba(255,255,255,0.4); border-radius: 6px; padding: .25rem .65rem; font-size: .75rem; font-weight: 600; cursor: pointer; font-family: inherit; transition: background .15s; }
.sim-banner .sim-exit:hover { background: rgba(255,255,255,0.35); }

/* ── Phase progress bar ── */
.phase-bar { display: flex; gap: 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); margin-bottom: 1rem; }
.phase-bar-seg { flex: 1; padding: .4rem .2rem; text-align: center; font-size: .65rem; font-weight: 600; border-right: 1px solid var(--border); }
.phase-bar-seg:last-child { border-right: none; }
.phase-bar-seg .phase-num { display: block; font-size: .55rem; opacity: .7; }

/* ── Data Table alt ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { text-align: left; padding: .5rem .6rem; font-size: .8rem; border-bottom: 1px solid var(--border); }
.data-table th { font-weight: 600; color: var(--text-secondary); font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; background: var(--stone-50); }

/* ── Page header inside detail ── */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.page-header h1 { font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 600; }
.page-header .subtitle { font-family: 'Inter', sans-serif; font-size: .8rem; color: var(--text-secondary); margin-top: .1rem; }

/* ── Detail empty ── */
.detail-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--text-secondary); text-align: center; padding: 2rem; }
.detail-empty svg { width: 64px; height: 64px; opacity: .15; margin-bottom: 1rem; }
.detail-empty h3 { font-family: 'Playfair Display', serif; font-size: 1.1rem; color: var(--text); margin-bottom: .3rem; }
.detail-empty p { font-size: .85rem; }

/* ── FAQ ── */
.faq-item { border: 1.5px solid var(--border); border-radius: 8px; overflow: hidden; }
.faq-header { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; font-size: .82rem; font-weight: 600; transition: background .1s; }
.faq-header:hover { background: var(--stone-50); }
.faq-chevron { margin-left: auto; transition: transform .2s; font-size: .7rem; color: var(--text-secondary); }
.faq-body { display: none; padding: 0 14px 12px; font-size: .8rem; color: var(--text-secondary); line-height: 1.6; border-top: 1px solid var(--border); padding-top: 10px; margin: 0 14px; }
.faq-item.open .faq-body { display: block; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar { width: 48px; }
  .sidebar-switcher .sw-label, .sidebar-switcher .sw-chevron, .nav-item span, .nav-section-label { display: none; }
  .nav-section-group.collapsed { max-height: 500px; opacity: 1; }
  .sidebar-switcher { justify-content: center; padding: 10px; }
  .nav-item { justify-content: center; padding: 8px; }
  .nav-badge { display: none; }
  .product-dropdown { display: none !important; } /* dropdown unusable at icon-strip width */
  .list-panel { width: 200px; }
  .detail-props { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
}
