:root {
  /* Core */
  --indigo: #141361;
  --violet: #5a58bc;
  --lilac: #edebf9;

  /* Neutral */
  --ink: #101014;
  --slate: #4e4e4e;
  --line: #c5c5c5;
  --mist: #f5f5f7;
  --white: #ffffff;

  /* Accent (state only) */
  --crema: #f3e7d8;
  --signal: #1fa971;
  --signal-tint: #e4f6ee;
  --alert: #d64545;
  --alert-tint: #fbeaea;

  /* Reward (incentive context only) */
  --reward-gold: #f4c36c;
  --gradient-start: #370083;
  --gradient-end: #bd49f7;

  /* Spacing scale — 8pt base */
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-6: 48px;

  --radius-card: 12px;
  --radius-control: 8px;
  --radius-reward: 20px;

  font-size: 16px;
}

* { box-sizing: border-box; }
/* An author rule setting display: on a hidden element beats the UA [hidden]
   default, since author styles always outrank UA ones — so toggling the
   `hidden` attribute alone silently fails on any class below that sets its
   own display. This reset keeps `el.hidden = true` reliable everywhere. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Shell + sidebar ---------- */
.shell { display: flex; min-height: 100vh; align-items: stretch; }

.sidebar {
  width: 264px;
  flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-logo { padding: var(--sp-3) var(--sp-3) var(--sp-2); }
.sidebar-logo img { height: 22px; width: auto; display: block; }

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--sp-2) var(--sp-3) var(--sp-3);
  margin-bottom: var(--sp-2);
  border-bottom: 1px solid var(--line);
}
.sidebar-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--violet);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.sidebar-profile-text { min-width: 0; }
.sidebar-name { font-size: 13.5px; font-weight: 700; color: var(--ink); line-height: 18px; }
.sidebar-sub { font-size: 11.5px; color: var(--slate); line-height: 15px; }

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 var(--sp-2) var(--sp-3); }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-control);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--slate);
  text-decoration: none;
  cursor: pointer;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: var(--mist); color: var(--ink); }
.nav-item.active { background: var(--lilac); color: var(--violet); font-weight: 700; }

.app { flex: 1; min-width: 0; max-width: 1360px; padding: var(--sp-4) var(--sp-4) var(--sp-6); }

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.weather-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.weather-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 8px;
  min-width: 44px;
}
.weather-day-label { font-size: 10px; font-weight: 700; color: var(--slate); text-transform: uppercase; }
.weather-icon { font-size: 16px; line-height: 1; }
.weather-temp { font-size: 11px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.weather-temp-low { color: var(--slate); font-weight: 500; margin-left: 2px; }
.weather-loading, .weather-error { font-size: 12px; color: var(--slate); align-self: center; }

.topbar-left { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }

.pill-select, .pill-static {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px var(--sp-2);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
}

.pill-select { cursor: pointer; }
.pill-select:hover { border-color: var(--violet); }
.pill-select .icon, .pill-static .icon { width: 17px; height: 17px; color: var(--violet); flex-shrink: 0; }
.pill-select .chevron { width: 15px; height: 15px; color: var(--slate); }

.location-dropdown { position: relative; }
.location-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  max-height: 280px;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  box-shadow: 0 8px 24px -8px rgba(20,19,97,0.22);
  padding: 6px;
  margin: 0;
  list-style: none;
  z-index: 20;
}
.location-menu li {
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}
.location-menu li:hover { background: var(--mist); }
.location-menu li.selected { background: var(--lilac); color: var(--violet); font-weight: 700; }

/* ---------- Greeting ---------- */
.greeting { margin-bottom: var(--sp-3); }
.greeting h1 {
  margin: 0 0 6px;
  font-size: 28px;
  line-height: 34px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--indigo);
}
.greeting p { margin: 0; color: var(--slate); font-size: 16px; line-height: 24px; }

