/*
  AquaControl V66.7.6 - Tema corporativo y cuentas por cobrar
  Esta hoja modifica solamente presentacion. No cambia IDs, eventos,
  reglas de negocio, permisos, almacenamiento ni estructura de datos.
*/

:root {
  --bg: #f3f6fb;
  --card: #ffffff;
  --text: #12213a;
  --muted: #66758d;
  --line: #dce5f0;
  --primary: #1473e6;
  --primary-dark: #0b4fa8;
  --blue: #1473e6;
  --green: #22a56b;
  --danger: #dc3545;
  --warning: #e69417;
  --ok: #168557;
  --soft: #f7f9fc;
  --shadow: 0 8px 24px rgba(20, 49, 88, .08);
  --shadow-strong: 0 16px 42px rgba(20, 49, 88, .14);
  --navy-950: #071d37;
  --navy-900: #0a294d;
  --navy-800: #103b6d;
  --navy-700: #16518e;
  --cyan: #16a6c9;
  --purple: #8759df;
  --orange: #f39a1f;
}

html { background: var(--bg); }
body.corporate-theme {
  background: var(--bg);
  color: var(--text);
  letter-spacing: -.005em;
}
body.corporate-theme::before { display: none; }

* { scrollbar-width: thin; scrollbar-color: #b9c8da transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #b9c8da; border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* Acceso */
.corporate-theme .login-screen {
  background:
    linear-gradient(110deg, rgba(7, 29, 55, .98), rgba(16, 59, 109, .94)),
    radial-gradient(circle at 78% 20%, rgba(22, 166, 201, .35), transparent 36%);
  position: relative;
  overflow: hidden;
}
.corporate-theme .login-screen::before,
.corporate-theme .login-screen::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.corporate-theme .login-screen::before {
  width: 520px; height: 520px;
  right: -180px; top: -210px;
  border: 80px solid rgba(255,255,255,.045);
}
.corporate-theme .login-screen::after {
  width: 380px; height: 380px;
  left: -170px; bottom: -180px;
  background: rgba(20,115,230,.16);
}
.corporate-theme .login-card {
  width: min(480px, 100%);
  position: relative;
  z-index: 1;
  padding: 38px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 18px;
  box-shadow: 0 28px 70px rgba(2, 18, 40, .32);
}
.corporate-theme .login-card h1 {
  color: var(--navy-950);
  font-size: 1.85rem;
  letter-spacing: -.04em;
}
.corporate-theme .brand-logo-large {
  width: min(260px, 80%);
  margin: 0 auto 20px;
  border-radius: 10px;
}
.corporate-theme .brand-subtitle { color: var(--navy-700); text-align: center; }
.corporate-theme .brand-ribbon { justify-content: center; }
.corporate-theme .brand-ribbon span:nth-child(1) { background: var(--navy-800); }
.corporate-theme .brand-ribbon span:nth-child(2) { background: var(--blue); }
.corporate-theme .brand-ribbon span:nth-child(3) { background: var(--green); }
.corporate-theme .login-card .muted,
.corporate-theme .login-card .hint { text-align: center; }

/* Encabezado */
.corporate-theme .topbar {
  min-height: 76px;
  padding: 12px 24px;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid #e4ebf3;
  box-shadow: 0 2px 10px rgba(20,49,88,.05);
  backdrop-filter: blur(18px);
}
.corporate-theme .topbar-brand { gap: 12px; }
.corporate-theme .brand-logo-small {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  padding: 4px;
  box-shadow: 0 4px 16px rgba(20,49,88,.09);
}
.corporate-theme .topbar h2 {
  color: var(--navy-950);
  font-size: 1.15rem;
  letter-spacing: -.025em;
}
.corporate-theme .version-badge {
  background: #eaf3ff;
  color: var(--primary-dark);
  border: 1px solid #cfe2fb;
  font-weight: 800;
}
.corporate-theme .session-badges { gap: 6px; }
.corporate-theme .status-wrap { gap: 10px; }
.corporate-theme .status-pill {
  border-radius: 8px;
  padding: 8px 11px;
  border: 1px solid transparent;
}
.corporate-theme .status-pill.online { background: #ecfbf4; color: #13724c; border-color: #c7eedb; }
.corporate-theme .status-pill.offline { background: #fff8e9; color: #9b6109; border-color: #f4dfad; }

/* Estructura general */
.corporate-theme .layout {
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 0;
  padding: 0;
  min-height: calc(100vh - 76px);
}
.corporate-theme .side-menu {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: calc(100vh - 76px);
  max-height: calc(100vh - 76px);
  overflow-y: auto;
  position: sticky;
  top: 76px;
  padding: 18px 14px 16px;
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%);
  border-right: 1px solid rgba(255,255,255,.05);
  box-shadow: 8px 0 24px rgba(7,29,55,.08);
}
.corporate-theme .sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 4px 15px;
  padding: 2px 2px 15px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  color: #fff;
}
.corporate-theme .sidebar-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 11px;
  background: #fff;
  padding: 3px;
}
.corporate-theme .sidebar-brand strong { display: block; font-size: 1.08rem; letter-spacing: -.02em; }
.corporate-theme .sidebar-brand small { color: #a9bdd4; font-size: .74rem; }
.corporate-theme .menu-section-label {
  margin: 14px 7px 4px;
  padding: 0;
  border: 0;
  color: #7f9bb8;
  font-size: 10px;
  letter-spacing: .11em;
}
.corporate-theme .menu-btn {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: transparent;
  color: #dce8f5;
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: none;
  font-weight: 650;
  font-size: .91rem;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.corporate-theme .menu-btn::before {
  content: "•";
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  flex: 0 0 21px;
  color: #9fb8d3;
  font-size: 1rem;
  line-height: 1;
}
.corporate-theme .menu-btn[data-view="finance"]::before { content: "▦"; }
.corporate-theme .menu-btn[data-view="receivables"]::before { content: "$"; }
.corporate-theme .menu-btn[data-view="audit"]::before { content: "✓"; }
.corporate-theme .menu-btn[data-view="delivery"]::before { content: "▣"; }
.corporate-theme .menu-btn[data-view="deliveryOrderHistory"]::before { content: "◷"; }
.corporate-theme .menu-btn[data-view="deliveryCustomers"]::before,
.corporate-theme .menu-btn[data-view="customers"]::before { content: "♙"; }
.corporate-theme .menu-btn[data-view="deliverySetup"]::before,
.corporate-theme .menu-btn[data-view="config"]::before { content: "⚙"; }
.corporate-theme .menu-btn[data-view="deliveryCredits"]::before { content: "₵"; }
.corporate-theme .menu-btn[data-view="cash"]::before,
.corporate-theme .menu-btn[data-view="deliveryDriverCuts"]::before { content: "▤"; }
.corporate-theme .menu-btn[data-view="sale"]::before { content: "+"; }
.corporate-theme .menu-btn[data-view="products"]::before { content: "◫"; }
.corporate-theme .menu-btn[data-view="history"]::before { content: "≡"; }
.corporate-theme .menu-btn[data-view="sync"]::before { content: "↻"; }
.corporate-theme .menu-btn:hover {
  background: rgba(255,255,255,.075);
  color: #fff;
  transform: translateX(2px);
}
.corporate-theme .menu-btn.active {
  background: linear-gradient(90deg, #1f6fc6, #2787ea);
  color: #fff;
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 8px 20px rgba(0,80,180,.25);
}
.corporate-theme .menu-btn.active::before { color: #fff; }
.corporate-theme .sidebar-footer {
  margin-top: auto;
  padding: 14px 8px 3px;
  border-top: 1px solid rgba(255,255,255,.10);
  color: #8fa8c2;
  font-size: .72rem;
  line-height: 1.55;
}
.corporate-theme .sidebar-footer strong { display: block; color: #dce8f5; font-size: .78rem; }
.corporate-theme .content {
  padding: 24px;
  background: var(--bg);
  min-height: calc(100vh - 76px);
}

/* Encabezados y tarjetas */
.corporate-theme .view-header {
  margin-bottom: 18px;
  padding: 0 2px;
}
.corporate-theme .view-header h3 {
  color: var(--navy-950);
  font-size: 1.62rem;
  letter-spacing: -.035em;
}
.corporate-theme .view-header p { max-width: 950px; }
.corporate-theme .panel {
  border: 1px solid #e0e8f1;
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.corporate-theme .soft-panel { background: #fbfcfe; box-shadow: none; }
.corporate-theme .panel h4,
.corporate-theme .panel h3 { color: var(--navy-950); }

/* Campos */
.corporate-theme input,
.corporate-theme select,
.corporate-theme textarea {
  min-height: 42px;
  border: 1px solid #cfd9e6;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(20,49,88,.025);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.corporate-theme textarea { min-height: 90px; }
.corporate-theme input:focus,
.corporate-theme select:focus,
.corporate-theme textarea:focus {
  outline: none;
  border-color: #66a8ef;
  box-shadow: 0 0 0 3px rgba(20,115,230,.12);
}
.corporate-theme input[readonly],
.corporate-theme .readonly-input { background: #f2f5f9; color: #5d6b80; }
.corporate-theme label { color: #33435a; }

/* Botones */
.corporate-theme button { border-radius: 8px; min-height: 40px; }
.corporate-theme .primary,
.corporate-theme .primary-mini {
  background: linear-gradient(180deg, #2382eb, #1268cf);
  color: #fff;
  border: 1px solid #1268cf;
  box-shadow: 0 5px 12px rgba(20,115,230,.18);
}
.corporate-theme .primary:hover,
.corporate-theme .primary-mini:hover { background: linear-gradient(180deg, #1473e6, #0d5dbf); }
.corporate-theme .ghost,
.corporate-theme .secondary,
.corporate-theme .mini-btn {
  background: #fff;
  color: #24415f;
  border: 1px solid #ccd8e5;
  box-shadow: 0 2px 5px rgba(20,49,88,.04);
}
.corporate-theme .ghost:hover,
.corporate-theme .secondary:hover,
.corporate-theme .mini-btn:hover { background: #f5f8fc; border-color: #aebed0; }
.corporate-theme .ghost.danger { color: #c22d3d; border-color: #efc5ca; background: #fffafb; }

/* Tablas */
.corporate-theme .table-panel,
.corporate-theme .config-table-wrap,
.corporate-theme .delivery-history-wrap,
.corporate-theme .cash-cut-history-table,
.corporate-theme .audit-table-wrap { overflow-x: auto; }
.corporate-theme table {
  background: #fff;
  border-radius: 9px;
  overflow: hidden;
}
.corporate-theme th,
.corporate-theme td {
  padding: 11px 12px;
  border-bottom: 1px solid #e7edf4;
}
.corporate-theme th {
  background: #f5f8fc;
  color: #4b5d75;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .045em;
  font-weight: 800;
}
.corporate-theme tbody tr { transition: background .12s ease; }
.corporate-theme tbody tr:hover { background: #f8fbff; }
.corporate-theme tbody tr:last-child td { border-bottom: 0; }
.corporate-theme .muted-row { background: #f7f9fc; }

/* KPIs, finanzas y filtros */
.corporate-theme .finance-card-grid,
.corporate-theme .cash-kpi-grid,
.corporate-theme .delivery-stats { gap: 14px; }
.corporate-theme .finance-card,
.corporate-theme .cash-kpi-card,
.corporate-theme .stat-strip > div,
.corporate-theme .customer-mini-card,
.corporate-theme .change-card {
  border: 1px solid #e0e8f1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(20,49,88,.06);
}
.corporate-theme .finance-card { position: relative; overflow: hidden; }
.corporate-theme .finance-card::before,
.corporate-theme .cash-kpi-card::before {
  content: "";
  display: block;
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--primary);
}
.corporate-theme .finance-card:nth-child(2n)::before { background: var(--green); }
.corporate-theme .finance-card:nth-child(3n)::before { background: var(--purple); }
.corporate-theme .finance-card:nth-child(4n)::before { background: var(--orange); }
.corporate-theme .finance-filters,
.corporate-theme .delivery-filters,
.corporate-theme .history-filters,
.corporate-theme .audit-filters,
.corporate-theme .cash-history-filters,
.corporate-theme .customer-admin-filters {
  background: #fff;
  border-color: #e0e8f1;
  box-shadow: 0 5px 16px rgba(20,49,88,.05);
}
.corporate-theme .finance-filter-title {
  color: var(--navy-900);
  background: #edf5ff;
  border-color: #d7e8fb;
  border-radius: 8px;
}
.corporate-theme .finance-tabs,
.corporate-theme .config-tabs {
  gap: 6px;
  border-bottom: 1px solid #dfe7f0;
  padding-bottom: 0;
}
.corporate-theme .finance-tab-btn,
.corporate-theme .config-tab {
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: #5a6b81;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  box-shadow: none;
}
.corporate-theme .finance-tab-btn.active,
.corporate-theme .config-tab.active {
  color: var(--primary-dark);
  background: #f1f7ff;
  border-color: #d7e7fa;
  border-bottom-color: var(--primary);
}
.corporate-theme .finance-bar-track { background: #edf2f7; border-radius: 999px; }
.corporate-theme .finance-bar-fill { background: linear-gradient(90deg, #1473e6, #39a0f7); border-radius: 999px; }

/* Ventas y productos */
.corporate-theme .product-btn {
  border: 1px solid #dce5ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(20,49,88,.05);
}
.corporate-theme .product-btn:hover { border-color: #8ab7eb; box-shadow: 0 7px 18px rgba(20,115,230,.11); }
.corporate-theme .cart-panel,
.corporate-theme .product-panel,
.corporate-theme .summary-panel { border-color: #e0e8f1; }
.corporate-theme .total-highlight,
.corporate-theme .charge-summary-box { background: #edf6ff; border-color: #cfe3fb; color: var(--navy-900); }

/* Domicilio */
.corporate-theme .delivery-card-board { gap: 14px; }
.corporate-theme .delivery-order-card {
  border: 1px solid #dce5ef;
  border-radius: 11px;
  box-shadow: 0 6px 16px rgba(20,49,88,.07);
}
.corporate-theme .delivery-order-card:hover { border-color: #a9c9eb; box-shadow: 0 10px 24px rgba(20,49,88,.11); }
.corporate-theme .delivery-card-body div { background: #f8fafc; border-color: #e3eaf2; }
.corporate-theme .delivery-card-notes,
.corporate-theme .driver-cut-notes { background: #f8fbff; border-color: #bfd6ef; color: #334e6c; }
.corporate-theme .empty-board-message,
.corporate-theme .empty-state { border-color: #cfdbe8; background: #fafcff; }

/* Estados */
.corporate-theme .status-chip,
.corporate-theme .cut-status-pill,
.corporate-theme .audit-level,
.corporate-theme .audit-type-pill,
.corporate-theme .stock-pill { border-radius: 999px; }
.corporate-theme .status-chip.open { background: #eaf9f2; color: #13724c; }
.corporate-theme .status-chip.locked { background: #eef2f6; color: #475467; }
.corporate-theme .status-chip.danger { background: #fff0f1; color: #b42336; }

/* Modales y ventanas */
.corporate-theme dialog,
.corporate-theme .app-floating-dialog,
.corporate-theme .delivery-order-dialog,
.corporate-theme .delivery-customer-dialog,
.corporate-theme .wide-dialog,
.corporate-theme .cash-wizard-dialog,
.corporate-theme .driver-cut-format-dialog {
  border: 1px solid #d8e2ed;
  border-radius: 14px;
  box-shadow: 0 26px 70px rgba(7,29,55,.24);
}
.corporate-theme dialog::backdrop { background: rgba(7,29,55,.48); backdrop-filter: blur(3px); }
.corporate-theme .dialog-title,
.corporate-theme .windows-titlebar,
.corporate-theme .driver-cut-window-title,
.corporate-theme .cash-cut-titlebar {
  background: linear-gradient(90deg, var(--navy-900), var(--navy-800));
  color: #fff;
  border-bottom-color: var(--navy-950);
}
.corporate-theme .formula-box,
.corporate-theme .finance-note,
.corporate-theme .home-delivery-note,
.corporate-theme .imported-cut-note {
  background: #f0f7ff;
  border-color: #cfe1f5;
  color: #2f4c6b;
}

/* Corte tipo Windows: mismo contenido, acabado corporativo */
.corporate-theme .driver-cut-window,
.corporate-theme .cash-cut-window,
.corporate-theme .windows-cut-paper {
  border-color: #9eb0c3;
  background: #f5f7fa;
}
.corporate-theme .driver-cut-head div,
.corporate-theme .driver-cut-boxes div {
  border-color: #d1dbe6;
  background: #fff;
  border-radius: 6px;
  box-shadow: none;
}
.corporate-theme .driver-cut-mini-table th,
.corporate-theme .driver-cut-orders th { background: #edf2f7; color: #20344c; }

/* Notificaciones */
.corporate-theme .app-toast { border-radius: 10px; box-shadow: var(--shadow-strong); }
.corporate-theme .modal-error { color: #b42336; }

/* Impresion */
@media print {
  .corporate-theme .side-menu,
  .corporate-theme .topbar { display: none !important; }
  .corporate-theme .layout { display: block; }
  .corporate-theme .content { padding: 0; background: #fff; }
  .corporate-theme .panel { box-shadow: none; }
}

/* Adaptacion */
@media (max-width: 1120px) {
  .corporate-theme .layout { grid-template-columns: 220px minmax(0,1fr); }
  .corporate-theme .content { padding: 18px; }
  .corporate-theme .side-menu { padding-inline: 10px; }
}
@media (max-width: 820px) {
  .corporate-theme .topbar { position: relative; flex-wrap: wrap; }
  .corporate-theme .layout { display: block; }
  .corporate-theme .side-menu {
    position: relative;
    top: auto;
    min-height: auto;
    max-height: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    border-radius: 0;
  }
  .corporate-theme .sidebar-brand,
  .corporate-theme .sidebar-footer,
  .corporate-theme .menu-section-label { grid-column: 1 / -1; }
  .corporate-theme .content { min-height: auto; }
  .corporate-theme .view-header { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 560px) {
  .corporate-theme .login-card { padding: 26px 20px; }
  .corporate-theme .side-menu { grid-template-columns: 1fr; }
  .corporate-theme .content { padding: 14px; }
  .corporate-theme .topbar { padding: 10px 14px; }
  .corporate-theme .status-wrap { width: 100%; justify-content: space-between; }
}


/* V66.7.6 - Cuentas por cobrar administrativas */
.corporate-theme .receivable-status { display:inline-flex; align-items:center; border-radius:999px; padding:4px 9px; font-size:11px; font-weight:800; white-space:nowrap; }
.corporate-theme .receivable-status.pending { background:#fff1f2; color:#be123c; border:1px solid #fecdd3; }
.corporate-theme .receivable-status.paid { background:#ecfdf5; color:#047857; border:1px solid #a7f3d0; }
.corporate-theme .receivable-status.none { background:#f1f5f9; color:#64748b; border:1px solid #cbd5e1; }
.corporate-theme .receivable-account-dialog { width:min(1480px, 96vw); max-width:96vw; }
.corporate-theme .receivable-account-shell { padding:22px; min-width:0; }
.corporate-theme .receivable-account-header { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; border-bottom:1px solid #e2e8f0; padding-bottom:14px; }
.corporate-theme .receivable-account-header h3 { margin:0; color:#0f2748; font-size:24px; }
.corporate-theme .receivable-account-header p { margin:5px 0 0; color:#64748b; }
.corporate-theme .receivable-account-summary { display:grid; grid-template-columns:repeat(4,minmax(150px,1fr)); gap:12px; margin:16px 0; }
.corporate-theme .receivable-account-summary > div { background:#f8fafc; border:1px solid #dbe5f0; border-radius:12px; padding:14px; }
.corporate-theme .receivable-account-summary span { display:block; color:#64748b; font-size:12px; margin-bottom:5px; }
.corporate-theme .receivable-account-summary strong { color:#0f2748; font-size:20px; }
.corporate-theme .receivable-account-actions { display:flex; gap:10px; justify-content:flex-end; margin-bottom:14px; flex-wrap:wrap; }
.corporate-theme .receivable-ledger-table { overflow:auto; max-height:58vh; border:1px solid #dbe5f0; border-radius:12px; }
.corporate-theme .receivable-ledger-table table { min-width:1200px; margin:0; }
.corporate-theme .receivable-ledger-table thead { position:sticky; top:0; z-index:2; background:#eff6ff; }
.corporate-theme #receivablesView .finance-filters { grid-template-columns:repeat(auto-fit,minmax(165px,1fr)); }
.corporate-theme #receivablesView .table-panel { overflow:auto; }
.corporate-theme #receivablesView table { min-width:980px; }
@media (max-width: 800px) {
  .corporate-theme .receivable-account-summary { grid-template-columns:repeat(2,minmax(120px,1fr)); }
  .corporate-theme .receivable-account-shell { padding:14px; }
}


/* ============================================================
   V70.4 - NAVEGACION EMPRESARIAL
   ============================================================ */
.corporate-theme .version-badge {
  font-size: .62rem;
  padding: 3px 7px;
  opacity: .76;
  vertical-align: middle;
}
.corporate-theme .topbar-nav-context {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  min-height: 18px;
  color: #64748b;
  font-size: .78rem;
}
.corporate-theme .topbar-nav-context strong { color: #143b65; font-weight: 800; }
.corporate-theme .nav-context-separator { color: #b0bdca; }
.corporate-theme .menu-search-wrap {
  position: sticky;
  top: -18px;
  z-index: 4;
  margin: -1px 2px 8px;
  padding: 3px 0 8px;
  background: linear-gradient(180deg, var(--navy-900) 75%, rgba(10,41,77,0));
}
.corporate-theme .menu-search {
  width: 100%;
  min-height: 38px;
  padding: 8px 58px 8px 11px;
  border: 1px solid rgba(186,210,234,.22);
  border-radius: 9px;
  background: rgba(255,255,255,.075);
  color: #f8fbff;
  outline: none;
  font-size: .82rem;
}
.corporate-theme .menu-search::placeholder { color: #91aac4; }
.corporate-theme .menu-search:focus {
  border-color: rgba(88,166,255,.78);
  background: rgba(255,255,255,.11);
  box-shadow: 0 0 0 3px rgba(39,135,234,.16);
}
.corporate-theme .menu-search-hint {
  position: absolute;
  right: 8px;
  top: 10px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 5px;
  padding: 2px 5px;
  color: #8ea9c4;
  font-size: .62rem;
  line-height: 1.4;
}
.corporate-theme .menu-group {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 2px;
  transition: background .15s ease, border-color .15s ease;
}
.corporate-theme .menu-group.active-group {
  background: rgba(39,135,234,.055);
  border-color: rgba(118,177,238,.10);
}
.corporate-theme .menu-group-toggle {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: #adc3d9;
  text-align: left;
}
.corporate-theme .menu-group-toggle:hover { background: rgba(255,255,255,.045); color: #fff; }
.corporate-theme .menu-group-toggle span { min-width: 0; }
.corporate-theme .menu-group-toggle strong {
  display: block;
  color: #dfeaf5;
  font-size: .72rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .055em;
}
.corporate-theme .menu-group-toggle small {
  display: block;
  margin-top: 1px;
  color: #7894af;
  font-size: .65rem;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.corporate-theme .menu-group-toggle b {
  flex: 0 0 18px;
  color: #7592af;
  font-size: 1rem;
  text-align: center;
  transform: rotate(0deg);
  transition: transform .16s ease;
}
.corporate-theme .menu-group.collapsed .menu-group-toggle b { transform: rotate(-90deg); }
.corporate-theme .menu-group-items {
  display: grid;
  gap: 3px;
  padding: 1px 2px 5px 8px;
}
.corporate-theme .menu-group.collapsed:not(.search-expanded) .menu-group-items { display: none; }
.corporate-theme .menu-group .menu-btn {
  min-height: 37px;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: .84rem;
  font-weight: 630;
}
.corporate-theme .menu-group .menu-btn::before {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
  font-size: .88rem;
}
.corporate-theme .menu-btn[data-view="control"]::before { content: "="; }
.corporate-theme .menu-btn[data-view="maintenance"]::before { content: "M"; font-size: .68rem; font-weight: 900; }
.corporate-theme .menu-btn[data-view="crm"]::before { content: "C"; font-size: .68rem; font-weight: 900; }
.corporate-theme .menu-btn[data-view="inventory"]::before { content: "#"; }
.corporate-theme .menu-btn[data-view="production"]::before { content: "P"; font-size: .68rem; font-weight: 900; }
.corporate-theme .menu-group.nav-search-hidden,
.corporate-theme .menu-btn.nav-search-hidden { display: none !important; }
.corporate-theme .side-menu .menu-section-label { display: none; }

@media (max-width: 820px) {
  .corporate-theme .side-menu { display: block; }
  .corporate-theme .menu-search-wrap { position: relative; top: auto; }
  .corporate-theme .menu-group { margin-bottom: 5px; }
  .corporate-theme .menu-group-items { grid-template-columns: repeat(2, minmax(0,1fr)); padding-left: 4px; }
}
@media (max-width: 560px) {
  .corporate-theme .menu-group-items { grid-template-columns: 1fr; }
}


/* AquaControl V70.5 - Centros unificados Clientes / Cuentas por Cobrar */
.unified-center-header { align-items: flex-start; gap: 16px; }
.unified-center-tabs { margin: 0 0 14px; }
.customer-center-panel { display: none; }
.customer-center-panel.active { display: block; }
.unified-center-note {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line, #dfe6ee);
  border-radius: 10px;
  background: var(--panel-soft, #f7f9fc);
}
.unified-center-note strong { font-size: .92rem; }
.unified-center-note span { color: var(--muted, #687386); font-size: .84rem; }
.legacy-view-placeholder { display: none !important; }


/* AquaControl V70.6 - Centro de Control Diario */
.control-command-header { align-items: flex-start; }
.control-command-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.control-command-copy { display: grid; gap: 2px; }
.control-command-copy strong { font-size: .96rem; }
.control-command-copy span { color: var(--muted, #687386); font-size: .82rem; }
.control-command-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.control-command-actions button { white-space: nowrap; }
.control-attention-panel { margin-top: 12px; padding: 0; overflow: hidden; }
.control-attention-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line, #dfe6ee);
}
.control-attention-head > div { display: grid; gap: 2px; }
.control-attention-table { margin: 0; border: 0; border-radius: 0; }
.control-attention-row.bad td:first-child { border-left: 4px solid #b42318; }
.control-attention-row.warn td:first-child { border-left: 4px solid #b7791f; }
.control-attention-row small { display: block; max-width: 720px; line-height: 1.35; color: var(--muted, #687386); margin-top: 2px; }
.control-attention-empty { display: grid; gap: 3px; text-align: center; padding: 18px; }
.control-attention-empty strong { font-size: 1rem; }
.control-attention-empty span { color: var(--muted, #687386); font-size: .84rem; }
@media (max-width: 980px) {
  .control-command-bar, .control-attention-head { align-items: stretch; flex-direction: column; }
  .control-command-actions { justify-content: flex-start; }
}


/* AquaControl V70.7 - Centro de Control General / Dashboard Ejecutivo */
.executive-finance-header{align-items:flex-start;gap:20px}.executive-eyebrow{display:block;font-size:.72rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--primary,#146c5b);margin-bottom:5px}.executive-header-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.executive-command-center{display:grid;gap:14px;margin-bottom:24px}.executive-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;padding:14px 16px}.executive-date-control{display:flex;align-items:flex-end;gap:8px}.executive-date-control label{margin:0;font-size:.78rem;font-weight:700}.executive-date-control input{display:block;margin-top:5px;min-width:150px}.executive-quick-actions{display:flex;flex-wrap:wrap;gap:7px;justify-content:flex-end}.executive-quick-actions button{border:1px solid var(--border,#dbe3e8);background:var(--surface,#fff);border-radius:8px;padding:8px 10px;font-size:.76rem;font-weight:700;cursor:pointer}.executive-quick-actions button:hover{border-color:var(--primary,#146c5b);box-shadow:0 2px 8px rgba(0,0,0,.06)}
.executive-status-banner{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:14px 18px;border-radius:12px;border:1px solid #dce6e3;background:#f8fbfa}.executive-status-banner>div{display:flex;align-items:center;gap:9px;min-width:220px}.executive-status-banner p{margin:0;font-size:.82rem;text-align:right;color:var(--muted,#63727d)}.executive-status-dot{width:10px;height:10px;border-radius:50%;background:#94a3b8;box-shadow:0 0 0 4px rgba(148,163,184,.14)}.executive-status-banner.ok{border-color:#b8dfcc;background:#f3fbf7}.executive-status-banner.ok .executive-status-dot{background:#1f9d66;box-shadow:0 0 0 4px rgba(31,157,102,.14)}.executive-status-banner.warn{border-color:#ead7a6;background:#fffaf0}.executive-status-banner.warn .executive-status-dot{background:#d39218;box-shadow:0 0 0 4px rgba(211,146,24,.14)}.executive-status-banner.bad{border-color:#efc2c2;background:#fff6f6}.executive-status-banner.bad .executive-status-dot{background:#c83a3a;box-shadow:0 0 0 4px rgba(200,58,58,.14)}
.executive-kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:10px}.executive-kpi-card{min-height:106px;padding:14px;border:1px solid var(--border,#dfe6ea);border-radius:12px;background:var(--surface,#fff);box-shadow:0 3px 10px rgba(19,40,52,.035);display:flex;flex-direction:column;justify-content:space-between;gap:4px}.executive-kpi-card span{font-size:.73rem;font-weight:800;text-transform:uppercase;letter-spacing:.035em;color:var(--muted,#65757e)}.executive-kpi-card strong{font-size:1.32rem;line-height:1.15}.executive-kpi-card small{font-size:.72rem;color:var(--muted,#6f7d86);line-height:1.25}.executive-kpi-card.good{border-left:4px solid #1f9d66}.executive-kpi-card.warn{border-left:4px solid #d39218}.executive-kpi-card.bad{border-left:4px solid #c83a3a}.executive-kpi-card.muted{opacity:.76}.executive-kpi-card.clickable{cursor:pointer}.executive-kpi-card.clickable:hover{transform:translateY(-1px);box-shadow:0 6px 18px rgba(19,40,52,.08);border-color:#b9ccc7}
.executive-main-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(330px,.75fr);gap:12px}.executive-secondary-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,.65fr);gap:12px}.executive-panel-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}.executive-panel-heading h4{margin:0 0 3px}.executive-panel-heading p{margin:0}.executive-attention-list{display:grid;gap:7px}.executive-attention-row{display:grid;grid-template-columns:10px minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px;border-radius:9px;background:#fafcfc;border:1px solid #e5ebee}.executive-attention-icon{width:8px;height:8px;border-radius:50%;background:#d39218}.executive-attention-row.bad .executive-attention-icon{background:#c83a3a}.executive-attention-copy strong{font-size:.82rem}.executive-attention-copy p{margin:2px 0;font-size:.75rem;line-height:1.3;color:#45545e}.executive-attention-copy small{font-size:.7rem;color:var(--muted,#74828b)}.executive-empty-state{padding:24px 14px;text-align:center;border:1px dashed #bdd8cd;border-radius:10px;background:#f6fbf8;display:grid;gap:4px}.executive-empty-state strong{color:#18784d}.executive-empty-state span{font-size:.78rem;color:var(--muted,#6f7d86)}
.executive-money-summary{display:grid;gap:9px}.executive-money-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 12px;padding:11px 12px;border-radius:9px;background:#f8fafb;border:1px solid #e7ecef}.executive-money-row>div{display:grid}.executive-money-row span{font-size:.78rem;font-weight:800}.executive-money-row small{font-size:.69rem;color:var(--muted,#6f7d86)}.executive-money-row strong{font-size:1rem;align-self:center}.executive-money-row em{grid-column:1/-1;font-size:.72rem;font-style:normal;font-weight:800}.executive-money-row em.ok,.executive-money-total em.ok{color:#18784d}.executive-money-row em.bad,.executive-money-total em.bad{color:#b42d2d}.executive-money-total{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px;border-top:1px solid #dfe7ea;margin-top:2px}.executive-money-total span{font-weight:800}.executive-money-total strong{font-size:1.15rem}.executive-money-total em{font-style:normal;font-weight:800;font-size:.75rem}.executive-loading-block{padding:18px;text-align:center;color:var(--muted,#6f7d86)}
.executive-table th{white-space:nowrap;font-size:.71rem}.executive-table td{font-size:.76rem}.executive-link{border:0;background:none;padding:0;color:var(--primary,#146c5b);font-weight:800;text-decoration:underline;text-decoration-color:transparent;cursor:pointer}.executive-link:hover{text-decoration-color:currentColor}.executive-chip{display:inline-flex;padding:3px 7px;border-radius:999px;font-size:.66rem;font-weight:900;letter-spacing:.03em;background:#eef2f4}.executive-chip.ok{color:#18784d;background:#e8f7ef}.executive-chip.warn{color:#92630f;background:#fff3d8}.executive-chip.bad{color:#ae2e2e;background:#fde8e8}
.executive-health-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.executive-health-grid button{display:grid;text-align:left;gap:3px;border:1px solid #e3eaed;border-radius:10px;padding:12px;background:#fff;cursor:pointer}.executive-health-grid button:hover{border-color:#b9ccc7;box-shadow:0 4px 12px rgba(19,40,52,.06)}.executive-health-grid span{font-size:.7rem;text-transform:uppercase;font-weight:800;color:var(--muted,#65757e)}.executive-health-grid strong{font-size:.96rem}.executive-health-grid small{font-size:.69rem;line-height:1.25;color:var(--muted,#6f7d86)}.executive-detail-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin:8px 2px 12px;padding-top:16px;border-top:1px solid var(--border,#dfe6ea)}.executive-detail-heading span{font-size:.67rem;font-weight:900;letter-spacing:.12em;color:var(--primary,#146c5b)}.executive-detail-heading h4{margin:3px 0 0}.executive-detail-heading p{margin:0;font-size:.74rem;color:var(--muted,#6f7d86)}
@media(max-width:1200px){.executive-kpi-grid{grid-template-columns:repeat(3,minmax(150px,1fr))}.executive-main-grid,.executive-secondary-grid{grid-template-columns:1fr}.executive-toolbar{align-items:flex-start;flex-direction:column}.executive-quick-actions{justify-content:flex-start}.executive-status-banner{align-items:flex-start;flex-direction:column}.executive-status-banner p{text-align:left}}
@media(max-width:720px){.executive-kpi-grid{grid-template-columns:1fr 1fr}.executive-health-grid{grid-template-columns:1fr}.executive-date-control{flex-wrap:wrap}.executive-detail-heading{align-items:flex-start;flex-direction:column}}


/* AquaControl V70.8 - Buscador Global y Trazabilidad Universal */
.topbar-actions{gap:9px}.global-search-launcher{display:flex;align-items:center;gap:7px;border:1px solid #cad8df;background:#fff;border-radius:9px;padding:8px 10px;color:#29404c;cursor:pointer;box-shadow:0 2px 8px rgba(20,44,58,.04)}.global-search-launcher:hover{border-color:var(--primary,#146c5b);box-shadow:0 4px 14px rgba(20,44,58,.09)}.global-search-launcher>span{font-size:1.05rem}.global-search-launcher strong{font-size:.76rem}.global-search-launcher kbd,.global-search-footer kbd,.global-search-input-wrap kbd{font:600 .65rem/1.2 ui-monospace,SFMono-Regular,Consolas,monospace;background:#f1f5f7;border:1px solid #d7e0e4;border-bottom-width:2px;border-radius:5px;padding:2px 5px;color:#65747d;white-space:nowrap}
.global-search-dialog{width:min(1180px,94vw);height:min(790px,90vh);max-width:none;max-height:none;padding:0;border:0;border-radius:16px;overflow:hidden;background:#fff;box-shadow:0 28px 90px rgba(5,22,31,.30)}.global-search-dialog::backdrop{background:rgba(5,20,29,.56);backdrop-filter:blur(2px)}.global-search-shell{height:100%;display:grid;grid-template-rows:auto auto auto minmax(0,1fr) auto;background:#f7fafb}.global-search-header{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;padding:18px 22px 12px;background:#fff}.global-search-header h3{margin:2px 0 3px;font-size:1.25rem}.global-search-header p{margin:0;color:var(--muted,#687881);font-size:.79rem}.global-search-eyebrow{font-size:.66rem;font-weight:900;letter-spacing:.13em;color:var(--primary,#146c5b)}.icon-close{border:0;background:#f0f4f6;width:34px;height:34px;border-radius:50%;font-size:1.3rem;cursor:pointer;color:#40505a}.icon-close:hover{background:#e4ebee}.global-search-input-wrap{display:flex;align-items:center;gap:10px;margin:0 22px 10px;padding:9px 12px;border:2px solid #b8cbc5;border-radius:11px;background:#fff;box-shadow:0 5px 18px rgba(20,44,58,.07)}.global-search-input-wrap>span{font-size:1.3rem;color:var(--primary,#146c5b)}.global-search-input-wrap input{flex:1;border:0!important;outline:0!important;box-shadow:none!important;font-size:.98rem;padding:7px 2px;background:transparent}.global-search-type-filters{display:flex;gap:6px;overflow:auto;padding:0 22px 11px;scrollbar-width:thin}.global-search-type-filters button{white-space:nowrap;border:1px solid #d9e2e6;background:#fff;border-radius:999px;padding:6px 10px;font-size:.69rem;font-weight:800;color:#53636d;cursor:pointer}.global-search-type-filters button:hover,.global-search-type-filters button.active{border-color:#8fb9aa;background:#eaf7f2;color:#146c5b}.global-search-body{display:grid;grid-template-columns:minmax(390px,.9fr) minmax(480px,1.1fr);min-height:0;border-top:1px solid #e1e7ea}.global-search-results-panel{min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr);border-right:1px solid #e1e7ea;background:#fff}.global-search-results-head{display:flex;justify-content:space-between;gap:10px;padding:9px 14px;border-bottom:1px solid #edf1f3;font-size:.68rem;color:#6d7b83}.global-search-results-head strong{color:#3d4f59}.global-search-results{overflow:auto;padding:7px}.global-search-result{width:100%;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;text-align:left;border:1px solid transparent;background:transparent;border-radius:9px;padding:9px 10px;cursor:pointer;color:inherit}.global-search-result:hover{background:#f5f9f8}.global-search-result.active{background:#ebf6f2;border-color:#b8d9cd}.global-result-type{display:inline-flex;align-items:center;justify-content:center;min-width:76px;border-radius:999px;padding:4px 7px;font-size:.61rem;font-weight:900;line-height:1.1;background:#edf2f5;color:#4e626d}.global-result-type.type-customer{background:#e8f3ff;color:#285b87}.global-result-type.type-order{background:#e9f8f3;color:#18714f}.global-result-type.type-sale{background:#fff3d9;color:#866115}.global-result-type.type-cashCut{background:#f0eaff;color:#63459a}.global-result-type.type-driverCut{background:#e9eefc;color:#405f9b}.global-result-type.type-payment{background:#e8f7ef;color:#1e714e}.global-result-type.type-production{background:#e9f8fa;color:#27717d}.global-result-type.type-driver{background:#f5ecfb;color:#71458b}.global-result-type.type-prospect{background:#fff0e7;color:#98582e}.global-result-copy{display:grid;gap:1px;min-width:0}.global-result-copy strong{font-size:.79rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.global-result-copy small,.global-result-copy em{font-size:.68rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.global-result-copy small{color:#4b5d67}.global-result-copy em{font-style:normal;color:#89959c}.global-result-side{display:grid;text-align:right;gap:1px;min-width:92px}.global-result-side b{font-size:.75rem}.global-result-side small{font-size:.62rem;font-weight:800;color:#687881}.global-result-side time{font-size:.61rem;color:#9aa5ab}.global-search-empty{display:grid;place-items:center;align-content:center;text-align:center;gap:4px;min-height:210px;color:#708089}.global-search-empty strong{color:#40515b}.global-search-empty span{font-size:.73rem}.global-trace-panel{overflow:auto;padding:17px;background:#f8fafb}.global-trace-empty{min-height:100%;display:grid;place-items:center;align-content:center;text-align:center;gap:6px;color:#73818a}.global-trace-empty strong{color:#41525d}.global-trace-empty p{max-width:380px;margin:0;font-size:.76rem;line-height:1.5}.global-trace-mark{font-size:2rem;color:#9ab8ad}.global-trace-head{display:flex;align-items:flex-start;gap:10px;padding-bottom:12px;border-bottom:1px solid #dde5e8}.global-trace-head h4{margin:0 0 2px;font-size:1rem}.global-trace-head p{margin:0;font-size:.73rem;color:#6b7a83}.global-trace-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:12px 0}.global-trace-summary>div{display:grid;gap:3px;padding:10px;border:1px solid #e0e7ea;border-radius:9px;background:#fff}.global-trace-summary span{font-size:.61rem;text-transform:uppercase;font-weight:900;letter-spacing:.04em;color:#75838b}.global-trace-summary strong{font-size:.85rem;word-break:break-word}.global-trace-section{margin-top:11px;padding:12px;border:1px solid #e0e7ea;border-radius:10px;background:#fff}.global-trace-section h5{margin:0 0 9px;font-size:.76rem}.global-trace-section>p{font-size:.73rem;color:#56666f}.global-trace-dl{display:grid;grid-template-columns:120px minmax(0,1fr);gap:6px 12px;margin:0;font-size:.72rem}.global-trace-dl dt{font-weight:800;color:#72818a}.global-trace-dl dd{margin:0;color:#354751;word-break:break-word}.global-related-list{display:grid;grid-template-columns:1fr 1fr;gap:6px}.global-related-link{display:grid;text-align:left;gap:2px;border:1px solid #dce5e8;border-radius:8px;padding:8px;background:#fbfdfd;cursor:pointer}.global-related-link:hover{border-color:#9bbfb2;background:#f0f8f5}.global-related-link strong{font-size:.7rem;color:#31515a}.global-related-link small{font-size:.64rem;color:#78868e}.global-trace-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}.global-trace-table{font-size:.67rem}.global-trace-table th,.global-trace-table td{padding:6px 7px}.global-search-footer{display:flex;justify-content:space-between;gap:12px;padding:8px 15px;border-top:1px solid #e1e7ea;background:#fff;color:#77858d;font-size:.65rem}.global-search-footer span:last-child{display:flex;align-items:center;gap:4px}.global-search-dialog .ok-text{color:#167849}.global-search-dialog .danger-text{color:#b32d2d}
@media(max-width:980px){.global-search-dialog{width:96vw;height:92vh}.global-search-body{grid-template-columns:1fr}.global-search-results-panel{border-right:0;border-bottom:1px solid #e1e7ea;max-height:45vh}.global-trace-panel{min-height:280px}.global-search-footer span:first-child{display:none}.global-trace-summary{grid-template-columns:1fr 1fr}}
@media(max-width:720px){.global-search-launcher strong,.global-search-launcher kbd{display:none}.global-search-launcher{padding:8px 11px}.global-search-header{padding:14px}.global-search-input-wrap{margin:0 14px 8px}.global-search-type-filters{padding:0 14px 8px}.global-result-type{min-width:62px}.global-search-result{grid-template-columns:auto minmax(0,1fr)}.global-result-side{grid-column:2;text-align:left;grid-auto-flow:column;justify-content:start;gap:7px}.global-related-list{grid-template-columns:1fr}.global-search-footer{display:none}}


/* V70.9 - Auditoria y trazabilidad administrativa avanzada */
.corporate-theme .audit-type-driver-cut-edit{background:#e0e7ff;color:#3730a3}
.corporate-theme .audit-type-order-date-edit{background:#ecfeff;color:#155e75}
.corporate-theme .audit-type-receivable-edit{background:#f0fdf4;color:#166534}
.corporate-theme .audit-type-customer-change{background:#fdf4ff;color:#86198f}
.corporate-theme .audit-type-order-change{background:#eff6ff;color:#1d4ed8}
.corporate-theme .audit-type-generic-change{background:#f3f4f6;color:#374151}
.universal-audit-timeline-dialog{width:min(1180px,96vw);max-width:1180px;border:0;border-radius:18px;padding:0;box-shadow:0 28px 80px rgba(15,35,58,.28)}
.universal-audit-timeline-dialog::backdrop{background:rgba(9,24,42,.56);backdrop-filter:blur(3px)}
.universal-timeline-shell{background:#f7f9fc;max-height:92vh;overflow:auto}
.universal-timeline-header{position:sticky;top:0;z-index:3;display:flex;justify-content:space-between;gap:20px;align-items:flex-start;padding:22px 24px;background:#fff;border-bottom:1px solid #dfe6ef}
.universal-timeline-header h3{margin:4px 0;color:#0b2f57;font-size:1.35rem}.universal-timeline-header p{margin:0;color:#667085}
.universal-timeline-meta{padding:18px 24px 0}.universal-timeline-meta .global-trace-summary{grid-template-columns:repeat(4,minmax(0,1fr))}
.universal-timeline-list{padding:18px 24px 32px;display:grid;gap:0}
.universal-timeline-event{position:relative;display:grid;grid-template-columns:26px minmax(0,1fr);gap:14px;padding:0 0 22px}
.universal-timeline-event:not(:last-child)::before{content:"";position:absolute;left:7px;top:16px;bottom:-2px;width:2px;background:#d8e2ee}
.universal-timeline-dot{width:16px;height:16px;border-radius:999px;background:#2563eb;border:4px solid #dbeafe;z-index:1;margin-top:4px}
.universal-timeline-event.severity-warning .universal-timeline-dot{background:#d97706;border-color:#fef3c7}.universal-timeline-event.severity-danger .universal-timeline-dot{background:#dc2626;border-color:#fee2e2}
.universal-timeline-content{background:#fff;border:1px solid #dfe6ef;border-radius:14px;padding:16px;box-shadow:0 3px 12px rgba(15,35,58,.05)}
.universal-timeline-title{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.universal-timeline-title strong{display:block;color:#0b2f57}.universal-timeline-title small{display:block;color:#667085;margin-top:3px}.universal-timeline-title>span{font-size:.75rem;font-weight:800;color:#667085;background:#f2f4f7;border-radius:999px;padding:5px 8px}
.universal-timeline-content>p{margin:10px 0;color:#475467}
.universal-timeline-diff{display:grid;gap:6px;margin:10px 0}.universal-timeline-diff>div{display:grid;grid-template-columns:150px minmax(0,1fr) 18px minmax(0,1fr);gap:8px;align-items:start;padding:7px 9px;border-radius:8px;background:#f8fafc;font-size:.82rem}.universal-timeline-diff strong{color:#344054}.universal-timeline-diff span{word-break:break-word}.universal-timeline-diff em{font-style:normal;color:#98a2b3;text-align:center}
@media(max-width:760px){.universal-timeline-header{flex-direction:column}.universal-timeline-meta .global-trace-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.universal-timeline-diff>div{grid-template-columns:1fr}.universal-timeline-diff em{display:none}}


/* V71.1 - refinamiento corporativo de Domicilio */
.corporate-theme .delivery-service-strip > div,
.corporate-theme .delivery-service-strip > p { border-color:#e0e8f1; box-shadow:0 4px 12px rgba(20,49,88,.045); }
.corporate-theme .delivery-kanban-column { border-color:#dce5ef; background:#f6f9fc; }
.corporate-theme .delivery-kanban-column > header { border-bottom-color:#dce5ef; }
.corporate-theme .delivery-compact-card { background:#fff; border-color:#dde6f0; }
.corporate-theme .delivery-card-order-summary { background:#f5f8fc; }
.corporate-theme .delivery-inline-customer { background:#f3f8fe; border-color:#c6dbf2; }


/* V71.2 - Despacho corporativo */
.corporate-theme .delivery-dispatch-panel { border-color:#dbe6f1; box-shadow:0 5px 18px rgba(20,49,88,.05); }
.corporate-theme .delivery-driver-load-card { border-color:#dde6ef; }
.corporate-theme .delivery-driver-load-card:hover { border-color:#9fc3e6; }
.corporate-theme .delivery-dispatch-hint { background:#f8fbfe; border-color:#cbdced; }


/* V71.3 - Productividad y afinidad territorial */
.corporate-theme .delivery-productivity-kpis { border-top-color:#e2eaf3; }
.corporate-theme .delivery-productivity-kpis > div { border-color:#dde7f1; }
.corporate-theme .delivery-driver-productivity { border-top-color:#dce7f1; }

/* V71.4 - Supervisión directiva de metas de reparto */
