/*
  Internet Goods Ad Intelligence — shared design system
  One stylesheet for every page: index, dashboard, ads, landing pages,
  brands, add-brand, reports. Class names match the markup already in
  use across those pages so each one can adopt this file later by
  swapping its <style> block for a <link>, without touching markup.
*/

/* ============ Tokens ============ */
:root {
  /* Palette */
  --ink: #16130f;
  --ink-soft: #322c25;
  --paper: #f6f1e7;
  --surface: #ffffff;
  --line: #e3d8c5;
  --line-soft: #eee5d5;
  --brass: #a97c3f;
  --brass-deep: #8a6330;
  --brass-tint: #f1e4cd;
  --muted: #6f665b;

  /* Status */
  --signal: #2f6b4d;
  --signal-tint: #e4f1e9;
  --alert: #9c3b30;
  --alert-tint: #f8e7e3;
  --amber: #8a6716;
  --amber-tint: #fbeecb;

  /* Type */
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  /* Space */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 48px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(22, 19, 15, 0.05), 0 8px 20px rgba(22, 19, 15, 0.06);
  --shadow-md: 0 16px 36px rgba(22, 19, 15, 0.12);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ============ Base ============ */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ink);
  font-weight: 700;
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* ============ Layout ============ */
header {
  background:
    radial-gradient(680px 260px at 88% -20%, rgba(169, 124, 63, 0.35), transparent 60%),
    var(--ink);
  color: white;
  padding: 56px 28px;
}

header .inner,
main {
  max-width: 1180px;
  margin: 0 auto;
}

main {
  padding: 28px;
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  color: var(--brass-tint);
  margin-bottom: 14px;
  font-weight: 600;
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(36px, 5.4vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-weight: 600;
  max-width: 900px;
}

.subtitle {
  max-width: 760px;
  margin-top: 18px;
  color: #ded6c8;
  font-size: 18px;
  line-height: 1.55;
}

h2 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 27px;
  letter-spacing: -0.01em;
  font-weight: 600;
}

