:root {
  color-scheme: light;
  --ink: #17243d;
  --muted: #667085;
  --line: #d9e2ef;
  --surface: #ffffff;
  --wash: #f5f8fc;
  --panel: #fbfdff;
  --bimbo-red: #e1251b;
  --bimbo-blue: #002b7f;
  --bimbo-blue-dark: #001b52;
  --bimbo-yellow: #ffc72c;
  --green: #14835f;
  --green-soft: #e7f6ef;
  --red: #d8241f;
  --red-soft: #fff0ee;
  --amber: #b77800;
  --amber-soft: #fff6d8;
  --blue: #002b7f;
  --blue-soft: #e8f2ff;
  --bar: #5f7f9f;
  --bar-soft: #dfe7ef;
  --teal: #008c95;
  --violet: #5946a8;
  --shadow: 0 16px 40px rgba(0, 48, 105, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(180deg, #eef4ff, #f8fafc);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
select,
input {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
}

.dashboard-loader {
  display: none;
}

.dashboard-loading .app-shell {
  visibility: hidden;
}

.dashboard-loading .dashboard-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: var(--bimbo-blue);
  background: linear-gradient(180deg, #eef4ff, #f8fafc);
}

.dashboard-loader-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #c9d8ef;
  border-top-color: var(--bimbo-blue);
  border-radius: 50%;
  animation: dashboard-spin 0.8s linear infinite;
}

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

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.brand-block h1 {
  min-width: 0;
  margin-top: 2px;
}

.brand-logo {
  width: 180px;
  max-width: 100%;
  height: auto;
  display: block;
  filter: none;
  transform-origin: left center;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.meeting-status {
  display: grid;
  gap: 3px;
  min-width: 150px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  text-align: right;
}

.meeting-status strong {
  color: #fff;
}

.meeting-status span {
  color: #dbeafe;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.1;
}

.panel-head p,
.eyebrow,
.metric small {
  color: var(--muted);
}

.brand-block p:not(.eyebrow) {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.filters {
  display: grid;
  gap: 8px;
}

.top-filters {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  justify-content: start;
  align-items: end;
  margin-top: -16px;
  margin-bottom: 0;
  padding: 6px 10px 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-top: 0;
  border-radius: 0;
  background:
    radial-gradient(900px 42px at 50% 100%, rgba(225, 37, 27, 0.14), transparent 58%),
    linear-gradient(135deg, var(--bimbo-blue), var(--bimbo-blue-dark));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.top-filters label {
  color: #dbeafe;
  gap: 2px;
  font-size: 12px;
}

.top-filters select,
.top-filters input {
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  min-height: 28px;
  padding: 4px 8px;
  font-size: 12px;
}

.top-filters select option {
  color: var(--ink);
  background: #fff;
}

.top-filters input[type="date"] {
  color-scheme: dark;
}

.top-filters select:disabled {
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
}

.hidden-filter {
  display: none;
}

.scope-hidden {
  display: none !important;
}

.red-curve-divider {
  position: relative;
  height: 34px;
  margin: -1px 0 12px;
  overflow: hidden;
  border-radius: 0 0 18px 18px;
  background: transparent;
}

.red-curve-divider svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.blue-curve-fill {
  fill: var(--bimbo-blue-dark);
}

.red-curve-stroke {
  fill: none;
  stroke: var(--bimbo-red);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 3px 5px rgba(0, 27, 82, 0.28));
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.tab {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #334155;
  background: #fff;
  cursor: pointer;
  font-weight: 900;
}

.tab.active {
  color: #fff;
  background: var(--bimbo-blue);
  border-color: var(--bimbo-blue);
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #243b63;
}

select,
input {
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
}

select:disabled {
  color: var(--bimbo-blue);
  background: #eef5ff;
  opacity: 1;
}

input[type="date"] {
  color-scheme: light;
}

main {
  width: min(1720px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 12px;
}

.app-header {
  position: relative;
  padding: 22px 20px 16px;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(135deg, var(--bimbo-blue), var(--bimbo-blue-dark));
  box-shadow: none;
  color: #fff;
}

.app-header h1,
.app-header p,
.app-header .eyebrow {
  color: #fff;
}

.app-header .brand-block {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.refresh-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  min-width: 34px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: transparent;
  font-size: 0;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.refresh-button .refresh-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.brand-block h1 {
  margin: 0;
}

.refresh-button:hover,
.refresh-button:focus-visible {
  background: transparent;
  outline: none;
  box-shadow: none;
}

.refresh-button:hover {
  background: rgba(255, 255, 255, 0.16);
}

.refresh-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.eyebrow {
  margin-top: 4px;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.period-switch {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(68px, 1fr));
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.period-switch button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.period-switch button.active {
  color: #fff;
  background: var(--bimbo-blue);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.detail-only-card {
  display: block;
}

.kpi-grid .detail-only-card {
  display: block;
}

.metric {
  display: block;
  position: relative;
  overflow: hidden;
  min-height: 70px;
  padding: 8px 10px 18px;
  border: 1px solid color-mix(in srgb, var(--accent, #d8e2ef) 45%, #ffffff);
  border-radius: 14px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--card-top, #ffffff) 90%, white), var(--card-bottom, #f8fafc)),
    #f8fafc;
  box-shadow: none;
  text-align: left;
}

.metric.good {
  border-color: rgba(20, 131, 95, 0.28);
  background: linear-gradient(180deg, #f4fff9, #e7f6ef);
}

.metric.bad {
  border-color: rgba(216, 36, 31, 0.28);
  background: linear-gradient(180deg, #fff5f4, #ffe9e7);
}

.metric.neutral {
  border-color: #d8e2ef;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.metric::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: #d8e2ef;
  z-index: 0;
  pointer-events: none;
}

.kpi-button {
  cursor: pointer;
}

.kpi-button.active {
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.09);
}

.metric::before {
  content: "";
  position: absolute;
  top: 10px;
  right: 9px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d8e2ef;
  box-shadow: 0 0 0 4px rgba(216, 226, 239, 0.16);
  z-index: 0;
  pointer-events: none;
}

.metric.good::before,
.metric.good::after,
.target-card.good .target-fill,
.pill.good,
.focus-card.good::before {
  background: var(--green);
}

.metric.warn::before,
.target-card.warn .target-fill,
.pill.warn {
  background: var(--amber);
}

.metric.bad::before,
.metric.bad::after,
.target-card.bad .target-fill,
.pill.bad,
.pill.risk {
  background: var(--red);
}

.metric.neutral::before,
.metric.neutral::after,
.pill.neutral {
  background: #d8e2ef;
}

.metric span {
  position: relative;
  z-index: 1;
  display: block;
  max-width: calc(100% - 28px);
  color: #11203e;
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}

.metric strong {
  position: relative;
  z-index: 1;
  display: block;
  margin: 7px 0 2px;
  color: #06122d;
  font-size: clamp(15px, 1.2vw, 20px);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.target-line {
  position: relative;
  z-index: 1;
  display: block;
  min-height: 12px;
  margin-bottom: 0;
  padding: 0;
  color: #60708b;
  background: transparent;
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0;
  white-space: normal;
}

.target-line.good {
  color: var(--green);
  background: transparent;
}

.target-line.bad {
  color: var(--red);
  background: transparent;
}

.target-line.neutral {
  color: var(--muted);
  background: transparent;
}

.spark-bars {
  position: absolute;
  left: 16px;
  left: 9px;
  right: 9px;
  bottom: 6px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  gap: 4px;
  height: 14px;
  z-index: 0;
  pointer-events: none;
}

.spark-bars i {
  display: block;
  height: 42%;
  border-radius: 7px 7px 0 0;
  background: #b7f0cf;
}

.spark-bars i:nth-child(2) { height: 56%; }
.spark-bars i:nth-child(3) { height: 70%; }
.spark-bars i:nth-child(4) { height: 92%; }
.metric.good .spark-bars i { background: #b7f0cf; }
.metric.bad .spark-bars i { background: #ffc1bd; }
.metric.neutral .spark-bars i { background: #cfe0f5; }

.status-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
  overflow: hidden;
  min-height: 84px;
  padding: 11px 13px 11px 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, #072c82, #061f62);
  box-shadow: var(--shadow);
}

.status-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -58px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.status-card::before {
  content: "";
  position: absolute;
  inset: auto 12px 12px 12px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--bimbo-red), var(--bimbo-yellow));
}

.status-card span {
  grid-column: 2;
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.status-card strong {
  grid-column: 2;
  display: block;
  margin-bottom: 5px;
  font-size: clamp(22px, 2.2vw, 31px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.status-card p {
  grid-column: 2;
  position: relative;
  z-index: 1;
  max-width: 205px;
  color: #eaf2ff;
  font-size: 11px;
  line-height: 1.28;
}

.status-orb {
  width: 26px;
  height: 26px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #fff37d, #ffc72c 46%, #e7a237 74%);
  box-shadow: inset -10px -12px 22px rgba(225, 37, 27, 0.22);
}

.status-card.good {
  background: linear-gradient(145deg, #0b4d8f, #064271 58%, #0f7c61);
}

.status-card.bad {
  background: linear-gradient(145deg, #7f1d1d, #5f1020 58%, #a61d2d);
}

.status-card.neutral {
  background: linear-gradient(145deg, #2b4d8e, #152f66 58%, #325aa6);
}

.board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.summary-view {
  display: grid;
  gap: 14px;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

#desperdicioRendimientoPanels {
  grid-column: 1 / -1;
  width: 100%;
}

#desperdicioRendimientoPanels > .panel {
  height: 100%;
}

.bottom-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.panel-body {
  display: grid;
  gap: 10px;
  padding: 12px 14px 14px;
}

.top-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.kpi-group-bar {
  display: flex;
  flex-wrap: wrap;
  column-gap: 20px;
  row-gap: 12px;
  align-items: center;
  justify-content: center;
}

.dashboard-section-nav {
  margin: 0 0 14px;
}

.kpi-group-tab {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1.5px solid var(--bimbo-blue);
  background: #fff;
  color: var(--blue-700);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.kpi-group-tab.active {
  background: linear-gradient(180deg, var(--bimbo-blue) 0%, var(--bimbo-blue-dark) 100%);
  color: #fff;
  border-color: var(--bimbo-blue-dark);
}

.semaforo-general-panel {
  margin-bottom: 14px;
  padding: 13px;
  border: 1px solid rgba(0, 43, 127, 0.28);
  border-radius: 14px;
  background: #fff;
}

.semaforo-general-heading {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--bimbo-blue);
  text-align: center;
}

.semaforo-general-heading h3 {
  margin: 0;
  color: var(--blue-700);
  font-size: 18px;
  letter-spacing: 0.025em;
}

.semaforo-general-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.traffic-light-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 92px;
  padding: 9px 10px;
  border: 1px solid #dce5f2;
  border-top: 4px solid #94a3b8;
  border-radius: 12px;
  background: #f8fafc;
}

.traffic-light-card.good {
  border-color: #b9e3ce;
  border-top-color: var(--green);
  background: #f3fbf7;
}

.traffic-light-card.bad {
  border-color: #f3c6c8;
  border-top-color: var(--red);
  background: #fff6f6;
}

.traffic-light-card.neutral {
  border-color: #d9e1ea;
  border-top-color: #94a3b8;
  background: #f8fafc;
}

.traffic-light-copy {
  display: grid;
  align-content: center;
  justify-items: start;
  min-width: 0;
}

.traffic-light-icon {
  align-self: center;
  font-size: 32px;
  line-height: 1;
}

.traffic-light-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #64748b;
  margin-top: 5px;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.traffic-light-status i {
  width: 11px;
  height: 11px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 0 1px rgba(100, 116, 139, 0.25);
}

.traffic-light-card.good .traffic-light-status {
  color: #18794e;
}

.traffic-light-card.good .traffic-light-status i {
  background: var(--green);
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.28);
}

.traffic-light-card.bad .traffic-light-status {
  color: #b4232d;
}

.traffic-light-card.bad .traffic-light-status i {
  background: var(--red);
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.25);
}

.traffic-light-name {
  color: #334155;
  font-size: 9px;
  font-weight: 950;
  line-height: 1.15;
  text-transform: uppercase;
}

.traffic-light-value {
  margin-top: 2px;
  color: #14213a;
  font-size: 18px;
  line-height: 1;
  letter-spacing: -0.025em;
}

.traffic-light-card.good .traffic-light-value {
  color: #147348;
}

.traffic-light-card.bad .traffic-light-value {
  color: #bd2430;
}

.traffic-light-goal {
  margin-top: 4px;
  color: #64748b;
  font-size: 8px;
  font-weight: 800;
}

.hero-kpis {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.hero-kpis .hidden-filter {
  display: none !important;
}

.hero-kpis .metric {
  min-height: 148px;
  padding: 7px 8px 6px;
  border-radius: 12px;
  border: 1px solid #dfe8f4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 92%;
  margin: 0 auto;
  background: #fff;
  box-shadow: var(--shadow);
}

.hero-kpis .metric span {
  font-size: 12px;
  color: var(--green);
  line-height: 1.1;
  text-align: center;
}

.hero-kpis .metric strong {
  margin: 0;
  font-size: 19px;
  line-height: 1;
}

.hero-kpis .metric .gauge {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-top: 0;
  background:
    radial-gradient(circle at center, #ffffff 0 45%, transparent 47%),
    conic-gradient(var(--green) 0 275deg, #d9e5da 275deg 360deg);
}

.hero-kpis .metric.bad .gauge {
  background:
    radial-gradient(circle at center, #ffffff 0 45%, transparent 47%),
    conic-gradient(var(--red) 0 190deg, #f2cccc 190deg 360deg);
}

.hero-kpis .metric.warn .gauge {
  background:
    radial-gradient(circle at center, #ffffff 0 45%, transparent 47%),
    conic-gradient(var(--amber) 0 260deg, #f2d6ad 260deg 360deg);
}

.hero-kpis .metric .gauge span {
  font-size: 21px;
  color: var(--green);
}

.hero-kpis .metric.bad .gauge span {
  color: var(--red);
}

.hero-kpis .metric.warn .gauge span {
  color: var(--amber);
}

.hero-kpis .metric .target-line {
  margin-top: 2px;
  text-align: center;
  font-size: 10px;
  line-height: 1.1;
}

.hero-kpis .metric.warning {
  border-color: #ef4444;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.22), var(--shadow);
}

.hero-kpis .metric.warning span,
.hero-kpis .metric.warning strong {
  color: var(--amber-600);
}

.summary-grid {
  display: grid;
  gap: 14px;
}

.summary-top {
  grid-template-columns: 0.95fr 1.05fr;
}

.summary-map-row {
  grid-template-columns: 1fr;
}

.summary-middle {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.summary-bottom {
  grid-template-columns: 1fr 1fr;
}

.summary-pareto-stack {
  display: grid;
  gap: 14px;
}

.summary-left-stack {
  display: grid;
  gap: 14px;
}

.summary-view .panel {
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.panel-title {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  margin: 0;
  padding: 11px 16px 10px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(135deg, var(--bimbo-blue), var(--bimbo-blue-dark));
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(255, 255, 255, 0.2);
}

.panel-title,
.panel-title span:not(.stop-toggle),
.panel-title .title-icon {
  color: #ffffff;
}

#desperdicioPanels .panel-title {
  min-height: 44px;
  padding: 8px 14px;
  background: #ffffff;
  color: #0f3f94;
  border: 0;
  border-bottom: 2px solid var(--bimbo-blue);
  box-shadow: none;
  text-shadow: none;
}

#desperdicioPanels .panel-title::after {
  content: none;
}

#desperdicioPanels .panel-title .title-icon {
  background: rgba(43, 111, 214, 0.08);
  color: #0f3f94;
}

#desperdicioPanels .panel-title span {
  color: #0f3f94;
}

#desperdicioPanels .pareto-chip {
  border-color: #0f3f94;
  background: #ffffff;
  color: #0f3f94;
  box-shadow: 0 1px 3px rgba(15, 63, 148, 0.12);
}

#desperdicioPanels .pareto-chip:hover {
  background: #eef4ff;
}

#desperdicioPanels .pareto-chip.active {
  background: #0f3f94;
  color: #ffffff;
}

#desperdicioPanels .panel {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(43, 111, 214, 0.45);
}

#desperdicioPanels .panel-body {
  padding: 8px 12px 10px;
  border-top: 0;
}

#desperdicioPanels {
  gap: 10px;
}

#desperdicioPanels .panel-title .title-icon {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  font-size: 15px;
}

#desperdicioPanels .pareto-svg-wrap {
  min-height: 275px;
}

.panel-title::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.42);
}

.panel-title .title-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  font-size: 19px;
  line-height: 1;
}

.fillrate-toggle {
  margin-left: auto;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.fillrate-toggle:hover {
  background: rgba(255, 255, 255, 0.22);
}

.charts-grid .panel-title {
  font-size: 18px;
}

.charts-grid .panel-title .title-icon {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  font-size: 17px;
}

.pareto-title {
  margin-bottom: 0;
}

.charts-grid .panel {
  height: 100%;
}

.charts-grid .insight {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.28;
}

.focus-grid .panel-title,
.charts-grid .panel-title,
.board .panel-title {
  font-size: 18px;
  letter-spacing: -0.018em;
}

.focus-grid .panel-title .title-icon,
.charts-grid .panel-title .title-icon,
.board .panel-title .title-icon {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  font-size: 17px;
}

.time-panel-title {
  /* inherits the standard blue title style */
}

.time-panel-title .stop-toggle {
  margin-left: auto;
  border: 1px solid rgba(0, 43, 127, 0.18);
  border-radius: 999px;
  background: #fff;
  color: var(--bimbo-blue);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.time-panel-title .stop-toggle:hover {
  background: rgba(0, 43, 127, 0.06);
}

.time-line-selector {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  color: var(--bimbo-blue);
}

.time-line-selector select {
  min-width: 180px;
  max-width: 270px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 43, 127, 0.18);
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  outline: none;
}

.time-class-chart {
  min-height: 280px;
}

.time-chart-shell {
  display: grid;
  gap: 10px;
}

.time-chart-shell .empty {
  min-height: 260px;
}

.time-focus-list {
  display: grid;
  gap: 8px;
}

.time-focus-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7faff;
  border: 1px solid #e0eaf8;
}

.time-focus-rank {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(180deg, #2f73d9, #1555b7);
}

.time-focus-title {
  font-size: 12px;
  font-weight: 850;
  color: #12203d;
}

.time-focus-meta {
  display: grid;
  gap: 2px;
  justify-items: end;
  text-align: right;
  color: #24406d;
  font-size: 11px;
  font-weight: 800;
}

.time-distribution-panel,
#stopsExplorerPanel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
}

.stop-type-distribution {
  display: grid;
  gap: 12px;
}

.stop-type-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.stop-type-summary > div {
  padding: 8px 10px;
  border: 1px solid #dce7f6;
  border-radius: 9px;
  background: #f7faff;
}

.stop-type-summary span,
.stop-type-summary strong {
  display: block;
}

.stop-type-summary span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.stop-type-summary strong {
  margin-top: 2px;
  color: var(--bimbo-blue);
  font-size: 16px;
}

.stop-type-stack {
  display: flex;
  width: 100%;
  height: 38px;
  overflow: hidden;
  border: 1px solid rgba(0, 43, 127, 0.16);
  border-radius: 8px;
  background: #edf3fb;
  box-shadow: inset 0 1px 3px rgba(0, 27, 82, 0.12);
}

.stop-type-segment {
  display: grid;
  place-items: center;
  min-width: 0;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.stop-type-segment + .stop-type-segment {
  border-left: 1px solid rgba(255, 255, 255, 0.55);
}

.stop-type-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 12px;
}

.stop-type-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 7px 8px;
  border-bottom: 1px solid #e7eef8;
}

.stop-type-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.stop-type-copy {
  min-width: 0;
}

.stop-type-copy strong,
.stop-type-copy small {
  display: block;
}

.stop-type-copy strong {
  color: #17243d;
  font-size: 12px;
}

.stop-type-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}

.stop-type-item b {
  color: var(--bimbo-blue);
  font-size: 12px;
}

.focus-grid .insight,
.charts-grid .insight,
.board .insight {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.28;
}

.focus-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
  gap: 14px;
  align-items: start;
}

.focus-grid-rendimientos,
.focus-grid-fillrate {
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
}

.focus-column {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.fillrate-rank-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.fillrate-panel {
  min-width: 0;
}

.bajas-panel {
  min-width: 0;
}

.fillrate-card {
  display: grid;
  gap: 8px;
  padding: 10px 10px 9px;
  border: 1px solid #dce5f2;
  border-left-width: 7px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #f9fbff 100%);
  box-shadow: var(--shadow-sm);
}

.fillrate-card.critical {
  border-left-color: var(--red);
}

.fillrate-card.warn {
  border-left-color: var(--amber);
}

.fillrate-card.good {
  border-left-color: var(--green);
}

.fillrate-card-head {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.fillrate-rank {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #e8f1ff;
  color: var(--bimbo-blue-dark);
  font-size: 12px;
  font-weight: 900;
}

.fillrate-copy {
  min-width: 0;
}

.fillrate-copy strong,
.fillrate-copy small {
  display: block;
}

.fillrate-copy strong {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fillrate-product-meta {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex: 0 0 auto;
}

.fillrate-product-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fillrate-product-value {
  flex: 0 0 auto;
  color: var(--bimbo-blue-dark);
  font-weight: 900;
  font-size: 11px;
}

.fillrate-gap {
  font-size: 11px;
}

.fillrate-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.1;
}

.fillrate-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.fillrate-gap {
  display: inline-flex;
  align-self: start;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  width: fit-content;
}

.fillrate-gap.critical {
  background: rgba(220, 38, 38, 0.12);
  color: var(--red);
}

.fillrate-gap.warn {
  background: rgba(245, 158, 11, 0.14);
  color: #a16207;
}

.fillrate-gap.good {
  background: rgba(34, 197, 94, 0.12);
  color: var(--green);
}

.bajas-panel .panel-body {
  gap: 8px;
}

.r11-line-chart {
  min-height: 315px !important;
}

.r11-donut-layout {
  display: grid;
  grid-template-columns: minmax(190px, 0.85fr) minmax(220px, 1.15fr);
  gap: 24px;
  align-items: center;
  min-height: 300px;
  padding: 12px 14px;
}

.r11-donut-figure {
  position: relative;
  width: min(100%, 250px);
  aspect-ratio: 1;
  justify-self: center;
}

.r11-donut-figure svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.r11-donut-track {
  stroke: #edf2f8;
}

.r11-donut-segment {
  cursor: pointer;
  outline: none;
  transition: opacity 160ms ease, stroke-width 160ms ease, filter 160ms ease;
}

.r11-donut-layout:has(.r11-donut-segment.selected) .r11-donut-segment:not(.selected) {
  opacity: 0.32;
}

.r11-donut-segment:hover,
.r11-donut-segment:focus,
.r11-donut-segment.selected {
  stroke-width: 33;
  filter: drop-shadow(0 2px 3px rgba(15, 43, 86, 0.22));
}

.r11-donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  pointer-events: none;
}

.r11-donut-center strong {
  color: #14213a;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 900;
  line-height: 1;
}

.r11-donut-center span {
  margin-top: 5px;
  color: #68758a;
  font-size: 11px;
  font-weight: 800;
}

.r11-donut-legend {
  display: grid;
  gap: 7px;
}

.r11-donut-legend-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #24334d;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.r11-donut-legend-item:hover,
.r11-donut-legend-item:focus,
.r11-donut-legend-item.selected {
  border-color: #b8cbe8;
  background: #f5f8fd;
  outline: none;
}

.r11-donut-legend-item i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.r11-donut-legend-item span {
  min-width: 0;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.r11-donut-legend-item strong {
  color: #0f3f94;
  font-size: 11px;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.r11-line-list {
  display: grid;
  gap: 8px;
}

.r11-line-row {
  display: grid;
  gap: 5px;
  padding: 8px 9px;
  border: 1px solid #dce6f3;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
  cursor: pointer;
}

.r11-line-row:hover,
.r11-line-row:focus {
  border-color: #6d9de5;
  outline: none;
}

.r11-line-row.selected {
  border-color: #0f3f94;
  box-shadow: 0 0 0 2px rgba(15, 63, 148, 0.12);
}

.r11-line-row-head {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 7px;
}

.r11-line-row-head .pareto-rank {
  width: 23px;
  height: 23px;
}

.r11-line-row-head strong {
  min-width: 0;
  color: #172033;
  font-size: 11px;
  line-height: 1.15;
}

.r11-line-row-head b {
  color: #0f3f94;
  font-size: 10px;
  white-space: nowrap;
}

.r11-line-row-head small {
  min-width: 54px;
  color: #6b7890;
  font-size: 9px;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.r11-line-track {
  height: 18px;
  margin-left: 30px;
  border-radius: 3px;
  background: #edf2f8;
  overflow: hidden;
}

.r11-line-stack {
  display: flex;
  height: 100%;
  min-width: 3px;
}

.r11-line-stack i {
  display: block;
  height: 100%;
  min-width: 2px;
}

.r11-line-stack .nonrecoverable {
  background: #d92d20;
}

.r11-line-stack .reprocess {
  background: #f47c20;
}

.r11-line-stack .second {
  background: #d4a20b;
}

.r11-line-stack .base {
  background: #2f73d9;
}

.r11-line-stack .other {
  background: #7b8798;
}

.r11-line-classes {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 8px;
  margin-left: 30px;
}

.r11-line-classes span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #5b6980;
  font-size: 8px;
}

.r11-line-classes span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: #7b8798;
}

.r11-line-classes .nonrecoverable::before {
  background: #d92d20;
}

.r11-line-classes .reprocess::before {
  background: #f47c20;
}

.r11-line-classes .second::before {
  background: #d4a20b;
}

.r11-line-classes .base::before {
  background: #2f73d9;
}

.r11-line-classes strong {
  color: #33445f;
}

.r11-line-bar {
  cursor: pointer;
  outline: none;
}

.r11-selection-outline {
  fill: none;
  stroke: transparent;
  stroke-width: 3;
  pointer-events: none;
}

.r11-line-bar.selected .r11-selection-outline {
  stroke: #0f3f94;
  filter: drop-shadow(0 3px 4px rgba(15, 63, 148, 0.3));
}

.r11-line-bar:focus .r11-selection-outline,
.r11-line-bar:hover .r11-selection-outline {
  stroke: #2f73d9;
}

.r11-stack.nonrecoverable {
  fill: #d92d20;
}

.r11-stack.reprocess {
  fill: #f47c20;
}

.r11-stack.second {
  fill: #d4a20b;
}

.r11-stack.base {
  fill: #2f73d9;
}

.r11-stack.other {
  fill: #7b8798;
}

.r11-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 12px;
  margin-top: 7px;
  color: #52627d;
  font-size: 10px;
  font-weight: 800;
}

.r11-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.r11-legend span::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: #7b8798;
}

.r11-legend .nonrecoverable::before {
  background: #d92d20;
}

.r11-legend .reprocess::before {
  background: #f47c20;
}

.r11-legend .second::before {
  background: #d4a20b;
}

.r11-legend .base::before {
  background: #2f73d9;
}

.r11-product-list {
  display: grid;
  gap: 9px;
  min-height: 315px;
  align-content: start;
}

.r11-product-row {
  display: grid;
  gap: 5px;
  padding: 8px 9px;
  border: 1px solid #dce6f3;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

.r11-product-head {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
}

.r11-product-head .pareto-rank {
  width: 23px;
  height: 23px;
}

.r11-product-head strong {
  min-width: 0;
  color: #172033;
  font-size: 11px;
  line-height: 1.18;
}

.r11-product-head > span:last-child {
  color: #0f3f94;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.r11-product-bar {
  position: relative;
  height: 18px;
  margin-left: 31px;
  margin-right: 2px;
  border-radius: 3px;
  background: #edf2f8;
  overflow: hidden;
}

.r11-product-bar i {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: 0;
  background: #7b8798;
}

.r11-product-bar i.red {
  background: #d92d20;
}

.r11-product-bar i.orange {
  background: #f47c20;
}

.r11-product-bar i.mustard {
  background: #d4a20b;
}

.r11-product-bar b {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  color: #172033;
  font-size: 9px;
  font-weight: 900;
}

.r11-subcauses {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: 31px;
}

.r11-subcauses span {
  padding: 3px 6px;
  border: 1px solid #d9e5f5;
  border-radius: 999px;
  color: #33445f;
  background: #f7faff;
  font-size: 9px;
  line-height: 1.15;
}

.r11-subcauses strong {
  color: #0f3f94;
}

.r11-product-row > small {
  margin-left: 31px;
  color: #6b7890;
  font-size: 9px;
  line-height: 1.15;
}

.r11-subcause-row {
  display: grid;
  gap: 6px;
  padding: 9px 10px;
  border: 1px solid #dce6f3;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

.r11-subcause-head {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.r11-subcause-head .pareto-rank {
  width: 23px;
  height: 23px;
}

.r11-subcause-head strong {
  color: #172033;
  font-size: 12px;
  line-height: 1.18;
}

.r11-subcause-impact {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: 31px;
}

.r11-subcause-impact .r11-product-bar {
  flex: 0 1 260px;
  width: min(52%, 260px);
  max-width: 260px;
  margin: 0;
}

.r11-impact-value {
  color: #0f3f94;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.r11-related-products {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  margin-left: 31px;
  padding-top: 5px;
  border-top: 1px solid #e2eaf5;
}

.r11-related-products > span {
  flex: 0 0 auto;
  color: #6b7890;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.r11-related-products > div {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 10px;
  min-width: 0;
}

.r11-related-products > .r11-pt-list {
  display: grid;
  flex: 1 1 auto;
  gap: 3px;
}

.r11-related-products p {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin: 0;
  color: #33445f;
  font-size: 9px;
  line-height: 1.15;
}

.r11-related-products .r11-pt-list p {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-bottom: 2px;
  border-bottom: 1px dotted #d9e3f0;
}

.r11-related-products p strong {
  min-width: 0;
  font-weight: 700;
}

.r11-related-products p b {
  color: #0f3f94;
  white-space: nowrap;
}

.r11-related-products small {
  color: #6b7890;
  font-size: 8px;
}

.r11-subcause-meta {
  margin-left: 31px;
  color: #6b7890;
  font-size: 9px;
  line-height: 1.15;
}

.r11-quality {
  color: #a16207;
  font-weight: 800;
}

#r11LineNote {
  display: grid;
  gap: 5px;
  padding: 8px 10px;
  border: 1px solid #c7d8f0;
  border-left: 4px solid var(--bimbo-blue);
  border-radius: 9px;
  background: #f5f8fd;
  color: #253653;
}

#r11LineNote .r11-key-comment-label {
  color: var(--bimbo-blue);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#r11LineNote p {
  margin: 0;
  font-size: 10px;
  line-height: 1.35;
}

#r11LineNote strong {
  color: #13233f;
}

#r11LineNote small {
  color: #60708a;
  font-size: 8px;
  line-height: 1.25;
}

.pareto-switches {
  margin-left: auto;
  display: inline-flex;
  gap: 8px;
}

.pareto-chip {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.pareto-chip.active {
  background: rgba(255, 255, 255, 0.26);
}

.pareto-svg-wrap {
  width: 100%;
  min-height: 320px;
  overflow: hidden;
}

.pareto-svg-wrap svg {
  display: block;
  width: 100%;
  height: auto;
}

.pareto-bar {
  fill: #2f73d9;
}

.pareto-bar.selected {
  stroke: #0f3f94;
  stroke-width: 2;
  filter: drop-shadow(0 4px 6px rgba(15, 23, 42, 0.16));
}

.pareto-bar.red {
  fill: #ef4444;
}

.pareto-bar.orange {
  fill: #f59e0b;
}

.pareto-cumulative {
  fill: none;
  stroke: #c81e1e;
  stroke-width: 3;
}

.pareto-point {
  fill: #c81e1e;
  stroke: #fff;
  stroke-width: 2;
}

.pareto-ref-80 {
  stroke: #c81e1e;
  stroke-dasharray: 6 5;
  stroke-width: 1.6;
}

.pareto-grid-line {
  stroke: #dbe7fb;
  stroke-width: 1;
}

.pareto-axis-label {
  fill: #c81e1e;
  font-size: 11px;
  font-weight: 900;
}

.pareto-cum-label {
  fill: #6f2dbd;
  font-size: 10px;
  font-weight: 900;
}

.pareto-bar-value {
  fill: #0f172a;
  font-size: 12px;
  font-weight: 900;
}

.pareto-bar-value.dense {
  font-size: 10px;
}

.pareto-bar-label {
  fill: #12203d;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.05;
}

.pareto-bar-group.clickable {
  cursor: pointer;
}

.pareto-bar-group.selected .pareto-bar-value,
.pareto-bar-group.selected .pareto-bar-label,
.pareto-bar-group.selected .pareto-bar-share {
  font-weight: 950;
}

.pareto-row-label {
  fill: #12203d;
  font-size: 10px;
  font-weight: 850;
}

.pareto-bar-share {
  fill: #5b6c8d;
  font-size: 10px;
  font-weight: 850;
}

.fillrate-values div {
  padding: 8px 9px;
  border-radius: 12px;
  background: #f4f8fd;
  border: 1px solid #e3ebf5;
}

.fillrate-values span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.fillrate-values strong {
  display: block;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.summary-panel {
  display: grid;
  align-content: start;
}

.summary-kpis {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.summary-kpi {
  display: grid;
  gap: 4px;
  min-height: 126px;
  padding: 9px 10px 10px;
  border: 1px solid #dce5f2;
  border-left-width: 7px;
  border-radius: 15px;
  background: #fff;
}

.summary-kpi.good {
  border-left-color: var(--green);
}

.summary-kpi.bad {
  border-left-color: var(--red);
}

.summary-kpi.warn {
  border-left-color: var(--amber);
}

.summary-kpi.neutral {
  border-left-color: #cbd5e1;
}

.summary-kpi-name {
  font-size: 10px;
  font-weight: 950;
  line-height: 1.05;
  text-transform: uppercase;
  margin-bottom: 0;
}

.summary-kpi-value {
  font-size: 22px;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin: 0;
}

.summary-kpi-goal {
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
  margin-top: 0;
}

.summary-issues-table th {
  font-size: 11px;
}

.summary-issues-table td {
  font-size: 12.5px;
}

.summary-map-wrap {
  overflow-x: auto;
}

.summary-map-table {
  min-width: 1260px;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.summary-map-table th {
  font-size: 11px;
}

.summary-map-table td {
  font-size: 12px;
}

.summary-map-panel {
  padding-top: 16px;
}

.summary-map-panel .panel-head {
  margin-bottom: 12px;
  padding: 4px 4px 0;
}

.summary-map-panel .panel-head h3 {
  font-size: 20px;
}

.summary-map-panel .panel-head p {
  font-size: 12px;
}

.summary-map-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, #eef4ff, #e7efff);
  color: #18306e;
}

.summary-map-table tbody tr {
  background: #fff;
}

.summary-map-table tbody td {
  border-top: 1px solid #edf2f7;
  border-bottom: 1px solid #edf2f7;
}

.summary-map-table tbody tr td:first-child {
  border-left: 1px solid #edf2f7;
  border-top-left-radius: 14px;
  border-bottom-left-radius: 14px;
}

.summary-map-table tbody tr td:last-child {
  border-right: 1px solid #edf2f7;
  border-top-right-radius: 14px;
  border-bottom-right-radius: 14px;
}

.summary-map-table tbody tr:nth-child(odd) td {
  background: #fcfdff;
}

.summary-map-table tbody tr:hover td {
  background: #f4f8ff;
}

.heatmap {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid #d8e3f3;
  border-radius: 14px;
  background: #fff;
}

.heatmap thead th {
  padding: 10px 8px;
  border-bottom: 1px solid #d8e3f3;
  background: #f4f7fc;
  color: #18306e;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.heatmap thead th:first-child {
  text-align: left;
  padding-left: 12px;
}

.heatmap tbody td {
  padding: 10px 8px;
  border-bottom: 1px solid #eaf0f7;
  border-right: 1px solid #edf2f7;
  text-align: center;
  font-size: 13px;
  font-weight: 900;
}

.heatmap tbody tr:last-child td {
  border-bottom: 0;
}

.heatmap .row-head {
  text-align: left;
  padding-left: 12px;
  color: #18306e;
  background: #f9fbff;
}

.heatmap .heat-green {
  background: #eef7e8;
  color: #1f7a38;
}

.heatmap .heat-yellow {
  background: #fff5cb;
  color: #8a6100;
}

.heatmap .heat-orange {
  background: #ffd8a8;
  color: #a35200;
}

.heatmap .heat-red {
  background: #f6c7c4;
  color: #b42318;
}

.heatmap .heat-total,
.heatmap .bad-total,
.heatmap .total-row td {
  background: #f8fbff;
  color: #18306e;
}

.heatmap .total-row td {
  border-top: 2px solid #cad8ef;
  font-weight: 950;
}

.heatmap-note {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #dbe6f5;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
  color: #18306e;
  font-size: 12px;
  line-height: 1.35;
}

.heatmap-note strong {
  color: var(--bimbo-blue-dark);
}

.summary-line-pill {
  display: inline-flex;
  align-items: center;
  min-width: 64px;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 950;
}

.summary-line-pill.good {
  background: var(--green);
}

.summary-line-pill.bad {
  background: var(--red);
}

.summary-performance {
  display: grid;
  gap: 10px;
}

.summary-decisions {
  display: grid;
  gap: 10px;
}

.summary-footer {
  margin-top: 14px;
}

.footer {
  margin-top: 12px;
  background: linear-gradient(135deg, var(--bimbo-blue-dark), var(--bimbo-blue));
  color: #fff;
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 40px;
  font-size: 20px;
  border-top: 5px solid #001b52;
  border-radius: 14px;
}

.target-icon {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.13);
  display: grid;
  place-items: center;
  font-size: 32px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.summary-performance-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.summary-performance-card.good {
  border-color: rgba(20, 131, 95, 0.28);
}

.summary-performance-card.bad {
  border-color: rgba(216, 36, 31, 0.28);
}

.summary-performance-card.warn {
  border-color: rgba(183, 120, 0, 0.28);
}

.summary-performance-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.summary-performance-head strong {
  font-size: 13px;
}

.summary-performance-head span {
  color: var(--ink);
  font-weight: 950;
  white-space: nowrap;
}

.summary-performance-goal,
.summary-performance-card small {
  color: var(--muted);
  font-size: 11px;
}

.summary-progress {
  height: 12px;
  margin-top: 2px;
}

.summary-progress span {
  background: var(--green);
}

.summary-progress span.bad {
  background: var(--red);
}

.summary-progress span.warn {
  background: var(--amber);
}

.summary-decision {
  display: grid;
  gap: 10px;
}

.summary-decision-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left-width: 7px;
  border-radius: 15px;
  background: #fff;
}

.summary-decision-card.good {
  border-left-color: var(--green);
}

.summary-decision-card.bad {
  border-left-color: var(--red);
}

.summary-decision-card.warn {
  border-left-color: var(--amber);
}

.summary-decision-card strong {
  font-size: 13px;
}

.summary-decision-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.summary-decision-card .recommendation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.summary-decision-card .recommendation-actions button {
  border: 0;
  border-radius: 999px;
  background: var(--bimbo-blue);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 7px 10px;
  cursor: pointer;
}

.pareto-list {
  display: grid;
  gap: 8px;
}

.pareto .pareto-head,
.pareto .pareto-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.35fr) minmax(0, 2.45fr) auto;
  gap: 8px;
  align-items: center;
}

.pareto .pareto-head {
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 3px;
  color: #24406d;
}

.pareto .pareto-row {
  margin-bottom: 0;
  position: relative;
  z-index: 2;
  padding: 2px 4px;
  border: 1px solid #edf2fb;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #fbfcff);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.03);
}

.pareto .line-label {
  font-size: 12px;
  font-weight: 850;
  line-height: 1.08;
  color: #12203d;
}

.pareto .bar-track {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #eef4ff, #e4ecfa);
  border: 1px solid #dbe7fb;
  overflow: hidden;
  position: relative;
}

.pareto .bar-fill {
  height: 100%;
  background: linear-gradient(180deg, #2f73d9, #1555b7);
  color: white;
  font-weight: 900;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-right: 7px;
  font-size: 11px;
  border-radius: 999px;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.65),
    0 0 1px rgba(0, 0, 0, 0.85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.pareto .bar-fill.red {
  background: linear-gradient(180deg, #ef4444, #c81e1e);
}

.pareto .bar-fill.orange {
  background: linear-gradient(180deg, #f59e0b, #d97706);
}

.pareto .bar-value-chip {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-width: 54px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eff4ff;
  border: 1px solid #d7e2f4;
  color: #0f172a;
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.pareto-clickable {
  cursor: pointer;
}

.pareto-clickable:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.pareto-clickable:focus-visible {
  outline: 2px solid rgba(2, 75, 148, 0.5);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .charts-grid,
  .bottom-grid {
    grid-template-columns: 1fr;
  }

  .cross-board-head,
  .cross-row {
    grid-template-columns: 1fr;
  }

  .cross-total {
    justify-items: start;
  }
}

.pareto-note {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(225, 37, 27, 0.16);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(225, 37, 27, 0.08), rgba(0, 43, 127, 0.03));
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.35;
}

.pareto-note strong {
  color: var(--bimbo-red);
}

.pareto-note ul {
  margin: 8px 0 0 18px;
  padding: 0;
}

.pareto-note li + li {
  margin-top: 4px;
}

.view-card[hidden] {
  display: none;
}

.decision-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 18px;
}

.decision-intro {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid rgba(0, 43, 127, 0.16);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 43, 127, 0.08), rgba(225, 37, 27, 0.05));
}

.decision-intro strong {
  color: var(--bimbo-blue);
  font-size: 14px;
}

.decision-intro span {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}

.decision-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.decision-summary-card {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 43, 127, 0.12);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.decision-summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.decision-summary-card strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.decision-list {
  display: grid;
  gap: 10px;
}

.decision-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.decision-check input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--bimbo-blue);
}

.action-form {
  display: grid;
  grid-template-columns:
    minmax(105px, 0.7fr)
    minmax(165px, 1.15fr)
    minmax(190px, 1.35fr)
    minmax(135px, 0.95fr)
    minmax(145px, 0.9fr)
    minmax(115px, 0.72fr);
  grid-template-areas:
    "kpi cause action owner date buttons";
  gap: 7px;
  margin-bottom: 6px;
  padding: 9px;
  align-items: end;
  border: 1px solid rgba(43, 111, 214, 0.3);
  border-radius: 10px;
  background: #f8fbff;
}

.action-form label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.action-form label > span {
  color: #0f3f94;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.action-form input,
.action-form select,
.action-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #c9d9f0;
  border-radius: 7px;
  min-height: 36px;
  padding: 7px 8px;
  color: #0f172a;
  background: #fff;
  font: inherit;
  font-size: 12px;
  resize: vertical;
}

.action-form textarea {
  height: 42px;
  min-height: 42px;
}

.action-form button {
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--bimbo-blue);
  font-weight: 900;
  cursor: pointer;
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
}

.action-form button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.action-form-buttons {
  grid-area: buttons;
  display: flex;
  align-self: end;
  justify-content: flex-end;
  gap: 8px;
}

.action-form-buttons button {
  width: 100%;
  min-height: 42px;
  font-size: 11px;
}

.action-form-buttons .secondary {
  border: 1px solid #b9cbe7;
  color: #0f3f94;
  background: #fff;
}

.action-form-message {
  min-height: 18px;
  margin: 0 2px 8px;
  font-size: 12px;
  font-weight: 800;
}

.action-form-message.error {
  color: #c81e1e;
}

.action-form-message.success {
  color: #14835f;
}

.action-form-message.info {
  color: #0f3f94;
}

.actions-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 2px 0 10px;
}

.action-section-heading {
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  padding-bottom: 9px;
  border-bottom: 2px solid var(--bimbo-blue);
  text-align: center;
}

.action-section-heading h3 {
  color: var(--bimbo-blue);
  font-size: 19px;
  letter-spacing: 0.04em;
}

.actions-control-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.action-view-filters {
  display: flex;
  align-items: end;
  gap: 9px;
}

.action-view-filters label {
  display: grid;
  gap: 4px;
  min-width: 155px;
}

.action-view-filters label > span {
  color: var(--bimbo-blue);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.action-view-filters select {
  min-height: 31px;
  border: 1px solid #b9cbe7;
  border-radius: 7px;
  padding: 5px 8px;
  color: #173d7a;
  background: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
}

.actions-utility-toolbar {
  justify-content: flex-end;
  margin: 0;
}

.action-field-kpi {
  grid-area: kpi;
}

.action-field-cause {
  grid-area: cause;
}

.action-field-action {
  grid-area: action;
}

.action-field-owner {
  grid-area: owner;
}

.action-field-date {
  grid-area: date;
}

.actions-summary-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 9px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0, 43, 127, 0.12);
  background: rgba(0, 43, 127, 0.04);
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
}

.actions-summary-strip strong {
  color: var(--bimbo-blue);
}

.action-filter {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.action-filter.active {
  border-color: var(--bimbo-blue);
  color: var(--bimbo-blue);
  background: var(--blue-soft);
}

.action-meeting-filters {
  justify-content: flex-start;
}

.action-line-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.action-line-filter select {
  min-width: 170px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  color: var(--bimbo-blue);
  background: #fff;
  font: inherit;
  font-weight: 800;
  text-transform: none;
}

.actions-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.action-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.action-status.open {
  color: #0a7a35;
  background: rgba(10, 122, 53, 0.12);
}

.action-status.closed {
  color: var(--bimbo-red);
  background: rgba(225, 37, 27, 0.1);
}

.action-link {
  border: 0;
  border-radius: 8px;
  padding: 7px 10px;
  background: rgba(0, 43, 127, 0.1);
  color: var(--bimbo-blue);
  font-weight: 800;
  cursor: pointer;
}

.action-link:hover {
  background: rgba(0, 43, 127, 0.16);
}

.action-link.close {
  color: #ffffff;
  background: #14835f;
}

.action-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.action-line-group {
  display: grid;
  gap: 6px;
}

.action-line-group-head {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 6px 9px;
  border-left: 4px solid var(--bimbo-blue);
  border-radius: 7px;
  color: var(--bimbo-blue);
  background: var(--blue-soft);
}

.action-line-group-head span,
.action-line-group-head small {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.action-line-group-head strong {
  font-size: 12px;
  text-transform: uppercase;
}

.action-line-group-head small {
  margin-left: auto;
  color: var(--muted);
}

.action-line-group-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  align-items: start;
}

.action-plan-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 6px 7px;
  border: 1px solid rgba(43, 111, 214, 0.34);
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.05);
}

