/* ReBump design tokens for the PR Command Center.
 *
 * EXTRACTED from the ReBump dashboard source (HEAD ecdd4a4), NOT invented:
 *   Frontend/static/rebump-app.css :root lines 3-17 (dark) and
 *   :root[data-theme="light"] lines 18-30 (light); identical blocks in
 *   Frontend/static/rebump-reference.css lines 3-30.
 *
 * Keep in sync with services/rebumpTheme.ts — the TS file is the authority.
 * This file was previously referenced by index.html but missing from the
 * repo; it now exists at public/index.css so the /index.css href resolves.
 *
 * Dark is the default ("deep blue glass"). Light is opt-in via
 * <html data-theme="light">.
 */

:root {
  /* deep blue glass: dark default */
  --bg: #020822;
  --glow1: rgba(34, 92, 230, .46);
  --glow2: rgba(0, 190, 240, .12);
  --glow3: rgba(100, 64, 230, .22);
  --vgrad: linear-gradient(180deg, #FFFFFF, #A9C6FF);
  --surface: rgba(20, 40, 100, .36);
  --surface2: rgba(130, 170, 255, .09);
  --solid: #0A1640;
  --hi: rgba(255, 255, 255, .16);
  --line: rgba(165, 198, 255, .22);
  --line2: rgba(170, 200, 255, .36);
  --fg: #EAF1FF;
  --muted: #AFC0E8;
  --faint: #8DA0D0;
  --accent: #5C95FF;
  --accent-ink: #031033;
  --accent-soft: rgba(92, 149, 255, .13);
  --accent2: #35D9FF;
  --good: #3FDDAA;
  --good-soft: rgba(63, 221, 170, .15);
  --warn: #F6C453;
  --warn-soft: rgba(246, 196, 83, .15);
  --bad: #FF7C8C;
  --bad-soft: rgba(255, 124, 140, .16);
  --shadow: 0 18px 50px -16px rgba(0, 10, 60, .85);
  --blur: blur(30px) saturate(190%);
  --f-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}

:root[data-theme="light"] {
  /* frosted icy light, opt-in — rebump-app.css lines 18-30 */
  --bg: #E3ECFF;
  --vgrad: linear-gradient(var(--fg), var(--fg));
  --glow1: rgba(80, 130, 255, .30);
  --glow2: rgba(70, 210, 255, .22);
  --glow3: rgba(150, 120, 255, .16);
  --surface: rgba(255, 255, 255, .62);
  --surface2: rgba(70, 110, 220, .09);
  --solid: #FFFFFF;
  --hi: rgba(255, 255, 255, .7);
  --line: rgba(50, 90, 190, .16);
  --line2: rgba(50, 90, 190, .28);
  --fg: #0B1B44;
  --muted: #3A4D7E;
  --faint: #5A6EA0;
  --accent: #2B5FFF;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(43, 95, 255, .12);
  --accent2: #0BA8D6;
  --good: #0B8F63;
  --good-soft: rgba(11, 143, 99, .12);
  --warn: #A8690B;
  --warn-soft: rgba(168, 105, 11, .13);
  --bad: #D03A4A;
  --bad-soft: rgba(208, 58, 74, .12);
  --shadow: 0 12px 36px -16px rgba(30, 60, 140, .30);
  color-scheme: light;
}

/* Paused automation: the whole dashboard turns red.
 * Source: rebump-app.css body.is-paused, line 429 (light line 434). */
body.is-paused {
  --bg: #16050C;
  --glow1: rgba(255, 64, 88, .46);
  --glow2: rgba(255, 120, 64, .16);
  --glow3: rgba(190, 36, 96, .26);
  --surface: rgba(96, 20, 40, .36);
  --surface2: rgba(255, 130, 150, .10);
  --solid: #2B0E1B;
  --hi: rgba(255, 200, 205, .16);
  --line: rgba(255, 150, 165, .24);
  --line2: rgba(255, 160, 175, .38);
  --accent: #FF6B7C;
  --accent-ink: #2A0510;
  --accent-soft: rgba(255, 107, 124, .17);
  --accent2: #FF9A6E;
  --muted: #EBB6C0;
  --faint: #C98B99;
  --shadow: 0 18px 50px -16px rgba(60, 0, 16, .9);
}

html[data-theme="light"] body.is-paused {
  --bg: #FFE9ED;
  --glow1: rgba(255, 100, 120, .30);
  --glow2: rgba(255, 160, 110, .22);
  --glow3: rgba(220, 80, 130, .16);
  --surface: rgba(255, 255, 255, .66);
  --surface2: rgba(220, 60, 90, .08);
  --solid: #FFFFFF;
  --line: rgba(190, 50, 80, .18);
  --line2: rgba(190, 50, 80, .30);
  --fg: #3A0A18;
  --muted: #7A2B3C;
  --faint: #9A4A5B;
  --accent: #D6304A;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(214, 48, 74, .12);
  --accent2: #E8643A;
}

/* ReBump page background: three radial glows over --bg, fixed attachment.
 * Source: rebump-app.css line 31. */
body {
  background:
    radial-gradient(900px 560px at 8% -8%, var(--glow1), transparent 62%),
    radial-gradient(760px 520px at 100% 2%, var(--glow2), transparent 58%),
    radial-gradient(700px 500px at 60% 110%, var(--glow3), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--fg);
  font: 14px/1.5 var(--f-body);
}

/* =====================================================================
 * ReBump skin layer — maps the PR app's old Tailwind palette onto the
 * ReBump tokens above, and provides .rb-* component classes mirroring
 * rebump-app.css (.card, .btn.primary, .pill, .in, .nav, .bar, .kpi).
 *
 * Why overrides instead of editing every class: the app has ~2000
 * Tailwind color utilities across 30+ components; the override layer
 * re-skins them all from the CSS variables, so dark/light both follow
 * `data-theme` (wired by App.tsx) with no per-component color edits.
 * `!important` is required because the Tailwind Play CDN injects its
 * generated stylesheet after this file — equal specificity would lose.
 * Source for every value: services/rebumpTheme.ts (the authority).
 * ===================================================================== */

/* --- base type: Instrument Sans body, Bricolage display for headings --- */
.font-sans { font-family: var(--f-body) !important; }
h1, h2, h3, .font-display { font-family: var(--f-display); }
input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }
::selection { background: var(--accent-soft); color: var(--fg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* --- .rb-* components (rebump-app.css mirrors) --- */
.rb-card {
  background: linear-gradient(150deg, rgba(255,255,255,.10), rgba(255,255,255,.02) 55%), var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(150,195,255,.22), inset 0 0 40px -22px rgba(92,149,255,.35);
  backdrop-filter: var(--blur);
}
.rb-card-pad { padding: 24px; }
.rb-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 17px; border-radius: 12px; font-weight: 500; font-size: 14px;
  border: 1px solid transparent; cursor: pointer; transition: all .2s;
  color: var(--fg); background: transparent; text-decoration: none;
}
.rb-btn:disabled { opacity: .4; cursor: not-allowed; }
.rb-btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--accent-ink);
  box-shadow: 0 10px 28px -8px var(--accent), inset 0 1px 0 rgba(255,255,255,.35);
}
.rb-btn-primary:hover { box-shadow: 0 8px 22px -10px var(--accent); }
.rb-btn-ghost { border-color: transparent; color: var(--muted); }
.rb-btn-ghost:hover { background: var(--surface2); color: var(--fg); }
.rb-btn-danger { color: var(--bad); }
.rb-btn-danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.rb-btn-sm { padding: 6px 12px; border-radius: 8px; font-size: 13px; }
.rb-btn-icon { padding: 8px; border-radius: 12px; }
.rb-input, .rb-select, .rb-textarea {
  padding: 8px 11px; border: 1px solid var(--line2); border-radius: 12px;
  background: var(--surface2); color: var(--fg); font-size: 14px; width: 100%;
}
.rb-input:focus, .rb-select:focus, .rb-textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 22px -6px var(--accent);
}
.rb-textarea { min-height: 85px; }
.rb-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 99px;
  background: var(--surface2); color: var(--muted); white-space: nowrap;
}
.rb-pill-good { background: var(--good-soft); color: var(--good); }
.rb-pill-warn { background: var(--warn-soft); color: var(--warn); }
.rb-pill-neutral { background: rgba(148,163,184,.15); color: #94A3B8; }
.rb-pill-bad { background: var(--bad-soft); color: var(--bad); }
.rb-pill-acc { background: var(--accent-soft); color: var(--accent); }
.rb-eyebrow {
  font-size: 10px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--faint);
}
/* Page header bar: eyebrow + h1 + dim sub, primary action top-right.
 * Source: rebump_clients.html .bar + rebump.css .page h1. */
