/* ============================================================
   ARI Presentation — v2 "WOW" edition
   Same palette as the original deck, elevated design system.
   ============================================================ */
:root {
  /* Core palette (kept from original deck) */
  --bg-slide: #cfe7fb;
  --bg-slide-2: #eaf5ff;
  --card: #ffffff;

  --navy: #15357e;
  --navy-deep: #0f2a6b;
  --ink: #1f3a6b;
  --ink-soft: #5a73a0;

  --green-head: #d9ead3;  --green-text: #2e7d32;
  --yellow-head: #fff2cc; --yellow-text: #9a7b00;
  --red-head: #f4cccc;    --red-text: #b23b3b;
  --gray-head: #ededed;   --gray-text: #5a5a5a;

  --region-blue: #1f5fbf;
  --region-red: #c0392b;
  --status-approved: #2e8b3d;
  --status-pending: #1a4fa0;

  --salesforce: #00a1e0;
  --amber: #e0a312;

  /* Effects */
  --shadow-sm: 0 2px 8px rgba(15, 42, 107, 0.08);
  --shadow-md: 0 12px 30px rgba(15, 42, 107, 0.14);
  --shadow-lg: 0 24px 60px rgba(15, 42, 107, 0.20);
  --radius: 24px;

  --slide-w: 1280px;
  --slide-h: 720px;

  --font-head: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background:
    radial-gradient(1200px 700px at 85% -10%, #14306e 0%, #0b1c3a 55%, #081428 100%);
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* Top progress bar */
.progress {
  position: fixed; top: 0; left: 0; height: 4px; width: 0%;
  background: linear-gradient(90deg, var(--salesforce), #6fd0ff);
  z-index: 50; transition: width .45s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 0 12px rgba(0,161,224,.6);
}

/* Stage / scaling */
.stage { position: fixed; inset: 0; display: grid; place-items: center; overflow: hidden; }
.deck { width: var(--slide-w); height: var(--slide-h); position: relative; transform-origin: center; }

.slide {
  position: absolute; inset: 0;
  width: var(--slide-w); height: var(--slide-h);
  padding: 52px 60px 34px;
  background:
    radial-gradient(900px 600px at 12% -20%, var(--bg-slide-2) 0%, rgba(234,245,255,0) 60%),
    linear-gradient(160deg, #d8eeff 0%, var(--bg-slide) 55%, #c3e0fa 100%);
  border-radius: 8px;
  display: none;
  overflow: hidden;
}
.slide.active { display: flex; flex-direction: column; }

/* Decorative soft blobs (within palette) */
.slide::after {
  content: ""; position: absolute; right: -120px; bottom: -140px;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(0,161,224,.18), rgba(0,161,224,0) 70%);
  pointer-events: none;
}

/* ---------- Slide chrome ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-weight: 700; font-size: 13px;
  letter-spacing: 2px; text-transform: uppercase; color: var(--salesforce);
  margin: 0 0 8px;
}
.kicker .num {
  font-family: var(--font-head); font-weight: 800; color: var(--navy);
  background: rgba(255,255,255,.7); border: 1px solid #c4dcf3;
  border-radius: 8px; padding: 1px 8px; letter-spacing: 0; font-size: 13px;
}
.slide-title {
  font-family: var(--font-head); color: var(--navy);
  font-weight: 800; font-size: 44px; line-height: 1.03;
  letter-spacing: -0.6px; margin: 0;
}
.slide-title .sub { display:block; font-size: 20px; color: var(--ink-soft); margin-top: 6px; font-weight:600;}
.title-bar { display: none; }

.logo {
  position: absolute; top: 40px; right: 56px;
  display: inline-flex; align-items: center;
}
.logo svg { display: block; filter: drop-shadow(0 2px 4px rgba(0,161,224,.30)); }

.footer {
  margin-top: auto;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--ink-soft); font-weight: 600;
  border-top: 1px solid rgba(31,58,107,.12); padding-top: 10px;
}
.footer-source { text-align: center; }
.footer-link { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; }
.footer-link:hover { color: var(--navy); }

.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255,255,255,.7);
}

/* ---------- Reveal animations ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.slide .reveal { opacity: 0; }
.slide.run .reveal { animation: rise .55s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 80ms); }

/* ============================================================
   SLIDE 1 — Root cause analysis
   ============================================================ */
/* Slide 3 layout */
.s3-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 20px; flex: 1; min-height: 0; margin-top: 14px; }
.s3-left  { display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.s3-right { display: flex; flex-direction: column; gap: 16px; min-height: 0; overflow: hidden; }
.s3-right .pie-card { flex: 1; min-height: 0; overflow: hidden; }
.s3-left .chart-card { flex: 0 0 auto; }
.s3-left .detail-card { flex: 1; min-height: 0; }

/* Pie chart cards */
.pie-card { padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
.pie-ttl  { font-family: var(--font-head); font-weight: 700; color: var(--navy-deep); font-size: 13px; margin: 0; letter-spacing: .02em; text-transform: uppercase; }
.pie-body { display: flex; flex-direction: row; align-items: center; gap: 16px; flex: 1; }
.pie-svg  { flex: 0 0 auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.10)); }
.pie-legend { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.pie-leg-row { display: flex; align-items: center; gap: 6px; font-size: 9.5px; }
.pie-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.pie-leg-name { flex: 1; color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pie-leg-val  { color: var(--navy-deep); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pie-total { font-size: 10px; color: var(--ink-soft); font-weight: 600; text-align: right; border-top: 1px solid #e8eef7; padding-top: 8px; }
.pie-center-val { font-size: 18px; font-weight: 800; fill: var(--navy-deep); font-family: var(--font-head); }
.pie-center-pct { font-size: 11px; font-weight: 600; fill: var(--ink-soft); font-family: var(--font-body, sans-serif); }

/* Legacy Slide 3 grid (kept for fallback) */
.s1-grid { display: grid; grid-template-columns: 1.02fr 1.1fr; gap: 30px; flex: 1; min-height: 0; margin-top: 14px; }

.chart-card { padding: 26px 30px; display: flex; flex-direction: column; }
.chart-card .ttl { font-family: var(--font-head); font-weight: 700; color: var(--navy-deep); font-size: 16px; margin: 0 0 18px; }
.bar-row { margin-bottom: 16px; }
.bar-row .lab { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.bar-row .name { font-weight: 600; color: var(--ink); font-size: 14.5px; }
.bar-row .val { font-family: var(--font-head); font-weight: 700; color: var(--navy-deep); font-size: 14px; }
.bar-row .val small { color: var(--ink-soft); font-weight: 600; margin-left: 8px; }
.bar-track { height: 16px; background: #eef3fa; border-radius: 999px; overflow: hidden; }
.bar-fill {
  height: 100%; border-radius: 999px; transform-origin: left center;
  animation: grow .9s cubic-bezier(.2,.7,.2,1) both; animation-delay: .25s;
}
.bar-total {
  margin-top: auto; display: flex; justify-content: space-between; align-items: baseline;
  border-top: 2px solid #e4ebf5; padding-top: 14px;
}
.bar-total .name { font-family: var(--font-head); font-weight: 800; color: var(--navy); font-size: 16px; }
.bar-total .val { font-family: var(--font-head); font-weight: 800; color: var(--navy); font-size: 18px; }

.c-pii   { background: linear-gradient(90deg, #15357e, #2a5bd0); }
.c-low   { background: linear-gradient(90deg, #1f5fbf, #4aa3e8); }
.c-out   { background: linear-gradient(90deg, #2e7d32, #5fb364); }
.c-prod  { background: linear-gradient(90deg, #d8920f, #f0c04a); }
.c-comp  { background: linear-gradient(90deg, #b23b3b, #e07a7a); }

.detail-card { padding: 16px 8px 16px 18px; overflow: hidden; display: flex; flex-direction: column; }
.detail-card .ttl { font-family: var(--font-head); font-weight: 700; color: var(--navy-deep); font-size: 15px; margin: 2px 0 12px 6px; }
.detail-scroll { overflow: auto; padding-right: 10px; }
.detail-table { width: 100%; border-collapse: collapse; font-size: 11.5px; color: #33415a; }
.detail-table th {
  position: sticky; top: 0; background: #f3f8fe; text-align: left; font-weight: 700;
  color: var(--navy-deep); padding: 7px 12px; border-bottom: 1px solid #d7e2f0; z-index: 1;
}
.detail-table td { padding: 4px 12px; border-bottom: 1px solid #eef3f9; vertical-align: top; }
.detail-table td.cause { font-weight: 700; color: var(--navy); white-space: nowrap; width: 210px; }
.detail-table tr.group-start td { border-top: 2px solid #dbe5f2; }
.cause-dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:7px; vertical-align: middle;}

/* ============================================================
   SLIDE 1 — LATAM ARI Numbers (redesigned)
   ============================================================ */
.s1-main-title {
  font-family: var(--font-head); font-weight: 800; font-size: 44px;
  color: var(--navy); margin: 0 0 8px; line-height: 1;
}
.s1-body {
  flex: 1; min-height: 0;
  display: flex; flex-direction: row; gap: 16px; overflow: hidden;
}

/* ── Left sidebar: unified KPI panel ── */
.s1-sidebar {
  width: 192px; flex-shrink: 0;
  background: #fff; border-radius: 16px;
  box-shadow: var(--shadow-md); border: 1px solid rgba(31,95,191,.10);
  padding: 16px 14px;
  display: flex; flex-direction: column; gap: 0;
}
.s1-sidebar-section {
  flex: 1; display: flex; flex-direction: column; gap: 2px;
  justify-content: center; padding: 10px 0;
  transition: background .2s ease;
}
.s1-sidebar-section:not(:last-child) {
  border-bottom: 1px solid #e8eef8;
}
.s1-sidebar-section:hover { background: #f6faff; border-radius: 10px; }
.s1-kpi { display: flex; flex-direction: column; gap: 1px; padding: 4px 6px; }
.s1-kpi + .s1-kpi { margin-top: 6px; }
.s1-kpi-lbl {
  font-size: 10px; font-weight: 600; color: var(--ink-soft);
  line-height: 1.3; text-transform: uppercase; letter-spacing: .4px;
  text-align: center;
}
.s1-kpi-val {
  font-family: var(--font-head); font-weight: 800; font-size: 21px;
  color: var(--navy); line-height: 1; font-variant-numeric: tabular-nums;
  text-align: center;
}

/* ── Right content: pipeline + tables ── */
.s1-content {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 10px;
}

/* Pipeline chevrons */
.s1-pipeline { flex-shrink: 0; }
.s1-pipeline-label {
  font-family: var(--font-head); font-weight: 800; font-size: 15px;
  color: var(--navy); margin-bottom: 5px;
}
.s1-chevrons {
  display: flex; align-items: stretch; height: 58px;
  background: #fff; border-radius: 12px;
  box-shadow: var(--shadow-sm); border: 1.5px solid rgba(21,53,126,.20);
  overflow: hidden;
}
.s1-chev {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: #fff; position: relative;
  transition: background .2s ease;
}
.s1-chev:hover { background: #eef5ff; }
/* active stage (non-zero): keep white */
.s1-chev.s1-chev-active { background: #fff; }
.s1-chev.s1-chev-active .s1-chev-val { color: var(--navy-deep); }
/* zero-value stage: muted */
.s1-chev.s1-chev-zero .s1-chev-lbl { color: #aabbd4; }
.s1-chev.s1-chev-zero .s1-chev-val { color: #c0cfe6; }

/* Arrow dividers using clip-path for rounded feel */
.s1-chev:not(.s1-chev-last) {
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
}
.s1-chev-last {
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 0 100%);
  border-radius: 0 10px 10px 0;
}
.s1-chev + .s1-chev { border-left: 1.5px solid rgba(21,53,126,.12); }
.s1-chev-lbl {
  font-size: 9px; font-weight: 600; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .5px; line-height: 1;
}
.s1-chev-val {
  font-family: var(--font-head); font-weight: 800; font-size: 24px;
  color: var(--navy); line-height: 1.1;
}

/* Chevron hover popup */
.s1-chev-popup {
  display: none;
  position: fixed;
  background: var(--navy);
  border: 1.5px solid rgba(21,53,126,.4);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(21,53,126,.18);
  padding: 8px 10px;
  min-width: 150px;
  max-width: 220px;
  overflow-y: auto;
  z-index: 200;
  text-align: left;
}
.s1-chev-popup.visible { display: block; }
.s1-chev-popup-item {
  font-size: 19px;
  font-weight: 500;
  color: #ffffff;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255,255,255,.2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.s1-chev-popup-item:last-child { border-bottom: none; }
.s1-chev-popup-empty {
  font-size: 18px;
  color: rgba(255,255,255,.7);
  font-style: italic;
}
/* Data table rows */
.s1-rows { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.s1-row { flex: 1; min-height: 0; }

/* Table card */
.s1-table-wrap {
  height: 100%;
  background: #fff; border-radius: 14px;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(31,95,191,.10);
  padding: 8px 14px;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease;
}
.s1-table-wrap:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.s1-table-title {
  font-family: var(--font-head); font-weight: 700; font-size: 13.5px;
  color: var(--navy); margin-bottom: 5px; text-align: left;
}
.s1-table { width: 100%; border-collapse: collapse; font-size: 13px; color: var(--ink); }
.s1-table thead tr { border-bottom: none; }
.s1-table th, .s1-table td {
  padding: 4px 10px; text-align: right;
  font-variant-numeric: tabular-nums;
}
.s1-th { font-weight: 700; border-radius: 6px; font-size: 12px; padding: 4px 10px; }
.s1-th-blank { background: transparent; text-align: left; width: 160px; }
.s1-th-green  { background: var(--green-head);  color: var(--green-text); }
.s1-th-yellow { background: var(--yellow-head); color: var(--yellow-text); }
.s1-th-red    { background: var(--red-head);    color: var(--red-text); }
.s1-th-gray   { background: var(--gray-head);   color: var(--gray-text); }
.s1-table tbody tr { transition: background .15s ease; }
.s1-table tbody tr:hover { background: #f4f8ff; }
.s1-table tbody td { font-weight: 500; color: var(--ink-soft); border-bottom: 1px solid #f0f4fb; }
.s1-table tbody tr:last-child td { border-bottom: none; }
.s1-row-lbl {
  text-align: left !important; font-weight: 600;
  color: var(--ink-soft); font-size: 12px; white-space: nowrap;
}
.s1-td-bold { font-weight: 800 !important; color: var(--navy) !important; }
/* financial values: right-aligned, prominent */
.s1-table tbody td:not(.s1-row-lbl) { font-weight: 700; color: var(--ink); }
.s1-table-3col .s1-th { padding: 5px 14px; }
.s1-table-3col td { padding: 5px 14px; font-size: 14px; font-weight: 700; }

/* ============================================================
   SLIDE 3 — ARI Cases Summary
   ============================================================ */
/* Filter bar */
.filters {
  display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  margin: 14px 0 10px;
  position: relative; z-index: 40;
}
/* Multi-select filter dropdown */
.ms { position: relative; }
.ms-toggle {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-body); color: var(--navy-deep);
  background: #ffffff; border: 1px solid #c4dcf3; border-radius: 10px;
  padding: 7px 12px; min-width: 190px; cursor: pointer; box-shadow: var(--shadow-sm);
}
.ms-toggle:focus-visible { outline: 2px solid var(--salesforce); outline-offset: 1px; }
.ms.active .ms-toggle { border-color: var(--salesforce); box-shadow: 0 0 0 2px rgba(0,161,224,.18); }
.ms-name {
  font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  color: var(--ink-soft);
}
.ms-summary { font-size: 13px; font-weight: 700; color: var(--navy-deep); margin-right: auto; }
.ms-caret { font-size: 10px; color: var(--region-blue); }
.ms-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30;
  min-width: 100%; max-height: 230px; overflow: auto;
  background: #fff; border: 1px solid #c4dcf3; border-radius: 12px;
  box-shadow: 0 14px 34px rgba(31,58,107,.20); padding: 6px;
}
.ms-option {
  display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--navy-deep); cursor: pointer; white-space: nowrap;
}
.ms-option:hover { background: #eef5fd; }
.ms-option input { width: 15px; height: 15px; accent-color: var(--salesforce); cursor: pointer; }
.filter-clear {
  font-family: var(--font-body); font-size: 13px; font-weight: 700; color: var(--region-red);
  background: #fff; border: 1px solid #f0c9c4; border-radius: 10px; padding: 8px 14px;
  cursor: pointer; box-shadow: var(--shadow-sm);
}
.filter-clear:hover { background: #fdf0ee; }
.filter-count { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--ink-soft); align-self: center; }
.cases-table tr.hidden { display: none; }

/* Slide 2 summary tiles */
.s2-summary-tiles {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin: 10px 0 6px;
}
.s2-tile {
  background: linear-gradient(160deg, #ffffff, #f3f9ff);
  border-radius: 14px; padding: 10px 16px;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(31,95,191,.12);
  display: flex; flex-direction: column; gap: 3px;
}
.s2-tile-lbl {
  font-size: 10.5px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--ink-soft);
}
.s2-tile-val {
  font-family: var(--font-head); font-weight: 800; font-size: 20px;
  color: var(--navy); line-height: 1;
}
.s2-t1 { border-left: 4px solid #1f5fbf; }
.s2-t2 { border-left: 4px solid #2e7d32; }
.s2-t3 { border-left: 4px solid var(--amber); }

.s3-card { margin-top: 0; flex: 1; min-height: 0; padding: 8px; overflow: hidden; display:flex; flex-direction:column;}
.s3-scroll { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; border-radius: 14px; }
.cases-table { width: 100%; border-collapse: collapse; font-size: 9.5px; color: #233045; table-layout: fixed; }
.cases-table th {
  position: sticky; top: 0; z-index: 1;
  background: linear-gradient(180deg, #ffffff, #eef5fd);
  color: var(--navy-deep); font-family: var(--font-head); font-weight: 700;
  font-size: 10px; text-align: left; padding: 7px 4px; border-bottom: 2px solid #b9cdea;
  white-space: normal; line-height: 1.2;
}
.cases-table th.num, .cases-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.cases-table td { padding: 4px 4px; border-bottom: 1px solid #e8eef7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cases-table td:last-child { white-space: normal; overflow: visible; text-overflow: unset; }
/* Tighten spacing between col pairs 1&2, 3&4, 5&6, 6&7 */
.cases-table th:nth-child(1), .cases-table td:nth-child(1) { padding-right: 1px; }
.cases-table th:nth-child(2), .cases-table td:nth-child(2) { padding-left: 1px; }
.cases-table th:nth-child(3), .cases-table td:nth-child(3) { padding-right: 1px; }
.cases-table th:nth-child(4), .cases-table td:nth-child(4) { padding-left: 1px; }
.cases-table th:nth-child(5), .cases-table td:nth-child(5) { padding-right: 1px; }
.cases-table th:nth-child(6), .cases-table td:nth-child(6) { padding-left: 1px; padding-right: 1px; }
.cases-table th:nth-child(7), .cases-table td:nth-child(7) { padding-left: 1px; }
/* SVCs Oppt Stage (col 4) and Renew Status (col 5) — override baked colgroup inline styles */
.cases-table col:nth-child(4) { width: 107px !important; }
.cases-table col:nth-child(5) { width: 75px !important; }
.cases-table tbody tr:nth-child(even) { background: #f6faff; }
.cases-table tbody tr:hover { background: #e8f2ff; }
.acct { font-weight: 700; color: #073763; line-height: 1.3; }
.acct-sub { display: block; font-size: 8px; font-weight: 600; color: #073763; opacity: 0.6; margin-top: 1px; }
.col-hidden { display: none; }

.pill {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 9.5px; font-weight: 700; line-height: 1.6; white-space: nowrap;
}
/* Region pills */
.pill-blue     { background: #e3eefc; color: var(--region-blue); }
.pill-greenreg { background: #dcefe0; color: #2e8b3d; }
.pill-red      { background: #fbe4e1; color: var(--region-red); }

/* Shared amber/gold scale — SCI Stage Pending L1-L5 and SVCs Oppt Stage 01-05 */
.pill-y1 { background: #FFF9E6; color: #5c3d00; }
.pill-y2 { background: #F7E1A1; color: #4a2e00; }
.pill-y3 { background: #DBB657; color: #2d1a00; }
.pill-y4 { background: #B58E31; color: #ffffff; }
.pill-y5 { background: #82621B; color: #ffffff; }

/* SCI Stage */
.pill-green        { background: #265244; color: #ffffff; }   /* APPROVED / Renewed */
.pill-light-green  { background: #b7dfbe; color: #1a4a20; }  /* Partial Renew */
.pill-gold         { background: #B58E31; color: #ffffff; }   /* Renew Committed */
.pill-amber   { background: var(--yellow-head); color: var(--yellow-text); }
.pill-gray    { background: #ebebeb; color: #666666; }
.pill-pending { background: #FFF9E6; color: #5c3d00; }  /* fallback */

/* SVCs Oppt Stage */
.pill-svcs-6 { background: #265244; color: #ffffff; }   /* 06 - Project Booked */

/* SCI (col 3), SVCs (col 4), Renew Status (col 5) pills — match font size */
.cases-table td:nth-child(3) .pill,
.cases-table td:nth-child(4) .pill,
.cases-table td:nth-child(5) .pill { font-size: 6.65px; padding: 1px 5px; }

/* Columns 6-10: base font size */
.cases-table td:nth-child(6),
.cases-table td:nth-child(7),
.cases-table td:nth-child(9),
.cases-table td:nth-child(10) { font-size: 9.5px; }

/* SCI (col 3), SVCs (col 4), Renew Status (col 5) center aligned */
.cases-table th:nth-child(3),
.cases-table td:nth-child(3) { text-align: center; }
.cases-table th:nth-child(4),
.cases-table td:nth-child(4) { text-align: center; }
.cases-table th:nth-child(5),
.cases-table td:nth-child(5) { text-align: center; }

/* Renew Date (col 9) center aligned */
.cases-table th:nth-child(9),
.cases-table td:nth-child(9) { text-align: center; }

/* All non-pill table cells: uniform #073763, numbers not bold */
.cases-table td { color: #073763; }
.cases-table td.num { font-weight: 400; color: #073763; }

.roi-strong { color: var(--green-text); font-weight: 800; }
.mit-yes { color: var(--green-text); font-weight: 700; }
.mit-zero { color: #9aa7bd; font-weight: 400; }

/* ============================================================
   SLIDES 4 & 5 — Timeline images (UNCHANGED)
   ============================================================ */
.img-slide { padding: 0; }
.img-slide::after { display: none; }
.img-slide.active { display: grid; place-items: center; }
.img-slide img { width: 100%; height: 100%; object-fit: contain; display: block; }
.img-missing {
  width: 78%; text-align: center; color: var(--navy);
  border: 2px dashed #7ea8d6; border-radius: 16px; padding: 48px 40px;
  background: rgba(255,255,255,0.6); box-shadow: var(--shadow-md);
}
.img-missing h2 { margin: 0 0 10px; color: var(--navy); font-family: var(--font-head); }
.img-missing code { background:#fff; padding:2px 8px; border-radius:6px; border:1px solid #cfdcef; color: var(--region-red); }

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px;
  background: rgba(9, 22, 46, 0.7); padding: 9px 18px; border-radius: 999px;
  z-index: 40; backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.08);
}
.nav button { background: transparent; border: 0; color: #fff; font-size: 18px; cursor: pointer; padding: 2px 8px; border-radius: 8px; }
.nav button:hover { background: rgba(255,255,255,0.16); }
.dots { display: flex; gap: 9px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.4); cursor: pointer; border: 0; padding: 0; transition: all .2s; }
.dot.active { background: #6fd0ff; transform: scale(1.25); box-shadow: 0 0 8px rgba(111,208,255,.8); }
.counter { color: #cfe0f5; font-size: 13px; min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }

.nav-sep { width: 1px; height: 20px; background: rgba(255,255,255,.18); margin: 0 2px; }

.sync-btn {
  display: flex; align-items: center; gap: 6px;
  background: rgba(0,161,224,.18); border: 1px solid rgba(0,161,224,.35);
  color: #6fd0ff; border-radius: 999px; padding: 4px 14px 4px 10px;
  font-family: var(--font-body); font-size: 13px; font-weight: 700;
  cursor: pointer; transition: background .2s, box-shadow .2s;
}
.sync-btn:hover { background: rgba(0,161,224,.30); box-shadow: 0 0 12px rgba(0,161,224,.35); }
.sync-icon { font-size: 16px; line-height: 1; transition: transform .6s; display: inline-block; }
.sync-btn.syncing .sync-icon { animation: spin 1s linear infinite; }
.sync-btn:disabled { opacity: .65; cursor: not-allowed; }

@keyframes spin { to { transform: rotate(360deg); } }

.sync-toast {
  position: fixed; bottom: 76px; left: 50%; transform: translateX(-50%) translateY(8px);
  background: rgba(9,22,46,.88); color: #e8f4ff; border-radius: 12px;
  padding: 10px 20px; font-size: 13px; font-weight: 600;
  backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 8px 24px rgba(0,0,0,.3); pointer-events: none;
  opacity: 0; transition: opacity .25s, transform .25s; z-index: 60;
  max-width: 480px; text-align: center; white-space: nowrap;
}
.sync-toast.sync-toast-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.sync-toast.sync-toast-success { border-color: rgba(46,139,61,.5); }
.sync-toast.sync-toast-error   { border-color: rgba(178,59,59,.5); }
.sync-toast.sync-toast-info    { border-color: rgba(0,161,224,.35); }

/* ============================================================
   SLIDE 2 — Split layout (table left + detail panel right)
   ============================================================ */
.slide-split { padding-bottom: 0; }
.slide-split .footer { padding-bottom: 10px; margin-bottom: 0; flex-shrink: 0; }

.s2-header { flex-shrink: 0; }

/* Filters row — full width above both cards */
.s2-filters-row {
  flex-shrink: 0;
  position: relative;
  z-index: 40;
}
.s2-filters-row .filters {
  margin: 6px 0 6px;
}

/* Summary tiles row */
.s2-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 10px;
  flex-shrink: 0;
  margin-bottom: 8px;
}
.s2-tile {
  background: linear-gradient(160deg, #ffffff, #f3f9ff);
  border-radius: 14px;
  padding: 8px 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(31,95,191,.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
}
.s2-tile-lbl {
  font-size: 9.5px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--ink-soft);
  text-align: center;
}
.s2-tile-val {
  font-family: var(--font-head); font-weight: 800; font-size: 18px;
  color: var(--navy); line-height: 1; text-align: center;
}
/* Tiles 1 & 2 only: label at top, value centred in remaining space */
.s2-tile:not(.s2-tile-multi) .s2-tile-val {
  flex: 1; display: flex; align-items: center; justify-content: center;
}
.s2-t1 { border-left: 4px solid #1f5fbf; }
.s2-t2 { border-left: 4px solid #2e7d32; }
.s2-t3 { border-left: 4px solid var(--amber); }

/* Multi-col tile (3 values side by side) */
.s2-tile-multi { gap: 2px; justify-content: flex-start; align-items: stretch; }
.s2-tile-header {
  font-size: 9.5px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--ink-soft);
  text-align: center; width: 100%; margin-bottom: 4px;
}
.s2-tile-cols {
  display: flex; flex-direction: row;
  align-items: stretch; justify-content: space-between;
  flex: 1; gap: 0;
}
.s2-tile-col {
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  gap: 2px; flex: 1;
}
.s2-tile-col .s2-tile-lbl { text-align: center; }
.s2-tile-col-sep {
  width: 1px; background: rgba(21,53,126,.12);
  align-self: stretch; margin: 0 6px;
}
.s2-tile-val-sm {
  font-family: var(--font-head); font-weight: 800; font-size: 18px;
  color: var(--navy); line-height: 1; white-space: nowrap;
}
/* keep legacy rows unused but avoid breakage */
.s2-tile-col-total { align-items: center; }
.s2-tile-row { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 0; }
.s2-tile-row-total { border-top: 1px solid rgba(21,53,126,.10); padding-top: 4px; margin-top: 2px; }

/* Cards row — both cards side by side, same height */
.s2-split {
  display: flex;
  flex-direction: row;
  gap: 14px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Left card */
.s2-left {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.s2-left .s3-card {
  flex: 1;
  min-height: 0;
}

/* Right card — fixed width, same height as left (stretch via flex) */
.s2-right {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.detail-panel {
  flex: 1;
  min-height: 0;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255,255,255,.7);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Empty state */
.dp-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 14px 16px 10px;
  text-align: center;
  gap: 4px;
}
.dp-empty-icon {
  font-size: 20px;
  opacity: 0.18;
  color: var(--navy);
}
.dp-empty-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 12px;
  color: var(--navy);
  margin: 0;
  opacity: 0.55;
}
.dp-empty-sub {
  font-size: 10.5px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.4;
  max-width: 220px;
  opacity: 0.75;
}

/* Populated state */
.dp-content {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  gap: 14px;
  flex-direction: column;
}
.dp-content.visible {
  display: flex;
}

.dp-account-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-bottom: 2px solid #e4edf8;
  padding-bottom: 10px;
}
.dp-account-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 11.5px;
  color: var(--navy);
  line-height: 1.3;
}
.dp-account-meta {
  font-size: 9px;
  font-weight: 600;
  color: var(--ink-soft);
}
.dp-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}
.dp-badge {
  display: inline-flex; align-items: center;
  font-size: 8px; font-weight: 700;
  padding: 2px 6px; border-radius: 999px;
  border: 1px solid transparent;
}
.dp-badge-approved { background: #e6f4ea; color: #2e7d32; border-color: #b7dfbe; }
.dp-badge-pending  { background: #fff8e1; color: #8a6000; border-color: #f0d890; }
.dp-badge-level    { background: #e8eeff; color: var(--navy); border-color: #c5d0f5; }
.dp-badge-renewed        { background: #e6f4ea; color: #2e7d32;  border-color: #b7dfbe; }
.dp-badge-partial-renew  { background: #b7dfbe; color: #1a4a20;  border-color: #7ec18a; }
.dp-badge-renew-pipeline { background: #B58E31; color: #ffffff;  border-color: #9a7620; }
.dp-badge-no-renew       { background: #FFF9E6; color: #5c3d00;  border-color: #e8c96a; }

.dp-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dp-section-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 8.5px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--salesforce);
  margin-bottom: 2px;
}
.dp-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 9.5px;
  padding: 2px 0;
  border-bottom: 1px solid #f0f4fb;
}
.dp-lbl {
  color: var(--ink-soft);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.dp-val {
  font-weight: 700;
  color: var(--navy);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.dp-roi { }
.dp-roi-good { color: var(--green-text); font-weight: 700; }
.dp-roi-bad  { color: #8a6000; font-weight: 700; }
.dp-mitigated { color: var(--green-text); }
.dp-mit-total { color: var(--green-text); font-weight: 600; }

/* Links inside detail panel */
.dp-row-link { align-items: center; }
.dp-link {
  font-size: 9.5px; font-weight: 700;
  color: var(--salesforce); text-decoration: none;
  white-space: nowrap;
}
.dp-link:hover { text-decoration: underline; }

/* Leadtime subtitle */
.dp-leadtime {
  font-family: var(--font-body);
  font-size: 8.5px; font-weight: 600;
  color: var(--ink-soft); text-transform: none; letter-spacing: 0;
  margin-left: 4px;
}

/* Approval Timeline */
.dp-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 4px;
}
.dp-tl-step {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 0;
  position: relative;
}
.dp-tl-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 6px; top: 18px;
  width: 1.5px; height: calc(100% - 4px);
  background: #d4e0f0;
}
.dp-tl-dot {
  width: 13px; height: 13px; border-radius: 50%;
  flex-shrink: 0; position: relative; z-index: 1;
  border: 2px solid #c8d8ee;
  background: #fff;
}
.dp-tl-done .dp-tl-dot {
  background: #2e7d32;
  border-color: #2e7d32;
}
/* in-progress: last done step before a pending — shown as blue outline */
.dp-tl-step.dp-tl-inprogress .dp-tl-dot {
  background: #fff;
  border-color: var(--region-blue);
  box-shadow: 0 0 0 2px rgba(31,95,191,.2);
}
.dp-tl-lbl {
  font-size: 9.5px; font-weight: 700;
  color: var(--ink); flex: 1;
}
.dp-tl-pending .dp-tl-lbl { color: #9aabc4; }
.dp-tl-date {
  font-size: 9px; font-weight: 600;
  color: var(--ink-soft); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.dp-tl-pending .dp-tl-date { color: #b8c8dc; }

.dp-nextsteps-section { flex: 1; }
.dp-nextsteps {
  font-size: 9.5px;
  color: var(--ink);
  line-height: 1.55;
  font-weight: 500;
  background: #f6f9ff;
  border-radius: 10px;
  padding: 8px 10px;
  border: 1px solid #e4edf8;
}

/* Row selected state */
.cases-table tbody tr.selected { background: #daeeff !important; }
.cases-table tbody tr { cursor: pointer; }

@media print {
  .nav, .progress, .sync-toast { display: none !important; }
}

/* ── Slide 4: Gantt Timeline ─────────────────────────────────────────── */
.s4-slide .footer { display: none !important; }

/* Legend */
.s4-legend {
  display: flex; flex-direction: row; align-items: center;
  gap: 16px; margin: 0 24px 4px 24px; flex-shrink: 0;
}
.s4-leg-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 8.5px; font-weight: 600; color: var(--ink-soft);
  text-transform: capitalize; letter-spacing: .3px;
}
.s4-lbar {
  width: 20px; height: 8px; border-radius: 3px; flex-shrink: 0;
}
.s4-ldot-today {
  display: inline-block; width: 2px; height: 14px;
  background: #e53935; flex-shrink: 0; border-radius: 1px;
}

/* Chart container */
.s4-chart {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  margin: 0 24px 4px 24px;
  overflow: hidden;
  position: relative;
}

/* Month axis (top) */
.s4-axis {
  display: flex; flex-direction: row;
  flex-shrink: 0;
  border-bottom: 1.5px solid #c8d8ee;
  padding-bottom: 3px;
}
.s4-axis-label-col { flex-shrink: 0; }
.s4-axis-months { flex: 1; position: relative; height: 16px; }
.s4-month-tick {
  position: absolute; top: 0;
}
.s4-month-name {
  font-size: 8px; font-weight: 600; letter-spacing: .2px;
  text-transform: none; color: var(--ink-soft);
  white-space: nowrap;
}

/* Scrollable rows area */
.s4-rows {
  flex: 1; overflow-y: auto; overflow-x: hidden; position: relative;
}

/* Vertical grid lines */
.s4-gridline {
  position: absolute; top: 0;
  width: 1px; background: rgba(31,95,191,.07);
  pointer-events: none; z-index: 0;
}

/* Today line — child of .s4-rows; height set by JS to match scrollHeight */
.s4-today-line {
  position: absolute; top: 0;
  width: 2px; background: #e53935;
  opacity: .75; pointer-events: none; z-index: 4;
}

/* One account row */
.s4-row {
  display: flex; flex-direction: row;
  align-items: center;
  border-bottom: 1px solid #eaf0f9;
  min-height: 32px; padding: 3px 0;
}
.s4-row:last-child { border-bottom: none; }
.s4-acct {
  flex-shrink: 0; padding-right: 8px; z-index: 2;
}
.s4-acct-name {
  font-size: 9px; font-weight: 700; color: var(--navy);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.s4-acct-sub {
  font-size: 7.5px; font-weight: 600; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Bar area */
.s4-bar-area {
  flex: 1; position: relative;
  height: 100%; display: flex; align-items: center;
}

/* Stage segment bars */
.s4-seg {
  position: absolute;
  height: 14px; border-radius: 2px;
  opacity: .9; z-index: 1;
  cursor: default;
  display: flex; align-items: center;
  overflow: hidden;
}
.s4-seg-lbl {
  font-size: 7.5px; font-weight: 700; letter-spacing: .3px;
  text-transform: capitalize; white-space: nowrap;
  overflow: hidden; text-overflow: clip;
  padding: 0 4px; line-height: 1;
  pointer-events: none; user-select: none;
}
.s4-tooltip {
  display: none;
  position: fixed;
  background: #fff;
  border: 1.5px solid rgba(21,53,126,.18);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(21,53,126,.18);
  padding: 8px 12px;
  font-size: 19px;
  font-weight: 500;
  color: var(--navy);
  white-space: pre;
  pointer-events: none;
  z-index: 300;
  line-height: 1.6;
}
