/* ==========================================================================
   THE FORGE — "BUILT, not bought"
   forge.css (refactored to match landing.css look & palette)
   - Landing-aligned background + amber primary
   - Glass panels w/ premium highlight line
   - Subtle grid + noise texture
   - Crisp typography + terminal accents
   ========================================================================== */

:root {
  /* ------------------------------------------------------------------------
     Core palette (landing-aligned)
     ------------------------------------------------------------------------ */
  --bg0: #070a0f;
  --bg1: #0b1020;

  --panel: rgba(18, 24, 38, 0.58);
  --panel-strong: rgba(18, 24, 38, 0.78);

  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* Text */
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.70);
  --faint: rgba(255, 255, 255, 0.52);

  /* Accents */
  --aqua: #3ef2ff;     /* keep for pilot/ops glow */
  --violet: #a78bfa;
  --lime: #6dff8b;
  --amber: #ffd37a;    /* landing’s “gold” */
  --danger: #ff5577;

  /* New: primary accent + friendly link */
  --accent: var(--amber);
  --accent-soft: rgba(255, 211, 122, 0.16);
  --accent-soft-2: rgba(255, 211, 122, 0.08);
  --link: rgba(255, 211, 122, 0.95);

  /* Shadows + glow */
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  --shadow-soft: 0 18px 48px rgba(0, 0, 0, 0.45);

  /* Landing-forward glow (amber first, then violet/aqua secondary) */
  --glow: 0 0 0 1px rgba(255, 211, 122, 0.10),
          0 0 40px rgba(255, 211, 122, 0.08);

  /* Radius + spacing */
  --r-xl: 22px;
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 10px;

  --wrap: 1100px;
  --pad: 22px;

  /* Font stack: "hi-tech, but readable" */
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Alias for landing.css compatibility */
  --font-mono: var(--mono);

  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);

  /* Landing-like: calmer base.
     We keep a faint ambient gradient so it doesn’t feel “flat,” but it’s
     much closer to landing’s var(--bg0) look than the old aurora-heavy body. */
  background:
    radial-gradient(1100px 700px at 70% 12%, rgba(255, 211, 122, 0.10), transparent 60%),
    radial-gradient(900px 600px at 22% 80%, rgba(167, 139, 250, 0.08), transparent 58%),
    linear-gradient(180deg, var(--bg0), rgba(7,10,15,0.98));

  overflow-x: hidden;
}

/* --- Subtle grid + noise overlay --- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(650px 520px at 50% 12%, black 35%, transparent 72%);
  opacity: 0.52;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity: 0.10;
}

/* --- Utility --- */
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); }

/* Prefer landing-like links by default (opt-in class) */
.link,
a.link {
  color: var(--link);
  text-decoration: none;
}
.link:hover,
a.link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Topbar
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);

  /* Glass (slightly warmer to match landing hero/card tint) */
  background: rgba(9, 12, 18, 0.50);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
  text-decoration: none;
  flex: 1 1 auto;
}

.brand:focus-visible {
  outline: none;
  border-radius: 16px;
  box-shadow: 0 0 0 3px rgba(255, 211, 122, 0.20), 0 0 0 1px rgba(255, 211, 122, 0.18);
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;

  /* Landing: warm premium edge */
  box-shadow: var(--glow);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.25);
}

.brand-text { display: grid; gap: 2px; }

.brand-name {
  letter-spacing: 0.22em;
  font-weight: 750;
  font-size: 12px;
  opacity: 0.95;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

/* Neon divider/glow under topbar (amber first) */
.topbar-glow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 211, 122, 0.55),
    rgba(167, 139, 250, 0.35),
    rgba(62, 242, 255, 0.22),
    transparent
  );
  opacity: 0.78;
  pointer-events: none;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.wrap {
  max-width: var(--wrap);
  margin: 26px auto 44px;
  padding: 0 18px;
}