footer {
  padding: 30px 28px 48px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ============ Nav ============ */
.nav {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 10px 16px;
  font-weight: 700;
  font-size: 14px;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.nav a:hover {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

/* ============ Cards ============ */
.card,
.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 250px;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.grid .card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card h2 {
  margin: 0 0 10px;
  font-size: 25px;
}

.card h3,
h3 {
  margin: 0 0 12px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.card p {
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 18px;
}

.card > .button {
  margin-top: auto;
}

.card ul {
  margin: 0 0 20px;
  padding-left: 18px;
  color: var(--ink-soft);
  line-height: 1.6;
}

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

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

/* Optional heading as the first child of a grid section (filters/metrics/
   breakdowns) spans the full row instead of becoming a grid cell. */
.filters > h2,
.metrics > h2,
.grid-2 > h2 {
  grid-column: 1 / -1;
  margin-bottom: 4px;
}

/* ============ Metrics ============ */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

/* Variant for sections with 5 metric cards (e.g. brands page). */
.metrics.cols-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 1050px) {
  .metrics.cols-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .metrics.cols-5 {
    grid-template-columns: 1fr;
  }
}

.metric-card .label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.metric-card .value {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  margin-top: 8px;
}

/* ============ Filters / toolbar ============ */
.filters,
.toolbar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 12px;
}

.filters {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.toolbar {
  grid-template-columns: 1fr 220px 220px;
  align-items: end;
}

label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 8px;
}

input,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.15s var(--ease);
}

input:focus,
select:focus {
  border-color: var(--brass);
}

/* Plain vertical forms (e.g. inside a .card) space fields with margin
   instead of a grid gap. */
.card input,
.card select {
  margin-bottom: 18px;
}

/* ============ Buttons ============ */
.button,
button {
  display: inline-block;
  text-decoration: none;
  background: var(--ink);
  color: white;
  border: 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-family: var(--font-body);
  font-size: 14px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s var(--ease);
}

.button:hover,
button:hover:not(:disabled) {
  background: var(--brass-deep);
  box-shadow: var(--shadow-sm);
}

.button.secondary,
.btn-light {
  background: var(--brass-tint);
  color: var(--ink);
  border: 1px solid var(--line);
}

.button.secondary:hover,
.btn-light:hover:not(:disabled) {
  background: var(--line-soft);
}

.btn-dark {
  background: var(--ink);
  color: white;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

button.btn-dark,
button.btn-light {
  padding: 9px 11px;
  font-size: 13px;
  margin: 3px;
  border-radius: var(--radius-sm);
}

.button-link {
  display: inline-block;
  background: white;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-weight: 700;
  margin-top: 12px;
}

/* ============ Tables ============ */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  background: var(--ink);
  color: white;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

tr:last-child td,
.row:last-child {
  border-bottom: 0;
}

tbody tr:hover {
  background: var(--paper);
}

.table-wrap {
  overflow-x: auto;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}

.count {
  font-family: var(--font-mono);
  font-weight: 700;
  background: var(--brass-tint);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.headline {
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.35;
}

.number {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
}

/* ============ Badges / tags / status ============ */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  background: var(--brass-tint);
  border: 1px solid var(--line);
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

.status,
.priority {
  display: inline-block;
  font-family: var(--font-mono);
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.priority {
  background: var(--ink);
  color: white;
}

.priority.medium {
  background: var(--brass-tint);
  color: var(--ink);
  border: 1px solid var(--line);
}

.priority.low {
  background: var(--paper);
  color: var(--muted);
  border: 1px solid var(--line);
}

.active,
.scraped,
.ready {
  background: var(--signal-tint);
  color: var(--signal);
}

.inactive,
.missing {
  background: var(--alert-tint);
  color: var(--alert);
}

.not-scraped {
  background: var(--amber-tint);
  color: var(--amber);
}

/* ============ Loading / error / empty / success states ============ */
.loading,
.empty {
  padding: 18px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: 14px;
}

.error {
  background: var(--alert);
  color: white;
  padding: 18px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  line-height: 1.5;
}

.success {
  background: var(--signal);
  color: white;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  line-height: 1.5;
  display: none;
}

.warning {
  background: var(--amber-tint);
  border: 1px solid #ecd292;
  color: var(--ink);
  padding: 16px;
  border-radius: var(--radius-md);
  line-height: 1.5;
}

.small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

/* Hint text directly under a form field (e.g. inside a .card) sits tight
   under the input and clears space before the next label. */
.card .small {
  margin-top: -8px;
  margin-bottom: 18px;
}

/* ============ Page-specific supporting patterns ============ */
.demo-note {
  background: var(--ink);
  color: white;
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 28px;
  line-height: 1.55;
  box-shadow: var(--shadow-sm);
}

.demo-note strong {
  color: var(--brass-tint);
}

.note {
  background: var(--ink);
  color: white;
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
}

.note p {
  color: #e7e2d7;
  margin-bottom: 0;
}

.meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin: 12px 0;
}

.workflow {
  margin-top: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

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

.step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 14px;
  line-height: 1.45;
}

.step strong {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  font-family: var(--font-display);
}

.output {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: 18px;
  white-space: pre-wrap;
  line-height: 1.5;
  font-family: var(--font-mono);
  font-size: 13px;
  display: none;
}

/* When .success/.error is layered onto .output (recoloring an existing
   output box rather than standing alone), only override its color. */
.output.success {
  background: var(--signal);
  color: white;
}

.output.error {
  background: var(--alert);
  color: white;
}

.preview-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
}

.preview {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 18px;
  display: none;
}

.preview-row {
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.45;
}

.preview-row strong {
  display: inline-block;
  min-width: 120px;
}

/* ============ Responsive ============ */
@media (max-width: 1050px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1000px) {
  .grid,
  .metrics,
  .filters,
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  h1 {
    font-size: 38px;
  }
}

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

  main {
    padding: 20px;
  }
}

@media (max-width: 700px) {
  .grid,
  .metrics,
  .steps {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   App Shell (Internet Goods blue) — MagicBrief-style layout
   ------------------------------------------------------------
   New design system for the upcoming shared app shell (top bar +
   sidebar + workspace). Everything below is namespaced under
   .app-shell / .shell-* so it cannot affect the live pages above,
   which continue to use the brass/paper tokens and bare element
   selectors (button, .card, table, .nav, etc). Desktop/laptop
   focused — not optimized for mobile widths.
   ============================================================ */

:root {
  /* Internet Goods blue / indigo scale */
  --ig-blue-50: #fcf8ff;
  --ig-blue-100: #f0efff;
  --ig-blue-200: #dde1ff;
  --ig-blue-300: #b8c4ff;
  --ig-blue-400: #94a6ff;
  --ig-blue-500: #6d88ff;
  --ig-blue-600: #516ee4;
  --ig-blue-700: #3754c8;
  --ig-blue-800: #1439af;
  --ig-blue-900: #002486;
  --ig-blue-950: #001455;
  --ig-black: #000000;

  /* Shell semantic tokens (built from the scale above) */
  --shell-bg: #f7f8fc;
  --shell-surface: #ffffff;
  --shell-topbar-bg: var(--ig-blue-950);
  --shell-sidebar-bg: var(--ig-blue-950);
  --shell-sidebar-active-bg: var(--ig-blue-800);
  --shell-sidebar-hover-bg: rgba(255, 255, 255, 0.06);
  --shell-primary: var(--ig-blue-700);
  --shell-primary-hover: var(--ig-blue-800);
  --shell-primary-tint: var(--ig-blue-100);
  --shell-border: var(--ig-blue-200);
  --shell-border-soft: #eceef9;
  --shell-text: #0c1030;
  --shell-text-soft: #4b5372;
  --shell-text-muted: #7b84a6;
  --shell-text-on-dark: #ffffff;
  --shell-text-on-dark-soft: rgba(255, 255, 255, 0.68);

  --shell-radius-sm: 8px;
  --shell-radius-md: 12px;
  --shell-radius-lg: 16px;
  --shell-radius-pill: 999px;

  --shell-shadow-sm: 0 1px 2px rgba(10, 20, 70, 0.06), 0 6px 16px rgba(10, 20, 70, 0.06);
  --shell-shadow-md: 0 20px 44px rgba(10, 20, 70, 0.16);

  --shell-topbar-h: 60px;
  --shell-sidebar-w: 240px;
}

/* ---- Shell scaffold ---- */
.app-shell {
  min-height: 100vh;
  background: var(--shell-bg);
  font-family: var(--font-body);
  color: var(--shell-text);
}

.app-shell * {
  box-sizing: border-box;
}

.app-shell :focus-visible {
  outline: 2px solid var(--shell-primary);
  outline-offset: 2px;
}

/* ---- Top bar ---- */
.shell-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--shell-topbar-h);
  background: var(--shell-topbar-bg);
  color: var(--shell-text-on-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 60;
  box-shadow: var(--shell-shadow-sm);
}

.shell-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shell-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--shell-text-on-dark);
  text-decoration: none;
}