/* ---------- Stat row ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--sp-3);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  position: relative;
}

.stat-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-control);
  background: var(--lilac);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 20px; height: 20px; }

.stat-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.stat-label { font-size: 13px; line-height: 18px; color: var(--slate); font-weight: 500; }
.stat-value {
  font-size: 22px;
  line-height: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.delta {
  position: absolute;
  top: var(--sp-2); right: var(--sp-2);
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
  background: var(--signal-tint);
  color: var(--signal);
}

/* ---------- Panels ---------- */
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--sp-3);
}

.panel-title { margin: 0; font-size: 20px; line-height: 28px; font-weight: 500; color: var(--ink); }
.panel-sub { margin: 3px 0 0; font-size: 13px; line-height: 18px; color: var(--slate); }
.panel-head { margin-bottom: var(--sp-2); }

/* ---------- Main grid ---------- */
.main-grid {
  display: grid;
  grid-template-columns: 1.62fr 1fr;
  gap: var(--sp-2);
  align-items: stretch;
  margin-bottom: var(--sp-2);
}
.insights-panel { display: flex; flex-direction: column; }

.insights-panel .panel-title { margin-bottom: var(--sp-2); }

.live-reviews-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
}
.live-reviews-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.live-reviews-title { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: var(--ink); }
.live-reviews-head .sync-row { margin-bottom: 0; }

/* Filter pill — segmented control, right-aligned above the feed */
.review-filter {
  display: inline-flex;
  align-self: flex-end;
  gap: 2px;
  background: var(--mist);
  border-radius: 999px;
  padding: 3px;
  margin-bottom: var(--sp-2);
}
.review-filter-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--violet);
  cursor: pointer;
  font-family: inherit;
}
.review-filter-btn.active { background: var(--violet); color: var(--white); }
.review-filter-btn:not(.active):hover { background: rgba(90,88,188,0.08); }

.review-feed-wrap { background: var(--lilac); border-radius: var(--radius-card); padding: var(--sp-2); }
.live-reviews-feed { display: flex; flex-direction: column; gap: var(--sp-2); }

.review-item {
  display: flex;
  gap: var(--sp-2);
  align-items: flex-start;
  background: var(--white);
  border: 1.5px solid #d9d7f5;
  border-radius: 14px;
  padding: var(--sp-2);
}
.review-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--violet);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.review-body { flex: 1; min-width: 0; }
.review-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.review-name { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.review-stars { font-size: 12px; color: var(--reward-gold); letter-spacing: 1px; }
.review-when { font-size: 11.5px; color: var(--slate); margin-left: auto; flex-shrink: 0; }
.review-text { font-size: 12.5px; line-height: 18px; color: var(--slate); margin: 0; }

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
}

.insight-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--sp-2);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 190px;
}

.insight-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-control);
  background: var(--lilac);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 6px;
}
.insight-icon svg { width: 18px; height: 18px; }

.insight-title { font-size: 14.5px; line-height: 19px; font-weight: 500; margin: 0; color: var(--ink); }
.insight-desc { font-size: 12.5px; line-height: 17px; color: var(--slate); margin: 2px 0 8px; }

.insight-spark { width: 100%; height: 40px; margin-top: auto; }

.insight-badge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 999px;
  margin-top: var(--sp-1);
}
.insight-badge.good { background: var(--signal-tint); color: var(--signal); }
.insight-badge.warn { background: var(--alert-tint); color: var(--alert); }

/* ---------- Recommender ---------- */
.tabs {
  display: flex;
  gap: 6px;
  background: var(--mist);
  border-radius: var(--radius-control);
  padding: 4px;
  margin-bottom: var(--sp-2);
}
.tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 9px 8px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--slate);
  cursor: pointer;
  font-family: inherit;
  transition: background .15s ease, color .15s ease;
}
.tab.active { background: var(--violet); color: var(--white); }
.tab:not(.active):hover { color: var(--ink); }