.footer {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 22px 18px 34px;
  color: rgba(255,255,255,0.45); /* closer to landing footer-note */
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Card / Panel (landing-like premium highlight)
   ========================================================================== */
.card {
  position: relative;
  border-radius: var(--r-xl);
  padding: clamp(18px, 2.2vw, 26px);

  /* Landing cards feel: darker glass with warm highlight */
  background: linear-gradient(
    180deg,
    rgba(18, 24, 38, 0.70),
    rgba(18, 24, 38, 0.50)
  );

  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

/* Premium highlight line (like landing-card::before / landing-callout::before) */
.card::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 12px;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 211, 122, 0.00),
    rgba(255, 211, 122, 0.35),
    rgba(255, 211, 122, 0.00)
  );
  opacity: 0.92;
  pointer-events: none;
}

/* Subtle “ambient” interior glow (less neon than before) */
.card::after {
  content: "";
  position: absolute;
  inset: -2px;
  background:
    radial-gradient(900px 280px at 70% 0%, rgba(255, 211, 122, 0.12), transparent 60%),
    radial-gradient(760px 260px at 25% 10%, rgba(167, 139, 250, 0.10), transparent 60%);
  filter: blur(12px);
  opacity: 0.70;
  pointer-events: none;
}

.card > * { position: relative; z-index: 1; }

.card h1 {
  margin: 0 0 10px;
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.45);
}

.card p {
  margin: 0 0 10px;
  line-height: 1.55;
}

/* ==========================================================================
   Buttons (amber-forward like landing CTAs)
   ========================================================================== */
button, .btn {
  appearance: none;

  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);

  border-radius: 12px;
  padding: 9px 12px;

  font-weight: 650;
  cursor: pointer;

  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

button:hover, .btn:hover {
  transform: translateY(-1px);

  /* Amber hover instead of aqua so the app matches landing tone */
  border-color: rgba(255, 211, 122, 0.35);
  background: rgba(255, 211, 122, 0.08);

  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.44),
    0 0 0 1px rgba(255, 211, 122, 0.12);
}

button:active, .btn:active {
  transform: translateY(0px) scale(0.99);
}

button:focus-visible,
.btn:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 211, 122, 0.20),
    0 0 0 1px rgba(255, 211, 122, 0.18);
}

/* Button sizes (landing’s btn-lg) */
.btn-lg {
  padding: 0.85rem 1.1rem;
  font-size: 1rem;
  border-radius: 14px;
}

/* Variants */
.btn-primary {
  border-color: rgba(255, 211, 122, 0.36);
  background: linear-gradient(180deg, rgba(255, 211, 122, 0.16), rgba(255, 211, 122, 0.06));
}

.btn-primary:hover {
  border-color: rgba(255, 211, 122, 0.46);
  background: linear-gradient(180deg, rgba(255, 211, 122, 0.20), rgba(255, 211, 122, 0.08));
}

.btn-danger {
  border-color: rgba(255, 85, 119, 0.35);
  background: linear-gradient(180deg, rgba(255, 85, 119, 0.16), rgba(255, 85, 119, 0.06));
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.btn-ghost:hover {
  border-color: rgba(255, 211, 122, 0.32);
  background: rgba(255, 211, 122, 0.08);
}

/* ==========================================================================
   Optional: Badges + meta row
   ========================================================================== */
.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 16px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.pip {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.12);
}

.pip-amber {
  background: rgba(255, 211, 122, 0.95);
  box-shadow: 0 0 18px rgba(255, 211, 122, 0.30);
}

.pip-aqua {
  background: rgba(62, 242, 255, 0.90);
  box-shadow: 0 0 18px rgba(62, 242, 255, 0.35);
}

.pip-violet {
  background: rgba(167, 139, 250, 0.90);
  box-shadow: 0 0 18px rgba(167, 139, 250, 0.40);
}

.pip-lime {
  background: rgba(109, 255, 139, 0.90);
  box-shadow: 0 0 18px rgba(109, 255, 139, 0.30);
}

/* ==========================================================================
   Responsive tweaks
   ========================================================================== */
@media (max-width: 640px) {
  .brand-sub { display: none; }
  .brand-name { letter-spacing: 0.18em; }
  .brand { min-width: auto; }

  .topbar {
    padding: 10px 12px;
  }

  .brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  button, .btn {
    padding: 8px 10px;
    border-radius: 12px;
  }
}