.shell-logo-mark {
  width: 28px;
  height: 28px;
  border-radius: var(--shell-radius-sm);
  background: linear-gradient(135deg, var(--ig-blue-500), var(--ig-blue-700));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  color: white;
  flex-shrink: 0;
}

.shell-topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ---- Left sidebar ---- */
.shell-sidebar {
  position: fixed;
  top: var(--shell-topbar-h);
  left: 0;
  bottom: 0;
  width: var(--shell-sidebar-w);
  background: var(--shell-sidebar-bg);
  padding: 16px 12px;
  overflow-y: auto;
  z-index: 50;
}

.shell-nav-group {
  margin-bottom: 20px;
}

.shell-nav-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--shell-text-on-dark-soft);
  padding: 0 10px;
  margin-bottom: 8px;
  font-weight: 600;
}

/* ---- Nav items ---- */
.shell-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--shell-radius-sm);
  color: var(--shell-text-on-dark-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.shell-nav-item .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.shell-nav-item:hover {
  background: var(--shell-sidebar-hover-bg);
  color: var(--shell-text-on-dark);
}

.shell-nav-item.active {
  background: var(--shell-sidebar-active-bg);
  color: var(--shell-text-on-dark);
}

/* ---- Main workspace area ---- */
.shell-main {
  margin-left: var(--shell-sidebar-w);
  padding-top: var(--shell-topbar-h);
  min-height: 100vh;
}

.shell-workspace {
  padding: 28px 32px 60px;
  max-width: 1280px;
}

.shell-workspace-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.shell-workspace-title {
  font-family: var(--font-body);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
  color: var(--shell-text);
}

.shell-workspace-subtitle {
  color: var(--shell-text-soft);
  font-size: 14px;
  margin: 0;
}

.shell-workspace-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---- Buttons ---- */
.shell-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  padding: 10px 16px;
  border-radius: var(--shell-radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  background: var(--shell-primary);
  color: white;
  transition: background 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.1s var(--ease);
}

.shell-btn:hover {
  background: var(--shell-primary-hover);
  box-shadow: var(--shell-shadow-sm);
}

.shell-btn:active {
  transform: translateY(1px);
}

.shell-btn.secondary {
  background: var(--shell-surface);
  color: var(--shell-text);
  border: 1px solid var(--shell-border);
}

.shell-btn.secondary:hover {
  background: var(--shell-primary-tint);
}

.shell-btn.ghost {
  background: transparent;
  color: var(--shell-text-soft);
  border: 1px solid transparent;
}

.shell-btn.ghost:hover {
  background: var(--shell-border-soft);
  color: var(--shell-text);
}

/* ---- Cards ---- */
.shell-card {
  background: var(--shell-surface);
  border: 1px solid var(--shell-border);
  border-radius: var(--shell-radius-lg);
  padding: 20px;
  box-shadow: var(--shell-shadow-sm);
}

.shell-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.shell-card-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--shell-text-muted);
  font-weight: 600;
  margin-bottom: 8px;
}