/* Secondary switch — how the Google reviews incentive is structured */
.mode-switch {
  display: flex;
  gap: 6px;
  margin-bottom: var(--sp-2);
}
.mode-btn {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 8px;
  border-radius: var(--radius-control);
  font-size: 12px;
  font-weight: 500;
  color: var(--slate);
  cursor: pointer;
  font-family: inherit;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.mode-btn.active { border-color: var(--violet); color: var(--violet); background: var(--lilac); }
.mode-btn:not(.active):hover { color: var(--ink); }

/* Simulated live-sync status — no real Google Business Profile API call
   happens here (that needs OAuth + a backend); this just nudges mock data
   so the review numbers behave like a live feed. */
.sync-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--sp-2);
  font-size: 12px;
  color: var(--slate);
}
.sync-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-tint);
  flex-shrink: 0;
  animation: sync-pulse 2s ease-in-out infinite;
}
@keyframes sync-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.sync-text { flex: 1; font-weight: 500; }
.sync-btn {
  width: 26px; height: 26px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius-control);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--slate);
  flex-shrink: 0;
}
.sync-btn svg { width: 14px; height: 14px; }
.sync-btn:hover { color: var(--violet); border-color: var(--violet); }
.sync-btn.syncing svg { animation: sync-spin 0.8s linear infinite; }
@keyframes sync-spin { to { transform: rotate(360deg); } }

.rec-card {
  border-radius: var(--radius-reward);
  padding: var(--sp-2);
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
  color: var(--white);
}

.rec-head { display: flex; align-items: flex-start; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.rec-icon {
  width: 34px; height: 34px;
  border-radius: var(--radius-control);
  background: rgba(255,255,255,0.16);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.rec-icon svg { width: 18px; height: 18px; }
.rec-head-text { min-width: 0; flex: 1; }
.rec-title-row { display: flex; align-items: center; gap: 6px; }
.rec-title { font-size: 15px; line-height: 20px; font-weight: 500; color: var(--white); }
.rec-forecast { font-size: 12.5px; line-height: 17px; color: rgba(255,255,255,0.75); margin-top: 2px; }

.edit-target-btn {
  width: 22px; height: 22px;
  border: none;
  border-radius: 6px;
  background: rgba(255,255,255,0.16);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.edit-target-btn svg { width: 12px; height: 12px; }
.edit-target-btn:hover { background: rgba(255,255,255,0.28); }

.target-edit-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--white);
}
.target-edit-input {
  width: 84px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.14);
  color: var(--white);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.target-edit-input:focus { outline: 2px solid var(--reward-gold); outline-offset: 1px; }

.combo-select {
  -webkit-appearance: none;
  appearance: none;
  padding: 4px 22px 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.4);
  background-color: rgba(255,255,255,0.14);
  color: var(--white);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 5px center;
  background-size: 11px;
}
.combo-select option { color: var(--ink); }
.combo-select:focus { outline: 2px solid var(--reward-gold); outline-offset: 1px; }
.combo-plus { font-size: 14px; font-weight: 700; color: var(--white); }
#comboSuffix { font-size: 15px; font-weight: 500; color: var(--white); }
.target-edit-save, .target-edit-cancel {
  width: 24px; height: 24px;
  border: none;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.target-edit-save svg, .target-edit-cancel svg { width: 13px; height: 13px; }
.target-edit-save { background: var(--signal); color: var(--white); }
.target-edit-cancel { background: rgba(255,255,255,0.16); color: var(--white); }
.target-edit-save:hover, .target-edit-cancel:hover { opacity: 0.85; }

.chart-wrap { position: relative; margin: 4px 0 var(--sp-2); }
.line-chart { width: 100%; height: auto; display: block; overflow: visible; }

.chart-tooltip {
  position: absolute;
  transform: translate(-50%, -110%);
  background: var(--indigo);
  color: var(--white);
  font-size: 11.5px;
  font-weight: 500;
  padding: 6px 9px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.chart-tooltip::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -4px;
  transform: translateX(-50%) rotate(45deg);
  width: 8px; height: 8px;
  background: var(--indigo);
}

/* Bottom-third scrim per brand guide's contrast correction: lifts gold/white
   text above AA where the 135° gradient runs light (bottom-right). */
.reward-panel {
  background: rgba(20,19,97,0.3);
  border-radius: var(--radius-control);
  padding: var(--sp-2);
}

.reward-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-1); }
.reward-row label { font-size: 13px; font-weight: 500; color: var(--white); display: flex; align-items: center; gap: 6px; }
.reward-value {
  font-size: 18px;
  font-weight: 500;
  color: var(--reward-gold);
  font-variant-numeric: tabular-nums;
}

