/* HSPOTAGENT CEO Mockup — Vuexy-aligned design tokens */
:root {
  --primary: #0000ff;
  --primary-rgb: 0, 0, 255;
  --on-primary: #fff;
  --success: #28c76f;
  --info: #00cfe8;
  --warning: #ff9f43;
  --error: #ea5455;
  --secondary: #a8aaae;
  --bg: #f8f7fa;
  --surface: #fff;
  --text: #2f2b3d;
  --text-muted: #6d6b77;
  --border: rgba(47, 43, 61, 0.12);
  --sidebar-w: 260px;
  --navbar-h: 64px;
  --bottom-nav-h: 64px;
  --radius: 6px;
  --shadow: 0 2px 6px rgba(47, 43, 61, 0.08);
  --font: 'Public Sans', system-ui, sans-serif;
}

[data-theme='dark'] {
  --bg: #25293c;
  --surface: #2f3349;
  --text: #cfd3ec;
  --text-muted: #7983bb;
  --border: rgba(207, 211, 236, 0.12);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.app { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 1001;
  transition: transform 0.25s ease;
}
.sidebar__brand {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  min-height: 64px;
  display: flex;
  align-items: center;
}
.sidebar__logo { height: 32px; width: auto; max-width: 100%; }
.sidebar__logo-fallback {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
  align-items: center;
  gap: 0.5rem;
}
.sidebar__tier {
  margin: 0.75rem 1rem;
  padding: 0.5rem 0.75rem;
  background: rgba(var(--primary-rgb), 0.08);
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0.75rem 1rem;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: background 0.15s, color 0.15s;
  margin-bottom: 2px;
}
.nav-item i { font-size: 1.25rem; width: 1.25rem; text-align: center; }
.nav-item:hover { background: rgba(var(--primary-rgb), 0.06); color: var(--text); }
.nav-item.active {
  background: rgba(var(--primary-rgb), 0.12);
  color: var(--primary);
  font-weight: 600;
}
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
}

.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--navbar-h);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  gap: 1rem;
}
[data-theme='dark'] .navbar { background: rgba(47, 51, 73, 0.9); }
.navbar__left, .navbar__right { display: flex; align-items: center; gap: 0.5rem; }
.navbar__menu { display: none; }
.navbar__search { position: relative; display: flex; align-items: center; min-width: 220px; }
.navbar__search i { position: absolute; left: 0.75rem; color: var(--text-muted); pointer-events: none; }
.navbar__search input {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
}
.navbar__search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.15);
}
.search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: 280px;
  overflow-y: auto;
  z-index: 200;
}
.search-results a {
  display: block;
  padding: 0.6rem 0.85rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
}
.search-results a:hover { background: rgba(var(--primary-rgb), 0.06); }
.search-results small { color: var(--text-muted); display: block; font-size: 0.75rem; }

.icon-btn {
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 1.25rem;
}
.icon-btn:hover { background: rgba(var(--primary-rgb), 0.08); color: var(--text); }
.badge-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--error);
  border-radius: 50%;
  border: 2px solid var(--surface);
}

.role-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.75rem;
}
.role-switch__btn {
  padding: 0.35rem 0.65rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}
.role-switch__btn.active { background: var(--primary); color: var(--on-primary); }

.buffer-chip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  background: rgba(var(--primary-rgb), 0.08);
  border-radius: 999px;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
}
.user-menu__btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  padding: 0.25rem;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.page-content {
  flex: 1;
  padding: 1.25rem 1.5rem 2rem;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}
.page-header { margin-bottom: 1.25rem; }
.page-header h1 { margin: 0 0 0.25rem; font-size: 1.5rem; font-weight: 600; }
.page-header p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }

.context-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.context-bar label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.context-bar select {
  padding: 0.4rem 2rem 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  min-width: 200px;
}
.context-bar__hint { font-size: 0.8rem; color: var(--text-muted); margin-left: auto; }

/* Hub tabs — compact multi-row grid (no horizontal scroll) */
.tabs--grid {
  display: grid;
  gap: 0.35rem;
  padding: 0.45rem;
  margin-bottom: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.tabs--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tabs--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tabs--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tabs--compact { grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); }