.shell-card-value {
  font-family: var(--font-body);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--shell-text);
}

.shell-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--shell-text);
  margin: 0 0 8px;
}

.shell-card-body {
  color: var(--shell-text-soft);
  font-size: 14px;
  line-height: 1.55;
}

/* ---- Tables ---- */
/* No overflow:hidden here — a row's overflow menu (see .shell-filter used
   as a row action menu) must be able to pop outside the table bounds.
   Rounded corners are instead applied directly to the corner cells. */
.shell-table-wrap {
  background: var(--shell-surface);
  border: 1px solid var(--shell-border);
  border-radius: var(--shell-radius-lg);
  box-shadow: var(--shell-shadow-sm);
}

.shell-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.shell-table th {
  background: var(--shell-bg);
  color: var(--shell-text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--shell-border);
}

.shell-table thead th:first-child {
  border-top-left-radius: var(--shell-radius-lg);
}

.shell-table thead th:last-child {
  border-top-right-radius: var(--shell-radius-lg);
}

.shell-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--shell-border-soft);
  font-size: 14px;
  color: var(--shell-text);
  vertical-align: middle;
}

.shell-table tr:last-child td {
  border-bottom: 0;
}

.shell-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: var(--shell-radius-lg);
}

.shell-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--shell-radius-lg);
}

.shell-table tbody tr:hover {
  background: var(--shell-primary-tint);
}

/* ---- Table cell helpers (brand identity, status, TODO placeholders) ---- */
.shell-brand-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* .shell-brand-cell doubles as a link (Brand Tracker -> brand-detail.html);
   reset the global `a` styling and only hint at it being clickable on hover. */
a.shell-brand-cell {
  text-decoration: none;
  color: inherit;
  font-weight: normal;
}

a.shell-brand-cell:hover .shell-brand-name {
  color: var(--shell-primary);
  text-decoration: underline;
}

.shell-avatar-brand {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--ig-blue-400), var(--ig-blue-600));
  color: white;
  font-size: 13px;
}

.shell-avatar-brand.is-inactive {
  background: var(--shell-text-muted);
}

.shell-brand-name {
  font-weight: 700;
  color: var(--shell-text);
}

.shell-todo-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--shell-text-muted);
  background: var(--shell-bg);
  border: 1px dashed var(--shell-border);
  padding: 3px 8px;
  border-radius: var(--shell-radius-pill);
  cursor: help;
}

