/* ═══════════════════════════════════════════════════════════
   Month Performance — drill-down dashboard
   Data-dense layout: tight spacing, tabular numbers, one section
   at a time. Palette slots: 1 blue (this month) · 2 orange
   (comparison) · 3 aqua (secondary) · grey (everything else).
   ═══════════════════════════════════════════════════════════ */

:root {
  color-scheme: light;
  --surface:   #ffffff;
  --page:      #f7f9fc;
  --raise:     #ffffff;
  --ink:       #0f1f3d;
  --ink-2:     #475569;
  --ink-3:     #1e293b;
  --grid:      #e7eaf7;
  --base:      #c7cce6;
  --line:      #dce5ef;
  --line-2:    rgba(28, 39, 71, .05);
  --surface-border: color-mix(in srgb, var(--ink) 34%, var(--line));

  --mtd:       #2563eb;
  --lmtd:      #ea6a2c;
  --aqua:      #0e9f76;
  --indigo:    #5138ce;

  /* Data-viz slots. These three are Anmol's APPROVED reference-design
     colours -- do not remap them onto --mtd/--good/--warn. They live here
     as tokens only so there is a single place to change them. */
  --chart-target:   #2878E8;
  --chart-achieved: #2CBF73;
  --chart-rate:     #F58220;
  --chart-sel:      rgba(40, 120, 232, .08);

  --mtd-soft:      color-mix(in srgb, var(--mtd) 6%, var(--surface));
  --mtd-border:    color-mix(in srgb, var(--mtd) 32%, var(--line));
  --good-soft:     color-mix(in srgb, var(--good) 6%, var(--surface));
  --good-border:   color-mix(in srgb, var(--good) 30%, var(--line));
  --bad-soft:      color-mix(in srgb, var(--critical) 5%, var(--surface));
  --bad-border:    color-mix(in srgb, var(--critical) 28%, var(--line));
  --indigo-soft:   color-mix(in srgb, var(--indigo) 6%, var(--surface));
  --indigo-border: color-mix(in srgb, var(--indigo) 30%, var(--line));
  --warn-soft:     color-mix(in srgb, var(--warn) 7%, var(--surface));
  --warn-border:   color-mix(in srgb, var(--warn) 32%, var(--line));

  --good:      #15803d;
  --good-ink:  #15803d;
  --warn:      #d97706;
  --serious:   #ea6a2c;
  --critical:  #b91c28;

  --shadow:      0 1px 1px rgba(15, 31, 61, .07), 0 4px 10px rgba(15, 31, 61, .09), 0 22px 44px -18px rgba(15, 31, 61, .34);
  --shadow-lift: 0 2px 4px rgba(13,17,23,.06), 0 14px 36px -16px rgba(13,17,23,.24);

  --r:     12px;
  --r-sm:  8px;
  --pad:   16px;
  --max:   1460px;
  --ease:  cubic-bezier(.22, 1, .36, 1);
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
@media (hover: hover) and (pointer: fine) {
  .card, .kpis-hero .kpi-combo, .grid-tdks .tdp-group, .grid-tdks .key-signal, .rate {
    transition: box-shadow 180ms ease;
  }
  .card:hover {
    box-shadow: var(--shadow), 0 0 0 3px color-mix(in srgb, var(--indigo) 65%, transparent);
  }
  .kpis-hero .kpi-combo:hover,
  .grid-tdks .tdp-group:hover,
  .grid-tdks .key-signal:hover,
  .rate:hover {
    box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--indigo) 65%, transparent);
  }
  .wow-chart-panel:hover, .wow-summary:hover {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--indigo) 65%, transparent);
  }
}
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: var(--sans); font-size: 14.5px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 640; letter-spacing: -.015em; }
p { margin: 0; }
.mono, .num, td.num, th.num { font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; z-index: 100; background: var(--mtd);
              color: #fff; padding: 8px 14px; border-radius: 0 0 8px 8px; }
:focus-visible { outline: 2px solid var(--mtd); outline-offset: 2px; border-radius: 4px; }

/* ── topbar stack ─────────────────────────────────────────── */
.topbar {
  /* Anmol: the filter panels got tall (2 grouped cards) and freezing
     them at the top ate too much of the viewport on scroll -- not
     sticky any more, scrolls away with the rest of the page. */
  background: color-mix(in srgb, var(--page) 92%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: var(--max); margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 14px; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  width: 24px; height: 24px; border-radius: 7px; flex: none;
  background: linear-gradient(135deg, var(--mtd), var(--indigo));
  display: grid; place-items: center;
}
.brand-mark svg {
  width: 14px; height: 14px; fill: none; stroke: #fff;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 14px; font-weight: 650; }
.brand-text em { font-style: normal; font-size: 11px; color: var(--ink-3);
                 letter-spacing: .06em; text-transform: uppercase; font-weight: 560; }
.topbar .brand-mark { width: 34px; height: 34px; border-radius: 9px; }
.topbar .brand-mark svg { width: 19px; height: 19px; }
.topbar .brand-text strong { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.topbar .brand-text em { font-size: 13.5px; text-transform: none; letter-spacing: 0;
                          font-weight: 500; color: var(--ink-2); }
.topbar-meta { display: flex; align-items: center; gap: 8px; }
.pill { font-size: 12px; font-weight: 620; color: var(--ink-2); padding: 5px 12px;
        border: 1px solid var(--line); border-radius: 100px; white-space: nowrap; }
.icon-btn {
  width: 32px; height: 32px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface);
  color: var(--ink-2); cursor: pointer; transition: color .2s, border-color .2s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--base); }
.icon-btn svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }

/* controls */
.control-bar { border-top: 1px solid var(--line-2); }
.control-in {
  max-width: var(--max); margin: 0 auto; padding: 12px 20px 14px;
  display: flex; flex-direction: column; gap: 12px;
}
.ctl { display: flex; flex-direction: column; gap: 3px; min-width: 150px; position: relative; }
.ctl[hidden] { display: none; }
.ctl.grow { flex: 1; min-width: 200px; }
.ctl label { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase;
             color: var(--ink-3); font-weight: 620; }
.ctl select, .ctl input {
  font: inherit; font-size: 12.5px; font-weight: 500; color: #17243d; background: var(--surface);
  border: 1px solid #cfdae8; border-radius: 6px; padding: 0 11px; width: 100%;
  height: 37px;
}
.ctl select:hover, .ctl input:hover { border-color: #9db8db; }
.ctl select:focus, .ctl input:focus { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59,130,246,.10); }
.ctl select:disabled { opacity: .5; cursor: not-allowed; }

/* Grouped filter panels ("Time Filters" / "Employee Hierarchy Filters") */
.filter-group { background: var(--page); border: 1.5px solid var(--surface-border);
                 border-radius: var(--r); padding: 12px 16px; }
.filter-group.tint-blue {
  background: color-mix(in srgb, var(--mtd) 5%, var(--page));
  border-color: color-mix(in srgb, var(--mtd) 22%, var(--line));
}
.filter-group.tint-green {
  background: color-mix(in srgb, var(--good) 5%, var(--page));
  border-color: color-mix(in srgb, var(--good) 22%, var(--line));
}
.filter-group.tint-blue  { background: #f5f9ff; border-color: var(--mtd-border); }
.filter-group.tint-green { background: #f5fbf8; border-color: var(--good-border); }
.filter-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.filter-group-head h3 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.filter-group-head p { font-size: 12px; font-weight: 500; color: var(--ink-2); margin-top: 2px; }

.filter-master-row {
  display: grid;
  grid-template-columns: minmax(330px, 0.9fr) minmax(560px, 2.1fr);
  gap: 12px; align-items: stretch;
}
@media (max-width: 1150px) { .filter-master-row { grid-template-columns: 1fr; } }

.time-filter-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.3fr) minmax(0,.9fr); gap: 8px; }
/* Target vs Achievement always shows its own till-date figures, so the generic Basis filter does nothing there -- hidden on that page/section, Month+Compare reflow to fill the row. */
.time-filter-grid:has(#fBasisCtl[hidden]) { grid-template-columns: minmax(0,1fr) minmax(0,1.3fr); }
@media (max-width: 560px) { .time-filter-grid { grid-template-columns: 1fr 1fr; } }

.employee-filter-grid {
  display: grid;
  grid-template-columns:
    minmax(130px, 1.15fr) auto minmax(105px, 1fr) auto
    minmax(105px, 1fr) auto minmax(120px, 1.2fr);
  gap: 6px; align-items: end;
}
.employee-filter-grid .chev {
  align-self: center; margin-bottom: 9px; font-size: 15px; font-weight: 700;
  color: #4f6b8a; line-height: 1;
}
.time-filter-grid .ctl, .employee-filter-grid .ctl { min-width: 0; }
@media (max-width: 760px) {
  .employee-filter-grid { grid-template-columns: repeat(2, 1fr); }
  .employee-filter-grid .chev { display: none; }
}
.control-extra { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.ach-ctl { flex: none; width: 170px; }
.language-ctl { flex: none; width: 150px; }
.language-ctl select { font-family: "Nirmala UI", "Noto Sans Devanagari", "Noto Sans Tamil", "Noto Sans Telugu", "Noto Sans Kannada", "Segoe UI", sans-serif; font-size: 13px; }
.jump-ctl { max-width: 420px; }

.suggest {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 60; margin-top: 4px;
  background: var(--raise); border: 1px solid var(--line); border-radius: var(--r-sm);
  box-shadow: var(--shadow-lift); overflow: hidden; max-height: 320px; overflow-y: auto;
}
.suggest button {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  width: 100%; text-align: left; font: inherit; font-size: 13px; color: var(--ink);
  background: none; border: 0; border-bottom: 1px solid var(--line-2);
  padding: 8px 11px; cursor: pointer;
}
.suggest button > span { color: #111 !important; font-weight: 800; }
.suggest button.suggest-sm { background: #e4f1ff; }
.suggest button.suggest-executive { background: #fff3dc; }
.suggest button.suggest-sm > em { color: #075da8; font-weight: 800; }
.suggest button.suggest-executive > em { color: #9a5700; font-weight: 800; }
.suggest button.suggest-sm:hover { background: #cfe7fb; }
.suggest button.suggest-executive:hover { background: #ffe6bd; }
.suggest button:hover { background: var(--line-2); }
.suggest em { font-style: normal; font-size: 10.5px; color: var(--ink-3);
              text-transform: uppercase; letter-spacing: .05em; }

/* breadcrumb */
.crumbs {
  max-width: var(--max); margin: 0 auto; padding: 0 20px 8px;
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.crumb, .pd-crumb {
  font: inherit; font-size: 12.5px; font-weight: 610; color: var(--mtd);
  background: color-mix(in srgb, var(--mtd) 10%, transparent);
  border: 0; padding: 5px 12px; border-radius: 100px; cursor: pointer;
  transition: color .18s, background .18s;
}
.crumb:hover, .pd-crumb:hover { background: color-mix(in srgb, var(--mtd) 18%, transparent); }
.crumb.on, .pd-crumb.on { color: #fff; font-weight: 700; background: var(--mtd); }
.crumb-sep { color: var(--ink-3); font-size: 13px; }

/* ── shell + sidebar (section nav) ───────────────────────────
   Persistent left sidebar at desktop widths; collapses to today's
   original horizontal-bar look below 860px (same breakpoint this file
   already uses for .rate-grid/.tgt-grid) so the overflow-free behaviour
   already verified at 390/320px keeps holding. */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; flex: none; background: var(--surface);
  border-right: 1px solid var(--line); padding: 16px 10px;
  display: flex; flex-direction: column; gap: 2px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-brand {
  padding: 10px 12px; margin-bottom: 12px;
  background: var(--page); border: 1px solid var(--line); border-radius: var(--r-sm);
}
.sidebar-brand .brand-text em { text-transform: none; letter-spacing: 0; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar button, .sidebar .sidebar-link {
  font: inherit; text-align: left; background: none; border: 0;
  border-radius: var(--r-sm); padding: 10px 12px; cursor: pointer;
  color: var(--ink-2); display: flex; align-items: center; gap: 10px;
  transition: background .18s, color .18s; text-decoration: none;
}
.sidebar button .nav-ic, .sidebar .sidebar-link .nav-ic {
  flex: none; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.nav-label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sidebar button span, .sidebar .sidebar-link span { font-size: 13.5px; font-weight: 620; color: inherit; }
.sidebar button small, .sidebar .sidebar-link small { font-size: 11px; color: var(--ink-3); }
.sidebar button:hover, .sidebar .sidebar-link:hover { background: var(--page); }
.sidebar button.on { background: color-mix(in srgb, var(--mtd) 14%, transparent); color: var(--mtd); }
.sidebar button.on span { color: var(--mtd); }
.app-content { flex: 1; min-width: 0; }

/* Hide toggle lives inside .sidebar (#sidebarToggle) so it collapses along
   with it. A separate edge-tab (#sidebarShow) is fixed to the screen edge
   and only shown while the sidebar is hidden, so it stays reachable. */
.sidebar-hide {
  font: inherit; text-align: left; background: none; border: 0;
  border-radius: var(--r-sm); padding: 8px 10px; margin-bottom: 6px;
  cursor: pointer; color: var(--ink-3); display: flex; align-items: center;
  gap: 6px; font-size: 12px; flex: none; transition: background .18s, color .18s;
}
.sidebar-hide:hover { background: var(--page); color: var(--ink); }
.sidebar-hide svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }

.sidebar-edge {
  display: none; position: fixed; left: 0; top: 14px; z-index: 60;
  width: 24px; height: 40px; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--line); border-left: 0;
  border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--ink-2); cursor: pointer;
  transition: background .18s, color .18s;
}
.sidebar-edge:hover { background: var(--page); color: var(--ink); }
.sidebar-edge svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.shell.sidebar-hidden .sidebar { display: none; }
.shell.sidebar-hidden .sidebar-edge { display: flex; }

@media (max-width: 860px) {
  .shell { flex-direction: column; overflow-x: hidden; }
  .sidebar {
    width: auto; min-width: 0; position: static; height: auto; flex-direction: row;
    overflow-x: auto; overflow-y: visible; border-right: 0;
    border-bottom: 1px solid var(--line); padding: 4px 8px;
  }
  .sidebar-brand { display: none; }
  .sidebar nav { flex-direction: row; }
  .sidebar button, .sidebar .sidebar-link { flex-direction: row; white-space: nowrap; gap: 6px; flex: none; }
  .sidebar button small, .sidebar .sidebar-link small { display: none; }
  .sidebar-hide { margin-bottom: 0; }
  .sidebar-hide span { display: none; }
}

/* ── Hover-reveal sidebar (desktop mouse only) ────────────────
   Fully hidden at rest: the panel sits translated off-screen, the dashboard
   keeps its full width. A 10px invisible strip (::after, poking out of the
   panel's right edge onto the screen's left edge) is the hover handle --
   hovering a pseudo-element counts as hovering the sidebar. Open/close
   animate ONLY transform and opacity, which the GPU composites without
   repainting, so the slide stays smooth; the old clip-path + box-shadow
   version repainted the whole panel every frame and stuttered on close.
   z-index stays below every modal/drawer backdrop (lowest is 60).
   Touch devices and narrow screens keep the original static sidebar. */
@media (min-width: 861px) and (hover: hover) and (pointer: fine) {
  :root {
    --edge: 10px;
    --rail-open: 252px;
    --ease-drawer: cubic-bezier(.32, .72, 0, 1);
    --ease-out-strong: cubic-bezier(.23, 1, .32, 1);
  }

  .sidebar, .shell.sidebar-hidden .sidebar {
    display: flex; position: fixed; left: 0; top: 0; z-index: 55;
    width: var(--rail-open); height: 100vh; padding: 16px 10px 16px 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f5f7fb 100%);
    border-right: 1px solid rgba(15, 23, 42, .08);
    overflow: visible; /* ponytail: no inner scroll; fine for 5 nav items, add an inner scroller if the nav outgrows 100vh */
    transform: translateX(-100%);
    will-change: transform;
    /* Close: tiny 60ms grace, then slide out on the same drawer curve. */
    transition: transform 280ms var(--ease-drawer) 60ms;
  }
  .sidebar:is(:hover, :has(:focus-visible)) {
    transform: translateX(0);
    transition: transform 340ms var(--ease-drawer) 40ms;
  }
  .sidebar::after {
    content: ""; position: absolute; top: 0; left: 100%; width: var(--edge); height: 100%;
  }
  .sidebar::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    box-shadow: 22px 0 48px -22px rgba(15, 23, 42, .42);
    opacity: 0; transition: opacity 200ms ease 60ms;
  }
  .sidebar:is(:hover, :has(:focus-visible))::before { opacity: 1; transition-delay: 40ms; }
  .sidebar .sidebar-hide, .sidebar-edge, .shell.sidebar-hidden .sidebar-edge { display: none; }

  /* Brand: the mark does one 3D flip as the panel opens. */
  .sidebar-brand { perspective: 600px; }
  .sidebar .brand-mark { box-shadow: 0 6px 14px -8px rgba(15, 23, 42, .55); }
  .sidebar:is(:hover, :has(:focus-visible)) .brand-mark { animation: mp-brand-flip 520ms var(--ease-out-strong) 80ms both; }
  @keyframes mp-brand-flip {
    from { transform: rotateY(-180deg) scale(.9); }
    to   { transform: rotateY(0) scale(1); }
  }

  /* Labels swing in like pages turning, one after another. */
  .sidebar .nav-label, .sidebar .brand-text {
    opacity: 0; transform: translateX(-12px) rotateY(-40deg);
    transform-origin: left center;
    transition: opacity 0ms linear 340ms, transform 0ms linear 340ms;
  }
  .sidebar:is(:hover, :has(:focus-visible)) .nav-label,
  .sidebar:is(:hover, :has(:focus-visible)) .brand-text {
    opacity: 1; transform: none;
    transition: opacity 260ms ease, transform 420ms var(--ease-out-strong);
    transition-delay: calc(var(--i, 0) * 38ms + 120ms);
  }
  #sectionNav button:nth-child(1) { --i: 1; }
  #sectionNav button:nth-child(2) { --i: 2; }
  #sectionNav button:nth-child(3) { --i: 3; }
  #sectionNav button:nth-child(4) { --i: 4; }
  #sectionNav button:nth-child(5) { --i: 5; }
  #sectionNav button:nth-child(6) { --i: 6; }

  /* Items: black text, raised 3D pill on hover, tilting icon, press feedback. */
  .sidebar nav { gap: 4px; }
  .sidebar button {
    position: relative; color: #0b0f19; perspective: 600px;
    transition: background 180ms ease, box-shadow 200ms ease,
                transform 160ms var(--ease-out-strong);
  }
  .sidebar button span { color: #000000; font-weight: 720; }
  .sidebar button small { color: #1f2937; font-weight: 560; }
  .sidebar button .nav-ic { transition: transform 280ms var(--ease-out-strong), color 180ms ease; }
  .sidebar button:hover {
    background: #ffffff; transform: translateY(-1px);
    box-shadow: inset 0 1px 0 #ffffff, 0 10px 20px -12px rgba(15, 23, 42, .45),
                0 0 0 1px rgba(15, 23, 42, .07);
  }
  .sidebar button:hover .nav-ic { transform: rotateX(14deg) rotateY(-22deg) scale(1.14); }
  .sidebar button:active { transform: scale(.97); transition-duration: 90ms; }

  .sidebar button.on,
  .sourcing-mode .sidebar button.on {
    color: #000000;
    background: linear-gradient(180deg, #ffffff, color-mix(in srgb, var(--mtd) 13%, #ffffff));
    box-shadow: inset 0 1px 0 #ffffff,
                0 12px 22px -14px color-mix(in srgb, var(--mtd) 70%, transparent),
                0 0 0 1px color-mix(in srgb, var(--mtd) 30%, transparent);
  }
  .sidebar button.on span, .sourcing-mode .sidebar button.on span { color: #000000; }
  .sidebar button.on .nav-ic { color: var(--mtd); }
  .sidebar button.on::before {
    content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 4px;
    border-radius: 0 4px 4px 0; background: var(--mtd);
    box-shadow: 0 0 10px color-mix(in srgb, var(--mtd) 55%, transparent);
  }
}
@media (min-width: 861px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: reduce) {
  .sidebar, .sidebar:is(:hover, :has(:focus-visible)), .sidebar .nav-label, .sidebar .brand-text,
  .sidebar button, .sidebar button .nav-ic { transition-duration: 0ms !important; }
  .sidebar .brand-mark { animation: none !important; }
  .sidebar .nav-label, .sidebar .brand-text, .sidebar button:hover .nav-ic { transform: none; }
}

/* ── layout ───────────────────────────────────────────────── */
main {
  max-width: var(--max); margin: 0 auto;
  padding: 18px 20px 48px;
  display: flex; flex-direction: column; gap: 10px;
}
#sectionBody > * + * {
  margin-top: 6px;
  border-top: 0;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 960px) { .grid-2 { grid-template-columns: 1fr; } }
/* Till Date Progress (wide) + Key Signal (narrow) -- Key Signal was
   taking half the row for a 3-line insight box; give it a fixed lane
   instead of an even split. */
.grid-2.grid-tdks {
  grid-template-columns: minmax(0, 3.2fr) minmax(270px, 1fr); gap: 0;
  background: linear-gradient(180deg, #ffffff, #fafbfd);
  border: 1.5px solid var(--surface-border); border-radius: var(--r); box-shadow: none; overflow: hidden;
}
.grid-tdks .tdp-group { padding: var(--pad); }
.grid-tdks .key-signal { border-left: 1px solid var(--surface-border); }
@media (max-width: 1100px) {
  .grid-2.grid-tdks { grid-template-columns: 1fr; }
  .grid-tdks .key-signal { border-left: none; border-top: 1px solid var(--surface-border); }
}

.card {
  background: linear-gradient(180deg, #ffffff, #fafbfd); border: 1.5px solid var(--surface-border);
  border-radius: var(--r); padding: var(--pad); box-shadow: none;
}
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 12px;
}
.card-head h2 { font-size: 15px; }
.kpi-group-label { font-size: 11px; letter-spacing: .07em; text-transform: uppercase;
                    color: var(--ink-3); font-weight: 650; margin: 18px 0 8px; }
.kpi-group-label:first-of-type { margin-top: 0; }
.card-sub { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }

/* focus header */
.focus { display: flex; align-items: flex-end; justify-content: space-between;
         gap: 16px; flex-wrap: wrap; padding: 2px 2px 0; }
.focus h1 { font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -.028em; }
.focus-sub { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.focus-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-block; padding: 3px 10px; border-radius: 100px;
  background: color-mix(in srgb, var(--mtd) 13%, transparent); color: var(--mtd);
  font-size: 11px; font-weight: 620;
}

.kpi-banner {
  font-size: 12px; color: var(--ink-2); background: color-mix(in srgb, var(--mtd) 8%, var(--page));
  border: 1px solid color-mix(in srgb, var(--mtd) 30%, var(--line));
  border-radius: var(--r-sm); padding: 9px 13px; margin: -4px 0 2px;
}

/* ── KPI strip ────────────────────────────────────────────── */
.kpis { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis[hidden] { display: none; }
@media (max-width: 1180px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 820px)  { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi {
  background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--r-sm);
  padding: 12px 14px; position: relative; overflow: hidden;
}
.kpi.flag { border-color: color-mix(in srgb, var(--critical) 45%, var(--line)); }
.kpi.flag::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
                    background: var(--critical); }
.kpi.td { border-color: color-mix(in srgb, var(--mtd) 40%, var(--line)); }
.kpi.td::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
                   background: var(--mtd); }
.kpi-top { display: flex; align-items: center; justify-content: space-between;
           gap: 8px; margin-bottom: 6px; }
.kpi-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.kpi-label { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
             color: var(--ink-3); font-weight: 640; }
.kpi-note { font-size: 10px; padding: 1px 6px; border-radius: 100px;
            background: var(--line-2); color: var(--ink-3); flex: none; }
.kpi-val { font-size: 24px; font-weight: 650; letter-spacing: -.022em;
           font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi-foot { display: flex; align-items: center; justify-content: space-between;
            gap: 6px; margin-top: 7px; font-size: 11.5px; color: var(--ink-3);
            font-variant-numeric: tabular-nums; }

/* Small colored icon badge for a .kpi card — reuses the same semantic
   tokens as everything else (--mtd/--aqua/--good/--warn/--critical),
   no new palette. */
.kpi-ic { width: 26px; height: 26px; border-radius: 8px; flex: none;
          display: grid; place-items: center; }
.kpi-ic svg { width: 15px; height: 15px; fill: none; stroke: currentColor;
              stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.kpi-ic.c-mtd,  .filter-group-ic.c-mtd,  .signal-ic.c-mtd  { background: color-mix(in srgb, var(--mtd) 16%, transparent);      color: var(--mtd); }
.kpi-ic.c-aqua, .filter-group-ic.c-aqua, .signal-ic.c-aqua { background: color-mix(in srgb, var(--aqua) 16%, transparent);     color: var(--aqua); }
.kpi-ic.c-good, .filter-group-ic.c-good, .signal-ic.c-good { background: color-mix(in srgb, var(--good) 16%, transparent);     color: var(--good-ink); }
.kpi-ic.c-warn, .filter-group-ic.c-warn, .signal-ic.c-warn { background: color-mix(in srgb, var(--warn) 16%, transparent);     color: var(--warn); }
.kpi-ic.c-bad,  .filter-group-ic.c-bad,  .signal-ic.c-bad  { background: color-mix(in srgb, var(--critical) 16%, transparent); color: var(--critical); }
.kpi-ic.c-indigo, .filter-group-ic.c-indigo, .signal-ic.c-indigo { background: color-mix(in srgb, var(--indigo) 16%, transparent); color: var(--indigo); }
.filter-group-ic, .signal-ic {
  width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center;
}
.filter-group-ic svg, .signal-ic svg {
  width: 16px; height: 16px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* Achievement-% badge, same good/warn/bad thresholds as the progress
   bars (.prog i) elsewhere in this section. */
.pct-pill { font-size: 11.5px; font-weight: 650; padding: 2px 8px; border-radius: 100px;
            font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }
.pct-pill.good { color: var(--good-ink); background: color-mix(in srgb, var(--good) 14%, transparent); }
.pct-pill.warn { color: var(--warn);     background: color-mix(in srgb, var(--warn) 15%, transparent); }
.pct-pill.bad  { color: var(--critical); background: color-mix(in srgb, var(--critical) 13%, transparent); }

/* Combined Count+Value hero cards (Target / Achieved / Gap / Pace) --
   reuses .kpi/.kpi-top/.kpi-head/.kpi-ic/.kpi-label, adds a 2-column
   mini-stat body instead of one big number. */
.kpis-hero {
  grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
  border: 1.5px solid var(--surface-border); border-radius: var(--r); overflow: hidden; box-shadow: none;
}
@media (max-width: 1180px) { .kpis-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .kpis-hero { grid-template-columns: 1fr; } }
.kpis-hero .kpi-combo {
  padding: 14px 16px; border-radius: 0; min-height: 152px; border: none; box-shadow: none;
}
.kpis-hero .kpi-combo:not(:first-child) { border-left: 1px solid var(--surface-border); }
@media (max-width: 1180px) {
  .kpis-hero .kpi-combo:nth-child(odd) { border-left: none; }
  .kpis-hero .kpi-combo:nth-child(n+3) { border-top: 1px solid var(--surface-border); }
}
@media (max-width: 620px) {
  .kpis-hero .kpi-combo { border-left: none !important; border-top: 1px solid var(--surface-border); }
  .kpis-hero .kpi-combo:first-child { border-top: none; }
}
.kpis-hero .kpi-combo:nth-child(1) { background: var(--mtd-soft);    border-color: var(--mtd-border); }
.kpis-hero .kpi-combo:nth-child(2) { background: var(--good-soft);   border-color: var(--good-border); }
.kpis-hero .kpi-combo:nth-child(3):has(.kpi-ic.c-bad)  { background: var(--bad-soft);  border-color: var(--bad-border); }
.kpis-hero .kpi-combo:nth-child(3):has(.kpi-ic.c-good) { background: var(--good-soft); border-color: var(--good-border); }
.kpis-hero .kpi-combo:nth-child(4) { background: var(--indigo-soft); border-color: var(--indigo-border); }
.kpi-combo .kpi-ic { width: 34px; height: 34px; border-radius: 10px; }
.kpi-combo .kpi-ic svg { width: 18px; height: 18px; }
.kpi-combo .kpi-label { font-size: 16px; font-weight: 650; text-transform: none;
                         letter-spacing: -.01em; color: var(--ink); }
.kpi-combo .pct-pill { font-size: 10.5px; font-weight: 650; padding: 2px 8px; }
.kpi-combo .kpi-top { align-items: flex-start; }
.kpi-sub { font-size: 11.5px; color: var(--ink-3); margin: 0 0 12px; }
.kpi-combo .kpi-sub { font-size: 12.5px; color: var(--ink-2); margin: 2px 0 12px; }
.kpi-combo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.kpi-combo-grid > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 0 12px; }
.kpi-combo-grid > div:first-child { padding-left: 0; }
.kpi-combo-grid > div:last-child { border-left: 1px solid color-mix(in srgb, var(--ink) 18%, var(--line)); }
.kpi-combo-label { font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.kpi-combo-grid b { font-size: 30px; font-weight: 700; letter-spacing: -.03em;
                     font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.12; }
.kpi-combo-grid b.money { font-size: 21px; letter-spacing: -.02em; }
.kpi-combo-grid em { font-style: normal; font-size: 11px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }

/* Till Date Progress -- reuses the .filter-group card shell */
.tdp-group { flex: 1; border: none; box-shadow: none; }
.td-row { display: grid; grid-template-columns: .65fr 1.15fr 1.15fr 1.15fr .8fr; gap: 0; }
.td-row > .td-stat { padding: 0 16px; }
.td-row > .td-stat:first-child { padding-left: 0; }
.td-row > .td-stat:not(:first-child) { border-left: 1px solid var(--surface-border); }
@media (max-width: 900px) {
  .td-row { grid-template-columns: repeat(2, 1fr); }
  .td-row > .td-stat { padding-left: 0; border-left: none; }
}
@media (max-width: 520px) { .td-row { grid-template-columns: 1fr; } }
.td-stat { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.td-stat.td-split { min-width: 0; }
.td-stat .kpi-head { gap: 6px; }
.td-stat .kpi-ic { width: 22px; height: 22px; }
.td-stat .kpi-ic svg { width: 12px; height: 12px; }
.td-stat .kpi-label { font-size: 10px; }
.td-stat b { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.td-stat em { font-style: normal; font-size: 11px; font-weight: 500; color: var(--ink-2); }
.td-split-grid { display: flex; gap: 0; margin-top: 2px; }
.td-split-grid > div { flex: 1; min-width: 0; padding: 0 10px; display: flex; flex-direction: column; gap: 1px; }
.td-split-grid > div:first-child { padding-left: 0; }
.td-split-grid > div:last-child { border-left: 1px solid color-mix(in srgb, var(--ink) 18%, var(--line)); }
.td-split-label { font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.td-split-grid b { font-size: 16px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.td-split-grid b.money { font-size: 14.5px; }

/* Key Signal -- auto-generated pace insight, colored by severity */
.key-signal { display: flex; gap: 10px; padding: 12px;
              border-radius: 0; border: none; background: var(--page); }
.key-signal .signal-ic { width: 28px; height: 28px; }
.key-signal.bad  { background: color-mix(in srgb, var(--critical) 6%, var(--page)); }
.key-signal.warn { background: color-mix(in srgb, var(--warn) 6%, var(--page)); }
.key-signal.good { background: color-mix(in srgb, var(--good) 6%, var(--page)); }
.key-signal h3 { font-size: 15.5px; font-weight: 700; margin-bottom: 2px; }
.key-signal-sub { font-size: 11px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
.key-signal-body strong { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.key-signal-body p { font-size: 11px; font-weight: 500; color: var(--ink-2); margin: 2px 0; }
.key-signal-body b { font-variant-numeric: tabular-nums; }

/* delta badge */
.delta {
  display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 620;
  padding: 2px 7px; border-radius: 100px; font-variant-numeric: tabular-nums;
  white-space: nowrap; border: 1px solid transparent;
}
.delta.up   { color: var(--good-ink); background: color-mix(in srgb, var(--good) 13%, transparent);
              border-color: color-mix(in srgb, var(--good) 24%, transparent); }
.delta.down { color: var(--critical); background: color-mix(in srgb, var(--critical) 12%, transparent);
              border-color: color-mix(in srgb, var(--critical) 24%, transparent); }
.delta.flat { color: var(--ink-3); background: var(--line-2); border-color: var(--line); }

.pd-rank-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  font-size: 11px; font-weight: 900; line-height: 1; color: #fff;
  vertical-align: -3px;
}
.pd-rank-arrow.up   { background: var(--good); }
.pd-rank-arrow.down { background: var(--critical); }
.pd-rank-arrow.flat { background: var(--ink-3); }

/* ── target section ───────────────────────────────────────── */
.tgt-main .card-head h2 { font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.tgt-main .card-sub { font-size: 13.5px; color: var(--ink-2); margin-top: 3px; }

/* Legacy MIS intentionally follows the former Excel report exactly: dense
   rows, black grid, yellow/orange/blue grouped headers and zone subtotal bars. */
.legacy-mis-card { margin-top: 18px; border: 2px solid #000 !important; border-radius: 0; background: #fff; overflow: hidden; }
.legacy-mis-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 8px; background: #fff2cc; border-bottom: 2px solid #000; color: #000; }
.legacy-mis-head-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.legacy-mis-head h2 { margin: 0; font-size: 15px; line-height: 1.05; font-weight: 900; color: #000; }
.legacy-mis-head p { margin: 1px 0 0; font-size: 9px; line-height: 1.05; font-weight: 750; color: #000; }
.legacy-mis-badge { padding: 3px 7px; border: 1px solid #000; border-radius: 2px; background: #ffc000; color: #000; font-size: 9px; font-weight: 900; white-space: nowrap; }
.legacy-mis-filters { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.legacy-mis-filters label { display: inline-flex; align-items: center; gap: 3px; color: #000; font-size: 8px; font-weight: 900; white-space: nowrap; }
.legacy-mis-filters select { width: 86px; height: 22px; max-width: 125px; padding: 1px 17px 1px 4px; border: 1px solid #000; border-radius: 2px; background: #fff; color: #000; font-size: 8px; font-weight: 800; }
.legacy-mis-filters label:nth-child(4) select { width: 124px; }
.legacy-mis-scroll { position: relative; width: 100%; max-height: 500px; overflow: auto; border-bottom: 1px solid #000; scrollbar-color: #7f8c9f #eef2f7; }
.legacy-mis-table { width: max-content; min-width: 2220px; border-collapse: separate; border-spacing: 0; table-layout: fixed; color: #000; background: #fff; font-size: 12px; font-weight: 650; line-height: 1.2; }
.legacy-mis-table th, .legacy-mis-table td { box-sizing: border-box; height: 26px; padding: 3px 5px; border-right: 1px solid #000; border-bottom: 1px solid #000; text-align: center; vertical-align: middle; white-space: nowrap; }
.legacy-mis-table th { text-align: center; font-weight: 850; }
.legacy-mis-table thead th { position: sticky; z-index: 5; }
.legacy-mis-table .legacy-mis-head-one th { top: 0; height: 28px; }
.legacy-mis-table .legacy-mis-head-two th { top: 28px; height: 28px; }
.legacy-mis-table th.h-sm, .legacy-mis-table td:first-child { width: 195px; min-width: 195px; text-align: center; position: sticky; left: 0; z-index: 3; }
.legacy-mis-table th.h-sm { z-index: 8; }
.legacy-mis-table .legacy-mis-name { background: #fff; font-weight: 750; }
.legacy-mis-table .h-sm, .legacy-mis-table .h-login, .legacy-mis-table .h-ach, .legacy-mis-table .h-drr, .legacy-mis-table .h-rrr { background: #ffc000; }
.legacy-mis-table .h-target, .legacy-mis-table .h-golm { background: #00b0f0; }
.legacy-mis-table .h-disb, .legacy-mis-table .h-irr,
.legacy-mis-table .h-pf, .legacy-mis-table .h-fac,
.legacy-mis-table .h-cli, .legacy-mis-table .h-abnd,
.legacy-mis-table .h-twelve { color: #fff; }
.legacy-mis-table .h-disb, .legacy-mis-table .h-irr { background: #ed7d31; }
.legacy-mis-table .h-pf, .legacy-mis-table .h-fac { background: #70ad47; }
.legacy-mis-table .h-cli, .legacy-mis-table .h-abnd { background: #31859c; }
.legacy-mis-table .h-twelve { background: #7030a0; }
.legacy-mis-table .legacy-mis-head-two th.mc-blue { background: #ade8f4; }
.legacy-mis-table .legacy-mis-head-two th.mc-yellow { background: #ffff00; }
.legacy-mis-table .legacy-mis-head-two th.mc-orange { background: #f8cbad; }
.legacy-mis-table .legacy-mis-head-two th.mc-green { background: #c6e0b4; }
.legacy-mis-table .legacy-mis-head-two th.mc-teal { background: #b7dee8; }
.legacy-mis-table .legacy-mis-head-two th.mc-purple { background: #e0d0f0; }
.legacy-mis-table .legacy-mis-head-two th.mc-gold { background: #ffc000; }
/* Anmol, 22-09-2026: "which box I place my mouse that cell up down left
   right should highlight" -- a spreadsheet-style row/column crosshair.
   inset box-shadow layers a tint on top of each cell's own background
   (CLI good/bad, growth pos/neg, zone/grand-total rows) instead of
   fighting their !important background-color. */
.legacy-mis-table tbody tr:hover td, .legacy-mis-table tbody tr:hover th,
.legacy-mis-table td.mis-col-hover, .legacy-mis-table th.mis-col-hover {
  /* No position/transform here on purpose: this rule also matches sticky
     header cells and the sticky first column, and position:relative or a
     transform on a position:sticky element breaks its sticky pinning --
     that's exactly what caused the header to detach and double-render in
     the wrong place. The glow comes from box-shadow alone, which works
     fine on sticky elements without touching their positioning. */
  box-shadow: inset 0 0 0 9999px rgba(59, 130, 246, .22),
              0 0 0 1px rgba(37, 99, 235, .55),
              0 3px 10px 1px rgba(37, 99, 235, .55);
  transition: box-shadow 80ms ease-out;
}
.legacy-mis-table tbody tr:hover td.mis-col-hover, .legacy-mis-table tbody tr:hover th.mis-col-hover {
  box-shadow: inset 0 0 0 9999px rgba(37, 99, 235, .34),
              0 0 0 1px rgba(29, 78, 216, .8),
              0 4px 14px 2px rgba(37, 99, 235, .7);
}
.legacy-mis-table tbody tr.legacy-mis-detail td { background: #fff; }
.legacy-mis-table tbody tr.legacy-mis-executive td { background: #f7f7f7; color: #222; font-size: 12px; }
.legacy-mis-table tbody tr.legacy-mis-executive td:first-child { padding-left: 12px; text-align: left; }
.legacy-mis-table tbody tr.legacy-mis-zone-karnataka td { background: #ffc000; font-weight: 900; }
.legacy-mis-table tbody tr.legacy-mis-zone td { background: #ed7d31; font-weight: 900; }
.legacy-mis-table tbody tr.legacy-mis-state-total td { background: #ed7d31; font-weight: 900; border-top: 2px solid #000; }
.legacy-mis-table tbody tr.legacy-mis-grand-total td { background: #ffff00; font-weight: 950; border-top: 2px solid #000; }
.legacy-mis-table td.legacy-mis-cli-good { background: #e2f0d9 !important; font-weight: 900; }
.legacy-mis-table td.legacy-mis-cli-bad { background: #f4cccc !important; color: #9c0006; font-weight: 900; }
.legacy-mis-table td.legacy-mis-growth-pos { background: #00b050 !important; color: #fff; font-weight: 900; text-shadow: 0 1px 1px rgba(0,0,0,.35); }
.legacy-mis-table td.legacy-mis-growth-neg { background: #ff0000 !important; color: #fff; font-weight: 900; text-shadow: 0 1px 1px rgba(0,0,0,.35); }
.legacy-mis-note { margin: 0; padding: 4px 8px 5px; color: #000; background: #fff; font-size: 8.5px; line-height: 1.05; font-weight: 700; }
@media (max-width: 800px) { .legacy-mis-head { align-items: flex-start; flex-direction: column; } .legacy-mis-head-right { width: 100%; justify-content: flex-start; flex-wrap: wrap; } .legacy-mis-filters { flex-wrap: wrap; } .legacy-mis-filters select { max-width: 112px; } }

.tgt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
@media (max-width: 760px) { .tgt-grid { grid-template-columns: 1fr; } }
.tgt-block { background: var(--page); border: 1px solid var(--line);
             border-radius: var(--r-sm); padding: 14px 16px; }
.tgt-label { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase;
             color: var(--ink-3); font-weight: 640; }
.tgt-num { font-size: 26px; font-weight: 660; letter-spacing: -.025em; margin: 6px 0 10px;
           font-variant-numeric: tabular-nums; }
.tgt-num em { font-style: normal; font-size: 15px; font-weight: 500; color: var(--ink-3); }
.tgt-foot { font-size: 12px; color: var(--ink-3); margin-top: 8px;
            font-variant-numeric: tabular-nums; }
.prog { height: 8px; border-radius: 100px; background: var(--line-2); overflow: hidden; }
.prog i { display: block; height: 100%; border-radius: 100px; background: var(--mtd);
          transition: width .7s var(--ease); }
.prog i.good { background: var(--good); }
.prog i.warn { background: var(--warn); }
.prog i.bad  { background: var(--critical); }

.rate-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
  background: var(--page); border: 1.5px solid var(--surface-border); border-radius: var(--r-sm); overflow: hidden;
}
.rate:not(:nth-child(4n+1)) { border-left: 1px solid var(--surface-border); }
@media (max-width: 860px) {
  .rate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rate:not(:nth-child(4n+1)) { border-left: none; }
  .rate:nth-child(2n) { border-left: 1px solid var(--surface-border); }
}
.rate { background: transparent; border: none; border-radius: 0;
        padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.rate span { font-size: 11px; color: var(--ink-3); }
.rate b { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }
.rate b.bad { color: var(--critical); }
.rate b.good { color: var(--good-ink); }

/* ── quality section ──────────────────────────────────────── */
.q-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
@media (max-width: 760px) { .q-grid { grid-template-columns: 1fr; } }
.q-card { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 16px;
          background: var(--page); }
.q-card.ok  { border-color: color-mix(in srgb, var(--good) 38%, var(--line)); }
.q-card.bad { border-color: color-mix(in srgb, var(--critical) 42%, var(--line)); }
.q-label { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase;
           color: var(--ink-3); font-weight: 640; }
.q-val { font-size: 34px; font-weight: 670; letter-spacing: -.03em; margin: 4px 0 2px;
         font-variant-numeric: tabular-nums; }
.q-card.bad .q-val { color: var(--critical); }
.q-card.ok .q-val  { color: var(--good-ink); }
.q-min { font-size: 11.5px; color: var(--ink-3); }
.q-foot { font-size: 12px; color: var(--ink-2); margin-top: 10px;
          display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── charts ───────────────────────────────────────────────── */
.chart-wrap { position: relative; }
.chart-wrap svg { width: 100%; height: 250px; display: block; overflow: visible; }
.chart-wrap.tall svg { height: 300px; }
#trendChart { cursor: pointer; }
.axis text { font-size: 10.5px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.gridline { stroke: var(--grid); stroke-width: 1; }
.baseline { stroke: var(--base); stroke-width: 1; }
.ln { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ln-mtd  { stroke: var(--mtd); }
.ln-lmtd { stroke: var(--lmtd); stroke-dasharray: 5 4; }
.area-mtd { fill: var(--mtd); opacity: .09; }
.bar { transition: opacity .16s; }
.bar-mtd { fill: var(--mtd); }
.bar-lmtd { fill: var(--lmtd); }
.bar-base { fill: var(--base); }
.chart-wrap:hover .bar { opacity: .4; }
.chart-wrap:hover .bar.hot { opacity: 1; }
.grow-y { transform-box: fill-box; transform-origin: bottom;
          animation: growY .6s var(--ease) backwards; }
@keyframes growY { from { transform: scaleY(0); } }

.tip {
  position: absolute; pointer-events: none; z-index: 20;
  background: var(--raise); border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 11px; font-size: 12px; box-shadow: var(--shadow-lift); min-width: 150px;
}
.tip b { display: block; font-size: 10.5px; color: var(--ink-3); font-weight: 620;
         letter-spacing: .05em; text-transform: uppercase; margin-bottom: 5px; }
.tip-row { display: flex; justify-content: space-between; gap: 10px;
           font-variant-numeric: tabular-nums; }
.tip-row span { color: var(--ink-2); }
.tip-hint { margin-top: 6px; padding-top: 5px; border-top: 1px solid var(--line-2);
            font-size: 10.5px; color: var(--ink-3); }
.sw { width: 10px; height: 3px; border-radius: 2px; display: inline-block; margin-right: 5px; }
.sw-mtd { background: var(--mtd); }
.sw-lmtd { background: var(--lmtd); }

/* ── movers ───────────────────────────────────────────────── */
#moversBox { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mv-col h3 { font-size: 11px; letter-spacing: .07em; text-transform: uppercase;
             color: var(--ink-3); margin-bottom: 6px; }
.mv-list { list-style: none; margin: 0; padding: 0; display: flex;
           flex-direction: column; gap: 2px; }
.mover {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font: inherit; font-size: 13px; color: var(--ink); background: none; border: 0;
  padding: 7px 9px; border-radius: 6px; cursor: pointer; text-align: left;
}
.mover:hover { background: var(--line-2); }
.mv-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-num { font-weight: 650; font-variant-numeric: tabular-nums; }
.mv-num.pos { color: var(--good-ink); }
.mv-num.neg { color: var(--critical); }

/* ── tables ───────────────────────────────────────────────── */
.table-scroll { overflow-x: auto; margin: 0 calc(var(--pad) * -1) calc(var(--pad) * -1);
                padding: 0 var(--pad) 2px; }
table.perf { width: 100%; border-collapse: collapse; font-size: 13px; }
table.perf th, table.perf td { padding: 8px 10px; white-space: nowrap; }
table.perf th {
  position: sticky; top: 0; z-index: 2; background: var(--surface); text-align: right;
  font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 640; border-bottom: 1px solid var(--line);
}
table.perf th:nth-child(2), table.perf td:nth-child(2) { text-align: left; }
table.perf td { border-bottom: 1px solid var(--line-2); font-variant-numeric: tabular-nums;
                text-align: right; color: var(--ink-2); }
table.perf td.name { color: var(--ink); font-weight: 560; }
table.perf td.idx { color: var(--ink-3); font-size: 12px; width: 34px; }
table.perf td.go { color: var(--ink-3); font-size: 15px; width: 26px; }
table.perf tbody tr { transition: background .14s; }
table.perf tbody tr.drill { cursor: pointer; transition: background-color 120ms ease; }
table.perf tbody tr.drill:hover { background: color-mix(in srgb, var(--mtd) 7%, transparent); }
table.perf tbody tr.drill:hover td.go { color: var(--mtd); }
table.perf tfoot td { border-top: 1px solid var(--line); border-bottom: 0;
                      font-weight: 650; color: var(--ink); padding-top: 10px; }

.mini-tag {
  font-size: 9.5px; font-weight: 640; padding: 1px 6px; border-radius: 100px;
  margin-left: 5px; color: var(--mtd);
  background: color-mix(in srgb, var(--mtd) 13%, transparent); white-space: nowrap;
}
.mini-tag.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 15%, transparent); cursor: help; }
.contrib { font-size: 11px; font-weight: 650; padding: 2px 7px; border-radius: 100px; }
.contrib.pos { color: var(--good-ink); background: color-mix(in srgb, var(--good) 13%, transparent); }
.contrib.neg { color: var(--critical); background: color-mix(in srgb, var(--critical) 12%, transparent); }

/* Target Miss report (targetMissReportCard / targetMissModel) --
   this is a second, independently-written implementation of Anmol's own
   detailed spec that already existed complete in this file except for
   its CSS and click wiring (both added here). Colors use the app's
   existing tokens (--critical/--warn/--good/--mtd/--ink*) instead of the
   spec's raw hex values, so dark mode keeps working automatically. */
.target-miss-report { border: 1px solid #6987ad; border-radius: var(--r); background: #f5f8ff; overflow: hidden; box-shadow: 0 10px 26px rgba(12, 46, 89, .12); }
.tm-unavailable { padding: 16px 18px; }
.tm-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 16px 18px; background: #0b2e59; border-bottom: 4px solid #f59e0b; color: #fff; }
.tm-header h2 { margin: 0 0 2px; font-size: 20px; font-weight: 800; color: #fff; }
.tm-header p { margin: 0; font-size: 12px; color: rgba(255,255,255,.8); }
.tm-heading-icon { display: inline-flex; width: 27px; height: 27px; align-items: center; justify-content: center; margin-right: 8px; border-radius: 50%; background: #f59e0b; color: #1f2937; vertical-align: -4px; }
.tm-heading-icon .attention-icon { width: 16px; height: 16px; }
.tm-alert-badge { display: inline-block; margin-left: 8px; padding: 3px 8px; border-radius: 999px; background: #fbbf24; color: #261700; font-size: 10px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; vertical-align: 3px; }
.tm-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tm-controls label { display: flex; flex-direction: column; gap: 2px; font-size: 10.5px; color: rgba(255,255,255,.78); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.tm-controls select { font: inherit; font-size: 12.5px; padding: 6px 8px; border: 1px solid rgba(255,255,255,.45); border-radius: var(--r-sm); background: #fff; color: #0f1f3d; }
.tm-export { display: flex; align-items: center; gap: 6px; align-self: flex-end; padding: 7px 14px; border: 0; border-radius: var(--r-sm); background: #2563eb; color: #fff; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.tm-export:hover { background: color-mix(in srgb, var(--mtd) 85%, black); }
.tm-export .attention-icon { width: 14px; height: 14px; }

.tm-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.tm-card { border: 1px solid #96acc8; border-radius: var(--r-sm); background: #f8fbff; padding: 14px; }
.tm-summary { border: 2px solid #31577f; }
.tm-card h3 { margin: 0 0 8px; font-size: 15px; font-weight: 800; color: #071b35; }
.tm-section-icon { width: 17px; height: 17px; margin-right: 7px; color: #b45309; vertical-align: -3px; }
.tm-card > p { margin: 0 0 8px; font-size: 11.5px; color: var(--ink-3); }

.tm-chart { width: 100%; height: auto; display: block; margin-top: 4px; }
.tm-chart-axis text { font-size: 9.5px; fill: var(--ink-3); }
.tm-chart-line { fill: none; stroke: var(--critical); stroke-width: 2; }
.tm-chart-marks circle { fill: var(--critical); }
.tm-chart-marks text { font-size: 10px; fill: var(--ink-3); }
.tm-chart-value { font-weight: 700; fill: var(--critical) !important; }

.tm-table-scroll { overflow-x: auto; border: 3px solid #000; border-radius: var(--r-sm); background: #fff; }
.tm-state-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.tm-detail-table, .tm-month-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.tm-state-table th, .tm-detail-table th, .tm-month-table th { text-align: left; padding: 7px 10px; background: #dfeeff; color: #061a33; font-size: 10.5px; font-weight: 800; border-bottom: 1px solid #8ba6c8; white-space: nowrap; }
.tm-state-table th { font-size: 13px; padding: 10px !important; }
.tm-state-table td, .tm-detail-table td, .tm-month-table td { padding: 7px 10px; border-bottom: 1px solid #b7c8dc; color: #050505; font-weight: 700; }
.tm-state-table td { font-weight: 800; }
.tm-state-table th:nth-child(n+2), .tm-state-table td:nth-child(n+2),
.tm-detail-table th:nth-child(n+2), .tm-detail-table td:nth-child(n+2),
.tm-month-table th:nth-child(n+2), .tm-month-table td:nth-child(n+2) { text-align: right; font-variant-numeric: tabular-nums; }
.tm-state-table th:last-child, .tm-state-table td:last-child,
.tm-detail-table th:last-child, .tm-detail-table td:last-child { text-align: left; }
.tm-state-table th, .tm-state-table td { text-align: center !important; }
.tm-state-table th:first-child, .tm-state-table td:first-child { text-align: left !important; }
.tm-state-table td:nth-child(1) { background: #fff; }
.tm-state-table td:nth-child(2) { background: #fff; }
.tm-state-table td:nth-child(3) { background: #fff; }
.tm-state-table td:nth-child(4) { background: #fff; }
.tm-state-table td:nth-child(5) { background: #fff; }
.tm-state-table td:nth-child(6) { background: #fff; }
.tm-state-table th { background: #fff; color: #061a33; }
.tm-state-table th, .tm-state-table td { border-right: 1.5px solid #000 !important; }
.tm-state-table th:last-child, .tm-state-table td:last-child { border-right: 0; }
.tm-state-table th, .tm-state-table td, .tm-performance-table th, .tm-performance-table td { border-bottom: 1.5px solid #000 !important; }
.tm-performance-table th, .tm-performance-table td { border-right: 1.5px solid #000 !important; }
.tm-performance-table th:last-child, .tm-performance-table td:last-child { border-right: 0; }
.tm-detail-table tbody th, .tm-detail-table tbody td { background: #fff !important; }
.tm-state-row.tm-rsm-karnataka .tm-state-toggle { color: #050505; }
.tm-state-row.tm-rsm-kirubaharan .tm-state-toggle { color: #050505; }
.tm-state-row.tm-rsm-perla .tm-state-toggle { color: #050505; }
.tm-sm-details.tm-rsm-karnataka .tm-detail-table tbody th:first-child { background: #fff !important; color: #050505; }
.tm-sm-details.tm-rsm-kirubaharan .tm-detail-table tbody th:first-child { background: #fff !important; color: #050505; }
.tm-sm-details.tm-rsm-perla .tm-detail-table tbody th:first-child { background: #fff !important; color: #050505; }
.tm-performance-drill.tm-rsm-karnataka .pd-table tbody .pd-name { background: #fff !important; color: #050505; }
.tm-performance-drill.tm-rsm-kirubaharan .pd-table tbody .pd-name { background: #fff !important; color: #050505; }
.tm-performance-drill.tm-rsm-perla .pd-table tbody .pd-name { background: #fff !important; color: #050505; }
.tm-performance-drill { padding: 14px; }
.tm-performance-drill > h3 { margin-bottom: 12px; }
.tm-drill-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 0 0 12px; color: #526177; font-size: 12.5px; font-weight: 800; }
.tm-drill-crumbs button, .tm-drill-crumbs strong { border: 0; border-radius: 999px; padding: 6px 12px; font: inherit; }
.tm-drill-crumbs button { background: #e8f0ff; color: #1d5fd2; cursor: pointer; }
.tm-drill-crumbs button:hover { background: #d8e6ff; }
.tm-drill-crumbs strong { background: #2563eb; color: #fff; }
.tm-performance-scroll { border: 3px solid #000; border-radius: var(--r-sm); }
.tm-performance-scroll { max-height: none !important; overflow-y: visible !important; }
.tm-performance-table { width: 100%; min-width: 980px; table-layout: auto; }
.tm-performance-table th, .tm-performance-table td { text-align: center; vertical-align: middle; }
table.tm-performance-table tbody th { text-align: left !important; font-weight: 800 !important; color: #050505; }
.tm-performance-table thead th { background: #fff !important; color: #071b35; font-size: 10.5px !important; padding: 7px 10px !important; }
.tm-performance-table tbody th, .tm-performance-table tbody td { font-size: 11.5px !important; padding: 7px 10px !important; }
.tm-performance-table td { font-weight: 800; color: #050505; }
.tm-performance-table [data-tm-drill-rsm], .tm-performance-table [data-tm-drill-state] { cursor: pointer; }
.tm-performance-table [data-tm-drill-rsm]:hover > *, .tm-performance-table [data-tm-drill-state]:hover > * { filter: brightness(.97); }
.tm-drill-arrow { display: inline-block; margin-right: 10px; color: #1d5fd2; font-size: 18px; line-height: 1; }
.tm-drill-total > * { background: #dcecff !important; border-top: 2px solid #75a7e8 !important; font-weight: 900; }
/* Anmol, 21-09-2026: "MAKE TEXT SIZE BIG" -- the Company total row specifically. */
.tm-company-row > * { font-size: 13px !important; padding: 10px !important; }

.tm-view-btn { border: 1px solid #2563eb; border-radius: var(--r-sm); background: #fff; color: #2563eb; padding: 3px 10px; font: inherit; font-size: 10.5px; font-weight: 700; cursor: pointer; }
.tm-view-btn:hover { background: color-mix(in srgb, #2563eb 10%, transparent); }
.tm-view-btn.high { border-color: #b91c2d; color: #b91c2d; }
.tm-view-btn.watch { border-color: #c05d00; color: #c05d00; }
.tm-rate, .tm-reason { padding: 0; background: transparent !important; }
.tm-rate.high, .tm-reason.high, .tm-rate.watch, .tm-reason.watch, .tm-rate.good, .tm-reason.good { color: #050505; }
.tm-gap { font-weight: 700; }
.tm-cur-proj { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; font-weight: 800; }
td.tm-cur-proj-cell.alert { background: #ffebce !important; }
.tm-proj { display: inline-flex; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 800; color: var(--ink-3); }
.tm-proj.high { color: #b91c2d; }
.tm-proj.watch { color: #c05d00; }
.tm-proj.good { color: #0a7b38; }
.tm-cell-icon { width: 12px; height: 12px; vertical-align: -2px; margin-right: 4px; }
.tm-icon-high { color: #b91c2d; }
.tm-icon-watch { color: #c05d00; }
.tm-icon-action { color: #1d5fd2; }

.tm-state-toggle { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; font: inherit; font-weight: 800; color: #050505; cursor: pointer; padding: 0; }
.tm-state-row.high > * { background: #ffd9df !important; }
.tm-state-row.watch > * { background: #ffebce !important; }
.tm-state-row.good > * { background: #d9f4df !important; }
.tm-drill-row.high > * { background: #ffd9df !important; }
.tm-drill-row.watch > * { background: #ffebce !important; }
.tm-drill-row.good > * { background: #d9f4df !important; }
.tm-sm-risk-row.high > * { background: #ffd9df !important; }
.tm-sm-risk-row.watch > * { background: #ffebce !important; }
.tm-sm-risk-row.good > * { background: #d9f4df !important; }
.tm-sm-risk-row.high.tm-new-row > *, .tm-sm-risk-row.watch.tm-new-row > *, .tm-sm-risk-row.good.tm-new-row > * { background: #fff !important; color: #050505 !important; }
/* Anmol, 21-09-2026: "NOT THIS GLOW" -- replaced with the same subtle dim
   the RSM/State drill rows already used, applied everywhere for consistency. */
.tm-state-row:hover > *, .tm-drill-row:hover > *, .tm-sm-risk-row:hover > * { filter: brightness(.96) !important; }
.tm-state-row, .tm-drill-row, .tm-sm-risk-row { cursor: pointer; }
.tm-chevron { display: inline-block; width: 14px; }
.tm-chevron.collapsed { transform: rotate(-90deg); }
.tm-rate { display: inline-block; padding: 3px 10px; border-radius: 100px; font-weight: 800; font-size: 12.5px; }
.tm-rate.high { color: #c81e32; background: #ffd9df; }
.tm-rate.watch { color: #c05d00; background: #ffebce; font-weight: 800; }
.tm-rate.good { color: #0a7b38; background: #d9f4df; }
.tm-reason { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.tm-reason.high { color: #b91c2d; background: #ffdce2; }
.tm-reason.watch { color: #c05d00; background: #ffedd1; }
.tm-reason.good { color: #087236; background: #d9f4df; }
.tm-state-row.high .tm-rate, .tm-state-row.watch .tm-rate, .tm-state-row.good .tm-rate { }
.tm-action { padding: 5px 11px; border: 1px solid #155eef; border-radius: var(--r-sm); background: #155eef; color: #fff; font-weight: 800; font-size: 11px; cursor: pointer; }
.tm-action:hover { background: #0b4aca; border-color: #0b4aca; }
.tm-action.small { padding: 3px 8px; font-size: 10.5px; }
.tm-action:focus-visible, .tm-state-toggle:focus-visible, .tm-controls select:focus-visible, .tm-export:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.tm-summary .tm-action:focus-visible, .tm-summary .tm-state-toggle:focus-visible { outline-color: var(--mtd); }

.tm-details-row > td { padding: 0; border-bottom: 1px solid var(--surface-border); background: var(--surface); }
.tm-sm-details { margin: 10px 12px 12px 30px; padding: 10px 12px; background: var(--page); border: 1px solid var(--surface-border); border-radius: var(--r-sm); }
.tm-sm-details h3 { margin: 0 0 8px; font-size: 12.5px; font-weight: 700; color: var(--critical); }
.tm-empty { text-align: center; color: var(--ink-3); font-size: 12px; padding: 14px !important; }

.tm-inspector { display: flex; flex-direction: column; gap: 12px; }
.tm-inspector > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tm-inspector > header h3 { margin: 0; font-size: 15px; font-weight: 800; }
.tm-inspector > header p { margin: 3px 0 0; font-size: 11.5px; color: var(--ink-3); }
.tm-risk { padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 700; color: #fff; flex: none; }
.tm-risk.high { background: #b45309; }
.tm-risk.watch { background: var(--warn); }
.tm-risk.good { background: #1e4f82; }
.tm-inspector h4 { margin: 0 0 6px; font-size: 12px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .02em; }
.tm-reasons { margin: 0; padding-left: 16px; }
.tm-reasons li { color: var(--critical); font-size: 12px; line-height: 1.5; margin-bottom: 3px; }
.tm-team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; margin-bottom: 8px; }
.tm-team > div { padding: 8px 4px; background: var(--page); border: 1px solid var(--surface-border); border-radius: var(--r-sm); }
.tm-team > div span { display: block; font-size: 10.5px; color: var(--ink-3); margin-bottom: 3px; }
.tm-team > div b { font-size: 17px; font-weight: 800; }
.tm-team b.bad { color: var(--critical); }
.tm-warning { display: flex; align-items: flex-start; gap: 8px; padding: 9px 10px; background: color-mix(in srgb, var(--critical) 8%, transparent); border: 1px solid color-mix(in srgb, var(--critical) 30%, transparent); border-radius: var(--r-sm); font-size: 11.5px; color: var(--critical); font-weight: 600; }
.tm-warning.neutral { background: var(--page); border-color: var(--surface-border); color: var(--ink-3); font-weight: 500; }
.tm-warning .attention-icon { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--critical); }
.tm-modal-backdrop { position: fixed; inset: 0; z-index: 110; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(15, 23, 42, .44); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.tm-modal { width: min(620px, 94vw); max-height: min(760px, calc(100vh - 40px)); overflow: auto; background: var(--surface); box-shadow: 0 20px 60px rgba(0,0,0,.34); }
.tm-modal-actions { display: flex; align-items: center; gap: 8px; }
.tm-modal-close { width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--page); color: var(--ink-2); font-size: 20px; line-height: 1; cursor: pointer; }
.tm-modal-close:hover { background: var(--line-2); }
.tm-modal-close:focus-visible { outline: 2px solid var(--mtd); outline-offset: 2px; }
@media (max-width: 600px) { .tm-modal-backdrop { padding: 12px; } .tm-modal { width: 100%; max-height: calc(100vh - 24px); } }

/* Target Miss View: one insight-led modal for Company, State, RSM/ASM and SM. */
.tm-insight-backdrop { padding: 28px; background: rgba(15, 23, 42, .46); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); }
.tm-insight-modal {
  width: min(1220px, 96vw); max-height: min(920px, calc(100vh - 40px)); overflow: auto;
  box-sizing: border-box; padding: 26px; color: #0f172a; background: #fff;
  border-radius: 20px; box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  animation: tm-insight-in 180ms cubic-bezier(.22, 1, .36, 1) both;
  scrollbar-color: #94a3b8 #f1f5f9; scrollbar-width: thin;
}
@keyframes tm-insight-in {
  from { opacity: .72; transform: translateY(14px) scale(.985); filter: blur(3px); box-shadow: 0 8px 24px rgba(15, 23, 42, .16); }
}
.tm-insight-modal::-webkit-scrollbar { width: 10px; }
.tm-insight-modal::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 10px; }
.tm-insight-modal::-webkit-scrollbar-thumb { background: #94a3b8; border: 2px solid #f1f5f9; border-radius: 10px; }
.tm-insight-head { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; align-items: center; gap: 20px; margin-bottom: 22px; }
.tm-insight-avatar {
  display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%;
  color: #0f3d91; background: #fee2e7; font-size: 28px; font-weight: 900; letter-spacing: -.03em;
}
.tm-insight-identity { min-width: 0; }
.tm-insight-identity h3 { margin: 0 0 5px; color: #0f172a; font-size: 30px; line-height: 1.12; font-weight: 850; letter-spacing: -.025em; }
.tm-insight-identity p { margin: 0 0 8px; color: #475569; font-size: 14px; line-height: 1.45; }
.tm-insight-identity p i, .tm-insight-identity > span i { display: inline-block; height: 16px; margin: 0 10px; border-left: 1px solid #94a3b8; vertical-align: -3px; }
.tm-insight-identity > span { display: flex; align-items: center; flex-wrap: wrap; color: #475569; font-size: 13px; }
.tm-insight-identity > span .attention-icon { width: 18px; height: 18px; margin-right: 7px; color: #4169a1; }
.tm-insight-identity > span b { color: #0f172a; }
.tm-insight-head-actions { display: flex; align-items: center; align-self: start; gap: 14px; }
.tm-insight-risk {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 15px; border-radius: 12px;
  font-size: 14px; font-weight: 850; white-space: nowrap;
}
.tm-insight-risk .attention-icon { width: 21px; height: 21px; }
.tm-insight-risk.high { color: #b91c1c; background: #fee2e2; }
.tm-insight-risk.watch { color: #a84c00; background: #fff3d6; }
.tm-insight-risk.good { color: #13703b; background: #dcfce7; }
.tm-insight-close.tm-modal-close {
  width: 42px; height: 42px; color: #0f3d91; background: #f8fafc; border: 1px solid #e2e8f0;
  font-size: 27px; font-weight: 400;
}
.tm-insight-close.tm-modal-close:hover { color: #fff; background: #0f3d91; border-color: #0f3d91; }
.tm-insight-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.tm-insight-kpis article {
  position: relative; min-height: 132px; padding: 18px 18px 16px 58px; overflow: hidden;
  border: 1px solid #dbeafe; border-radius: 14px; background: #f8fbff;
}
.tm-insight-kpis article.achievement { background: #fff5f6; border-color: #fecaca; }
.tm-insight-kpis article.rank { background: #f0fdf8; border-color: #bbf7d0; }
.tm-insight-kpis article.gap { background: #eff6ff; border-color: #bfdbfe; }
.tm-insight-kpis article.top { background: #fffbeb; border-color: #fde68a; }
.tm-insight-kpis article > .attention-icon { position: absolute; left: 18px; top: 20px; width: 28px; height: 28px; color: #2563eb; }
.tm-insight-kpis article.achievement > .attention-icon { color: #dc2626; }
.tm-insight-kpis article.rank > .attention-icon { color: #16a34a; }
.tm-insight-kpis article.top > .attention-icon { color: #d97706; }
.tm-insight-kpis article > span { display: block; margin-bottom: 10px; color: #0f172a; font-size: 13px; font-weight: 800; }
.tm-insight-kpis article > b { display: block; color: #0f172a; font-size: 27px; line-height: 1.05; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.tm-insight-kpis article.achievement > b, .tm-insight-kpis article.gap > b { color: #c91d2e; }
.tm-insight-kpis article > small { display: block; margin-top: 7px; color: #475569; font-size: 11.5px; line-height: 1.35; }
.tm-insight-kpis article > em { position: absolute; right: 14px; bottom: 14px; padding: 5px 8px; border-radius: 8px; font-size: 11px; font-style: normal; font-weight: 850; }
.tm-insight-kpis article > em.bad { color: #b91c1c; background: #fee2e2; }
.tm-insight-kpis article > em.good { color: #13703b; background: #dcfce7; }
.tm-insight-kpis article.top > strong { display: inline-block; max-width: calc(100% - 64px); margin-right: 8px; color: #0f172a; font-size: 16px; line-height: 1.25; }
.tm-insight-kpis article.top > b { display: inline; color: #15803d; font-size: 18px; }
.tm-insight-kpis article.top > b.watch { color: #c05d00; }
.tm-insight-kpis article.top > b.high { color: #c81e32; }
.tm-insight-top-list { display: grid; gap: 4px; }
.tm-insight-top-list span { display: flex; justify-content: space-between; gap: 8px; color: #64748b; font-size: 10.5px; }
.tm-insight-top-list b { color: #0f172a; font-size: 11px; text-align: right; }
.tm-insight-main { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.tm-insight-panel { min-width: 0; overflow: hidden; border: 1px solid #dbeafe; border-radius: 14px; background: #fff; }
.tm-insight-panel h4, .tm-insight-insights > h4 {
  display: flex; align-items: center; gap: 9px; margin: 0; padding: 13px 16px;
  color: #0f172a; background: #f4f8ff; border-bottom: 1px solid #dbeafe; font-size: 15px; font-weight: 850;
}
.tm-insight-panel h4 .attention-icon, .tm-insight-insights > h4 .attention-icon { width: 22px; height: 22px; color: #2563eb; }
.tm-insight-panel h4 span { margin-left: auto; color: #64748b; font-size: 11px; font-weight: 650; }
.tm-insight-chart { display: block; width: 100%; height: 224px; padding: 8px 12px 0; overflow: visible; }
.tm-insight-chart text { fill: #475569; font: 11px Inter, "Segoe UI", system-ui, sans-serif; }
.tm-insight-chart .tm-insight-chart-value { fill: #0f172a; font-size: 13px; font-weight: 850; }
.tm-insight-chart-grid line { stroke: #e2e8f0; stroke-width: 1; }
.tm-insight-chart > path { fill: none; stroke: #6884ad; stroke-width: 2; stroke-dasharray: 6 5; }
.tm-insight-chart rect { fill: #cbd5e1; }
.tm-insight-chart rect.current { fill: #ef4444; }
.tm-insight-chart circle { fill: #fff; stroke: #536f9a; stroke-width: 2.5; }
.tm-insight-bars { display: grid; gap: 17px; padding: 24px 20px 16px; }
.tm-insight-bar-row { display: grid; grid-template-columns: minmax(120px, .8fr) minmax(150px, 1.7fr) 58px; align-items: center; gap: 10px; }
.tm-insight-bar-row > span { overflow: hidden; color: #0f172a; font-size: 12px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.tm-insight-bar-row > div { height: 18px; overflow: hidden; background: #e8edf5; border-radius: 5px; }
.tm-insight-bar-row i { display: block; height: 100%; background: #2563eb; border-radius: 5px 0 0 5px; }
.tm-insight-bar-row i.good { background: #22c55e; }
.tm-insight-bar-row i.high { background: #ef4444; }
.tm-insight-bar-row i.watch { background: #f59e0b; }
.tm-insight-bar-row > b { color: #0f172a; font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.tm-insight-interpretation { display: flex; align-items: flex-start; gap: 10px; margin: 4px 20px 18px; padding: 12px 14px; color: #244466; background: #eff6ff; border: 1px solid #dbeafe; border-radius: 10px; font-size: 12px; line-height: 1.45; }
.tm-insight-interpretation .attention-icon { width: 22px; height: 22px; flex: none; color: #2563eb; }
.tm-insight-insights { margin-bottom: 18px; overflow: hidden; border: 1px solid #dbeafe; border-radius: 14px; }
.tm-insight-insights > div { display: grid; grid-template-columns: repeat(3, 1fr); }
.tm-insight-insights article { display: grid; grid-template-columns: 42px 1fr; align-items: start; gap: 10px; padding: 17px; }
.tm-insight-insights article + article { border-left: 1px solid #e2e8f0; }
.tm-insight-insights article > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; }
.tm-insight-insights article > span .attention-icon { width: 24px; height: 24px; }
.tm-insight-insights .strength > span { color: #15803d; background: #dcfce7; }
.tm-insight-insights .concern > span { color: #dc2626; background: #fee2e2; }
.tm-insight-insights .opportunity > span { color: #1d4ed8; background: #dbeafe; }
.tm-insight-insights p { margin: 0; color: #475569; font-size: 12px; line-height: 1.45; }
.tm-insight-insights p b { display: block; margin-bottom: 4px; color: #0f172a; font-size: 13px; }
.tm-insight-insights .strength p b { color: #15803d; }
.tm-insight-insights .concern p b { color: #c91d2e; }
.tm-insight-insights .opportunity p b { color: #1d4ed8; }
.tm-insight-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 16px; }
.tm-insight-footer > div { display: flex; align-items: center; gap: 13px; padding: 14px 17px; color: #7c4a03; background: #fffbeb; border: 1px solid #fde68a; border-radius: 14px; }
.tm-insight-footer > div > .attention-icon { width: 28px; height: 28px; flex: none; color: #d97706; }
.tm-insight-footer p { margin: 0; max-width: 75ch; font-size: 12px; line-height: 1.45; }
.tm-insight-footer p b { display: block; margin-bottom: 3px; color: #0f172a; font-size: 13px; }
.tm-insight-footer > button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 230px; padding: 0 22px;
  color: #fff; background: #0f3d91; border: 0; border-radius: 12px; font: inherit; font-size: 13px; font-weight: 850; cursor: pointer;
}
.tm-insight-footer > button:hover { background: #0b2e71; }
.tm-insight-footer > button .attention-icon { width: 18px; height: 18px; }
.tm-insight-empty { margin: 0; padding: 28px; color: #64748b; text-align: center; }
@media (max-width: 980px) {
  .tm-insight-modal { padding: 20px; }
  .tm-insight-kpis { grid-template-columns: repeat(2, 1fr); }
  .tm-insight-main { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .tm-insight-backdrop { padding: 10px; }
  .tm-insight-modal { width: 100%; max-height: calc(100vh - 20px); padding: 16px; border-radius: 16px; }
  .tm-insight-head { grid-template-columns: 58px minmax(0, 1fr) auto; gap: 12px; }
  .tm-insight-avatar { width: 58px; height: 58px; font-size: 20px; }
  .tm-insight-identity h3 { font-size: 21px; }
  .tm-insight-identity p, .tm-insight-identity > span { font-size: 11px; }
  .tm-insight-head-actions { gap: 6px; }
  .tm-insight-risk { padding: 7px 9px; font-size: 11px; }
  .tm-insight-risk .attention-icon { display: none; }
  .tm-insight-close.tm-modal-close { width: 36px; height: 36px; }
  .tm-insight-kpis { grid-template-columns: 1fr; }
  .tm-insight-kpis article { min-height: 108px; }
  .tm-insight-insights > div { grid-template-columns: 1fr; }
  .tm-insight-insights article + article { border-left: 0; border-top: 1px solid #e2e8f0; }
  .tm-insight-footer { grid-template-columns: 1fr; }
  .tm-insight-footer > button { min-height: 48px; }
  .tm-insight-bar-row { grid-template-columns: minmax(92px, .8fr) minmax(100px, 1.4fr) 48px; }
}
@media (prefers-reduced-motion: reduce) { .tm-insight-modal { animation: none; } }

/* Compact desktop treatment: keep the complete insight card inside one viewport. */
@media (min-width: 981px) {
  .tm-insight-backdrop { padding: 12px; }
  .tm-insight-modal { width: min(1120px, 94vw); max-height: calc(100vh - 24px); padding: 18px; border-radius: 16px; }
  .tm-insight-head { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; margin-bottom: 12px; }
  .tm-insight-avatar { width: 64px; height: 64px; font-size: 22px; }
  .tm-insight-identity h3 { margin-bottom: 3px; font-size: 24px; }
  .tm-insight-identity p { margin-bottom: 5px; font-size: 12px; }
  .tm-insight-identity > span { font-size: 11px; }
  .tm-insight-risk { padding: 8px 11px; font-size: 12px; }
  .tm-insight-close.tm-modal-close { width: 36px; height: 36px; font-size: 23px; }
  .tm-insight-kpis { gap: 10px; margin-bottom: 12px; }
  .tm-insight-kpis article { min-height: 100px; padding: 13px 13px 11px 48px; }
  .tm-insight-kpis article > .attention-icon { left: 14px; top: 15px; width: 24px; height: 24px; }
  .tm-insight-kpis article > span { margin-bottom: 6px; font-size: 11px; }
  .tm-insight-kpis article > b { font-size: 23px; }
  .tm-insight-kpis article > small { margin-top: 5px; font-size: 10px; }
  .tm-insight-kpis article > em { right: 10px; bottom: 10px; padding: 4px 6px; font-size: 9.5px; }
  .tm-insight-kpis article.top > strong { font-size: 13px; }
  .tm-insight-kpis article.top > b { font-size: 15px; }
  .tm-insight-main { gap: 12px; margin-bottom: 12px; }
  .tm-insight-panel h4, .tm-insight-insights > h4 { padding: 9px 12px; font-size: 13px; }
  .tm-insight-panel h4 .attention-icon, .tm-insight-insights > h4 .attention-icon { width: 18px; height: 18px; }
  .tm-insight-chart { box-sizing: border-box; height: 154px; padding: 4px 10px 0; }
  .tm-insight-bars { gap: 10px; padding: 12px 14px 8px; }
  .tm-insight-bar-row { grid-template-columns: minmax(100px, .8fr) minmax(130px, 1.7fr) 50px; gap: 8px; }
  .tm-insight-bar-row > div { height: 14px; }
  .tm-insight-bar-row > span, .tm-insight-bar-row > b { font-size: 10.5px; }
  .tm-insight-interpretation { gap: 8px; margin: 2px 14px 11px; padding: 8px 10px; font-size: 10.5px; }
  .tm-insight-interpretation .attention-icon { width: 18px; height: 18px; }
  .tm-insight-insights { margin-bottom: 12px; }
  .tm-insight-insights article { grid-template-columns: 34px 1fr; gap: 8px; padding: 10px 12px; }
  .tm-insight-insights article > span { width: 34px; height: 34px; border-radius: 10px; }
  .tm-insight-insights article > span .attention-icon { width: 20px; height: 20px; }
  .tm-insight-insights p { font-size: 10.5px; line-height: 1.35; }
  .tm-insight-insights p b { margin-bottom: 2px; font-size: 11.5px; }
  .tm-insight-footer { gap: 12px; }
  .tm-insight-footer > div { gap: 10px; padding: 9px 12px; }
  .tm-insight-footer > div > .attention-icon { width: 22px; height: 22px; }
  .tm-insight-footer p { font-size: 10.5px; line-height: 1.35; }
  .tm-insight-footer p b { margin-bottom: 2px; font-size: 11.5px; }
  .tm-insight-footer > button { min-width: 205px; min-height: 48px; padding: 0 16px; font-size: 11px; }
}
@media (min-width: 981px) and (min-height: 560px) {
  .tm-insight-modal { overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable; }
  /* An individual SM card has a taller peer panel. Let its trend chart use
     that matched panel height instead of leaving an empty lower half. */
  .tm-insight-modal.tm-insight-sm .tm-insight-main > .tm-insight-panel {
    display: flex; flex-direction: column;
  }
  .tm-insight-modal.tm-insight-sm .tm-insight-chart {
    flex: 1 1 auto; min-height: 154px; height: auto;
  }
  /* Long peer lists remain readable; the card itself can scroll vertically. */
  .tm-insight-modal.tm-insight-many-peers { padding: 12px; }
  .tm-insight-many-peers .tm-insight-head { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; margin-bottom: 8px; }
  .tm-insight-many-peers .tm-insight-avatar { width: 52px; height: 52px; font-size: 18px; }
  .tm-insight-many-peers .tm-insight-identity h3 { font-size: 20px; }
  .tm-insight-many-peers .tm-insight-kpis { gap: 8px; margin-bottom: 8px; }
  .tm-insight-many-peers .tm-insight-kpis article { min-height: 84px; padding: 10px 10px 8px 42px; }
  .tm-insight-many-peers .tm-insight-kpis article > .attention-icon { left: 12px; top: 11px; width: 21px; height: 21px; }
  .tm-insight-many-peers .tm-insight-kpis article > span { margin-bottom: 4px; font-size: 10px; }
  .tm-insight-many-peers .tm-insight-kpis article > b { font-size: 21px; }
  .tm-insight-many-peers .tm-insight-kpis article > small { margin-top: 3px; font-size: 9.5px; }
  .tm-insight-many-peers .tm-insight-main { gap: 10px; margin-bottom: 8px; }
  .tm-insight-many-peers .tm-insight-chart { min-height: 154px; }
  .tm-insight-many-peers .tm-insight-bars { gap: 5px; padding: 8px 12px 6px; }
  .tm-insight-many-peers .tm-insight-bar-row { gap: 7px; }
  .tm-insight-many-peers .tm-insight-bar-row > div { height: 12px; }
  .tm-insight-many-peers .tm-insight-bar-row > span,
  .tm-insight-many-peers .tm-insight-bar-row > b { font-size: 10px; }
  .tm-insight-many-peers .tm-insight-interpretation { margin: 2px 12px 7px; padding: 7px 9px; font-size: 10px; }
  .tm-insight-many-peers .tm-insight-insights { margin-bottom: 8px; }
  .tm-insight-many-peers .tm-insight-insights article { padding: 7px 9px; }
}
@media (min-width: 981px) and (max-height: 820px) {
  .tm-insight-modal { padding: 12px; }
  .tm-insight-head { grid-template-columns: 50px minmax(0, 1fr) auto; gap: 10px; margin-bottom: 8px; }
  .tm-insight-avatar { width: 50px; height: 50px; font-size: 18px; }
  .tm-insight-identity h3 { font-size: 20px; }
  .tm-insight-kpis { margin-bottom: 8px; }
  .tm-insight-kpis article { min-height: 84px; padding-top: 10px; padding-bottom: 8px; }
  .tm-insight-kpis article > .attention-icon { top: 11px; }
  .tm-insight-main { margin-bottom: 8px; }
  .tm-insight-chart { height: 128px; }
  .tm-insight-bars { gap: 7px; padding-top: 9px; }
  .tm-insight-insights { margin-bottom: 8px; }
  .tm-insight-insights article { padding-top: 7px; padding-bottom: 7px; }
  .tm-insight-footer > div { padding-top: 7px; padding-bottom: 7px; }
  .tm-insight-footer > button { min-height: 42px; }
}

/* Stronger Target Miss card contrast and rank semantics. */
.tm-insight-modal {
  color: #050b18; border: 2px solid #334e78; box-shadow: 0 18px 48px rgba(15, 23, 42, .26);
}
.tm-insight-modal p, .tm-insight-modal small, .tm-insight-modal span { color: #111827; }
.tm-insight-identity p, .tm-insight-identity > span, .tm-insight-kpis article > small,
.tm-insight-insights p, .tm-insight-footer p, .tm-insight-interpretation { font-weight: 650; }
.tm-insight-kpis article, .tm-insight-panel, .tm-insight-insights, .tm-insight-footer > div {
  border-color: #9fb1c9;
}
.tm-insight-kpis article { border-width: 2px; }
.tm-insight-panel, .tm-insight-insights { border-width: 2px; }
.tm-insight-panel h4, .tm-insight-insights > h4 { color: #050b18; background: #eaf1fb; border-color: #9fb1c9; }
.tm-insight-chart text { fill: #111827; font-size: 13px; font-weight: 650; }
.tm-insight-chart .tm-insight-chart-value { fill: #050b18; font-size: 15px; font-weight: 900; }
.tm-insight-chart-grid line { stroke: #b8c5d6; }
.tm-insight-bar-row > span, .tm-insight-bar-row > b { color: #050b18; font-weight: 850; }
.tm-insight-bar-row.selected { padding: 3px 5px; background: #e8f0fb; border: 1px solid #9fb1c9; border-radius: 7px; }
.tm-insight-interpretation { color: #071a33; background: #e5effc; border-color: #91acd0; }
.tm-insight-interpretation::first-line { font-weight: 900; }
.tm-insight-peer-facts { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 8px; margin: auto 14px 12px; }
.tm-insight-peer-facts > span { display: grid; gap: 2px; padding: 7px 9px; border: 1px solid #b7c6da; border-radius: 8px; }
.tm-insight-peer-facts .danger { color: #9f1239; background: #fff1f2; }
.tm-insight-peer-facts .team-best { color: #08783f; background: #ecfdf3; }
.tm-insight-peer-facts .projection { color: #075da8; background: #eef6ff; }
.tm-insight-peer-facts b { color: inherit; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .03em; }
.tm-insight-peer-facts strong { color: #050b18; font-size: 12px; font-weight: 900; font-variant-numeric: tabular-nums; }
.tm-insight-insights strong { display: block; color: #050b18; font-size: 13px; font-weight: 900; font-variant-numeric: tabular-nums; }
.tm-rank-good, .tm-insight-kpis article.rank.tm-rank-good > b { color: #08783f !important; }
.tm-rank-watch, .tm-insight-kpis article.rank.tm-rank-watch > b { color: #b45309 !important; }
.tm-rank-high, .tm-insight-kpis article.rank.tm-rank-high > b { color: #c91d2e !important; }
.tm-insight-kpis article.rank.tm-rank-good { background: #e8f8ef; border-color: #50b985; }
.tm-insight-kpis article.rank.tm-rank-watch { background: #fff4df; border-color: #e9a23b; }
.tm-insight-kpis article.rank.tm-rank-high { background: #fff0f2; border-color: #e77a86; }
@media (min-width: 981px) {
  .tm-insight-modal { width: min(1040px, 92vw); }
  .tm-insight-identity p, .tm-insight-identity > span { font-size: 12px; }
  .tm-insight-kpis article > span { font-size: 12px; }
  .tm-insight-kpis article > small { font-size: 11px; }
  .tm-insight-bar-row > span, .tm-insight-bar-row > b { font-size: 11.5px; }
  .tm-insight-interpretation, .tm-insight-insights p, .tm-insight-footer p { font-size: 11.5px; }
  .tm-insight-insights p b, .tm-insight-footer p b { font-size: 12.5px; }
  .tm-insight-chart { height: 180px; }
  .tm-insight-peer-facts { margin: auto 14px 11px; }
}
@media (min-width: 981px) and (max-height: 700px) {
  .tm-insight-backdrop { padding: 7px; }
  .tm-insight-modal { max-height: calc(100vh - 14px); padding: 8px; }
  .tm-insight-head { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 8px; margin-bottom: 5px; }
  .tm-insight-avatar { width: 44px; height: 44px; font-size: 16px; }
  .tm-insight-identity h3 { margin-bottom: 1px; font-size: 18px; }
  .tm-insight-identity p { margin-bottom: 2px; }
  .tm-insight-risk { padding: 6px 9px; }
  .tm-insight-close.tm-modal-close { width: 32px; height: 32px; }
  .tm-insight-kpis { gap: 7px; margin-bottom: 5px; }
  .tm-insight-kpis article { min-height: 72px; padding: 8px 9px 7px 42px; }
  .tm-insight-kpis article > .attention-icon { left: 11px; top: 10px; width: 21px; height: 21px; }
  .tm-insight-kpis article > span { margin-bottom: 3px; font-size: 11px; }
  .tm-insight-kpis article > b { font-size: 20px; }
  .tm-insight-kpis article > small { margin-top: 2px; font-size: 10px; }
  .tm-insight-kpis article > em { right: 7px; bottom: 7px; }
  .tm-insight-main { gap: 7px; margin-bottom: 5px; }
  .tm-insight-panel h4, .tm-insight-insights > h4 { padding: 6px 9px; }
  .tm-insight-chart { height: 174px; }
  .tm-insight-bars { gap: 6px; padding: 8px 10px 5px; }
  .tm-insight-bar-row > div { height: 12px; }
  .tm-insight-bar-row.selected { padding-top: 2px; padding-bottom: 2px; }
  .tm-insight-interpretation { margin: 1px 10px 7px; padding: 6px 8px; font-size: 10.5px; line-height: 1.28; }
  .tm-insight-peer-facts { grid-template-columns: minmax(0, 1fr) 112px; gap: 6px; margin: auto 10px 7px; }
  .tm-insight-peer-facts > span { padding: 5px 7px; }
  .tm-insight-peer-facts strong { font-size: 10.5px; }
  .tm-insight-insights { margin-bottom: 5px; }
  .tm-insight-insights article { grid-template-columns: 30px 1fr; gap: 6px; padding: 6px 9px; }
  .tm-insight-insights article > span { width: 30px; height: 30px; }
  .tm-insight-insights p { font-size: 10.5px; line-height: 1.25; }
  .tm-insight-footer { gap: 7px; }
  .tm-insight-footer > div { padding: 6px 9px; }
  .tm-insight-footer p { font-size: 10.5px; line-height: 1.25; }
  .tm-insight-footer > button { min-width: 190px; min-height: 38px; }
}

/* ── risk list ────────────────────────────────────────────── */
.attention-section {
  --att-navy: #0b1f3a; --att-blue: #1677ff; --att-red: #dc2626; --att-red-soft: #fff1f2;
  --att-amber: #d97706; --att-amber-soft: #fffbeb; --att-border: #a8b9cf;
  position: relative; padding: 0; overflow: visible; border: 1.5px solid #7f96b2; border-radius: 16px;
  color: var(--att-navy); background: #f8fbff; box-shadow: 0 10px 28px rgba(11,31,58,.12);
}
.attention-section .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.attention-icon { width: 18px; height: 18px; flex: 0 0 auto; }
.attention-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 34%); align-items: center; gap: 18px;
  min-height: 86px; padding: 14px 18px; color: #fff; background: var(--att-navy);
  border: 0; border-radius: 14px 14px 0 0;
}
.attention-head-title { display: flex; align-items: center; gap: 13px; min-width: 0; }
.attention-head-icon { display: grid; place-items: center; width: 46px; height: 46px; color: #ff6b74; background: rgba(239,68,68,.15); border: 1px solid rgba(255,120,128,.28); border-radius: 10px; }
.attention-head-icon .attention-icon { width: 29px; height: 29px; stroke-width: 2.1; }
.attention-head h2 { margin: 0; color: #fff; font-size: 21px; font-weight: 780; letter-spacing: -.018em; }
.attention-head p { margin: 3px 0 0; color: #cbd8e8; font-size: 12px; line-height: 1.35; }
.attention-history-note { display: flex; align-items: flex-start; gap: 10px; padding: 9px 11px; color: #dcecff; background: #123f6d; border: 1px solid #2d6598; border-radius: 9px; }
.attention-history-note > .attention-icon { width: 21px; height: 21px; margin-top: 1px; color: #45b8ff; }
.attention-history-note div { display: grid; gap: 1px; }
.attention-history-note b { color: #fff; font-size: 11.5px; }
.attention-history-note span, .attention-history-note small { color: #dcecff; font-size: 10.5px; line-height: 1.3; }
.attention-module-body { padding: 13px 14px 12px; }
.attention-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 11px; }
.attention-kpi {
  display: flex; align-items: center; gap: 10px; min-height: 86px; padding: 11px 12px;
  border: 1px solid; border-radius: 11px; box-shadow: 0 3px 10px rgba(11,31,58,.05);
}
.attention-kpi-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 9px; }
.attention-kpi-icon .attention-icon { width: 23px; height: 23px; stroke-width: 2.1; }
.attention-kpi > div { display: grid; min-width: 0; }
.attention-kpi b { font-size: 25px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; }
.attention-kpi strong { margin-top: 4px; color: var(--att-navy); font-size: 11.5px; line-height: 1.2; }
.attention-kpi small { margin-top: 3px; color: #52657d; font-size: 9.5px; line-height: 1.25; }
.attention-kpi.critical { color: var(--att-red); background: #fff4f5; border-color: #f4b9bf; }
.attention-kpi.critical .attention-kpi-icon { background: #ffe2e5; }
.attention-kpi.watch { color: #e89300; background: #fffae9; border-color: #f2d58c; }
.attention-kpi.watch .attention-kpi-icon { background: #fff0bd; }
.attention-kpi.total { color: #3e628f; background: #f2f7fd; border-color: #bfd0e5; }
.attention-kpi.total .attention-kpi-icon { background: #dfeaf7; }
.attention-kpi.monitored { color: #1296db; background: #eff8ff; border-color: #b7d8ed; }
.attention-kpi.monitored .attention-kpi-icon { background: #d9f0ff; }
.attention-insight {
  display: flex; align-items: center; gap: 10px; margin: 0 0 11px; padding: 9px 11px;
  color: #263e5b; background: #eef7ff; border: 1px solid #b7d8ed; border-radius: 9px;
}
.attention-insight > .attention-icon { width: 22px; height: 22px; color: #1597e5; }
.attention-insight div { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.attention-insight b { color: var(--att-navy); font-size: 11.5px; white-space: nowrap; }
.attention-insight p { color: #506782; font-size: 11px; line-height: 1.3; }
.attention-insight strong { color: #075cae; }
.attention-insight > span { margin-left: auto; color: #075cae; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.attention-insight.attention-insight-danger { color: #111827; background: #fff0f1; border-color: #e59aa3; }
.attention-insight.attention-insight-danger > .attention-icon { color: #c52232; }
.attention-insight.attention-insight-danger b, .attention-insight.attention-insight-danger p { color: #111827; }
.attention-insight.attention-insight-danger strong, .attention-insight.attention-insight-danger > span { color: #b42332; }
.attention-drill-controls { display: flex; align-items: center; justify-content: flex-end; gap: 7px; margin: 8px 0; }
.attention-drill-controls > span { margin-right: 2px; color: #111827; font-size: 10.5px; font-weight: 780; }
.attention-drill-controls button { min-height: 29px; padding: 4px 10px; color: #111827; background: #fff; border: 1px solid #7f95ae; border-radius: 6px; font: inherit; font-size: 10.5px; font-weight: 760; cursor: pointer; transition: background-color 160ms cubic-bezier(.23,1,.32,1), border-color 160ms cubic-bezier(.23,1,.32,1), transform 120ms cubic-bezier(.23,1,.32,1); }
.attention-drill-controls button:hover:not(:disabled) { background: #eaf2fb; border-color: #345d87; }
.attention-drill-controls button:active:not(:disabled) { transform: scale(.97); }
.attention-drill-controls button:focus-visible { outline: 3px solid rgba(22,119,255,.28); outline-offset: 2px; }
.attention-drill-controls button:disabled { color: #6b7280; background: #f4f6f8; border-color: #c8d1dc; cursor: default; }
.attention-table-scroll { overflow-x: auto; border: 1px solid #728ba7; border-radius: 9px; background: #fff; }
.attention-table { width: 100%; min-width: 980px; border-collapse: separate; border-spacing: 0; font-size: 11.5px; }
.attention-table th, .attention-table td { padding: 8px 9px; text-align: left; border-bottom: 1px solid #c4d0de; vertical-align: middle; }
.attention-table th + th, .attention-table td + td { border-left: 1px solid #c4d0de; }
.attention-table thead th { color: #111827; font-size: 10.5px; font-weight: 800; line-height: 1.25; text-align: center; background: #dce9f8; border-bottom: 2px solid #7898bf; white-space: nowrap; }
.attention-table thead th:nth-child(2), .attention-table thead th:nth-child(3), .attention-table thead th:nth-child(7), .attention-table thead th:nth-child(8) { text-align: left; }
.attention-table tbody tr.attention-data-row > * { font-weight: 650; transition: background-color 160ms cubic-bezier(.23,1,.32,1), box-shadow 160ms cubic-bezier(.23,1,.32,1); }
.attention-table tbody tr.attention-data-row.is-critical > * { background: #fff9f9; }
.attention-table tbody tr.attention-data-row.is-watch > * { background: #fffdf7; }
.attention-table tbody tr.attention-data-row.is-critical:hover > * { background: #fff0f2; }
.attention-table tbody tr.attention-data-row.is-watch:hover > * { background: #fff4d8; }
.attention-table tbody tr.attention-data-row.is-selected > * { background: #e8f3ff; box-shadow: inset 0 1px #85b8eb, inset 0 -1px #85b8eb; }
.attention-table tbody tr.attention-data-row.zone-ka2 > * { background: #e6f1ff; }
.attention-table tbody tr.attention-data-row.zone-ka2:hover > * { background: #d5e9ff; }
.attention-table tbody tr.attention-data-row.zone-kerala > * { background: #e4f6eb; }
.attention-table tbody tr.attention-data-row.zone-kerala:hover > * { background: #d1eddb; }
.attention-table tbody tr.attention-data-row.zone-tamil-nadu > * { background: #eee8ff; }
.attention-table tbody tr.attention-data-row.zone-tamil-nadu:hover > * { background: #e1d7ff; }
.attention-table tbody tr.attention-data-row.zone-other > * { background: #e9eff5; }
.attention-table tbody tr.attention-data-row.zone-other:hover > * { background: #dce6ef; }
.attention-table tbody tr.attention-data-row.is-critical.zone-ka2 > * { background: #fff0f1; }
.attention-table tbody tr.attention-data-row.is-critical.zone-ka2:hover > * { background: #ffdee1; }
.attention-table tbody tr.attention-data-row.is-critical.zone-tamil-nadu > * { background: #fff1f6; }
.attention-table tbody tr.attention-data-row.is-critical.zone-tamil-nadu:hover > * { background: #fce0ea; }
.attention-table tbody tr.attention-data-row.is-critical.zone-kerala > * { background: #fff2f2; }
.attention-table tbody tr.attention-data-row.is-critical.zone-kerala:hover > * { background: #ffdfdf; }
.attention-table tbody tr.attention-data-row.is-critical.zone-other > * { background: #fbefef; }
.attention-table tbody tr.attention-data-row.is-critical.zone-other:hover > * { background: #f3dddd; }
.attention-table tbody tr.attention-data-row.is-selected > * { background: #d9ebff; box-shadow: inset 0 1px #5795d0, inset 0 -1px #5795d0; }
.attention-table tbody tr.attention-data-row td { color: #111827; }
.attention-table tbody tr:last-child > * { border-bottom: 0; }
.attention-table tbody th { color: #111827; font-weight: 800; }
.attention-table .num { text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.attention-data-row.is-critical td:nth-child(5), .attention-data-row.is-watch td:nth-child(5) { color: #b91c1c; font-weight: 780; background-image: linear-gradient(rgba(254,226,226,.58),rgba(254,226,226,.58)); }
.attention-rank { width: 38px; text-align: center !important; color: #111827; font-variant-numeric: tabular-nums; }
.attention-change { font-weight: 780; white-space: nowrap; }
.attention-change.bad, .attention-trend-grid .bad, .attention-trigger .bad { color: #dc2626; }
.attention-change.good, .attention-trend-grid .good, .attention-trigger .good { color: #16813f; }
.attention-change.neutral, .attention-trend-grid .neutral, .attention-trigger .neutral { color: #52657d; }
.attention-table .attention-reason, .attention-table .attention-action { min-width: 155px; max-width: 205px; white-space: normal; color: #111827; line-height: 1.3; }
.attention-table .attention-reason small { display: block; margin-top: 3px; color: #4b5563; font-size: 9.5px; font-weight: 620; }
.attention-table .attention-action { min-width: 140px; font-weight: 760; }
.attention-view { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 62px; padding: 5px 8px; color: #0866cc; background: #fff; border: 1px solid #5aa7eb; border-radius: 6px; font: inherit; font-size: 10.5px; font-weight: 760; white-space: nowrap; cursor: pointer; }
.attention-view .attention-icon { width: 13px; height: 13px; }
.attention-view:hover, .attention-view:focus-visible { color: #034c9a; background: #e8f4ff; border-color: #1677ff; outline: none; }
.attention-table .attention-group th { padding: 0; border-left: 0; border-bottom: 0; }
.attention-group button { display: grid; grid-template-columns: minmax(250px, .8fr) 1fr; align-items: center; width: 100%; min-height: 36px; padding: 6px 10px; border: 0; color: inherit; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.attention-group-main { display: flex; align-items: center; gap: 8px; }
.attention-group-main b { font-size: 12.5px; font-weight: 800; }
.attention-group-main em { font-size: 10.5px; font-style: normal; font-weight: 750; }
.attention-chevron { display: grid; place-items: center; width: 22px; height: 22px; color: inherit; background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.32); border-radius: 50%; }
.attention-chevron .attention-icon { width: 14px; height: 14px; transition: transform 150ms ease; }
.attention-chevron.is-collapsed .attention-icon { transform: rotate(-90deg); }
.attention-group small { color: inherit; font-size: 10.5px; font-weight: 650; text-align: left; }
.attention-group.critical th { color: #fff; background: #d91f2c; border-top: 5px solid #fff; }
.attention-group.warn th { color: #603500; background: #f8cf70; border-top: 6px solid #fff; }
.attention-group.warn .attention-chevron { background: rgba(255,255,255,.58); border-color: rgba(116,69,0,.15); }
.attention-zone-group th { padding: 0 !important; border-top: 1px solid #9db0c4 !important; border-bottom: 1px solid #9db0c4 !important; }
.attention-zone-group button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 32px; padding: 5px 12px 5px 38px; border: 0; color: #111827; background: #dde8f3; font: inherit; text-align: left; cursor: pointer; transition: background-color 160ms cubic-bezier(.23,1,.32,1); }
.attention-zone-group.zone-ka2 th { border-color: #699fd1 !important; }
.attention-zone-group.zone-ka2 button { background: #bedcff; }
.attention-zone-group.zone-ka2 button:hover { background: #a9d0fa; }
.attention-zone-group.zone-kerala th { border-color: #6eac87 !important; }
.attention-zone-group.zone-kerala button { background: #bee5ce; }
.attention-zone-group.zone-kerala button:hover { background: #a6d9b9; }
.attention-zone-group.zone-tamil-nadu th { border-color: #9680cb !important; }
.attention-zone-group.zone-tamil-nadu button { background: #d8c7ff; }
.attention-zone-group.zone-tamil-nadu button:hover { background: #c9b4f5; }
.attention-zone-group.zone-other th { border-color: #98aabd !important; }
.attention-zone-group.zone-other button { background: #d8e1eb; }
.attention-zone-group.zone-other button:hover { background: #c9d5e0; }
.attention-zone-group.critical.zone-ka2 th { border-color: #d96874 !important; }
.attention-zone-group.critical.zone-ka2 button { background: #ffb9c1; }
.attention-zone-group.critical.zone-ka2 button:hover { background: #fca4ae; }
.attention-zone-group.critical.zone-tamil-nadu th { border-color: #c86a8a !important; }
.attention-zone-group.critical.zone-tamil-nadu button { background: #f5bed2; }
.attention-zone-group.critical.zone-tamil-nadu button:hover { background: #edabc4; }
.attention-zone-group.critical.zone-kerala th { border-color: #d77979 !important; }
.attention-zone-group.critical.zone-kerala button { background: #ffcaca; }
.attention-zone-group.critical.zone-kerala button:hover { background: #ffb4b4; }
.attention-zone-group.critical.zone-other th { border-color: #c98585 !important; }
.attention-zone-group.critical.zone-other button { background: #f5d1d1; }
.attention-zone-group.critical.zone-other button:hover { background: #ecc0c0; }
.attention-zone-group button > span { display: flex; align-items: center; gap: 7px; }
.attention-zone-group b { color: inherit; font-size: 11.5px; font-weight: 820; }
.attention-zone-group em { color: inherit; font-size: 10.5px; font-style: normal; font-weight: 760; opacity: .78; }
.attention-zone-group small { color: inherit; font-size: 10px; font-weight: 700; opacity: .78; }
.attention-zone-chevron { display: grid; place-items: center; width: 17px; height: 17px; color: currentColor; border-radius: 50%; }
.attention-zone-chevron .attention-icon { width: 13px; height: 13px; transition: transform 150ms ease; }
.attention-zone-chevron.is-collapsed .attention-icon { transform: rotate(-90deg); }
/* Risk list: warm warning colors for every flagged person, independent of geography. */
#attentionSection .attention-zone-group button { background: #f7c0c5; color: #111; }
#attentionSection .attention-zone-group button:hover { background: #efa5ad; }
#attentionSection .attention-zone-group.warn button { background: #f7d0c5; }
#attentionSection .attention-zone-group.warn button:hover { background: #efbaac; }
#attentionSection .attention-zone-group th { border-color: #b86e76 !important; }
#attentionSection .attention-data-row > * { background: #fce5e8; color: #111; font-size: 14px; font-weight: 700; }
#attentionSection .attention-data-row.is-watch > * { background: #fff0e9; }
#attentionSection .attention-data-row:hover > * { background: #f8d2d7; }
#attentionSection .attention-data-row.is-selected > * { background: #f4c3ca; box-shadow: inset 0 1px #aa3344, inset 0 -1px #aa3344; }
#attentionSection .attention-table th, #attentionSection .attention-table td { text-align: center; padding: 12px 10px; border-color: #bf9c9f; }
#attentionSection .attention-table thead th { background: #f2d6d9; color: #111; font-size: 15px; font-weight: 800; white-space: normal; }
#attentionSection .attention-table-scroll { border: 2px solid #a85460; }
#attentionSection .attention-table .attention-reason, #attentionSection .attention-table .attention-action { color: #111; line-height: 1.45; }
#attentionSection .attention-reason small { font-size: 12px; color: #59393e; }
#attentionSection .attention-data-row td:nth-child(5), #attentionSection .attention-change.bad { color: #b51224; font-weight: 800; }
#attentionSection .attention-zone-group button { padding: 10px 16px; justify-content: center; gap: 24px; flex-wrap: wrap; }
#attentionSection .attention-zone-group b { font-size: 16px; }
#attentionSection .attention-zone-group em, #attentionSection .attention-zone-group small { font-size: 13px; opacity: 1; }
#attentionSection .attention-group button { min-height: 48px; text-align: center; }
#attentionSection .attention-group-main { justify-content: center; }
#attentionSection .attention-group b { font-size: 17px; }
#attentionSection .attention-group small, #attentionSection .attention-group em { font-size: 13px; }
#attentionSection .attention-head h2 { font-size: 26px; font-weight: 800; }
#attentionSection .attention-view, #attentionSection .attention-drill-controls button { font-size: 13px; min-height: 36px; }
#attentionSection .attention-insight { padding: 18px; gap: 16px; border: 2px solid #c53346; background: #ffe2e6; flex-wrap: wrap; }
#attentionSection .attention-insight div { display: grid; gap: 7px; flex: 1 1 260px; }
#attentionSection .attention-insight b { font-size: 20px; color: #991426; }
#attentionSection .attention-insight p { font-size: 15px; line-height: 1.45; font-weight: 700; }
#attentionSection .attention-insight > span { font-size: 32px; color: #ae1428; }
#attentionSection .attention-insight > .attention-icon { width: 32px; height: 32px; }
/* Keep the red risk language, with the original compact table rhythm. */
#attentionSection .attention-table-tools { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin: 8px 0; }
#attentionSection .attention-filter-actions { display: flex; align-items: end; gap: 8px; }
#attentionSection .attention-state-filter { display: grid; gap: 3px; color: #111; font-size: 10px; font-weight: 750; }
#attentionSection .attention-state-filter select { min-width: 138px; height: 30px; padding: 4px 25px 4px 8px; color: #111; background: #fff; border: 1px solid #a85460; border-radius: 6px; font: inherit; font-size: 11px; font-weight: 650; outline: none; }
#attentionSection .attention-state-filter select:focus { border-color: #b51224; box-shadow: 0 0 0 3px rgba(181,18,36,.14); }
#attentionSection .attention-guide-open { min-height: 38px; padding: 8px 13px; color: #fff; background: #0b5ea8; border: 1px solid #064b88; border-radius: 7px; box-shadow: 0 2px 5px rgba(11,94,168,.22); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
#attentionSection .attention-guide-open:hover { color: #fff; background: #084b88; border-color: #073e72; }
#attentionSection .attention-guide-open:focus-visible { outline: 3px solid rgba(11,94,168,.3); outline-offset: 2px; }
#attentionSection .attention-drill-controls { margin: 0; }
#attentionSection .attention-drill-controls button { min-height: 30px; padding: 4px 9px; font-size: 11px; }
#attentionSection .attention-data-row > * { font-size: 11.5px; font-weight: 650; }
#attentionSection .attention-table th, #attentionSection .attention-table td { padding: 8px 9px; text-align: left; }
#attentionSection .attention-table thead th { font-size: 11px; font-weight: 780; text-align: center; }
#attentionSection .attention-table .num, #attentionSection .attention-rank { text-align: center !important; }
#attentionSection .attention-table .attention-reason, #attentionSection .attention-table .attention-action { line-height: 1.3; }
#attentionSection .attention-reason small { font-size: 9.5px; }
#attentionSection .attention-zone-group button { min-height: 32px; padding: 5px 12px 5px 38px; justify-content: space-between; gap: 0; flex-wrap: nowrap; }
#attentionSection .attention-zone-group b { font-size: 11.5px; }
#attentionSection .attention-zone-group em, #attentionSection .attention-zone-group small { font-size: 10px; }
#attentionSection .attention-group button { min-height: 36px; text-align: left; }
#attentionSection .attention-group-main { justify-content: flex-start; }
#attentionSection .attention-group b { font-size: 12px; }
#attentionSection .attention-group small, #attentionSection .attention-group em { font-size: 10px; }
#attentionSection .attention-head h2 { font-size: 21px; }
#attentionSection .attention-view { min-height: auto; padding: 5px 8px; font-size: 10.5px; }
#attentionSection .attention-insight { padding: 9px 11px; gap: 10px; border-width: 1px; flex-wrap: nowrap; }
#attentionSection .attention-insight div { display: flex; align-items: baseline; gap: 7px; flex: 1; }
#attentionSection .attention-insight b { font-size: 11.5px; }
#attentionSection .attention-insight p { font-size: 11px; line-height: 1.3; font-weight: 500; }
#attentionSection .attention-insight > span { font-size: 18px; }
#attentionSection .attention-insight > .attention-icon { width: 22px; height: 22px; }
/* Risk color is based on priority and August achievement, never geography. */
#attentionSection .attention-zone-group.critical button { background: #f5bcc2; color: #111; }
#attentionSection .attention-zone-group.critical button:hover { background: #efabb3; }
#attentionSection .attention-zone-group.critical th { border-color: #b74a58 !important; }
#attentionSection .attention-zone-group.warn button { background: #ffd99a; color: #111; }
#attentionSection .attention-zone-group.warn button:hover { background: #ffca75; }
#attentionSection .attention-zone-group.warn th { border-color: #d38b28 !important; }
#attentionSection .attention-data-row.is-critical.risk-critical-high > * { background: #f7b8bf; }
#attentionSection .attention-data-row.is-critical.risk-critical-medium > * { background: #fbd2d6; }
#attentionSection .attention-data-row.is-critical.risk-critical-low > * { background: #fee8ea; }
#attentionSection .attention-data-row.is-watch.risk-watch-high > * { background: #ffe1a6; }
#attentionSection .attention-data-row.is-watch.risk-watch-medium > * { background: #ffedc7; }
#attentionSection .attention-data-row.is-watch.risk-watch-low > * { background: #fff7df; }
#attentionSection .attention-data-row.is-critical:hover > * { background: #f5c0c5; }
#attentionSection .attention-data-row.is-watch:hover > * { background: #ffe5ae; }
#attentionSection .attention-data-row.is-watch td:nth-child(5),
#attentionSection .attention-data-row.is-watch .attention-change.bad { color: #9a5b00; font-weight: 800; }
#attentionSection .attention-data-row.is-selected > * { background: #f2bbc2; box-shadow: inset 0 1px #aa3344, inset 0 -1px #aa3344; }
/* A state is a complete block: labelled start, then a clear closing rule. */
#attentionSection .attention-zone-group.critical th { border-top: 3px solid #8f1d2c !important; border-bottom: 2px solid #b74a58 !important; }
#attentionSection .attention-zone-group.warn th { border-top: 3px solid #9a5b00 !important; border-bottom: 2px solid #d38b28 !important; }
#attentionSection .attention-zone-group b::before { content: "STATE"; display: inline-block; margin-right: 7px; padding: 1px 4px; color: #111; background: rgba(255,255,255,.48); border: 1px solid rgba(17,17,17,.18); border-radius: 3px; font-size: 8px; font-weight: 800; letter-spacing: .06em; vertical-align: 1px; }
#attentionSection .attention-data-row.is-state-start > * { border-top: 1px solid rgba(17,17,17,.18); }
#attentionSection .attention-data-row.is-critical.is-state-end > * { border-bottom: 4px solid #b74a58 !important; }
#attentionSection .attention-data-row.is-watch.is-state-end > * { border-bottom: 4px solid #d38b28 !important; }
/* State identity lives only in the full-width State header; risk stays on the SM rows. */
#attentionSection .attention-zone-group.zone-ka2 th { border-color: #6482a3 !important; }
#attentionSection .attention-zone-group.zone-ka2 button { color: #1e3a5f; background: #d9e7f7; }
#attentionSection .attention-zone-group.zone-ka2 button:hover { background: #cbdcf0; }
#attentionSection .attention-zone-group.zone-ka2 b { color: #1e3a5f; }
#attentionSection .attention-zone-group.zone-kerala th { border-color: #896fa2 !important; }
#attentionSection .attention-zone-group.zone-kerala button { color: #523463; background: #e8e1f0; }
#attentionSection .attention-zone-group.zone-kerala button:hover { background: #ddd3e9; }
#attentionSection .attention-zone-group.zone-kerala b { color: #523463; }
#attentionSection .attention-zone-group.zone-tamil-nadu th { border-color: #4c8b86 !important; }
#attentionSection .attention-zone-group.zone-tamil-nadu button { color: #174d49; background: #d7ece9; }
#attentionSection .attention-zone-group.zone-tamil-nadu button:hover { background: #c9e1dd; }
#attentionSection .attention-zone-group.zone-tamil-nadu b { color: #174d49; }
#attentionSection .attention-zone-group.zone-other th { border-color: #64748b !important; }
#attentionSection .attention-zone-group.zone-other button { color: #334155; background: #e2e8f0; }
#attentionSection .attention-zone-group.zone-other button:hover { background: #d5dee9; }
@media (max-width: 640px) { #attentionSection .attention-table-tools, #attentionSection .attention-filter-actions { align-items: stretch; flex-direction: column; } #attentionSection .attention-state-filter select { width: 100%; } }
.attention-empty { padding: 24px !important; color: #52657d; text-align: center !important; }
.attention-rules { display: flex; align-items: flex-start; gap: 9px; margin-top: 10px; padding: 9px 10px; color: #263e5b; background: #f4f8fd; border: 1px solid #bdccdd; border-radius: 8px; }
.attention-rules > .attention-icon { width: 22px; height: 22px; color: #1597e5; }
.attention-rules > div { display: grid; gap: 6px; min-width: 0; }
.attention-rules > div > b { font-size: 10.5px; }
.attention-rules > div > b span { color: #687b92; font-weight: 600; }
.attention-rules > div > div { display: flex; gap: 8px; flex-wrap: wrap; }
.attention-rules div div > span { display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; background: #fff; border: 1px solid #c5d2e1; border-radius: 6px; color: #415872; font-size: 9.5px; }
.attention-rules i { display: grid; place-items: center; width: 15px; height: 15px; color: #fff; border-radius: 50%; font-style: normal; font-weight: 800; }
.attention-rules .critical i { background: #ef4444; }
.attention-rules .watch i { background: #f59e0b; }
.attention-rules .critical strong { color: #c5222d; }
.attention-rules .watch strong { color: #b66600; }
.attention-guide-drawer .attention-drawer-body { gap: 10px; }
.attention-guide-drawer .attention-drawer-body section { padding: 12px; }
.attention-guide-intro { background: #edf6ff !important; border-color: #a9cbed !important; }
.attention-guide-intro h4 .attention-icon { color: #1677cc; }
.attention-guide-watch { background: #fff8e6 !important; border-color: #efd38b !important; }
.attention-guide-watch h4 .attention-icon { color: #ad7100; }
.attention-guide-other { background: #f6f8fb !important; border-color: #c5d1df !important; }
.attention-guide-list { display: grid; gap: 7px; margin: 9px 0 0; padding-left: 20px; }
.attention-guide-list li { color: #263e5b; font-size: 11px; line-height: 1.35; }
.attention-guide-list b { display: block; color: #152d4c; }
.attention-guide-list span { color: #536b86; font-variant-numeric: tabular-nums; }
.attention-guide-other ul { display: grid; gap: 4px; margin: 8px 0; padding-left: 18px; color: #405875; font-size: 11px; line-height: 1.35; }
.attention-drawer-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(4,18,36,.42); backdrop-filter: blur(1.5px); }
/* A guide or View drawer owns the scroll until it is closed. Its own
   overflow-y rule below remains active, so only the background is frozen. */
html.attention-modal-open,
body.attention-modal-open { overflow: hidden; overscroll-behavior: none; }
html.attention-modal-open { scrollbar-gutter: stable; }
.attention-drawer {
  position: fixed; z-index: 91; top: 0; right: 0; width: min(430px, 94vw); height: 100vh; overflow-y: auto;
  color: var(--att-navy); background: #f7faff; border-left: 1px solid #8ea6c2; box-shadow: -18px 0 50px rgba(4,18,36,.28);
  animation: attention-drawer-in 190ms cubic-bezier(.2,.9,.25,1) both;
  scrollbar-color: #9ab0c7 #edf3f9; scrollbar-width: thin;
}
@keyframes attention-drawer-in { from { transform: translateX(32px); opacity: .7; box-shadow: 0 0 0 rgba(4,18,36,0); } to { transform: translateX(0); opacity: 1; box-shadow: -18px 0 50px rgba(4,18,36,.28); } }
.attention-drawer > header { display: flex; justify-content: space-between; gap: 12px; padding: 17px 18px; border-bottom: 1px solid #b9c8d9; background: #fff; }
.attention-drawer header h3 { margin: 0 0 6px; color: var(--att-navy); font-size: 21px; font-weight: 800; letter-spacing: -.015em; }
.attention-drawer header p { display: flex; align-items: center; gap: 8px; margin: 0; color: #4b6079; font-size: 11.5px; }
.attention-drawer header p b { color: var(--att-navy); }
.attention-drawer header .tag { margin-left: 4px; }
.attention-drawer header button { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; padding: 0; border: 0; border-radius: 7px; color: #263e5b; background: transparent; cursor: pointer; }
.attention-drawer header button:hover { color: #fff; background: var(--att-red); }
.attention-drawer header button .attention-icon { width: 21px; height: 21px; }
.attention-drawer-body { display: grid; gap: 11px; padding: 13px; }
.attention-drawer-body section { padding: 13px; border: 1px solid #b9c9db; border-radius: 9px; background: #fff; }
.attention-drawer-body h4 { display: flex; align-items: center; gap: 7px; margin: 0 0 9px; color: var(--att-navy); font-size: 12.5px; font-weight: 800; }
.attention-drawer-body h4 .attention-icon { width: 18px; height: 18px; color: #1597e5; }
.attention-drawer-body p { color: #2e4662; font-size: 11.5px; line-height: 1.48; }
.attention-why-card { display: flex; align-items: flex-start; gap: 11px; background: #fff1f2 !important; border-color: #f2b5bb !important; }
.attention-drawer-card-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; color: #fff; background: #ef4444; border-radius: 50%; }
.attention-drawer-card-icon .attention-icon { width: 25px; height: 25px; }
.attention-why-card h4 { margin-bottom: 4px; color: #b91c1c; }
.attention-why-card p { color: #3d2b35; }
.attention-history { display: grid; gap: 11px; }
.attention-history-row { display: grid; grid-template-columns: 72px minmax(0,1fr) 48px; align-items: center; gap: 8px; color: #354d69; font-size: 11px; }
.attention-history-row b { text-align: right; color: var(--att-navy); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.attention-bar { height: 14px; overflow: hidden; border-radius: 5px; background: #e7eef6; box-shadow: inset 0 0 0 1px #d8e2ed; }
.attention-bar span { display: block; height: 100%; min-width: 3px; border-radius: inherit; }
.attention-bar .previous { background: #1697e8; }
.attention-bar .latest { background: #fb5965; }
.attention-trend-grid { display: grid; grid-template-columns: 1.25fr 1fr; margin-top: 12px; border: 1px solid #f0d7da; border-radius: 7px; overflow: hidden; }
.attention-trend-grid > div { display: grid; gap: 3px; padding: 9px; background: #fff7f7; }
.attention-trend-grid > div + div { border-left: 1px solid #f0d7da; }
.attention-trend-grid span { color: #697a90; font-size: 9.5px; font-weight: 700; text-transform: uppercase; }
.attention-trend-grid b { font-size: 10.5px; font-variant-numeric: tabular-nums; }
.attention-flag-card h4 .attention-icon { color: #ef3340; }
.attention-trigger { margin: 0; border: 1px solid #c9d5e2; border-radius: 6px; overflow: hidden; }
.attention-trigger div { display: grid; grid-template-columns: 112px 1fr; border-bottom: 1px solid #d8e1eb; }
.attention-trigger div:last-child { border-bottom: 0; }
.attention-trigger dt, .attention-trigger dd { padding: 8px 9px; font-size: 10.5px; line-height: 1.35; }
.attention-trigger dt { color: #263e5b; background: #eff5fb; font-weight: 750; }
.attention-trigger dd { margin: 0; color: #344b66; border-left: 1px solid #d8e1eb; font-weight: 600; font-variant-numeric: tabular-nums; }
.attention-action-card { background: #fff9e8 !important; border-color: #efd79a !important; }
.attention-action-card h4 .attention-icon { color: #f59e0b; }
.attention-action-card p { margin: 0; color: #4e3a16; font-weight: 650; }
@media (max-width: 900px) {
  .attention-head { grid-template-columns: 1fr; }
  .attention-history-note { max-width: 430px; }
  .attention-summary { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .attention-summary { grid-template-columns: 1fr; }
  .attention-group button { grid-template-columns: 1fr; gap: 4px; }
  .attention-group small { padding-left: 30px; }
  .attention-insight div { display: grid; gap: 2px; }
  .attention-zone-group button { padding-left: 12px; }
  .attention-zone-group small { display: none; }
}
@media (prefers-reduced-motion: reduce) { .attention-drawer { animation: none; } }
.risk-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.sm-risk-trend-card .sm-risk-summary { grid-template-columns: minmax(0, 1fr); }
.sm-risk-trend-card .sm-risk-rates {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin-top: 8px;
  background: var(--surface-border);
}
.sm-risk-trend-card .sm-risk-rates .rate { background: var(--page); border-left: 0; }
@media (max-width: 1100px) {
  .sm-risk-trend-card .sm-risk-rates { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .sm-risk-trend-card .sm-risk-rates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  .sm-risk-trend-card .sm-risk-rates { grid-template-columns: minmax(0, 1fr); }
}
.risk-item {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--page);
}
.rk-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rk-name b { font-size: 13px; font-weight: 580; white-space: nowrap;
             overflow: hidden; text-overflow: ellipsis; }
.rk-name span { font-size: 11px; color: var(--ink-3); }
.risk-msg { flex-basis: 100%; font-size: 11.5px; color: var(--ink-3); }
/* Anmol: Team activity / Executive contribution text was reading too
   faint -- scoped to the attention drawer only (People & Risk's own
   .risk-item usage elsewhere is untouched). */
.attention-drawer-body .risk-msg, .attention-drawer-body .rk-name b {
  color: var(--ink); font-weight: 700;
}
/* Executive action plan -- collapsible toggle button inside the drawer.
   Reuses .attention-chevron's rotate behavior but re-colors it for a
   white card background instead of the table header's dark/colored one. */
.attention-team-toggle {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 0; border: 0; background: transparent; cursor: pointer;
  font: inherit; text-align: left; color: var(--ink); font-weight: 700;
}
.attention-team-toggle .attention-chevron {
  background: color-mix(in srgb, var(--att-navy) 12%, transparent);
  border-color: color-mix(in srgb, var(--att-navy) 25%, transparent);
  color: var(--att-navy);
}
.attention-team-toggle em { font-weight: 500; color: var(--ink-3); margin-left: auto; }
.attention-team-plan .risk-grid { margin-top: 11px; }
/* When the Executive plan is open, the drawer becomes a focused reading
   surface: supporting context recedes while the employee-level evidence
   remains sharp and visibly selected. */
.attention-drawer.attention-team-is-open .attention-drawer-body > section:not(.attention-team-plan) {
  filter: blur(2px); opacity: .34; pointer-events: none; user-select: none;
  transition: filter 160ms ease, opacity 160ms ease;
}
.attention-drawer.attention-team-is-open .attention-team-plan {
  position: relative; z-index: 1; border-color: #1677c8; background: #f7fbff;
  box-shadow: 0 10px 26px rgba(21, 119, 229, .22), 0 2px 7px rgba(4, 35, 72, .12);
}
.attention-drawer.attention-team-is-open .attention-team-toggle {
  color: #063f78;
}
.attention-drawer.attention-team-is-open .attention-team-plan .risk-item {
  border-color: #9dc9f0; background: #fff;
}
/* Expand motion. The drawer re-renders its whole section on every toggle,
   so these are mount animations, not transitions -- the same technique
   .attention-drawer already uses for its own slide-in. Collapse stays
   instant by design: on that render the markup is already gone, so there
   is nothing left to animate out. */
.attention-team-plan .risk-grid {
  animation: team-plan-open 160ms cubic-bezier(.23, 1, .32, 1) both;
}
.attention-team-plan .risk-item {
  animation: team-plan-item 240ms cubic-bezier(.23, 1, .32, 1) both;
}
.attention-team-plan .risk-item:nth-child(1) { animation-delay: 40ms; }
.attention-team-plan .risk-item:nth-child(2) { animation-delay: 70ms; }
.attention-team-plan .risk-item:nth-child(3) { animation-delay: 100ms; }
.attention-team-plan .risk-item:nth-child(4) { animation-delay: 130ms; }
.attention-team-plan .risk-item:nth-child(5) { animation-delay: 160ms; }
/* Cap the cascade so a large team's last card never feels late. */
.attention-team-plan .risk-item:nth-child(n + 6) { animation-delay: 185ms; }
.attention-team-toggle[aria-expanded="true"] .attention-chevron .attention-icon {
  animation: team-chevron-open 220ms cubic-bezier(.23, 1, .32, 1) both;
}
@keyframes team-plan-open { from { opacity: 0; transform: translateY(-4px); } }
@keyframes team-plan-item { from { opacity: 0; transform: translateY(6px); } }
@keyframes team-chevron-open { from { transform: rotate(-90deg); } }
@media (prefers-reduced-motion: reduce) {
  .attention-team-plan .risk-grid,
  .attention-team-plan .risk-item,
  .attention-team-toggle[aria-expanded="true"] .attention-chevron .attention-icon {
    animation: none;
  }
}
.tag { font-size: 9.5px; font-weight: 660; letter-spacing: .04em; padding: 3px 8px;
       border-radius: 100px; white-space: nowrap; }
.tag.critical { color: var(--critical); background: color-mix(in srgb, var(--critical) 13%, transparent); }
.tag.serious  { color: var(--serious);  background: color-mix(in srgb, var(--serious) 15%, transparent); }
.tag.warn     { color: var(--warn);     background: color-mix(in srgb, var(--warn) 16%, transparent); }
.tag.good     { color: var(--good-ink); background: color-mix(in srgb, var(--good) 15%, transparent); }
.ghost-btn {
  font: inherit; font-size: 12px; font-weight: 700; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  padding: 4px 10px; cursor: pointer; transition: color .18s, border-color .18s;
}
.ghost-btn:hover { color: var(--ink); border-color: var(--base); }
.ghost-btn.sm { padding: 3px 9px; font-size: 12.5px; }

.seg { display: inline-flex; background: var(--page); border: 1px solid var(--line);
       border-radius: 100px; padding: 2px; gap: 2px; }
.seg button {
  font: inherit; font-size: 12px; font-weight: 560; color: var(--ink-3);
  background: none; border: 0; padding: 5px 12px; border-radius: 100px;
  cursor: pointer; white-space: nowrap; transition: color .18s, background .22s var(--ease);
}
.seg button:hover { color: var(--ink); }
.seg button.on { color: var(--ink); background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.15); }

.empty { color: var(--ink-3); font-size: 13px; padding: 18px 0; text-align: center; }

.foot {
  max-width: var(--max); margin: 0 auto; padding: 18px 20px 34px;
  font-size: 11.5px; color: var(--ink-3); display: flex; gap: 7px; flex-wrap: wrap;
  border-top: 1px solid var(--line-2);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}
@media print {
  .topbar, .seg, .ghost-btn, .icon-btn { display: none !important; }
  .card { break-inside: avoid; box-shadow: none; }
}

/* ── Performance Details drill-down table ────────────────────
   Isolated component (.pd- prefix) below the Target KPI/Till-Date/Key
   Signal cards. Light-pastel MIS palette per Anmol's reference mockup --
   deliberately not theme-aware (no dark-mode variant) since the whole
   point of this table is to match that specific light design; every
   other card on the page keeps following the normal --token system. */
.pd-head { flex-wrap: wrap; gap: 10px; }
.pd-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pd-tools .ctl { min-width: 0; }
.pd-tools .ctl input { width: 200px; }

.pd-crumbrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 2px 0 12px; }
.pd-crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pd-badge {
  font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  color: var(--mtd); background: color-mix(in srgb, var(--mtd) 12%, transparent);
  padding: 3px 9px; border-radius: 100px; white-space: nowrap;
}
.pd-showing {
  font-size: 11.5px; font-weight: 600; color: var(--ink-3); margin-left: auto;
  background: var(--page); border: 1px solid var(--line); padding: 3px 9px; border-radius: 100px;
  white-space: nowrap;
}
.pd-note { font-size: 11.5px; color: var(--ink-3); margin: 0 0 8px; }
.pd-foot { font-size: 11px; color: var(--ink-3); margin: 8px 0 0; }

.pd-scroll {
  overflow-x: auto; overflow-y: visible; border: 1.5px solid color-mix(in srgb, var(--ink) 40%, var(--line)); border-radius: 10px;
  margin: 0; padding: 0; max-height: 70vh; overflow-y: auto;
}
table.pd-table {
  width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px;
}
table.pd-table th {
  padding: 7px 8px; text-align: center; white-space: nowrap; line-height: 1.25;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 15%, var(--line)); border-right: 1px solid color-mix(in srgb, var(--ink) 15%, var(--line)); box-sizing: border-box;
  font-size: 10.5px; font-weight: 700; color: #15254A; text-transform: none;
  position: sticky; z-index: 3; background: #F4F7FB;
}
/* Row 2's sticky offset must exactly equal row 1's real rendered height,
   or the two sticky rows either leave a gap (body peeks through) or
   overlap -- forcing row 1 to a fixed single-line height (nowrap, no
   <br> in its labels) makes that height deterministic instead of a
   guess. 7px padding * 2 + 10.5px font * 1.25 line-height ~= 27px. */
table.pd-table thead tr:first-child th { top: 0; height: 28px; }
table.pd-table thead tr:last-child th { top: 28px; font-size: 10px; font-weight: 650; }
table.pd-table td {
  padding: 7px 8px; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums;
  border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); color: #17243D;
}
/* Week-mode details: keep cell lines subtle, with a slightly clearer
   divider between metric groups. Avoid a boxed-in look on this wide table. */
.pd-week-scroll { border: 1.5px solid color-mix(in srgb, var(--ink) 40%, var(--line)); }
.pd-week-scroll table.pd-table th,
.pd-week-scroll table.pd-table td { border-color: var(--line); }
.pd-week-scroll table.pd-table th.pd-gend,
.pd-week-scroll table.pd-table td.pd-gend { border-right: 1px solid color-mix(in srgb, var(--ink) 35%, var(--line)) !important; }
table.pd-week-table { width: 100%; min-width: 1006px; table-layout: fixed; }
table.pd-week-table th, table.pd-week-table td { padding: 4px 5px; font-size: 9.8px; }
table.pd-week-table thead tr:last-child th { white-space: normal; line-height: 1.15; padding: 5px 4px; }
table.pd-week-table th.pd-wg-gapproj { background: var(--indigo-soft); }
table.pd-week-table th.pd-wg-perf-gap { background: var(--bad-soft); }
table.pd-table tbody tr:nth-child(even) td { background: #FBFCFE; }
table.pd-table tbody tr.drill { cursor: pointer; }
table.pd-table tbody tr.drill td, table.pd-table tbody tr.drill .pd-sticky { transition: background-color 120ms ease; }
table.pd-table tbody tr.drill:hover td { background: #F1F7FF; }
table.pd-table .empty { text-align: center; color: var(--ink-3); padding: 18px 8px; }

/* sticky hierarchy column(s) */
table.pd-table .pd-sticky {
  position: sticky; left: 0; z-index: 2; text-align: center; background: #fff;
  min-width: 170px; max-width: 220px; white-space: normal;
}
table.pd-table th.pd-sticky { z-index: 4; background: #F4F7FB; }
table.pd-table tbody tr:nth-child(even) .pd-sticky { background: #FBFCFE; }
table.pd-table tbody tr.drill:hover .pd-sticky { background: #F1F7FF; }
table.pd-table .pd-name { font-weight: 560; color: var(--ink); }

/* parent/group + total rows */
table.pd-table tr.pd-parent td { font-weight: 700; }
/* Anmol: Executive-level rows (no drill, so no .pd-parent class at all)
   read too light next to the bold SM/RSM parent rows above them --
   bigger, darker, bold, same as those. */
table.pd-table tbody tr:not(.pd-parent):not(.pd-total) td { font-weight: 650; color: #0B1526; font-size: 1.05em; }
table.pd-table tr.pd-total td, table.pd-table tr.pd-total .pd-sticky {
  background: #DCEEFF !important; font-weight: 700; border-top: 2px solid color-mix(in srgb, var(--mtd) 35%, var(--line));
}
table.pd-table .pd-go { color: var(--ink-3); font-size: 13px; width: 20px; }
table.pd-table tr.drill:hover .pd-go { color: var(--mtd); }

/* header group pastels */
table.pd-table th.pd-g-live   { background: #EEF2F7; }
table.pd-table th.pd-g-target { background: #DCEEFF; }
table.pd-table th.pd-g-login  { background: #E8F8EE; }
table.pd-table th.pd-g-disb   { background: #FFF6DA; }
table.pd-table th.pd-g-ach    { background: #EAF3FF; }
table.pd-table th.pd-g-golm   { background: #E5F8EC; }
table.pd-table th.pd-g-td     { background: #EEEAFB; }
table.pd-table th.pd-g-gap    { background: #FDEBEE; }
table.pd-table th.pd-g-proj   { background: #F1ECFF; }
table.pd-table th.pd-g-lastmo { background: #EEF2F7; }
table.pd-table th.pd-g-conf   { background: #F3F5F8; }

/* conditional heatmap on body cells (Target Achievement / GOLM) */
table.pd-table td.pd-good { background: var(--good-soft); color: var(--good-ink); font-weight: 650; }
/* Anmol: negative numbers (e.g. Ticket Size Growth %) stand out red + bold. */
table.pd-table td.pd-neg { color: var(--critical); font-weight: 700; }
/* the shared table.perf styling force-left-aligns each table's own
   2nd column (table.perf th:nth-child(2)/td:nth-child(2)) -- harmless
   there (that's the name column), but it also matches this table's
   2nd column (Live Execs, a number). Anmol wants every cell centered,
   so this settles it regardless of column position. */
table.pd-table th, table.pd-table td { text-align: center !important; }
/* Anmol: full row red (not just one cell) when GOLM% de-grows or
   Projection% is under 70% -- left to right, whole line. */
table.pd-table tr.pd-row-bad td, table.pd-table tr.pd-row-bad .pd-sticky {
  background: color-mix(in srgb, var(--critical) 11%, var(--surface)) !important;
}
table.pd-table tr.pd-row-bad.drill:hover td, table.pd-table tr.pd-row-bad.drill:hover .pd-sticky {
  background: color-mix(in srgb, var(--critical) 18%, var(--surface)) !important;
}

/* stronger divider at the boundary between metric groups (Live Executives |
   Disbursement Target | Login | Disbursement | Achieved % | GOLM %) -- the
   uniform 1px grid between every cell wasn't enough to separate the groups
   at a glance, this is a visibly darker/thicker line on top of it. */
table.pd-table th.pd-gend, table.pd-table td.pd-gend {
  border-right: 2px solid color-mix(in srgb, var(--ink) 35%, var(--line)) !important;
}

/* Week-mode table: no box around each individual cell. Keep only the
   table outline, row separators, and the marked metric-group boundaries. */
.pd-week-scroll table.pd-table th,
.pd-week-scroll table.pd-table td { border-right: 0 !important; }
.pd-week-scroll table.pd-table th.pd-gend,
.pd-week-scroll table.pd-table td.pd-gend { border-right: 1px solid color-mix(in srgb, var(--ink) 35%, var(--line)) !important; }


table.pd-table td.pd-warn { background: var(--warn-soft); color: var(--warn); font-weight: 650; }
table.pd-table td.pd-bad  { background: var(--bad-soft); color: var(--critical); font-weight: 650; }

@media (max-width: 860px) {
  .pd-showing { margin-left: 0; }
  .pd-tools .ctl input { width: 150px; }
}

/* ── Week on Week target vs achievement ───────────────────── */
/* Approved reference palette (Anmol): target blue #2878E8, achieved
   green #2CBF73, achievement line orange #F58220 -- now held in the
   --chart-* tokens at the top of this file. Same colours, one place to
   change them; still NOT remapped onto --mtd/--good/--warn. */
.wow-head { align-items: flex-start; gap: 14px; }
.wow-head > div:first-child { min-width: 250px; }
.wow-controls { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.wow-guide-open { min-height: 36px; padding: 7px 12px; border: 1px solid #145c9e; border-radius: 7px; color: #fff; background: #0b5ea8; box-shadow: 0 2px 5px rgba(11,94,168,.22); font: inherit; font-size: 12px; font-weight: 760; cursor: pointer; }
.wow-guide-open:hover { background: #084b88; border-color: #073e72; }
.wow-guide-open:focus-visible { outline: 3px solid rgba(11,94,168,.3); outline-offset: 2px; }
.wow-weeks { flex-wrap: wrap; }
.wow-weeks button { padding: 5px 9px; font-size: 11.5px; }
.wow-weeks button.on { color: #fff; background: var(--chart-target); box-shadow: none; }
/* Anmol: mark completed weeks fully green, the in-progress week half
   green -- a plain literal half-fill, not scaled to elapsed days. */
.wow-weeks button.complete:not(.on) {
  background: color-mix(in srgb, var(--good) 20%, var(--surface)); color: var(--good-ink); font-weight: 650;
}
.wow-weeks button.in-progress:not(.on) {
  background: linear-gradient(to right, color-mix(in srgb, var(--good) 20%, var(--surface)) 50%, transparent 50%);
  color: var(--ink); font-weight: 650;
}
.wow-metric button { padding: 5px 9px; font-size: 11.5px; }
.wow-metric button:disabled { cursor: not-allowed; opacity: .56; }
.wow-metric button.on:disabled { color: var(--ink); opacity: 1; }
.wow-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
  gap: 14px; align-items: stretch;
}
.wow-card { border: 1.5px solid var(--surface-border); box-shadow: none; }
.wow-chart-panel, .wow-summary {
  min-width: 0; padding: 14px; border: 1.5px solid var(--surface-border); border-radius: var(--r-sm);
  background: var(--page); box-shadow: none; transition: box-shadow 180ms ease;
}
.wow-chart-panel {
  display: flex; flex-direction: column;
}
.wow-chart-panel .wow-chart {
  margin-block: 0;
}
.wow-chart-panel:hover, .wow-summary:hover {
  box-shadow: none;
  border-color: var(--surface-border);
}
.wow-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 2px 4px; }
.wow-panel-head h3, .wow-summary h3 { font-size: 14px; font-weight: 750; color: var(--ink); }
.wow-summary h3 { margin: 0 2px 8px; }
.wow-legend { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12px; }
.wow-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.wow-legend-swatch { display: inline-block; width: 11px; height: 11px; border-radius: 3px; }
.wow-legend-target { background: var(--chart-target); }
.wow-legend-achieved { background: var(--chart-achieved); }
.wow-legend-line { display: inline-block; width: 14px; height: 0 !important; border-top: 2.5px dashed var(--chart-rate); border-radius: 0 !important; }
.wow-chart { display: block; width: 100%; height: auto; overflow: visible; background: transparent; }
.wow-gridline { stroke: var(--grid); stroke-width: 1; }
.wow-axis-label { fill: var(--ink-3); font: 11.5px var(--sans); }
.wow-axis-right { fill: var(--chart-rate); }
.wow-chart-week { cursor: pointer; outline: none; }
.wow-chart-hit { fill: transparent; pointer-events: all; }
.wow-chart-week:focus .wow-chart-hit { stroke: var(--chart-target); stroke-width: 2; }
.wow-chart-highlight { fill: var(--chart-sel); pointer-events: none; }
.wow-target-bar { fill: var(--chart-target); pointer-events: none; }
.wow-chart-week:hover .wow-target-bar, .wow-chart-week:hover .wow-achieved-bar { filter: brightness(1.08); }
.wow-target-bar, .wow-achieved-bar { transition: filter 140ms ease; }
.wow-achieved-bar { fill: var(--chart-achieved); pointer-events: none; }
.wow-bar-label { fill: var(--ink); font: 800 14px var(--sans); pointer-events: none; }
.wow-ach-line { fill: none; stroke: var(--chart-rate); stroke-width: 2.5; stroke-dasharray: 5 4; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.wow-ach-dot { fill: var(--surface); stroke: var(--chart-rate); stroke-width: 2.5; pointer-events: none; }
.wow-ach-label {
  fill: var(--chart-rate); font: 800 15px var(--sans); pointer-events: none;
  paint-order: stroke; stroke: var(--page); stroke-width: 3.5px; stroke-linejoin: round;
}
.wow-week-label { fill: var(--ink); font: 800 12.5px var(--sans); pointer-events: none; }
.wow-week-sub { fill: var(--ink-3); font: 11px var(--sans); pointer-events: none; }
.wow-table-scroll { overflow-x: auto; }
.wow-table { width: 100%; border-collapse: collapse; font-size: 12.5px; table-layout: auto; }
.wow-table th, .wow-table td { padding: 12px 8px; text-align: center; white-space: nowrap; border-bottom: 1px solid var(--line); }
.wow-table thead th {
  color: var(--mtd); font-size: 11.5px; font-weight: 700; text-transform: none; letter-spacing: normal;
  background: color-mix(in srgb, var(--mtd) 9%, var(--page)); border-bottom: 2px solid color-mix(in srgb, var(--mtd) 30%, var(--line));
}
.wow-table tbody tr { cursor: pointer; }
.wow-table tbody tr:nth-child(even) > * { background: color-mix(in srgb, var(--mtd) 3%, var(--surface)); }
.wow-table tbody tr:hover > * { background: color-mix(in srgb, var(--mtd) 6%, var(--surface)); }
.wow-table tbody tr.selected > * { background: color-mix(in srgb, var(--mtd) 11%, var(--surface)); }
.wow-table tbody tr:focus-visible { outline: 2px solid var(--mtd); outline-offset: -2px; }
.wow-table tbody th, .wow-table tfoot th { text-align: left; font-weight: 650; }
.wow-table thead th:first-child, .wow-table tbody th { text-align: left; }
.wow-table tbody th { display: flex; align-items: baseline; justify-content: flex-start; gap: 6px; }
.wow-week-date { font-weight: 500; color: var(--ink-3); font-size: 10.5px; white-space: nowrap; }
.wow-table td.num { font-variant-numeric: tabular-nums; font-weight: 700; }
.wow-table td.wow-performance-num.good, .wow-table td.wow-gap-num.good { color: var(--good-ink); }
.wow-table td.wow-performance-num.warn { color: var(--warn); }
.wow-table td.wow-performance-num.bad, .wow-table td.wow-gap-num.bad { color: var(--critical); }
.wow-table td.wow-outlook { min-width: 132px; text-align: left; white-space: normal; }
.wow-outlook strong, .wow-outlook span { display: block; }
.wow-outlook strong { font-size: 11px; font-weight: 700; line-height: 1.2; }
.wow-outlook span { margin-top: 2px; color: var(--ink-3); font-size: 10.5px; line-height: 1.2; }
.wow-outlook strong.good { color: var(--good-ink); }
.wow-outlook strong.warn { color: var(--warn); }
.wow-outlook strong.bad { color: var(--critical); }
.wow-outlook strong.neutral { color: var(--ink-2); }
.wow-table tfoot > tr > * {
  padding-top: 9px; background: #DCEEFF !important; border-top: 1px solid #B8D2F0;
  border-bottom: 0; font-weight: 700;
}
.wow-pct, .wow-vs {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 100px;
  padding: 2px 7px; font-size: 11px; font-weight: 750; white-space: nowrap;
}
.wow-pct.neutral { color: var(--ink-2); background: var(--page); }
.wow-pct.good { color: var(--good-ink); background: var(--good-soft); }
.wow-pct.warn { color: var(--warn); background: var(--warn-soft); }
.wow-pct.bad { color: var(--critical); background: var(--bad-soft); }
.wow-vs.pd-good { color: var(--good-ink); background: var(--good-soft); }
.wow-vs.pd-bad { color: var(--critical); background: var(--bad-soft); }
.wow-info {
  margin: 10px 0 0; padding: 7px 10px; border-left: 3px solid var(--mtd); border-radius: 0 6px 6px 0;
  color: var(--ink-2); background: var(--mtd-soft); font-size: 10.5px;
}
.wow-empty { padding: 4px 0 0; color: var(--ink-3); font-size: 11px; }
table.pd-table thead tr:only-child th { top: 0; height: 28px; }

/* week-mode Performance Details: confidence meter + its color states */
.wow-conf {
  display: inline-grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label pct" "meter meter";
  align-items: center; column-gap: 7px; row-gap: 4px; width: min(100%, 132px); line-height: 1.15;
}
.wow-conf-label { grid-area: label; justify-self: start; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.wow-conf-meter {
  grid-area: meter; display: block; width: 100%; height: 5px; background: var(--line-2); border-radius: 999px; overflow: hidden;
}
.wow-conf-fill { display: block; height: 100%; border-radius: 999px; }
.wow-conf-pct { grid-area: pct; justify-self: end; font-size: 10px; color: var(--ink-3); font-weight: 600; }
.wow-conf.pd-good .wow-conf-label { color: var(--good-ink); }
.wow-conf.pd-good .wow-conf-fill { background: var(--good); }
.wow-conf.pd-warn .wow-conf-label { color: var(--warn); }
.wow-conf.pd-warn .wow-conf-fill { background: var(--warn); }
.wow-conf.pd-bad .wow-conf-label { color: var(--critical); }
.wow-conf.pd-bad .wow-conf-fill { background: var(--critical); }

/* Completed-week insight -- what went wrong this week and what to do
   next week (see pdWeekInsightText() in target.js). Anmol, 19-09-2026:
   the cell is just a small, centred View button; clicking it opens a
   centred dialog over a blurred backdrop (pdWeekInsightModalHtml() in
   target.js) instead of expanding text in the row. */
.pd-week-insight-cell { text-align: center; vertical-align: middle; }
.pd-week-insight-view { font: inherit; font-size: 9.5px; font-weight: 700; padding: 3px 10px;
  border: 1px solid var(--mtd); border-radius: var(--r-sm); background: var(--surface); color: var(--mtd); cursor: pointer; }
.pd-week-insight-view:hover { background: color-mix(in srgb, var(--mtd) 10%, transparent); }
.pd-week-insight-view.pd-danger { border-color: var(--critical); color: var(--critical); }
.pd-week-insight-wrap-inline { display: flex; align-items: center; gap: 8px; justify-content: center; }

.pd-week-modal-backdrop { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center;
  justify-content: center; background: rgba(15, 23, 42, .45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.pd-week-modal { width: min(460px, 92vw); max-height: 82vh; overflow: auto; background: var(--surface);
  border-radius: var(--r); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); padding: 18px 20px; }
.pd-week-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.pd-week-modal-head h3 { margin: 0; font-size: 15px; font-weight: 800; color: var(--ink); }
.pd-week-modal-head h3 span { display: block; font-size: 11px; font-weight: 600; color: var(--ink-3); margin-top: 2px; }
.pd-week-modal-x { flex: none; width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--page);
  color: var(--ink-2); font-size: 16px; line-height: 1; cursor: pointer; }
.pd-week-modal-x:hover { background: var(--line-2); }

.pd-week-modal-line { margin: 0 0 4px; font-size: 12.5px; font-weight: 700; color: var(--ink); }
.pd-week-modal-line.pd-good { color: var(--good-ink); }
.pd-week-modal-line.pd-warn { color: var(--warn); }
.pd-week-modal-line.pd-bad, .pd-week-modal-line.pd-danger { color: var(--critical); }
.pd-week-modal-sub { margin: 0 0 10px; font-size: 11.5px; color: var(--ink-2); line-height: 1.5; }
.pd-week-modal-block { margin: 10px 0; padding: 9px 11px; background: var(--page);
  border-left: 3px solid var(--line); border-radius: var(--r-sm); }
.pd-week-modal-block .pd-week-modal-line, .pd-week-modal-block .pd-week-modal-sub { margin-bottom: 0; }
.pd-week-modal-block.pd-danger { background: color-mix(in srgb, var(--critical) 7%, transparent); border-left-color: var(--critical); }
.pd-week-modal-next { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--surface-border);
  color: var(--mtd); }

/* week-mode Performance Details grouped header -- new pd-wg-* classes
   only, so the monthly table's pd-g-* colors stay untouched. */
table.pd-table th.pd-wg-identity { background: var(--page); }
table.pd-table th.pd-wg-perf     { background: var(--mtd-soft); }
table.pd-table th.pd-wg-perf-ach { background: var(--good-soft); }
table.pd-table th.pd-wg-perf-gap { background: var(--bad-soft); }
table.pd-table th.pd-wg-ach      { background: var(--indigo-soft); }
table.pd-table th.pd-wg-proj     { background: var(--indigo-soft); }
table.pd-table th.pd-wg-lastmo   { background: color-mix(in srgb, var(--ink-3) 6%, var(--surface)); }
table.pd-table th.pd-wg-outlook  { background: var(--warn-soft); }

@media (max-width: 1100px) {
  .wow-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .wow-head > div:first-child { width: 100%; }
  .wow-controls { width: 100%; justify-content: flex-start; }
  .wow-weeks { border-radius: 10px; }
  .wow-info { line-height: 1.45; }
}

/* Trend Reports (rebuilt 21-09-2026 to Anmol's detailed spec): summary
   cards on top, a wide chart (left) and a Trend Insights panel (right)
   below, all reacting live to the RSM/State-ASM/SM filters. Exact
   status colors per spec -- not the app's usual --good/--warn/--critical
   tokens, so this section defines its own. */
:root {
  --trend-green:  #16A34A;
  --trend-strong: #5138CE;
  --trend-orange: #F97316;
  --trend-red:    #DC2626;
  --trend-blue:   #2563EB;
}
.trend-report-outer {
  border: 2px solid #111 !important; border-radius: 12px; overflow: hidden; background: var(--surface);
  box-shadow: 0 1px 3px rgba(15,23,42,.06);
}
.trend-header {
  padding: 16px 18px; background: #0b2e59; border-bottom: 4px solid #f59e0b; color: #fff;
}
.trend-header h2 { margin: 0 0 2px; font-size: 20px; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 8px; }
.trend-header h2 .attention-icon { width: 20px; height: 20px; color: #fff; }
.trend-header p { margin: 0; font-size: 12px; color: rgba(255,255,255,.8); }
.trend-report-body { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.trend-scope-label { margin: 0 0 4px; font-size: 12.5px; color: var(--ink-3); }

.spcc-company-health { padding: 14px 16px; border: 1px solid #b7d9d3; border-radius: 12px; background: #ffffff; }
.spcc-company-health-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.spcc-company-health-kicker { margin: 0 0 2px; color: #0f766e; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.spcc-company-health h2 { margin: 0; color: #102d2b; font-size: 18px; line-height: 1.1; }
.spcc-company-health-head p:last-child { margin: 4px 0 0; color: #64748b; font-size: 11px; font-weight: 700; }
.spcc-company-health-source { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-size: 9px; font-weight: 900; white-space: nowrap; }
.spcc-company-health-bar { display: flex; min-height: 28px; margin-top: 12px; overflow: hidden; border-radius: 8px; background: #e2e8f0; box-shadow: inset 0 0 0 1px rgba(15,23,42,.08); }
.spcc-company-health-segment { display: flex; min-width: 0; align-items: center; justify-content: center; padding: 0 5px; color: #ffffff; font-size: 11px; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.spcc-company-health-dead { background: #dc2626; }
.spcc-company-health-live { background: #f97316; }
.spcc-company-health-active { background: #16a34a; }
.spcc-company-health-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 7px; color: #475569; font-size: 10px; font-weight: 800; }
.spcc-company-health-legend span { display: inline-flex; align-items: center; gap: 4px; }
.spcc-company-health-legend i { width: 8px; height: 8px; border-radius: 50%; }
.spcc-company-health-legend i.dead { background: #dc2626; }
.spcc-company-health-legend i.live { background: #f97316; }
.spcc-company-health-legend i.active { background: #16a34a; }
.spcc-company-health-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.spcc-company-health-stats > div { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 6px; padding: 7px 9px; border-radius: 8px; background: #f8fafc; }
.spcc-company-health-stats span { color: #475569; font-size: 10px; font-weight: 800; }
.spcc-company-health-stats b { color: #102d2b; font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; text-align: right; }
.spcc-company-health-stats b em { color: #64748b; font-size: 10px; font-style: normal; }
.spcc-company-health-stats small { grid-column: 1 / -1; color: #64748b; font-size: 10px; font-weight: 900; }
.spcc-company-health-change { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 9px; margin-top: 10px; padding-top: 9px; border-top: 1px solid #dbe4ee; color: #475569; font-size: 10px; font-weight: 800; }
.spcc-company-health-result { padding: 3px 7px; border-radius: 999px; font-size: 10px; font-style: normal; font-weight: 900; }
.spcc-company-health-result-good { background: #dcfce7; color: #15803d; }
.spcc-company-health-result-bad { background: #fee2e2; color: #b91c1c; }
.spcc-company-health-result-same { background: #e2e8f0; color: #475569; }
.spcc-company-health-change em { color: #64748b; font-style: normal; font-weight: 700; }

.trend-cards-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.trend-card {
  display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 12px; border-radius: 10px;
  border: 1px solid #D7E3F1; background: var(--surface);
}
.trend-card[data-trend-cat-filter] { cursor: pointer; }
.trend-card[data-trend-cat-filter]:hover { border-color: var(--mtd); }
.trend-card[data-trend-cat-filter].on { border: 2px solid var(--ink); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ink) 12%, transparent); }
.trend-card-left { display: flex; gap: 8px; align-items: center; min-width: 0; }
.trend-card-right { text-align: right; flex: 0 0 auto; }
.trend-card-ic { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.trend-card-ic .attention-icon { width: 14px; height: 14px; }
.trend-card.green  { background: color-mix(in srgb, var(--trend-green) 8%, var(--surface)); }
.trend-card.strong { background: color-mix(in srgb, var(--trend-strong) 8%, var(--surface)); }
.trend-card.orange { background: color-mix(in srgb, var(--trend-orange) 8%, var(--surface)); }
.trend-card.red    { background: color-mix(in srgb, var(--trend-red) 8%, var(--surface)); }
.trend-card.selected { background: color-mix(in srgb, var(--trend-blue) 8%, var(--surface)); }
.trend-card.green  .trend-card-ic { background: color-mix(in srgb, var(--trend-green) 18%, var(--surface)); color: var(--trend-green); }
.trend-card.strong .trend-card-ic { background: color-mix(in srgb, var(--trend-strong) 18%, var(--surface)); color: var(--trend-strong); }
.trend-card.orange .trend-card-ic { background: color-mix(in srgb, var(--trend-orange) 18%, var(--surface)); color: var(--trend-orange); }
.trend-card.red    .trend-card-ic { background: color-mix(in srgb, var(--trend-red) 18%, var(--surface)); color: var(--trend-red); }
.trend-card.selected .trend-card-ic { background: color-mix(in srgb, var(--trend-blue) 18%, var(--surface)); color: var(--trend-blue); }
.trend-card-cat { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.trend-card.green  .trend-card-cat, .trend-card.green  h3 { color: var(--trend-green); }
.trend-card.strong .trend-card-cat, .trend-card.strong h3 { color: var(--trend-strong); }
.trend-card.orange .trend-card-cat, .trend-card.orange h3 { color: var(--trend-orange); }
.trend-card.red    .trend-card-cat, .trend-card.red    h3 { color: var(--trend-red); }
.trend-card.selected .trend-card-cat, .trend-card.selected h3 { color: var(--trend-blue); }
.trend-card h3 { margin: 0; font-size: 13px; white-space: nowrap; }
.trend-card-val { font-size: 17px; font-weight: 800; color: var(--ink); }
.trend-card-val em { font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--ink-3); margin-left: 3px; }
.trend-card-delta { display: block; margin-top: 1px; font-size: 11px; font-weight: 700; }
.trend-card-delta.up { color: var(--trend-green); }
.trend-card-delta.down { color: var(--trend-red); }

.trend-main-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(210px, 1fr); gap: 14px; align-items: start; }
.trend-main-grid.trend-single { grid-template-columns: 1fr; }
.trend-chart-topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.trend-chart-topbar .trend-scope-label { margin: 0; }
.trend-insight-toggle {
  display: flex; align-items: center; gap: 6px; border: 1px solid var(--warn); background: var(--warn-soft);
  color: var(--warn); font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 8px; cursor: pointer; flex: 0 0 auto;
}
.trend-insight-toggle .attention-icon { width: 14px; height: 14px; }
.trend-insight-toggle:hover { background: var(--warn); color: #fff; }
.trend-insight-toggle.on { background: var(--warn); color: #fff; }
.trend-insights-card .card-head h2 { display: flex; align-items: center; gap: 8px; }
.trend-insights-card .card-head .attention-icon { width: 20px; height: 20px; color: var(--warn); }

.trend-level-tabs { display: flex; align-items: center; gap: 6px; margin: 2px 0 10px; }
.trend-reset-btn {
  display: flex; align-items: center; gap: 5px; margin-left: auto; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-3); font-size: 12px; font-weight: 700;
  padding: 7px 12px; border-radius: 8px; cursor: pointer;
}
.trend-reset-btn .attention-icon { width: 13px; height: 13px; }
.trend-reset-btn:hover { border-color: var(--critical); color: var(--critical); }
.trend-custom-panel { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0 0 10px; background: color-mix(in srgb, var(--mtd) 4%, var(--surface)); }
.trend-custom-hint { margin: 0 0 8px; font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.trend-custom-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; max-height: 140px; overflow-y: auto; }
.trend-month-check {
  display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--ink);
  border: 1px solid var(--line); border-radius: 6px; padding: 4px 7px; cursor: pointer; background: var(--surface);
}
.trend-month-check:has(input:checked) { background: color-mix(in srgb, var(--mtd) 12%, var(--surface)); border-color: var(--mtd); color: var(--mtd); }
.trend-month-check input { margin: 0; }
.trend-level-tab {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-3);
  font-size: 13px; font-weight: 700; padding: 7px 16px; border-radius: 8px; cursor: pointer;
}
.trend-level-tab:hover { border-color: var(--mtd); color: var(--mtd); }
.trend-level-tab.on { background: var(--mtd); border-color: var(--mtd); color: #fff; }
.trend-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 10px; }
.trend-help-text { margin: 0 0 10px; font-size: 12px; color: var(--ink-3); font-style: italic; }
.sourcing-mode .trend-chart-topbar { position: relative; z-index: 5; }
.sourcing-mode .spcc-kpi-tip.trend-help-tip { z-index: 6; margin-left: 4px; vertical-align: -2px; }
.sourcing-mode .spcc-kpi-tip.trend-help-tip::after {
  top: calc(100% + 8px); bottom: auto; left: 50%; right: auto; width: min(460px, 72vw); max-width: 460px;
  white-space: normal; transform: translate(-50%, -3px);
}
.sourcing-mode .spcc-kpi-tip.trend-help-tip:hover::after,
.sourcing-mode .spcc-kpi-tip.trend-help-tip:focus-visible::after { transform: translate(-50%, 0); }
.trend-filter-sel {
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 12.5px;
  font-weight: 600; color: var(--ink); background: var(--surface); min-width: 140px;
}
.trend-showall {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600;
  color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer;
}
.trend-showall input { cursor: pointer; }
.trend-filter-sel:disabled { color: var(--ink-3); background: color-mix(in srgb, var(--ink-3) 6%, var(--surface)); }
.trend-range-group { display: flex; gap: 4px; margin-left: auto; border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.trend-range-btn {
  border: none; background: transparent; color: var(--ink-3); font-size: 12px; font-weight: 700;
  padding: 5px 10px; border-radius: 6px; cursor: pointer;
}
.trend-range-btn:hover { background: color-mix(in srgb, var(--mtd) 8%, var(--surface)); }
.trend-range-btn.on { background: var(--mtd); color: #fff; }

.trend-chart { width: 100%; height: auto; display: block; }
.trend-gridline { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.trend-line-solid { fill: none; stroke: var(--mtd); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.trend-line-dashed { fill: none; stroke: var(--indigo); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 10 9; }
.trend-dot { fill: var(--mtd); stroke: #fff; stroke-width: 2; }
.trend-dot.proj { opacity: .95; }
.trend-val-label { font-size: 19px; font-weight: 800; }
.trend-month-label { font-size: 17px; font-weight: 650; fill: var(--ink-3); }
.trend-chart .sp-trend-series { cursor: pointer; outline: none; }
.trend-chart .trend-line-hit { fill: none; stroke: transparent; stroke-width: 22; pointer-events: stroke; }
.trend-chart .sp-trend-series .trend-line-solid,
.trend-chart .sp-trend-series .trend-line-dashed,
.trend-chart .sp-trend-series .trend-dot,
.trend-chart .sp-trend-series .trend-val-label { transition: stroke-width .16s ease, filter .16s ease, opacity .16s ease, font-weight .16s ease; }
.trend-chart .sp-trend-series:hover .trend-line-solid,
.trend-chart .sp-trend-series:focus-visible .trend-line-solid,
.trend-chart .sp-trend-series:hover .trend-line-dashed,
.trend-chart .sp-trend-series:focus-visible .trend-line-dashed { stroke-width: 7; filter: drop-shadow(0 2px 4px var(--trend-series-color)); }
.trend-chart .sp-trend-series:hover .trend-dot,
.trend-chart .sp-trend-series:focus-visible .trend-dot { stroke-width: 3; filter: drop-shadow(0 2px 3px var(--trend-series-color)); }
.trend-chart .sp-trend-series:hover .trend-val-label,
.trend-chart .sp-trend-series:focus-visible .trend-val-label { font-weight: 900; filter: drop-shadow(0 1px 2px color-mix(in srgb, var(--trend-series-color) 40%, transparent)); }
.trend-chart .sp-trend-series.trend-team-hover .trend-line-solid,
.trend-chart .sp-trend-series.trend-team-hover .trend-line-dashed { stroke-width: 7; filter: drop-shadow(0 2px 4px var(--trend-series-color)); }
.trend-chart .sp-trend-series.trend-team-hover .trend-dot { stroke-width: 3; filter: drop-shadow(0 2px 3px var(--trend-series-color)); }
.trend-chart .sp-trend-series.trend-team-hover .trend-val-label { font-weight: 900; filter: drop-shadow(0 1px 2px color-mix(in srgb, var(--trend-series-color) 40%, transparent)); }
/* Anmol, 25-09-2026: "other should be little blur... other line number also
   not show... only when at bottom name hover" -- legend hover only (see
   wireTrendHover's isLegend check); hovering a line directly is untouched. */
.trend-chart.trend-legend-focus .sp-trend-series { transition: opacity .16s ease, filter .16s ease; }
.trend-chart.trend-legend-focus .sp-trend-series:not(.trend-team-hover) { opacity: .32; filter: blur(1px); }
.trend-chart.trend-legend-focus .sp-trend-series:not(.trend-team-hover) .trend-val-label { display: none; }
.trend-leg-item { border-radius: 6px; padding: 2px 4px; cursor: pointer; }
.trend-leg-item:hover, .trend-leg-item:focus-visible, .trend-leg-item.trend-team-hover {
  font-weight: 900; color: var(--trend-series-color);
  background: color-mix(in srgb, var(--trend-series-color) 12%, transparent);
  outline: none;
}
.trend-line-solid.green   { stroke: var(--trend-green); }
.trend-line-solid.strong  { stroke: var(--trend-strong); }
.trend-line-solid.orange  { stroke: var(--trend-orange); }
.trend-line-solid.red     { stroke: var(--trend-red); }
.trend-line-solid.selected{ stroke: var(--trend-blue); }
.trend-line-dashed.green   { stroke: var(--trend-green); }
.trend-line-dashed.strong  { stroke: var(--trend-strong); }
.trend-line-dashed.orange  { stroke: var(--trend-orange); }
.trend-line-dashed.red     { stroke: var(--trend-red); }
.trend-line-dashed.selected{ stroke: var(--trend-blue); }
.trend-dot.green   { fill: var(--trend-green); }
.trend-dot.strong  { fill: var(--trend-strong); }
.trend-dot.orange  { fill: var(--trend-orange); }
.trend-dot.red     { fill: var(--trend-red); }
.trend-dot.selected{ fill: var(--trend-blue); }
.trend-val-label.green    { fill: var(--trend-green); }
.trend-val-label.strong   { fill: var(--trend-strong); }
.trend-val-label.orange   { fill: var(--trend-orange); }
.trend-val-label.red      { fill: var(--trend-red); }
.trend-val-label.selected { fill: var(--trend-blue); }

.trend-legend { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
/* Anmol, 25-09-2026: "max 4 names in one row" -- scoped to Sourcing Trend
   only (.spcc-trend); Target page's .trend-legend keeps its own flex-wrap. */
.spcc-trend .trend-legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.trend-leg-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.trend-leg-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.trend-leg-dot.green   { background: var(--trend-green); }
.trend-leg-dot.strong  { background: var(--trend-strong); }
.trend-leg-dot.orange  { background: var(--trend-orange); }
.trend-leg-dot.red     { background: var(--trend-red); }
.trend-leg-dot.selected{ background: var(--trend-blue); }

.trend-insights-card { display: flex; flex-direction: column; }
.trend-insight-list { display: flex; flex-direction: column; gap: 12px; }
.trend-insight-row { display: flex; gap: 10px; align-items: flex-start; }
.trend-insight-num {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.trend-insight-num.green   { background: var(--trend-green); }
.trend-insight-num.strong  { background: var(--trend-strong); }
.trend-insight-num.orange  { background: var(--trend-orange); }
.trend-insight-num.red     { background: var(--trend-red); }
.trend-insight-num.selected{ background: var(--trend-blue); }
.trend-insight-row strong { font-size: 11px; text-transform: uppercase; letter-spacing: .02em; }
.trend-insight-row strong.green   { color: var(--trend-green); }
.trend-insight-row strong.strong  { color: var(--trend-strong); }
.trend-insight-row strong.orange  { color: var(--trend-orange); }
.trend-insight-row strong.red     { color: var(--trend-red); }
.trend-insight-row strong.selected{ color: var(--trend-blue); }
.trend-insight-row b { display: block; font-size: 13.5px; color: var(--ink); margin: 1px 0 2px; }
.trend-insight-state { font-size: 11px; font-weight: 600; color: var(--ink-3); }
.trend-insight-row p { margin: 0; font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.trend-insight-proj {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: flex-start;
}
.trend-insight-proj .attention-icon { width: 16px; height: 16px; color: var(--mtd); flex: 0 0 auto; margin-top: 1px; }
.trend-insight-proj p { margin: 0; font-size: 12px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.spcc-trend-pick { width: 100%; border: 1px solid transparent; background: transparent; text-align: left; font: inherit; color: inherit; padding: 6px 8px; border-radius: 10px; cursor: pointer; }
.spcc-trend-pick:hover { border-color: var(--line); background: color-mix(in srgb, var(--mtd) 5%, var(--surface)); }
.spcc-trend-pick.on { border-color: var(--mtd); background: color-mix(in srgb, var(--mtd) 9%, var(--surface)); }
.spcc-trend .trend-insights-card .card-sub { margin: 2px 0 0; }
.spcc-trend .trend-chart-topbar-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.spcc-trend .trend-insights-card { max-height: 600px; }
.spcc-trend .trend-insight-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-right: 6px; }
.spcc-trend .trend-insight-row { display: block; width: 100%; padding: 9px 10px; color: #172033; }
.spcc-trend .spcc-trend-insight-copy { display: grid; gap: 7px; min-width: 0; }
.spcc-trend .spcc-trend-insight-head { display: flex; align-items: center; gap: 7px; min-width: 0; }
.spcc-trend .spcc-trend-insight-head > b { flex: 1 1 auto; min-width: 0; margin: 0; color: #172033; font-size: 14px; line-height: 1.2; }
.spcc-trend .spcc-trend-rank { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 27px; height: 27px; border-radius: 50%; color: #fff; font-size: 10.5px; font-weight: 850; font-variant-numeric: tabular-nums; }
.spcc-trend .spcc-trend-rank.dead { background: #b91c1c; }
.spcc-trend .spcc-trend-rank.live { background: #c2410c; }
.spcc-trend .spcc-trend-rank.active { background: #15803d; }
.spcc-trend .spcc-trend-insight-head > em { flex: 0 0 auto; padding: 3px 6px; border: 1px solid currentColor; border-radius: 5px; font-size: 9px; font-style: normal; font-weight: 850; line-height: 1; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; }
.spcc-trend .spcc-trend-insight-head > em.dead { color: #b91c1c; background: #fef2f2; }
.spcc-trend .spcc-trend-insight-head > em.live { color: #c2410c; background: #fff7ed; }
.spcc-trend .spcc-trend-insight-head > em.active { color: #15803d; background: #f0fdf4; }
.spcc-trend .spcc-trend-insight-summary { display: flex; flex-wrap: wrap; gap: 4px 8px; color: #334155; font-size: 11px; font-weight: 750; line-height: 1.25; font-variant-numeric: tabular-nums; }
.spcc-trend .spcc-trend-insight-summary > span:first-child { color: #172033; font-weight: 850; }
.spcc-trend .spcc-trend-insight-takeaway { color: #334155; font-size: 11px; font-weight: 700; line-height: 1.3; }
.spcc-trend .spcc-trend-insight-takeaway.good { color: #15803d; }
.spcc-trend .spcc-trend-insight-takeaway.bad { color: #b91c1c; }
.spcc-trend .spcc-trend-insight-takeaway.neutral { color: #334155; }
.spcc-trend .spcc-trend-insight-metrics { display: grid; gap: 6px; }
.spcc-trend .spcc-trend-insight-metric { display: inline-flex; align-items: center; gap: 5px; color: #172033; font-size: 11px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.spcc-trend .spcc-trend-insight-metric i { display: inline-block; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; }
.spcc-trend .spcc-trend-insight-metric i.red { background: #dc2626; }
.spcc-trend .spcc-trend-insight-metric i.orange { background: #f97316; }
.spcc-trend .spcc-trend-insight-metric i.green { background: #16a34a; }
.spcc-trend .spcc-trend-insight-metric strong { color: #172033; font-size: inherit; font-weight: 850; letter-spacing: 0; }
.spcc-trend .spcc-trend-insight-metric strong.good { color: #15803d; }
.spcc-trend .spcc-trend-insight-metric strong.bad { color: #b91c1c; }
.spcc-trend .spcc-trend-insight-metric strong.neutral { color: #172033; }
.spcc-trend .trend-cards-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.spcc-trend .spcc-trend-kpi { appearance: none; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; justify-content: stretch; gap: 0; min-width: 0; min-height: 0; padding: 0; overflow: hidden; border: 2px solid #172033; border-radius: 12px; background: #ffffff; color: #172033; font: inherit; text-align: left; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease; }
.spcc-trend .spcc-trend-kpi:hover { transform: translateY(-2px); }
.spcc-trend .spcc-trend-kpi:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }
.spcc-trend .spcc-trend-card-total.is-selected { box-shadow: 0 0 0 3px #93c5fd; }
.spcc-trend .spcc-trend-card-status.red.is-selected { box-shadow: 0 0 0 3px #fca5a5; }
.spcc-trend .spcc-trend-card-status.orange.is-selected { box-shadow: 0 0 0 3px #fdba74; }
.spcc-trend .spcc-trend-card-status.green.is-selected { box-shadow: 0 0 0 3px #86efac; }
.spcc-trend .spcc-trend-kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; padding: 9px 14px; color: #ffffff; font-size: 12px; font-weight: 800; }
.spcc-trend .spcc-trend-kpi-head > span:first-child { min-width: 0; }
.spcc-trend .spcc-trend-kpi-head > span:last-child { flex: 0 0 auto; white-space: nowrap; font-size: 11px; font-weight: 750; }
.spcc-trend .spcc-trend-kpi-head small { font-size: 11px; font-weight: 650; }
.spcc-trend .spcc-trend-card-total .spcc-trend-kpi-head { background: #1d4ed8; }
.spcc-trend .spcc-trend-card-status.red .spcc-trend-kpi-head { background: #b91c1c; }
.spcc-trend .spcc-trend-card-status.orange .spcc-trend-kpi-head { background: #c2410c; }
.spcc-trend .spcc-trend-card-status.green .spcc-trend-kpi-head { background: #15803d; }
.spcc-trend .spcc-trend-kpi-body { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 14px; }
.spcc-trend .spcc-trend-kpi-value { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; min-width: 0; }
.spcc-trend .spcc-trend-kpi .trend-card-val { flex: 0 0 auto; color: #172033; font-size: 32px; line-height: 1; font-weight: 850; font-variant-numeric: tabular-nums; }
.spcc-trend .spcc-trend-kpi .trend-card-share { color: #475569; font-size: 12px; font-weight: 700; white-space: nowrap; }
.spcc-trend .spcc-trend-kpi .trend-card-delta { flex: 0 0 auto; margin: 0; padding: 3px 6px; border: 1px solid #94a3b8; border-radius: 5px; color: #334155; font-size: 11px; font-weight: 800; white-space: nowrap; }
.spcc-trend .spcc-trend-kpi .trend-card-delta.up { border-color: #15803d; background: #f0fdf4; color: #166534; }
.spcc-trend .spcc-trend-kpi .trend-card-delta.down { border-color: #b91c1c; background: #fef2f2; color: #991b1b; }
.spcc-trend .spcc-trend-kpi .trend-card-delta.flat { border-color: #64748b; background: #f8fafc; color: #334155; }
.spcc-trend #spTrendRangeSel { margin-left: auto; }

@media (max-width: 1100px) {
  .trend-main-grid { grid-template-columns: 1fr; }
  .spcc-trend .trend-cards-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .spcc-trend .trend-cards-row { grid-template-columns: 1fr; }
  .spcc-company-health { padding: 12px; }
  .spcc-company-health-head { display: block; }
  .spcc-company-health-source { display: inline-block; margin-top: 7px; }
  .spcc-company-health-segment { font-size: 9px; }
  .spcc-company-health-stats { gap: 5px; }
  .spcc-company-health-stats > div { padding: 6px; }
  .spcc-company-health-stats b { font-size: 12px; }
}

/* Sourcing Points detail modal (added 22-09-2026): the click-to-open
   "all data + why the number doesn't match Excel's raw row count" panel. */
.sp-info-btn {
  border: none; background: transparent; color: inherit; cursor: pointer; padding: 0 0 0 3px;
  font-size: 12px; vertical-align: middle; opacity: .8;
}
.sp-info-btn:hover { opacity: 1; text-decoration: underline; }
.sp-modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 200; }
.sp-modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 201;
  width: min(760px, 92vw); max-height: 84vh; background: var(--surface); border-radius: 12px;
  box-shadow: 0 20px 60px rgba(15,23,42,.35); display: flex; flex-direction: column; overflow: hidden;
}
.sp-modal-head {
  display: flex; align-items: center; justify-content: space-between; padding: 14px 18px;
  background: #0b2e59; color: #fff; border-bottom: 4px solid #f59e0b; flex: 0 0 auto;
}
.sp-modal-head h2 { margin: 0; font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.sp-modal-head h2 .attention-icon { width: 18px; height: 18px; color: #fff; }
.sp-modal-x { border: none; background: transparent; color: #fff; cursor: pointer; padding: 4px; }
.sp-modal-x .attention-icon { width: 16px; height: 16px; }
.sp-modal-body { padding: 16px 18px; overflow-y: auto; font-size: 13px; color: var(--ink); line-height: 1.5; }
.sp-modal-body p { margin: 0 0 10px; }
.sp-modal-body code { background: color-mix(in srgb, var(--ink-3) 10%, var(--surface)); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.sp-modal-body h3 { margin: 16px 0 8px; font-size: 13px; color: var(--ink); }
.sp-calc {
  background: color-mix(in srgb, var(--mtd) 6%, var(--surface)); border: 1px solid var(--indigo-border);
  border-radius: 8px; padding: 10px 12px; font-size: 12.5px; margin: 0 0 10px;
}
.sp-table-wrap { max-height: 240px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; }
.sp-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.sp-table th {
  position: sticky; top: 0; background: #F4F7FB; text-align: left; padding: 7px 10px;
  border-bottom: 1px solid var(--line); font-weight: 700;
}
.sp-table td { padding: 6px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sp-table tr:last-child td { border-bottom: none; }
.sp-table td.sp-num { text-align: center; font-weight: 700; white-space: nowrap; }
.sp-fls { color: var(--ink-3); font-size: 10.5px; }
/* Sourcing Point Command Center — standalone page only. */
.spcc-filter-row { grid-template-columns: minmax(210px, .45fr) minmax(520px, 1.55fr); }
.spcc-filter-grid { grid-template-columns: minmax(145px, 1fr) auto minmax(120px, .8fr) auto minmax(130px, 1fr) auto minmax(190px, 1.35fr); }
.spcc-rule { margin: 0; color: var(--ink-2); font-size: .82rem; line-height: 1.45; }
.spcc-note { display: block; margin: 0 0 18px; }
.spcc-note.warn { background: #fff8e7; border-color: #e8bd5e; color: #75500a; }
.spcc-kpis { grid-template-columns: repeat(6, minmax(145px, 1fr)); margin-top: 28px; }
.spcc-kpis .kpi p { min-height: 2.3em; }
.spcc-table tbody tr[data-key] { cursor: pointer; }
.spcc-table tbody tr[data-key]:hover th, .spcc-table tbody tr[data-key]:hover td { background: #eef5ff; }
.spcc-dead { color: #bb2638; font-weight: 800; }
.spcc-live { color: #a36a00; font-weight: 800; }
.spcc-active { color: #137a44; font-weight: 800; }
@media (max-width: 1150px) { .spcc-filter-row { grid-template-columns: 1fr; } .spcc-kpis { grid-template-columns: repeat(3, minmax(145px, 1fr)); } }
@media (max-width: 700px) { .spcc-filter-grid { grid-template-columns: 1fr; } .spcc-filter-grid .chev { display: none; } .spcc-kpis { grid-template-columns: repeat(2, minmax(130px, 1fr)); } }

/* Sourcing Point Command Center: a distinct, calm operations surface.
   Scoped to the active section so the approved dashboard theme stays intact. */
body.sourcing-mode { background: #edf7f4; }
.sourcing-mode .app-content { background: #edf7f4; }
.sourcing-mode .topbar {
  background: rgba(245, 252, 250, .92);
  border-bottom-color: #b8d9d1;
  backdrop-filter: blur(16px) saturate(145%);
}
.sourcing-mode .brand-mark { background: #0f766e; box-shadow: 0 8px 18px -12px rgba(7, 77, 72, .8); }
.sourcing-mode .sidebar button.on { background: #d9f0e9; color: #000000; }
.sourcing-mode .sidebar button.on span { color: #000000; }
.sourcing-mode .topbar,
.sourcing-mode .topbar h1,
.sourcing-mode .topbar h2,
.sourcing-mode .topbar h3,
.sourcing-mode .topbar label,
.sourcing-mode .topbar select,
.sourcing-mode .topbar input,
.sourcing-mode .topbar .crumb,
.sourcing-mode .topbar .pill { color: #111827; font-weight: 750; }
.sourcing-mode .topbar .filter-group-head p,
.sourcing-mode .topbar .ctl input::placeholder { color: #334155; font-weight: 650; opacity: 1; }
.sourcing-mode .crumb.on {
  background: #ffffff;
  border: 1px solid #111827;
  color: #000000;
  font-weight: 850;
}
.sourcing-mode #sectionBody .kpi-label,
.sourcing-mode #sectionBody .kpi-foot,
.sourcing-mode #sectionBody .card-sub,
.sourcing-mode #sectionBody .perf th,
.sourcing-mode #sectionBody .perf td { color: #111827; font-weight: 700; }
.sourcing-mode #sectionBody .kpi-val { color: #0b3f3b; font-weight: 850; }
.sourcing-mode #sectionBody > .focus {
  margin-top: 12px; padding: 14px 20px; border-radius: 12px;
  color: #f6fffc; background: #0d5c57;
  box-shadow: 0 16px 32px -22px rgba(5, 70, 64, .72);
}
.sourcing-mode #sectionBody > .focus + .spcc-kpis { margin-top: 28px; }
.sourcing-mode #sectionBody > .focus h1 { color: #ffffff; letter-spacing: -.025em; }
.sourcing-mode #sectionBody > .focus .focus-sub { color: #d8f0e9; }
.sourcing-mode #sectionBody > .focus .eyebrow { display: none; }
.sourcing-mode .spcc-note { background: #fff9ec; border-color: #e8c467; color: #725006; }
.sourcing-mode .spcc-kpis .kpi {
  padding: 9px 12px; background: #ffffff; border-color: #b8d9d1; border-left-width: 1px;
  box-shadow: 0 10px 24px -22px rgba(8, 82, 76, .72);
}
.sourcing-mode .spcc-kpis .kpi.flag { background: #fff8f8; border-left-width: 1px; }
.sourcing-mode .spcc-kpis .kpi:nth-child(4) { background: #f0fbf6; border-color: #a9d9be; }
.sourcing-mode .spcc-kpis .kpi:nth-child(6) { background: #fff8f8; border-color: #e6bdc2; }
.sourcing-mode #sectionBody .card { padding: 10px; border: 2px solid #111827; overflow: hidden; box-shadow: 0 18px 34px -26px rgba(8, 82, 76, .7); }
.sourcing-mode #sectionBody .card-head { padding: 10px 14px; background: #f4fbf8; border-bottom: 1px solid #111827; }
.sourcing-mode #sectionBody .card-head h2 { color: #000000; font-size: 18px; font-weight: 850; letter-spacing: -.02em; }
.sourcing-mode #sectionBody .card-head .card-sub { color: #111827; font-size: 13px; font-weight: 750; }
.sourcing-mode .spcc-card-actions { display: flex; align-items: center; gap: 10px; }
.sourcing-mode .spcc-reset { padding: 5px 10px; border: 1px solid #111827; border-radius: 8px; background: #ffffff; color: #000000; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.sourcing-mode .spcc-card-actions .pill { padding: 5px 10px; font-size: 12px; }
.sourcing-mode .spcc-reset:hover { background: #dff1eb; }
.sourcing-mode .spcc-reset:active { transform: scale(.98); }
.sourcing-mode .spcc-notes-btn { padding: 4px 8px; border: 1px solid #075f57; border-radius: 8px; background: #dff1eb; color: #075f57; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.sourcing-mode .spcc-notes-btn:hover { background: #c9e9df; }
.sourcing-mode .spcc-kpis .kpi-top { margin-bottom: 4px; }
.sourcing-mode .spcc-kpis .kpi-foot { margin-top: 5px; }
.sourcing-mode .spcc-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 8px 2px 10px; }
.sourcing-mode .spcc-crumb { padding: 4px 9px; border: 0; border-radius: 999px; background: #e7f1fb; color: #2563eb; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.sourcing-mode .spcc-crumb:hover { background: #d9eadf; color: #075f57; }
.sourcing-mode .spcc-crumb.on { background: #0f766e; color: #ffffff; }
.sourcing-mode .spcc-crumb-sep { color: #4b5563; font-size: 17px; font-weight: 850; }
.sourcing-mode .spcc-crumb-level { padding: 4px 8px; border-radius: 999px; background: #dff1eb; color: #075f57; font-size: 12px; font-weight: 850; letter-spacing: .02em; }
.sourcing-mode #sectionBody .card-head { padding: 7px 10px; }
.sourcing-mode #sectionBody .card-head h2 { font-size: 16px !important; }
.sourcing-mode #sectionBody .card-head .card-sub { font-size: 12px !important; }
.sourcing-mode .spcc-reset { padding: 4px 8px; font-size: 11px !important; }
.sourcing-mode .spcc-card-actions .pill { padding: 4px 8px; font-size: 11px !important; }
.sourcing-mode .spcc-crumb { padding: 3px 8px; font-size: 11px !important; }
.sourcing-mode .spcc-crumb-level { padding: 3px 7px; font-size: 11px !important; }
.sourcing-mode .spcc-scroll { width: 100%; max-width: 100%; min-width: 0; max-height: none; overflow-x: auto; overflow-y: visible; box-sizing: border-box; border: 1px solid #111827; border-radius: 8px; margin: 0; }
.sourcing-mode table.pd-table.spcc-table { width: 100%; min-width: 0; table-layout: fixed; }
.sourcing-mode table.pd-table.spcc-table th { color: #000000; font-size: 13px; font-weight: 850; letter-spacing: .02em; }
.sourcing-mode table.pd-table.spcc-table th,
.sourcing-mode table.pd-table.spcc-table td { border-right: 1px solid #111827; border-bottom: 1px solid #111827; padding: 6px 9px; }
.sourcing-mode table.pd-table.spcc-table th:last-child,
.sourcing-mode table.pd-table.spcc-table td:last-child { border-right: 0; }
.sourcing-mode table.pd-table.spcc-table th.spcc-h-id { width: 3%; }
.sourcing-mode table.pd-table.spcc-table th.spcc-h-name { width: 20%; }
.sourcing-mode table.pd-table.spcc-table th.spcc-h-team { width: 14%; }
.sourcing-mode table.pd-table.spcc-table th.spcc-h-allocation { width: 14%; }
.sourcing-mode table.pd-table.spcc-table th.spcc-h-perexec { width: 13%; }
.sourcing-mode table.pd-table.spcc-table th.spcc-h-dead,
.sourcing-mode table.pd-table.spcc-table th.spcc-h-live,
.sourcing-mode table.pd-table.spcc-table th.spcc-h-active { width: 7%; }
.sourcing-mode table.pd-table.spcc-table th.spcc-h-coverage { width: 14%; min-width: 150px; white-space: normal; line-height: 1.15; }
.sourcing-mode table.pd-table.spcc-table th.spcc-h-go { width: 3%; }
.sourcing-mode table.pd-table.spcc-table th.spcc-h-id,
.sourcing-mode table.pd-table.spcc-table th.spcc-h-name { background: #eef7f4; }
.sourcing-mode table.pd-table.spcc-table th.spcc-h-name,
.sourcing-mode table.pd-table.spcc-table td.name { text-align: left !important; }
.sourcing-mode table.pd-table.spcc-table th.spcc-h-allocation { background: #d9f0e9; }
.sourcing-mode table.pd-table.spcc-table th.spcc-h-points { background: #d9f0e9; color: #000000; }
.sourcing-mode table.pd-table.spcc-table th.spcc-h-points { width: 21%; }
.sourcing-mode table.pd-table.spcc-table th.spcc-h-pointtotal { width: 7%; background: #e8f0fb; color: #000000; }
.sourcing-mode table.pd-table.spcc-table th.spcc-h-perexec { background: #e8f0fb; }
.sourcing-mode table.pd-table.spcc-table th.spcc-h-dead { background: #b91c1c; color: #ffffff; }
.sourcing-mode table.pd-table.spcc-table th.spcc-h-coverage { background: #fcecef; }
.sourcing-mode table.pd-table.spcc-table th.spcc-h-live { background: #c2410c; color: #ffffff; }
.sourcing-mode table.pd-table.spcc-table th.spcc-h-active { background: #15803d; color: #ffffff; }
.sourcing-mode #sectionBody table.pd-table.spcc-table th.spcc-h-dead,
.sourcing-mode #sectionBody table.pd-table.spcc-table th.spcc-h-live,
.sourcing-mode #sectionBody table.pd-table.spcc-table th.spcc-h-active { color: #ffffff; }
.sourcing-mode table.pd-table.spcc-table th.spcc-h-team { background: #e8f0fb; }
.sourcing-mode table.pd-table.spcc-table th.spcc-h-go { background: #eef7f4; }
.sourcing-mode table.pd-table.spcc-table tbody tr:nth-child(even) td { background: #f8fcfa; }
.sourcing-mode table.pd-table.spcc-table tbody tr.drill:hover td { background: #e1f2ec; }
.sourcing-mode table.pd-table.spcc-table tbody tr.spcc-total td { background: #dbeafe; color: #111827; font-weight: 850; }
.sourcing-mode table.pd-table.spcc-table tbody tr.spcc-total td { position: sticky; bottom: 0; z-index: 3; }
.sourcing-mode table.pd-table.spcc-table tbody tr.spcc-risk td { background: #fff0f1; }
.sourcing-mode table.pd-table.spcc-table tbody tr.spcc-watch td { background: #fff7e5; }
.sourcing-mode table.pd-table.spcc-table tbody tr.spcc-good td { background: #edf9f1; }
.sourcing-mode .spcc-point-cell { padding: 0 !important; }
.sourcing-mode .spcc-point-list { display: block; width: 100%; min-width: 0; padding: 6px 9px; border: 0; background: transparent; color: #111827; font: inherit; font-weight: 800; text-align: left; cursor: pointer; }
.sourcing-mode .spcc-point-list span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-mode .spcc-point-list:hover { background: rgba(13, 148, 136, .10); }
.sourcing-mode .spcc-point-list:focus-visible { outline: 2px solid #0f766e; outline-offset: -2px; }
.sourcing-mode .spcc-point-empty, .sourcing-mode .spcc-point-total { color: #475569; font-weight: 750; white-space: nowrap; }
.sourcing-mode table.pd-table.spcc-table .spcc-cell-pointtotal { color: #1d4ed8; font-weight: 850; }
.spcc-notes-overlay > .spcc-points-modal { margin: 0; }
.spcc-points-modal { width: min(640px, calc(100vw - 32px)) !important; max-height: min(560px, calc(100vh - 32px)) !important; display: flex; flex-direction: column; overflow: hidden; padding: 12px 14px; }
.spcc-points-modal > header { position: relative; top: auto; flex: 0 0 auto; z-index: 2; padding: 12px 0 9px; background: #f7fcfa; }
.spcc-points-modal > header button { flex: none; }
.spcc-points-history { min-height: 0; margin-top: 10px; overflow: auto; border: 1px solid #1f2937; border-radius: 7px; }
.spcc-points-history table { width: 100%; min-width: 590px; border-collapse: collapse; font-size: 11px; font-variant-numeric: tabular-nums; }
.spcc-points-history th, .spcc-points-history td { padding: 6px 8px; border-right: 1px solid #64748b; border-bottom: 1px solid #64748b; color: #111827; font-weight: 700; text-align: left; }
.spcc-points-history th { background: #dff1eb; font-weight: 850; white-space: nowrap; }
.spcc-points-history th.num, .spcc-points-history td.num { text-align: center; }
.spcc-points-history td.spcc-disb-zero { background: #fee2e2; color: #000000; font-weight: 900; }
.spcc-points-history td.spcc-disb-live { background: #f6b26b; color: #000000; font-weight: 900; }
.spcc-points-history td.spcc-disb-active { background: #b7e8c0; color: #000000; font-weight: 900; border: 2px solid #15803d; }
.spcc-points-history tr:last-child td { border-bottom: 0; }
.spcc-points-history th:last-child, .spcc-points-history td:last-child { border-right: 0; }
.spcc-points-history tbody tr.spcc-shared-row > td:first-child { background: #1e3a8a; color: #ffffff; }
.spcc-shared-point { position: relative; display: inline-flex; align-items: center; gap: 6px; color: #ffffff; font-weight: 900; cursor: help; }
.spcc-shared-point small { padding: 2px 5px; border: 1px solid #ffffff; border-radius: 999px; background: #dbeafe; color: #1e3a8a; font-size: 8px; font-weight: 900; line-height: 1; text-transform: uppercase; }
.spcc-shared-point::after { content: attr(data-tooltip); position: absolute; z-index: 20; left: 0; bottom: calc(100% + 8px); width: max-content; max-width: min(420px, 72vw); padding: 8px 10px; border-radius: 7px; background: #172554; color: #ffffff; box-shadow: 0 8px 20px rgba(15, 23, 42, .24); font-size: 10px; font-weight: 700; line-height: 1.45; text-align: left; white-space: pre-line; opacity: 0; pointer-events: none; transform: translateY(4px); transition: opacity 120ms ease, transform 120ms ease; }
.spcc-shared-point:hover::after, .spcc-shared-point:focus-visible::after { opacity: 1; transform: translateY(0); }
.spcc-shared-point:focus-visible { outline: 2px solid #2563eb; outline-offset: 3px; border-radius: 3px; }
.sourcing-mode .spcc-health { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 7px; border-radius: 50%; font-size: 16px; font-weight: 900; vertical-align: middle; }
.sourcing-mode .spcc-health.risk { background: #c91d35; color: #ffffff; }
.sourcing-mode .spcc-health.watch { background: #df8200; color: #ffffff; }
.sourcing-mode .spcc-health.good { background: #078a4b; color: #ffffff; }
.sourcing-mode .spcc-health.neutral { background: #64748b; color: #ffffff; }
html.spcc-modal-open { overflow: hidden; overscroll-behavior: none; }
body.spcc-modal-open { overflow: hidden; overscroll-behavior: none; touch-action: none; }
.spcc-notes-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; box-sizing: border-box; padding: 24px; overflow: hidden; overscroll-behavior: contain; background: rgba(15, 23, 42, .42); backdrop-filter: blur(3px); }
.spcc-notes-modal { width: min(1120px, 96vw); max-height: min(760px, 90vh); overflow: auto; overscroll-behavior: contain; padding: 18px; border: 2px solid #111827; border-radius: 14px; background: #f7fcfa; box-shadow: 0 28px 72px rgba(15, 23, 42, .32); }
.spcc-notes-modal > header { position: sticky; top: 0; z-index: 5; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid #111827; background: #f7fcfa; }
.spcc-data-notes-modal { width: min(1520px, calc(100vw - 32px)) !important; height: min(820px, calc(100vh - 32px)); max-height: min(820px, calc(100vh - 32px)) !important; display: flex; flex-direction: column; overflow: hidden; box-sizing: border-box; }
.spcc-data-notes-modal > header { position: relative; top: auto; flex: 0 0 auto; z-index: 6; }
.spcc-data-notes-modal > header button { flex: 0 0 auto; }
.spcc-notes-content { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.spcc-notes-modal h2 { margin: 0; color: #000000; font-size: 18px; font-weight: 850; }
.spcc-notes-modal header p { margin: 3px 0 0; color: #334155; font-size: 12px; font-weight: 650; }
.spcc-notes-modal header button { width: 30px; height: 30px; border: 1px solid #111827; border-radius: 8px; background: #ffffff; color: #111827; font-size: 22px; line-height: 1; cursor: pointer; }
.spcc-notes-summary { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0; }
.spcc-notes-summary span { padding: 6px 9px; border: 1px solid var(--note-border, #94a3b8); border-radius: 7px; background: var(--note-bg, #f8fafc); color: var(--note-text, #111827); font-size: 12px; font-weight: 750; }
.spcc-note-block { --note-border: #94a3b8; --note-bg: #f8fafc; --note-text: #334155; --note-table-bg: #e2e8f0; margin-top: 12px; padding: 12px; border: 2px solid var(--note-border); border-radius: 10px; background: var(--note-bg); }
.spcc-note-activity { --note-border: #3b82f6; --note-bg: #eff6ff; --note-text: #1d4ed8; --note-table-bg: #dbeafe; }
.spcc-note-missing-point { --note-border: #e11d48; --note-bg: #fff1f2; --note-text: #be123c; --note-table-bg: #ffe4e6; }
.spcc-note-missing-fls { --note-border: #db2777; --note-bg: #fdf2f8; --note-text: #be185d; --note-table-bg: #fce7f3; }
.spcc-note-fls-format { --note-border: #d97706; --note-bg: #fffbeb; --note-text: #a16207; --note-table-bg: #fef3c7; }
.spcc-note-roster-mismatch { --note-border: #7c3aed; --note-bg: #f5f3ff; --note-text: #6d28d9; --note-table-bg: #ede9fe; }
.spcc-note-sm-mismatch { --note-border: #ea580c; --note-bg: #fff7ed; --note-text: #c2410c; --note-table-bg: #ffedd5; }
.spcc-note-no-allocation { --note-border: #0f766e; --note-bg: #f0fdfa; --note-text: #0f766e; --note-table-bg: #ccfbf1; }
.spcc-note-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 0; border: 0; background: transparent; color: #111827; font: inherit; text-align: left; cursor: pointer; }
.spcc-note-toggle span { font-size: 14px; font-weight: 850; }
.spcc-note-toggle b { margin-left: 6px; color: var(--note-text); }
.spcc-note-toggle i { display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid var(--note-border); border-radius: 50%; background: #ffffff; color: var(--note-text); font-size: 18px; font-style: normal; line-height: 1; }
.spcc-note-body { padding-top: 8px; }
.spcc-note-block h3 { margin: 0; color: #111827; font-size: 14px; font-weight: 850; }
.spcc-note-block h3 span { margin-left: 6px; color: #b91c1c; }
.spcc-note-block p { margin: 3px 0 9px; color: #475569; font-size: 12px; font-weight: 600; }
.spcc-note-table { overflow: auto; border: 1px solid #1f2937; border-radius: 7px; }
.spcc-note-table table { width: 100%; min-width: 660px; table-layout: fixed; border-collapse: collapse; font-size: 11px; }
.spcc-note-table th, .spcc-note-table td { padding: 5px 7px; border-right: 1px solid #64748b; border-bottom: 1px solid #64748b; color: #111827; text-align: left; font-weight: 700; }
.spcc-note-table th { background: var(--note-table-bg, #dff1eb); color: #0f172a; font-weight: 850; }
.spcc-note-table th:nth-child(1) { width: 21%; }
.spcc-note-table th:nth-child(2) { width: 18%; }
.spcc-note-table th:nth-child(3) { width: 25%; }
.spcc-note-table th:nth-child(4) { width: 13%; }
.spcc-note-table th:nth-child(5) { width: 23%; }
.spcc-note-table tr:last-child td { border-bottom: 0; }
.spcc-note-table th:last-child, .spcc-note-table td:last-child { border-right: 0; }
.spcc-note-value { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spcc-rsm-name { display: block; overflow: hidden; padding: 3px 6px; border: 1px solid currentColor; border-radius: 5px; text-overflow: ellipsis; white-space: nowrap; font-weight: 850; }
.spcc-rsm-0 { background: #e0f2fe; color: #075985; }
.spcc-rsm-1 { background: #f3e8ff; color: #6b21a8; }
.spcc-rsm-2 { background: #dcfce7; color: #166534; }
.spcc-rsm-3 { background: #ffedd5; color: #9a3412; }
.spcc-rsm-4 { background: #ffe4e6; color: #9f1239; }
.spcc-rsm-5 { background: #fef9c3; color: #854d0e; }
.sourcing-mode table.pd-table.spcc-table .spcc-cell-assigned,
.sourcing-mode table.pd-table.spcc-table .spcc-cell-active { color: #075f57; font-weight: 850; }
.sourcing-mode table.pd-table.spcc-table .spcc-cell-dead,
.sourcing-mode table.pd-table.spcc-table .spcc-cell-coverage { color: #a32235; font-weight: 850; }
.sourcing-mode table.pd-table.spcc-table .spcc-cell-live { color: #9a6200; font-weight: 850; }
.sourcing-mode table.pd-table.spcc-table .spcc-cell-perexec { color: #1d4ed8; font-weight: 850; }
.sourcing-mode table.pd-table.spcc-table tbody tr.spcc-total td { color: #111827 !important; }
@media (max-width: 1050px) {
  .sourcing-mode table.pd-table.spcc-table { min-width: 940px; table-layout: auto; }
}
.sourcing-mode .spcc-table tbody tr.drill { transition: background-color 150ms ease, box-shadow 150ms ease; }
@media (hover: hover) and (pointer: fine) {
  .sourcing-mode .spcc-table tbody tr.drill:hover td { background: #e7f5f0; }
  .sourcing-mode .spcc-table tbody tr.drill:hover .go { color: #0b7469; }
  .sourcing-mode .spcc-table tbody tr.spcc-risk:hover td { background: #f9dadd !important; }
  .sourcing-mode .spcc-table tbody tr.spcc-watch:hover td { background: #ffedcc !important; }
  .sourcing-mode .spcc-table tbody tr.spcc-good:hover td { background: #d7f0df !important; }
}
.sourcing-mode .spcc-table tbody tr.drill:active td { background: #d7eee6; }
.sourcing-mode .spcc-kpis .spcc-kpi-pct { margin-left: 7px; font-size: .62em; font-weight: 900; letter-spacing: -.02em; vertical-align: middle; white-space: nowrap; }
.sourcing-mode .spcc-kpis .spcc-kpi-pct-red { color: #c91d35; }
.sourcing-mode .spcc-kpis .spcc-kpi-pct-orange { color: #c2410c; }
.sourcing-mode .spcc-kpis .spcc-kpi-pct-green { color: #078a4b; }
.sourcing-mode .spcc-kpis .spcc-kpi { min-height: 0; padding: 9px 12px; overflow: visible; }
.sourcing-mode .spcc-kpis .spcc-kpi-blue { border-color: #93c5fd; background: #f5f9ff; }
.sourcing-mode .spcc-kpis .spcc-kpi-orange { border-color: #fdba74; background: #fff8f0; }
.sourcing-mode .spcc-kpis .spcc-kpi-green { border-color: #86d6a5; background: #f0fbf6; }
.sourcing-mode .spcc-kpis .spcc-kpi-yellow { border-color: #facc15; background: #fffdf0; }
.sourcing-mode .spcc-kpis .spcc-kpi-blue::before,
.sourcing-mode .spcc-kpis .spcc-kpi-orange::before,
.sourcing-mode .spcc-kpis .spcc-kpi-green::before,
.sourcing-mode .spcc-kpis .spcc-kpi-yellow::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; }
.sourcing-mode .spcc-kpis .spcc-kpi-blue::before { background: #2563eb; }
.sourcing-mode .spcc-kpis .spcc-kpi-orange::before { background: #c2410c; }
.sourcing-mode .spcc-kpis .spcc-kpi-green::before { background: #15803d; }
.sourcing-mode .spcc-kpis .spcc-kpi-yellow::before { background: #ca8a04; }
.sourcing-mode .spcc-kpis .kpi-top { margin-bottom: 4px; }
.sourcing-mode .spcc-kpis .kpi-label { font-size: 10px; }
.sourcing-mode .spcc-kpis .kpi-val { font-size: 23px; }
.sourcing-mode .spcc-kpis .spcc-kpi-detail { overflow: hidden; margin-top: 4px; color: #334155; font-size: 10.5px; font-weight: 800; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
/* Anmol, 25-09-2026: "add here a arrow, from last report its increased or
   decrease... dead increase red decrease green, active opposite" */
.spcc-kpi-delta { display: inline-flex; align-items: center; gap: 3px; margin-left: 7px; padding: 3px 9px; border: 1.5px solid; border-radius: 999px; font-size: 13px; font-weight: 800; vertical-align: middle; }
.spcc-kpi-delta.good { color: #166534; background: #f0fdf4; border-color: #15803d; }
.spcc-kpi-delta.bad { color: #991b1b; background: #fef2f2; border-color: #b91c1c; }
.spcc-kpi-delta.flat { color: #334155; background: #f8fafc; border-color: #64748b; }
.spcc-kpi-delta-ic { flex: 0 0 auto; fill: currentColor; }
.spcc-kpi-delta-ic-down { transform: rotate(180deg); }
.spcc-kpi-delta-ic-flat { transform: rotate(90deg); }
.sourcing-mode .spcc-kpi-tip { position: relative; display: inline-grid; place-items: center; width: 17px; height: 17px; padding: 0; border: 1px solid #0f766e; border-radius: 50%; background: #ffffff; color: #0f766e; font: 800 11px/1 var(--sans); cursor: help; }
.sourcing-mode .spcc-kpi-tip::after { content: attr(data-tooltip); position: absolute; z-index: 90; right: 0; bottom: calc(100% + 8px); width: max-content; max-width: 260px; padding: 7px 9px; border: 1px solid #111827; border-radius: 6px; background: #111827; color: #ffffff; font: 700 11px/1.35 var(--sans); text-align: left; opacity: 0; pointer-events: none; transform: translateY(3px); transition: opacity 150ms ease, transform 150ms ease; }
.sourcing-mode .spcc-kpi-tip:hover::after, .sourcing-mode .spcc-kpi-tip:focus-visible::after { opacity: 1; transform: translateY(0); }
.sourcing-mode .spcc-kpi-tip:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

/* Sourcing Point: View card -- next-level-only quality breakdown for one
   row (RSM/ASM shows Zone/State, Zone shows SM, SM shows Executive). */
/* View pill: same red/orange/green rule as every other risk signal on
   this page (Anmol, 24-09-2026): danger red, watch orange, and green when
   over 80% of a row's points are Active OR it has zero Dead points.
   Rounded-pill shape matches the Target page's own View buttons. */
.spcc-view-btn { padding: 4px 14px; border: 1.5px solid; border-radius: 999px; background: #ffffff; font: 800 11px/1.2 var(--sans); cursor: pointer; }
.spcc-view-btn-risk { border-color: #dc2626; color: #b91c1c; }
.spcc-view-btn-risk:hover { background: #fef2f2; }
.spcc-view-btn-watch { border-color: #ea580c; color: #c2410c; }
.spcc-view-btn-watch:hover { background: #fff7ed; }
.spcc-view-btn-good { border-color: #16a34a; color: #15803d; }
.spcc-view-btn-good:hover { background: #f0fdf4; }
.spcc-view-btn-neutral { border-color: #94a3b8; color: #475569; }
.spcc-view-btn-neutral:hover { background: #f8fafc; }
.spcc-h-view, .spcc-cell-view { width: 72px; max-width: 72px; text-align: center; padding-left: 4px; padding-right: 4px; }
.spcc-view-modal { width: min(820px, 96vw); max-height: calc(100vh - 32px); overflow: hidden; border: 3px solid #0f766e; background: #f8fffd; box-shadow: 0 24px 56px rgba(8, 60, 56, .32); }
.spcc-view-modal:has(.spcc-view-badge-risk) { border-color: #dc2626; }
.spcc-view-modal:has(.spcc-view-badge-watch) { border-color: #ea580c; }
.spcc-view-modal:has(.spcc-view-badge-good) { border-color: #16a34a; }
.spcc-view-modal > header { position: relative; padding-bottom: 10px; }
.spcc-view-modal h2 { display: flex; align-items: center; gap: 8px; font-size: 21px; }
.spcc-view-badge { padding: 3px 10px; border: 1.5px solid; border-radius: 999px; font-size: 11px; font-weight: 800; }
.spcc-view-badge-risk { background: #fee2e2; border-color: #dc2626; color: #b91c1c; }
.spcc-view-badge-watch { background: #ffedd5; border-color: #ea580c; color: #c2410c; }
.spcc-view-badge-good { background: #dcfce7; border-color: #16a34a; color: #15803d; }
.spcc-view-badge-neutral { background: #f1f5f9; border-color: #94a3b8; color: #475569; }
.spcc-view-body { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; }
.spcc-view-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.spcc-view-tile { position: relative; min-height: 72px; overflow: visible; padding: 8px 9px; border: 1.5px solid #8fd1c5; border-radius: 10px; background: #ffffff; box-shadow: 0 7px 15px -15px rgba(6, 78, 73, .7); }
.spcc-view-tile:nth-child(2) { border-color: #93c5fd; background: #f5f9ff; }
.spcc-view-tile:nth-child(4) { border-color: #fdba74; background: #fff8ef; }
.spcc-view-tile-danger { border-color: #ef4444; background: #fff1f2; box-shadow: 0 9px 18px -15px rgba(185, 28, 28, .85); }
.spcc-view-tile-status-dead { border-color: #ef4444; background: #fff1f2; }
.spcc-view-tile-status-live { border-color: #fb923c; background: #fff7ed; }
.spcc-view-tile-status-active { border-color: #22c55e; background: #f0fdf4; }
.spcc-view-tile-status-mixed { border-color: #94a3b8; background: #f8fafc; }
.spcc-view-tile-status-dead .spcc-view-tile-val { color: #b91c1c; }
.spcc-view-tile-status-live .spcc-view-tile-val { color: #c2410c; }
.spcc-view-tile-status-active .spcc-view-tile-val { color: #15803d; }
.spcc-view-tile-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 2px; }
.spcc-view-tile-head span { font-size: 10.5px; font-weight: 750; color: #33544d; letter-spacing: .01em; }
.spcc-view-tile-val { font-size: 21px; font-weight: 900; letter-spacing: -.025em; color: #0b3f3b; }
.spcc-view-tile-danger .spcc-view-tile-val { color: #b91c1c; }
.spcc-view-tile-sub { margin-top: 2px; font-size: 10.5px; font-weight: 650; color: #5b6f6a; }
.spcc-view-tip { width: 15px; height: 15px; font-size: 10px; }
.sourcing-mode .spcc-view-tip::after { top: calc(100% + 7px); bottom: auto; left: 0; right: auto; width: min(280px, 70vw); z-index: 30; }
.sourcing-mode .spcc-view-tile:nth-child(n+3) .spcc-view-tip::after { left: auto; right: 0; }
.sourcing-mode .spcc-view-info::after { top: calc(100% + 7px); bottom: auto; left: 0; right: auto; width: min(300px, 72vw); z-index: 40; }
.spcc-view-modal > header p { display: flex; align-items: center; gap: 5px; }
.spcc-view-info { flex: 0 0 auto; margin-left: 2px; }
.spcc-view-split { padding: 7px 9px; border: 1px solid #fed7aa; border-radius: 10px; background: #fffaf5; }
.spcc-view-bar { height: 8px; border-radius: 999px; background: #fb923c; overflow: hidden; border: 1px solid #c2410c; }
.spcc-view-bar-fill { height: 100%; background: #dc2626; }
.spcc-view-bar-labels { display: flex; justify-content: space-between; gap: 12px; margin-top: 4px; font-size: 10px; font-weight: 750; }
.spcc-view-bar-labels span:first-child { color: #b91c1c; }
.spcc-view-bar-labels span:last-child { color: #9a3412; text-align: right; }
.spcc-view-bar-labels b { font-weight: 900; }
.spcc-view-main { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 8px; }
.spcc-view-panel { min-width: 0; padding: 9px; border: 1px solid #b8d9d3; border-radius: 10px; background: #ffffff; }
.spcc-view-next-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 11.5px; font-weight: 800; color: #0b3f3b; }
.spcc-view-next-head span { font-size: 10px; font-weight: 650; color: #5b6f6a; text-transform: uppercase; letter-spacing: .04em; }
.spcc-view-next-head > div { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.spcc-view-peer { display: grid; grid-template-columns: minmax(105px, .9fr) minmax(90px, 1fr) auto; align-items: center; gap: 7px; min-height: 30px; padding: 4px 6px; border-radius: 7px; color: #142f2c; font-size: 11px; font-weight: 750; }
.spcc-view-peer.selected { background: #e0f2fe; outline: 1px solid #60a5fa; }
.spcc-view-peer > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spcc-view-peer-track { height: 8px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.spcc-view-peer-track i { display: block; height: 100%; border-radius: inherit; }
.spcc-view-peer-risk { background: #ef4444; }
.spcc-view-peer-watch { background: #f59e0b; }
.spcc-view-peer-good { background: #22c55e; }
.spcc-view-peer b { min-width: 68px; text-align: right; font-weight: 900; }
.spcc-view-peer em { color: #5b6f6a; font-style: normal; font-weight: 650; }
.spcc-view-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 7px; border: 1.5px solid; border-radius: 8px; margin-bottom: 5px; font-size: 11.5px; font-weight: 750; }
.spcc-view-child-name { display: inline-flex; align-items: center; min-width: 0; gap: 7px; }
.spcc-view-child-name i { display: inline-grid; flex: 0 0 auto; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #475569; color: #ffffff; font-size: 10px; font-style: normal; font-weight: 900; }
.spcc-view-child b { font-weight: 800; }
.spcc-view-child em { font-style: normal; font-weight: 600; opacity: .75; }
.spcc-view-child-risk { background: #fef2f2; border-color: #dc2626; color: #b91c1c; }
.spcc-view-child-watch { background: #fff7ed; border-color: #ea580c; color: #c2410c; }
.spcc-view-child-good { background: #f0fdf4; border-color: #16a34a; color: #15803d; }
.spcc-view-child-neutral { background: #f8fafc; border-color: #94a3b8; color: #475569; }
.spcc-view-child-risk .spcc-view-child-name i { background: #dc2626; }
.spcc-view-child-watch .spcc-view-child-name i { background: #ea580c; }
.spcc-view-child-good .spcc-view-child-name i { background: #16a34a; }
.spcc-view-more { margin: 2px 2px 0; color: #5b6f6a; font-size: 10.5px; font-weight: 700; }
.spcc-view-empty { margin: 0; font-size: 12px; color: #5b6f6a; }
.spcc-sales-action { margin-bottom: 6px; padding: 7px 8px; border: 1.5px solid; border-radius: 9px; }
.spcc-sales-action-improving { background: #f0fdf4; border-color: #22c55e; color: #15803d; }
.spcc-sales-action-worse { background: #fff1f2; border-color: #ef4444; color: #b91c1c; }
.spcc-sales-action-same { background: #f8fafc; border-color: #94a3b8; color: #475569; }
.spcc-sales-action-risk { background: #fff1f2; border-color: #ef4444; color: #b91c1c; }
.spcc-sales-action-watch { background: #fff7ed; border-color: #f97316; color: #c2410c; }
.spcc-sales-action header { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; }
.spcc-sales-action header > span { display: inline-flex; align-items: center; gap: 6px; font-weight: 900; }
.spcc-sales-action header i { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: currentColor; color: #fff; font-size: 10px; font-style: normal; }
.spcc-sales-action header > b { font-size: 10px; white-space: nowrap; }
.spcc-sales-action-metrics { display: flex; justify-content: space-between; gap: 8px; margin-top: 5px; padding-top: 5px; border-top: 1px solid currentColor; font-size: 10px; }
.spcc-sales-action-metrics span:last-child { text-align: right; font-weight: 800; }
.spcc-sales-action-metrics em { font-style: normal; opacity: .75; }
.spcc-sales-action p { margin: 4px 0 0; font-size: 10px; font-weight: 750; }
.spcc-overall-performance { color: #334155; }
.spcc-view-next { align-self: start; }
.spcc-performance-compact { padding: 8px 1px 2px; color: #334155; font-variant-numeric: tabular-nums; }
.spcc-performance-compact-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.spcc-performance-compact-head strong { font-size: 18px; line-height: 1.1; }
.spcc-performance-compact-head span { color: #475569; font-size: 10px; font-weight: 800; white-space: nowrap; }
.spcc-performance-compact-worse .spcc-performance-compact-head strong { color: #b91c1c; }
.spcc-performance-compact-improving .spcc-performance-compact-head strong { color: #15803d; }
.spcc-performance-compact-same .spcc-performance-compact-head strong { color: #475569; }
.spcc-performance-compact-metrics { display: grid; gap: 0; }
.spcc-performance-compact-metrics > div { display: grid; grid-template-columns: minmax(0, 1fr) auto 34px; align-items: center; gap: 7px; min-height: 29px; border-top: 1px solid #e2e8f0; font-size: 11px; }
.spcc-performance-compact-metrics span { font-weight: 750; }
.spcc-performance-compact-metrics b { white-space: nowrap; }
.spcc-performance-compact-metrics em { font-style: normal; font-weight: 900; text-align: right; }
.spcc-compact-delta-bad { color: #b91c1c; }
.spcc-compact-delta-good { color: #15803d; }
.spcc-compact-delta-same { color: #475569; }
.spcc-performance-compact p { margin: 3px 0; font-size: 11px; }
.spcc-performance-summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 5px; font-size: 11px; }
.spcc-performance-summary span { display: grid; gap: 1px; }
.spcc-performance-summary b { font-size: 13px; }
.spcc-performance-summary em { font-style: normal; font-weight: 700; }
.spcc-performance-summary small { color: #64748b; font-size: 10px; font-weight: 800; white-space: nowrap; }
.spcc-overall-performance-improving .spcc-performance-summary b { color: #15803d; }
.spcc-overall-performance-worse .spcc-performance-summary b { color: #b91c1c; }
.spcc-overall-performance-same .spcc-performance-summary b { color: #475569; }
.spcc-performance-chart { position: relative; height: 112px; overflow: hidden; border-bottom: 1px solid #cbd5e1; font-variant-numeric: tabular-nums; }
.spcc-performance-axis { position: absolute; inset: 4px auto 20px 0; z-index: 2; display: flex; flex-direction: column; justify-content: space-between; color: #64748b; font-size: 8px; font-weight: 800; }
.spcc-performance-grid { position: absolute; inset: 8px 0 20px 28px; display: grid; grid-template-rows: repeat(3, 1fr); pointer-events: none; }
.spcc-performance-grid i { border-top: 1px dashed #dbe4ee; }
.spcc-performance-grid i:last-child { border-bottom: 1px dashed #dbe4ee; }
.spcc-performance-bars { position: absolute; inset: 8px 14px 20px 28px; display: flex; align-items: end; justify-content: space-around; }
.spcc-performance-bars > div { position: relative; display: flex; align-items: end; justify-content: center; width: 42px; height: 100%; }
.spcc-performance-bars > div > strong { position: absolute; z-index: 4; transform: translateY(-2px); color: #b91c1c; font-size: 10px; font-weight: 900; white-space: nowrap; }
.spcc-performance-bars > div > strong em { font-size: 8.5px; font-style: normal; font-weight: 800; }
.spcc-performance-bars b { width: 24px; min-height: 2px; border-radius: 7px 7px 2px 2px; box-shadow: 0 5px 10px -7px rgba(15, 23, 42, .55); }
.spcc-performance-bars span { position: absolute; top: calc(100% + 5px); color: #475569; font-size: 9px; font-weight: 900; white-space: nowrap; }
.spcc-performance-chart svg { position: absolute; z-index: 3; inset: 8px 14px 20px 28px; width: calc(100% - 42px); height: calc(100% - 28px); overflow: visible; pointer-events: none; }
.spcc-performance-chart polyline { fill: none; stroke: #16a34a; stroke-width: 3; vector-effect: non-scaling-stroke; }
.spcc-performance-chart circle { fill: #ffffff; stroke: #16a34a; stroke-width: 3; vector-effect: non-scaling-stroke; }
.spcc-performance-line-label { position: absolute; z-index: 5; transform: translate(-50%, -115%); padding: 1px 4px; border: 1px solid #86efac; border-radius: 5px; background: #f0fdf4; color: #15803d; font-size: 9px; font-weight: 900; white-space: nowrap; }
.spcc-performance-line-label em { font-size: 8px; font-style: normal; }
.spcc-performance-line-label-left { left: calc(28px + (100% - 42px) * .25); }
.spcc-performance-line-label-right { left: calc(28px + (100% - 42px) * .75); }
.spcc-active-down .spcc-performance-chart polyline, .spcc-active-down .spcc-performance-chart circle { stroke: #dc2626; }
.spcc-active-down .spcc-performance-line-label { border-color: #fca5a5; background: #fff1f2; color: #b91c1c; }
.spcc-active-same .spcc-performance-chart polyline, .spcc-active-same .spcc-performance-chart circle { stroke: #f97316; }
.spcc-active-same .spcc-performance-line-label { border-color: #fdba74; background: #fff7ed; color: #c2410c; }
.spcc-dead-up .spcc-performance-bars b { background: #dc2626; }
.spcc-dead-up .spcc-performance-bars .spcc-dead-bar-previous { background: #f87171; }
.spcc-dead-down .spcc-performance-bars b { background: #f97316; }
.spcc-dead-down .spcc-performance-bars .spcc-dead-bar-previous { background: #fdba74; }
.spcc-dead-same .spcc-performance-bars b { background: #64748b; }
.spcc-dead-down .spcc-performance-bars > div > strong { color: #c2410c; }
.spcc-dead-same .spcc-performance-bars > div > strong { color: #475569; }
.spcc-performance-values { display: grid; gap: 2px; margin-top: 7px; font-size: 9.5px; font-variant-numeric: tabular-nums; }
.spcc-performance-values-head, .spcc-performance-value-row { display: grid; grid-template-columns: .72fr 1.15fr 1.15fr .55fr; align-items: center; gap: 5px; }
.spcc-performance-values-head { color: #64748b; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.spcc-performance-value-row { min-height: 20px; padding: 2px 4px; border-radius: 5px; background: #f8fafc; }
.spcc-performance-value-row span, .spcc-performance-value-row em { text-align: right; white-space: nowrap; }
.spcc-performance-value-row em { padding: 1px 4px; border-radius: 4px; font-style: normal; font-weight: 900; }
.spcc-performance-value-dead b { color: #b91c1c; }
.spcc-performance-value-live b { color: #0369a1; }
.spcc-performance-value-active b { color: #15803d; }
.spcc-delta-bad { background: #fee2e2; color: #b91c1c; }
.spcc-delta-good { background: #dcfce7; color: #15803d; }
.spcc-delta-watch { background: #ffedd5; color: #c2410c; }
.spcc-delta-same { background: #e2e8f0; color: #475569; }
.spcc-simple-trend { padding-top: 5px; border-top: 1px solid #dbe4ee; }
.spcc-simple-trend + .spcc-simple-trend { margin-top: 6px; }
.spcc-simple-trend-head { display: flex; align-items: center; justify-content: space-between; font-size: 10px; }
.spcc-simple-trend-head > b { color: #334155; }
.spcc-simple-trend-head > em, .spcc-live-summary > em { min-width: 28px; padding: 1px 5px; border-radius: 5px; font-style: normal; font-weight: 900; text-align: center; }
.spcc-active-line-chart { position: relative; height: 62px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.spcc-active-line-chart svg { position: absolute; inset: 12px 0 13px; width: 100%; height: 42px; overflow: visible; }
.spcc-active-line-chart line { stroke: #cbd5e1; stroke-width: 1; vector-effect: non-scaling-stroke; }
.spcc-active-line-chart polyline { fill: none; stroke: #16a34a; stroke-width: 3; vector-effect: non-scaling-stroke; }
.spcc-active-line-chart circle { fill: #ffffff; stroke: #16a34a; stroke-width: 3; vector-effect: non-scaling-stroke; }
.spcc-active-down .spcc-active-line-chart polyline, .spcc-active-down .spcc-active-line-chart circle { stroke: #dc2626; }
.spcc-active-same .spcc-active-line-chart polyline, .spcc-active-same .spcc-active-line-chart circle { stroke: #f97316; }
.spcc-simple-label { position: absolute; top: 0; transform: translateX(-50%); color: #15803d; font-size: 10px; font-weight: 900; white-space: nowrap; }
.spcc-simple-label em, .spcc-dead-bar-chart strong em { font-size: 8.5px; font-style: normal; }
.spcc-simple-label-left, .spcc-simple-month-left { left: 18%; }
.spcc-simple-label-right, .spcc-simple-month-right { left: 82%; }
.spcc-active-down .spcc-simple-label { color: #b91c1c; }
.spcc-active-same .spcc-simple-label { color: #c2410c; }
.spcc-simple-month { position: absolute; bottom: 0; transform: translateX(-50%); color: #64748b; font-size: 8.5px; font-weight: 850; white-space: nowrap; }
.spcc-dead-bar-chart { display: flex; align-items: end; justify-content: space-around; height: 66px; margin-top: 2px; padding: 0 28px; border-bottom: 1px solid #cbd5e1; font-variant-numeric: tabular-nums; }
.spcc-dead-bar-chart > div { position: relative; display: flex; align-items: end; justify-content: center; width: 46px; height: 46px; }
.spcc-dead-bar-chart strong { position: absolute; bottom: calc(100% + 2px); color: #b91c1c; font-size: 10px; font-weight: 900; white-space: nowrap; }
.spcc-dead-bar-chart i { display: block; width: 26px; min-height: 2px; border-radius: 6px 6px 1px 1px; background: #dc2626; }
.spcc-dead-bar-chart span { position: absolute; top: calc(100% + 4px); color: #64748b; font-size: 8.5px; font-weight: 850; white-space: nowrap; }
.spcc-dead-up .spcc-dead-bar-chart .spcc-dead-bar-previous { background: #f87171; }
.spcc-dead-down .spcc-dead-bar-chart i { background: #f97316; }
.spcc-dead-down .spcc-dead-bar-chart .spcc-dead-bar-previous { background: #fdba74; }
.spcc-dead-down .spcc-dead-bar-chart strong { color: #c2410c; }
.spcc-dead-same .spcc-dead-bar-chart i { background: #64748b; }
.spcc-dead-same .spcc-dead-bar-chart strong { color: #475569; }
.spcc-live-summary { display: grid; grid-template-columns: .8fr 1.8fr auto; align-items: center; gap: 6px; margin-top: 7px; padding: 5px 7px; border-radius: 6px; background: #eff6ff; color: #334155; font-size: 9.5px; font-variant-numeric: tabular-nums; }
.spcc-live-summary b { color: #0369a1; }
.spcc-live-summary span { text-align: center; white-space: nowrap; }
.spcc-live-summary em { background: #dbeafe; color: #1e40af; }
.spcc-view-insight { padding: 9px 11px; border: 0; border-radius: 10px; background: #0f766e; color: #ffffff; box-shadow: 0 12px 24px -18px rgba(6, 78, 73, .9); font-size: 11.5px; font-weight: 700; line-height: 1.42; }
.spcc-view-insight span { display: flex; align-items: center; gap: 5px; margin-bottom: 3px; color: #bff4e7; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.spcc-view-insight .spcc-view-info { border-color: #bff4e7; background: transparent; color: #ffffff; }
.spcc-view-insight p { margin: 0; }
@media (max-width: 760px) {
  .spcc-view-modal { width: calc(100vw - 20px); max-height: calc(100vh - 20px); overflow: auto; }
  .spcc-view-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spcc-view-main { grid-template-columns: 1fr; }
  .sourcing-mode .spcc-view-tile:nth-child(odd) .spcc-view-tip::after { left: 0; right: auto; }
  .sourcing-mode .spcc-view-tile:nth-child(even) .spcc-view-tip::after { left: auto; right: 0; }
}

.sourcing-mode #sectionNav button[data-section="sourcing"]:active,
.sourcing-mode .crumb:active { transform: scale(.98); }
@media (prefers-reduced-motion: reduce) {
  .sourcing-mode .spcc-table tbody tr.drill,
  .sourcing-mode #sectionNav button[data-section="sourcing"],
  .sourcing-mode .crumb { transition-duration: 0ms; }
}

/* Shared dashboard control language: high-contrast, bold, and consistent
   across Overview, Target, Quality, People & Risk, and Sourcing Point. */
.filter-group-head h3,
.filter-group-head p,
.ctl label,
.ctl select,
.ctl input,
.ctl input::placeholder,
.crumb { color: #111827; font-weight: 750; }
.ctl input::placeholder { opacity: 1; }
.crumb.on {
  background: #ffffff;
  border: 1px solid #111827;
  color: #000000;
  font-weight: 850;
}

/* Sourcing appearance: independent from report/export styles and Target. */
.sourcing-mode { --ease-out-strong: cubic-bezier(.23, 1, .32, 1); }

.sourcing-mode .spcc-visual-controls label { font-weight: 800; margin-right: 4px; }
.sourcing-mode .spcc-visual-controls :is(button, select) {
  min-height: 36px; padding: 6px 12px; border: 1px solid #466c65;
  border-radius: 7px; background: #f0f9f6; color: #102d2b; font: inherit;
  font-weight: 700; cursor: pointer;
}
.sourcing-mode .spcc-visual-controls button:disabled { opacity: .5; cursor: not-allowed; }
.sourcing-mode .spcc-motion-hint { margin-left: auto; color: #415b57; font-size: 12px; }
.sourcing-mode[data-sp-style] #sectionBody > .focus {
  position: relative; isolation: isolate; overflow: hidden; border: 1px solid #3b9e90;
  box-shadow: 0 8px 0 #084d47, 0 22px 30px -20px #0c514d;
}
.sourcing-mode[data-sp-style] #sectionBody > .focus::after {
  content: ""; position: absolute; z-index: -1; width: 210px; height: 210px;
  right: -35px; top: -100px; border: 24px solid #ffffff1c; border-radius: 40px;
  transform: rotate(30deg); pointer-events: none;
}
.sourcing-mode[data-sp-style] .spcc-kpis .spcc-kpi {
  position: relative; border-radius: 12px; border-bottom-width: 3px;
  box-shadow: 0 5px 0 #c6dcd7, 0 12px 16px -12px #24564e;
}
.sourcing-mode[data-sp-style="midnight"] { background: #e9edf5; }
.sourcing-mode[data-sp-style="midnight"] #sectionBody > .focus {
  background: #14233d; border-color: #637ba5;
  box-shadow: 0 8px 0 #090f1c, 0 22px 30px -20px #14233d;
}
.sourcing-mode[data-sp-style="midnight"] .spcc-visual-controls { border-color: #94a3bf; background: #f7f9ff; }
.sourcing-mode[data-sp-style="midnight"] .spcc-kpis .spcc-kpi { box-shadow: 0 5px 0 #afbdd4, 0 12px 16px -12px #14233d; }
.sourcing-mode[data-sp-style="paper"] { background: #f4efe4; }
.sourcing-mode[data-sp-style="paper"] #sectionBody > .focus {
  background: #fff9ec; border: 2px solid #352e23; border-radius: 4px;
  box-shadow: 6px 6px 0 #b8a786;
}
.sourcing-mode[data-sp-style="paper"] #sectionBody > .focus :is(h1,p) { color: #352e23; }
.sourcing-mode[data-sp-style="paper"] #sectionBody > .focus::after { border-color: #b8a78640; border-radius: 0; }
.sourcing-mode[data-sp-style="paper"] .spcc-visual-controls { background: #fff9ec; border-color: #b8a786; border-radius: 4px; }
.sourcing-mode[data-sp-style="paper"] .spcc-kpis .spcc-kpi { border-radius: 4px; box-shadow: 4px 4px 0 #c8baa0; }
@keyframes spcc-detail-enter {
  from { opacity: 0; transform: translateY(20px) scale(.96); }
  to { opacity: 1; transform: none; }
}
@keyframes spcc-backdrop-enter { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .sourcing-mode[data-sp-motion="on"] .spcc-notes-overlay { animation: spcc-backdrop-enter 200ms ease; }
  .sourcing-mode[data-sp-motion="on"] .spcc-notes-overlay > .spcc-notes-modal {
    animation: spcc-detail-enter 280ms var(--ease-out-strong); transform-origin: center;
  }
  .sourcing-mode[data-sp-motion="on"] :is(.spcc-card-actions, .spcc-visual-controls, .spcc-notes-modal) button,
  .sourcing-mode[data-sp-motion="on"] .spcc-crumb {
    transition: transform 160ms var(--ease-out-strong);
  }
  .sourcing-mode[data-sp-motion="on"] :is(.spcc-card-actions, .spcc-visual-controls, .spcc-notes-modal) button:active,
  .sourcing-mode[data-sp-motion="on"] .spcc-crumb:active { transform: scale(.96); }
  @media (hover: hover) and (pointer: fine) {
    .sourcing-mode[data-sp-motion="on"] .spcc-kpis .spcc-kpi {
      transition: transform 200ms var(--ease-out-strong);
    }
    .sourcing-mode[data-sp-motion="on"] .spcc-kpis .spcc-kpi:hover {
      transform: perspective(900px) translateY(-7px) rotateX(5deg) rotateY(-3deg);
      z-index: 3;
    }
    .sourcing-mode[data-sp-motion="on"] .spcc-kpis .spcc-kpi:active { transform: perspective(900px) translateY(-2px) scale(.98); }
  }
}
/* Never move keyboard-focused controls, tables, or exported reports. */
.sourcing-mode:has(:focus-visible) .spcc-notes-overlay,
.sourcing-mode:has(:focus-visible) .spcc-notes-modal { animation: none !important; }
.sourcing-mode button:focus-visible,
.sourcing-mode .spcc-kpis .spcc-kpi:has(:focus-visible) { transition: none !important; transform: none !important; }
.sourcing-mode[data-sp-motion="off"] .spcc-notes-overlay,
.sourcing-mode[data-sp-motion="off"] .spcc-notes-modal { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .sourcing-mode .spcc-notes-overlay, .sourcing-mode .spcc-notes-modal,
  .sourcing-mode .spcc-kpis .spcc-kpi { animation: none !important; transform: none !important; transition: none !important; }
}
@media (max-width: 600px) { .sourcing-mode .spcc-motion-hint { width: 100%; margin-left: 0; } }

/* Sourcing Point: clickable health KPI MIS. */
.sourcing-mode .spcc-kpis .spcc-kpi-clickable { cursor: pointer; }
.sourcing-mode .spcc-kpis .spcc-kpi-clickable:hover { box-shadow: inset 0 0 0 2px rgba(15, 118, 110, .35); }
.spcc-health-mis-modal { position: relative; isolation: isolate; display: flex; flex-direction: column; box-sizing: border-box; width: min(920px, 96vw); height: calc(100vh - 48px); max-height: calc(100vh - 48px); overflow: hidden; padding: 12px; border: 2px solid #000000 !important; border-radius: 4px; }
.spcc-health-mis-modal > header { position: relative; top: auto; z-index: 20; display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 0 0 8px; background: #f7fcfa; }
.spcc-health-mis-modal > header button { flex: 0 0 auto; }
.spcc-health-mis-modal h2 span { margin-left: 6px; color: #b91c1c; }
.spcc-health-insights { display: grid; flex: 0 0 auto; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 2px 0 6px; }
.spcc-health-insight { position: relative; min-width: 0; padding: 7px 9px; border: 2px solid #94a3b8; border-radius: 6px; background: #ffffff; color: #111827; cursor: help; }
.spcc-health-insight b, .spcc-health-insight strong, .spcc-health-insight span { display: block; }
.spcc-health-insight b { margin-bottom: 2px; font-size: 10px; font-weight: 900; letter-spacing: .02em; text-transform: uppercase; }
.spcc-health-insight strong { overflow: hidden; font-size: 14px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.spcc-health-insight span { margin-top: 2px; font-size: 11px; font-weight: 700; line-height: 1.3; }
.spcc-health-insight em { display: block; margin-top: 4px; color: #475569; font-size: 10px; font-style: normal; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.spcc-health-insight::after { content: attr(data-tooltip); position: absolute; z-index: 25; left: 0; bottom: calc(100% + 7px); width: max-content; max-width: min(420px, 78vw); padding: 8px 10px; border: 1px solid #111827; border-radius: 6px; background: #111827; color: #ffffff; font-size: 11px; font-weight: 750; line-height: 1.35; text-align: left; white-space: normal; opacity: 0; pointer-events: none; transform: translateY(3px); transition: opacity 120ms ease, transform 120ms ease; }
.spcc-health-insight:hover::after, .spcc-health-insight:focus-visible::after { opacity: 1; transform: translateY(0); }
.spcc-health-insight:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.spcc-health-mis-dead .spcc-health-insight { border-color: #ef4444; background: #fff7f7; }
.spcc-health-mis-live .spcc-health-insight { border-color: #ea580c; background: #fff7ed; }
.spcc-health-mis-active .spcc-health-insight { border-color: #16a34a; background: #f0fdf4; }
.spcc-health-insight-note { flex: 0 0 auto; margin: 0 0 8px; color: #334155; font-size: 11px; font-weight: 700; }
.spcc-legacy-mis-wrap { min-height: 0; flex: 1 1 auto; overflow: auto; overscroll-behavior: contain; border: 2px solid #000000; border-radius: 0; }
.spcc-legacy-mis-table { width: 100%; border-collapse: collapse; font-size: 12px; color: #000000; background: #ffffff; }
.spcc-health-mis-modal .spcc-legacy-mis-table thead th, .spcc-health-mis-modal .spcc-legacy-mis-table td:first-child { position: static; z-index: auto; }
.spcc-legacy-mis-table th, .spcc-legacy-mis-table td { padding: 3px 7px; height: 24px; border-right: 1px solid #000000; border-bottom: 1px solid #000000; font-weight: 700; text-align: center; }
.spcc-legacy-mis-table td.legacy-mis-name, .spcc-legacy-mis-table th.legacy-mis-name { text-align: left; }
.spcc-legacy-mis-table td.legacy-mis-name { background: #ffffff; font-weight: 750; }
.spcc-legacy-mis-table thead th { position: sticky; top: 0; z-index: 1; background: #ffc000; font-weight: 900; }
.spcc-health-mis-modal .spcc-legacy-mis-table thead th.spcc-health-tooltip { position: relative; z-index: 3; cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; }
.spcc-health-tooltip::after { content: attr(data-tooltip); position: absolute; z-index: 20; top: calc(100% + 5px); left: 50%; width: max-content; max-width: min(330px, 70vw); padding: 7px 9px; border: 1px solid #111827; border-radius: 5px; background: #111827; color: #ffffff; font-size: 11px; font-weight: 750; line-height: 1.35; text-align: left; white-space: normal; opacity: 0; pointer-events: none; transform: translate(-50%, -3px); transition: opacity 120ms ease, transform 120ms ease; }
.spcc-health-tooltip:hover::after, .spcc-health-tooltip:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.spcc-health-tooltip:focus-visible { outline: 3px solid #2563eb; outline-offset: -3px; }
.spcc-legacy-mis-table tbody tr.legacy-mis-zone-karnataka td { background: #ffc000; font-weight: 900; }
.spcc-legacy-mis-table tbody tr.legacy-mis-zone td { background: #ed7d31; font-weight: 900; }
.spcc-legacy-mis-table tbody tr.legacy-mis-state-total td { background: #ed7d31; font-weight: 900; border-top: 2px solid #000000; }
.spcc-legacy-mis-table tbody tr.legacy-mis-grand-total td { background: #ffff00; font-weight: 950; border-top: 2px solid #000000; }
.spcc-legacy-mis-table tr:last-child td { border-bottom: 0; }
.spcc-legacy-mis-table th:last-child, .spcc-legacy-mis-table td:last-child { border-right: 0; }
.spcc-legacy-mis-table .spcc-flag-red { color: #c91d35; }
.spcc-legacy-mis-table .spcc-flag-green { color: #078a4b; }
.spcc-legacy-mis-table tbody tr.spcc-health-summary-row td { color: #000000; }
.spcc-legacy-mis-table tbody tr.spcc-health-summary-row td.legacy-mis-name { font-weight: 900; }
.spcc-legacy-mis-table tbody tr.spcc-health-summary-row.spcc-health-dead.spcc-health-critical td { background: #fecaca; border-top-color: #b91c1c; border-bottom-color: #b91c1c; }
.spcc-legacy-mis-table tbody tr.spcc-health-summary-row.spcc-health-dead.spcc-health-high td { background: #ffe4e6; }
.spcc-legacy-mis-table tbody tr.spcc-health-summary-row.spcc-health-dead.spcc-health-low td { background: #fff7f7; }
.spcc-legacy-mis-table tbody tr.spcc-health-summary-row.spcc-health-live.spcc-health-critical td { background: #fed7aa; border-top-color: #c2410c; border-bottom-color: #c2410c; }
.spcc-legacy-mis-table tbody tr.spcc-health-summary-row.spcc-health-live.spcc-health-high td { background: #ffedd5; }
.spcc-legacy-mis-table tbody tr.spcc-health-summary-row.spcc-health-live.spcc-health-low td { background: #fff7ed; }
.spcc-legacy-mis-table tbody tr.spcc-health-summary-row.spcc-health-active.spcc-health-critical td { background: #bbf7d0; border-top-color: #15803d; border-bottom-color: #15803d; }
.spcc-legacy-mis-table tbody tr.spcc-health-summary-row.spcc-health-active.spcc-health-high td { background: #dcfce7; }
.spcc-legacy-mis-table tbody tr.spcc-health-summary-row.spcc-health-active.spcc-health-low td { background: #f0fdf4; }
.spcc-legacy-mis-table th:not(.legacy-mis-name), .spcc-legacy-mis-table td:not(.legacy-mis-name) { text-align: center; }
.spcc-legacy-mis-table tbody tr.spcc-health-summary-row.spcc-health-dead.spcc-health-critical:not(.legacy-mis-zone-karnataka):not(.legacy-mis-zone):not(.legacy-mis-state-total):not(.legacy-mis-grand-total) td:nth-child(5) { color: #b91c1c; font-weight: 950; }
.spcc-legacy-mis-table tbody tr.spcc-health-summary-row.spcc-health-dead.spcc-health-high:not(.legacy-mis-zone-karnataka):not(.legacy-mis-zone):not(.legacy-mis-state-total):not(.legacy-mis-grand-total) td:nth-child(5) { color: #dc2626; font-weight: 900; }
.spcc-legacy-mis-table tbody tr.spcc-health-summary-row.spcc-health-live:not(.legacy-mis-zone-karnataka):not(.legacy-mis-zone):not(.legacy-mis-state-total):not(.legacy-mis-grand-total) td:nth-child(5) { color: #c2410c; font-weight: 900; }
.spcc-legacy-mis-table tbody tr.spcc-health-summary-row.spcc-health-active:not(.legacy-mis-zone-karnataka):not(.legacy-mis-zone):not(.legacy-mis-state-total):not(.legacy-mis-grand-total) td:nth-child(5) { color: #15803d; font-weight: 900; }
.spcc-legacy-mis-table tbody tr.spcc-health-summary-row.spcc-health-group-ka-1 td { background: #fcd34d !important; border-top: 3px solid #92400e !important; border-bottom: 2px solid #92400e !important; font-weight: 900; }
.spcc-legacy-mis-table tbody tr.spcc-health-summary-row.spcc-health-group-ka-2 td { background: #fdba74 !important; border-top: 3px solid #9a3412 !important; border-bottom: 2px solid #9a3412 !important; font-weight: 900; }
.spcc-legacy-mis-table tbody tr.spcc-health-summary-row.spcc-health-group-ap-tg td { background: #5eead4 !important; border-top: 3px solid #0f766e !important; border-bottom: 2px solid #0f766e !important; font-weight: 900; }
.spcc-legacy-mis-table tbody tr.spcc-health-summary-row.spcc-health-group-tamil-nadu td { background: #93c5fd !important; border-top: 3px solid #1d4ed8 !important; border-bottom: 2px solid #1d4ed8 !important; font-weight: 900; }
.spcc-legacy-mis-table tbody tr.spcc-health-summary-row.spcc-health-group-kerala td { background: #c4b5fd !important; border-top: 3px solid #6d28d9 !important; border-bottom: 2px solid #6d28d9 !important; font-weight: 900; }
.spcc-legacy-mis-table tbody tr.spcc-health-summary-row.spcc-health-group-total-karnataka td { background: #fb923c !important; border-top: 3px solid #7c2d12 !important; border-bottom: 3px solid #7c2d12 !important; font-weight: 950; }
.spcc-legacy-mis-table tbody tr.spcc-health-summary-row.spcc-health-group-total td { background: #fef08a !important; border-top: 3px solid #854d0e !important; border-bottom: 3px solid #854d0e !important; font-weight: 950; }
.spcc-health-mis-empty { padding: 10px; color: #64748b; font-weight: 700; text-align: center; }
@media (max-width: 720px) { .spcc-health-insights { grid-template-columns: 1fr; } }

/* Sourcing Point MIS: mirrors the supplied operational Excel report while
   keeping the data live from the dashboard payload. */
.spcc-notes-overlay:has(.spcc-full-mis-modal) { padding: 12px; }
.spcc-full-mis-modal { box-sizing: border-box; width: 100%; height: 100%; max-height: none; display: flex; flex-direction: column; overflow: hidden; padding: 10px; border: 2px solid #111827 !important; border-radius: 12px; }
.spcc-full-mis-modal > header { position: relative; top: auto; z-index: 8; flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: -10px -10px 5px; padding: 7px 10px 5px; border-bottom: 1px solid #111827; background: #f7fcfa; }
.spcc-full-mis-modal > header h2 { margin: 0; color: #101828; font-size: 16px; }
.spcc-full-mis-modal > header p { display: none; }
.spcc-mis-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.spcc-mis-download { min-height: 30px; padding: 5px 10px; border: 1px solid #075e54; border-radius: 7px; background: #e3f5ee; color: #075e54; font: inherit; font-size: 12px; font-weight: 850; cursor: pointer; }
.spcc-full-mis-modal > header .spcc-mis-download { width: auto; height: 30px; padding: 5px 10px; font: 850 12px/1 var(--sans); white-space: nowrap; }
.spcc-mis-download:hover { background: #c9eadf; }
.spcc-mis-download:focus-visible, .spcc-full-mis-modal button:focus-visible { outline: 3px solid #f4b183; outline-offset: 2px; }
.spcc-mis-insights { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; margin: 0 0 5px; }
.spcc-mis-insights > span { display: inline-flex; align-items: center; gap: 5px; min-height: 25px; padding: 3px 8px; border: 1px solid; border-radius: 6px; font-size: 10px; font-weight: 750; }
.spcc-mis-insights > span b { text-transform: uppercase; font-size: 9px; letter-spacing: .03em; }
.spcc-mis-insights .danger { border-color: #dc2626; background: #fee2e2; color: #7f1d1d; }
.spcc-mis-insights .on-track { border-color: #ea580c; background: #ffedd5; color: #7c2d12; }
.spcc-mis-insights .best { border-color: #15803d; background: #dcfce7; color: #14532d; }
.spcc-mis-legend { display: flex; justify-content: flex-end; gap: 0; flex: 0 0 auto; margin-left: auto; font-size: 9px; font-weight: 850; }
.spcc-mis-legend span { padding: 2px 6px; border: 1px solid #111827; }
.spcc-mis-legend .mis-dead { background: #ff0000; color: #ffffff; }
.spcc-mis-legend .mis-live { background: #f4b183; color: #111827; }
.spcc-mis-legend .mis-active { background: #92d050; color: #111827; }
.spcc-full-mis-wrap { min-height: 0; flex: 1 1 auto; overflow: auto; overscroll-behavior: contain; scrollbar-color: #64748b #e2e8f0; border: 2px solid #111827; background: #ffffff; }
.spcc-full-mis-table { width: max-content; min-width: 100%; height: auto; table-layout: auto; border-collapse: collapse; color: #111827; background: #ffffff; font-size: 11px; }
.spcc-full-mis-table th, .spcc-full-mis-table td { box-sizing: border-box; height: 17px; padding: 1px 3px; border: 1px solid #111827; text-align: center; vertical-align: middle; font-weight: 700; white-space: nowrap; }
.spcc-full-mis-table thead th { position: sticky; top: 0; z-index: 4; height: 40px; background: #1d9bc9; color: #ffffff; font-size: 13px; font-weight: 900; line-height: 1.1; white-space: normal; }
.spcc-full-mis-table thead .mis-disb { background: #6d28d9; color: #ffffff; }
.spcc-full-mis-table thead .mis-dead { background: #ff0000; color: #ffffff; }
.spcc-full-mis-table thead .mis-live { background: #f4b183; color: #111827; }
.spcc-full-mis-table thead .mis-active { background: #92d050; color: #111827; }
.spcc-mis-state { background: #c6e8f7; font-weight: 900 !important; }
.spcc-mis-zone { background: #ffffff; font-weight: 850 !important; }
.spcc-mis-name { overflow: hidden; text-align: center !important; background: #ffffff; font-weight: 800 !important; text-overflow: ellipsis; }
.spcc-mis-detail:hover td { background: #eff8ff; }
.spcc-mis-detail:hover .spcc-mis-state { background: #b6def1; }
.spcc-full-mis-table td.mis-dead { color: #991b1b; font-weight: 900; }
.spcc-full-mis-table td.mis-live { color: #9a3412; font-weight: 900; }
.spcc-full-mis-table td.mis-active { color: #166534; font-weight: 900; }
.spcc-full-mis-table td.spcc-mis-heat.mis-dead { background: color-mix(in srgb, #ef4444 var(--heat), #ffffff); }
.spcc-full-mis-table td.spcc-mis-heat.mis-live { background: color-mix(in srgb, #f59e0b var(--heat), #ffffff); }
.spcc-full-mis-table td.spcc-mis-heat.mis-active { background: color-mix(in srgb, #22c55e var(--heat), #ffffff); }
.spcc-mis-zone-total td { background: #b7e8c0; font-weight: 950; }
.spcc-mis-zone-total td:first-child { text-align: left; }
.spcc-mis-state-total td { background: #f8d9c8; font-weight: 950; border-top-width: 2px; }
.spcc-mis-state-total td:first-child, .spcc-mis-grand-total td:first-child { text-align: left; }
.spcc-mis-grand-total td { background: #fff7b2; font-weight: 950; border-top-width: 2px; }
@media (max-height: 850px) { .spcc-full-mis-table { font-size: 9px; } .spcc-full-mis-table th, .spcc-full-mis-table td { height: 16px; padding: 0 2px; } .spcc-full-mis-table thead th { height: 34px; font-size: 11px; } }
@media (max-width: 900px) { .spcc-mis-insights { align-items: stretch; flex-wrap: wrap; } .spcc-mis-legend { width: 100%; justify-content: flex-start; margin-left: 0; } }
@media (max-width: 760px) { .spcc-full-mis-modal { width: calc(100vw - 10px); height: calc(100vh - 10px); padding: 7px; } .spcc-full-mis-modal > header { margin: -7px -7px 5px; padding: 7px; } .spcc-full-mis-modal > header h2 { font-size: 15px; } .spcc-mis-legend { font-size: 8px; } .spcc-mis-legend span { padding: 2px 4px; } .spcc-mis-download { font-size: 10px; } }