.info-dot {
  width: 15px; height: 15px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  font-style: italic;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: default;
}

/* Explicit fill layer behind the native input — a background-gradient on
   the input itself is unreliable across engines (track pseudo-elements
   paint over it), so the fill percentage is drawn as its own div instead. */
.slider-wrap {
  position: relative;
  height: 22px;
  display: flex;
  align-items: center;
  margin: 6px 0;
}
.slider-track {
  position: absolute;
  left: 0; right: 0;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.28);
  overflow: hidden;
  pointer-events: none;
}
.slider-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 40%;
  background: var(--reward-gold);
  border-radius: 999px;
}

#rewardSlider {
  position: relative;
  z-index: 2;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: transparent;
  margin: 0;
}
#rewardSlider::-webkit-slider-runnable-track { background: transparent; height: 10px; }
#rewardSlider::-moz-range-track { background: transparent; height: 10px; border: none; }
#rewardSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--reward-gold);
  border: 3px solid var(--white);
  cursor: pointer;
  margin-top: -5px;
  position: relative;
  z-index: 3;
}
#rewardSlider::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--reward-gold);
  border: 3px solid var(--white);
  cursor: pointer;
}

.slider-scale { display: flex; justify-content: space-between; font-size: 11.5px; color: rgba(255,255,255,0.65); margin-bottom: var(--sp-2); }

.roi-box {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-control);
  padding: 10px 14px;
  flex-wrap: wrap;
}
.roi-row { display: flex; flex-direction: column; gap: 2px; }
.roi-label { font-size: 10.5px; font-weight: 600; color: rgba(255,255,255,0.65); text-transform: uppercase; letter-spacing: 0.02em; }
.roi-value { font-size: 15px; font-weight: 700; color: var(--white); font-variant-numeric: tabular-nums; }
.roi-value.roi-return { color: var(--reward-gold); }
.roi-value.roi-unquantifiable { font-size: 12.5px; color: rgba(255,255,255,0.8); }
.roi-arrow { color: rgba(255,255,255,0.45); font-size: 15px; }
.roi-net {
  flex-basis: 100%;
  text-align: right;
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
}
.roi-note { font-size: 11px; color: rgba(255,255,255,0.6); margin: 6px 0 var(--sp-2); }

.prorata-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: 10px 0;
  margin-bottom: var(--sp-1);
  border-top: 1px solid rgba(255,255,255,0.14);
}
.prorata-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prorata-label { font-size: 13px; font-weight: 500; color: var(--white); }
.prorata-sub { font-size: 11.5px; color: rgba(255,255,255,0.65); }

.toggle {
  flex-shrink: 0;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,0.22);
  padding: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  transition: background .15s ease;
}
.toggle-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--white);
  transition: transform .15s ease;
  display: block;
}
.toggle[aria-checked="true"] { background: var(--reward-gold); }
.toggle[aria-checked="true"] .toggle-thumb { transform: translateX(18px); }

.approve-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  background: rgba(255,255,255,0.14);
  border-radius: var(--radius-control);
  padding: 12px 14px;
  margin-bottom: var(--sp-2);
  flex-wrap: wrap;
}
.approve-copy { display: flex; align-items: center; gap: var(--sp-1); font-size: 12.5px; font-weight: 500; color: var(--white); }
.approve-copy .reward-figure { color: var(--reward-gold); font-weight: 700; font-variant-numeric: tabular-nums; }
.gift-icon { width: 18px; height: 18px; flex-shrink: 0; }

.approve-btn {
  background: var(--white);
  color: var(--indigo);
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-control);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .15s ease, transform .05s ease;
  white-space: nowrap;
}
.approve-btn:hover { opacity: 0.9; }
.approve-btn:active { transform: scale(0.98); }
.approve-btn.approved { background: var(--signal); color: var(--white); }
.approve-btn:disabled { cursor: default; }

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  margin-top: var(--sp-2);
}
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--white);
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 6px 10px;
}
.meta-pill svg { width: 14px; height: 14px; color: var(--white); flex-shrink: 0; }