/* ---- Icon-only filter trigger (used for row action / overflow menus) ---- */
.shell-filter-btn.icon-only {
  padding: 6px;
  width: 32px;
  height: 32px;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
}

/* ---- Search input + toolbar row ---- */
.shell-search-input {
  border: 1px solid var(--shell-border);
  color: var(--shell-text);
  background: var(--shell-surface);
  border-radius: var(--shell-radius-sm);
}

.shell-search-input:focus {
  border-color: var(--shell-primary);
}

.shell-toolbar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* ---- Loading / empty states inside the shell ---- */
.app-shell .loading,
.app-shell .empty {
  background: var(--shell-surface);
  border: 1px dashed var(--shell-border);
  color: var(--shell-text-muted);
}

/* ---- 5-column card grid variant (metric rows) ---- */
.shell-card-grid.cols-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 1300px) {
  .shell-card-grid.cols-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .shell-card-grid.cols-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---- Tabs ---- */
.shell-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--shell-border);
  margin-bottom: 20px;
}

.shell-tab {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 10px 4px;
  margin-right: 20px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--shell-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.shell-tab:hover {
  color: var(--shell-text);
}

.shell-tab.active {
  color: var(--shell-primary);
  border-bottom-color: var(--shell-primary);
}

/* ---- Filter button / dropdown shell ---- */
.shell-filter {
  position: relative;
  display: inline-block;
}

.shell-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--shell-surface);
  border: 1px solid var(--shell-border);
  color: var(--shell-text);
  padding: 9px 14px;
  border-radius: var(--shell-radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}

.shell-filter-btn:hover,
.shell-filter.open .shell-filter-btn {
  border-color: var(--shell-primary);
  background: var(--shell-primary-tint);
}

.shell-filter-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  background: var(--shell-surface);
  border: 1px solid var(--shell-border);
  border-radius: var(--shell-radius-md);
  box-shadow: var(--shell-shadow-md);
  padding: 10px;
  z-index: 40;
  display: none;
}

.shell-filter.open .shell-filter-dropdown {
  display: block;
}

.shell-filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--shell-radius-sm);
  font-size: 14px;
  color: var(--shell-text);
  cursor: pointer;
}

.shell-filter-option:hover {
  background: var(--shell-bg);
}

/* ---- Modal shell ---- */
.shell-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 34, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.shell-modal-overlay.open {
  display: flex;
}

.shell-modal {
  background: var(--shell-surface);
  border-radius: var(--shell-radius-lg);
  box-shadow: var(--shell-shadow-md);
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}

.shell-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--shell-border-soft);
}

.shell-modal-title {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  color: var(--shell-text);
}

.shell-modal-close {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--shell-text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.shell-modal-close:hover {
  color: var(--shell-text);
}

.shell-modal-body {
  padding: 20px;
}

.shell-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--shell-border-soft);
}

/* ---- Empty state ---- */
.shell-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 24px;
  background: var(--shell-surface);
  border: 1px dashed var(--shell-border);
  border-radius: var(--shell-radius-lg);
  color: var(--shell-text-muted);
}

.shell-empty-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--shell-radius-md);
  background: var(--shell-primary-tint);
  color: var(--shell-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 20px;
}

.shell-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--shell-text);
  margin-bottom: 4px;
}

.shell-empty-body {
  font-size: 13px;
  max-width: 320px;
  line-height: 1.5;
}

/* ---- Workspace / account menu ---- */
.shell-account-menu {
  position: relative;
  display: inline-block;
}

.shell-account-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--shell-text-on-dark);
  padding: 6px 10px 6px 6px;
  border-radius: var(--shell-radius-pill);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s var(--ease);
}

.shell-account-trigger:hover,
.shell-account-menu.open .shell-account-trigger {
  background: rgba(255, 255, 255, 0.12);
}

.shell-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ig-blue-400), var(--ig-blue-600));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

/* When a real brand logo is available, .shell-avatar is applied to an
   <img> instead of a <span> — same size/circle/classes, just needs the
   image itself to fill and crop correctly. */
img.shell-avatar {
  object-fit: cover;
}

.shell-account-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--shell-surface);
  border: 1px solid var(--shell-border);
  border-radius: var(--shell-radius-md);
  box-shadow: var(--shell-shadow-md);
  padding: 8px;
  z-index: 70;
  display: none;
}