/* ==========================================================================
   Status strip (mini “command center” pills)
   ========================================================================== */
.status-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.status-pill .strong {
  color: var(--text);
  font-weight: 750;
  letter-spacing: 0.04em;
}

.status-pill .sep {
  color: rgba(255, 255, 255, 0.28);
}

@media (max-width: 640px) {
  .status-strip { display: none; }
}

/* ==========================================================================
   Portal Grid + Link Cards
   ========================================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(6, 1fr); }
}

@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(1, 1fr); }
}

/* Make .card work as both panel and link */
.card.link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 16px 18px;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.card.link:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 211, 122, 0.26);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 211, 122, 0.10);
  background: linear-gradient(180deg, rgba(18, 24, 38, 0.74), rgba(18, 24, 38, 0.54));
}

.card.link:active {
  transform: translateY(-1px);
}

.card.link .emoji {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}

.card-title {
  font-weight: 780;
  letter-spacing: -0.01em;
  font-size: 16px;
  margin-bottom: 2px;
}

/* Make your 3 cards sit nicely on desktop */
.grid > a.card.link {
  grid-column: span 4;
}
@media (max-width: 960px) {
  .grid > a.card.link { grid-column: span 6; }
}
@media (max-width: 640px) {
  .grid > a.card.link { grid-column: span 12; }
}

/* ==========================================================================
   KPI Page Enhancements (chips + header row)
   ========================================================================== */
.kpi-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.kpi-sub {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-summary-chip {
  align-items: flex-start;
}

.dashboard-summary-chip-text {
  display: block;
  min-width: 0;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.35);
  box-shadow: 0 0 16px rgba(255,255,255,0.14);
}

.chip-amber .dot { background: rgba(255, 211, 122, 0.95); box-shadow: 0 0 18px rgba(255, 211, 122, 0.25); }
.chip-violet .dot { background: rgba(167, 139, 250, 0.90); box-shadow: 0 0 18px rgba(167, 139, 250, 0.32); }
.chip-aqua  .dot { background: rgba(62, 242, 255, 0.90); box-shadow: 0 0 18px rgba(62, 242, 255, 0.26); }
.chip-lime  .dot { background: rgba(109, 255, 139, 0.90); box-shadow: 0 0 18px rgba(109, 255, 139, 0.22); }

/* ==========================================================================
   Portal Presentation
   ========================================================================== */
.portal-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0 18px;
}

.portal-toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.portal-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.portal-filter-label select,
.portal-filter-label input {
  min-width: 0;
}

.portal-filter-select {
  min-width: 160px;
}

.portal-chip-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.portal-scope-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  color: var(--muted);
  font-size: 0.9rem;
}

.portal-chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 16px 0 18px;
}

.dashboard-table {
  display: table;
}

.dashboard-store-cards {
  display: none;
}

.dashboard-store-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
}

.dashboard-store-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-store-card-title {
  font-size: 17px;
  font-weight: 780;
  letter-spacing: -0.01em;
}

.dashboard-store-card-weather {
  white-space: nowrap;
}

.dashboard-store-card-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.dashboard-store-metric {
  display: grid;
  gap: 4px;
}

.dashboard-store-metric-label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-store-metric-value {
  font-size: 16px;
  font-weight: 700;
}

.dashboard-store-card-attention {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-store-attention-label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-store-card-empty {
  padding: 16px 18px;
}

.dashboard-store-performance {
  margin-top: 14px;
}

.dashboard-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  flex-wrap: wrap;
}

.dashboard-store-link-affordance {
  color: var(--muted);
}

.portal-section-card {
  padding: 16px 18px;
  min-width: 0;
}