.action-line-group-cards .action-plan-card:nth-child(4n + 1) {
  border-color: #c6d8f0;
  background: #fbfdff;
}

.action-line-group-cards .action-plan-card:nth-child(4n + 2) {
  border-color: #c7e4d8;
  background: #fbfefc;
}

.action-line-group-cards .action-plan-card:nth-child(4n + 3) {
  border-color: #eadbbd;
  background: #fffdf9;
}

.action-line-group-cards .action-plan-card:nth-child(4n + 4) {
  border-color: #ddd2ef;
  background: #fdfcff;
}

.action-compact-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.action-compact-copy > strong {
  color: #15233d;
  font-size: 10px;
  line-height: 1.2;
}

.action-compact-copy .action-plan-kpi {
  width: fit-content;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--blue-soft);
  font-size: 7px;
}

.action-compact-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.action-compact-meta span {
  display: grid;
  gap: 1px;
  padding: 4px 5px;
  border: 1px solid rgba(0, 43, 127, 0.14);
  border-radius: 7px;
  color: #16233a;
  background: #f8fbff;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.action-compact-meta span strong {
  color: var(--bimbo-blue);
  font-size: 6px;
  text-transform: uppercase;
}

.action-plan-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 7px;
}

.action-plan-head > div {
  display: grid;
  gap: 2px;
}