.shell-account-menu.open .shell-account-dropdown {
  display: block;
}

.shell-account-dropdown-item {
  display: block;
  padding: 9px 10px;
  border-radius: var(--shell-radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--shell-text);
  text-decoration: none;
  cursor: pointer;
}

.shell-account-dropdown-item:hover {
  background: var(--shell-bg);
}

.shell-account-dropdown-divider {
  height: 1px;
  background: var(--shell-border-soft);
  margin: 6px 0;
}

/* ---- 4-column card grid variant (Discover metrics row) ---- */
.shell-card-grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1150px) {
  .shell-card-grid.cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---- Filter dropdown extras: disabled options + inline note ---- */
.shell-filter-option.is-disabled {
  color: var(--shell-text-muted);
  cursor: not-allowed;
}

.shell-filter-option.is-disabled:hover {
  background: transparent;
}

.shell-filter-note {
  font-size: 12px;
  color: var(--shell-text-muted);
  padding: 6px 10px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--shell-border-soft);
  line-height: 1.4;
}

.shell-filter-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---- Soft tag (format / metadata chip on ad cards) ---- */
.shell-tag-soft {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--shell-primary);
  background: var(--shell-primary-tint);
  padding: 4px 9px;
  border-radius: var(--shell-radius-pill);
}

/* ---- Ad grid + ad cards (Discover page) ---- */
.shell-ad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 24px;
}

.shell-ad-card {
  background: var(--shell-surface);
  border: 1px solid var(--shell-border-soft);
  border-radius: var(--shell-radius-lg);
  box-shadow: var(--shell-shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.18s var(--ease), transform 0.18s var(--ease), border-color 0.18s var(--ease);
}

.shell-ad-card:hover {
  box-shadow: var(--shell-shadow-md);
  border-color: var(--shell-border);
  transform: translateY(-3px);
}

.shell-ad-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
}

.shell-ad-card-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.shell-ad-card-brand-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--shell-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell-runtime-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--shell-text-soft);
  background: var(--shell-bg);
  padding: 4px 9px;
  border-radius: var(--shell-radius-pill);
  flex-shrink: 0;
}

.shell-runtime-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ig-blue-600);
}

/* Placeholder media area — no live creative URLs exist yet, so this is a
   deliberately branded "not available" state rather than a broken image. */
.shell-ad-media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: linear-gradient(165deg, var(--ig-blue-50) 0%, var(--shell-bg) 78%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.shell-ad-media-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--shell-surface);
  box-shadow: var(--shell-shadow-sm);
  font-size: 22px;
  line-height: 1;
}

.shell-ad-media-copy {
  text-align: center;
}

.shell-ad-media-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--shell-text-soft);
}

.shell-ad-media-caption {
  font-size: 11.5px;
  color: var(--shell-text-muted);
  margin-top: 2px;
}

/* Real creative preview — image ads, and the poster frame behind a video's
   play button. Fills the same 4:5 box the placeholder uses. */
.shell-ad-media-img,
.shell-ad-media-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--shell-bg);
}

.shell-ad-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  padding: 0 0 0 3px;
  border-radius: 50%;
  background: rgba(12, 16, 48, 0.72);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s var(--ease), transform 0.15s var(--ease);
}

.shell-ad-play-btn:hover {
  background: var(--ig-blue-700);
  transform: translate(-50%, -50%) scale(1.06);
}

.shell-ad-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.shell-ad-headline {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--shell-text);
  line-height: 1.4;
}

.shell-ad-copy {
  font-size: 13px;
  color: var(--shell-text-soft);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shell-ad-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--shell-border-soft);
}

.shell-ad-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--shell-primary);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shell-ad-link:hover {
  color: var(--shell-primary-hover);
  text-decoration: underline;
}

.shell-ad-footnote {
  font-size: 11.5px;
  color: var(--shell-text-muted);
}

/* ---- Breadcrumb (brand detail page) ---- */
.shell-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 18px;
}

.shell-breadcrumb a {
  color: var(--shell-text-muted);
  text-decoration: none;
  font-weight: 600;
}