.duration-pill { padding-right: 6px; cursor: default; }
.duration-select {
  -webkit-appearance: none;
  appearance: none;
  border: none;
  background: rgba(255,255,255,0.16);
  color: var(--white);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 22px 3px 9px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 12px;
}
.duration-select:hover { background-color: rgba(255,255,255,0.26); }
.duration-select:focus { outline: 2px solid var(--reward-gold); outline-offset: 1px; }
.duration-select option { color: var(--ink); }

/* ---------- Live incentives ---------- */
.live-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: var(--sp-2); gap: var(--sp-2); flex-wrap: wrap; }
.view-all { display: inline-flex; align-items: center; gap: 4px; color: var(--violet); font-size: 13px; font-weight: 500; text-decoration: none; }
.view-all svg { width: 15px; height: 15px; }
.view-all:hover { text-decoration: underline; }

.live-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); }

.live-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 14px var(--sp-2);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.live-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-control);
  background: var(--lilac);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.live-icon svg { width: 18px; height: 18px; }

.live-body { flex: 1; min-width: 0; }
.live-title { font-size: 13.5px; line-height: 18px; font-weight: 500; margin: 0 0 2px; color: var(--ink); }
.live-desc { font-size: 12px; line-height: 16px; color: var(--slate); margin: 0 0 8px; }

.live-progress-track { height: 8px; border-radius: 999px; background: var(--mist); overflow: hidden; }
.live-progress-fill { height: 100%; border-radius: 999px; background: var(--reward-gold); }
.live-progress-count { font-size: 11px; color: var(--slate); margin-top: 5px; font-weight: 500; font-variant-numeric: tabular-nums; }

.live-stats { display: flex; flex-direction: column; align-items: flex-end; gap: var(--sp-1); flex-shrink: 0; }
.live-pct { font-size: 14px; font-weight: 700; color: var(--indigo); font-variant-numeric: tabular-nums; }
.live-active { font-size: 10.5px; font-weight: 500; color: var(--signal); background: var(--signal-tint); padding: 3px 8px; border-radius: 999px; white-space: nowrap; }

/* ---------- Message the team ---------- */
.message-composer {
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: var(--sp-2);
}
.message-input {
  width: 100%;
  border: none;
  resize: vertical;
  min-height: 44px;
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  color: var(--ink);
  background: transparent;
  outline: none;
  padding: 0;
}
.message-input::placeholder { color: var(--slate); }

.message-composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--sp-1);
  padding-top: var(--sp-1);
  border-top: 1px solid var(--line);
}
.message-char-count { font-size: 11.5px; color: var(--slate); font-variant-numeric: tabular-nums; }

.message-send-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--violet);
  color: var(--white);
  border: none;
  padding: 9px 16px;
  border-radius: var(--radius-control);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s ease, opacity .15s ease;
}
.message-send-btn svg { width: 15px; height: 15px; }
.message-send-btn:hover:not(:disabled) { background: var(--indigo); }
.message-send-btn:disabled { cursor: default; }
.message-send-btn.sent { background: var(--signal); }

.message-feed {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}
.message-item { display: flex; gap: var(--sp-1); align-items: flex-start; }
.message-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-control);
  background: var(--lilac);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.message-icon svg { width: 15px; height: 15px; }
.message-body { flex: 1; min-width: 0; }
.message-text { font-size: 13px; line-height: 18px; color: var(--ink); margin: 0 0 2px; }
.message-when { font-size: 11px; color: var(--slate); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .main-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .sidebar-logo, .sidebar-profile { border: none; margin: 0; padding: var(--sp-2); flex-shrink: 0; }
  .sidebar-nav { flex-direction: row; padding: var(--sp-2); }
  .nav-item span, .nav-item { white-space: nowrap; }
  .app { max-width: none; }
}

@media (max-width: 760px) {
  .app { padding: var(--sp-3) var(--sp-2) var(--sp-4); }
  .stats-row { grid-template-columns: 1fr; }
  .insight-grid { grid-template-columns: 1fr; }
  .live-grid { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; align-items: flex-start; }
}