.portal-chart-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.portal-chart-title {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.portal-chart {
  height: 320px;
}

.portal-chart-sm {
  height: 280px;
}

.portal-chart-clickable {
  cursor: pointer;
}

.portal-table-spaced,
.portal-stack-sm,
.portal-stack-md {
  display: block;
}

.portal-table-spaced {
  margin-top: 10px;
}

.portal-table-scroll {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.portal-stack-sm {
  margin-top: 8px;
}

.portal-stack-md {
  margin-top: 12px;
}

.portal-footnote {
  margin-top: 12px;
}

.portal-meta {
  display: grid;
  gap: 6px;
}

.portal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.portal-header-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.portal-title {
  margin: 0;
}

.portal-identity-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  line-height: 1.45;
}

.portal-identity-sep {
  color: rgba(255, 255, 255, 0.24);
}

.portal-focus-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.portal-focus-label {
  color: rgba(255, 255, 255, 0.54);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}

.portal-header-status {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 420px;
}

.portal-metric-row {
  margin-top: 8px;
}

.portal-attention-summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.4;
}

.portal-attention-summary::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
}

.portal-attention-summary-good {
  border-color: rgba(109, 255, 139, 0.16);
  background: rgba(109, 255, 139, 0.05);
}

.portal-attention-summary-good::before {
  background: rgba(109, 255, 139, 0.88);
}

.portal-attention-summary-warn {
  border-color: rgba(255, 211, 122, 0.18);
  background: rgba(255, 211, 122, 0.05);
}

.portal-attention-summary-warn::before {
  background: rgba(255, 211, 122, 0.92);
}

.portal-attention-summary-attention {
  border-color: rgba(255, 85, 119, 0.20);
  background: rgba(255, 85, 119, 0.05);
}

.portal-attention-summary-attention::before {
  background: rgba(255, 85, 119, 0.92);
}

.portal-summary-grid {
  margin-top: 10px;
}

.store-overview-page {
  display: grid;
  gap: 14px;
}

.store-overview-header,
.store-overview-filters,
.store-overview-marketing {
  min-width: 0;
}