.tab {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.3rem;
  min-height: 0;
  padding: 0.3rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  line-height: 1.2;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.tab:hover {
  color: var(--text);
  border-color: rgba(var(--primary-rgb), 0.35);
  background: rgba(var(--primary-rgb), 0.04);
}
.tab.active {
  color: var(--primary);
  border-color: rgba(var(--primary-rgb), 0.4);
  background: rgba(var(--primary-rgb), 0.08);
  font-weight: 600;
  box-shadow: none;
}
.tab.active .tab__icon {
  background: var(--primary);
  color: #fff;
}
.tab__icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  background: rgba(var(--primary-rgb), 0.08);
  color: var(--primary);
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.tab__label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
  word-break: break-word;
}
.tab .badge {
  font-size: 0.55rem;
  padding: 0.05rem 0.25rem;
  border-radius: 3px;
  background: var(--error);
  color: #fff;
  font-weight: 700;
  line-height: 1.1;
}
.sub-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.sub-tab {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}
.sub-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}
.card__header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.card__header h2, .card__header h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.card__body { padding: 1.25rem; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.kpi-grid .kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.kpi-grid .kpi-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(47,43,61,0.12); }
.kpi-grid .kpi-card__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}
.kpi-grid .kpi-card__icon--success { background: rgba(40,199,111,0.12); color: var(--success); }
.kpi-grid .kpi-card__icon--danger { background: rgba(234,84,85,0.12); color: var(--error); }
.kpi-grid .kpi-card__icon--warning { background: rgba(255,159,67,0.12); color: var(--warning); }
.kpi-grid .kpi-card__icon--info { background: rgba(0,207,232,0.12); color: var(--info); }
.kpi-grid .kpi-card__icon--primary { background: rgba(var(--primary-rgb),0.12); color: var(--primary); }
.kpi-grid .kpi-card__label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.kpi-grid .kpi-card__value { font-size: 1.25rem; font-weight: 700; }

/* Dashboard KPI cards — matches Vuexy dashboard/index.vue */
.kpi-row {
  display: flex;
  flex-wrap: wrap;
  margin: -12px;
  margin-bottom: 4px;
}
.kpi-col {
  box-sizing: border-box;
  padding: 12px;
  width: 100%;
  flex: 0 0 100%;
  max-width: 100%;
}
@media (min-width: 600px) {
  .kpi-col { flex: 0 0 50%; max-width: 50%; }
}
@media (min-width: 960px) {
  .kpi-col { flex: 0 0 33.333333%; max-width: 33.333333%; }
}
@media (min-width: 1280px) {
  .kpi-col { flex: 0 0 25%; max-width: 25%; }
}

.kpi-row .kpi-card {
  display: block;
  height: 100%;
  background: var(--surface);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(47, 43, 61, 0.08);
  border: none;
  text-decoration: none;
  color: inherit;
}
.kpi-row .kpi-card-clickable {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.kpi-row .kpi-card-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
.kpi-row .kpi-card__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  gap: 12px;
  min-height: 76px;
}
.kpi-row .kpi-card__label {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 2px;
}
.kpi-row .kpi-card__value {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}
.kpi-row .kpi-card__suffix {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}
.kpi-row .kpi-card__value--stacked {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.3;
  font-weight: 400;
  font-size: inherit;
}
.kpi-row .kpi-card__count {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}
.kpi-row .kpi-card__amount {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.issue-list { display: flex; flex-direction: column; gap: 0.65rem; }
.issue-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
}
.issue-item--error { border-left: 3px solid var(--error); }
.issue-item--warning { border-left: 3px solid var(--warning); }
.issue-item__icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
}
.issue-item--error .issue-item__icon { background: rgba(234, 84, 85, 0.12); color: var(--error); }
.issue-item--warning .issue-item__icon { background: rgba(255, 159, 67, 0.12); color: var(--warning); }
.issue-item__text { font-size: 0.85rem; font-weight: 500; line-height: 1.35; }
.issue-item__time { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.15rem; }

