/* ═══════════════════════════════════════════════════════════
   ONE DRINKWELL — Apple Design System Override
   Loaded after per-page <style> blocks so same-specificity
   rules here win the cascade without !important where possible.
═══════════════════════════════════════════════════════════ */

/* ── 1. Design tokens ──────────────────────────────────── */
:root {
  --navy:         #0071E3;
  --blue:         #0071E3;
  --blue-dark:    #0057B3;
  --blue-light:   #47A9FF;
  --pale:         #EBF4FF;
  --pale2:        #F5F5F7;
  --ink:          #1D1D1F;
  --charcoal:     #3A3A3C;
  --gray:         #6E6E73;
  --line:         rgba(0,0,0,.08);
  --white:        #FFFFFF;
  --green:        #28CD41;
  --green-pale:   #EBFAEE;
  --red:          #FF3B30;
  --red-pale:     #FFEBE9;
  --amber:        #FF9F0A;
  --amber-pale:   #FFF4E0;
  --purple:       #BF5AF2;
  --purple-pale:  #F5E8FF;
  --saffron:      #FF9F0A;
  --saffron-pale: #FFF4E0;
  --india-green:  #28CD41;
  --india-green-pale: #EBFAEE;
}

/* ── 2. Font ───────────────────────────────────────────── */
html, body, input, button, select, textarea {
  font-family: -apple-system, "SF Pro Text", "Helvetica Neue", Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── 3. Page background ────────────────────────────────── */
body {
  background: #F2F2F7 !important;
}

/* ── 4. Sidebar — full frosted-glass light redesign ────── */
.sidebar {
  background: rgba(246,246,250,.92) !important;
  backdrop-filter: saturate(180%) blur(24px) !important;
  -webkit-backdrop-filter: saturate(180%) blur(24px) !important;
  border-right: 1px solid rgba(0,0,0,.09) !important;
  box-shadow: none !important;
}

.sidebar-brand {
  padding: 20px 16px 14px !important;
  border-bottom: 1px solid rgba(0,0,0,.06) !important;
}

/* Show full-color logo on the light sidebar */
.sidebar-brand img { filter: none !important; }

.brand-text { color: #1D1D1F !important; }
.brand-text b { color: #0071E3 !important; }
.one-label {
  color: #6E6E73 !important;
  font-size: 8.5px !important;
  letter-spacing: 1.8px !important;
}

.nav { padding: 12px 0 !important; }
.nav-section { margin-bottom: 2px !important; }
.nav-section-label {
  color: #6E6E73 !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: .3px !important;
  text-transform: uppercase !important;
  padding: 10px 16px 4px !important;
}

.nav-item {
  color: #1D1D1F !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  padding: 7px 12px !important;
  margin: 1px 8px !important;
  border-radius: 8px !important;
  border-right: none !important;
  line-height: 1.3 !important;
}
.nav-item:hover {
  color: #1D1D1F !important;
  background: rgba(0,0,0,.05) !important;
}
.nav-item.active {
  color: #fff !important;
  background: #0071E3 !important;
  border-right: none !important;
  font-weight: 500 !important;
}
.nav-icon { font-size: 14px !important; }

.sidebar-footer {
  border-top: 1px solid rgba(0,0,0,.06) !important;
  padding: 14px 16px !important;
}
.user-info { margin-bottom: 10px !important; }
.avatar { background: #0071E3 !important; }
.user-name { color: #1D1D1F !important; font-weight: 600 !important; }
.user-email { color: #6E6E73 !important; }

.btn-signout {
  border: 1px solid rgba(0,0,0,.12) !important;
  color: #3A3A3C !important;
  background: transparent !important;
  border-radius: 8px !important;
  font-size: 11.5px !important;
}
.btn-signout:hover {
  background: rgba(0,0,0,.05) !important;
  color: #1D1D1F !important;
}

/* ── 5. Main area ──────────────────────────────────────── */
.main {
  padding: 36px 44px !important;
}

.topbar { margin-bottom: 18px !important; }

.page-title {
  font-family: -apple-system, "SF Pro Display", "Helvetica Neue", Arial, sans-serif !important;
  font-size: 26px !important;
  font-weight: 700 !important;
  color: #1D1D1F !important;
  letter-spacing: -.5px !important;
}
.page-sub {
  font-size: 12px !important;
  color: #6E6E73 !important;
  margin-top: 2px !important;
}

.access-badge {
  background: rgba(0,113,227,.1) !important;
  color: #0057B3 !important;
  font-weight: 600 !important;
  border-radius: 20px !important;
}
.date-chip { color: #6E6E73 !important; }

/* ── 6. Cards ──────────────────────────────────────────── */
.card {
  background: #fff !important;
  border-radius: 14px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.06), 0 0 1px rgba(0,0,0,.04) !important;
  border: none !important;
}
.card-head {
  border-bottom: 1px solid rgba(0,0,0,.06) !important;
  padding: 13px 20px !important;
}
.card-head h3 {
  color: #1D1D1F !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: -.1px !important;
  font-family: -apple-system, "SF Pro Text", "Helvetica Neue", Arial, sans-serif !important;
}
.card-icon { font-size: 15px !important; }
.card-body { padding: 16px 20px !important; }

/* ── 7. Tab bar — iOS/macOS segmented control ──────────── */
.tab-bar {
  background: rgba(116,116,128,.12) !important;
  border-radius: 10px !important;
  padding: 2px !important;
  box-shadow: none !important;
  gap: 0 !important;
}
.tab-btn {
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: #1D1D1F !important;
  border-radius: 8px !important;
  padding: 6px 16px !important;
}
.tab-btn.active {
  background: #fff !important;
  color: #1D1D1F !important;
  box-shadow: 0 2px 4px rgba(0,0,0,.12), 0 0 1px rgba(0,0,0,.06) !important;
}
.tab-btn:hover { color: #1D1D1F !important; }

/* ── 8. Section intro banners ──────────────────────────── */
.section-intro {
  background: linear-gradient(135deg, #1C1C1E 0%, #2C2C2E 100%) !important;
  border-radius: 14px !important;
}
.section-intro h2 { color: #fff !important; }
.section-intro p { color: rgba(255,255,255,.65) !important; }
.section-intro .last-updated { color: rgba(255,255,255,.3) !important; }

/* ── 9. Status & tag colors — Apple system palette ─────── */
.intensity-badge.high, .rtag-critical {
  background: rgba(255,59,48,.1) !important;
  color: #C4281C !important;
}
.intensity-badge.med-high, .rtag-high {
  background: rgba(255,159,10,.1) !important;
  color: #B06000 !important;
}
.intensity-badge.medium, .rtag-medium {
  background: rgba(0,113,227,.1) !important;
  color: #0057B3 !important;
}
.intensity-badge.low, .rtag-low {
  background: rgba(40,205,65,.1) !important;
  color: #1A872A !important;
}

.rtag { border-radius: 5px !important; font-size: 9.5px !important; }

/* ── 10. Flags & signals ───────────────────────────────── */
.flag-red    { background: rgba(255,59,48,.08)  !important; color: #C4281C !important; }
.flag-amber  { background: rgba(255,159,10,.08) !important; color: #B06000 !important; }
.flag-green  { background: rgba(40,205,65,.08)  !important; color: #1A872A !important; }
.flag-blue   { background: rgba(0,113,227,.08)  !important; color: #0057B3 !important; }

.signal-type.risk  { background: rgba(255,59,48,.1)  !important; color: #C4281C !important; }
.signal-type.oppty { background: rgba(40,205,65,.1)  !important; color: #1A872A !important; }
.signal-type.watch { background: rgba(255,159,10,.1) !important; color: #B06000 !important; }
.signal-type.intel { background: rgba(191,90,242,.1) !important; color: #7D1FA8 !important; }

/* ── 11. Tables ────────────────────────────────────────── */
.bberg-table th, .proj-table th, .comp-table th {
  background: #F5F5F7 !important;
  color: #6E6E73 !important;
  font-size: 9.5px !important;
  font-weight: 600 !important;
  letter-spacing: .3px !important;
  text-transform: uppercase !important;
  border-bottom: 1px solid rgba(0,0,0,.08) !important;
}
.bberg-table td, .proj-table td, .comp-table td {
  border-bottom: 1px solid rgba(0,0,0,.05) !important;
  color: #3A3A3C !important;
}
.bberg-table td:first-child { color: #1D1D1F !important; }
.bberg-table tr:hover td { background: #F5F5F7 !important; }
.comp-table tr.us-row { background: rgba(0,113,227,.04) !important; }
.comp-table tr.us-row td:first-child { color: #0057B3 !important; }

/* ── 12. SWOT ──────────────────────────────────────────── */
.swot-quad.strengths    { background: linear-gradient(135deg,#EBFAEE,#D1F5DA) !important; }
.swot-quad.weaknesses   { background: linear-gradient(135deg,#FFF4E0,#FFE8C4) !important; }
.swot-quad.opportunities{ background: linear-gradient(135deg,#EBF4FF,#D6E9FF) !important; }
.swot-quad.threats      { background: linear-gradient(135deg,#FFEBE9,#FFD9D6) !important; }

.swot-quad.strengths .swot-label    { color: #1A872A !important; }
.swot-quad.weaknesses .swot-label   { color: #B06000 !important; }
.swot-quad.opportunities .swot-label{ color: #0057B3 !important; }
.swot-quad.threats .swot-label      { color: #C4281C !important; }

.swot-quad.strengths .swot-title    { color: #1A872A !important; }
.swot-quad.weaknesses .swot-title   { color: #B06000 !important; }
.swot-quad.opportunities .swot-title{ color: #0057B3 !important; }
.swot-quad.threats .swot-title      { color: #C4281C !important; }

.swot-quad.strengths .swot-item-text    { color: #0D3B14 !important; }
.swot-quad.weaknesses .swot-item-text   { color: #6B3500 !important; }
.swot-quad.opportunities .swot-item-text{ color: #002D72 !important; }
.swot-quad.threats .swot-item-text      { color: #6E1710 !important; }

.swot-quad.strengths .swot-bullet    { background: #28CD41 !important; }
.swot-quad.weaknesses .swot-bullet   { background: #FF9F0A !important; }
.swot-quad.opportunities .swot-bullet{ background: #0071E3 !important; }
.swot-quad.threats .swot-bullet      { background: #FF3B30 !important; }

.swot-center-label {
  background: #1D1D1F !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.2) !important;
  font-family: -apple-system, "SF Pro Display", "Helvetica Neue", Arial, sans-serif !important;
  border-radius: 20px !important;
}

/* ── 13. Dep cards ─────────────────────────────────────── */
.dep-card.dep-critical { border-left-color: #FF3B30 !important; }
.dep-card.dep-high     { border-left-color: #FF9F0A !important; }
.dep-card.dep-medium   { border-left-color: #0071E3 !important; }
.dep-card.dep-low      { border-left-color: #28CD41 !important; }
.dep-attr.single-source{ background: rgba(255,59,48,.1) !important; color: #C4281C !important; }
.dep-attr.dual-source  { background: rgba(255,159,10,.1) !important; color: #B06000 !important; }

/* ── 14. Force cards ───────────────────────────────────── */
.force-card.intensity-high::before     { background: linear-gradient(90deg,#FF3B30,#FF6961) !important; }
.force-card.intensity-med-high::before { background: linear-gradient(90deg,#FF9F0A,#FFBF47) !important; }
.force-card.intensity-medium::before   { background: linear-gradient(90deg,#0071E3,#47A9FF) !important; }
.force-card.intensity-low::before      { background: linear-gradient(90deg,#28CD41,#5DE676) !important; }

.intensity-badge { font-size: 10px !important; font-weight: 600 !important; border-radius: 5px !important; }
.intensity-dots .dot.filled.red   { background: #FF3B30 !important; }
.intensity-dots .dot.filled.amber { background: #FF9F0A !important; }
.intensity-dots .dot.filled.blue  { background: #0071E3 !important; }
.intensity-dots .dot.filled.green { background: #28CD41 !important; }

/* ── 15. Hero banner (India 2030) ──────────────────────── */
.hero-banner {
  background: linear-gradient(135deg,#1C1C1E 0%,#2C2C2E 60%,#1A1A2E 100%) !important;
}
.hero-kpi { background: rgba(255,255,255,.08) !important; border-color: rgba(255,255,255,.1) !important; }
.hero-kpi-val.saffron { color: #FF9F0A !important; }
.hero-kpi-val.india-green { color: #5DE676 !important; }

/* ── 16. Insight chips (India 2030) ───────────────────── */
.insight-chip {
  box-shadow: 0 2px 8px rgba(0,0,0,.06), 0 0 1px rgba(0,0,0,.04) !important;
  border-radius: 14px !important;
}
.insight-chip.saffron     { border-left-color: #FF9F0A !important; }
.insight-chip.india-green { border-left-color: #28CD41 !important; }
.insight-chip.purple      { border-left-color: #BF5AF2 !important; }

/* ── 17. Pillar headers (India 2030) ───────────────────── */
.pillar-header.blue   { background: linear-gradient(135deg,#0C2340 0%,#0071E3 100%) !important; }
.pillar-header.green  { background: linear-gradient(135deg,#0A2B18 0%,#28CD41 100%) !important; }
.pillar-header.saffron{ background: linear-gradient(135deg,#4A1A00 0%,#FF9F0A 100%) !important; }
.pillar-header.purple { background: linear-gradient(135deg,#2D0B4E 0%,#BF5AF2 100%) !important; }

/* ── 18. Market cards (India 2030) ─────────────────────── */
.market-card {
  box-shadow: 0 2px 8px rgba(0,0,0,.06), 0 0 1px rgba(0,0,0,.04) !important;
  border-radius: 14px !important;
}

/* ── 19. Assumption box ─────────────────────────────────── */
.assumption-box {
  background: #F5F5F7 !important;
  border: 1px solid rgba(0,0,0,.06) !important;
  color: #6E6E73 !important;
  border-radius: 10px !important;
}
.assumption-box strong { color: #1D1D1F !important; }

/* ── 20. Toast ──────────────────────────────────────────── */
.toast {
  background: rgba(28,28,30,.9) !important;
  backdrop-filter: blur(20px) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.2) !important;
}

/* ── 21. Risk/concentration chips ──────────────────────── */
.risk-chip {
  box-shadow: 0 2px 8px rgba(0,0,0,.06) !important;
  border-radius: 12px !important;
}
.risk-chip.chip-red   .risk-chip-val { color: #FF3B30 !important; }
.risk-chip.chip-amber .risk-chip-val { color: #FF9F0A !important; }
.risk-chip.chip-green .risk-chip-val { color: #28CD41 !important; }
.risk-chip.chip-blue  .risk-chip-val { color: #0071E3 !important; }

/* ── 22. Counterparty detail cards ─────────────────────── */
.counterparty-detail { box-shadow: 0 2px 8px rgba(0,0,0,.06) !important; border-radius: 14px !important; }
.cpd-header { background: #F5F5F7 !important; border-bottom: 1px solid rgba(0,0,0,.06) !important; }
.cpd-name { color: #1D1D1F !important; }
.cpd-fullname { color: #6E6E73 !important; }
.cpd-stat { background: #F5F5F7 !important; border-radius: 8px !important; }
.cpd-stat-val { color: #1D1D1F !important; }
.cpd-stat-label { color: #6E6E73 !important; }
.cpd-notes { color: #3A3A3C !important; }
.signal-label { color: #6E6E73 !important; }
.signal-text  { color: #3A3A3C !important; }

/* ── 23. SWOT action cards ──────────────────────────────── */
.swot-action-card { box-shadow: 0 2px 8px rgba(0,0,0,.06) !important; border-radius: 12px !important; }
.swot-action-title { color: #1D1D1F !important; }
.action-tag.so { background: rgba(40,205,65,.1) !important; color: #1A872A !important; }
.action-tag.wo { background: rgba(0,113,227,.1) !important; color: #0057B3 !important; }
.action-tag.st { background: rgba(255,159,10,.1) !important; color: #B06000 !important; }
.action-tag.wt { background: rgba(255,59,48,.1)  !important; color: #C4281C !important; }
.action-item   { color: #3A3A3C !important; border-bottom-color: rgba(0,0,0,.05) !important; }

/* ── 24. Forces summary ─────────────────────────────────── */
.fsumm-item { box-shadow: 0 2px 8px rgba(0,0,0,.06) !important; border-radius: 12px !important; border: 1px solid transparent !important; }
.fsumm-item:hover { border-color: rgba(0,113,227,.2) !important; }
.fsumm-name { color: #1D1D1F !important; }

/* ── 25. Force implication boxes ───────────────────────── */
.force-implication { background: #F5F5F7 !important; border: 1px solid rgba(0,0,0,.06) !important; border-radius: 8px !important; }
.force-implication-label { color: #0071E3 !important; }
.force-implication p { color: #1D1D1F !important; }

/* ── 26. Payment track dots ─────────────────────────────── */
.pay-dot.on-time { background: #28CD41 !important; }
.pay-dot.delayed { background: #FF9F0A !important; }
.pay-dot.unpaid  { background: #FF3B30 !important; }
.pay-dot.na      { background: #D1D1D6 !important; }

/* ── 27. Exposure bars ──────────────────────────────────── */
.exp-bar-fill.red   { background: #FF3B30 !important; }
.exp-bar-fill.amber { background: #FF9F0A !important; }
.exp-bar-fill.green { background: #28CD41 !important; }
.exp-bar-fill.blue  { background: #0071E3 !important; }
.exp-pct.red   { color: #FF3B30 !important; }
.exp-pct.amber { color: #FF9F0A !important; }
.exp-pct.green { color: #28CD41 !important; }

/* ── 28. Timeline (India 2030) ──────────────────────────── */
.tl-phase-dot { border-color: #fff !important; box-shadow: 0 0 0 3px #0071E3 !important; background: #0071E3 !important; }
.tl-item { box-shadow: 0 2px 8px rgba(0,0,0,.06) !important; border-radius: 10px !important; }
.tl-item-q { color: #0071E3 !important; }
.tl-item-title { color: #1D1D1F !important; }
.tl-item-text  { color: #3A3A3C !important; }

.tag-resin   { background: rgba(255,159,10,.1) !important; color: #B06000 !important; }
.tag-kiosk   { background: rgba(0,113,227,.1)  !important; color: #0057B3 !important; }
.tag-piped   { background: rgba(40,205,65,.1)  !important; color: #1A872A !important; }
.tag-capital { background: rgba(191,90,242,.1)  !important; color: #7D1FA8 !important; }
.tag-hire    { background: rgba(255,159,10,.1)  !important; color: #B06000 !important; }

/* ── 29. Capital cards (India 2030) ─────────────────────── */
.capital-card { box-shadow: 0 2px 8px rgba(0,0,0,.06) !important; border-radius: 12px !important; }
.capital-card-val { color: #1D1D1F !important; }
.capital-card-label { color: #6E6E73 !important; }
.capital-card-use { color: #3A3A3C !important; }

/* ── 30. Source quote ───────────────────────────────────── */
.source-quote { background: rgba(255,159,10,.06) !important; border-left-color: #FF9F0A !important; border-radius: 0 10px 10px 0 !important; }
.source-quote-text { color: #6B3500 !important; }
.source-quote-attr { color: #B06000 !important; }

/* ── 31. Win/lose/neutral in comp table ─────────────────── */
.win     { color: #1A872A !important; }
.lose    { color: #C4281C !important; }
.neutral { color: #B06000 !important; }

/* ── 32. Concentration bars ─────────────────────────────── */
.conc-label { color: #1D1D1F !important; }
.conc-bar-bg { background: #E5E5EA !important; }

/* ── 33. Misc utility overrides ─────────────────────────── */
.driver-text, .cpd-notes, .dep-cat { color: #3A3A3C !important; }
.driver-icon { font-size: 12px !important; }
.force-label { color: #6E6E73 !important; }
.force-name  { color: #1D1D1F !important; font-family: -apple-system, "SF Pro Display", "Helvetica Neue", Arial, sans-serif !important; }
.force-drivers-label { color: #6E6E73 !important; }
.dep-name    { color: #1D1D1F !important; }
.conc-bar-fill { border-radius: 6px !important; }
.country-chip { background: #F5F5F7 !important; color: #6E6E73 !important; border-radius: 5px !important; }

/* ── 34. Grid & section headings ────────────────────────── */
h3[style*="Montserrat"] { color: #1D1D1F !important; font-family: -apple-system, "SF Pro Display", "Helvetica Neue", Arial, sans-serif !important; }

/* ── 35. Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,.15); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,.28); background-clip: content-box; border: 2px solid transparent; }

/* ── 36. Text selection ─────────────────────────────────── */
::selection { background: rgba(0,113,227,.15); color: #1D1D1F; }
