/* 9Yards Brand theme -- admin-selectable third theme (Admin -> Theme), built
   from the 9Yards company profile: near-black "cover" surfaces, white content
   pages, the signature orange (#F09018) for kickers/underline bars/CTAs, and
   the teal -> yellow -> orange -> red prism gradient used on the profile's
   page edges and city-light imagery.

   Loaded AFTER style.css AND style-sub-blue.css (layout.js emits both for
   this theme), so it reuses Sub-Blue's sidebar + card structure and only
   re-skins colors/accents here. Sub-White and Sub-Blue are untouched.

   Contrast notes: bright brand orange (#F09018) is only used as a fill or
   on dark surfaces; text on white uses the deeper #B45309 (~5:1), and
   orange buttons carry near-black text. */

:root {
  --brand-orange: #f09018;
  --brand-orange-deep: #b45309;
  --brand-teal: #12b5b0;
  --brand-yellow: #f5c518;
  --brand-red: #e2412e;
  --brand-ink: #0e0e11;
  --brand-ink-2: #18181d;
  --brand-prism: linear-gradient(90deg, #12b5b0 0%, #f5c518 36%, #f09018 62%, #e2412e 86%, #c81d5e 100%);
  --brand-prism-v: linear-gradient(180deg, #12b5b0 0%, #f5c518 36%, #f09018 62%, #e2412e 86%, #c81d5e 100%);

  /* Shared tokens consumed by style.css / style-sub-blue.css */
  --series-blue: #b45309;
  --series-violet: #0e0e11;
  --surface-1: #ffffff;
  --surface-2: #ffffff;
  --page: #f4f4f6;
  --text-primary: #111114;
  --text-secondary: #3f3f46;
  --text-muted: #71717a;
  --gridline: #e4e4e7;
  --baseline: #d4d4d8;
  --border: rgba(17, 17, 20, 0.12);

  --db-950: #431407;
  --db-900: #7c2d12;
  --db-800: #d97706;
  --db-700: #f09018;
  --db-600: #f5a03a;
  --db-500: #f7b04a;
  --db-300: #fdba74;
  --db-100: #ffedd5;
  --db-50: #fff7ed;
  --db-shadow-card: 0 10px 30px rgba(17, 17, 20, 0.08);
  --db-shadow-card-hover: 0 16px 38px rgba(17, 17, 20, 0.13);
  --db-header-gradient: linear-gradient(105deg, #0e0e11 0%, #18181d 60%, #2a1a0a 100%);
}

body {
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--page);
}

/* Signature prism stripe down the right edge, as on every profile page. */
body::after {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  width: 5px;
  height: 100vh;
  background: var(--brand-prism-v);
  z-index: 60;
  pointer-events: none;
}

/* ---- Top header: near-black "cover" bar with a prism hairline ---- */
.topbar {
  background: var(--brand-ink);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--brand-prism);
}
.main-nav a.active {
  background: rgba(240, 144, 24, 0.16);
  color: #f7b04a;
}
.role-badge {
  background: var(--brand-orange) !important;
  border-color: transparent;
  color: var(--brand-ink);
}

/* ---- Sidebar: dark cover surface with faint city-light glows ---- */
.sidebar {
  background:
    radial-gradient(260px 220px at 0% 100%, rgba(18, 181, 176, 0.18), transparent 70%),
    radial-gradient(240px 200px at 100% 92%, rgba(226, 65, 46, 0.16), transparent 70%),
    var(--brand-ink-2);
  border-right: 0;
}
.sidebar-section-label { color: #8b8b95; }
.sidebar-nav a { color: #e4e4e7; }
.sidebar-nav a:hover { background: rgba(255, 255, 255, 0.07); color: #ffffff; }
.sidebar-nav a.active {
  background: var(--brand-orange);
  color: var(--brand-ink);
  box-shadow: 0 6px 18px rgba(240, 144, 24, 0.28);
}
.sidebar-footer { opacity: 0.8; }
.sidebar-footer .brand-name { color: #ffffff; }
.sidebar-footer .brand-name small { color: #a1a1aa; }
.sidebar-skyline { filter: grayscale(1) brightness(2.4); opacity: 0.55; }

/* ---- Page titles: profile-style heading + short orange underline bar ---- */
.page-header h1 {
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.page-header h1::after {
  content: "";
  display: block;
  width: 46px;
  height: 5px;
  margin-top: 8px;
  background: var(--brand-orange);
  border-radius: 1px;
}

/* ---- Cards ---- */
.card {
  border-radius: 16px;
  border: 1px solid var(--border);
}
.stat-tile h3 { color: var(--brand-orange-deep); letter-spacing: 0.05em; }

/* ---- Pills: dark active segment like the profile's cover panels ---- */
.pill-tabs { background: #ffffff; }
.pill-tabs .active {
  background: var(--brand-ink);
  color: #ffffff;
  box-shadow: inset 0 -3px 0 var(--brand-orange), 0 4px 12px rgba(17, 17, 20, 0.18);
}

/* ---- Primary CTA: brand orange fill, near-black text for contrast ---- */
.btn-primary {
  background: var(--brand-orange);
  color: var(--brand-ink);
  box-shadow: 0 6px 16px rgba(240, 144, 24, 0.3);
}
.btn-primary:hover {
  background: #f5a03a;
  color: var(--brand-ink);
  box-shadow: 0 8px 20px rgba(240, 144, 24, 0.38);
}

/* ---- Tables: neutral header, warm hover ---- */
.data-table th {
  background: #f6f6f7;
  color: var(--text-secondary);
}
.data-table tr:hover td { background: #fffaf3; }
.service-group-header { background: #fafafa; }
.service-group-header .name { font-weight: 700; }

/* ---- Badges ---- */
.badge.yearly { background: var(--db-100); color: var(--db-900); }
.badge.monthly { background: #e3f6f5; color: #0f5e5b; }
.section-title-row .count-badge { background: #ffffff; }

/* ---- KPI mini-charts: teal bars with the current month in orange,
   orange line, matching the profile's teal/orange light streaks ---- */
.kpi-bar { fill: rgba(18, 181, 176, 0.35); }
.kpi-bar.is-current { fill: var(--brand-orange); }
.kpi-bar:hover { fill: var(--brand-teal); }
.kpi-line, .kpi-dot { stroke: var(--brand-orange); }
.kpi-dot { fill: var(--brand-orange); }
.kpi-area-top { stop-color: var(--brand-orange); stop-opacity: 0.25; }
.kpi-area-bottom { stop-color: var(--brand-orange); stop-opacity: 0; }

.legend-dot { background: var(--brand-orange); }

@media (max-width: 1100px) {
  body::after { width: 3px; }
}

/* Mobile menu panel: near-black sheet to match the brand header (also
   used by 9Yards Glass). */
@media (max-width: 1100px) {
  .nav-panel {
    background: #121216;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  }
  .nav-panel .main-nav a.active { background: rgba(240, 144, 24, 0.18); color: #f7b04a; }
}