.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 1.35rem;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}
.kpi-icon--info { background: linear-gradient(135deg, #17c1e8 0%, #3f51b5 100%); }
.kpi-icon--warning { background: linear-gradient(135deg, #ffb547 0%, #ff6b6b 100%); }
.kpi-icon--dark { background: linear-gradient(135deg, #111827 0%, #4b5563 100%); }
.kpi-icon--success { background: linear-gradient(135deg, #2dce89 0%, #1abc9c 100%); }
.kpi-icon--danger { background: linear-gradient(135deg, #f5365c 0%, #fb6340 100%); }
.kpi-icon--secondary { background: linear-gradient(135deg, #64748b 0%, #94a3b8 100%); }
.kpi-icon--primary { background: linear-gradient(135deg, #5e72e4 0%, #825ee4 100%); }

/* Expansion panel — matches VExpansionPanels "More stats" */
.kpi-expansion {
  margin: 12px 0 20px;
  background: var(--surface);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(47, 43, 61, 0.08);
  overflow: hidden;
}
.kpi-expansion__title {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border: none;
  background: var(--surface);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.kpi-expansion__title:hover { background: rgba(var(--primary-rgb), 0.04); }
.kpi-expansion__chevron {
  font-size: 1.25rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.kpi-expansion__title.is-open .kpi-expansion__chevron { transform: rotate(180deg); }
.kpi-expansion__body {
  padding: 0 8px 16px;
  border-top: 1px solid var(--border);
}
.kpi-expansion__body[hidden] { display: none !important; }
.kpi-expansion__body .kpi-row { margin-top: 4px; }

/* Stacked bar charts */
.chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.chart-row--single { grid-template-columns: 1fr; }
.chart-card__header { flex-wrap: wrap; }
.chart-card__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.chart-period {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.chart-period select {
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font-family: inherit;
  font-size: 0.8rem;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.chart-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.chart-legend__item i {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  display: inline-block;
  font-style: normal;
}
.stacked-chart {
  display: flex;
  gap: 0.5rem;
  height: 240px;
  align-items: stretch;
}
.stacked-chart__y {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--text-muted);
  padding-bottom: 1.5rem;
  min-width: 36px;
  text-align: right;
}
.stacked-chart__plot {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0 0.25rem 0;
  background: repeating-linear-gradient(
    to top,
    transparent,
    transparent calc(20% - 1px),
    rgba(47, 43, 61, 0.06) calc(20% - 1px),
    rgba(47, 43, 61, 0.06) 20%
  );
}
.stacked-chart__col-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  min-width: 0;
}
.stacked-chart__col {
  width: 100%;
  max-width: 28px;
  display: flex;
  flex-direction: column-reverse;
  align-items: stretch;
  margin-top: auto;
}
.stacked-chart__seg { min-height: 1px; transition: opacity 0.15s; }
.stacked-chart__seg:hover { opacity: 0.85; }
.stacked-chart__x {
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  transform: rotate(-45deg);
  transform-origin: top left;
  white-space: nowrap;
  height: 2rem;
}
.data-table--compact th, .data-table--compact td { padding: 0.4rem 0.5rem; font-size: 0.75rem; }

@media (max-width: 1024px) {
  .two-col { grid-template-columns: 1fr; }
  .chart-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .kpi-card__inner { padding: 14px 16px; min-height: 72px; }
  .kpi-card__value { font-size: 1rem; }
  .stacked-chart { height: 200px; }
  .stacked-chart__col { max-width: 22px; }
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.toolbar input, .toolbar select {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
}
.toolbar .grow { flex: 1; min-width: 140px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { filter: brightness(1.08); }
.btn--outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn--text { background: none; color: var(--primary); border: none; }
.btn--sm { padding: 0.35rem 0.65rem; font-size: 0.8rem; }
.btn--success { background: var(--success); color: #fff; }

.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th, .data-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--bg);
  white-space: nowrap;
}
.data-table tbody tr:hover { background: rgba(var(--primary-rgb), 0.03); }

.chip {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.chip--success { background: rgba(40,199,111,0.12); color: var(--success); }
.chip--warning { background: rgba(255,159,67,0.12); color: var(--warning); }
.chip--error { background: rgba(234,84,85,0.12); color: var(--error); }
.chip--info { background: rgba(0,207,232,0.12); color: var(--info); }

.mobile-cards { display: none; }
.mobile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.75rem;
}
.mobile-card__row {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  font-size: 0.85rem;
}
.mobile-card__row span:first-child { color: var(--text-muted); }

.chart-placeholder {
  height: 280px;
  background: linear-gradient(180deg, rgba(var(--primary-rgb),0.04) 0%, transparent 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding: 1rem 0.5rem 0;
  gap: 4px;
}
.chart-bar {
  flex: 1;
  max-width: 24px;
  background: var(--primary);
  border-radius: 4px 4px 0 0;
  opacity: 0.85;
  min-height: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field span { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.field input, .field select, .field textarea {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}

.wizard-steps { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.wizard-step {
  flex: 1;
  min-width: 100px;
  text-align: center;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8rem;
}
.wizard-step.done { border-color: var(--success); color: var(--success); }
.wizard-step.active {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb),0.08);
  color: var(--primary);
  font-weight: 600;
}

.collapsible__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.collapsible__body { display: none; }
.collapsible.open .collapsible__body { display: block; }

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 999;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.35rem;
  border: none;
  background: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.65rem;
  cursor: pointer;
  text-decoration: none;
}
.bottom-nav__item i { font-size: 1.35rem; }
.bottom-nav__item.active { color: var(--primary); font-weight: 600; }

.more-drawer { position: fixed; inset: 0; z-index: 1100; }
.more-drawer__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.more-drawer__panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  max-height: 70vh;
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom);
}
.more-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.more-drawer__header h3 { margin: 0; font-size: 1.1rem; }
.more-drawer__links a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.more-drawer__links a i { font-size: 1.25rem; color: var(--primary); }

.feedback-fab {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 1rem);
  right: 1.25rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.4);
  cursor: pointer;
  font-size: 1.35rem;
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal[hidden] { display: none !important; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.modal__panel {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.modal__panel--sm { max-width: 400px; }
.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.modal__header h3 { margin: 0; font-size: 1rem; }
.modal__body { padding: 1.25rem; overflow-y: auto; flex: 1; }
.modal__footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
.column-check { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0; }
.column-group { margin-bottom: 1rem; }
.column-group h4 { margin: 0 0 0.5rem; font-size: 0.75rem; text-transform: uppercase; color: var(--text-muted); }

.footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}
.footer__tag { color: var(--primary); font-weight: 600; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.stat-row { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.stat-row strong { display: block; font-size: 1.1rem; }

.timeline { border-left: 2px solid var(--border); margin-left: 0.5rem; padding-left: 1.25rem; }
.timeline__item { margin-bottom: 1rem; position: relative; }
.timeline__item::before {
  content: '';
  position: absolute;
  left: -1.4rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
}
.timeline__time { font-size: 0.75rem; color: var(--text-muted); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.product-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.product-card__img {
  height: 120px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb),0.1), rgba(0,207,232,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--primary);
}
.product-card__body { padding: 0.75rem; }
.product-card__price { font-weight: 700; color: var(--primary); }

@media (max-width: 1024px) {
  .two-col { grid-template-columns: 1fr; }
}

@media (min-width: 1400px) {
  .tabs--cols-4 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .tabs--cols-3 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .tabs--cols-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-100%); width: 280px; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .navbar__menu { display: flex; }
  .navbar__search { display: none; }
  .page-content { padding: 1rem 1rem calc(var(--bottom-nav-h) + 4rem); }
  .bottom-nav { display: flex; }
  .feedback-fab { bottom: calc(var(--bottom-nav-h) + 0.75rem); right: 1rem; }
  .desktop-table { display: none; }
  .mobile-cards { display: block; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .kpi-card { padding: 0.75rem; }
  .kpi-card__value { font-size: 1rem; }
  .context-bar__hint { width: 100%; margin-left: 0; }
  .hide-mobile { display: none !important; }

  /* Hub tabs — stay compact on mobile */
  .tabs--cols-4,
  .tabs--cols-3,
  .tabs--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tab { padding: 0.28rem 0.4rem; font-size: 0.65rem; }
  .tab__icon { width: 18px; height: 18px; font-size: 0.7rem; }
}

@media (min-width: 769px) {
  .bottom-nav { display: none !important; }
}