.store-overview-kpis,
.store-overview-summaries,
.store-overview-details {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.store-overview-summaries {
  grid-template-columns: 1fr;
}

.store-overview-details {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.store-overview-table-wrap {
  width: 100%;
  min-width: 0;
}

.store-overview-table {
  min-width: 100%;
}

.store-overview-table-wide {
  min-width: 960px;
}

.store-overview-table-medium {
  min-width: 680px;
}

.store-overview-table-compact {
  min-width: 560px;
}

@media (max-width: 640px) {
  .portal-header-status {
    justify-content: flex-start;
    max-width: none;
  }
}

@media (max-width: 960px) {
  .store-overview-details {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .portal-toolbar {
    gap: 10px;
  }

  .portal-toolbar-group {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .portal-toolbar-group .btn {
    flex: 0 0 auto;
  }

  .portal-filter-label {
    flex-wrap: wrap;
  }

  .portal-filter-label input,
  .portal-filter-label select,
  .portal-filter-select {
    width: 100%;
    min-width: 0;
  }

  .portal-chart-grid {
    gap: 10px;
  }

  .dashboard-summary-chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .dashboard-summary-chips .chip {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    align-items: flex-start;
    white-space: normal;
    line-height: 1.35;
  }

  .dashboard-summary-chip {
    display: flex;
    gap: 8px;
  }

  .dashboard-summary-chip .dot {
    margin-top: 4px;
    flex: 0 0 auto;
  }

  .dashboard-summary-chip-text {
    flex: 1 1 auto;
    font-size: 12px;
    overflow-wrap: anywhere;
  }

  .dashboard-table {
    display: none !important;
  }

  .dashboard-store-cards {
    display: grid !important;
    gap: 12px;
    margin-top: 12px;
  }

  .store-overview-page {
    gap: 12px;
  }

  .store-overview-header,
  .store-overview-filters,
  .store-overview-marketing,
  .portal-section-card,
  .portal-kpi-card {
    padding: 14px;
  }

  .portal-header {
    gap: 14px;
  }

  .portal-header-status {
    justify-content: flex-start;
    max-width: none;
    width: 100%;
  }

  .portal-toolbar {
    gap: 10px;
  }

  .portal-filter-label {
    flex-wrap: wrap;
  }

  .portal-filter-label input,
  .portal-filter-label select,
  .portal-filter-select {
    width: 100%;
    min-width: 0;
  }

  .portal-kpi-grid {
    grid-template-columns: 1fr;
  }

  .store-overview-table-wide {
    min-width: 900px;
  }

  .store-overview-table-medium {
    min-width: 640px;
  }

  .portal-table-scroll {
    margin-left: -2px;
    margin-right: -2px;
    padding-bottom: 2px;
  }
}

@media (max-width: 480px) {
  .dashboard-summary-chips {
    grid-template-columns: 1fr;
  }

  .dashboard-summary-chip {
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .dashboard-summary-chip-text {
    font-size: 11.5px;
  }

  .dashboard-store-card {
    padding: 14px;
  }

  .dashboard-store-card-head,
  .dashboard-store-card-attention {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-store-card-metrics {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .dashboard-store-card-weather {
    white-space: normal;
  }

  .store-overview-page {
    gap: 10px;
  }

  .portal-identity-line {
    gap: 8px;
  }

  .portal-identity-sep {
    display: none;
  }

  .portal-focus-pill,
  .portal-attention-summary {
    width: 100%;
  }

  .portal-toolbar-group,
  .portal-metric-row {
    width: 100%;
  }

  .portal-toolbar .btn,
  .portal-toolbar .btn-ghost {
    width: 100%;
    text-align: center;
  }

  .portal-kpi-card.has-trend .portal-kpi-value {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .portal-kpi-title,
  .portal-kpi-value {
    white-space: normal;
  }

  .portal-kpi-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-kpi-sub,
  .portal-kpi-threshold {
    white-space: normal;
  }

  .store-overview-table-wide {
    min-width: 820px;
  }

  .store-overview-table-medium {
    min-width: 600px;
  }

  .store-overview-table-compact {
    min-width: 520px;
  }
}

.portal-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 14px;
  align-items: stretch;
  min-width: 0;
}

.portal-kpi-card {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(12,12,20,.56), rgba(12,12,20,.46));
  min-height: 118px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
  min-width: 0;
}

.portal-kpi-card::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
  opacity: 0.7;
}

.portal-kpi-card.has-trend .portal-kpi-value {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.portal-kpi-good {
  border-color: rgba(109,255,139,.22);
  box-shadow:
    0 0 0 1px rgba(109,255,139,.08) inset,
    0 12px 28px rgba(0,0,0,.22);
}

.portal-kpi-bad {
  border-color: rgba(255,85,119,.34);
  box-shadow:
    0 0 0 1px rgba(255,85,119,.12) inset,
    0 12px 28px rgba(0,0,0,.22);
}

.portal-kpi-warn {
  border-color: rgba(255,211,122,.30);
  box-shadow:
    0 0 0 1px rgba(255,211,122,.11) inset,
    0 12px 28px rgba(0,0,0,.22);
}

.portal-kpi-bad::before {
  background: linear-gradient(90deg, transparent, rgba(255,85,119,.34), transparent);
  opacity: 0.88;
}

.portal-kpi-warn::before {
  background: linear-gradient(90deg, transparent, rgba(255,211,122,.30), transparent);
  opacity: 0.82;
}

.portal-kpi-na {
  opacity: .76;
}

.portal-kpi-title {
  font-weight: 800;
  letter-spacing: .01em;
  opacity: .96;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.portal-kpi-value {
  font-size: 22px;
  font-weight: 900;
  margin-top: 8px;
  line-height: 1.1;
  white-space: nowrap;
}

.portal-kpi-sub {
  margin-top: 6px;
  color: rgba(255,255,255,.76);
  font-size: 12px;
  line-height: 1.45;
}

.portal-kpi-threshold {
  margin-top: 10px;
  color: rgba(255,255,255,.64);
  font-size: 12px;
}

.portal-trend-pill {
  font-size: 13px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
}

.portal-trend-pill.up {
  color: rgba(109,255,139,0.95);
  border-color: rgba(109,255,139,.20);
  background: rgba(109,255,139,.06);
}

.portal-trend-pill.down {
  color: rgba(255,85,119,0.95);
  border-color: rgba(255,85,119,.20);
  background: rgba(255,85,119,.06);
}

.portal-trend-pill.flat {
  color: rgba(210,220,235,0.92);
}

.portal-spark {
  margin-top: 10px;
  height: 72px;
}

.portal-stale-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid rgba(255,211,122,.24);
  background: rgba(255,211,122,.08);
  color: rgba(255,220,150,0.95);
}

.portal-table-compact th,
.portal-table-compact td {
  white-space: nowrap;
}

.portal-table-compact {
  table-layout: fixed;
  width: 100%;
}

.portal-table-compact td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-chart-tooltip .apexcharts-tooltip,
.portal-chart-tooltip .apexcharts-xaxistooltip,
.portal-kpi-grid .apexcharts-tooltip,
.portal-kpi-grid .apexcharts-xaxistooltip {
  background: rgba(12,12,20,.96) !important;
  color: #f5f7fb !important;
  border: 1px solid rgba(255,255,255,.14) !important;
}

.portal-chart-tooltip .apexcharts-tooltip-title,
.portal-kpi-grid .apexcharts-tooltip-title {
  background: rgba(255,255,255,.06) !important;
  color: #f5f7fb !important;
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
}

.portal-chart-tooltip .apexcharts-tooltip-text-y-label,
.portal-chart-tooltip .apexcharts-tooltip-text-y-value,
.portal-chart-tooltip .apexcharts-tooltip-text-x-label,
.portal-chart-tooltip .apexcharts-tooltip-text-x-value,
.portal-kpi-grid .apexcharts-tooltip-text-y-label,
.portal-kpi-grid .apexcharts-tooltip-text-y-value,
.portal-kpi-grid .apexcharts-tooltip-text-x-label,
.portal-kpi-grid .apexcharts-tooltip-text-x-value {
  color: #f5f7fb !important;
  fill: #f5f7fb !important;
}

@media (max-width: 960px) {
  .portal-section-span-6 {
    grid-column: span 12;
  }
}

/* ==========================================================================
   Tables (sticky header, subtle hover)
   ========================================================================== */
.table-wrap { overflow: auto; border-radius: 16px; }

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(10, 14, 22, 0.35);
  font-size: 14px;
}

.table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: left;
  padding: 12px 12px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  background: linear-gradient(180deg, rgba(18, 24, 38, 0.85), rgba(18, 24, 38, 0.68));
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.table tbody td {
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  vertical-align: top;
}

.table tbody tr:hover td {
  background: rgba(255, 211, 122, 0.045); /* warm hover */
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* Numeric alignment helpers */
.t-num { text-align: right; font-variant-numeric: tabular-nums; }
.t-mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Page Head slot
   ========================================================================== */
.pagehead {
  max-width: var(--wrap);
  margin: 18px auto 0;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.breadcrumbs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.breadcrumbs .sep {
  color: rgba(255, 255, 255, 0.22);
}

.page-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   Subbar status badges (human readable)
   ========================================================================== */
.subbar {
  position: sticky;
  top: 56px; /* matches your topbar height */
  z-index: 45;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 12, 18, 0.40);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.subbar-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.badges {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.subbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Badge base (human readable) */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: none;
  white-space: nowrap;
}

/* LED dots */
.led {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.10);
}

.led-ok {
  background: rgba(109, 255, 139, 0.95);
  box-shadow: 0 0 18px rgba(109, 255, 139, 0.32);
}

.led-warn {
  background: rgba(255, 211, 122, 0.98);
  box-shadow: 0 0 18px rgba(255, 211, 122, 0.26);
}

.led-bad {
  background: rgba(255, 85, 119, 0.95);
  box-shadow: 0 0 18px rgba(255, 85, 119, 0.28);
}

.led-neutral {
  background: rgba(255, 255, 255, 0.40);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.10);
}

.led-aqua {
  background: rgba(62, 242, 255, 0.90);
  box-shadow: 0 0 18px rgba(62, 242, 255, 0.30);
}

/* Optional semantic badge variants */
.badge-ok { border-color: rgba(109, 255, 139, 0.22); }
.badge-warn { border-color: rgba(255, 211, 122, 0.22); }
.badge-bad { border-color: rgba(255, 85, 119, 0.22); }
.badge-neutral { border-color: rgba(255, 255, 255, 0.14); }

/* ==========================================================================
   Admin helpers (lightweight)
   ========================================================================== */
.row-between{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.row{ display:flex; flex-wrap:wrap; }
.row-center{ align-items:center; }

.row-gap{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.form-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap:12px;
  align-items:end;
  margin-bottom:14px;
}

.form-grid label{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.bonus-page {
  display: grid;
  gap: 16px;
}

.bonus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.bonus-stat {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(10, 14, 22, 0.38);
}

.bonus-stat-label {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bonus-stat-value {
  margin-top: 8px;
  font-size: 24px;
  font-weight: 900;
}

.bonus-list {
  display: grid;
  gap: 10px;
}

.bonus-list-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.bonus-list-copy {
  display: grid;
  gap: 4px;
}

.bonus-list-meta {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.bonus-callout {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: linear-gradient(180deg, rgba(12,12,20,.56), rgba(12,12,20,.44));
}

.bonus-empty {
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.74);
}

.label{
  font-size:12px;
  letter-spacing:0.08em;
  text-transform:uppercase;
  opacity:0.8;
}

.h2{ font-size:18px; margin:0; }

.hr{
  border:0;
  height:1px;
  background:rgba(255,255,255,0.12);
  margin:14px 0;
}

input, select{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.18);
  background:rgba(0,0,0,0.20);
  color:inherit;
}

input[readonly]{ opacity:0.85; }

.checkbox{
  flex-direction:row !important;
  align-items:center;
  gap:10px !important;
}

.grid-2{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:14px;
}

@media (max-width: 900px){
  .grid-2{ grid-template-columns: 1fr; }
}

.pill-list{
  list-style:none;
  padding:0;
  margin:10px 0 0;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.pill{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.16);
  background:rgba(255,255,255,0.06);
}

.pillbox{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.pill-btn{
  margin-left:6px;
  width:26px;
  height:26px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.18);
  background:rgba(0,0,0,0.18);
  color:inherit;
  cursor:pointer;
}

.pill-btn:hover{
  background:rgba(255,255,255,0.10);
}

.inline{ display:inline; }

.admin-tiles{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap:14px;
  margin-top:14px;
}

.admin-tile{
  display:block;
  padding:16px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,0.16);
  background:rgba(255,255,255,0.05);
  text-decoration:none;
  color:inherit;
}

.admin-tile:hover{ background:rgba(255,255,255,0.08); }

.admin-tile-title{ font-weight:700; margin-bottom:4px; }

.admin-tile-sub{ opacity:0.75; }

.inset{ margin:0; }

.kv{ list-style:none; padding:0; margin:0; }

.kv li{
  display:flex;
  justify-content:space-between;
  gap:14px;
  padding:6px 0;
  border-bottom:1px solid rgba(255,255,255,0.08);
}

.kv li:last-child{ border-bottom:none; }

.kv .k{ opacity:0.8; }
.kv .v{ font-weight:600; }

.breadcrumbs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.breadcrumbs a {
  color: var(--link);
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs .sep {
  color: rgba(255, 255, 255, 0.25);
}

.breadcrumbs .crumb-current {
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.pagehead {
  max-width: var(--wrap);
  margin: 18px auto 14px;
  padding: 0 18px;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.pagehead-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pagehead-title {
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.pagehead-sub {
  color: var(--muted);
  font-size: 14px;
  max-width: 720px;
}

.pagehead-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pagehead-chips {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* ==========================================================================
   Dashboard: Alerts + Weather (moved from inline template)
   ========================================================================== */

/* Alerts */
.alerts { white-space: nowrap; }

.ai {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  margin-right: 6px;
  border: 1px solid rgba(255,255,255,0.10);
  font-size: 14px;
  filter: saturate(1.4);
  transition: transform 120ms ease;
}

.ai:hover { transform: scale(1.08); }

.ai.na {
  opacity: 0.28;
  filter: grayscale(1);
  box-shadow: none;
}

/* Neon Green */
.ai.good {
  color: #00ff88;
  background: rgba(0, 255, 136, 0.12);
  border-color: rgba(0, 255, 136, 0.45);
  box-shadow:
    0 0 6px rgba(0, 255, 136, 0.65),
    0 0 14px rgba(0, 255, 136, 0.35);
}

/* Bright Red */
.ai.bad {
  color: #ff2f2f;
  background: rgba(255, 47, 47, 0.14);
  border-color: rgba(255, 47, 47, 0.55);
  box-shadow:
    0 0 6px rgba(255, 47, 47, 0.70),
    0 0 16px rgba(255, 47, 47, 0.40);
}



/* ==========================================================================
   Dashboard table: make headers match numeric columns + stabilize widths
   ========================================================================== */

.table { table-layout: fixed; }

/* Headers default to left; numeric headers should match numeric cells */
.table thead th.t-num { text-align: right; }

/* Give numeric columns a right gutter so last digit never kisses next column */
.table thead th.t-num,
.table tbody td.t-num {
  padding-right: 16px;
}

/* Alerts column centered */
.table thead th:nth-child(5),
.table tbody td:nth-child(5) {
  text-align: center;
}

/* ==========================================================================
   Portal dashboard — weather tile (force canonical)
   More specific than bare `.wx` so it wins reliably.
   ========================================================================== */

.table td.wxbox .wx {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 96px;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
}

.table td.wxbox .frac {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 12px;
  line-height: 12px;
  min-width: 28px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.table td.wxbox .frac .bar {
  width: 22px;
  height: 1px;
  background: rgba(255,255,255,0.35);
  margin: 2px 0;
}

.table td.wxbox .wx .icon { font-size: 18px; }

.table td.wxbox .wx:hover {
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.05);
}

/* Keep KPI header chips pinned top-right (desktop), allow wrap on mobile */
.kpi-head > div:first-child {
  flex: 1 1 420px;     /* left side can shrink/grow */
  min-width: 320px;    /* prevents ugly squish */
}

.kpi-sub {
  margin-left: auto;         /* pushes chips to the right */
  justify-content: flex-end; /* align chips to the right within the row */
  flex: 0 0 auto;            /* don't stretch */
  white-space: nowrap;       /* keep as one row on desktop */
}

/* Let chips wrap on narrow screens so they don't overflow */
@media (max-width: 900px) {
  .kpi-sub {
    white-space: normal;
  }
}

@media (max-width: 768px) {
  .dashboard-shell .kpi-head {
    align-items: stretch;
  }

  .dashboard-shell .kpi-head > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
  }

  .dashboard-shell .dashboard-summary-chips {
    flex: 1 1 100%;
    margin-left: 0;
    justify-content: stretch;
    align-self: stretch;
    white-space: normal;
  }
}

@media (max-width: 1100px) {
  .chip { padding: 6px 9px; font-size: 11.5px; }
}
.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;

  width: 100%;
  padding: 0.75rem 1rem;

  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;

  color: var(--text);
  text-decoration: none;
  font-weight: 500;

  transition: all 0.15s ease;
  overflow: hidden;
}

.google-btn:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
  background: var(--panel-strong);
}

.google-btn .google-icon {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  display: block;
  flex: 0 0 18px;
}

<style>
  .ai-summary-card {
    margin-top: 24px;
    padding: 16px 18px;
    border: 1px solid #d9dde7;
    border-radius: 10px;
    background: #fafbfc;
    page-break-inside: avoid;
  }

  .ai-summary-header {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
  }

  .ai-summary-headline {
    font-size: 13px;
    line-height: 1.5;
    color: #111827;
    margin-bottom: 10px;
  }

  .ai-section {
    margin-top: 10px;
  }

  .ai-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  .ai-list {
    margin: 0;
    padding-left: 18px;
    font-size: 12px;
    line-height: 1.45;
    color: #1f2937;
  }

  .ai-list li {
    margin-bottom: 4px;
  }
  
  .forge-version-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.env-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: 1px solid currentColor;
}

.env-production {
  color: #22c55e;
}

.env-development {
  color: #f59e0b;
}

.env-staging {
  color: #38bdf8;
}
</style>