.action-plan-head strong {
  color: #111827;
  font-size: 12px;
  line-height: 1.25;
}

.action-plan-rank {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  background: #0f3f94;
  font-size: 10px;
  font-weight: 900;
}

.action-plan-kpi {
  color: #0f3f94;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.action-plan-meeting {
  display: inline-flex;
  width: fit-content;
  min-height: 19px;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  color: #7a4b00;
  background: #fff3d6;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.action-plan-cause {
  padding: 6px 8px;
  border-left: 3px solid #f59e0b;
  background: #fffaf0;
}

.action-plan-cause span {
  color: #9a5b00;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.action-plan-cause p {
  margin-top: 2px;
  color: #26344d;
  font-size: 9px;
  line-height: 1.25;
}

.action-plan-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 6px;
  color: #5b6c8d;
  font-size: 11px;
}

.action-plan-owner,
.action-plan-due {
  display: grid;
  flex: 1 1 135px;
  gap: 1px;
  padding: 6px 8px;
  border: 1px solid rgba(0, 43, 127, 0.16);
  border-radius: 8px;
  color: #111827;
  background: #f8fbff;
  font-size: 12px;
  font-weight: 900;
}

.action-plan-owner strong,
.action-plan-due strong {
  color: var(--bimbo-blue);
  font-size: 9px;
  text-transform: uppercase;
}