.shell-breadcrumb a:hover {
  color: var(--shell-primary);
}

.shell-breadcrumb-sep {
  color: var(--shell-border);
}

.shell-breadcrumb-current {
  font-weight: 700;
  color: var(--shell-text);
}

/* ---- Brand identity header card (brand detail page) ---- */
.shell-brand-header {
  background: var(--shell-surface);
  border: 1px solid var(--shell-border);
  border-radius: var(--shell-radius-lg);
  box-shadow: var(--shell-shadow-sm);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.shell-brand-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.shell-avatar-lg {
  width: 56px;
  height: 56px;
  font-size: 20px;
  flex-shrink: 0;
}

.shell-brand-header-name {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 700;
  color: var(--shell-text);
  letter-spacing: -0.01em;
}

.shell-brand-header-meta {
  font-size: 13px;
  color: var(--shell-text-muted);
  margin-top: 2px;
}

.shell-brand-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.shell-brand-header-stat {
  text-align: right;
}

.shell-brand-header-stat-value {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--shell-text);
}

.shell-brand-header-updated {
  font-size: 12px;
  color: var(--shell-text-muted);
  margin-top: 2px;
}

.shell-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ig-blue-500);
  flex-shrink: 0;
}

.shell-status-dot.is-inactive {
  background: var(--shell-text-muted);
}

/* ---- Two-column layout (Overview tab: Media Mix + Top Landing Pages) ---- */
.shell-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

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

.shell-section-heading {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  color: var(--shell-text);
  margin: 0 0 14px;
}

/* ---- Media Mix rows (Overview tab) ---- */
.shell-media-mix-row {
  display: grid;
  grid-template-columns: 78px 1fr 64px;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 13px;
}

.shell-media-mix-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--shell-text);
  font-weight: 600;
}

.shell-media-mix-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.shell-media-mix-bar {
  background: var(--shell-bg);
  border-radius: var(--shell-radius-pill);
  height: 8px;
  overflow: hidden;
}

.shell-media-mix-bar-fill {
  height: 100%;
  border-radius: var(--shell-radius-pill);
}

.shell-media-mix-value {
  text-align: right;
  font-family: var(--font-mono);
  color: var(--shell-text-soft);
  font-size: 12px;
}

/* ---- Mini landing-page list (Overview tab preview) ---- */
.shell-lp-mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--shell-border-soft);
}

.shell-lp-mini-row:last-child {
  border-bottom: 0;
}

.shell-lp-mini-url {
  font-size: 13px;
  color: var(--shell-text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.shell-lp-mini-url:hover {
  color: var(--shell-primary);
  text-decoration: underline;
}

.shell-lp-mini-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--shell-text-soft);
  background: var(--shell-bg);
  padding: 3px 8px;
  border-radius: var(--shell-radius-pill);
  flex-shrink: 0;
}

.shell-card-footer-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--shell-primary);
  cursor: pointer;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
}

.shell-card-footer-link:hover {
  text-decoration: underline;
}

/* ============================================================
   App-shell consistency overrides
   ------------------------------------------------------------
   Pages carrying class="app-shell" (Discover, Brand Tracker, Brand
   Detail, Landing Pages, Reports, Dashboard) still reuse some of the
   original shared classes/elements for their inner content (old
   tables, cards, filters, the Add Brand modal's preview/output
   blocks) instead of the newer shell-* components. These rules
   restyle those shared classes to the Internet Goods blue system
   *only* inside .app-shell, via extra specificity (an .app-shell
   ancestor plus the original selector) rather than editing the
   base rules — so legacy pages (index.html, add-brand.html, the
   old prototype files) keep their original brass/paper look
   completely untouched.
   ============================================================ */

.app-shell h1,
.app-shell h2 {
  font-family: var(--font-body);
}

.app-shell h3 {
  color: var(--shell-text);
}

.app-shell label {
  color: var(--shell-text-muted);
}

.app-shell input,
.app-shell select {
  border-color: var(--shell-border);
  color: var(--shell-text);
  background: var(--shell-surface);
  border-radius: var(--shell-radius-sm);
}

