* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  overflow-x: hidden;
  background: #f6f5f1;
  color: #161616;
  font-family: 'Hanken Grotesk', sans-serif;
  display: flex;
  flex-direction: column;
}
::selection { background: #d9d8f7; }
input::placeholder { color: #adaba3; }
button { font-family: inherit; }

@keyframes hilalShine {
  0%   { background-position: 135% 0; }
  100% { background-position: -35% 0; }
}

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 32px;
  background: rgba(246,245,241,0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e6e4dd;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.diamond {
  width: 11px;
  height: 11px;
  background: #bf972f;
  transform: rotate(45deg);
  display: inline-block;
  border-radius: 2px;
}
.brand-text {
  font: 600 17px 'Space Grotesk', sans-serif;
  color: #161616;
}
.brand-sub { color: #8a8881; font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link {
  background: none;
  border: none;
  cursor: pointer;
  font: 500 15px 'Hanken Grotesk', sans-serif;
  color: #4a4843;
  padding: 8px 12px;
  border-radius: 8px;
}
.nav-link:hover { color: #161616; background: #ececea; }
.nav-login {
  font: 600 15px 'Space Grotesk', sans-serif;
  color: #161616;
  padding: 9px 14px;
  margin-left: 6px;
}
.nav-login:hover { background: #ececea; }
.btn-primary {
  background: #bf972f;
  border: none;
  cursor: pointer;
  font: 600 15px 'Space Grotesk', sans-serif;
  color: #fff;
  padding: 9px 16px;
  border-radius: 9px;
}
.btn-primary:hover { background: #9c7a22; }
.nav-signup { padding: 9px 16px; border-radius: 9px; }

main { flex: 1; }

/* HOME HERO */
.hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 32px 64px;
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  font: 500 13px 'JetBrains Mono', monospace;
  letter-spacing: 2px;
  color: #bf972f;
  margin-bottom: 22px;
}
.hero h1 {
  font: 700 clamp(44px,5vw,70px) 'Space Grotesk', sans-serif;
  line-height: 1.02;
  letter-spacing: -1px;
  margin: 0 0 22px;
  background: linear-gradient(100deg,#161616 0%,#161616 42%,#d9b25a 47%,#f6e6b8 50%,#d9b25a 53%,#161616 58%,#161616 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: hilalShine 3.4s linear infinite;
}
.hero p {
  font-size: 18px;
  line-height: 1.6;
  color: #5c5a54;
  max-width: 480px;
  margin: 0 0 32px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 34px; }
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #161616;
  border: 1px solid #ddd9cf;
  padding: 14px 24px;
  border-radius: 10px;
  font: 600 15px 'Space Grotesk', sans-serif;
  cursor: pointer;
}
.btn-outline:hover { border-color: #161616; }
.btn-lg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 10px;
  font: 600 15px 'Space Grotesk', sans-serif;
}
.codes {
  font: 400 13px 'JetBrains Mono', monospace;
  color: #9a988f;
  letter-spacing: 1px;
}
.terminal {
  background: #fff;
  border: 1px solid #e6e4dd;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(20,20,20,0.06);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid #eeece6;
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: #e0ddd4; display: inline-block; }
.terminal-path { margin-left: 8px; font: 400 12px 'JetBrains Mono', monospace; color: #9a988f; letter-spacing: 1px; }
.terminal-live {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font: 400 12px 'JetBrains Mono', monospace;
  color: #bf972f;
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #bf972f; display: inline-block; }
.terminal-body { padding: 22px; display: flex; justify-content: center; background: #fbfbf9; }
.ascii {
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  line-height: 11px;
  letter-spacing: 0;
  color: #bf972f;
  white-space: pre;
  user-select: none;
}

/* SECTION HEADERS */
.section-departments, .section-platform-inner { max-width: 1240px; margin: 0 auto; padding: 80px 32px; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.section-head h2 {
  font: 600 38px 'Space Grotesk', sans-serif;
  letter-spacing: -0.8px;
  margin: 0;
}
.section-head p {
  color: #5c5a54;
  font-size: 16px;
  max-width: 340px;
  margin: 0;
}

/* DEPARTMENT CARDS */
.dept-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.dept-card {
  text-align: left;
  background: #fff;
  border: 1px solid #e6e4dd;
  border-radius: 16px;
  padding: 26px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 190px;
}
.dept-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(20,20,20,0.08); border-color: #d3d0c7; }
.dept-code {
  align-self: flex-start;
  font: 500 12px 'JetBrains Mono', monospace;
  letter-spacing: 1px;
  color: #bf972f;
  background: #f6ecd2;
  padding: 5px 9px;
  border-radius: 7px;
}
.dept-card-title { font: 600 21px 'Space Grotesk', sans-serif; color: #161616; }
.dept-card-tag { margin: 8px 0 0; color: #5c5a54; font-size: 15px; line-height: 1.5; }
.dept-open { margin-top: auto; font: 500 13px 'JetBrains Mono', monospace; color: #bf972f; }

/* PLATFORM */
.section-platform { background: #fff; border-top: 1px solid #e6e4dd; border-bottom: 1px solid #e6e4dd; }
.section-platform-inner h2 { font: 600 38px 'Space Grotesk', sans-serif; letter-spacing: -0.8px; margin: 0 0 44px; max-width: 560px; }
.platform-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.platform-feature { display: flex; flex-direction: column; gap: 12px; padding-right: 8px; }
.feature-num { font: 500 13px 'JetBrains Mono', monospace; color: #bf972f; }
.feature-title { font: 600 19px 'Space Grotesk', sans-serif; color: #161616; }
.feature-desc { margin: 0; color: #5c5a54; font-size: 15px; line-height: 1.55; }

/* FOOTER */
.footer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand-text { font: 600 15px 'Space Grotesk', sans-serif; }
.footer-copy { font: 400 13px 'JetBrains Mono', monospace; color: #9a988f; letter-spacing: 1px; }

/* DEPARTMENT DETAIL PAGE */
.dept-page { max-width: 1100px; margin: 0 auto; padding: 44px 32px 80px; }
.back-link {
  background: none;
  border: none;
  cursor: pointer;
  font: 500 14px 'JetBrains Mono', monospace;
  color: #5c5a54;
  padding: 0;
  margin-bottom: 34px;
}
.back-link:hover { color: #bf972f; }
.dept-meta { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.dept-meta-label { font: 400 13px 'JetBrains Mono', monospace; color: #9a988f; letter-spacing: 1px; }
.dept-page h1 { font: 600 clamp(34px,4vw,50px) 'Space Grotesk', sans-serif; letter-spacing: -1px; margin: 0 0 16px; }
.dept-page-tag { font-size: 19px; line-height: 1.55; color: #5c5a54; max-width: 600px; margin: 0 0 48px; }

.dept-features { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; margin-bottom: 56px; }
.dept-feature-card {
  background: #fff;
  border: 1px solid #e6e4dd;
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dept-feature-card .feature-title { font-size: 20px; }
.dept-feature-card[id="openDailyDashboard"]:hover { border-color: #d3d0c7; box-shadow: 0 16px 34px rgba(20,20,20,0.08); }

/* EMBEDDED TOOLS (Complaints Dashboard, Competitor Agent) */
.embed-page { max-width: 1100px; margin: 0 auto; padding: 24px 32px 0; }
.embed-page .back-link { margin-bottom: 18px; }
.embed-frame {
  width: 100%;
  height: calc(100vh - 64px - 90px);
  border: none;
  display: block;
  background: #f6f5f1;
}

/* DASHBOARD PAGE — VIEW DROPDOWN */
.dash-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 0;
}
.dash-header-row h1 { margin: 0 0 16px; }
.dash-view-wrap { position: relative; margin-bottom: 16px; }
.dash-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #161616;
  color: #fff;
  border: none;
  cursor: pointer;
  font: 600 14px 'Space Grotesk', sans-serif;
  padding: 10px 16px;
  border-radius: 9px;
  white-space: nowrap;
}
.dash-view-btn:hover { background: #2d2c2a; }
.fv-arrow { font-size: 11px; opacity: 0.7; }
.dash-view-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid #e6e4dd;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(20,20,20,0.12);
  z-index: 30;
  min-width: 160px;
  overflow: hidden;
}
.dash-view-menu.open { display: block; }
.dash-view-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font: 500 14px 'Hanken Grotesk', sans-serif;
  color: #161616;
  padding: 12px 16px;
}
.dash-view-item:hover { background: #f6f5f1; color: #bf972f; }
.dash-view-item.dash-view-item-active { color: #bf972f; font-weight: 600; }
.dash-view-item + .dash-view-item { border-top: 1px solid #eeece6; }

/* PRODUCT DASHBOARD — SHEET TABS */
.view-tabs-wrap { display: flex; gap: 6px; flex-wrap: wrap; }
.view-tab {
  background: #fff;
  border: 1px solid #ddd9cf;
  cursor: pointer;
  font: 500 14px 'Hanken Grotesk', sans-serif;
  color: #4a4843;
  padding: 8px 16px;
  border-radius: 8px;
}
.view-tab:hover { border-color: #bf972f; color: #bf972f; }
.view-tab.active { background: #161616; border-color: #161616; color: #fff; }

/* REGION TOGGLE (GCC / UAE) */
.region-toggle-row {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.region-tab {
  background: #fff;
  border: 1.5px solid #ddd9cf;
  cursor: pointer;
  font: 600 13px 'Space Grotesk', sans-serif;
  color: #4a4843;
  padding: 9px 22px;
  border-radius: 10px;
  transition: border-color .15s, color .15s, background .15s;
}
.region-tab:hover { border-color: #bf972f; color: #bf972f; }
.region-tab.active { background: #bf972f; border-color: #bf972f; color: #fff; }

/* COUNTRY TAB BUTTONS (inside Performance by Country card) */
.country-tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.ctab {
  background: #f5f3ee;
  border: 1.5px solid #ddd9cf;
  cursor: pointer;
  font: 600 12px 'Space Grotesk', sans-serif;
  color: #4a4843;
  padding: 6px 16px;
  border-radius: 8px;
  transition: border-color .15s, color .15s, background .15s;
}
.ctab:hover { border-color: #bf972f; color: #bf972f; background: #fff; }
.ctab.active { background: #bf972f; border-color: #bf972f; color: #fff; }

/* PRODUCT SHEET SECTION LABEL */
.prod-sheet-header {
  font: 600 11px 'Space Grotesk', sans-serif;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .09em;
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eeece6;
}

/* DAILY DASHBOARD */
.dashboard-signin {
  background: #fff;
  border: 1px solid #e6e4dd;
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 56px;
}
.dashboard-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.dashboard-picker-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font: 500 13px 'Hanken Grotesk', sans-serif;
  color: #4a4843;
}
.dashboard-picker-label select,
.dashboard-picker-label input[type="date"] {
  padding: 10px 12px;
  border: 1px solid #ddd9cf;
  border-radius: 10px;
  font: 500 14px 'Hanken Grotesk', sans-serif;
  background: #fff;
  color: #161616;
}
.d365-period-row {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.d365-period-sep {
  font: 500 13px 'Hanken Grotesk', sans-serif;
  color: #9a988f;
  padding-bottom: 11px;
}
.d365-period-reset {
  background: none;
  border: none;
  cursor: pointer;
  font: 500 13px 'Hanken Grotesk', sans-serif;
  color: #9a988f;
  padding: 0 0 11px;
}
.d365-period-reset:hover { color: #bf972f; }
.d365-period-inputs { display: flex; align-items: center; gap: 8px; }
.dashboard-live {
  display: flex;
  align-items: center;
  gap: 6px;
  font: 400 12px 'JetBrains Mono', monospace;
  color: #bf972f;
}
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #ddd9cf;
  cursor: pointer;
  font: 600 13px 'Space Grotesk', sans-serif;
  color: #4a4843;
  padding: 8px 14px;
  border-radius: 9px;
  margin-bottom: 14px;
}
.btn-download:hover { border-color: #bf972f; color: #bf972f; }
.btn-download-row { display: flex; gap: 10px; flex-wrap: wrap; }

.sheet-table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  margin-bottom: 56px;
}
.sheet-table {
  min-width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #e6e4dd;
  border-radius: 16px;
  overflow: hidden;
  font-size: 14px;
}
.sheet-table th, .sheet-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #eeece6;
  white-space: nowrap;
}
.sheet-table thead th {
  font: 600 13px 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
  color: #bf972f;
  background: #fbfbf9;
}
.sheet-table tbody tr:nth-child(even) { background: #fcfcfa; }
.sheet-table tbody tr:last-child td { border-bottom: none; }
.sheet-table tbody tr:hover { background: #f6f2e8; }

.btn-row-action {
  background: #bf972f;
  border: none;
  cursor: pointer;
  font: 600 12px 'Space Grotesk', sans-serif;
  color: #fff;
  padding: 6px 12px;
  border-radius: 7px;
  white-space: nowrap;
}
.btn-row-action:hover { background: #9c7a22; }
.btn-row-action:disabled { background: #ddd9cf; cursor: default; }
.row-status-blocked { color: #a8623c; font-weight: 600; font-size: 13px; }

.btn-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: #fff;
  border: 1px solid #ddd9cf;
  border-radius: 50%;
  cursor: pointer;
  font: 700 13px 'Space Grotesk', sans-serif;
  color: #5c5a54;
  padding: 0;
  margin-bottom: 11px;
}
.btn-info:hover, .btn-info.is-active { border-color: #bf972f; color: #bf972f; }
.lb-info-panel { margin: 0 0 18px; }
.lb-info-panel[hidden] { display: none; }

.lb-progress {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #fff;
  border: 1px solid #e6e4dd;
  border-radius: 16px;
  padding: 22px 26px;
  margin-bottom: 24px;
}
.lb-progress-ring { flex: none; }
.lb-progress-ring circle {
  fill: none;
  stroke-width: 6;
}
.lb-progress-ring .lb-progress-track { stroke: #eeece6; }
.lb-progress-ring .lb-progress-fill {
  stroke: #bf972f;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 0.3s ease;
}
.lb-progress-pct {
  font: 700 17px 'Space Grotesk', sans-serif;
  fill: #161616;
}
.lb-progress-body { flex: 1; min-width: 0; }
.lb-progress-stage {
  font: 600 14px 'Space Grotesk', sans-serif;
  color: #161616;
  margin: 0 0 10px;
}
.lb-progress-bar-track {
  width: 100%;
  height: 8px;
  background: #eeece6;
  border-radius: 999px;
  overflow: hidden;
}
.lb-progress-bar-fill {
  height: 100%;
  background: #bf972f;
  border-radius: 999px;
  transition: width 0.3s ease;
}
.lb-progress-hint {
  font: 400 13px 'Hanken Grotesk', sans-serif;
  color: #9a988f;
  margin: 8px 0 0;
}

/* COMMITTEE REPORT — plain label+value metric cards (no icon; Committee has
   too many distinct metrics to map onto the 4 semantic stat-icon types) */
.kpi-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 600 13px 'Space Grotesk', sans-serif;
  color: #9a988f;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 28px 0 12px;
}
.kpi-section-label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #bf972f;
  flex: none;
}
.kpi-section-label:first-child { margin-top: 0; }
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
.kpi-item {
  position: relative;
  background: #fff;
  border: 1px solid #e6e4dd;
  border-radius: 14px;
  padding: 18px 18px 16px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(22,22,22,0.03);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.kpi-item::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: #bf972f;
}
.kpi-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(22,22,22,0.08);
  border-color: #ddd9cf;
}
.kpi-item--sage::before { background: #5c8a6e; }
.kpi-item--rust::before { background: #a8623c; }
.kpi-item--slate::before { background: #5b6c94; }
.kpi-item--plum::before { background: #8a6fae; }
.kpi-item--teal::before { background: #3f8c8a; }
.kpi-label {
  font: 500 11px 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #9a988f;
  margin-bottom: 8px;
}
.kpi-value {
  font: 700 23px 'Space Grotesk', sans-serif;
  color: #161616;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}

/* COMMITTEE REPORT — grouped metric panels (replaces a flat wall of
   identically-styled boxes with visually distinct, titled sections) */
.kpi-panel {
  background: #fbfbf9;
  border: 1px solid #eeece6;
  border-radius: 18px;
  padding: 22px 22px 20px;
  margin-bottom: 18px;
}
.kpi-panel-header {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
}
.kpi-panel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #bf972f;
  flex: none;
}
.kpi-panel-dot--sage { background: #5c8a6e; }
.kpi-panel-dot--rust { background: #a8623c; }
.kpi-panel-dot--slate { background: #5b6c94; }
.kpi-panel-dot--plum { background: #8a6fae; }
.kpi-panel-title {
  font: 600 14.5px 'Space Grotesk', sans-serif;
  color: #161616;
  letter-spacing: -0.1px;
}
.kpi-panel .kpi-item { background: #fff; }
.kpi-panel .kpi-grid:last-child { margin-bottom: 0; }

/* COMMITTEE REPORT — hero summary banner */
.committee-hero {
  background: #161616;
  color: #fff;
  border-radius: 20px;
  padding: 32px 36px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.committee-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 88% 15%, rgba(191,151,47,0.25), transparent 55%);
  pointer-events: none;
}
.committee-hero-label {
  font: 500 12px 'JetBrains Mono', monospace;
  letter-spacing: 2px;
  color: #d9b25a;
  margin-bottom: 18px;
  position: relative;
}
.committee-hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  position: relative;
}
.committee-hero-main { min-width: 200px; }
.committee-hero-value {
  font: 700 42px 'Space Grotesk', sans-serif;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.committee-hero-sub {
  font: 400 13px 'Hanken Grotesk', sans-serif;
  color: #c9c7bf;
  margin-top: 6px;
}
.committee-hero-stats {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}
.committee-hero-stats > div { display: flex; flex-direction: column; gap: 6px; }
.committee-hero-stats span {
  font: 700 19px 'Space Grotesk', sans-serif;
  letter-spacing: -0.3px;
}
.committee-hero-stats label {
  font: 400 11.5px 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #9a988f;
}

/* BRAND DASHBOARD */
.brand-hero {
  background: #161616;
  color: #fff;
  border-radius: 20px;
  padding: 36px 40px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.brand-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(191,151,47,0.22), transparent 55%);
  pointer-events: none;
}
.brand-hero-label {
  font: 500 12px 'JetBrains Mono', monospace;
  letter-spacing: 2px;
  color: #d9b25a;
  margin-bottom: 18px;
  position: relative;
}
.brand-hero-row {
  display: flex;
  align-items: center;
  gap: 36px;
  flex-wrap: wrap;
  position: relative;
}
.brand-hero-total {
  font: 700 56px 'Space Grotesk', sans-serif;
  letter-spacing: -1px;
  color: #f6e6b8;
}
.brand-hero-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.brand-hero-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font: 400 13px 'Hanken Grotesk', sans-serif;
  color: #aeaca6;
}
.brand-hero-stat span {
  font: 600 22px 'JetBrains Mono', monospace;
  color: #fff;
}
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.brand-card {
  background: #fff;
  border: 1px solid #e6e4dd;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.brand-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #bf972f, #f6e6b8, #bf972f);
}
.brand-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(20,20,20,0.08);
  border-color: #d3d0c7;
}
.brand-card-code {
  align-self: flex-start;
  font: 600 12px 'JetBrains Mono', monospace;
  letter-spacing: 1px;
  color: #bf972f;
  background: #f6ecd2;
  padding: 5px 10px;
  border-radius: 7px;
}
.brand-card-total {
  font: 700 38px 'Space Grotesk', sans-serif;
  letter-spacing: -1px;
  color: #161616;
  margin-top: 4px;
}
.brand-card-sub {
  font: 400 12px 'JetBrains Mono', monospace;
  letter-spacing: 1px;
  color: #9a988f;
  margin-top: -8px;
}
.brand-card-metrics {
  display: flex;
  gap: 16px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid #eeece6;
}
.brand-metric { display: flex; flex-direction: column; gap: 3px; }
.brand-metric-val { font: 600 17px 'JetBrains Mono', monospace; color: #161616; }
.brand-metric-label { font: 400 12px 'Hanken Grotesk', sans-serif; color: #9a988f; }

.change-pill {
  align-self: flex-start;
  font: 500 12px 'JetBrains Mono', monospace;
  padding: 5px 10px;
  border-radius: 999px;
  margin-top: 4px;
}
.change-up { background: #e6f4e8; color: #1f7a3a; }
.change-down { background: #fbe9e7; color: #b3392c; }
.change-flat { background: #ececea; color: #5c5a54; }
.change-na { background: #ececea; color: #9a988f; }
.brand-hero .change-pill.change-up { background: rgba(31,122,58,0.18); color: #8fe0a6; }
.brand-hero .change-pill.change-down { background: rgba(179,57,44,0.2); color: #f3a89c; }
.brand-hero .change-pill.change-flat,
.brand-hero .change-pill.change-na { background: rgba(255,255,255,0.1); color: #d8d6cf; }

.detail-toggle {
  margin-bottom: 56px;
}
.detail-toggle summary {
  cursor: pointer;
  font: 500 13px 'JetBrains Mono', monospace;
  letter-spacing: 1px;
  color: #9a988f;
  padding: 12px 0;
  list-style: none;
}
.detail-toggle summary::-webkit-details-marker { display: none; }
.detail-toggle summary::before { content: "▸ "; color: #bf972f; }
.detail-toggle[open] summary::before { content: "▾ "; }
.detail-toggle .sheet-table-wrap { margin-top: 12px; }

.switch-label { font: 500 13px 'JetBrains Mono', monospace; letter-spacing: 1px; color: #9a988f; margin-bottom: 14px; }
.switch-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 56px; }
.switch-pill {
  background: #fff;
  border: 1px solid #ddd9cf;
  cursor: pointer;
  font: 500 14px 'Hanken Grotesk', sans-serif;
  color: #3a3833;
  padding: 9px 15px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.switch-pill:hover { border-color: #bf972f; color: #bf972f; }
.switch-pill-code { font: 500 12px 'JetBrains Mono', monospace; color: #bf972f; }

.dept-cta {
  background: #161616;
  color: #fff;
  border-radius: 20px;
  padding: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.dept-cta-title { font: 600 27px 'Space Grotesk', sans-serif; }
.dept-cta-sub { margin: 10px 0 0; color: #aeaca6; font-size: 16px; }
.dept-cta-btn {
  background: #fff;
  color: #161616;
  border: none;
  padding: 14px 26px;
  border-radius: 10px;
  font: 600 15px 'Space Grotesk', sans-serif;
  cursor: pointer;
  white-space: nowrap;
}
.dept-cta-btn:hover { background: #f3e7c8; }

/* AUTH (LOGIN / SIGNUP) */
.auth-section {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}
.auth-box { width: 100%; max-width: 430px; }
.auth-eyebrow {
  font: 500 13px 'JetBrains Mono', monospace;
  letter-spacing: 2px;
  color: #bf972f;
  margin-bottom: 14px;
  text-align: center;
}
.auth-box h2 {
  font: 600 30px 'Space Grotesk', sans-serif;
  letter-spacing: -0.6px;
  margin: 0 0 28px;
  text-align: center;
}
.auth-form {
  background: #fff;
  border: 1px solid #e6e4dd;
  border-radius: 18px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font: 500 13px 'Hanken Grotesk', sans-serif;
  color: #4a4843;
}
.auth-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd9cf;
  border-radius: 10px;
  font: 400 15px 'Hanken Grotesk', sans-serif;
  background: #faf9f6;
  color: #161616;
  outline: none;
}
.auth-form input:focus { border-color: #bf972f; background: #fff; }
.auth-submit {
  margin-top: 6px;
  background: #bf972f;
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 10px;
  font: 600 15px 'Space Grotesk', sans-serif;
  cursor: pointer;
}
.auth-submit:hover { background: #9c7a22; }
.auth-switch { text-align: center; color: #5c5a54; font-size: 15px; margin: 22px 0 0; }
.auth-switch button, .auth-switch a {
  background: none;
  border: none;
  cursor: pointer;
  color: #bf972f;
  font: 600 15px 'Hanken Grotesk', sans-serif;
  padding: 0;
  text-decoration: none;
}
.auth-switch a:hover { text-decoration: underline; }

.auth-message {
  text-align: center;
  font: 500 14px 'Hanken Grotesk', sans-serif;
  margin: 0 0 16px;
  min-height: 0;
}
.auth-message:empty { margin: 0; }
.auth-message-error { color: #b3392c; }
.auth-message-info { color: #1f7a3a; }

/* NAV — logged-in state */
.nav-user {
  font: 500 14px 'Hanken Grotesk', sans-serif;
  color: #4a4843;
  padding: 8px 12px;
  display: inline-block;
}

/* GUEST GATE — shake + toast */
@keyframes hilalShake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}
.shake { animation: hilalShake 0.5s; border-color: #b3392c !important; }

.auth-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: #161616;
  color: #fff;
  padding: 13px 22px;
  border-radius: 10px;
  font: 500 14px 'Hanken Grotesk', sans-serif;
  box-shadow: 0 12px 30px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
}
.auth-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* DASHBOARD — STAT ROW */
.stat-row {
  background: #fff;
  border: 1px solid #e6e4dd;
  border-radius: 18px;
  padding: 28px 30px;
  margin-bottom: 24px;
}
.stat-row-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 500 12px 'JetBrains Mono', monospace;
  letter-spacing: 2px;
  color: #9a988f;
  margin-bottom: 22px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.stat-item { display: flex; align-items: center; gap: 14px; }
.stat-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 600 18px 'Space Grotesk', sans-serif;
  color: #fff;
}
.stat-icon-total { background: #bf972f; }
.stat-icon-new { background: #5c8a6e; }
.stat-icon-returned { background: #a8623c; }
.stat-icon-walk { background: #5b6c94; }
.stat-value { font: 700 24px 'Space Grotesk', sans-serif; color: #161616; letter-spacing: -0.5px; }
.stat-label { font: 400 13px 'Hanken Grotesk', sans-serif; color: #9a988f; }

/* SMS CAMPAIGN — VIP / Usual Customer tags shown inline next to the mobile number */
.vip-tag {
  display: inline-block;
  font: 700 11px 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
  color: #9c7a22;
  background: #faf1dc;
  border: 1px solid #e6d2a0;
  border-radius: 6px;
  padding: 2px 7px;
  margin-left: 4px;
}
.usual-tag {
  font: 400 13px 'Hanken Grotesk', sans-serif;
  font-style: italic;
  color: #9a988f;
  margin-left: 4px;
}
.sms-filter-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 24px;
  align-items: start;
  margin-top: 18px;
}
.sms-filter-label {
  font: 600 11px 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #9a988f;
  margin-bottom: 8px;
}
.brand-check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.brand-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 13px 'Space Grotesk', sans-serif;
  color: #4a4843;
  cursor: pointer;
  background: #fff;
  border: 1.5px solid #ddd9cf;
  border-radius: 10px;
  padding: 8px 14px 8px 18px;
  transition: border-color .15s, box-shadow .15s;
}
.brand-check::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-color, #bf972f);
}
.brand-check:has(input:checked) {
  border-color: var(--brand-color, #bf972f);
  box-shadow: 0 0 0 1px var(--brand-color, #bf972f) inset;
}
.brand-check input { accent-color: var(--brand-color, #bf972f); cursor: pointer; }

.sms-store-panel { margin-top: 22px; }
.sms-store-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.sms-store-panel-header .sms-filter-label { margin-bottom: 0; }
.store-select-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 12.5px 'Space Grotesk', sans-serif;
  color: #bf972f;
  cursor: pointer;
}
.store-select-all input { accent-color: #bf972f; cursor: pointer; }
.store-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2px 14px;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e6e4dd;
  border-radius: 12px;
  padding: 10px 14px;
}
.store-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 500 13px 'Hanken Grotesk', sans-serif;
  color: #4a4843;
  cursor: pointer;
  padding: 6px 4px;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.store-check:hover { background: #f6f2e8; }
.store-check input { accent-color: #bf972f; cursor: pointer; flex: none; }
@media (max-width: 900px) {
  .sms-filter-grid-2 { grid-template-columns: 1fr; }
  .store-check-grid { grid-template-columns: 1fr; }
}

/* DASHBOARD — CHART + RANKING */
.dash-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
  align-items: stretch;
}
.dash-grid-3 { grid-template-columns: repeat(3, 1fr); }
.dash-grid-full { margin-bottom: 32px; }
.dash-card {
  background: #fff;
  border: 1px solid #e6e4dd;
  border-radius: 18px;
  padding: 32px 34px;
}
.dash-card-title {
  font: 600 18px 'Space Grotesk', sans-serif;
  color: #161616;
  margin-bottom: 26px;
}
.bars-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 18px;
  height: 260px;
}
.bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  height: 100%;
}
.bar-track {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: repeating-linear-gradient(to top, #fbfbf9 0, #fbfbf9 1px, transparent 1px, transparent 25%);
  border-radius: 8px;
  overflow: hidden;
}
.bar-fill {
  width: 60%;
  border-radius: 7px 7px 2px 2px;
  min-height: 4px;
  transition: height 0.4s cubic-bezier(.2,.8,.2,1);
  filter: brightness(1);
  box-shadow: 0 -2px 10px rgba(22,22,22,0.08);
}
/* Sits above the track, not inside the colored fill — a short bar used to
   leave almost no room for its own value text, and a long AED figure could
   be wider than a narrow column's 60%-width fill, so it either clipped or
   forced the whole row wider than the page (see barsChartCard's comment).
   Up here it always has the column's full width to work with. */
.bar-value {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 700 12px 'JetBrains Mono', monospace;
  color: #161616;
  text-align: center;
}
/* Fixed-height, up-to-2-line clamp (not plain wrapping) -- a column whose
   label happened to wrap ("GIFT BOX" -> two lines) used to reserve more
   height for itself than its single-line neighbors, shrinking its own
   bar-track (flex:1 splits whatever's left) and making that one bar sit
   visibly lower than bars of the same value next to it. Reserving the same
   2-line height for every column regardless of its own line count keeps
   every track the same height, so bar heights stay comparable across the
   row -- and lets full store/category names show instead of the old
   JS mid-word "…" truncation. */
.bar-label {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.6em;
  font: 600 13px 'Space Grotesk', sans-serif;
  line-height: 1.3;
  color: #5c5a54;
  letter-spacing: 0.3px;
  text-align: center;
}

.hbars-chart {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.hbar-row {
  display: grid;
  grid-template-columns: 180px 1fr 56px;
  align-items: center;
  gap: 14px;
}
.hbar-label {
  font: 600 13px 'Space Grotesk', sans-serif;
  color: #5c5a54;
  letter-spacing: 0.3px;
  line-height: 1.3;
}
.hbar-track {
  height: 14px;
  background: #f6f5f1;
  border-radius: 999px;
  overflow: hidden;
}
.hbar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(.2,.8,.2,1);
}
.hbar-value {
  font: 700 12px 'JetBrains Mono', monospace;
  color: #161616;
  text-align: right;
}
@media (max-width: 860px) {
  .hbar-row { grid-template-columns: 110px 1fr 48px; gap: 8px; }
}
.chart-card .dash-card-title { margin-bottom: 26px; }

.split-card .dash-card-title { margin-bottom: 18px; }
.split-meter-track {
  display: flex;
  height: 26px;
  border-radius: 999px;
  overflow: hidden;
  background: #ececea;
}
.split-meter-fill {
  height: 100%;
  min-width: 2px;
  transition: width 0.4s cubic-bezier(.2,.8,.2,1);
}
.split-meter-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 18px;
}
.split-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 500 13px 'Hanken Grotesk', sans-serif;
  color: #5c5a54;
}
.split-legend-item strong { color: #161616; font-weight: 700; }
.split-legend-item i {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  display: inline-block;
}

.rank-list { display: flex; flex-direction: column; gap: 18px; }
.rank-item { display: flex; gap: 14px; align-items: flex-start; }
.rank-badge {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 600 11px 'JetBrains Mono', monospace;
  color: #fff;
}
.rank-body { flex: 1; }
.rank-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.rank-name { font: 600 15px 'Space Grotesk', sans-serif; color: #161616; }
.rank-total { font: 700 18px 'Space Grotesk', sans-serif; color: #161616; }
.rank-progress-track { height: 6px; background: #ececea; border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.rank-progress-fill { height: 100%; border-radius: 999px; transition: width 0.3s ease; }
.rank-sub {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  font: 400 12px 'Hanken Grotesk', sans-serif;
  color: #9a988f;
}
.rank-sub .change-pill { margin-left: 6px; padding: 3px 8px; }

/* DASHBOARD — STORE PERFORMANCE */
.store-card { margin-bottom: 20px; }
.store-groups { display: flex; flex-direction: column; gap: 28px; }
.store-group-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.store-group-title { font: 600 15px 'Space Grotesk', sans-serif; color: #161616; }
.store-group-count {
  font: 400 12px 'JetBrains Mono', monospace;
  color: #9a988f;
  margin-left: auto;
}
.store-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.store-item {
  background: #fbfbf9;
  border: 1px solid #eeece6;
  border-radius: 12px;
  padding: 14px 16px;
}
.store-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; gap: 10px; }
.store-name { font: 500 13px 'Hanken Grotesk', sans-serif; color: #161616; }
.store-total { font: 700 16px 'Space Grotesk', sans-serif; color: #161616; }
.store-progress-track { height: 5px; background: #ececea; border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.store-progress-fill { height: 100%; border-radius: 999px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .dept-grid { grid-template-columns: 1fr; }
  .platform-grid { grid-template-columns: repeat(2,1fr); }
  .dept-features { grid-template-columns: 1fr; }
  .nav-links { gap: 2px; }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .store-list { grid-template-columns: 1fr; }
}
