:root {
  --ink: #07172b;
  --navy: #0b2442;
  --blue: #135fa7;
  --sky: #e5f3ff;
  --mint: #33d6b1;
  --mint-dark: #087f6a;
  --red: #d83947;
  --amber: #f2b84b;
  --paper: #f4f7fa;
  --white: #ffffff;
  --line: #d8e0e8;
  --muted: #637083;
  --shadow: 0 14px 35px rgba(7, 23, 43, .08);
  --radius: 18px;
  font-family: "Aptos", "Segoe UI Variable", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, select { font: inherit; }
button, select, input { outline-offset: 3px; }
:focus-visible { outline: 3px solid #6fc7ff; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 50; padding: 10px 14px; background: white; color: var(--ink); }
.skip-link:focus { top: 12px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 22px; display: flex; flex-direction: column; gap: 26px; color: white; background: var(--ink); overflow: auto; }
.brand { display: flex; gap: 12px; align-items: center; letter-spacing: .08em; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1rem; }
.brand small { margin-top: 2px; color: #9eb0c3; letter-spacing: .02em; font-size: .72rem; }
.brand-shield { width: 38px; height: 42px; display: grid; place-items: center; font-weight: 900; border: 2px solid var(--mint); border-radius: 10px 10px 17px 17px; color: var(--mint); }
.eyebrow { display: block; margin-bottom: 7px; color: var(--blue); text-transform: uppercase; letter-spacing: .13em; font: 700 .69rem/1.2 "Segoe UI", sans-serif; }
.eyebrow.light { color: #8bcfff; }
.country-card, .market-queue { padding: 16px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(255,255,255,.045); }
.country-card .eyebrow, .market-queue .eyebrow { color: #8296ab; }
.country-card strong, .market-queue strong { display: block; font-size: 1rem; }
.country-flag { display: inline-grid; width: 28px; height: 20px; margin-right: 7px; place-items: center; border-radius: 4px; color: #07172b; background: #f5d547; font-size: .62rem; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; color: #b8fae9; font-size: .72rem; }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 5px rgba(51,214,177,.12); }
.side-nav { display: grid; gap: 5px; }
.side-nav a { padding: 10px 12px; color: #9eb0c3; text-decoration: none; border-left: 2px solid transparent; font-size: .85rem; }
.side-nav a:hover, .side-nav a.active { color: white; border-color: var(--mint); background: rgba(255,255,255,.045); }
.market-queue { margin-top: 0; }
.session-card { order: -1; }
.market-queue small { display: block; margin-top: 8px; color: #9eb0c3; line-height: 1.5; }
.privacy-note { margin: 0; color: #73879b; font-size: .67rem; line-height: 1.5; }
main { min-width: 0; padding: 30px clamp(22px, 4vw, 64px) 70px; }
.topbar { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.7rem, 3vw, 2.8rem); letter-spacing: -.045em; line-height: 1.05; }
h2 { margin-bottom: 0; font-size: clamp(1.35rem, 2.4vw, 2rem); letter-spacing: -.035em; }
h3 { margin-bottom: 0; font-size: 1rem; }
.top-actions { display: flex; gap: 9px; }
.button { min-height: 42px; padding: 10px 15px; border: 0; border-radius: 10px; font-weight: 750; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: var(--ink); background: var(--mint); box-shadow: 0 8px 20px rgba(51,214,177,.2); }
.button.dark { color: white; background: var(--ink); }
.button.ghost { color: var(--ink); background: white; border: 1px solid var(--line); }
.filter-bar { display: flex; align-items: end; gap: 12px; padding: 14px; margin-bottom: 22px; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 22px rgba(7,23,43,.04); }
.filter-bar label { display: grid; gap: 5px; color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.filter-bar input, .filter-bar select { height: 42px; min-width: 150px; padding: 0 11px; border: 1px solid #c9d3de; border-radius: 9px; color: var(--ink); background: white; }
.freshness { margin-left: auto; align-self: center; color: var(--muted); font-size: .72rem; }
.error-box { padding: 14px 18px; margin-bottom: 18px; color: #8f1e2b; border: 1px solid #efb1b7; border-radius: 12px; background: #fff0f2; }
.loading-state { min-height: 360px; display: grid; place-content: center; justify-items: center; color: var(--muted); }
.spinner { width: 42px; height: 42px; border: 4px solid #d9e4ee; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, .8fr); gap: 16px; }
.hero-card { position: relative; min-height: 275px; padding: clamp(24px, 4vw, 42px); overflow: hidden; color: white; background: linear-gradient(118deg, #07172b 0%, #0b2f59 72%, #114b75 100%); border-radius: 22px; display: grid; grid-template-columns: 1fr .8fr; gap: 24px; align-items: end; box-shadow: 0 24px 50px rgba(7,23,43,.18); }
.hero-kicker { max-width: 260px; margin-bottom: 8px; color: #c8d7e6; }
.hero-number { display: block; font-size: clamp(4rem, 8vw, 7.2rem); letter-spacing: -.08em; line-height: .88; }
.hero-copy { position: relative; z-index: 2; }
.hero-copy p { color: #d8e4ef; font-size: 1.03rem; line-height: 1.55; }
.period-chip { display: inline-block; padding: 8px 10px; color: #b8fae9; border: 1px solid rgba(51,214,177,.35); border-radius: 8px; background: rgba(51,214,177,.08); font: 700 .72rem/1 monospace; }
.route-mark { position: absolute; right: -20px; top: 8px; width: 55%; color: rgba(118,198,255,.2); }
.route-mark circle { fill: currentColor; }
.decision-card { padding: 27px; background: #fff; border-radius: 22px; border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.decision-card > strong { margin: 15px 0 10px; font-size: 1.55rem; line-height: 1.2; }
.decision-card > p { color: var(--muted); line-height: 1.6; }
.quality-stamp { margin-top: auto; padding-top: 18px; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); font-size: .75rem; }
.quality-stamp span { color: var(--muted); }
.kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 16px 0 42px; }
.kpi { min-height: 140px; padding: 18px; display: flex; flex-direction: column; background: white; border-top: 3px solid var(--blue); border-radius: 14px; box-shadow: 0 8px 24px rgba(7,23,43,.055); }
.kpi.alert { border-color: var(--red); }
.kpi > span { color: var(--muted); font-size: .71rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.kpi > strong { margin: 13px 0 7px; font-size: clamp(1.55rem, 2.5vw, 2.35rem); letter-spacing: -.05em; }
.kpi > small { margin-top: auto; color: var(--muted); line-height: 1.35; }
.section-block { margin-top: 44px; scroll-margin-top: 20px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.section-heading > p { max-width: 520px; margin-bottom: 2px; color: var(--muted); line-height: 1.5; font-size: .82rem; }
.status-rail { display: grid; grid-template-columns: repeat(6, minmax(115px, 1fr)); gap: 0; padding: 20px; margin-bottom: 16px; background: white; border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.status-step { position: relative; min-width: 110px; padding: 6px 14px; border-right: 1px dashed #c8d2dd; }
.status-step:last-child { border-right: 0; }
.status-step::before { content: ""; display: block; width: 10px; height: 10px; margin-bottom: 12px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 5px var(--sky); }
.status-step.alert::before { background: var(--red); box-shadow: 0 0 0 5px #ffe7e9; }
.status-step span { display: block; min-height: 34px; color: var(--muted); font-size: .71rem; line-height: 1.3; }
.status-step strong { font-size: 1.6rem; }
.split-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 16px; }
.triple-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.panel { padding: 22px; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(7,23,43,.04); }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.panel-title span { padding: 5px 7px; color: var(--blue); border-radius: 6px; background: var(--sky); font: 750 .64rem/1 monospace; text-transform: uppercase; }
.bar-list { display: grid; gap: 13px; }
.bar-row { display: grid; grid-template-columns: minmax(105px, 1fr) 2fr auto; align-items: center; gap: 10px; font-size: .75rem; }
.bar-row label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 7px; overflow: hidden; border-radius: 6px; background: #e8eef4; }
.bar-track i { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: var(--blue); }
.bar-row strong { min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.bar-list.compact { gap: 9px; }
.donut-layout { display: grid; grid-template-columns: 130px 1fr; gap: 22px; align-items: center; }
.donut { width: 128px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--blue) 0 var(--first), var(--mint) var(--first) 100%); }
.donut::after { content: attr(data-total); width: 76px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: white; font-weight: 900; font-size: 1.35rem; }
.legend { display: grid; gap: 9px; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: .76rem; }
.legend-row i { width: 9px; height: 9px; border-radius: 3px; }
.legend-row strong { margin-left: auto; }
.table-panel { padding: 0; overflow: hidden; }
.logistics-section { position: relative; }
.logistics-section::before { content: ""; position: absolute; left: -18px; top: 62px; bottom: 0; width: 4px; border-radius: 4px; background: linear-gradient(var(--blue), var(--mint)); }
.logistics-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.freight-kpi { min-height: 132px; padding: 22px; display: flex; flex-direction: column; border: 1px solid #b9d8ee; border-radius: var(--radius); background: linear-gradient(135deg, #f7fbff, #eaf6ff); box-shadow: 0 8px 24px rgba(7,23,43,.04); }
.freight-kpi.dark { color: white; border-color: var(--navy); background: linear-gradient(120deg, var(--ink), #123d66); }
.freight-kpi span { font-size: .7rem; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; opacity: .72; }
.freight-kpi strong { margin: 12px 0 5px; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1; letter-spacing: -.06em; }
.freight-kpi small { margin-top: auto; color: var(--muted); }
.freight-kpi.dark small { color: #b9cddd; }
.carrier-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.carrier-card { min-height: 165px; padding: 18px; display: grid; grid-template-columns: auto 1fr; align-content: start; gap: 6px 12px; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: 0 8px 20px rgba(7,23,43,.045); }
.carrier-mark { grid-row: 1 / 3; width: 58px; height: 44px; padding: 7px; display: grid; place-items: center; overflow: hidden; border: 1px solid #dfe8f1; border-radius: 12px; background: white; }
.carrier-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.carrier-mark--envia { padding: 0; border-color: #e30613; background: #e30613; }
.carrier-mark--envia img { object-fit: cover; }
.carrier-mark--inter { padding: 0; border-color: #080914; background: #080914; }
.carrier-mark--inter img { object-fit: contain; }
.carrier-card h3 { align-self: center; line-height: 1.2; }
.carrier-card > strong { grid-column: 1 / -1; margin-top: 12px; padding: 9px 12px; text-align: center; color: #075f50; border-radius: 8px; background: #d9f9f1; font-size: .85rem; }
.carrier-card p { grid-column: 1 / -1; margin: 4px 0 0; text-align: center; color: var(--muted); font-size: .78rem; }
.logistics-detail-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr); gap: 16px; }
.logistics-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: -4px 0 20px; color: var(--muted); font-size: .7rem; }
.logistics-legend i { width: 10px; height: 10px; margin-right: -7px; border-radius: 3px; background: var(--mint-dark); }
.logistics-legend i.returned { background: var(--red); }
.logistics-legend i.transit { background: var(--amber); }
.logistics-chart { display: grid; gap: 18px; }
.logistics-chart-row { display: grid; grid-template-columns: minmax(120px, .65fr) 2fr; gap: 14px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid #e7edf3; }
.logistics-chart-row:last-child { padding-bottom: 0; border-bottom: 0; }
.logistics-chart-row > strong { font-size: .76rem; line-height: 1.25; }
.logistics-bars { display: grid; gap: 6px; }
.logistics-bar { position: relative; display: grid; grid-template-columns: 95px 1fr 54px; align-items: center; gap: 8px; color: var(--muted); font-size: .65rem; outline: none; cursor: help; }
.logistics-bar::after { content: attr(data-tooltip); position: absolute; z-index: 20; left: 50%; bottom: calc(100% + 9px); width: max-content; max-width: min(290px, 80vw); padding: 8px 10px; color: white; background: #071a2f; border-radius: 6px; box-shadow: 0 8px 20px rgba(7,26,47,.2); font-size: .72rem; font-weight: 650; line-height: 1.35; opacity: 0; pointer-events: none; transform: translate(-50%, 5px); transition: opacity .15s ease, transform .15s ease; }
.logistics-bar::before { content: ""; position: absolute; z-index: 21; left: 50%; bottom: calc(100% + 4px); width: 9px; height: 9px; background: #071a2f; opacity: 0; pointer-events: none; transform: translateX(-50%) rotate(45deg); transition: opacity .15s ease; }
.logistics-bar:hover::after, .logistics-bar:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.logistics-bar:hover::before, .logistics-bar:focus-visible::before { opacity: 1; }
.logistics-bar:focus-visible { border-radius: 4px; box-shadow: 0 0 0 2px rgba(7,136,248,.35); }
.logistics-bar i { height: 8px; overflow: hidden; border-radius: 8px; background: #edf1f5; }
.logistics-bar b { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: var(--mint-dark); }
.logistics-bar.returned b { background: var(--red); }
.logistics-bar.transit b { background: var(--amber); }
.logistics-bar em { color: var(--ink); text-align: right; font-style: normal; font-weight: 800; font-variant-numeric: tabular-nums; }
.data-note { margin: -8px 0 16px; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.freight-panel { padding: 22px 0 0; overflow: hidden; }
.freight-panel .panel-title, .freight-panel .data-note { padding-left: 22px; padding-right: 22px; }
.freight-panel td:last-child { color: var(--mint-dark); font-weight: 900; white-space: nowrap; }
.carrier-distribution-section { margin-top: 18px; padding: 22px; border-top: 1px solid #d9e3ec; background: linear-gradient(180deg, #fbfdff, #f4f9fd); }
.distribution-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.distribution-heading h4 { margin-top: 4px; color: var(--ink); font-size: 1rem; }
.distribution-heading > span { color: var(--muted); font-size: .68rem; }
.carrier-distribution-layout { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(210px, 1fr); align-items: center; gap: 24px; }
.carrier-distribution-pie { position: relative; justify-self: center; width: min(190px, 52vw); aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(7,23,43,.06), 0 12px 28px rgba(7,23,43,.08); }
.carrier-distribution-pie::after { content: attr(data-total) "\A guías"; white-space: pre; position: absolute; inset: 26%; display: grid; place-items: center; color: var(--ink); border-radius: 50%; background: white; box-shadow: 0 4px 15px rgba(7,23,43,.08); text-align: center; font-size: .72rem; font-weight: 700; line-height: 1.3; }
.carrier-distribution-legend { display: grid; gap: 9px; }
.carrier-distribution-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding-bottom: 7px; border-bottom: 1px solid #e3eaf1; font-size: .7rem; }
.carrier-distribution-row:last-child { padding-bottom: 0; border-bottom: 0; }
.carrier-distribution-row i { width: 10px; height: 10px; border-radius: 3px; }
.carrier-distribution-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carrier-distribution-row strong { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.payment-panel { margin-top: 16px; }
.route-payment-panel { margin-top: 0; }
.route-insights { align-items: stretch; }
.route-insights > .panel { min-width: 0; }
.route-payment-panel .payment-layout { min-height: 260px; grid-template-columns: minmax(175px, .7fr) minmax(210px, 1fr); gap: 22px; }
.route-payment-panel .payment-pie { width: min(220px, 55vw); }
.route-payment-panel .payment-legend { gap: 12px; }
.payment-layout { min-height: 310px; display: grid; grid-template-columns: minmax(240px, .75fr) minmax(280px, 1fr); gap: 36px; align-items: center; }
.payment-pie { position: relative; justify-self: center; width: min(280px, 72vw); aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(7,23,43,.05), 0 10px 30px rgba(7,23,43,.07); }
.payment-slice-label { position: absolute; z-index: 1; padding: 3px 5px; color: white; border-radius: 5px; background: rgba(7,23,43,.36); font-size: .72rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.payment-slice-label.slice-0 { right: 20%; bottom: 27%; }
.payment-slice-label.slice-1 { left: 4%; top: 5%; color: var(--ink); background: white; box-shadow: 0 3px 10px rgba(7,23,43,.1); }
.payment-slice-label.slice-2 { left: -14%; top: 27%; color: var(--ink); background: white; box-shadow: 0 3px 10px rgba(7,23,43,.1); }
.payment-slice-label.slice-1::after, .payment-slice-label.slice-2::after { content: ""; position: absolute; height: 1px; background: #8fa1b3; transform-origin: left center; }
.payment-slice-label.slice-1::after { width: 42px; left: 92%; top: 100%; transform: rotate(32deg); }
.payment-slice-label.slice-2::after { width: 62px; left: 92%; top: 55%; transform: rotate(-17deg); }
.payment-legend { display: grid; gap: 14px; }
.payment-legend > div { display: grid; grid-template-columns: 13px 1fr; align-items: center; gap: 10px; color: var(--ink); font-size: .84rem; }
.payment-legend i { width: 13px; height: 13px; border-radius: 3px; }
.payment-legend small { margin-top: 8px; color: var(--muted); line-height: 1.45; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 18px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); background: #f7f9fb; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
td { font-size: .85rem; }
tbody tr:hover { background: #f8fbfd; }
.share-cell { min-width: 210px; display: flex; align-items: center; gap: 10px; }
.share-cell .bar-track { flex: 1; }
.badge { display: inline-block; padding: 6px 8px; border-radius: 7px; color: var(--blue); background: var(--sky); font-size: .68rem; font-weight: 800; }
.badge.star { color: #075f50; background: #d9f9f1; }
.method-card { display: grid; grid-template-columns: 1fr 1.3fr; gap: 24px; padding: 28px; margin-top: 44px; color: white; border-radius: 20px; background: var(--ink); }
.method-card .eyebrow { color: #84c9ff; }
.method-card ul { margin: 0; padding-left: 18px; color: #becddd; font-size: .79rem; line-height: 1.6; }
.extraction-control { grid-column: 1 / -1; padding-top: 16px; color: #9fb1c3; border-top: 1px solid rgba(255,255,255,.12); font: .7rem/1.5 monospace; }

/* Resumen operativo inspirado en la lectura ejecutiva del informe mensual. */
.executive-operations { margin: 22px 0 48px; }
.metric-section-title { display: flex; align-items: center; gap: 12px; margin: 26px 0 15px; }
.metric-section-title h2 { color: #283443; font-size: clamp(1.15rem, 1.75vw, 1.55rem); letter-spacing: -.025em; }
.metric-section-title h2 small { font: inherit; }
.consolidated-title { margin-top: 34px; }
.title-icon { position: relative; flex: 0 0 28px; width: 28px; height: 28px; color: #667281; }
.title-icon::before { position: absolute; inset: 0; display: grid; place-items: center; font-size: 24px; font-weight: 800; }
.title-icon.basket::before { content: "▱"; transform: rotate(8deg); }
.title-icon.basket::after { content: ""; position: absolute; left: 6px; top: 3px; width: 14px; height: 7px; border: 2px solid currentColor; border-bottom: 0; border-radius: 5px 5px 0 0; }
.title-icon.handtruck::before { content: "⌞"; font-size: 30px; transform: rotate(-2deg); }
.title-icon.handtruck::after { content: "••"; position: absolute; left: 9px; bottom: -2px; letter-spacing: 5px; font-size: 13px; }
.executive-kpi-grid, .consolidated-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.executive-kpi, .consolidated-card { position: relative; min-height: 188px; padding: 20px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #d9e1e8; border-radius: 15px; background: white; box-shadow: 0 8px 22px rgba(7,23,43,.065); }
.metric-card-head { min-height: 44px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.metric-card-head > span { max-width: 78%; color: #43546a; text-transform: uppercase; letter-spacing: .045em; font-size: .72rem; font-weight: 850; line-height: 1.35; }
.executive-kpi > strong, .consolidated-card > strong { margin: 12px 0 7px; color: #17202d; font-size: clamp(2rem, 3.1vw, 3.15rem); letter-spacing: -.065em; line-height: .95; font-variant-numeric: tabular-nums; }
.executive-kpi > small, .consolidated-card > small { max-width: 75%; margin-bottom: 14px; color: #536173; line-height: 1.35; }
.metric-icon { position: relative; flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 11px; color: #1688e5; background: #e8f4ff; font-style: normal; }
.metric-icon::before { font-size: 23px; font-weight: 900; line-height: 1; }
.metric-icon.package::before { content: "◇"; }
.metric-icon.truck::before { content: "▰"; font-size: 19px; }
.metric-icon.truck::after { content: "••"; position: absolute; bottom: 5px; letter-spacing: 7px; font-size: 12px; }
.metric-icon.warning::before { content: "!"; width: 25px; height: 22px; display: grid; place-items: center; border: 3px solid currentColor; clip-path: polygon(50% 0,100% 100%,0 100%); font-size: 13px; }
.metric-icon.check::before { content: "✓"; width: 27px; height: 27px; display: grid; place-items: center; color: white; border-radius: 50%; background: currentColor; font-size: 17px; }
.metric-icon.return::before { content: "↶"; font-size: 29px; }
.metric-icon.clock::before { content: "◷"; font-size: 28px; }
.metric-icon.document::before { content: "▤"; font-size: 25px; }
.metric-pill { align-self: flex-end; margin-top: auto; padding: 7px 10px; border-radius: 8px; text-transform: none; font-size: .66rem; font-weight: 850; line-height: 1.2; }
.metric-pill.success { color: #08735f; background: #dff8ee; }
.metric-pill.warning { color: #8c6300; background: #fff4cd; }
.metric-pill.danger { color: #a52938; background: #ffe8eb; }
.metric-pill.neutral { color: #5e6976; background: #eff2f5; }
.tone-blue > strong { color: #1688e5; }
.tone-cyan .metric-icon { color: #0ba9cf; background: #e6f8fc; }
.tone-red > strong, .tone-red .metric-card-head > span { color: #d53748; }
.tone-red .metric-icon { color: #d53748; background: #ffedf0; }
.tone-green > strong { color: #118b70; }
.tone-green .metric-icon { color: #17aa88; background: #e4f8f2; }
.consolidated-card { min-height: 194px; border-width: 2px; }
.consolidated-card.delivered { border-color: #41b889; }
.consolidated-card.returned { border-color: #e14d59; }
.consolidated-card.transit { border-color: #e6b844; }
.consolidated-card.generated { border-color: #68727e; }
.consolidated-card.delivered > strong, .consolidated-card.delivered .metric-card-head > span { color: #13926f; }
.consolidated-card.returned > strong, .consolidated-card.returned .metric-card-head > span { color: #d53c4a; }
.consolidated-card.generated > strong { color: #65707d; }
.consolidated-card.delivered .metric-icon { color: #19a77f; background: #e2f8f1; }
.consolidated-card.returned .metric-icon { color: #da3d4b; background: #ffebee; }
.consolidated-card.transit .metric-icon { color: #dda91f; background: #fff5d6; }
.consolidated-card.generated .metric-icon { color: #68727e; background: #eef1f4; }

/* Rediseño institucional ProGuard · lectura operativa profesional */
:root {
  --ink: #111827;
  --navy: #071a2f;
  --blue: #0788f8;
  --blue-dark: #0568bd;
  --sky: #eaf5ff;
  --mint: #21b993;
  --mint-dark: #087861;
  --red: #d43848;
  --amber: #d99a15;
  --paper: #eef2f6;
  --white: #ffffff;
  --line: #d7dee7;
  --muted: #5f6c7b;
  --shadow: 0 10px 28px rgba(7, 26, 47, .07);
  --radius: 12px;
  font-family: "IBM Plex Sans", "Aptos", "Segoe UI Variable", "Segoe UI", sans-serif;
}
body { background: linear-gradient(180deg, #e9eef4 0, #f5f7f9 420px); }
.app-shell { grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; align-self: start; min-height: 100vh; height: 100dvh; overflow-y: auto; padding: 18px; gap: 14px; background: #071a2f; border-right: 1px solid rgba(255,255,255,.08); }
.brand { gap: 11px; letter-spacing: .07em; }
.brand-logo-wrap { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 42px; border-radius: 9px; background: white; }
.brand-logo { width: 36px; height: 36px; object-fit: contain; }
.brand strong { font-size: .92rem; letter-spacing: .11em; }
.brand small { color: #94a8bc; font-size: .67rem; }
.country-card, .market-queue { padding: 11px 12px; border-radius: 10px; background: rgba(255,255,255,.035); }
.side-nav { counter-reset: report-nav; gap: 2px; }
.side-nav a { counter-increment: report-nav; position: relative; padding: 9px 10px 9px 38px; border: 0; border-radius: 7px; }
.side-nav a::before { content: "0" counter(report-nav); position: absolute; left: 10px; color: #60778e; font: 600 .65rem/1 "IBM Plex Mono", monospace; }
.side-nav a:hover, .side-nav a.active { color: white; background: rgba(7,136,248,.14); box-shadow: inset 3px 0 0 var(--blue); }
main { width: 100%; max-width: 1540px; margin: 0 auto; padding: 26px clamp(24px, 3.6vw, 56px) 72px; }
.report-header { min-height: 106px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 22px; margin-bottom: 12px; color: white; background: #071a2f; border-radius: 14px 14px 0 0; }
.report-identity { display: flex; align-items: center; gap: 17px; }
.report-logo { width: 66px; height: 66px; flex: 0 0 66px; display: grid; place-items: center; border-radius: 10px; background: white; }
.report-logo img { width: 58px; height: 58px; object-fit: contain; }
.report-header .eyebrow { margin-bottom: 5px; color: #73c1ff; }
.report-header h1 { color: white; font-size: clamp(1.65rem, 2.6vw, 2.5rem); font-weight: 500; letter-spacing: -.035em; }
.report-header p { margin: 7px 0 0; color: #aebfd0; font-size: .86rem; }
.report-header .button.ghost { color: white; border-color: #496076; background: transparent; }
.report-header .button.primary { color: white; background: var(--blue); box-shadow: none; }
.button { min-height: 44px; border-radius: 6px; font-weight: 650; }
.button:hover { transform: none; filter: brightness(.97); }
.filter-bar { min-height: 78px; margin-bottom: 18px; padding: 13px 16px; border-radius: 0 0 12px 12px; border-top: 0; box-shadow: none; }
.filter-bar label { color: #566476; font-size: .64rem; }
.filter-bar input, .filter-bar select { height: 40px; border: 0; border-bottom: 2px solid #aeb9c5; border-radius: 0; background: #f2f4f6; }
.filter-bar input:focus, .filter-bar select:focus { border-bottom-color: var(--blue); }
.freshness { justify-self: stretch; min-width: 220px; padding-left: 14px; border-left: 1px solid var(--line); color: #455568; line-height: 1.4; }
.hero-grid { gap: 12px; }
.hero-card, .decision-card { border-radius: 12px; box-shadow: none; }
.hero-card { min-height: 244px; background: #092442; border-left: 6px solid var(--blue); }
.hero-number { color: white; font-weight: 500; font-variant-numeric: tabular-nums; }
.route-mark { color: rgba(7,136,248,.28); }
.decision-card { border-top: 4px solid var(--blue); }
.decision-card > strong { font-size: 1.35rem; }
.executive-operations { margin: 34px 0 56px; }
.metric-section-title { position: relative; min-height: 50px; margin: 0; padding: 0 0 14px 54px; border-bottom: 1px solid #bdc7d2; }
.metric-section-title::before { content: "01"; position: absolute; left: 0; top: 1px; color: var(--blue); font: 600 1rem/1 "IBM Plex Mono", monospace; }
.metric-section-title.consolidated-title::before { content: "02"; }
.title-icon { display: none; }
.metric-section-title h2 { color: var(--ink); font-size: 1.3rem; font-weight: 500; }
.metric-section-title h2 small { color: var(--muted); font-weight: 400; }
.executive-kpi-grid, .consolidated-grid { gap: 1px; padding: 1px; background: #cfd7e0; }
.executive-kpi, .consolidated-card { min-height: 176px; padding: 18px; border: 0; border-radius: 0; box-shadow: none; }
.executive-kpi::before, .consolidated-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: #aeb9c5; }
.tone-blue::before, .tone-cyan::before { background: var(--blue); }
.tone-red::before, .consolidated-card.returned::before { background: var(--red); }
.tone-green::before, .consolidated-card.delivered::before { background: var(--mint); }
.consolidated-card.transit::before { background: var(--amber); }
.consolidated-card { border: 0; }
.metric-card-head { min-height: 38px; }
.metric-card-head > span { max-width: 82%; font-size: .68rem; }
.executive-kpi > strong, .consolidated-card > strong { margin-top: 9px; font-size: clamp(2rem, 3vw, 2.85rem); font-weight: 550; }
.metric-icon { width: 38px; height: 38px; flex-basis: 38px; border-radius: 50%; }
.metric-pill { align-self: flex-start; border-radius: 999px; }
.consolidated-title { margin-top: 36px; }
.section-block { position: relative; margin-top: 56px; padding-top: 4px; }
.section-block::before { content: ""; position: absolute; left: 0; right: 0; top: -20px; height: 1px; background: #ccd5de; }
.section-heading { min-height: 72px; align-items: center; padding: 0 0 16px; margin-bottom: 12px; border-bottom: 1px solid #c7d0da; }
.section-heading h2 { font-size: clamp(1.35rem, 2vw, 1.8rem); font-weight: 500; }
.section-heading .eyebrow { margin-bottom: 5px; }
.section-heading > p { max-width: 570px; color: #536273; }
.panel, .status-rail, .carrier-card, .freight-kpi { border-radius: 10px; box-shadow: none; }
.panel { border-color: #d2d9e1; }
.status-rail { padding: 0; gap: 1px; background: #cfd7df; border: 0; }
.status-step { min-height: 126px; padding: 20px 16px; border: 0; background: white; }
.status-step::before { margin-bottom: 17px; }
.status-step strong { font-size: 1.85rem; font-weight: 550; }
.panel-title { padding-bottom: 14px; border-bottom: 1px solid #e0e5eb; }
.panel-title h3 { font-weight: 600; }
.panel-title span { border-radius: 999px; }
.logistics-section::before { left: 0; right: 0; top: -20px; width: auto; height: 1px; border-radius: 0; background: #ccd5de; }
.freight-kpi { border: 0; border-left: 4px solid var(--blue); }
.freight-kpi.dark { border-left-color: #54b5ff; background: #092442; }
.carrier-card-grid { gap: 1px; padding: 1px; background: #d2d9e1; }
.carrier-card { border: 0; border-radius: 0; }
.carrier-card > strong { color: #087861; border-radius: 4px; }
.bar-track { border-radius: 2px; }
.bar-track i { background: var(--blue); border-radius: inherit; }
thead th { background: #edf1f5; color: #4f5d6c; }
tbody tr:nth-child(even) { background: #fafbfc; }
.method-card { border-radius: 10px; background: #071a2f; }
.privacy-note { color: #7890a7; }

@media (max-width: 1100px) {
  .report-header { border-radius: 12px 12px 0 0; }
  .brand-logo-wrap { width: 42px; height: 42px; flex-basis: 42px; }
  .brand-logo { width: 36px; height: 36px; }
}
@media (max-width: 760px) {
  .report-header { align-items: flex-start; flex-direction: column; }
  .report-identity { align-items: flex-start; }
  .report-logo { width: 52px; height: 52px; flex-basis: 52px; }
  .report-logo img { width: 46px; height: 46px; }
  .report-header p { max-width: 36ch; }
  .freshness { padding-left: 0; border-left: 0; }
}

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; min-height: auto; height: auto; overflow: visible; flex-direction: row; align-items: center; padding: 16px 22px; }
  .side-nav, .market-queue, .privacy-note { display: none; }
  .country-card { margin-left: auto; padding: 9px 12px; }
  .country-card .eyebrow, .country-card .live-pill { display: none; }
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .executive-kpi-grid, .consolidated-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .carrier-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logistics-detail-grid { grid-template-columns: 1fr; }
  .status-rail { grid-template-columns: repeat(6, 140px); }
}
@media (max-width: 760px) {
  main { padding: 22px 14px 50px; }
  .topbar, .section-heading { align-items: flex-start; flex-direction: column; }
  .top-actions { width: 100%; }
  .top-actions .button { flex: 1; }
  .filter-bar { display: grid; grid-template-columns: 1fr 1fr; }
  .filter-bar label:first-child, .filter-bar .freshness { grid-column: 1 / -1; }
  .filter-bar input, .filter-bar select { width: 100%; min-width: 0; }
  .hero-grid, .hero-card, .split-grid, .triple-grid, .method-card, .logistics-summary, .payment-layout, .carrier-distribution-layout { grid-template-columns: 1fr; }
  .carrier-card-grid { grid-template-columns: 1fr 1fr; }
  .logistics-chart-row { grid-template-columns: 1fr; }
  .hero-card { min-height: 330px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .executive-kpi-grid, .consolidated-grid { grid-template-columns: 1fr; }
  .metric-section-title { align-items: flex-start; }
  .metric-section-title h2 small { display: block; margin-top: 3px; }
  .executive-kpi, .consolidated-card { min-height: 170px; }
  .donut-layout { grid-template-columns: 110px 1fr; }
  .donut { width: 108px; }
}
@media (max-width: 430px) {
  .brand small { display: none; }
  .sidebar { padding: 12px 14px; }
  .country-card strong { font-size: .8rem; }
  .kpi-grid, .carrier-card-grid { grid-template-columns: 1fr; }
  .logistics-bar { grid-template-columns: 86px 1fr 50px; }
  .filter-bar { grid-template-columns: 1fr; }
  .filter-bar label:first-child, .filter-bar .freshness { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; animation-duration: .001ms !important; transition-duration: .001ms !important; } }

/* ProGuard unified visual system · Poppins · agosto 2026 */
@font-face { font-family: "Poppins"; src: url("/fonts/poppins-400.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/fonts/poppins-500.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/fonts/poppins-600.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/fonts/poppins-700.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/fonts/poppins-800.ttf") format("truetype"); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  --brand-blue: #0b6ff4;
  --brand-blue-dark: #074fae;
  --brand-navy: #082044;
  --brand-ink: #14243b;
  --brand-cyan: #2aa8e8;
  --brand-green: #1ca982;
  --brand-red: #d9485b;
  --brand-amber: #e3a62f;
  --surface: #ffffff;
  --surface-soft: #f7faff;
  --canvas: #eef4fa;
  --line-soft: #dce7f2;
  --radius-card: 24px;
  --radius-control: 14px;
  --shadow-soft: 0 14px 34px rgba(8, 32, 68, .075);
  --shadow-hover: 0 18px 44px rgba(8, 32, 68, .11);
  font-family: "Poppins", "Segoe UI", sans-serif;
}
body { font-family: "Poppins", "Segoe UI", sans-serif; background: radial-gradient(circle at 86% 0%, #deefff 0, transparent 28rem), linear-gradient(180deg, #edf4fb 0, #f8fafc 34rem); }
button, input, select { font-family: inherit; }
.sidebar { background: linear-gradient(180deg, #061a39 0%, var(--brand-navy) 58%, #0a315d 100%); }
.brand-logo-wrap, .report-logo { border-radius: 16px; box-shadow: 0 8px 22px rgba(1, 17, 38, .18); }
.country-card, .market-queue { border-radius: 18px; border-color: rgba(255,255,255,.13); background: rgba(255,255,255,.055); }
.side-nav a { border-radius: 13px; font-weight: 500; }
.side-nav a:hover, .side-nav a.active { background: rgba(42,168,232,.16); box-shadow: inset 3px 0 0 #52bff5; }
main { max-width: 1600px; }
.report-header { border-radius: 26px 26px 0 0; background: linear-gradient(118deg, var(--brand-navy), #0b3970 68%, #0b6ff4); box-shadow: 0 18px 45px rgba(8,32,68,.16); }
.report-header h1 { font-weight: 650; letter-spacing: -.035em; }
.report-header .eyebrow { color: #82d4ff; }
.report-header .button { border-radius: 14px; }
.report-header .button.primary { background: white; color: var(--brand-blue-dark); }
.report-header .button.ghost { border-color: rgba(255,255,255,.38); background: rgba(255,255,255,.07); }
.filter-bar { min-height: 92px; flex-wrap: wrap; gap: 14px; padding: 16px 18px; border: 1px solid var(--line-soft); border-radius: 0 0 26px 26px; box-shadow: var(--shadow-soft); }
.filter-bar label { gap: 7px; color: #52647a; font-weight: 700; }
.filter-bar input, .filter-bar select { height: 46px; padding: 0 14px; border: 1px solid #cad9e8; border-radius: var(--radius-control); background: var(--surface-soft); transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.filter-bar input:focus, .filter-bar select:focus { border: 1px solid var(--brand-blue); background: white; box-shadow: 0 0 0 4px rgba(11,111,244,.1); }
#productFilterLabel { flex: 1 1 300px; min-width: 260px; }
#productFilter { width: 100%; min-width: 0; font-size: 14px; font-weight: 600; color: var(--brand-navy); }
.filter-bar .freshness { flex: 1 1 180px; min-width: 0; max-width: 240px; margin-left: 0; padding: 0; border: 0; line-height: 1.45; overflow-wrap: anywhere; }
.button { border-radius: var(--radius-control); }
.button.dark { background: linear-gradient(135deg, var(--brand-navy), #0d427e); box-shadow: 0 8px 18px rgba(8,32,68,.16); }
.hero-grid { gap: 18px; }
.hero-card, .decision-card { border-radius: var(--radius-card); }
.hero-card { min-height: 268px; border: 0; background: linear-gradient(126deg, #082044 0%, #0a427d 62%, #0b6ff4 100%); box-shadow: 0 22px 50px rgba(8,32,68,.18); }
.hero-card::after { content: ""; position: absolute; width: 210px; height: 210px; right: -78px; bottom: -92px; border: 34px solid rgba(255,255,255,.055); border-radius: 50%; }
.hero-number { font-weight: 700; }
.period-chip { border-radius: 999px; font-family: "Poppins", sans-serif; }
.decision-card { border: 1px solid var(--line-soft); border-top: 5px solid var(--brand-blue); box-shadow: var(--shadow-soft); }
.decision-card > strong { color: var(--brand-navy); font-weight: 650; }
.metric-section-title { min-height: 58px; padding: 0 0 14px 58px; border-bottom-color: var(--line-soft); }
.metric-section-title::before { width: 42px; height: 42px; display: grid; place-items: center; top: -4px; color: white; border-radius: 13px; background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan)); font: 700 .74rem/1 "Poppins", sans-serif; box-shadow: 0 8px 16px rgba(11,111,244,.2); }
.metric-section-title h2, .section-heading h2 { color: var(--brand-ink); font-weight: 650; letter-spacing: -.025em; }
.executive-kpi-grid, .consolidated-grid { gap: 14px; padding: 0; background: transparent; }
.executive-kpi, .consolidated-card { min-height: 188px; padding: 21px; border: 1px solid var(--line-soft); border-radius: 20px; box-shadow: var(--shadow-soft); transition: transform .16s ease, box-shadow .16s ease; }
.executive-kpi:hover, .consolidated-card:hover, .carrier-card:hover, .acquisition-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.executive-kpi::before, .consolidated-card::before { inset: 18px auto 18px 0; width: 4px; border-radius: 0 8px 8px 0; }
.metric-card-head > span { color: #4c6078; font-family: "Poppins", sans-serif; font-weight: 700; }
.executive-kpi > strong, .consolidated-card > strong { font-family: "Poppins", sans-serif; font-weight: 700; }
.metric-icon { border-radius: 14px; }
.metric-icon.package::before { content: "▣"; }
.metric-icon.truck::before { content: "➜"; }
.metric-icon.truck::after { content: none; }
.metric-icon.warning::before { content: "!"; }
.metric-icon.check::before { content: "✓"; }
.metric-icon.return::before { content: "↩"; }
.metric-icon.clock::before { content: "◷"; }
.metric-icon.document::before { content: "▤"; }
.metric-pill { border-radius: 999px; }
.section-block { margin-top: 60px; }
.section-block::before { background: linear-gradient(90deg, transparent, #cbdbea 10%, #cbdbea 90%, transparent); }
.section-heading { border-bottom: 0; }
.section-heading > div { position: relative; padding-left: 52px; }
.section-heading > div::before { position: absolute; left: 0; top: 1px; width: 38px; height: 38px; display: grid; place-items: center; color: var(--brand-blue); border-radius: 12px; background: #e6f2ff; font-size: 18px; font-weight: 700; }
#adquisicion .section-heading > div::before { content: "$"; }
#ruta .section-heading > div::before { content: "↝"; }
#logistica .section-heading > div::before { content: "▰"; }
#cancellationCauses .section-heading > div::before { content: "!"; color: #c23449; background: #fff0f2; }
#productos .section-heading > div::before { content: "◫"; }
#cobertura .section-heading > div::before { content: "⌖"; }
.panel, .status-rail, .carrier-card, .freight-kpi, .acquisition-card { border: 1px solid var(--line-soft); border-radius: var(--radius-card); box-shadow: var(--shadow-soft); }
.panel { padding: 24px; }
.panel-title { border-bottom-color: #e7eef6; }
.panel-title span { border-radius: 999px; font-family: "Poppins", sans-serif; }
.status-rail { gap: 10px; padding: 12px; background: rgba(255,255,255,.62); }
.status-step { border: 0; border-radius: 16px; background: white; }
.status-step::before { background: var(--brand-blue); box-shadow: 0 0 0 5px #e2efff; }
.acquisition-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 16px; margin: 18px 0; }
.acquisition-card { display: flex; flex-direction: column; align-items: flex-start; gap: 0; min-width: 0; min-height: 210px; padding: 22px 22px 20px; border-left: 6px solid var(--brand-blue); background: linear-gradient(145deg, #fff, #f5f9ff); transition: transform .16s ease, box-shadow .16s ease; }
.acquisition-card span { display: inline-flex; align-items: center; min-height: 32px; padding: 7px 11px; color: white; border-radius: 999px; background: var(--brand-blue); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .035em; line-height: 1.3; }
.acquisition-card strong { margin: 20px 0 10px; color: var(--brand-navy); font-size: clamp(27px, 2.5vw, 40px); font-weight: 700; letter-spacing: -.045em; line-height: 1; white-space: nowrap; }
.acquisition-card small { margin-top: auto; color: #6f8094; line-height: 1.55; }
.acquisition-card.tone-blue { border-color: #bcd8fa; border-left-color: var(--brand-amber); background: linear-gradient(145deg, #fff, #fff9ec); }
.acquisition-card.tone-blue span { color: #5f4300; background: #f6c55f; }
.acquisition-card.tone-green { border-color: #bfe8d9; border-left-color: var(--brand-green); background: linear-gradient(145deg, #fff, #effbf6); }
.acquisition-card.tone-green span { background: var(--brand-green); }
.acquisition-card.tone-green strong { color: #0b8064; }
.cpa-table-panel { margin-top: 16px; }
.carrier-card-grid { gap: 14px; padding: 0; background: transparent; }
.carrier-card { border: 1px solid var(--line-soft); border-radius: 20px; transition: transform .16s ease, box-shadow .16s ease; }
.carrier-mark { border-radius: 14px; }
.carrier-card > strong { border-radius: 12px; }
.freight-kpi { border-left-width: 5px; }
.freight-kpi.dark { background: linear-gradient(125deg, var(--brand-navy), #0b4d91); }
.payment-pie, .donut { box-shadow: inset 0 0 0 1px rgba(8,32,68,.05), 0 12px 30px rgba(8,32,68,.08); }
.bar-track, .bar-track i { border-radius: 999px; }
table { border-collapse: separate; border-spacing: 0; }
th { background: #eff5fb; color: #4c6078; }
thead th:first-child { border-radius: 14px 0 0 0; }
thead th:last-child { border-radius: 0 14px 0 0; }
tbody tr:hover { background: #f3f8ff; }
.badge { border-radius: 999px; }
.method-card { border-radius: var(--radius-card); background: linear-gradient(125deg, var(--brand-navy), #0a3e73); box-shadow: var(--shadow-soft); }
.error-box { border-radius: 18px; }
.freight-panel { padding: 22px 0 0; overflow: hidden; }
.freight-panel .table-scroll { width: 100%; overflow-x: auto; }
.freight-panel table { table-layout: fixed; }
.freight-panel th, .freight-panel td { padding: 13px 10px; }
.freight-panel th:first-child, .freight-panel td:first-child { width: 38%; padding-left: 22px; overflow-wrap: anywhere; }
.freight-panel th:nth-child(2), .freight-panel td:nth-child(2) { width: 14%; text-align: center; }
.freight-panel th:nth-child(3), .freight-panel td:nth-child(3) { width: 18%; text-align: center; }
.freight-panel th:last-child, .freight-panel td:last-child { width: 30%; padding-right: 22px; text-align: right; }

/* Información por ciudad · misma clasificación operativa del resumen */
#cityReport .section-heading > div::before { content: "⌖"; }
.city-kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.city-kpi { min-height: 158px; padding: 22px; display: flex; flex-direction: column; border: 1px solid #cfe1f5; border-left: 5px solid var(--brand-blue); border-radius: var(--radius-card); background: linear-gradient(145deg, #fff, #f3f8ff); box-shadow: var(--shadow-soft); }
.city-kpi.leading { border-left-color: var(--brand-cyan); background: linear-gradient(145deg, #fff, #eefaff); }
.city-kpi.concentration { border-left-color: var(--brand-green); background: linear-gradient(145deg, #fff, #effaf6); }
.city-kpi > span { color: #52647a; text-transform: uppercase; letter-spacing: .055em; font-size: .7rem; font-weight: 700; }
.city-kpi > strong { margin: 16px 0 7px; color: var(--brand-navy); font-size: clamp(1.8rem, 3vw, 2.8rem); line-height: 1; letter-spacing: -.045em; }
.city-kpi.leading > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(1.45rem, 2.3vw, 2.25rem); }
.city-kpi.concentration > strong { color: #0b8064; }
.city-kpi > small { margin-top: auto; color: #6f8094; }
.city-table-panel { --city-header-height: 43px; --city-row-height: 49px; --city-visible-rows: 10; --city-table-viewport: calc(var(--city-header-height) + (var(--city-row-height) * var(--city-visible-rows))); padding: 0; overflow: hidden; }
.city-table-panel .panel-title { margin: 0; padding: 0; }
.city-table-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 22px 24px 14px; border-bottom: 1px solid #e7eef6; background: linear-gradient(120deg, #fff, #f6faff); }
.city-search { display: grid; gap: 7px; width: min(360px, 100%); color: #52647a; font-size: .67rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.city-search-field { position: relative; display: block; }
.city-search-field i { position: absolute; left: 14px; top: 50%; width: 14px; height: 14px; border: 2px solid #65809d; border-radius: 50%; transform: translateY(-57%); pointer-events: none; }
.city-search-field i::after { content: ""; position: absolute; right: -5px; bottom: -3px; width: 6px; height: 2px; border-radius: 2px; background: #65809d; transform: rotate(45deg); }
.city-search input { width: 100%; height: 44px; padding: 0 42px; border: 1px solid #c8d9ea; border-radius: 14px; color: var(--brand-navy); background: white; box-shadow: 0 5px 15px rgba(9,46,82,.04); font: inherit; font-size: .82rem; font-weight: 550; text-transform: none; letter-spacing: 0; outline: none; }
.city-search input::placeholder { color: #8a9bad; }
.city-search input:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(11,111,244,.12); }
.city-search-result { margin: 0; padding: 10px 24px; color: #65788f; background: #f8fbfe; border-bottom: 1px solid #e7eef6; font-size: .7rem; }
.city-table-scroll { width: 100%; max-height: 680px; overflow-x: auto; overflow-y: auto; scrollbar-color: #88add0 #edf4fb; scrollbar-gutter: stable; }
.city-table-scroll--ten { max-height: var(--city-table-viewport); }
.city-table-scroll:focus-visible { outline: 3px solid rgba(11,111,244,.18); outline-offset: -3px; }
.city-table tbody tr { height: var(--city-row-height); }
.city-empty-state { padding: 36px 24px !important; color: #687c92 !important; text-align: center !important; background: #f8fbfe !important; font-weight: 550 !important; }
.city-table { min-width: 1450px; }
.city-carrier-table { min-width: 920px; }
.city-table thead th, .city-carrier-table thead th { position: sticky; top: 0; z-index: 2; }
.city-table th, .city-table td, .city-carrier-table th, .city-carrier-table td { padding: 13px 12px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.city-table th:first-child, .city-table td:first-child, .city-carrier-table th:first-child, .city-carrier-table td:first-child { position: sticky; left: 0; z-index: 1; text-align: left; background: white; box-shadow: 1px 0 0 #dce7f2; }
.city-table th:first-child, .city-carrier-table th:first-child { z-index: 2; background: #eff5fb; }
.city-table td:first-child, .city-carrier-table td:first-child { color: var(--brand-navy); font-weight: 650; }
.city-rate { font-weight: 700; }
.city-rate.good { color: #087861; background: #effbf6; }
.city-rate.watch { color: #906300; background: #fff9e9; }
.city-rate.risk { color: #b42e40; background: #fff0f2; }
.city-carrier-panel { margin-top: 16px; padding: 0; overflow: hidden; }
.city-detail-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 22px 24px 16px; border-bottom: 1px solid #e7eef6; }
.city-detail-head h3 { color: var(--brand-navy); font-size: 1.15rem; }
.city-detail-head label { display: grid; gap: 6px; min-width: min(340px, 100%); color: #52647a; font-size: .67rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.city-detail-head select { height: 44px; padding: 0 13px; border: 1px solid #cad9e8; border-radius: var(--radius-control); color: var(--brand-navy); background: #f7faff; font-weight: 600; }
.city-carrier-panel > .data-note { margin: 14px 24px; }

/* Causales de cancelación · lógica exacta del informe operativo */
.cancellation-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.cancellation-kpi { min-height: 168px; padding: 21px; display: flex; flex-direction: column; border: 1px solid #dbe7f2; border-left: 5px solid var(--brand-blue); border-radius: var(--radius-card); background: linear-gradient(145deg, #fff, #f5f9ff); box-shadow: var(--shadow-soft); }
.cancellation-kpi.coverage { border-left-color: var(--brand-green); background: linear-gradient(145deg, #fff, #effaf6); }
.cancellation-kpi.uncategorized { border-left-color: #d3485b; background: linear-gradient(145deg, #fff, #fff1f3); }
.cancellation-kpi.leading { border-left-color: var(--brand-amber); background: linear-gradient(145deg, #fff, #fff8e9); }
.cancellation-kpi > span { color: #52647a; text-transform: uppercase; letter-spacing: .055em; font-size: .68rem; font-weight: 700; }
.cancellation-kpi > strong { margin: 16px 0 8px; color: var(--brand-navy); font-size: clamp(1.65rem, 2.7vw, 2.65rem); line-height: 1.05; letter-spacing: -.04em; }
.cancellation-kpi.leading > strong { font-size: clamp(1.2rem, 1.8vw, 1.75rem); }
.cancellation-kpi.coverage > strong { color: #0b8064; }
.cancellation-kpi.uncategorized > strong { color: #bc3044; }
.cancellation-kpi > small { margin-top: auto; color: #6f8094; line-height: 1.45; }
.cancellation-method { margin: 0 0 16px; padding: 13px 16px; border: 1px solid #d5e4f3; border-radius: 14px; color: #526a83; background: #f5f9fd; font-size: .75rem; }
.cancellation-cause-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cancellation-table-panel { padding: 0; overflow: hidden; }
.cancellation-table-panel .panel-title { margin: 0; padding: 20px 22px 14px; }
.cancellation-table-panel table { width: 100%; }
.cancellation-table-panel th, .cancellation-table-panel td { padding: 13px 14px; font-variant-numeric: tabular-nums; }
.cancellation-table-panel th:not(:first-child), .cancellation-table-panel td:not(:first-child) { text-align: right; }
.cancellation-table-panel td:first-child { color: var(--brand-navy); font-weight: 600; }
.cancellation-table-panel .uncategorized-row { color: #b42e40; background: #fff5f6; }
.cause-meter { display: inline-flex; width: 86px; height: 8px; overflow: hidden; border-radius: 999px; background: #e7eef6; vertical-align: middle; }
.cause-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-blue), var(--brand-cyan)); }
.uncategorized-row .cause-meter i { background: #d3485b; }
.cause-action-heading, .cause-action-cell { width: 76px; text-align: center !important; }
.cause-download-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-width: 64px; min-height: 40px; padding: 7px 9px;
  border: 1px solid #b8ddc9; border-radius: 11px; color: #17683c; background: #edf9f2;
  font: inherit; font-size: .68rem; font-weight: 800; letter-spacing: .03em; cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.cause-download-button span { font-size: 1rem; line-height: 1; }
.cause-download-button:hover:not(:disabled) { transform: translateY(-1px); border-color: #59b582; background: #ddf4e7; box-shadow: 0 5px 14px rgba(25, 117, 68, .13); }
.cause-download-button:focus-visible { outline: 3px solid rgba(25, 141, 218, .28); outline-offset: 2px; }
.cause-download-button:disabled { color: #95a5b4; border-color: #dde5eb; background: #f3f6f8; cursor: not-allowed; opacity: .72; }
.cause-download-button.is-downloading { animation: cause-download-pulse .7s ease-in-out infinite alternate; }
@keyframes cause-download-pulse { to { opacity: .58; transform: translateY(1px); } }
.cancellation-empty-state { padding: 32px 18px !important; color: #708196 !important; text-align: center !important; }

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

@media (max-width: 800px) {
  .acquisition-kpis { grid-template-columns: 1fr; }
  .city-kpi-grid { grid-template-columns: 1fr; }
  .cancellation-kpi-grid { grid-template-columns: 1fr; }
  .acquisition-card { min-height: 190px; }
  #productFilterLabel { min-width: 100%; }
  .city-detail-head { align-items: stretch; flex-direction: column; }
  .city-detail-head label { width: 100%; min-width: 0; }
  .city-table-toolbar { align-items: stretch; flex-direction: column; gap: 14px; }
  .city-search { width: 100%; }
  .city-table-panel { --city-row-height: 47px; }
}

@media print {
  .market-queue { margin-top: 0; }
  .session-card { order: -1; }
  .sidebar, .top-actions, .filter-bar { display: none !important; }
  .app-shell { display: block; }
  main { padding: 0; }
  .panel, .kpi, .hero-card, .decision-card { box-shadow: none; break-inside: avoid; }
  .section-block { break-before: page; }
  body { background: white; }
}


/* Authentication and user administration */
.session-card { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 9px 10px; align-items: center; padding: 13px; border: 1px solid rgba(255,255,255,.12); border-radius: 15px; background: rgba(255,255,255,.05); }
.session-avatar { width: 34px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; color: #06223d; background: var(--mint); font-weight: 800; }
.session-card strong, .session-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-card strong { font-size: .78rem; }
.session-card small { color: #9eb0c3; font-size: .65rem; }
.session-card button { grid-column: 1 / -1; padding: 7px; color: #bcd0e2; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; background: transparent; cursor: pointer; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: clamp(20px,5vw,64px); background: radial-gradient(circle at 15% 10%, #164d80 0, #082044 35%, #041326 100%); }
.login-shell { width: min(1050px,100%); min-height: 620px; display: grid; grid-template-columns: 1.1fr .9fr; padding: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.15); border-radius: 30px; background: white; box-shadow: 0 35px 90px rgba(0,0,0,.32); }
.login-brand { position: relative; display: flex; flex-direction: column; justify-content: center; padding: clamp(36px,7vw,78px); overflow: hidden; color: white; background: linear-gradient(145deg,#07172b,#0b3d70); }
.login-brand::after { content:""; position:absolute; width:330px; aspect-ratio:1; right:-140px; bottom:-120px; border: 60px solid rgba(51,214,177,.08); border-radius:50%; }
.login-brand > img { width: 74px; margin-bottom: 50px; filter: drop-shadow(0 8px 16px rgba(0,0,0,.22)); }
.login-brand h1 { max-width: 530px; margin-bottom: 22px; font-size: clamp(2.2rem,5vw,4rem); }
.login-brand > p { max-width: 480px; color: #c5d7e7; line-height: 1.7; }
.login-security-note { display:grid; gap:4px; margin-top: 45px; padding: 17px; border-left: 3px solid var(--mint); background: rgba(255,255,255,.06); }
.login-security-note span { color:#afc6da; font-size:.76rem; }
.login-card { display:flex; flex-direction:column; justify-content:center; padding: clamp(34px,6vw,70px); }
.login-card-head { display:flex; align-items:center; gap:14px; margin-bottom:20px; }
.login-card-head h2 { font-size:2rem; }
.login-mark { width:52px; aspect-ratio:1; display:grid; place-items:center; border-radius:16px; background:#edf6ff; }
.login-mark img { max-width:38px; max-height:38px; }
.login-card > p, .login-card > small { color:var(--muted); line-height:1.6; }
.login-card form, .admin-form { display:grid; gap:16px; margin:25px 0; }
.login-card label, .admin-form label { display:grid; gap:7px; color:#40536a; font-size:.72rem; font-weight:750; }
.login-card input, .admin-form input, .admin-form select { width:100%; height:48px; padding:0 13px; border:1px solid #c9d6e2; border-radius:11px; color:var(--ink); background:white; }
.password-toggle { justify-self:start; display:inline-flex; align-items:center; gap:8px; min-height:44px; margin-top:-9px; padding:8px 2px; border:0; border-radius:7px; color:#34536f; background:transparent; font:inherit; font-size:.72rem; font-weight:700; cursor:pointer; }
.password-toggle:hover { color:var(--blue); }
.password-toggle:focus-visible { outline:3px solid rgba(22,132,214,.22); outline-offset:3px; }
.password-toggle-icon { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.password-toggle-icon--hide, .password-toggle[aria-pressed="true"] .password-toggle-icon--show { display:none; }
.password-toggle[aria-pressed="true"] .password-toggle-icon--hide { display:block; }
.login-card .button { width:100%; min-height:49px; margin-top:6px; }
.login-error, .admin-message { padding:11px 13px; border-radius:9px; font-size:.77rem; }
.login-error, .admin-message.error { color:#992839; border:1px solid #efbcc3; background:#fff1f3; }
.admin-message.success { color:#08715f; border:1px solid #a4e2d4; background:#effcf8; }
.admin-user-grid { display:grid; grid-template-columns:minmax(280px,.65fr) minmax(0,1.35fr); gap:16px; }
.admin-create-card .panel-title { margin-bottom:8px; }
.admin-users-table .panel-title { padding:22px 22px 0; }
.admin-users-table td strong, .admin-users-table td small { display:block; }
.admin-users-table td small { margin-top:3px; color:var(--muted); }
.table-select { min-width:150px; height:36px; padding:0 8px; border:1px solid #c9d6e2; border-radius:8px; color:var(--ink); background:white; }
.status-toggle, .inline-action { border:0; border-radius:999px; cursor:pointer; font:700 .67rem/1 "Poppins",sans-serif; }
.status-toggle { padding:8px 10px; }
.status-toggle.active { color:#086b58; background:#e6faf4; }
.status-toggle.inactive { color:#9a2937; background:#fff0f2; }
.permission-count { display:block; margin-bottom:7px; color:var(--muted); font-size:.7rem; }
.permission-editor { position:relative; }
.permission-editor summary { cursor:pointer; white-space:nowrap; color:var(--blue); }
.permission-options { position:absolute; z-index:20; right:0; top:calc(100% + 6px); width:250px; max-height:280px; overflow:auto; padding:10px; border:1px solid #c9d6e2; border-radius:10px; background:#fff; box-shadow:0 14px 34px rgba(8,32,68,.18); }
.permission-options label { display:flex; gap:8px; align-items:center; padding:5px; font-size:.7rem; overflow-wrap:anywhere; }
.permission-options input { accent-color:var(--blue); }
.inline-action { padding:7px 9px; color:var(--blue); background:var(--sky); }

@media (max-width: 800px) {
  .login-shell { grid-template-columns:1fr; }
  .login-brand { min-height:350px; }
  .login-brand > img { margin-bottom:25px; }
  .admin-user-grid { grid-template-columns:1fr; }
}