.action-plan-updated {
  flex: 1 1 100%;
  font-size: 8px;
}

.action-plan-buttons {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.action-plan-buttons .action-link {
  padding: 4px 6px;
  font-size: 8px;
}

.owner-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--bimbo-blue);
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.yesterday-panel {
  background:
    linear-gradient(135deg, #ffffff 0%, #ffffff 48%, #f7fbff 100%),
    var(--surface);
}

.issues-table th:first-child,
.issues-table td:first-child {
  width: 44px;
  text-align: center;
}

.issue-icon-cell {
  vertical-align: middle;
}

.panel-icon,
.issue-icon {
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 10px;
  color: var(--bimbo-blue);
  background: #e7efff;
  font-weight: 950;
}

.panel-icon {
  margin-right: 8px;
}

.issue-icon {
  width: 34px;
  height: 34px;
  margin: 0 auto;
  font-size: 16px;
}

.issue-icon.alta {
  color: #991b1b;
  background: #fee2e2;
}

.issue-icon.media {
  color: #92400e;
  background: #fef3c7;
}

.issue-icon.baja {
  color: #166534;
  background: #dcfce7;
}

.severity-pill {
  display: inline-flex;
  justify-content: center;
  min-width: 64px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
}

.severity-pill.alta {
  color: #991b1b;
  background: #fee2e2;
}

.severity-pill.media {
  color: #92400e;
  background: #fef3c7;
}

.severity-pill.baja {
  color: #166534;
  background: #dcfce7;
}

.panel.wide {
  grid-column: 1 / -1;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel h3 {
  font-size: 18px;
}

.panel h4 {
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
}

.narrative {
  display: grid;
  gap: 10px;
}

.finding {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.finding::before {
  content: "";
  width: 8px;
  height: 100%;
  min-height: 36px;
  border-radius: 999px;
  background: var(--teal);
}

.finding.risk::before {
  background: var(--red);
}

.finding.warn::before {
  background: var(--amber);
}

.finding strong {
  display: block;
  margin-bottom: 4px;
}

.finding span {
  color: var(--muted);
  line-height: 1.35;
}

.bar-list {
  display: grid;
  gap: 10px;
}

.bar-item {
  display: grid;
  gap: 4px;
}

.bar-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.bar-label-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.bar-rank {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  background: #cbd5e1;
}

.bar-rank-number,
.pareto-rank-number {
  position: relative;
  z-index: 1;
  color: #ffffff !important;
  transform: translateY(-1px);
}

.bar-rank.red,
.bar-fill.red,
.pareto-rank.red {
  background: linear-gradient(180deg, #ef4444, #c81e1e);
}

.bar-rank.orange,
.bar-fill.orange,
.pareto-rank.orange {
  background: linear-gradient(180deg, #f59e0b, #d97706);
}

.bar-rank.mustard,
.bar-fill.mustard,
.pareto-rank.mustard {
  background: linear-gradient(180deg, #d4a017, #b28704);
}

.bar-rank.green,
.bar-fill.green,
.pareto-rank.green {
  background: linear-gradient(180deg, #22a06b, #14835f);
}

.bar-rank.gray,
.bar-fill.gray,
.pareto-rank.gray {
  background: linear-gradient(180deg, #94a3b8, #64748b);
}

.bar-track.square {
  border-radius: 0;
}

.bar-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
  color: #0f1f3d;
}

.bar-value {
  color: #29497a;
  white-space: nowrap;
  font-weight: 900;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(180deg, #eef4ff, #e1ebfb);
  border: 1px solid #d5e3f8;
}

.bar-fill {
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: var(--bar);
}

.charts-panel {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(232, 242, 255, 0.76)),
    var(--surface);
}

.weekly-chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.chart-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid #002b7f;
  border-radius: 10px;
  background: #fff;
}

.chart-copy-button {
  display: block;
  min-height: 28px;
  margin: 9px 10px 8px auto;
  padding: 4px 10px;
  border: 1px solid rgba(0, 43, 127, 0.28);
  border-radius: 7px;
  background: #ffffff;
  color: var(--bimbo-blue);
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 43, 127, 0.08);
}

.chart-card > .chart-copy-button {
  margin-right: 0;
  margin-bottom: 0;
}

.chart-copy-button:hover,
.chart-copy-button:focus-visible {
  border-color: var(--bimbo-blue);
  background: #eef4ff;
  outline: none;
}

.chart-copy-button:disabled {
  opacity: 0.72;
  cursor: wait;
}

.formula-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.chart-card.good {
  border-color: #002b7f;
}

.chart-card.bad {
  border-color: #002b7f;
}

.chart-card-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 0;
  border-bottom: 0;
}

.chart-card-label,
.chart-status small {
  display: block;
  color: #111827;
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.chart-card-label {
  position: relative;
  padding-bottom: 8px;
  justify-self: center;
  text-align: center;
}

.chart-card-label::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(0, 43, 127, 0.48);
}

.chart-status {
  display: grid;
  gap: 2px;
  justify-items: end;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--wash);
  font-size: 10px;
  font-weight: 950;
  text-align: right;
  white-space: nowrap;
  justify-self: end;
  align-self: flex-end;
}

.chart-status.good {
  color: #166534;
  background: #dcfce7;
}

.chart-status.bad {
  color: #991b1b;
  background: #fee2e2;
}

.chart-status .chart-card-value {
  display: block;
  margin-top: 0;
  color: currentColor;
  font-size: 15px;
  line-height: 1;
}

.chart-status small {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.chart-status.good .chart-card-value {
  color: #166534;
}

.chart-status.bad .chart-card-value {
  color: #991b1b;
}

.chart-status.neutral .chart-card-value {
  color: #1d4ed8;
}

.trend-svg {
  display: block;
  width: 100%;
  height: 128px;
}

.goal-line {
  stroke: #e1251b;
  stroke-width: 2;
  stroke-dasharray: 6 6;
}

.chart-dot {
  fill: #fff;
  stroke: #002b7f;
  stroke-width: 3;
}

.chart-axis {
  fill: #111111;
  font-size: 10px;
  font-weight: 800;
}

.compact .bar-track {
  height: 9px;
}

.stop-rank-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.stop-rank-item + .stop-rank-item {
  margin-top: 8px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: var(--bimbo-blue);
  background: var(--blue-soft);
  font-size: 13px;
  font-weight: 900;
}

.pareto .bar-outside-value {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-width: 62px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eff4ff;
  color: #0f172a;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 0 0 1px #d7e2f4;
}

.rank-copy {
  min-width: 0;
}

.rank-copy strong,
.rank-copy small {
  display: block;
}

.rank-copy strong {
  color: #000;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.rank-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.rank-minutes {
  color: #000;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.plant-focus-panel {
  background:
    linear-gradient(135deg, rgba(232, 242, 255, 0.96), rgba(255, 255, 255, 0.95) 42%, rgba(255, 246, 216, 0.78)),
    var(--surface);
}

.plant-focus-layout {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 0.8fr) minmax(220px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(240px, 0.9fr) minmax(240px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(12, 24, 43, 0.58);
}

.modal-backdrop.open {
  display: flex;
}

.modal-window {
  width: min(1120px, 100%);
  max-height: min(860px, 92vh);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(232, 242, 255, 0.96)),
    var(--surface);
  box-shadow: 0 24px 70px rgba(0, 24, 60, 0.32);
}

.pareto-modal {
  width: min(940px, 100%);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.modal-window.bajas-modal .modal-head,
.modal-window.kpi-detail-modal .modal-head {
  border-bottom: 0;
  color: #fff;
  background: linear-gradient(135deg, #061f4d 0%, #0b2f6f 45%, #0a2b66 100%);
}

.modal-window.bajas-modal .modal-head h2,
.modal-window.bajas-modal .modal-head p:not(.eyebrow),
.modal-window.kpi-detail-modal .modal-head h2,
.modal-window.kpi-detail-modal .modal-head p:not(.eyebrow) {
  color: #fff;
}

.modal-window.bajas-modal .icon-button,
.modal-window.kpi-detail-modal .icon-button {
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.modal-head h2 {
  font-size: 28px;
}

.modal-head p:not(.eyebrow) {
  margin-top: 4px;
  color: var(--muted);
}

.modal-body {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.pareto-modal-body {
  gap: 12px;
}

.modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 18px;
}

.modal-grid article {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border: 1px solid #2b6fd6;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.07);
}

.modal-grid article h4 {
  margin: 0;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--bimbo-blue), #0b3d92);
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.modal-window.bajas-modal .modal-grid article h4,
.modal-window.kpi-detail-modal .modal-grid article h4 {
  background: #ffffff;
  color: #0f3f94;
  border-bottom: 1px solid rgba(43, 111, 214, 0.25);
}

.modal-grid article > :not(h4) {
  padding: 12px 14px 14px;
}

.icon-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  font-weight: 900;
}

.pareto-row {
  display: grid;
  gap: 6px;
}

.pareto-title {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  font-size: 12.5px;
  font-weight: 900;
  color: #0f1f3d;
}

.pareto-rank {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #ffffff !important;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  background: #cbd5e1;
  position: relative;
}

.pareto-title-text {
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.15;
}

.pareto-values {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #5b6c8d;
  font-size: 11px;
  font-weight: 800;
}

.pareto-row.product-inline {
  display: grid;
  grid-template-columns: minmax(240px, 1.25fr) minmax(150px, 0.78fr) auto;
  align-items: center;
  gap: 6px;
}

.pareto-row.product-inline .pareto-title {
  margin-right: 2px;
}

.pareto-row.product-inline .bar-track {
  height: 120px;
  margin: 0;
}

.pareto-row.product-inline .pareto-values.product-values {
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  min-width: 66px;
  text-align: right;
  margin-left: -4px;
}

.pareto-row.product-inline .pareto-values.product-values strong {
  font-size: 11px;
}

.pareto-row.product-inline .pareto-values.product-values span {
  font-size: 10px;
}

.pareto-values strong {
  color: #0f1f3d;
  font-size: 12px;
}

.bar-list.compact .bar-item,
.bar-list.compact .pareto-row,
.modal-grid article .pareto-row {
  padding: 5px 8px;
  border: 1px solid rgba(43, 111, 214, 0.18);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.bar-list.compact .bar-item:hover,
.bar-list.compact .pareto-row:hover,
.modal-grid article .pareto-row:hover {
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.07);
}

.bar-list.compact .bar-meta {
  font-size: 10.5px;
}

.bar-list.compact .bar-label-wrap {
  gap: 6px;
  flex: 1 1 auto;
}

.bar-list.compact .bar-label {
  font-size: 10.5px;
}

#kpiModal .bar-list.compact .bar-label {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.15;
}

.bar-list.compact .bar-value {
  font-size: 10px;
  color: #0f3f94;
}

.bar-list.compact .bar-item.inline .bar-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 180px) auto;
  align-items: center;
  gap: 10px;
}

.bar-list.compact .bar-item.inline {
  grid-template-columns: 1fr;
  gap: 4px;
}

.bar-list.compact .bar-item.inline .bar-track {
  height: 9px;
  margin: 0;
}

.bar-list.compact .bar-item.inline .bar-label {
  font-size: 10.5px;
}

.bar-list.compact .bar-item.inline .bar-value {
  font-size: 10px;
  text-align: right;
  justify-self: end;
  min-width: 34px;
  color: #0f3f94;
}

.bar-list.compact .bar-item.inline .bar-track.inline {
  min-width: 110px;
  width: 100%;
  max-width: 180px;
  justify-self: start;
}

.bar-item.single-item .bar-track,
.pareto-row.single-item .bar-track {
  width: min(10%, 90px);
  justify-self: start;
}

.bar-item.small-set .bar-track,
.pareto-row.small-set .bar-track {
  width: min(30%, 180px);
  justify-self: start;
}

.bar-item.single-item.inline .bar-track.inline {
  width: 100%;
  min-width: 110px;
  max-width: 180px;
  justify-self: start;
}

.bar-item.small-set.inline .bar-track.inline {
  width: 100%;
  min-width: 110px;
  max-width: 180px;
  justify-self: start;
}

.bar-list.compact .pareto-row.product-inline .bar-track {
  width: 100%;
  min-width: 110px;
  max-width: 180px;
  flex: 0 1 180px;
}

.bar-list.compact .bar-item.red .bar-value,
.bar-list.compact .bar-item.red .bar-rank {
  color: #c81e1e;
}

.bar-list.compact .bar-item.orange .bar-value,
.bar-list.compact .bar-item.orange .bar-rank {
  color: #d97706;
}

.bar-list.compact .bar-item.mustard .bar-value,
.bar-list.compact .bar-item.mustard .bar-rank {
  color: #b28704;
}

.bar-list.compact .bar-item.gray .bar-value,
.bar-list.compact .bar-item.gray .bar-rank {
  color: #64748b;
}

.bar-list.compact .bar-item.green .bar-value {
  color: #14835f;
}

.bar-list.compact .bar-fill {
  background: linear-gradient(180deg, #2b6fd6, #174ea6);
}

.bar-list.compact .bar-fill.red {
  background: linear-gradient(180deg, #ef4444, #c81e1e);
}

.bar-list.compact .bar-fill.orange {
  background: linear-gradient(180deg, #f59e0b, #d97706);
}

.bar-list.compact .bar-track {
  height: 6px;
}

.bar-list.compact .bar-rank {
  width: 18px;
  height: 18px;
  font-size: 9px;
}

.focus-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.focus-summary.bajas-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.focus-summary.kpi-detail-summary {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.focus-summary.kpi-detail-summary .focus-card {
  min-height: 76px;
  padding: 8px 10px;
  box-shadow: 0 3px 9px rgba(15, 23, 42, 0.07);
}

.modal-window.kpi-detail-modal .focus-card > span {
  color: #111827;
}

.focus-summary.bajas-summary .focus-card {
  min-height: 76px;
  padding: 8px 9px;
  line-height: 1.15;
}

.focus-summary.bajas-summary .focus-card strong {
  font-size: 21px;
  line-height: 0.95;
}

.focus-summary.bajas-summary .focus-card small {
  font-size: 10.5px;
}

.focus-card {
  min-height: 82px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.focus-card span,
.focus-card small {
  display: block;
  color: var(--muted);
}

.focus-card span {
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.focus-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 18px;
  line-height: 1;
}

.focus-card small {
  font-size: 11px;
  line-height: 1.35;
}

.focus-card.total {
  border-color: rgba(35, 111, 158, 0.28);
  background: var(--blue-soft);
}

.focus-card.good {
  border-color: rgba(36, 116, 91, 0.28);
  background: var(--green-soft);
}

.focus-card.warn {
  border-color: rgba(184, 132, 42, 0.32);
  background: var(--amber-soft);
}

.focus-card.bad {
  border-color: rgba(185, 71, 60, 0.3);
  background: var(--red-soft);
}

@media (max-width: 1100px) {
  .focus-summary.bajas-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.hidden {
  display: none !important;
}

.bajas-extras {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.bajas-extras-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 8px;
}

.bajas-extra-card {
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
}

.bajas-extra-card h4 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.bajas-extra-note {
  padding: 8px 9px;
  border-radius: 12px;
  border: 1px solid rgba(225, 37, 27, 0.16);
  background: linear-gradient(180deg, #fffaf8, #fff4ef);
  color: #1f2d4d;
  font-size: 10.8px;
  line-height: 1.25;
}

.bajas-extra-note strong {
  color: #d11b1b;
}

.bajas-cause-list {
  display: grid;
  gap: 6px;
}

.bajas-cause-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.bajas-cause-item .cause-name {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.bajas-cause-item .cause-value {
  justify-self: end;
  color: #d11b1b;
  font-size: 12px;
  font-weight: 900;
}

.bajas-cause-item.top-hit {
  border-color: rgba(225, 37, 27, 0.18);
  background: #fff7f7;
}

.table-wrap {
  width: 100%;
  overflow: auto;
}

.table-wrap.tall {
  max-height: 340px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #000;
  background: var(--surface);
  font-size: 12px;
  text-align: center;
  text-transform: uppercase;
}

td.numeric {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.operation-row {
  cursor: pointer;
}

.operation-row:hover {
  background: rgba(0, 87, 168, 0.055);
}

.operation-row:focus {
  outline: 2px solid rgba(0, 87, 168, 0.35);
  outline-offset: -2px;
}

.decision-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 78px;
  color: #000;
  font-weight: 800;
}

.decision-value {
  min-width: 44px;
  text-align: right;
}

.decision-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  color: #fff;
  background: var(--muted);
  font-size: 14px;
  font-weight: 950;
  line-height: 1;
}

.decision-cell.good .decision-icon,
.trend-cell.good .decision-icon {
  background: var(--green);
}

.decision-cell.bad .decision-icon,
.trend-cell.bad .decision-icon {
  background: var(--red);
}

.decision-cell.neutral .decision-icon,
.trend-cell.neutral .decision-icon {
  background: var(--muted);
}

.trend-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 112px;
  font-size: 12px;
  font-weight: 900;
  color: #000;
}

.trend-cell small {
  color: var(--muted);
  font-size: 11px;
}

.line-kpi-row {
  display: grid;
  grid-template-columns: 24px minmax(92px, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.line-kpi-row + .line-kpi-row {
  margin-top: 7px;
}

.line-kpi-row strong {
  color: #000;
  font-size: 13px;
}

.line-kpi-row > span:not(.decision-icon) {
  color: #000;
  font-size: 13px;
  font-weight: 900;
}

.line-kpi-row small {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 11px;
}

.line-kpi-row.good {
  border-color: rgba(20, 131, 95, 0.22);
}

.line-kpi-row.bad {
  border-color: rgba(216, 36, 31, 0.24);
}

.line-kpi-row.good .decision-icon {
  background: var(--green);
}

.line-kpi-row.bad .decision-icon {
  background: var(--red);
}

.target-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
}

.target-card {
  display: grid;
  gap: 10px;
  min-height: 154px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.target-card.good {
  border-color: rgba(36, 116, 91, 0.35);
  background: linear-gradient(180deg, var(--green-soft), #fff);
}

.target-card.warn {
  border-color: rgba(184, 132, 42, 0.38);
  background: linear-gradient(180deg, var(--amber-soft), #fff);
}

.target-card.bad {
  border-color: rgba(185, 71, 60, 0.38);
  background: linear-gradient(180deg, var(--red-soft), #fff);
}

.target-card-head,
.target-values {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.target-card-head strong {
  min-width: 0;
  font-size: 14px;
  line-height: 1.2;
}

.target-card-head span {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.target-values {
  color: var(--muted);
  font-size: 12px;
}

.target-values b {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 18px;
}

.target-track {
  position: relative;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe8e4;
}

.target-fill {
  height: 100%;
  min-width: 2px;
  max-width: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.target-marker {
  position: absolute;
  top: -3px;
  bottom: -3px;
  z-index: 2;
  width: 2px;
  background: var(--ink);
}

.target-card small {
  color: var(--muted);
  line-height: 1.3;
}

.pill {
  display: inline-flex;
  justify-content: center;
  min-width: 68px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
}

.empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel);
}

@media (max-width: 1080px) {
  .top-filters {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .summary-top,
  .summary-middle,
  .summary-bottom {
    grid-template-columns: 1fr;
  }

  .summary-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .semaforo-general-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .status-card {
    grid-column: 1 / -1;
  }

  .target-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plant-focus-layout,
  .focus-grid,
  .decision-grid,
  .decision-summary-grid,
  .weekly-chart-grid,
  .modal-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .action-form {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "kpi cause"
      "action action"
      "owner date"
      "buttons buttons";
  }

  .action-field-cause,
  .action-field-action {
    grid-column: auto;
  }

  .action-line-group-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .semaforo-general-panel {
    padding: 11px;
  }

  .semaforo-general-heading h3 {
    font-size: 15px;
  }

  .semaforo-general-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .traffic-light-card {
    min-height: 96px;
    padding: 9px;
  }

  .traffic-light-icon {
    font-size: 29px;
  }

  .traffic-light-value {
    font-size: 18px;
  }

  main {
    padding: 8px;
  }

  .topbar.app-header {
    min-height: 82px;
    margin-bottom: 8px;
    padding: 14px 12px;
    align-items: center;
    flex-direction: row;
    gap: 10px;
  }

  .app-header .refresh-button {
    position: static;
    flex: 0 0 auto;
    transform: none;
  }

  .refresh-button .refresh-logo {
    width: 76px;
  }

  .app-header .brand-block {
    align-items: flex-start;
    justify-content: center;
  }

  .app-header h1 {
    font-size: clamp(17px, 5vw, 22px);
    line-height: 1.15;
    text-align: left;
  }

  .app-header,
  .board,
  .split,
  .decision-grid,
  .decision-summary-grid,
  .action-form,
  .target-grid,
  .focus-summary,
  .detail-grid,
  .modal-grid,
  .action-cards,
  .action-line-group-cards,
  .filters {
    grid-template-columns: 1fr;
  }

  .actions-control-row,
  .action-view-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .action-view-filters label {
    min-width: 0;
  }

  .actions-utility-toolbar {
    justify-content: stretch;
  }

  .action-form-buttons,
  .action-field-cause,
  .action-field-action {
    grid-column: auto;
  }

  .action-form {
    grid-template-areas:
      "kpi"
      "cause"
      "action"
      "owner"
      "date"
      "buttons";
  }

  .action-plan-card {
    grid-template-columns: 1fr;
  }

  .action-compact-meta {
    grid-template-columns: 1fr 1fr;
  }

  .top-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: -8px;
    padding: 8px;
    gap: 7px;
  }

  .top-filters label:last-child {
    grid-column: 1 / -1;
  }

  .top-filters select,
  .top-filters input {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    font-size: 13px;
  }

  .red-curve-divider {
    height: 24px;
    margin-bottom: 8px;
  }

  .hero-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .hero-kpis .metric {
    width: 100%;
    min-height: 124px;
    gap: 4px;
    padding: 7px 5px 6px;
  }

  .hero-kpis .metric .gauge {
    width: 52px;
    height: 52px;
  }

  .hero-kpis .metric .gauge span {
    font-size: 18px;
  }

  .hero-kpis .metric strong {
    font-size: 17px;
  }

  .kpi-group-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    width: 100%;
  }

  .kpi-group-tab {
    width: 100%;
    min-height: 40px;
    padding: 0 8px;
    font-size: 11px;
  }

  .summary-view,
  .top-grid,
  .focus-grid,
  .board,
  .charts-grid,
  .weekly-chart-grid {
    gap: 10px;
  }

  .panel:not(.bajas-panel) {
    padding: 12px;
  }

  .panel-title {
    min-height: 46px;
    padding: 9px 12px;
    flex-wrap: wrap;
    font-size: 16px !important;
    line-height: 1.15;
  }

  #desperdicioPanels .panel-title {
    min-height: 44px;
    padding: 8px 10px;
  }

  .pareto-switches {
    width: 100%;
    margin-left: 0;
    gap: 6px;
  }

  .pareto-chip {
    flex: 1 1 auto;
    min-height: 34px;
    padding: 6px 7px;
  }

  .time-line-selector {
    width: 100%;
    margin-left: 0;
  }

  .time-line-selector select {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
  }

  .stop-type-legend {
    grid-template-columns: 1fr;
  }

  .stop-type-summary > div {
    padding: 7px 6px;
  }

  .stop-type-summary strong {
    font-size: 14px;
  }

  .panel-head,
  .actions-toolbar,
  .action-plan-head {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .action-plan-head {
    align-items: start;
  }

  .action-plan-head .action-status {
    align-self: start;
  }

  .actions-toolbar .action-filter {
    flex: 1 1 140px;
    text-align: center;
  }

  .action-line-filter {
    width: 100%;
    margin-left: 0;
  }

  .action-line-filter select {
    flex: 1 1 auto;
    min-width: 0;
  }

  .actions-count {
    width: 100%;
    margin-left: 0;
  }

  .chart-card {
    padding: 10px;
  }

  .chart-copy-button {
    min-height: 34px;
    padding: 6px 11px;
    font-size: 11px;
  }

  .modal-backdrop {
    padding: 0;
  }

  .modal-window,
  .pareto-modal {
    width: 100%;
    max-height: 100dvh;
    border-radius: 0;
  }

  .modal-head {
    gap: 10px;
    padding: 12px;
  }

  .modal-head h2 {
    font-size: 20px;
  }

  .modal-body {
    gap: 12px;
    padding: 10px;
  }

  .focus-summary.bajas-summary,
  .kpi-detail-modal .focus-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cross-board-head,
  .cross-row {
    grid-template-columns: 1fr;
  }

  .cross-total {
    justify-items: start;
  }

  .pareto-row.product-inline,
  .modal-window.kpi-detail-modal .pareto-row.product-inline {
    grid-template-columns: minmax(120px, 1fr) minmax(70px, 0.8fr) auto;
    gap: 6px;
  }
}

@media (max-width: 760px) {
  .r11-donut-layout {
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: 0;
    padding: 8px;
  }

  .r11-donut-figure {
    width: min(70vw, 230px);
  }

  .r11-subcause-impact {
    align-items: flex-start;
    flex-direction: column;
  }

  .r11-subcause-impact .r11-product-bar {
    flex-basis: 18px;
    width: 68%;
    max-width: 210px;
  }

  .r11-related-products {
    display: grid;
    gap: 3px;
  }
}

@media (max-width: 420px) {
  .top-filters {
    grid-template-columns: 1fr;
  }

  .top-filters label:last-child {
    grid-column: auto;
  }

  .app-header .refresh-logo {
    width: 64px;
  }

  .app-header h1 {
    font-size: 17px;
  }
}

/* Prototipo local unificado BCO — pantalla operativa continua */
html { scroll-behavior: smooth; scroll-padding-top: 8.5rem; }
.app-header { gap: 1rem; flex-wrap: wrap; }
.dashboard-mode-switch { margin-left: auto; display: flex; gap: .35rem; padding: .3rem; border-radius: 999px; background: rgba(255,255,255,.14); }
.dashboard-mode-link { color: #fff; text-decoration: none; font-weight: 800; font-size: .82rem; padding: .62rem .9rem; border-radius: 999px; white-space: nowrap; }
.dashboard-mode-link:hover, .dashboard-mode-link:focus-visible { background: rgba(255,255,255,.16); }
.dashboard-mode-link.is-active { color: #083b78; background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.16); }
.dashboard-section-nav { position: sticky; top: 0; z-index: 25; overflow-x: auto; justify-content: flex-start; scrollbar-width: thin; }
.dashboard-section-nav .kpi-group-tab { flex: 0 0 auto; }
.continuous-section { margin: 1.25rem 0 2rem; scroll-margin-top: 8.5rem; }
.continuous-section__heading { display: flex; align-items: center; gap: .8rem; margin: 0 0 1rem; padding: .9rem 1.15rem; color: #123f73; border-bottom: 3px solid #e2231a; background: linear-gradient(90deg,#eef5ff,#fff); border-radius: 14px 14px 0 0; }
.continuous-section__heading span { display: grid; place-items: center; min-width: 2.2rem; height: 2.2rem; border-radius: 50%; color: #fff; background: #0f4c8a; font-weight: 900; }
.continuous-section__heading h2 { margin: 0; font-size: clamp(1.05rem,2vw,1.45rem); }
.continuous-section > [hidden], .continuous-section .hidden-filter, .continuous-section .scope-hidden { display: revert !important; }
#operativo-indicadores .top-grid, #operativo-indicadores #semaforoGeneralPanel,
#operativo-graficas #weeklyChartsPanel, #operativo-desperdicios #desperdicioPanels,
#operativo-servicio #servicioPanels, #operativo-acciones #decisionesPanel { width: 100%; }
#operativo-tiempo { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
#operativo-tiempo > .continuous-section__heading, #operativo-tiempo > #desperdicioRendimientoPanels { grid-column: 1 / -1; }
@media (max-width: 760px) {
  .dashboard-mode-switch { order: 3; width: 100%; justify-content: center; }
  .dashboard-mode-link { flex: 1; text-align: center; font-size: .75rem; }
  #operativo-tiempo { grid-template-columns: 1fr; }
  #operativo-tiempo > .continuous-section__heading, #operativo-tiempo > #desperdicioRendimientoPanels { grid-column: 1; }
  .continuous-section { min-width: 0; }
}

/* Filtros operativos homologados al tablero estratégico */
.operational-filters-wrapper {
  display: grid;
  gap: 8px;
  width: 100%;
  margin: -8px 0 0;
}
.operational-filters-wrapper .filters-toggle {
  display: none;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #d5dee9;
  border-radius: 10px;
  color: #243b63;
  background: #f4f7fb;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.operational-filters-wrapper .top-filters {
  margin: 0;
  padding: 8px;
  border: 1px solid #d5dee9;
  border-radius: 12px;
  background: #f4f7fb;
  box-shadow: 0 8px 24px rgba(15, 76, 138, 0.10);
}
.operational-filters-wrapper .top-filters label,
.operational-filters-wrapper .top-filters .control > span {
  color: #52627a;
  font-size: 12px;
}
.operational-filters-wrapper .top-filters select,
.operational-filters-wrapper .top-filters input {
  min-height: 38px;
  padding: 6px 10px;
  border-color: #d5dee9;
  color: #14213a;
  background: #fff;
  font-size: 13px;
}
.operational-filters-wrapper .top-filters input[type="date"] { color-scheme: light; }
.operational-filters-wrapper .top-filters select:disabled {
  color: #64748b;
  background: #eef2f7;
}
@media (max-width: 980px) {
  .operational-filters-wrapper { margin-top: 0; }
  .operational-filters-wrapper .filters-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .operational-filters-wrapper .top-filters { display: none !important; grid-template-columns: 1fr; }
  .operational-filters-wrapper .top-filters.controls--open { display: grid !important; }
  .operational-filters-wrapper .top-filters label:last-child { grid-column: auto; }
}

/* Header title size parity with home dashboard */
.brand-block h1{font-size:26px!important;line-height:1.08!important;font-weight:700!important;letter-spacing:-.01em!important}
.brand-block p,.brand-block .brand-subtitle{font-size:15px!important;line-height:1.2!important;font-weight:500!important}
@media(max-width:980px){.brand-block h1{font-size:24px!important}.brand-block p,.brand-block .brand-subtitle{font-size:14px!important}}