.rb-bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.rb-bar h1 {
  font-size: 32px; line-height: 1.2; font-weight: 600; margin: 2px 0 4px;
  background: var(--vgrad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.rb-bar .rb-sub { color: var(--muted); font-size: 14px; }
/* KPI big number: 600 30px display font, gradient text. Source: rebump-app.css:96. */
.rb-kpi-v {
  font: 600 30px/1.1 var(--f-display);
  background: var(--vgrad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* Logo tile: white gradient tile, logo 26px. Source: rebump-app.css:362-364. */
.rb-logo-tile {
  background: linear-gradient(180deg, #FFFFFF, #DCE9FF);
  border-radius: 14px; padding: 8px 11px; flex-shrink: 0;
  box-shadow: 0 8px 24px -8px rgba(60,140,255,.7), inset 0 1px 0 #fff;
  display: flex; align-items: center; justify-content: center;
}
.rb-logo-tile img { height: 26px; width: auto; display: block; }
/* Sidebar nav: 13px links, 9px radius, gradient active state. */
.rb-navgrp {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--faint); padding: 14px 12px 6px; font-weight: 600;
}
.rb-nav {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 9px 12px; border-radius: 9px; font-size: 13px; font-weight: 500;
  color: var(--muted); cursor: pointer; border: 1px solid transparent;
  background: transparent; text-align: left; transition: all .15s;
}
.rb-nav:hover { background: var(--surface2); color: var(--fg); }
.rb-nav.on {
  background: linear-gradient(135deg, rgba(92,149,255,.42), rgba(53,217,255,.20));
  color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--line2), 0 8px 24px -10px var(--accent);
}
.rb-nav.on .rb-nav-ic { color: var(--accent); }
/* Tables: 12px/500 header, 20px 22px cells, row hover. Source: rebump-app.css:114,324. */
.rb-table th { font-size: 12px; font-weight: 500; color: var(--muted); padding: 14px 22px; text-align: left; }
.rb-table td { padding: 20px 22px; border-top: 1px solid var(--line); }
.rb-table tbody tr:hover { background: rgba(110,160,255,.08); }
/* Dashed "add a client" tile in the grid. Source: rebump_clients.html .client-add. */
.rb-client-add {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 120px; border: 1.5px dashed var(--line2); border-radius: 20px;
  color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer;
  background: transparent; width: 100%; transition: all .15s;
}
.rb-client-add:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.rb-client-add span { font-size: 24px; line-height: 1; }
/* Fieldset with checkbox rows (client form). Source: rebump_clients.html. */
.rb-fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.rb-fieldset legend { font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 0 6px; }
.rb-check-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.rb-check-row:last-child { border-bottom: none; }
/* Sticky topbar: blur, 55% bg mix, 1px line border. Source: rebump-app.css:59. */
.rb-topbar {
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--line);
}
.rb-page { max-width: 1288px; margin: 0 auto; padding: 36px 24px 64px; width: 100%; }
/* Recharts tooltips / chart chrome follow the tokens. */
.recharts-tooltip-wrapper { outline: none !important; }

/* --- Palette overrides: old Tailwind slate/blue/emerald/amber/red -> ReBump vars --- */
/* Backgrounds */
.bg-white { background-color: var(--solid) !important; }
.bg-slate-50 { background-color: var(--bg) !important; }
.bg-slate-100 { background-color: var(--surface2) !important; }
.bg-slate-200 { background-color: var(--surface2) !important; }
.bg-slate-700 { background-color: var(--surface) !important; }
.bg-slate-800 { background-color: var(--solid) !important; }
.bg-slate-900 { background-color: var(--solid) !important; }
.bg-blue-50, .bg-blue-100 { background-color: var(--accent-soft) !important; }
.bg-blue-900 { background-color: var(--accent-soft) !important; }
.bg-blue-500, .bg-blue-600 {
  background-image: linear-gradient(135deg, var(--accent), var(--accent2)) !important;
  background-color: var(--accent) !important;
  color: var(--accent-ink) !important;
}
.bg-emerald-500 { background-color: var(--good) !important; }
.bg-emerald-400 { background-color: var(--good) !important; }
.bg-amber-500, .bg-amber-400 { background-color: var(--warn) !important; }
.bg-red-500, .bg-red-600, .bg-rose-500, .bg-rose-600 { background-color: var(--bad) !important; }
.bg-purple-500, .bg-purple-600 { background-color: var(--accent) !important; }
.bg-orange-500 { background-color: var(--warn) !important; }
.bg-sky-500 { background-color: var(--accent2) !important; }
.bg-rose-50 { background-color: var(--bad-soft) !important; }
.bg-amber-50 { background-color: var(--warn-soft) !important; }
.bg-emerald-50 { background-color: var(--good-soft) !important; }
.bg-purple-50 { background-color: var(--accent-soft) !important; }
.bg-blue-600\/10, .bg-blue-500\/10 { background-color: var(--accent-soft) !important; }
.bg-emerald-500\/10, .bg-emerald-500\/20 { background-color: var(--good-soft) !important; }
.bg-amber-500\/10, .bg-amber-500\/20 { background-color: var(--warn-soft) !important; }
.bg-red-500\/10, .bg-red-500\/20 { background-color: var(--bad-soft) !important; }
.bg-purple-500\/10 { background-color: var(--accent-soft) !important; }
.bg-orange-500\/20 { background-color: var(--warn-soft) !important; }
.hover\:bg-slate-100:hover { background-color: var(--surface2) !important; }
.hover\:bg-slate-800:hover { background-color: var(--surface2) !important; }
.hover\:bg-blue-700:hover { background-color: var(--accent) !important; background-image: none !important; }
.hover\:bg-blue-500:hover { background-color: var(--accent) !important; background-image: none !important; }
/* Text */
.text-slate-900, .text-slate-800, .text-slate-200 { color: var(--fg) !important; }
.text-slate-700, .text-slate-600, .text-slate-500, .text-slate-300 { color: var(--muted) !important; }
.text-slate-400 { color: var(--faint) !important; }
.text-blue-600, .text-blue-500, .text-blue-400 { color: var(--accent) !important; }
.text-blue-300 { color: var(--accent2) !important; }
.text-emerald-500, .text-emerald-400, .text-emerald-300, .text-emerald-600, .text-emerald-700 { color: var(--good) !important; }
.text-amber-400, .text-amber-300, .text-amber-500, .text-amber-600, .text-amber-700 { color: var(--warn) !important; }
.text-red-500, .text-red-400, .text-red-600, .text-red-300, .text-red-700 { color: var(--bad) !important; }
.text-rose-500, .text-rose-300, .text-rose-700, .text-rose-400 { color: var(--bad) !important; }
.text-purple-500, .text-purple-600, .text-purple-700 { color: var(--accent) !important; }
.text-purple-400, .text-purple-300 { color: var(--accent2) !important; }
.text-orange-400, .text-orange-500, .text-orange-600 { color: var(--warn) !important; }
.text-gray-500, .text-gray-400 { color: var(--muted) !important; }
.text-sky-300, .text-sky-400 { color: var(--accent2) !important; }
/* Borders */
.border-slate-200, .border-slate-800 { border-color: var(--line) !important; }
.border-slate-700, .border-slate-300 { border-color: var(--line2) !important; }
.border-blue-500, .border-blue-400 { border-color: var(--accent) !important; }
.border-blue-200 { border-color: var(--line2) !important; }
.border-blue-600 { border-color: var(--accent) !important; }
.border-emerald-500 { border-color: var(--good) !important; }
.border-emerald-200 { border-color: var(--good) !important; }
.border-amber-500, .border-amber-200 { border-color: var(--warn) !important; }
.border-red-500, .border-red-300, .border-red-200, .border-rose-200 { border-color: var(--bad) !important; }
.border-purple-500 { border-color: var(--accent) !important; }
.border-orange-500 { border-color: var(--warn) !important; }
.border-rose-800 { border-color: var(--bad) !important; }
.border-amber-800 { border-color: var(--warn) !important; }
.border-emerald-800 { border-color: var(--good) !important; }
.border-purple-800 { border-color: var(--accent) !important; }
/* Rings / focus */
.ring-blue-500 { --tw-ring-color: var(--accent) !important; }
.focus\:ring-blue-500:focus { --tw-ring-color: var(--accent) !important; }
.focus\:border-blue-500:focus { border-color: var(--accent) !important; }
.ring-blue-500\/20 { --tw-ring-color: var(--accent-soft) !important; }
/* Gradient stops used by a few hero/CTA gradients */
.from-slate-900 { --tw-gradient-from: var(--solid) !important; }
.from-slate-800 { --tw-gradient-from: var(--solid) !important; }
.to-slate-800, .to-slate-900 { --tw-gradient-to: var(--solid) !important; }
.from-blue-500 { --tw-gradient-from: var(--accent) !important; }
.to-blue-200 { --tw-gradient-to: var(--accent2) !important; }

/* --- dark: variants (scoped under .dark, mirroring Tailwind's own scoping) --- */
.dark .dark\:bg-\[\#020617\] { background-color: var(--bg) !important; }
.dark .dark\:bg-\[\#0f172a\] { background-color: var(--solid) !important; }
.dark .dark\:bg-\[\#1e293b\] { background-color: var(--solid) !important; }
.dark .dark\:bg-slate-900 { background-color: var(--solid) !important; }
.dark .dark\:bg-slate-800 { background-color: var(--solid) !important; }
.dark .dark\:bg-slate-700 { background-color: var(--surface) !important; }
.dark .dark\:bg-blue-900\/30, .dark .dark\:bg-blue-900\/20 { background-color: var(--accent-soft) !important; }
.dark .dark\:bg-emerald-900\/20, .dark .dark\:bg-emerald-900\/30 { background-color: var(--good-soft) !important; }
.dark .dark\:bg-amber-900\/20, .dark .dark\:bg-amber-900\/30 { background-color: var(--warn-soft) !important; }
.dark .dark\:bg-red-900\/20, .dark .dark\:bg-rose-900\/20 { background-color: var(--bad-soft) !important; }
.dark .dark\:bg-purple-900\/30 { background-color: var(--accent-soft) !important; }
.dark .dark\:bg-orange-900\/10 { background-color: var(--warn-soft) !important; }
.dark .dark\:bg-blue-600\/10 { background-color: var(--accent-soft) !important; }
.dark .dark\:hover\:bg-slate-800:hover { background-color: var(--surface2) !important; }
.dark .dark\:text-white, .dark .dark\:text-slate-100, .dark .dark\:text-slate-200 { color: var(--fg) !important; }
.dark .dark\:text-slate-300 { color: var(--muted) !important; }
.dark .dark\:text-slate-400 { color: var(--faint) !important; }
.dark .dark\:text-blue-400 { color: var(--accent) !important; }
.dark .dark\:text-blue-300 { color: var(--accent2) !important; }
.dark .dark\:text-emerald-300, .dark .dark\:text-emerald-400 { color: var(--good) !important; }
.dark .dark\:text-amber-300, .dark .dark\:text-amber-400 { color: var(--warn) !important; }
.dark .dark\:text-red-300, .dark .dark\:text-red-400 { color: var(--bad) !important; }
.dark .dark\:text-rose-300 { color: var(--bad) !important; }
.dark .dark\:text-purple-400, .dark .dark\:text-purple-300 { color: var(--accent2) !important; }
.dark .dark\:text-orange-400, .dark .dark\:text-orange-500 { color: var(--warn) !important; }
.dark .dark\:border-slate-800 { border-color: var(--line) !important; }
.dark .dark\:border-slate-700 { border-color: var(--line2) !important; }
.dark .dark\:border-blue-600\/20 { border-color: var(--line2) !important; }
.dark .dark\:border-rose-800 { border-color: var(--bad) !important; }
.dark .dark\:border-amber-800 { border-color: var(--warn) !important; }
.dark .dark\:border-emerald-800 { border-color: var(--good) !important; }
.dark .dark\:border-purple-800 { border-color: var(--accent) !important; }

/* --- Arbitrary hex values used across screens --- */
.bg-\[\#020617\] { background-color: var(--bg) !important; }
.bg-\[\#0f172a\] { background-color: var(--solid) !important; }
.bg-\[\#1e293b\] { background-color: var(--solid) !important; }
.bg-\[\#0b101e\] { background-color: var(--bg) !important; }
.bg-\[\#000C40\] { background-color: var(--solid) !important; }
.text-\[\#00E5FF\] { color: var(--accent2) !important; }
.bg-\[\#00E5FF\] { background-color: var(--accent2) !important; }
.border-\[\#0f172a\] { border-color: var(--line) !important; }