.app-shell input:focus,
.app-shell select:focus {
  border-color: var(--shell-primary);
}

.app-shell .small {
  color: var(--shell-text-muted);
}

.app-shell .card,
.app-shell .metric-card {
  background: var(--shell-surface);
  border: 1px solid var(--shell-border);
  border-radius: var(--shell-radius-lg);
  box-shadow: var(--shell-shadow-sm);
}

.app-shell .metric-card .label {
  color: var(--shell-text-muted);
}

.app-shell .metric-card .value {
  font-family: var(--font-body);
  font-weight: 800;
  color: var(--shell-text);
}

.app-shell .filters,
.app-shell .toolbar {
  background: var(--shell-surface);
  border: 1px solid var(--shell-border);
  border-radius: var(--shell-radius-md);
  box-shadow: var(--shell-shadow-sm);
}

/* Scoped to .table-wrap (the old bare-<table> pattern still used by
   Dashboard/Landing Pages' inner content) so it can never compete with
   the newer .shell-table/.shell-table-wrap component's own rules. */
.app-shell .table-wrap table {
  border-color: var(--shell-border);
  box-shadow: var(--shell-shadow-sm);
}

.app-shell .table-wrap th {
  background: var(--shell-bg);
  color: var(--shell-text-muted);
}

.app-shell .table-wrap td {
  border-bottom-color: var(--shell-border-soft);
  color: var(--shell-text);
}

.app-shell .table-wrap tbody tr:hover {
  background: var(--shell-primary-tint);
}

.app-shell .tag {
  background: var(--shell-primary-tint);
  border-color: var(--shell-border);
  color: var(--shell-primary);
}

.app-shell .count {
  background: var(--shell-primary-tint);
  color: var(--shell-primary);
}

.app-shell .row {
  border-bottom-color: var(--shell-border-soft);
}

.app-shell .button,
.app-shell .btn-dark {
  background: var(--shell-primary);
  border-radius: var(--shell-radius-sm);
}

.app-shell .button:hover {
  background: var(--shell-primary-hover);
}

.app-shell .btn-light {
  background: var(--shell-primary-tint);
  color: var(--shell-text);
  border: 1px solid var(--shell-border);
}

.app-shell .btn-light:hover {
  background: var(--shell-border-soft);
}

.app-shell .priority {
  background: var(--shell-primary);
  color: white;
}

.app-shell .priority.medium {
  background: var(--shell-primary-tint);
  color: var(--shell-primary);
  border-color: var(--shell-border);
}

.app-shell .priority.low {
  background: var(--shell-bg);
  color: var(--shell-text-muted);
  border-color: var(--shell-border);
}

.app-shell .status.active,
.app-shell .status.scraped,
.app-shell .status.ready {
  background: #e7f6ec;
  color: #15803d;
}

.app-shell .status.inactive,
.app-shell .status.missing {
  background: #fdecec;
  color: #dc2626;
}

.app-shell .status.not-scraped {
  background: #fff4e5;
  color: #b45309;
}

.app-shell .error {
  background: #dc2626;
  border-radius: var(--shell-radius-md);
}

.app-shell .success {
  background: #16a34a;
  border-radius: var(--shell-radius-md);
}

.app-shell .warning {
  background: #fff4e5;
  border: 1px solid #fbd38d;
  color: var(--shell-text);
  border-radius: var(--shell-radius-md);
}

.app-shell .preview {
  background: var(--shell-bg);
  border: 1px solid var(--shell-border);
  border-radius: var(--shell-radius-md);
}

.app-shell .preview-label {
  color: var(--shell-text-muted);
}

.app-shell .output {
  background: var(--shell-bg);
  color: var(--shell-text);
  border: 1px solid var(--shell-border);
  border-radius: var(--shell-radius-md);
}

.app-shell .output.success {
  background: #16a34a;
  color: white;
}

.app-shell .output.error {
  background: #dc2626;
  color: white;
}

.app-shell .note {
  background: var(--ig-blue-950);
  border-radius: var(--shell-radius-md);
}

.app-shell .note p {
  color: rgba(255, 255, 255, 0.82);
}

.app-shell .meta {
  color: var(--shell-text-muted);
}
