:root {
  --bg: #fff1f8;
  --card: #ffffff;
  --text: #27303f;
  --muted: #667085;
  --line: #f3c9df;
  --primary: #e91e8f;
  --primary-dark: #b30f69;
  --blue: #1d9bf0;
  --green: #20b66b;
  --danger: #b42318;
  --warning: #a15c07;
  --ok: #166534;
  --soft: #fff6fb;
  --shadow: 0 18px 46px rgba(233, 30, 143, 0.18);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 5%, rgba(233, 30, 143, 0.16), transparent 28%),
    radial-gradient(circle at 92% 12%, rgba(29, 155, 240, 0.16), transparent 26%),
    radial-gradient(circle at 80% 90%, rgba(32, 182, 107, 0.14), transparent 30%),
    var(--bg);
  color: var(--text);
}
button, input, select, textarea { font: inherit; }
button {
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  min-height: 44px;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  color: var(--text);
}
textarea { resize: vertical; }
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { color: var(--muted); font-size: 0.85rem; }
small { color: var(--muted); }
.screen { min-height: 100vh; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 0.9rem; }
.full { width: 100%; }
.primary {
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  padding: 0 18px;
}
.primary:hover { background: var(--primary-dark); }
.ghost {
  background: #fff;
  color: var(--primary-dark);
  border: 1px solid var(--line);
  font-weight: 800;
  padding: 0 16px;
}
.ghost.danger { color: var(--danger); }
.login-screen {
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(460px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 34px;
}
.brand-mark {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(233, 30, 143, 0.16), rgba(29, 155, 240, 0.14), rgba(32, 182, 107, 0.14));
  border-radius: 24px;
  font-size: 2rem;
}

.brand-logo-large {
  width: min(310px, 100%);
  height: auto;
  display: block;
  margin: 0 0 18px;
  border-radius: 22px;
}
.brand-logo-large.compact {
  width: min(260px, 100%);
}
.brand-subtitle {
  margin: 0 0 8px;
  color: var(--primary-dark);
  font-weight: 900;
  letter-spacing: 0.2px;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.brand-logo-small {
  width: 150px;
  max-width: 30vw;
  height: auto;
  border-radius: 14px;
  flex: 0 0 auto;
}
.ticket-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 4px 14px;
}
.ticket-brand img {
  width: 150px;
  height: auto;
  border-radius: 12px;
}
.ticket-brand div {
  display: grid;
  gap: 2px;
}
.ticket-brand strong {
  color: var(--primary-dark);
  font-size: 1rem;
}
.ticket-brand span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.brand-ribbon {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 4px;
}
.brand-ribbon span {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  color: #fff;
}
.brand-ribbon span:nth-child(1) { background: var(--primary); }
.brand-ribbon span:nth-child(2) { background: var(--blue); }
.brand-ribbon span:nth-child(3) { background: var(--green); }
.setup-card { border-top: 8px solid var(--primary); }
.login-card h1 { margin-bottom: 4px; }
.form-stack { display: grid; gap: 14px; }
.form-stack label { display: grid; gap: 8px; font-weight: 700; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: rgba(255,255,255,0.9);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(12px);
}
.topbar h2 { margin: 0 0 4px; }
.version-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(233, 30, 143, 0.13), rgba(29, 155, 240, 0.11));
  color: var(--primary-dark);
  font-size: 0.75rem;
  vertical-align: middle;
}
.status-wrap { display: flex; gap: 12px; align-items: center; }
.status-pill {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
}
.status-pill.online { background: #dcfce7; color: var(--ok); }
.status-pill.offline { background: #ffedd5; color: var(--warning); }
.layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 18px;
  padding: 18px;
}
.side-menu {
  display: grid;
  gap: 10px;
  align-content: start;
}
.menu-section-label {
  margin: 8px 4px -2px;
  padding: 8px 10px 4px;
  color: #667085;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(148, 163, 184, .25);
}
.menu-section-label.hidden { display: none !important; }
.menu-btn {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  text-align: left;
  padding: 16px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(15, 118, 110, 0.06);
}
.menu-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--blue));
  color: #fff;
  border-color: transparent;
}
.content { min-width: 0; }
.view-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}
.view-header h3 { margin: 0 0 4px; font-size: 1.5rem; }
.view-header p { margin: 0; }
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.soft-panel { box-shadow: none; background: rgba(255,255,255,0.72); }
.sale-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 470px);
  gap: 18px;
}
.search-row { margin-bottom: 16px; }
.product-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.product-btn {
  display: grid;
  gap: 7px;
  min-height: 112px;
  padding: 14px;
  background: var(--soft);
  color: var(--text);
  border: 1px solid #f3c9df;
  text-align: left;
}
.product-btn span {
  color: var(--primary-dark);
  font-weight: 900;
  font-size: 1.15rem;
}
.cart-panel { display: grid; gap: 14px; }
.cart-panel h4 { margin: 0; font-size: 1.25rem; }
.small-label { display: grid; gap: 7px; font-weight: 800; }
.customer-mini-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background: #f8fffe;
  border: 1px solid var(--line);
}
.customer-mini-card .mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.customer-mini-card .mini-grid div {
  background: var(--soft);
  border-radius: 12px;
  padding: 8px;
}
.customer-mini-card span { display: block; font-size: 0.75rem; color: var(--muted); }
.customer-mini-card strong { color: var(--primary-dark); }
.cart-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.cart-table td, .cart-table th { padding: 10px; }
.qty-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qty-cell button, .mini-btn {
  min-height: 34px;
  min-width: 34px;
  border-radius: 10px;
  background: #eef7f6;
  color: var(--primary-dark);
  font-weight: 900;
  padding: 0 10px;
}
.mini-btn.danger { color: var(--danger); }
.garrafon-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-radius: 18px;
  background: var(--soft);
  font-size: 1.25rem;
}
.total-row strong { font-size: 1.8rem; }
.inline-form {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.9fr auto;
  gap: 12px;
  margin-bottom: 16px;
}
.customer-form {
  display: grid;
  grid-template-columns: 1fr 0.8fr 1.2fr 0.8fr 0.8fr auto;
  gap: 12px;
  margin-bottom: 16px;
}
.customer-tools {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(320px, 520px);
  gap: 14px;
  margin-bottom: 16px;
  align-items: center;
}
.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.stat-strip div {
  padding: 12px;
  background: var(--soft);
  border-radius: 16px;
}
.stat-strip span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}
.stat-strip strong { font-size: 1.1rem; color: var(--primary-dark); }
.customer-name-cell strong { display: block; }
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.balance-positive { color: var(--danger); font-weight: 900; }
.balance-zero { color: var(--ok); font-weight: 900; }
.history-filters {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 280px);
  gap: 12px;
  margin-bottom: 16px;
}
.cash-grid {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 18px;
}
.summary-panel { display: grid; gap: 12px; }
.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.summary-line strong { font-size: 1.15rem; }
.sync-panel {
  display: grid;
  gap: 18px;
  max-width: 560px;
}
.sync-count {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px;
  border-radius: 18px;
  background: var(--soft);
}
.sync-count strong { font-size: 2rem; }
dialog {
  border: 0;
  border-radius: 24px;
  padding: 18px;
  width: min(560px, calc(100% - 24px));
  box-shadow: 0 24px 80px rgba(0,0,0,0.25);
}
.ticket-actions, .dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 12px;
}
.dialog-actions { margin-bottom: 0; }
.dialog-title h3 { margin: 0 0 4px; }
.dialog-title p { margin: 0; }
.dialog-form { padding: 4px; }
.ticket {
  white-space: pre-wrap;
  background: #fff;
  color: #111;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  border: 1px dashed #aaa;
  padding: 18px;
  margin: 0;
}
@media print {
  body * { visibility: hidden; }
  #ticketDialog, #ticketDialog * { visibility: visible; }
  #ticketDialog {
    position: absolute;
    inset: 0;
    width: 100%;
    box-shadow: none;
  }
  .ticket-actions { display: none; }
  .ticket-brand { padding: 0 0 10px; }
  .ticket-brand img { width: 130px; }
}

@media (max-width: 1100px) {
  .customer-form { grid-template-columns: 1fr 1fr; }
  .customer-form button { grid-column: 1 / -1; }
  .customer-tools { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; padding: 12px; }
  .side-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sale-grid, .cash-grid { grid-template-columns: 1fr; }
  .inline-form, .history-filters { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .status-wrap { width: 100%; justify-content: space-between; }
}
@media (max-width: 620px) {
  .side-menu, .garrafon-row, .customer-form, .stat-strip { grid-template-columns: 1fr; }
  .login-card { padding: 24px; }
  .panel { padding: 14px; }
  th, td { padding: 9px; }
  .customer-mini-card .mini-grid { grid-template-columns: 1fr; }
}
.product-form-v3 {
  grid-template-columns: 1.4fr 0.6fr 0.8fr 1fr 0.6fr auto;
}
.inventory-tools {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(320px, 520px);
  gap: 14px;
  margin-bottom: 16px;
  align-items: center;
}
.inventory-form {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.6fr 0.7fr 0.7fr auto;
  gap: 12px;
  margin-bottom: 16px;
}
.inventory-movement-panel {
  margin-top: 16px;
}
.inventory-movement-panel h4 {
  margin: 0 0 12px;
}
.stock-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.82rem;
  font-weight: 900;
}
.stock-pill.ok {
  background: #dcfce7;
  color: var(--ok);
}
.stock-pill.low {
  background: #fee2e2;
  color: var(--danger);
}
.product-btn small:last-child {
  color: var(--muted);
}
@media (max-width: 1100px) {
  .product-form-v3, .inventory-form { grid-template-columns: 1fr 1fr; }
  .product-form-v3 button, .inventory-form button { grid-column: 1 / -1; }
  .inventory-tools { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .product-form-v3, .inventory-form { grid-template-columns: 1fr; }
}
.production-grid {
  display: grid;
  grid-template-columns: minmax(280px, 430px) 1fr;
  gap: 18px;
  margin-bottom: 16px;
}
.production-tools {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(320px, 1fr);
  gap: 14px;
  margin-bottom: 16px;
  align-items: center;
}
.check-row {
  display: grid !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px !important;
  font-weight: 800;
}
.check-row input {
  width: auto;
  min-width: 20px;
  min-height: 20px;
}
.formula-box {
  padding: 14px;
  border-radius: 16px;
  background: var(--soft);
  border: 1px solid #f3c9df;
  font-weight: 900;
  color: var(--primary-dark);
}
.total-highlight {
  background: var(--soft);
  border-radius: 16px;
  padding: 14px;
  border-bottom: 0;
}
.total-highlight strong {
  font-size: 2rem;
  color: var(--primary-dark);
}
.alert-text {
  color: var(--danger);
  font-weight: 900;
  margin: 0;
}
@media (max-width: 900px) {
  .production-grid, .production-tools { grid-template-columns: 1fr; }
}

.session-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.session-badges span, .branch-note {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: #e8f6ff;
  color: #0b5f95;
  border: 1px solid rgba(29, 155, 240, 0.22);
  padding: 7px 10px;
  font-size: 0.84rem;
  font-weight: 900;
}
.session-badges span:nth-child(2), .branch-note:nth-of-type(2) {
  background: #eafff3;
  color: #087a45;
  border-color: rgba(32, 182, 107, 0.24);
}
.primary {
  background: linear-gradient(135deg, var(--primary), var(--blue));
}
.primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), #0876bd);
}
.product-btn:hover, .menu-btn:hover, .ghost:hover {
  transform: translateY(-1px);
}

.config-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}
.config-tab {
  min-width: 170px;
  background: #fff;
  color: var(--primary-dark);
  border: 1px solid var(--line);
  font-weight: 900;
  padding: 0 18px;
  box-shadow: 0 8px 22px rgba(233, 30, 143, 0.08);
}
.config-tab.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--blue));
}
.config-section {
  display: grid;
  gap: 18px;
}
.config-section-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 4px;
}
.config-section h4 {
  margin: 0 0 6px;
  font-size: 1.28rem;
}
.config-form-wide {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr)) auto;
  gap: 14px;
  align-items: end;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,246,251,0.92), rgba(232,246,255,0.72));
}
.config-form-wide label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}
.operator-form-wide {
  grid-template-columns: minmax(260px, 1.3fr) minmax(240px, 1fr) auto;
}
.config-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.config-table-wrap {
  overflow: auto;
  box-shadow: none;
  border-radius: 16px;
  padding: 0;
}
.config-table-wrap table {
  min-width: 760px;
}
.config-table-wrap.spacious-table th,
.config-table-wrap.spacious-table td {
  padding: 15px 16px;
}
@media (max-width: 1180px) {
  .config-form-wide, .operator-form-wide { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .config-form-wide button, .operator-form-wide button { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .config-tab { flex: 1 1 100%; }
  .config-form-wide, .operator-form-wide { grid-template-columns: 1fr; }
  .config-table-wrap table { min-width: 620px; }
}

.special-cut-list {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 14px;
  background: #fff6fb;
  border: 1px solid #f3c9df;
  color: var(--text);
}
.special-cut-list span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}


.cash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

/* V76 · Fase 4: organización interna. No altera el menú principal. */
.module-workspace-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 6px;
  border: 1px solid var(--border, #dbe3ee);
  border-radius: 12px;
  background: #f7f9fc;
}

.module-workspace-tab {
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #334155;
  font-weight: 700;
  cursor: pointer;
}

.module-workspace-tab:hover,
.module-workspace-tab:focus-visible {
  background: #eaf2fb;
  outline: 3px solid rgba(46, 116, 181, .22);
  outline-offset: 1px;
}

.module-workspace-tab.active {
  color: #fff;
  background: #1f4d78;
  box-shadow: 0 4px 12px rgba(31, 77, 120, .2);
}

.module-workspace-tab-action {
  margin-left: auto;
  color: #1f4d78;
  border-color: #9fc1e0;
  background: #fff;
}

.module-workspace-panel[aria-hidden="true"] { display: none !important; }

.module-workspace-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.module-workspace-intro > div { display: grid; gap: 4px; }
.module-workspace-intro span { color: #64748b; font-size: .92rem; }

@media (max-width: 760px) {
  .module-workspace-tabs { display: grid; grid-template-columns: 1fr; }
  .module-workspace-tab-action { margin-left: 0; }
  .module-workspace-intro { align-items: stretch; flex-direction: column; }
}
.cash-kpi-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
}
.cash-kpi-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}
.cash-kpi-card strong {
  color: var(--primary-dark);
  font-size: 2rem;
  line-height: 1;
}
.cash-kpi-card small {
  color: var(--blue);
  font-weight: 900;
}
.cash-prep-grid {
  align-items: start;
}
.cash-adjustments h4 {
  margin: 0;
}
.denomination-rows {
  display: grid;
  gap: 8px;
  max-height: min(60vh, 560px);
  overflow: auto;
  padding-right: 4px;
}
.denomination-row {
  display: grid;
  grid-template-columns: 1fr 110px 110px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
}
.denomination-row label {
  font-weight: 900;
}
.denomination-row input {
  text-align: right;
}
.denomination-row strong {
  text-align: right;
  color: var(--primary-dark);
}
.cash-count-total {
  margin-top: 6px;
}
@media (max-width: 620px) {
  .denomination-row { grid-template-columns: 1fr; }
  .denomination-row input, .denomination-row strong { text-align: left; }
}

.sale-header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.secondary {
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  padding: 0 16px;
  border: 1px solid transparent;
}
.secondary.green { background: var(--green); }
.home-delivery-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #eef8ff;
  border: 1px solid rgba(29, 155, 240, 0.25);
  color: var(--muted);
  font-size: 0.9rem;
}
.delivery-cut-list {
  display: grid;
  gap: 6px;
  margin: 8px 0 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f0fdf4;
  border: 1px solid rgba(32, 182, 107, 0.22);
}
.delivery-cut-list span { color: var(--muted); font-size: 0.9rem; }

@media (max-width: 760px) {
  .sale-header-actions { justify-content: stretch; }
  .sale-header-actions button { flex: 1 1 100%; }
}

.hidden-system-fields {
  display: none !important;
}

.wide-dialog {
  width: min(920px, calc(100% - 24px));
}
.cash-production-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(280px, 1.05fr);
  gap: 16px;
  align-items: start;
}
.cash-production-preview {
  box-shadow: none;
  background: #fff;
}
.cash-production-preview h4 {
  margin: 0;
}
#cashProductionSession,
#cashProductionOperator,
#cashProductionInitialLiters {
  background: #f9fafb;
  font-weight: 800;
}
@media (max-width: 760px) {
  .cash-production-grid { grid-template-columns: 1fr; }
}

/* V16 - Configuracion por pestanas amplias */
dialog::backdrop {
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(4px);
}
.app-floating-dialog {
  border-top: 8px solid var(--primary);
  max-height: min(88vh, 760px);
  overflow: auto;
}
.app-floating-form {
  gap: 16px;
}
.floating-fields {
  display: grid;
  gap: 14px;
}
.floating-field {
  display: grid;
  gap: 7px;
  font-weight: 800;
}
.floating-field span {
  color: var(--text);
}
.floating-field small {
  color: var(--muted);
  font-weight: 600;
}
.floating-info-block {
  display: grid;
  gap: 5px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #f3c9df;
  background: linear-gradient(135deg, rgba(233, 30, 143, 0.08), rgba(29, 155, 240, 0.08));
}
.floating-info-block strong {
  color: var(--primary-dark);
}
.floating-info-block small {
  color: var(--muted);
  font-weight: 700;
}
.modal-error {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--danger);
  background: #fff1f2;
  border: 1px solid #fecdd3;
  font-weight: 800;
}
.readonly-input {
  background: #f8fafc;
  color: var(--muted);
}
.confirm-message { white-space: pre-line; }

@media (max-width: 720px) {
  .topbar-brand { align-items: flex-start; }
  .brand-logo-small { width: 120px; max-width: 44vw; }
  .brand-logo-large { margin-left: auto; margin-right: auto; }
}

/* V20 - desplazamiento independiente entre menu y contenido */
html, body, #app {
  min-height: 100%;
}
body.app-locked-scroll,
body:has(#mainScreen:not(.hidden)) {
  height: 100vh;
  overflow: hidden;
}
#mainScreen {
  height: 100vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#mainScreen.hidden {
  display: none !important;
}
#mainScreen .topbar {
  flex: 0 0 auto;
}
.layout {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.side-menu {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}
.content {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 6px;
  padding-bottom: 18px;
}
.side-menu::-webkit-scrollbar,
.content::-webkit-scrollbar,
.denomination-rows::-webkit-scrollbar,
.cart-table-wrap::-webkit-scrollbar,
.config-table-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.side-menu::-webkit-scrollbar-thumb,
.content::-webkit-scrollbar-thumb,
.denomination-rows::-webkit-scrollbar-thumb,
.cart-table-wrap::-webkit-scrollbar-thumb,
.config-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(233, 30, 143, 0.28);
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.72);
}
.side-menu::-webkit-scrollbar-track,
.content::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.42);
  border-radius: 999px;
}
@media (max-width: 900px) {
  #mainScreen { height: 100dvh; }
  .layout {
    grid-template-rows: auto 1fr;
    overflow: hidden;
  }
  .side-menu {
    height: auto;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 0;
  }
  .content {
    min-height: 0;
    padding-right: 2px;
  }
}


/* V21 - scroll independiente en Nueva venta y feria/cambio */
#saleView {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#saleView .view-header {
  flex: 0 0 auto;
}
#saleView .sale-grid {
  flex: 1 1 auto;
  min-height: 0;
  height: calc(100dvh - 205px);
}
.sale-scroll-panel {
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}
.product-panel {
  display: flex;
  flex-direction: column;
}
.product-panel .search-row {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--card);
  padding-bottom: 12px;
}
.product-panel .product-buttons {
  align-content: start;
}
.cart-panel {
  align-content: start;
}
.cash-payment-box {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(233, 30, 143, 0.08), rgba(32, 182, 107, 0.08));
}
.cash-payment-box.disabled {
  opacity: 0.62;
}
.change-card {
  display: grid;
  gap: 4px;
  min-height: 70px;
  align-content: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  text-align: right;
}
.change-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}
.change-card strong {
  color: var(--green);
  font-size: 1.45rem;
}
.change-card.short strong {
  color: var(--danger);
}
.product-panel::-webkit-scrollbar,
.cart-panel::-webkit-scrollbar {
  width: 10px;
}
.product-panel::-webkit-scrollbar-thumb,
.cart-panel::-webkit-scrollbar-thumb {
  background: rgba(233, 30, 143, 0.28);
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.72);
}
.product-panel::-webkit-scrollbar-track,
.cart-panel::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.42);
  border-radius: 999px;
}
@media (max-width: 900px) {
  #saleView .sale-grid {
    height: auto;
    min-height: 0;
  }
  .sale-scroll-panel {
    max-height: 62dvh;
  }
}
@media (max-width: 620px) {
  .cash-payment-box { grid-template-columns: 1fr; }
  .change-card { text-align: left; }
}

/* V22 - carrito visible por detalle y sin garrafones manuales en venta */
.cart-detail-wrap {
  min-height: 180px;
  max-height: 330px;
  padding: 10px;
  background: #fff;
}
.cart-detail-list {
  display: grid;
  gap: 10px;
}
.cart-detail-item {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(233, 30, 143, 0.06), rgba(29, 155, 240, 0.04));
}
.cart-detail-main {
  display: grid;
  gap: 4px;
}
.cart-detail-main strong {
  color: var(--text);
  font-size: 0.98rem;
}
.cart-detail-main small,
.cart-detail-qty span,
.cart-detail-subtotal span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}
.cart-detail-qty,
.cart-detail-subtotal {
  display: grid;
  gap: 6px;
}
.cart-detail-subtotal {
  text-align: right;
}
.cart-detail-subtotal strong {
  color: var(--primary-dark);
  font-size: 1rem;
}
.cart-remove-btn {
  min-width: 74px;
}
.empty-cart-message {
  min-height: 130px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: #fffafa;
}
@media (max-width: 760px) {
  .cart-detail-item {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .cart-detail-subtotal {
    text-align: left;
  }
  .cart-remove-btn {
    width: 100%;
  }
}

/* V23 - cobro en ventana flotante y carrito simplificado */
.compact-total-row {
  margin-top: 2px;
}
.charge-modal-grid {
  display: grid;
  gap: 14px;
}
.charge-summary-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(233, 30, 143, 0.10), rgba(29, 155, 240, 0.08));
  border: 1px solid var(--line);
}
.charge-summary-box span {
  color: var(--muted);
  font-weight: 900;
}
.charge-summary-box strong {
  color: var(--primary-dark);
  font-size: 2rem;
}
.charge-cash-box {
  grid-template-columns: 1fr 180px;
}
#saleChargeDialog .dialog-form {
  min-width: min(560px, 92vw);
}
@media (max-width: 620px) {
  .charge-cash-box { grid-template-columns: 1fr; }
  .charge-summary-box { align-items: flex-start; flex-direction: column; }
}

/* V24 - Corte guiado por ventanas flotantes */
.cash-wizard-dialog {
  width: min(980px, calc(100% - 24px));
  max-height: min(90vh, 780px);
  overflow: auto;
}
.wizard-title {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}
.wizard-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 8px 12px;
  background: linear-gradient(135deg, var(--primary), var(--blue));
  color: #fff;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(233, 30, 143, 0.18);
}
.audit-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.compact-audit-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
}
.compact-audit-table th,
.compact-audit-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.compact-audit-table th {
  background: #fff6fb;
  color: var(--primary-dark);
  font-weight: 900;
}
.compact-audit-table tfoot th {
  background: #eef8ff;
}
.cash-wizard-two-col {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 0.9fr);
  gap: 16px;
  align-items: start;
}
.justification-grid {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(180px, 1fr);
  gap: 12px;
}
.justification-grid label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}
.audit-level {
  padding: 16px;
  border-radius: 16px;
  font-weight: 1000;
  text-align: center;
}
.audit-verde { background: #eafff3; color: #087a45; border: 1px solid rgba(32,182,107,0.25); }
.audit-amarillo { background: #fff8df; color: #9a6200; border: 1px solid rgba(245,158,11,0.25); }
.audit-rojo { background: #fff0f0; color: #b91c1c; border: 1px solid rgba(239,68,68,0.25); }
.expense-row-title {
  font-size: 1rem;
  font-weight: 1000;
  color: var(--primary-dark);
}
.expense-row {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr auto 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff6fb;
}
.compact-check {
  display: inline-flex !important;
  white-space: nowrap;
  padding: 0 8px;
}
@media (max-width: 820px) {
  .cash-wizard-two-col { grid-template-columns: 1fr; }
  .justification-grid { grid-template-columns: 1fr; }
  .expense-row { grid-template-columns: 1fr; }
  .wizard-title { grid-template-columns: 1fr; }
}

/* V25 - Medios de pago, transferencias y creditos en corte guiado */
.transfer-audit-table input,
.credit-audit-table input {
  width: 100%;
  min-width: 140px;
}
.expense-row {
  grid-template-columns: 1.2fr 0.7fr auto auto 1fr;
}
.empty-state {
  padding: 18px;
  color: var(--muted);
  font-weight: 800;
}
@media (max-width: 820px) {
  .expense-row { grid-template-columns: 1fr; }
}

/* V27 - Historial de cortes y formato estilo Windows */
.windows-panel {
  margin-top: 18px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d7e2ef;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 28px rgba(29, 155, 240, 0.10);
}
.windows-panel-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #d7e2ef;
  background: linear-gradient(180deg, #f7fbff, #eaf4ff);
}
.windows-panel-titlebar div {
  display: grid;
  gap: 2px;
}
.windows-panel-titlebar strong {
  color: #144d7a;
  font-size: 1.02rem;
}
.windows-panel-titlebar span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}
.cash-history-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 280px);
  gap: 12px;
  padding: 14px;
}
.cash-cut-history-table {
  border-radius: 0;
  box-shadow: none;
  max-height: 360px;
  overflow: auto;
}
.cut-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}
.cut-status-pill.ok { background: #dcfce7; color: var(--ok); }
.cut-status-pill.warning { background: #fef3c7; color: var(--warning); }
.cut-status-pill.danger { background: #fee2e2; color: var(--danger); }
.ok-text { color: var(--ok); }
.danger-text { color: var(--danger); }

.cash-cut-window-dialog {
  width: min(1120px, calc(100% - 22px));
  max-height: min(94vh, 900px);
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #eef3f8;
}
.cash-cut-window {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  max-height: min(94vh, 900px);
}
.cash-cut-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 16px;
  background: linear-gradient(180deg, #f8fbff, #dbeafe);
  border-bottom: 1px solid #b9c9d8;
  color: #183b59;
}
.cash-cut-titlebar div { display: grid; gap: 2px; }
.cash-cut-titlebar strong { font-size: 1rem; }
.cash-cut-titlebar span { color: #456176; font-size: 0.82rem; font-weight: 700; }
.window-close-btn {
  width: 42px;
  height: 36px;
  min-height: 36px;
  border-radius: 8px;
  background: #fff;
  color: var(--danger);
  border: 1px solid #d0d7de;
  font-size: 1.4rem;
  font-weight: 900;
}
.cash-cut-toolbar {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #d0d7de;
}
.cash-cut-document {
  overflow: auto;
  padding: 18px;
  background: #dbe4ee;
}
.windows-cut-paper {
  background: #fff;
  border: 1px solid #c8d2dc;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.18);
  padding: 22px;
  border-radius: 10px;
  max-width: 980px;
  margin: 0 auto;
}
.windows-cut-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding-bottom: 16px;
  margin-bottom: 14px;
  border-bottom: 4px solid var(--primary);
}
.cut-brand-block {
  display: flex;
  gap: 16px;
  align-items: center;
}
.cut-brand-block img {
  width: 160px;
  height: auto;
  border-radius: 12px;
}
.cut-brand-block h2 {
  margin: 0;
  color: var(--primary-dark);
  font-size: 1.4rem;
}
.cut-brand-block p {
  margin: 5px 0 0;
  color: var(--muted);
  font-weight: 800;
}
.cut-folio-card {
  min-width: 190px;
  border: 1px solid #d0d7de;
  border-radius: 12px;
  padding: 12px 16px;
  text-align: right;
  background: #f8fafc;
}
.cut-folio-card span,
.cut-info-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.cut-folio-card strong {
  display: block;
  color: #111827;
  font-size: 1.35rem;
  margin: 3px 0;
}
.cut-status-banner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  margin: 12px 0 16px;
  border: 1px solid #d0d7de;
  font-weight: 900;
}
.cut-status-banner.ok { background: #ecfdf3; color: var(--ok); }
.cut-status-banner.warning { background: #fffbeb; color: var(--warning); }
.cut-status-banner.danger { background: #fef2f2; color: var(--danger); }
.cut-section {
  border: 1px solid #d0d7de;
  border-radius: 12px;
  overflow: hidden;
  margin: 13px 0;
  background: #fff;
}
.cut-section-titlebar {
  padding: 10px 13px;
  border-bottom: 1px solid #d0d7de;
  background: linear-gradient(180deg, #f8fafc, #edf3f8);
  color: #1f3b57;
}
.cut-section-titlebar strong { font-size: 0.98rem; }
.cut-section-body { padding: 13px; }
.cut-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.cut-info-grid div {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fbfdff;
  padding: 10px;
}
.cut-info-grid strong {
  display: block;
  margin-top: 4px;
  color: #111827;
}
.cut-table-wrap {
  overflow: auto;
  border: 1px solid #eef2f7;
  border-radius: 10px;
}
.cut-table-wrap table { min-width: 640px; }
.cut-table-wrap th {
  background: #f8fafc;
  color: #475467;
  font-weight: 900;
}
.cut-table-wrap td,
.cut-table-wrap th {
  padding: 9px 10px;
}
.cut-signatures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 38px;
}
.cut-signatures div {
  border-top: 1px solid #111827;
  text-align: center;
  padding-top: 8px;
  color: var(--muted);
  font-weight: 800;
}
.app-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  padding: 12px 16px;
  border-radius: 12px;
  background: #111827;
  color: #fff;
  box-shadow: 0 16px 36px rgba(0,0,0,0.25);
  font-weight: 800;
}
@media (max-width: 820px) {
  .cash-history-filters { grid-template-columns: 1fr; }
  .windows-cut-header,
  .cut-brand-block,
  .cut-status-banner { flex-direction: column; align-items: flex-start; }
  .cut-info-grid { grid-template-columns: 1fr; }
  .cut-signatures { grid-template-columns: 1fr; }
  .cash-cut-document { padding: 10px; }
  .windows-cut-paper { padding: 14px; }
}


/* V29: historial de domicilio */
.delivery-history-wrap { max-height: 54vh; overflow: auto; }
.status-chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; }
.status-chip.open { background: #eefaf2; color: #15803d; border: 1px solid #bbf7d0; }
.status-chip.locked { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; }
.secondary.blue { border-color: rgba(33, 150, 243, .35); color: #0f5f9e; background: #eef7ff; }

/* V32: domicilio F-01 */
.form-grid.two-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.cut-subtitle {
  margin: 14px 0 8px;
  font-weight: 900;
  color: #0f3d57;
}
@media (max-width: 720px) {
  .form-grid.two-cols { grid-template-columns: 1fr; }
}

/* V35: observaciones finales del corte */
.simple-list {
  margin: 8px 0 0;
  padding-left: 20px;
  color: #344054;
  line-height: 1.45;
}
.simple-list li { margin-bottom: 6px; }
.manual-observations-box {
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(233, 30, 143, .25);
  border-radius: 14px;
  background: #fff7fc;
  color: #111827;
  white-space: normal;
  line-height: 1.45;
}
#cashFinalObservationsPreview { max-height: 58vh; overflow: auto; }
#cashManualFinalObservations { min-height: 180px; resize: vertical; }


.database-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.database-card {
  border: 1px solid var(--pink-soft);
  border-radius: 20px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(191, 24, 125, 0.08);
}

.database-card strong {
  display: block;
  margin-bottom: 8px;
}

.database-card input[type="file"] {
  width: 100%;
  margin: 10px 0 14px;
}

.primary-mini {
  background: linear-gradient(135deg, var(--pink), var(--blue));
  color: #fff !important;
  border-color: transparent !important;
}

.imported-cut-note {
  display: inline-block;
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff3c4;
  color: #7a5a00;
  font-size: 11px;
  font-weight: 800;
}

.success-text {
  color: var(--green);
  font-weight: 900;
  margin: 0;
}

.cash-abono-wizard-btn {
  min-width: 138px;
}

/* V49 - trazabilidad de KPI del corte */
/* V50 - créditos activos generales en todos los cortes */
.cash-kpi-card.kpi-clickable {
  cursor: pointer;
  text-align: left;
  border: 1px solid var(--line);
  font-family: inherit;
  color: inherit;
}
.cash-kpi-card.kpi-clickable:hover {
  transform: translateY(-2px);
  border-color: var(--blue);
  box-shadow: 0 18px 40px rgba(2, 132, 199, 0.16);
}
.cash-kpi-card em {
  color: var(--primary-dark);
  font-style: normal;
  font-weight: 900;
  font-size: 0.78rem;
}
.kpi-source-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}
.kpi-source-summary > div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}
.kpi-source-summary span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}
.kpi-source-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 1.05rem;
}
.kpi-source-table {
  max-height: 48vh;
  overflow: auto;
}
.kpi-source-table .num {
  text-align: right;
  white-space: nowrap;
}

/* V51 - eliminacion de ventas con autorizacion */
.muted-row {
  opacity: 0.72;
  background: #fff7f8;
}


/* V52 Panel financiero */
.finance-header .ghost { min-width: 170px; }
.finance-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}
.finance-note { margin-bottom: 14px; }
.finance-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.finance-card {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(233, 30, 143, .20);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 10px 22px rgba(233,30,143,.08);
}
.finance-card span { display:block; color:#667085; font-weight: 700; font-size: 13px; }
.finance-card strong { display:block; margin-top: 4px; color:#0b2945; font-size: 24px; }
.finance-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.finance-chart-panel h4, .finance-two-col h4 { margin-top:0; }
.finance-bars { display:flex; flex-direction:column; gap:10px; }
.finance-bar-label { display:flex; justify-content:space-between; gap:12px; font-size: 13px; color:#344054; }
.finance-bar-track { height: 14px; border-radius: 999px; background:#fce7f3; overflow:hidden; border:1px solid rgba(233,30,143,.14); }
.finance-bar-fill { height:100%; border-radius:999px; background: linear-gradient(90deg, #e91e8f, #1e9af2, #22c55e); }
@media (max-width: 1100px) {
  .finance-filters, .finance-card-grid, .finance-two-col { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .finance-filters, .finance-card-grid, .finance-two-col { grid-template-columns: 1fr; }
}

/* V54 - modificación de cortes con usuario master */
.cut-edit-notice {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(234, 88, 12, .28);
  background: #fff7ed;
  border-radius: 12px;
  color: #9a3412;
}

.warn-inline {
  color: var(--warning, #b45309);
  font-weight: 700;
}

/* V58 - Panel financiero organizado por pestanas */
.finance-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 16px;
  padding: 10px;
  background: #fff;
  border: 1px solid rgba(233, 30, 143, .12);
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(16, 24, 40, .06);
}
.finance-tab-btn {
  border: 1px solid rgba(11, 41, 69, .12);
  background: #f8fafc;
  color: #0b2945;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
  cursor: pointer;
}
.finance-tab-btn.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #e91e8f, #1e9af2);
  box-shadow: 0 10px 20px rgba(233, 30, 143, .22);
}
.finance-tab-panel { display: none; }
.finance-tab-panel.active { display: block; }
.tab-intro { margin-bottom: 14px; }
.tab-intro h4 { margin: 0 0 6px; }
@media (max-width: 760px) {
  .finance-tab-btn { width: 100%; }
}


/* V63 - Visor de auditoria administrativa */
.audit-header .ghost { min-width: 180px; }
.audit-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}
.audit-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.audit-card {
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(29,155,240,.20);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 10px 22px rgba(29,155,240,.08);
}
.audit-card span { display:block; color:#667085; font-weight: 800; font-size: 13px; }
.audit-card strong { display:block; margin-top: 4px; color:#0b2945; font-size: 24px; }
.audit-card small { display:block; margin-top: 4px; color:#667085; font-weight: 700; }
.audit-log-table {
  border-radius: 0;
  box-shadow: none;
  max-height: 520px;
  overflow: auto;
}
.audit-type-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 900;
  white-space: nowrap;
}
.audit-type-sale-edit { background:#e0f2fe; color:#075985; }
.audit-type-sale-delete { background:#fee2e2; color:#991b1b; }
.audit-type-cut-edit { background:#fef3c7; color:#92400e; }
.audit-type-cut-impact { background:#f3e8ff; color:#6b21a8; }
.audit-detail-dialog {
  width: min(1080px, calc(100% - 24px));
  max-height: min(92vh, 860px);
  padding: 0;
  border-radius: 18px;
  overflow: hidden;
}
.audit-detail-body {
  display: grid;
  gap: 14px;
  padding: 16px;
  max-height: calc(92vh - 120px);
  overflow: auto;
}
.audit-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
}
.audit-detail-grid div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}
.audit-detail-grid span { display:block; color: var(--muted); font-size:.8rem; font-weight:800; }
.audit-detail-grid strong { display:block; margin-top:4px; }
.audit-json-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.audit-json-grid pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #0f172a;
  color: #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  max-height: 260px;
  overflow: auto;
  font-size: .78rem;
}
@media (max-width: 900px) {
  .audit-filters, .audit-card-grid, .audit-detail-grid, .audit-json-grid { grid-template-columns: 1fr; }
}

/* V65 - Modulo de domicilio y acceso por actividad */
.delivery-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.delivery-order-form textarea,
.delivery-order-form input,
.delivery-order-form select {
  width: 100%;
}
.delivery-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 220px;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.delivery-stats {
  margin-bottom: 1rem;
}
.delivery-driver-panel {
  margin-top: 1rem;
}
.stacked-actions {
  flex-wrap: wrap;
  gap: 0.35rem;
}
.status-chip.info {
  background: #e8f1ff;
  color: #185abc;
}
.status-chip.warning {
  background: #fff4cf;
  color: #916400;
}
@media (max-width: 980px) {
  .delivery-layout,
  .delivery-filters {
    grid-template-columns: 1fr;
  }
}

/* V65.5 - Flujo real de domicilio por telefono, tarjetas y cronometro */
.header-actions {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.input-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .55rem;
  align-items: end;
}
.form-grid.three-cols {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
#deliveryTotalPreview {
  font-weight: 900;
  color: var(--blue-dark, #0b5ca8);
  background: #f8fbff;
}
.delivery-card-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: .9rem;
  max-height: 72vh;
  overflow: auto;
  padding-right: .3rem;
}
.delivery-order-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 12px 28px rgba(16,24,40,.08);
  display: grid;
  gap: 12px;
}
.delivery-order-card.is-delayed {
  border-color: rgba(220,38,38,.45);
  box-shadow: 0 16px 34px rgba(220,38,38,.14);
}
.delivery-card-top {
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
}
.delivery-card-top small,
.delivery-card-body small { display:block; color: var(--muted); font-weight:700; }
.delivery-card-body {
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:10px;
}
.delivery-card-body div {
  border: 1px solid rgba(102,112,133,.16);
  border-radius: 12px;
  padding: 9px;
  background: #fbfcff;
}
.delivery-card-body span {
  display:block;
  color: var(--muted);
  font-size:.77rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.02em;
}
.delivery-card-body strong { display:block; margin-top:3px; }
.delivery-card-status { width:100%; margin-top:5px; }
.delivery-card-notes {
  margin:0;
  padding:10px 12px;
  background:#fff8fb;
  border:1px dashed rgba(233,30,143,.3);
  border-radius:12px;
  color:#5b3350;
  font-weight:700;
}
.delivery-card-actions {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.delivery-delay-warning {
  color:#b42318;
  background:#fee4e2;
  border-radius:999px;
  padding:6px 10px;
  font-weight:900;
  font-size:.8rem;
}
.empty-board-message {
  padding:24px;
  text-align:center;
  color:var(--muted);
  font-weight:800;
  border:1px dashed var(--line);
  border-radius:16px;
}
.status-chip.danger { background:#fee4e2; color:#b42318; }
.status-chip.locked { background:#e5e7eb; color:#344054; }
.status-chip.open { background:#dcfae6; color:#067647; }
.delivery-customer-dialog {
  width: min(520px, calc(100% - 24px));
  border-radius: 18px;
  padding: 20px;
}
@media (max-width: 720px) {
  .form-grid.three-cols,
  .delivery-card-body,
  .input-action-row { grid-template-columns: 1fr; }
}

/* V65.6 - Domicilio limpio, clientes domicilio y pedido en ventana flotante */
.delivery-board-only {
  margin-top: 1rem;
}
.delivery-order-dialog {
  width: min(780px, calc(100% - 24px));
  border-radius: 20px;
  padding: 22px;
}
.delivery-order-details {
  display: grid;
  gap: .8rem;
  margin-top: .4rem;
}
.delivery-customer-admin-layout {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.customer-admin-filters {
  grid-template-columns: 1fr;
}
.deliveryCustomerView table,
#deliveryCustomersView table {
  min-width: 760px;
}
@media (max-width: 980px) {
  .delivery-customer-admin-layout {
    grid-template-columns: 1fr;
  }
}

/* V65.21 - Corte por repartidor estilo Windows */
.delivery-driver-cut-layout {
  display: grid;
  grid-template-columns: minmax(310px, 430px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.windows-form-card,
.windows-cut-panel {
  overflow: hidden;
  padding-top: 0;
}
.windows-titlebar,
.driver-cut-window-title {
  margin: -1.1rem -1.1rem 1rem;
  padding: 10px 14px;
  background: linear-gradient(90deg, #1f2937, #4b5563);
  color: #fff;
  font-weight: 900;
  border-bottom: 2px solid #111827;
  letter-spacing: .02em;
}
.driver-cut-window {
  border: 2px solid #6b7280;
  background: #f3f4f6;
  box-shadow: inset 0 1px 0 #fff;
}
.driver-cut-window-title {
  margin: 0;
  background: linear-gradient(90deg, #0f4c81, #2563eb);
}
.driver-cut-window-body {
  padding: 12px;
  background: #fff;
}
.driver-cut-head,
.driver-cut-boxes {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.driver-cut-head { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.driver-cut-boxes { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.driver-cut-head div,
.driver-cut-boxes div {
  border: 1px solid #9ca3af;
  background: #f9fafb;
  padding: 9px;
  box-shadow: inset 0 1px 0 #fff;
}
.driver-cut-head span,
.driver-cut-boxes span {
  display: block;
  color: var(--muted);
  font-weight: 800;
  font-size: .78rem;
}
.driver-cut-head strong,
.driver-cut-boxes strong {
  display: block;
  margin-top: 3px;
  color: #111827;
}
.driver-cut-boxes small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
  font-weight: 700;
}
.driver-cut-mini-table,
.driver-cut-orders {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
  background: #fff;
}
.driver-cut-mini-table th,
.driver-cut-mini-table td,
.driver-cut-orders th,
.driver-cut-orders td {
  border: 1px solid #cbd5e1;
  padding: 7px 8px;
  font-size: .88rem;
}
.driver-cut-mini-table th,
.driver-cut-orders th {
  background: #e5e7eb;
  color: #111827;
  text-align: left;
}
.driver-cut-mini-table td { text-align: right; font-weight: 900; }
.driver-cut-orders .right { text-align: right; }
.driver-cut-orders-wrap {
  max-height: 280px;
  overflow: auto;
  border: 1px solid #cbd5e1;
  margin-bottom: 12px;
}
.driver-cut-notes {
  padding: 10px;
  background: #fff8fb;
  border: 1px dashed rgba(233, 30, 143, .3);
  border-radius: 10px;
}
.driver-cut-signatures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 34px;
}
.driver-cut-signatures span {
  border-top: 1px solid #111827;
  text-align: center;
  padding-top: 6px;
  color: #111827;
  font-weight: 800;
}
.negative { color: #b42318 !important; }
.positive { color: #067647 !important; }
.driver-cut-history-panel { margin-top: 1rem; }
@media (max-width: 1100px) {
  .delivery-driver-cut-layout,
  .driver-cut-head,
  .driver-cut-boxes,
  .driver-cut-signatures { grid-template-columns: 1fr; }
}


.driver-debt-payment-box {
  border: 1px solid rgba(34, 99, 235, 0.22);
  border-radius: 14px;
  padding: 14px;
  background: rgba(239, 246, 255, 0.72);
}
.driver-debt-payment-box h4 { margin: 0 0 4px; }
.compact-table-wrap { margin-top: 10px; max-height: 190px; overflow: auto; }

/* V65.25: formato de corte de repartidor en ventana flotante */
.driver-cut-format-dialog {
  max-width: 1120px;
  width: min(1120px, 96vw);
}
.driver-cut-format-modal-body {
  max-height: 72vh;
  overflow: auto;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 16px;
  padding: 12px;
  background: #f8fafc;
}
.driver-cut-format-modal-body .driver-cut-window {
  margin: 0;
}

/* V65.30 - Panel Master Plantas con graficas */
.finance-plant-dashboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.finance-wide-panel {
  grid-column: 1 / -1;
}
.finance-bars-large .finance-bar-track {
  height: 18px;
}
.finance-bar-row {
  display: grid;
  gap: 6px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(102, 112, 133, .16);
}
.finance-bar-row:last-child {
  border-bottom: 0;
}
.finance-chart-panel p.muted {
  margin-top: -6px;
  margin-bottom: 12px;
}
@media (max-width: 900px) {
  .finance-plant-dashboard { grid-template-columns: 1fr; }
  .finance-wide-panel { grid-column: auto; }
}


/* V66 tablero directivo y control operativo */
.finance-subfilters { margin-top: 10px; margin-bottom: 16px; }
.finance-filter-title {
  font-weight: 800;
  color: #0b2945;
  align-self: center;
  padding: 10px 12px;
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(233, 30, 143, .18);
  border-radius: 14px;
}


/* V66 tablero directivo */
.finance-three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.finance-card strong.success-text, .success-text { color: #0b7a2f; }
.danger-text { color: #b42318; }
.warn-inline { color: #a15c00; font-weight: 700; }
@media (max-width: 1100px) { .finance-three-col { grid-template-columns: 1fr; } }

/* ==============================
   V67 CRM COMERCIAL / AGENDA 95%
   ============================== */
.crm-header{align-items:flex-start;gap:18px}.crm-header-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}.crm-tab-strip{display:flex;gap:8px;overflow:auto;padding:4px 2px 14px;margin-bottom:6px}.crm-tab-btn{border:1px solid var(--border,#d9e2ec);background:#fff;color:var(--text,#16324f);border-radius:999px;padding:9px 14px;font-weight:700;white-space:nowrap;cursor:pointer}.crm-tab-btn.active{background:#0a5bd8;color:#fff;border-color:#0a5bd8}.crm-tab-panel{display:block}.crm-tab-panel.hidden{display:none}.crm-kpi-grid{display:grid;grid-template-columns:repeat(6,minmax(145px,1fr));gap:12px;margin-bottom:14px}.crm-kpi-grid.compact{grid-template-columns:repeat(4,minmax(150px,1fr))}.crm-kpi small,.crm-kpi-grid .stat-card small{display:block;margin-top:5px;color:#6b7c93;font-size:.78rem}.crm-dashboard-grid{display:grid;grid-template-columns:1.35fr 1fr;gap:14px}.crm-two-column{display:grid;grid-template-columns:minmax(300px,.85fr) minmax(520px,1.65fr);gap:14px;align-items:start}.crm-filter-panel{margin-bottom:14px}.crm-filter-grid{display:grid;grid-template-columns:repeat(6,minmax(145px,1fr));gap:10px;align-items:end}.crm-filter-grid.customer-grid{grid-template-columns:2fr repeat(4,minmax(130px,1fr)) auto}.crm-filter-grid label,.crm-two-column label{display:flex;flex-direction:column;gap:6px;font-size:.82rem;font-weight:700;color:#40546b}.crm-filter-grid input,.crm-filter-grid select,.crm-two-column input,.crm-two-column select,.crm-two-column textarea{width:100%}.crm-form-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.crm-playbook details{border-top:1px solid #e7edf4;padding:12px 0}.crm-playbook details:first-of-type{border-top:0}.crm-playbook summary{font-weight:800;cursor:pointer;color:#173b63}.crm-playbook p{margin:8px 0 0;line-height:1.5;color:#52677d}.crm-status{display:inline-flex;align-items:center;border-radius:999px;padding:4px 9px;font-size:.76rem;font-weight:800;white-space:nowrap}.crm-status.green{background:#e8f7ef;color:#147a42}.crm-status.yellow{background:#fff6dc;color:#946200}.crm-status.red{background:#fdebea;color:#b42318}.crm-status.blue{background:#eaf2ff;color:#0a5bd8}.crm-status.gray{background:#eef2f6;color:#596b7e}.crm-status.purple{background:#f1eaff;color:#6a38a5}.crm-actions{display:flex;gap:6px;flex-wrap:wrap}.crm-actions .mini-btn{white-space:nowrap}.crm-metric-good{color:#147a42}.crm-metric-warn{color:#946200}.crm-metric-bad{color:#b42318}.crm-overdue{background:rgba(180,35,24,.035)}.crm-today{background:rgba(10,91,216,.035)}.crm-subtext{display:block;color:#708196;font-size:.76rem;margin-top:3px}.crm-route-title{display:flex;flex-direction:column;gap:2px}.crm-route-title small{font-weight:400;color:#708196}.crm-empty{text-align:center;color:#708196;padding:18px}.crm-progress{min-width:105px}.crm-progress-track{height:6px;background:#e8edf3;border-radius:999px;overflow:hidden;margin-top:5px}.crm-progress-fill{height:100%;background:currentColor;border-radius:999px;max-width:100%}
@media (max-width:1280px){.crm-kpi-grid{grid-template-columns:repeat(3,1fr)}.crm-filter-grid{grid-template-columns:repeat(3,1fr)}.crm-filter-grid.customer-grid{grid-template-columns:repeat(3,1fr)}.crm-dashboard-grid,.crm-two-column{grid-template-columns:1fr}}
@media (max-width:760px){.crm-kpi-grid,.crm-kpi-grid.compact,.crm-filter-grid,.crm-filter-grid.customer-grid,.crm-form-row{grid-template-columns:1fr}.crm-header-actions{width:100%;justify-content:stretch}.crm-header-actions button{flex:1}.crm-tab-strip{margin-left:-4px;margin-right:-4px}.crm-two-column{display:block}.crm-two-column>.panel{margin-bottom:14px}}
\n\n/* V67.1 - Control Operativo: horarios vs cortes y triple conciliacion */\n.control-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 14px}.control-tab{border:1px solid #c9d6e5;background:#fff;color:#173a61;border-radius:9px;padding:9px 13px;font-weight:700;cursor:pointer}.control-tab.active{background:#0b6fdc;color:#fff;border-color:#0b6fdc}.control-filter-panel{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin-bottom:14px}.control-filter-panel label{min-width:160px}.control-filter-panel input,.control-filter-panel select,.control-schedule-form input,.control-schedule-form select{width:100%;margin-top:5px}.control-kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-bottom:14px}.control-kpi-card{background:#fff;border:1px solid #d7e1ed;border-radius:12px;padding:14px;box-shadow:0 4px 12px rgba(27,54,84,.05)}.control-kpi-card span{display:block;color:#60758c;font-size:12px}.control-kpi-card strong{display:block;color:#0a294d;font-size:22px;margin-top:4px}.control-kpi-card.danger{border-left:5px solid #d92d20}.control-kpi-card.warning{border-left:5px solid #f79009}.control-kpi-card.success{border-left:5px solid #12b76a}.control-table-wrap{overflow:auto}.control-table-wrap table{min-width:1100px}.control-status{display:inline-block;border-radius:999px;padding:4px 9px;font-size:11px;font-weight:800;white-space:nowrap}.control-status.ok{background:#dff7ea;color:#087443}.control-status.warn{background:#fff1d6;color:#9a5b00}.control-status.bad{background:#fee4e2;color:#b42318}.control-status.info{background:#e6f0ff;color:#175cd3}.control-schedule-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;align-items:end}.control-days{grid-column:1/-1;display:flex;gap:8px;flex-wrap:wrap;padding:8px 0}.control-day-check{display:flex;align-items:center;gap:6px;padding:6px 9px;border:1px solid #d7e1ed;border-radius:8px;background:#f8fafc;font-size:12px}.control-wide{grid-column:span 2}.control-row-actions{display:flex;gap:6px;flex-wrap:wrap}@media(max-width:760px){.control-wide{grid-column:1/-1}.control-filter-panel label{min-width:100%;}}\n
/* AquaControl V68.1 - Validación de cortes por planta + fechas Panel Financiero */
.control-db-status{display:inline-flex;align-items:center;min-height:38px;padding:0 12px;border-radius:9px;background:#eaf7ef;color:#137333;font-weight:700;font-size:12px}.control-db-status.bad{background:#fee4e2;color:#b42318}.control-close-toolbar{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin-bottom:14px}.control-close-toolbar label{min-width:180px}.control-day-semaphore{display:flex;gap:14px;align-items:center;justify-content:space-between;border-radius:14px;padding:18px 20px;margin:0 0 14px;border:1px solid #d5dce5;background:#f8fafc}.control-day-semaphore strong{font-size:20px}.control-day-semaphore span{font-size:13px}.control-day-semaphore.ok{background:#ecfdf3;border-color:#abefc6;color:#067647}.control-day-semaphore.warn{background:#fffaeb;border-color:#fedf89;color:#b54708}.control-day-semaphore.bad{background:#fef3f2;border-color:#fecdca;color:#b42318}.control-day-semaphore.pending{background:#f8fafc;color:#475467}.control-dashboard-grid{display:grid;grid-template-columns:1fr;gap:14px}.control-two-column{display:grid;grid-template-columns:minmax(320px,.75fr) minmax(0,1.25fr);gap:14px;align-items:start}.control-equation-box{display:flex;gap:12px;flex-direction:column;border-left:5px solid #7f56d9;margin-bottom:14px}.control-equation-box strong{color:#42307d}.control-equation-box span{color:#475467;line-height:1.5}.control-kpi-card small{display:block;margin-top:5px;color:#667085;font-size:11px}.control-detail-dialog{padding:4px}.control-detail-dialog h3{margin:0 0 14px}.control-detail-lines{display:grid;grid-template-columns:1fr;gap:0;border:1px solid #e4e7ec;border-radius:10px;overflow:hidden}.control-detail-lines>div{display:grid;grid-template-columns:minmax(190px,.8fr) minmax(0,1.2fr);gap:14px;padding:10px 12px;border-bottom:1px solid #eaecf0}.control-detail-lines>div:last-child{border-bottom:0}.control-detail-lines strong{color:#344054}.control-detail-lines span{color:#101828;overflow-wrap:anywhere}.control-incident-status{min-width:165px;padding:6px 8px;border:1px solid #d0d5dd;border-radius:7px;background:#fff}.control-day-cards .control-kpi-card strong{font-size:20px}.control-panel .warning-text{color:#b54708;font-weight:700}.control-panel table tbody tr:has(.control-status.bad){background:rgba(254,243,242,.45)}
@media(max-width:980px){.control-two-column{grid-template-columns:1fr}.control-day-semaphore{align-items:flex-start;flex-direction:column}.control-detail-lines>div{grid-template-columns:1fr}}


/* V68.1 - Drill-down de planta y sincronización de fechas */
.control-clickable-row { cursor: pointer; transition: background .15s ease; }
.control-clickable-row:hover { background: rgba(26, 115, 232, .06); }
.control-plant-link { border: 0; padding: 0; background: transparent; color: #0b3b6f; font: inherit; font-weight: 800; cursor: pointer; text-align: left; }
.control-plant-link:hover { text-decoration: underline; }
.control-finance-sync { min-width: 280px; }
.control-finance-sync .check-row { margin-top: 4px; font-weight: 700; }
.control-finance-sync small { display: block; max-width: 330px; margin-top: 3px; }
.control-plant-audit-dialog { width: min(1500px, 97vw); max-width: 1500px; }
.control-plant-audit-shell { padding: 20px; max-height: 88vh; overflow: auto; }
.control-plant-audit-header { display: flex; gap: 20px; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.control-plant-audit-header h3 { margin: 0 0 5px; color: #0b2f57; }
.control-plant-audit-header p { margin: 0; color: #5b6b7d; }
.control-plant-audit-kpis { margin-bottom: 14px; }
.control-plant-audit-dialog table { min-width: 1180px; }

/* AquaControl V68.2 - claridad de destinos finales / movimientos internos */
.control-internal-move{display:inline-block;padding:3px 7px;border-radius:999px;background:#eef2f7;color:#52616f;font-size:.78rem;font-weight:800;white-space:nowrap}
.control-internal-panel{border:1px dashed #94a3b8;background:#f8fafc}
.control-final-equation-box{border-left:5px solid #0f766e}
.control-total-row td{border-top:2px solid #0f172a;background:#f8fafc}
.control-final-destination-grid{align-items:start}

/* V69 - aviso de duplicados: nunca seleccionar/borrar cortes historicos en silencio */
.control-duplicate-warning{margin:12px 0;padding:12px 14px;border:1px solid #ef9a9a;background:#fff4f4;border-radius:10px;display:flex;flex-direction:column;gap:4px;color:#8b1e1e}
.control-duplicate-warning strong{font-weight:800}

/* =========================================
   V69.5 - MANTENIMIENTO Y CALIDAD / SGTC
   ========================================= */
.maintenance-header{align-items:flex-start;gap:16px}.maintenance-tabs{display:flex;gap:8px;overflow:auto;flex-wrap:wrap;margin:0 0 14px}.maintenance-tab{border:1px solid #c9d6e5;background:#fff;color:#173a61;border-radius:9px;padding:9px 13px;font-weight:800;cursor:pointer;white-space:nowrap}.maintenance-tab.active{background:#087f8c;color:#fff;border-color:#087f8c}.maintenance-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin-bottom:14px}.maintenance-kpis .stat-card.danger{border-left:5px solid #d92d20}.maintenance-kpis .stat-card.warning{border-left:5px solid #f79009}.maintenance-grid-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}.maintenance-filterbar{display:grid;grid-template-columns:minmax(240px,2fr) repeat(3,minmax(145px,1fr)) auto;gap:10px;align-items:center;margin-bottom:14px}.maintenance-filterbar input,.maintenance-filterbar select{width:100%}.maintenance-alert-list,.maintenance-recent{display:grid;gap:7px}.maintenance-alert-row,.maintenance-recent>button{width:100%;border:1px solid #e1e8f0;background:#fff;border-radius:10px;padding:10px 12px;cursor:pointer;text-align:left;color:#16324f}.maintenance-alert-row{display:grid;grid-template-columns:12px 1fr;gap:10px;align-items:start}.maintenance-alert-row span:last-child{display:grid;gap:3px}.maintenance-alert-row small,.maintenance-recent small{color:#687b8f}.status-dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-top:5px;background:#94a3b8}.status-dot.red{background:#d92d20}.maintenance-recent>button{display:grid;grid-template-columns:100px 110px 1fr auto;gap:10px;align-items:center}.maint-semaforo{display:inline-flex;border-radius:999px;padding:4px 9px;font-size:.74rem;font-weight:900;white-space:nowrap}.maint-semaforo.vencido{background:#fee4e2;color:#b42318}.maint-semaforo.proximo{background:#fff3d6;color:#a15c00}.maint-semaforo.vigente{background:#e6f7ed;color:#087443}.maintenance-calendar-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:14px}.maintenance-month h4{margin-top:0}.maintenance-calendar-item{display:grid;width:100%;gap:3px;text-align:left;padding:9px 10px;margin:6px 0;border:1px solid #e1e8f0;border-radius:9px;background:#fff;color:#173a61;cursor:pointer}.maintenance-calendar-item.late{border-left:5px solid #d92d20;background:#fff8f7}.maintenance-calendar-item small{color:#687b8f}.maintenance-dialog{width:min(1580px,98vw);max-width:1580px}.maintenance-dialog>.dialog-form{max-height:92vh;overflow:auto;padding:4px}.maintenance-dialog-title{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.maintenance-form-grid{display:grid;grid-template-columns:repeat(3,minmax(170px,1fr));gap:12px}.maintenance-form-grid.two{grid-template-columns:repeat(2,minmax(260px,1fr))}.maintenance-form-grid.three{grid-template-columns:repeat(3,minmax(220px,1fr))}.maintenance-form-grid label{display:flex;flex-direction:column;gap:6px;color:#40546b;font-size:.82rem;font-weight:800}.maintenance-form-grid input,.maintenance-form-grid select,.maintenance-form-grid textarea{width:100%}.maintenance-doc-hint{padding:11px 13px;border-left:5px solid #087f8c;background:#effbfc;border-radius:9px;color:#254d58;line-height:1.45}.maintenance-operational-editor{padding:0;overflow:hidden}.maintenance-operational-editor .panel-title-row{padding:14px}.maintenance-operational-editor table{min-width:1150px}.maintenance-operational-editor input,.maintenance-operational-editor select{min-width:95px;width:100%;font-size:.78rem;padding:6px}.maintenance-operational-editor td,.maintenance-operational-editor th{padding:6px}.maintenance-dialog-actions{position:sticky;bottom:-4px;background:rgba(255,255,255,.96);padding:12px 0;border-top:1px solid #e1e8f0;z-index:3}.maintenance-dialog .danger.ghost{color:#b42318;border-color:#f2b8b5}.maintenance-dialog .danger.ghost:hover{background:#fef3f2}.cell-sub{display:block;color:#718198;margin-top:3px;font-size:.74rem}.row-danger{background:#fff7f6}.danger-box{border-left:5px solid #d92d20;background:#fff8f7}
@media(max-width:1100px){.maintenance-grid-two{grid-template-columns:1fr}.maintenance-filterbar{grid-template-columns:repeat(2,minmax(0,1fr))}.maintenance-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.maintenance-recent>button{grid-template-columns:90px 100px 1fr}}
@media(max-width:720px){.maintenance-filterbar,.maintenance-form-grid,.maintenance-form-grid.two,.maintenance-form-grid.three{grid-template-columns:1fr}.maintenance-recent>button{grid-template-columns:1fr}.maintenance-dialog{width:98vw}.maintenance-tabs{flex-wrap:nowrap}}


/* =========================================
   V70.3 - MESA UNICA DE CIERRE DE PLANTA
   ========================================= */
.cash-cut-workspace-dialog{
  width:min(1700px,98vw);max-width:1700px;height:min(94vh,980px);max-height:94vh;
  padding:0;border:0;border-radius:18px;overflow:hidden;background:#f5f7fb;
  box-shadow:0 30px 90px rgba(9,30,66,.28)
}
.cash-cut-workspace-dialog::backdrop{background:rgba(12,28,48,.62);backdrop-filter:blur(3px)}
.cash-cut-workspace-shell{height:100%;display:flex;flex-direction:column;min-height:0}
.cash-workspace-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:18px 22px;background:#fff;border-bottom:1px solid #dfe6ef}
.cash-workspace-header h3{margin:2px 0 2px;font-size:1.45rem;color:#102f50}.cash-workspace-header p{margin:0}
.cash-workspace-eyebrow{font-size:.7rem;letter-spacing:.12em;font-weight:900;color:#0b6f7b}
.cash-workspace-header-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.cash-workspace-kpis{display:grid;grid-template-columns:repeat(7,minmax(120px,1fr));gap:1px;background:#dfe6ef;border-bottom:1px solid #dfe6ef}
.cash-workspace-kpis>div{padding:10px 13px;background:#fbfcfe;min-width:0}.cash-workspace-kpis span{display:block;color:#66778b;font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.03em}.cash-workspace-kpis strong{display:block;margin-top:3px;color:#173a61;font-size:.9rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cash-workspace-kpis>div.warning{background:#fff7e8}.cash-workspace-kpis>div.warning strong{color:#a15c00}
.cash-workspace-layout{display:grid;grid-template-columns:250px minmax(0,1fr);flex:1;min-height:0}
.cash-workspace-nav{background:#102f50;padding:14px 10px;overflow:auto;display:flex;flex-direction:column;gap:5px}
.cash-workspace-nav button{width:100%;display:grid;grid-template-columns:30px minmax(0,1fr);gap:9px;align-items:center;text-align:left;border:0;border-radius:10px;padding:8px 9px;background:transparent;color:#dbe7f4;cursor:pointer;transition:.15s ease}
.cash-workspace-nav button>span{display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:rgba(255,255,255,.1);font-size:.72rem;font-weight:900}
.cash-workspace-nav button div{min-width:0}.cash-workspace-nav button strong{display:block;font-size:.78rem}.cash-workspace-nav button small{display:block;font-size:.66rem;color:#9fb3ca;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cash-workspace-nav button:hover:not(:disabled){background:rgba(255,255,255,.08)}.cash-workspace-nav button.active{background:#fff;color:#173a61;box-shadow:0 5px 16px rgba(0,0,0,.12)}.cash-workspace-nav button.active small{color:#61768d}.cash-workspace-nav button.active>span{background:#0b7f8b;color:#fff}.cash-workspace-nav button.complete>span{background:#1d9d63;color:#fff}.cash-workspace-nav button.complete>span::after{content:'✓';font-size:.7rem}.cash-workspace-nav button.complete>span{font-size:0}.cash-workspace-nav button.locked{opacity:.38;cursor:not-allowed}
.cash-workspace-main{min-width:0;min-height:0;display:flex;flex-direction:column;background:#f5f7fb}
.cash-workspace-stepbar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px 18px;background:#fff;border-bottom:1px solid #dfe6ef}.cash-workspace-stepbar>div:first-child{display:flex;align-items:center;gap:10px}.cash-workspace-stepbar span{display:inline-flex;padding:5px 8px;border-radius:999px;background:#e9f4f6;color:#0b6f7b;font-weight:900;font-size:.68rem}.cash-workspace-stepbar strong{font-size:.9rem;color:#173a61}.cash-workspace-state{padding:5px 9px;border-radius:999px;background:#eef3f8;color:#536a82;font-size:.7rem;font-weight:800}
.cash-workspace-stage{flex:1;min-height:0;overflow:auto;padding:18px}.cash-workspace-section{min-height:100%}.cash-workspace-section.hidden{display:none!important}
.cash-workspace-form{width:100%!important;max-width:none!important;margin:0!important;background:transparent!important;padding:0!important;box-shadow:none!important;border:0!important}
.cash-workspace-form>.dialog-title{background:#fff;border:1px solid #dfe6ef;border-radius:13px;padding:13px 15px;margin-bottom:13px}.cash-workspace-form>.dialog-title .wizard-step{display:none}.cash-workspace-form>.dialog-title h3{margin:0 0 3px}.cash-workspace-form>.dialog-title p{margin:0}
.cash-workspace-form>.dialog-actions{position:sticky;bottom:-18px;z-index:5;background:rgba(245,247,251,.96);backdrop-filter:blur(8px);border-top:1px solid #dfe6ef;margin:18px -18px -18px;padding:12px 18px;box-shadow:0 -8px 20px rgba(16,47,80,.05)}
.cash-workspace-form .cash-abono-wizard-btn{display:none}
@media(max-width:1200px){.cash-workspace-kpis{grid-template-columns:repeat(4,1fr)}.cash-workspace-layout{grid-template-columns:215px minmax(0,1fr)}}
@media(max-width:800px){.cash-cut-workspace-dialog{width:100vw;height:100vh;max-height:100vh;border-radius:0}.cash-workspace-header{padding:12px}.cash-workspace-header-actions{width:100%}.cash-workspace-header{flex-direction:column}.cash-workspace-kpis{grid-template-columns:repeat(2,1fr)}.cash-workspace-layout{grid-template-columns:1fr}.cash-workspace-nav{flex-direction:row;overflow:auto;padding:8px;position:relative}.cash-workspace-nav button{min-width:165px}.cash-workspace-stage{padding:10px}.cash-workspace-form>.dialog-actions{margin:14px -10px -10px;padding:10px}.cash-workspace-stepbar{padding:9px 10px}}


/* V71.1 - Domicilio agil: Kanban, semaforo SLA y captura en una sola ventana */
.shortcut-hint { display:inline-flex; align-items:center; margin-left:.45rem; padding:2px 6px; border-radius:6px; font-size:.68rem; font-weight:800; background:rgba(255,255,255,.18); color:inherit; }
.delivery-service-strip { display:grid; grid-template-columns:repeat(3,minmax(140px,1fr)) minmax(260px,1.4fr); gap:.65rem; margin:-.35rem 0 1rem; align-items:stretch; }
.delivery-service-strip > div, .delivery-service-strip > p { margin:0; border:1px solid var(--line); background:#fff; border-radius:12px; padding:10px 12px; }
.delivery-service-strip span { display:block; color:var(--muted); font-size:.72rem; font-weight:900; text-transform:uppercase; letter-spacing:.03em; }
.delivery-service-strip strong { display:block; font-size:1.2rem; margin-top:2px; }
.delivery-service-strip p { color:var(--muted); font-size:.78rem; display:flex; align-items:center; line-height:1.35; }
.delivery-kanban-board { overflow-x:auto; overflow-y:hidden; max-height:none; padding:0 0 .45rem; }
.delivery-kanban { display:grid; grid-template-columns:repeat(6,minmax(285px,1fr)); gap:.8rem; min-width:1740px; align-items:start; }
.delivery-kanban-column { border:1px solid var(--line); border-radius:14px; background:#f6f8fb; min-height:190px; overflow:hidden; }
.delivery-kanban-column > header { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:10px 11px; border-bottom:1px solid var(--line); background:#fff; position:sticky; top:0; z-index:2; }
.delivery-kanban-column > header strong, .delivery-kanban-column > header small { display:block; }
.delivery-kanban-column > header small { color:var(--muted); font-size:.72rem; margin-top:2px; }
.delivery-kanban-column > header > span { min-width:28px; height:28px; display:grid; place-items:center; border-radius:999px; background:#edf2f7; font-weight:900; }
.delivery-kanban-column.status-danger > header { background:#fff5f5; }
.delivery-kanban-column.status-warning > header { background:#fffaf0; }
.delivery-kanban-column.status-open > header { background:#f1fbf5; }
.delivery-kanban-stack { display:grid; gap:.65rem; padding:.65rem; max-height:66vh; overflow-y:auto; }
.delivery-kanban-empty { border:1px dashed #ccd5df; border-radius:10px; color:var(--muted); text-align:center; padding:18px 8px; font-size:.8rem; font-weight:700; }
.delivery-compact-card { border-radius:12px; padding:11px; gap:9px; box-shadow:0 4px 12px rgba(16,24,40,.06); }
.delivery-compact-card:focus { outline:2px solid #4c9ffe; outline-offset:2px; }
.delivery-time-chip { display:inline-flex; align-items:center; white-space:nowrap; border-radius:999px; padding:5px 8px; font-size:.72rem; font-weight:900; }
.delivery-time-chip.ok { background:#eaf9f2; color:#13724c; }
.delivery-time-chip.attention { background:#fff4cf; color:#8a5d00; }
.delivery-time-chip.late { background:#fff0f1; color:#b42336; }
.delivery-time-chip.done { background:#eef2f6; color:#475467; }
.delivery-card-customer { display:grid; gap:2px; }
.delivery-card-customer > strong { font-size:.95rem; }
.delivery-card-customer > span { color:#335b84; font-weight:800; font-size:.8rem; }
.delivery-card-customer > small { color:var(--muted); line-height:1.25; }
.delivery-card-order-summary { display:flex; justify-content:space-between; align-items:baseline; gap:8px; padding:8px 9px; border-radius:9px; background:#f7f9fc; }
.delivery-card-order-summary strong { font-size:.9rem; }
.delivery-card-order-summary span { color:var(--muted); font-size:.76rem; font-weight:700; text-align:right; }
.delivery-quick-grid { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.delivery-quick-grid label { margin:0; font-size:.7rem; color:var(--muted); font-weight:800; }
.delivery-quick-grid label > span { display:block; margin-bottom:3px; text-transform:uppercase; letter-spacing:.025em; }
.delivery-quick-grid select { width:100%; min-width:0; padding:7px 25px 7px 7px; font-size:.78rem; }
.delivery-status-control { grid-column:1 / -1; }
.delivery-card-actions { border-top:1px solid #edf0f4; padding-top:8px; }
.delivery-action-primary, .delivery-action-secondary { display:flex; flex-wrap:wrap; gap:5px; }
.delivery-card-actions .mini-btn { min-height:30px; padding:5px 8px; font-size:.75rem; }
.danger-text { color:#b42318 !important; }
.delivery-inline-customer { border:1px solid #bed8f5; background:#f5faff; border-radius:13px; padding:12px; display:grid; gap:10px; }
.delivery-inline-customer-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.delivery-inline-customer-head strong, .delivery-inline-customer-head small { display:block; }
.delivery-inline-customer-head small { color:var(--muted); margin-top:2px; }
.delivery-inline-actions { display:flex; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.delivery-order-actions { position:sticky; bottom:-22px; background:#fff; border-top:1px solid #e5eaf0; padding-top:12px; padding-bottom:2px; z-index:3; }
@media (max-width: 900px) {
  .delivery-service-strip { grid-template-columns:1fr 1fr; }
  .delivery-service-strip > p { grid-column:1 / -1; }
  .delivery-kanban { grid-template-columns:repeat(6,minmax(255px,1fr)); min-width:1560px; }
}
@media (max-width: 620px) {
  .delivery-service-strip { grid-template-columns:1fr; }
  .delivery-service-strip > p { grid-column:auto; }
  .delivery-order-actions { position:static; }
}


/* V71.2 - Centro de despacho de repartidores */
.delivery-dispatch-panel { margin-bottom:1rem; padding:14px; display:grid; gap:12px; }
.delivery-dispatch-head { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; }
.delivery-dispatch-head h4 { margin:2px 0 3px; font-size:1.05rem; }
.delivery-dispatch-head p { margin:0; }
.delivery-dispatch-actions { display:flex; gap:7px; flex-wrap:wrap; justify-content:flex-end; }
.delivery-dispatch-actions .active { box-shadow:0 0 0 2px rgba(245,158,11,.22); border-color:#d99008; }
.delivery-dispatch-kpis { display:grid; grid-template-columns:repeat(5,minmax(115px,1fr)); gap:7px; }
.delivery-dispatch-kpis > div { border:1px solid var(--line); border-radius:10px; padding:8px 10px; background:#f8fafc; }
.delivery-dispatch-kpis span { display:block; font-size:.68rem; text-transform:uppercase; letter-spacing:.035em; color:var(--muted); font-weight:900; }
.delivery-dispatch-kpis strong { display:block; margin-top:2px; font-size:1.15rem; }
.delivery-dispatch-kpis > .warning { background:#fffbeb; border-color:#f7d58a; }
.delivery-dispatch-kpis > .danger { background:#fff3f3; border-color:#f4c4c6; }
.delivery-dispatch-kpis > .ok { background:#f1fbf5; border-color:#bde5cc; }
.delivery-driver-load-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:8px; }
.delivery-driver-load-card { appearance:none; text-align:left; width:100%; border:1px solid #dbe4ee; border-radius:12px; padding:10px; background:#fff; cursor:pointer; color:inherit; display:grid; gap:7px; transition:transform .12s ease,border-color .12s ease,box-shadow .12s ease; }
.delivery-driver-load-card:hover { transform:translateY(-1px); border-color:#9fc4e9; box-shadow:0 6px 16px rgba(16,45,78,.08); }
.delivery-driver-load-card.selected { border-color:#1677d2; box-shadow:0 0 0 2px rgba(22,119,210,.13); }
.delivery-driver-card-head { display:flex; justify-content:space-between; gap:8px; align-items:flex-start; }
.delivery-driver-card-head strong, .delivery-driver-card-head small { display:block; }
.delivery-driver-card-head small { margin-top:2px; color:var(--muted); font-size:.72rem; }
.delivery-load-badge { border-radius:999px; padding:4px 7px; font-size:.67rem; font-weight:900; white-space:nowrap; }
.delivery-load-badge.free { background:#e9f8ef; color:#11734b; }
.delivery-load-badge.available { background:#eaf3ff; color:#1b5f9e; }
.delivery-load-badge.busy { background:#fff5d9; color:#8a5b00; }
.delivery-load-badge.saturated { background:#ffe9eb; color:#a92b39; }
.delivery-driver-shift { width:max-content; max-width:100%; border-radius:6px; padding:3px 6px; font-size:.66rem; font-weight:800; background:#eef2f6; color:#526170; }
.delivery-driver-shift.on { background:#e9f8ef; color:#11734b; }
.delivery-driver-shift.scheduled { background:#eaf3ff; color:#1b5f9e; }
.delivery-driver-shift.off { background:#f2f3f5; color:#7b8794; }
.delivery-driver-numbers { display:grid; grid-template-columns:repeat(4,1fr); gap:4px; }
.delivery-driver-numbers > div { min-width:0; text-align:center; background:#f8fafc; border-radius:8px; padding:6px 3px; }
.delivery-driver-numbers strong, .delivery-driver-numbers span { display:block; }
.delivery-driver-numbers strong { font-size:.9rem; }
.delivery-driver-numbers span { margin-top:1px; color:var(--muted); font-size:.59rem; font-weight:800; text-transform:uppercase; }
.delivery-load-bar { height:5px; border-radius:999px; background:#edf1f5; overflow:hidden; }
.delivery-load-bar span { display:block; height:100%; border-radius:inherit; background:#4d93d6; }
.delivery-driver-load-card.busy .delivery-load-bar span { background:#e3a526; }
.delivery-driver-load-card.saturated .delivery-load-bar span { background:#d5535e; }
.delivery-driver-flow { color:var(--muted); font-weight:750; }
.delivery-dispatch-hint { border:1px dashed #cbd9e8; border-radius:9px; padding:8px 10px; color:#52677d; font-size:.78rem; background:#fbfdff; }
.delivery-dispatch-empty { grid-column:1/-1; border:1px dashed #ccd5df; border-radius:10px; text-align:center; color:var(--muted); padding:16px; }
.dispatch-suggest-btn { background:#eef7ff !important; border-color:#b9d9f7 !important; color:#175b96 !important; }
@media(max-width:980px){ .delivery-dispatch-kpis{grid-template-columns:repeat(3,1fr);} }
@media(max-width:680px){ .delivery-dispatch-head{display:grid;} .delivery-dispatch-actions{justify-content:flex-start;} .delivery-dispatch-kpis{grid-template-columns:1fr 1fr;} .delivery-driver-load-grid{grid-template-columns:1fr;} }


/* V71.3 - Rutas y productividad de repartidores */
.delivery-productivity-kpis { display:grid; grid-template-columns:repeat(5,minmax(115px,1fr)); gap:7px; border-top:1px solid #e5edf5; padding-top:9px; }
.delivery-productivity-kpis > div { border:1px solid var(--line); border-radius:10px; padding:8px 10px; background:#fbfdff; }
.delivery-productivity-kpis span { display:block; font-size:.66rem; text-transform:uppercase; letter-spacing:.035em; color:var(--muted); font-weight:900; }
.delivery-productivity-kpis strong { display:block; margin-top:2px; font-size:1rem; }
.delivery-productivity-kpis > .warning { background:#fffbeb; border-color:#f7d58a; }
.delivery-productivity-kpis > .ok { background:#f1fbf5; border-color:#bde5cc; }
.delivery-driver-productivity { display:grid; grid-template-columns:repeat(4,1fr); gap:4px; border-top:1px dashed #dce5ee; padding-top:7px; }
.delivery-driver-productivity > div { min-width:0; text-align:center; }
.delivery-driver-productivity strong,.delivery-driver-productivity span { display:block; }
.delivery-driver-productivity strong { font-size:.8rem; }
.delivery-driver-productivity span { color:var(--muted); font-size:.55rem; text-transform:uppercase; font-weight:800; }
.warning-text { color:#9b6500; }
#deliveryTerritoryFilter { min-width:190px; }
@media(max-width:980px){ .delivery-productivity-kpis{grid-template-columns:repeat(3,1fr);} }
@media(max-width:680px){ .delivery-productivity-kpis{grid-template-columns:1fr 1fr;} #deliveryTerritoryFilter{min-width:0;} }


/* V71.4 - Supervisión y metas de reparto */
.delivery-goal-supervision { border-top:1px solid #dfe8f1; padding-top:12px; display:grid; gap:10px; }
.delivery-goal-head { display:flex; justify-content:space-between; gap:14px; align-items:flex-start; }
.delivery-goal-head h5 { margin:2px 0 3px; font-size:1rem; }
.delivery-goal-head p { margin:0; }
.delivery-goal-summary { display:grid; grid-template-columns:repeat(5,minmax(118px,1fr)); gap:7px; }
.delivery-goal-summary > div { border:1px solid var(--line); border-radius:10px; padding:8px 10px; background:#fbfdff; }
.delivery-goal-summary span { display:block; font-size:.65rem; text-transform:uppercase; letter-spacing:.035em; color:var(--muted); font-weight:900; }
.delivery-goal-summary strong { display:block; margin-top:2px; font-size:1.06rem; }
.delivery-goal-summary .ok { background:#f1fbf5; border-color:#bde5cc; }
.delivery-goal-summary .warning { background:#fffbeb; border-color:#f7d58a; }
.delivery-goal-summary .danger { background:#fff3f3; border-color:#f4c4c6; }
.delivery-goal-alert { border-radius:10px; padding:9px 11px; font-size:.78rem; border:1px solid var(--line); background:#f8fafc; }
.delivery-goal-alert.ok { background:#f1fbf5; border-color:#bde5cc; color:#17643a; }
.delivery-goal-alert.warning { background:#fffbeb; border-color:#f7d58a; color:#875c00; }
.delivery-goal-alert.danger { background:#fff3f3; border-color:#f4c4c6; color:#9a272d; }
.delivery-goal-table-wrap { max-height:420px; overflow:auto; border:1px solid #e2eaf2; border-radius:10px; }
.delivery-goal-table { min-width:1180px; margin:0; }
.delivery-goal-table th { position:sticky; top:0; z-index:2; background:#f5f8fc; font-size:.66rem; text-transform:uppercase; letter-spacing:.025em; }
.delivery-goal-row td { vertical-align:middle; }
.delivery-goal-row td:nth-child(2) small,.delivery-goal-row td:nth-child(3) small { display:block; color:var(--muted); margin-top:2px; font-size:.62rem; }
.delivery-goal-row.danger { background:#fffafb; }
.delivery-goal-row.warning { background:#fffdf8; }
.delivery-rank-badge { display:inline-flex; width:24px; height:24px; border-radius:50%; align-items:center; justify-content:center; background:#e8eef5; font-weight:900; font-size:.72rem; }
.delivery-goal-progress { width:90px; max-width:100%; height:5px; background:#e5ebf1; border-radius:999px; overflow:hidden; margin-top:4px; }
.delivery-goal-progress span { display:block; height:100%; background:#2f7f5f; border-radius:inherit; }
.delivery-goal-status { display:inline-flex; border-radius:999px; padding:3px 7px; font-size:.63rem; font-weight:900; white-space:nowrap; }
.delivery-goal-status.success { background:#dff4e8; color:#16613a; }
.delivery-goal-status.warning { background:#fff0c7; color:#7b5600; }
.delivery-goal-status.danger { background:#fde1e2; color:#962c31; }
.delivery-goal-status.neutral { background:#e9eef4; color:#536577; }
.driver-goal-input { width:92px; min-width:80px; padding:6px 7px; }
.success-text { color:#19734a; }
@media(max-width:980px){ .delivery-goal-summary{grid-template-columns:repeat(3,1fr);} }
@media(max-width:680px){ .delivery-goal-head{display:grid;} .delivery-goal-summary{grid-template-columns:1fr 1fr;} }


/* V71.5 - Supervisor Operativo y alertas automaticas */
.delivery-supervisor-panel { margin-bottom:1rem; padding:14px; display:grid; gap:11px; border-left:4px solid #1f5f8f; }
.delivery-supervisor-head { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; }
.delivery-supervisor-head h4 { margin:2px 0 3px; font-size:1.05rem; }
.delivery-supervisor-head p { margin:0; max-width:780px; }
.delivery-supervisor-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.delivery-supervisor-actions > span { font-size:.68rem; white-space:nowrap; }
.delivery-supervisor-summary { display:grid; grid-template-columns:repeat(4,minmax(120px,1fr)); gap:7px; }
.delivery-supervisor-summary > div { border:1px solid var(--line); border-radius:10px; padding:8px 10px; background:#fbfdff; }
.delivery-supervisor-summary span { display:block; font-size:.65rem; text-transform:uppercase; letter-spacing:.035em; color:var(--muted); font-weight:900; }
.delivery-supervisor-summary strong { display:block; margin-top:2px; font-size:1.14rem; }
.delivery-supervisor-summary .danger { background:#fff3f3; border-color:#f4c4c6; }
.delivery-supervisor-summary .warning { background:#fffbeb; border-color:#f7d58a; }
.delivery-supervisor-summary .ok { background:#f1fbf5; border-color:#bde5cc; }
.delivery-supervisor-alert-list { display:grid; gap:7px; }
.delivery-supervisor-alert { display:grid; grid-template-columns:92px minmax(0,1fr) auto; gap:10px; align-items:center; border:1px solid var(--line); border-radius:10px; padding:9px 10px; background:#fff; }
.delivery-supervisor-alert.danger { border-color:#f1b9bc; background:#fff8f8; }
.delivery-supervisor-alert.warning { border-color:#efd28b; background:#fffdf5; }
.delivery-supervisor-alert.info { border-color:#cddded; background:#f9fcff; }
.delivery-supervisor-alert-severity { display:grid; gap:3px; align-content:center; }
.delivery-supervisor-alert-severity span { width:max-content; border-radius:999px; padding:3px 7px; font-size:.6rem; font-weight:950; letter-spacing:.035em; }
.delivery-supervisor-alert.danger .delivery-supervisor-alert-severity span { background:#fde1e2; color:#962c31; }
.delivery-supervisor-alert.warning .delivery-supervisor-alert-severity span { background:#fff0c7; color:#7b5600; }
.delivery-supervisor-alert.info .delivery-supervisor-alert-severity span { background:#e5f0fb; color:#245a86; }
.delivery-supervisor-alert-severity small { color:var(--muted); font-size:.62rem; }
.delivery-supervisor-alert-body { min-width:0; }
.delivery-supervisor-alert-body > strong { display:block; font-size:.83rem; }
.delivery-supervisor-alert-body p { margin:2px 0 3px; color:#465b70; font-size:.74rem; }
.delivery-supervisor-alert-body small { display:block; color:#65788b; font-size:.68rem; }
.delivery-supervisor-alert-action { display:flex; justify-content:flex-end; }
.delivery-supervisor-more { border:1px dashed #ccd9e5; border-radius:9px; padding:8px 10px; font-size:.72rem; color:#5a6e82; text-align:center; }
.delivery-supervisor-empty { border:1px solid #bde5cc; background:#f1fbf5; color:#17643a; border-radius:10px; padding:12px; display:grid; gap:2px; text-align:center; }
.delivery-supervisor-empty span { font-size:.72rem; }
@media(max-width:900px){ .delivery-supervisor-summary{grid-template-columns:1fr 1fr;} .delivery-supervisor-alert{grid-template-columns:82px minmax(0,1fr);} .delivery-supervisor-alert-action{grid-column:1/-1;justify-content:flex-start;} }
@media(max-width:680px){ .delivery-supervisor-head{display:grid;} .delivery-supervisor-actions{justify-content:flex-start;} .delivery-supervisor-summary{grid-template-columns:1fr 1fr;} }

/* V71.6 - Planeacion Inteligente del Dia */
.delivery-planning-panel { margin-bottom:1rem; padding:14px; display:grid; gap:11px; border-left:4px solid #2f7f5f; }
.delivery-planning-head { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; }
.delivery-planning-head h4 { margin:2px 0 3px; font-size:1.05rem; }
.delivery-planning-head p { margin:0; max-width:820px; }
.delivery-planning-actions { display:flex; align-items:flex-end; gap:7px; flex-wrap:wrap; justify-content:flex-end; }
.delivery-planning-actions label { display:grid; gap:3px; font-size:.64rem; text-transform:uppercase; letter-spacing:.03em; font-weight:900; color:var(--muted); }
.delivery-planning-actions input { min-width:142px; }
.delivery-planning-actions > span { font-size:.65rem; white-space:nowrap; align-self:center; }
.delivery-planning-summary { display:grid; grid-template-columns:repeat(6,minmax(112px,1fr)); gap:7px; }
.delivery-planning-summary > div { border:1px solid var(--line); border-radius:10px; padding:8px 10px; background:#fbfdff; }
.delivery-planning-summary span { display:block; font-size:.63rem; text-transform:uppercase; letter-spacing:.035em; color:var(--muted); font-weight:900; }
.delivery-planning-summary strong { display:block; margin-top:2px; font-size:1.08rem; }
.delivery-planning-summary .ok { background:#f1fbf5; border-color:#bde5cc; }
.delivery-planning-summary .warning { background:#fffbeb; border-color:#f7d58a; }
.delivery-planning-summary .danger { background:#fff3f3; border-color:#f4c4c6; }
.delivery-planning-risks { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.delivery-planning-risk { border:1px solid var(--line); border-radius:9px; padding:8px 10px; display:grid; gap:2px; background:#fbfdff; }
.delivery-planning-risk strong { font-size:.76rem; }
.delivery-planning-risk span { font-size:.68rem; color:#5d7083; }
.delivery-planning-risk.ok { background:#f1fbf5; border-color:#bde5cc; }
.delivery-planning-risk.warning { background:#fffbeb; border-color:#f7d58a; }
.delivery-planning-risk.danger { background:#fff3f3; border-color:#f4c4c6; }
.delivery-planning-risk.info { background:#f5f9fd; border-color:#ccdae8; }
.delivery-planning-grid { display:grid; grid-template-columns:1fr; gap:10px; }
.delivery-planning-block { border:1px solid #dfe8f1; border-radius:10px; overflow:hidden; background:#fff; }
.delivery-planning-block-head { display:flex; justify-content:space-between; gap:12px; padding:8px 10px; background:#f7fafd; border-bottom:1px solid #e1e9f1; }
.delivery-planning-block-head strong { font-size:.78rem; }
.delivery-planning-block-head span { font-size:.65rem; color:var(--muted); text-align:right; max-width:760px; }
.delivery-planning-table-wrap { max-height:360px; overflow:auto; }
.delivery-planning-table { min-width:1050px; margin:0; }
.delivery-planning-driver-table { min-width:1180px; }
.delivery-planning-table th { position:sticky; top:0; z-index:2; background:#f5f8fc; font-size:.63rem; text-transform:uppercase; letter-spacing:.025em; }
.delivery-planning-table td { vertical-align:middle; font-size:.72rem; }
.delivery-planning-table td small { display:block; margin-top:2px; color:var(--muted); font-size:.61rem; }
.delivery-planning-row.warning,.delivery-planning-driver.warning { background:#fffdf8; }
.delivery-planning-row.danger { background:#fff8f8; }
.delivery-planning-driver.off { opacity:.68; background:#f8fafc; }
@media(max-width:1100px){ .delivery-planning-summary{grid-template-columns:repeat(3,1fr);} .delivery-planning-risks{grid-template-columns:1fr;} }
@media(max-width:720px){ .delivery-planning-head{display:grid;} .delivery-planning-actions{justify-content:flex-start;} .delivery-planning-summary{grid-template-columns:1fr 1fr;} .delivery-planning-block-head{display:grid;} .delivery-planning-block-head span{text-align:left;} }


/* V71.7 - Programación Operativa / Planificado vs Real */
.delivery-programming-panel{display:grid;gap:10px;border-top:3px solid #314e6e;}
.delivery-programming-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;}
.delivery-programming-head h4{margin:2px 0 3px;font-size:1.05rem;}
.delivery-programming-head p{margin:0;max-width:830px;}
.delivery-programming-actions{display:flex;gap:6px;align-items:center;justify-content:flex-end;flex-wrap:wrap;}
.delivery-programming-status{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;font-size:.62rem;font-weight:900;letter-spacing:.035em;border:1px solid #cbd6e2;background:#f7fafc;color:#42566b;}
.delivery-programming-status.ok{background:#edf9f1;border-color:#b7dfc4;color:#21683b;}
.delivery-programming-status.warning{background:#fff8e8;border-color:#f2cf82;color:#865b0d;}
.delivery-programming-summary{display:grid;grid-template-columns:repeat(6,minmax(105px,1fr));gap:7px;}
.delivery-programming-summary>div{border:1px solid var(--line);border-radius:10px;padding:8px 10px;background:#fbfdff;}
.delivery-programming-summary span{display:block;font-size:.62rem;text-transform:uppercase;letter-spacing:.035em;color:var(--muted);font-weight:900;}
.delivery-programming-summary strong{display:block;margin-top:2px;font-size:1rem;}
.delivery-programming-summary .ok{background:#f1fbf5;border-color:#bde5cc;}.delivery-programming-summary .warning{background:#fffbeb;border-color:#f7d58a;}
.delivery-programming-notes{display:grid;gap:4px;}.delivery-programming-notes>span{font-size:.65rem;font-weight:900;text-transform:uppercase;color:var(--muted);}.delivery-programming-notes textarea{resize:vertical;min-height:54px;}
.delivery-programming-grid{display:grid;grid-template-columns:1fr;gap:10px;}.delivery-programming-block{border:1px solid #dfe8f1;border-radius:10px;overflow:hidden;background:#fff;}.delivery-programming-block-head{display:flex;justify-content:space-between;gap:12px;padding:8px 10px;background:#f7fafd;border-bottom:1px solid #e1e9f1;}.delivery-programming-block-head strong{font-size:.78rem;}.delivery-programming-block-head span{font-size:.65rem;color:var(--muted);text-align:right;}
.delivery-programming-table-wrap{max-height:340px;overflow:auto}.delivery-programming-table{min-width:960px;margin:0}.delivery-programming-table th{position:sticky;top:0;z-index:2;background:#f5f8fc;font-size:.62rem;text-transform:uppercase}.delivery-programming-table td{font-size:.71rem;vertical-align:middle}.delivery-programming-table tr.ok{background:#f7fcf9}.delivery-programming-table tr.warning{background:#fffdf7}
.delivery-programming-dialog{border:0;border-radius:14px;padding:0;max-width:760px;width:min(92vw,760px);box-shadow:0 24px 80px rgba(14,29,45,.28)}.delivery-programming-dialog::backdrop{background:rgba(15,25,35,.38)}.delivery-programming-dialog-shell{display:grid;gap:12px;padding:16px}.delivery-programming-dialog-head,.delivery-programming-dialog-foot{display:flex;justify-content:space-between;align-items:center;gap:10px}.delivery-programming-dialog-head h3{margin:2px 0}.delivery-programming-dialog-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.delivery-programming-dialog-grid label{border:1px solid var(--line);border-radius:9px;padding:8px;display:grid;gap:4px}.delivery-programming-dialog-grid label>span{font-weight:800}.delivery-programming-dialog-grid small{color:var(--muted)}
@media(max-width:1100px){.delivery-programming-summary{grid-template-columns:repeat(3,1fr)}}
@media(max-width:720px){.delivery-programming-head{display:grid}.delivery-programming-actions{justify-content:flex-start}.delivery-programming-summary{grid-template-columns:1fr 1fr}.delivery-programming-dialog-grid{grid-template-columns:1fr}.delivery-programming-block-head{display:grid}.delivery-programming-block-head span{text-align:left}}


/* V71.8 - Capacidad de Producción vs Demanda */
.delivery-production-capacity-panel{display:grid;gap:10px;border-top:3px solid #397a63;}
.delivery-production-capacity-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;}
.delivery-production-capacity-head h4{margin:2px 0 3px;font-size:1.05rem;}.delivery-production-capacity-head p{margin:0;max-width:850px;}
.delivery-production-capacity-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end;}
.delivery-production-capacity-summary{display:grid;grid-template-columns:repeat(8,minmax(95px,1fr));gap:7px;}
.delivery-production-capacity-summary>div{border:1px solid var(--line);border-radius:10px;padding:8px 9px;background:#fbfdfc;min-width:0;}
.delivery-production-capacity-summary span{display:block;font-size:.59rem;text-transform:uppercase;letter-spacing:.035em;color:var(--muted);font-weight:900;}
.delivery-production-capacity-summary strong{display:block;margin-top:2px;font-size:.94rem;overflow-wrap:anywhere;}
.delivery-production-capacity-summary .ok{background:#f0faf4;border-color:#b9e0c7}.delivery-production-capacity-summary .warning{background:#fffae9;border-color:#efd080}.delivery-production-capacity-summary .danger{background:#fff1f0;border-color:#efbbb7;}
.delivery-production-capacity-risks{display:grid;grid-template-columns:repeat(auto-fit,minmax(245px,1fr));gap:7px;}
.delivery-production-risk{display:grid;gap:2px;border:1px solid var(--line);border-left:4px solid #8ba0b5;border-radius:8px;padding:8px 10px;background:#fff;}.delivery-production-risk strong{font-size:.72rem}.delivery-production-risk span{font-size:.66rem;color:var(--muted);line-height:1.35}.delivery-production-risk.ok{border-left-color:#36a269;background:#f5fbf7}.delivery-production-risk.warning{border-left-color:#d69b22;background:#fffaf0}.delivery-production-risk.danger{border-left-color:#cc4e47;background:#fff5f4}.delivery-production-risk.info{border-left-color:#4e82b7;background:#f5f9fd}
.delivery-production-capacity-table-wrap{max-height:390px;overflow:auto;border:1px solid #dfe8e3;border-radius:10px;}.delivery-production-capacity-table{min-width:1250px;margin:0;}.delivery-production-capacity-table th{position:sticky;top:0;z-index:2;background:#f2f8f5;font-size:.59rem;text-transform:uppercase}.delivery-production-capacity-table td{font-size:.69rem;vertical-align:middle}.delivery-production-capacity-table td small{display:block;color:var(--muted);margin-top:2px}.delivery-production-row.ok{background:#fbfefc}.delivery-production-row.warning{background:#fffdf5}.delivery-production-row.danger{background:#fff8f7}.delivery-production-status{display:inline-flex;border:1px solid #c8d5cf;border-radius:999px;padding:4px 7px;font-weight:900;font-size:.59rem;white-space:nowrap}.delivery-production-status.ok{background:#edf9f2;color:#1f6840;border-color:#b6dfc5}.delivery-production-status.warning{background:#fff7df;color:#82590d;border-color:#edcc79}.delivery-production-status.danger{background:#fff0ee;color:#9b302a;border-color:#edbbb7}.delivery-production-status.info{background:#f1f6fb;color:#3c6388;border-color:#c9d8e6}
@media(max-width:1250px){.delivery-production-capacity-summary{grid-template-columns:repeat(4,1fr)}}
@media(max-width:720px){.delivery-production-capacity-head{display:grid}.delivery-production-capacity-actions{justify-content:flex-start}.delivery-production-capacity-summary{grid-template-columns:1fr 1fr}}


/* V72.0 - Limpieza y Rendimiento */
.delivery-plant-balance-panel{border:1px solid var(--border);background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(248,250,252,.98));}
.delivery-plant-balance-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px;}
.delivery-plant-balance-head h4{margin:3px 0 4px;font-size:18px;}
.delivery-plant-balance-head p{max-width:850px;margin:0;}
.delivery-plant-balance-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;}
.delivery-plant-balance-status{padding:6px 9px;border-radius:999px;font-size:11px;font-weight:800;letter-spacing:.04em;border:1px solid var(--border);background:#f8fafc;}
.delivery-plant-balance-status.ok{background:#ecfdf5;border-color:#a7f3d0;color:#065f46;}
.delivery-plant-balance-summary{display:grid;grid-template-columns:repeat(6,minmax(125px,1fr));gap:8px;margin-bottom:10px;}
.delivery-plant-balance-summary>div{padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:#fff;display:flex;flex-direction:column;gap:3px;}
.delivery-plant-balance-summary span{font-size:11px;color:var(--muted);}
.delivery-plant-balance-summary strong{font-size:17px;}
.delivery-plant-balance-summary .danger{border-color:#fecaca;background:#fff7f7;}
.delivery-plant-balance-summary .warning{border-color:#fde68a;background:#fffbeb;}
.delivery-plant-balance-summary .ok{border-color:#bbf7d0;background:#f0fdf4;}
.delivery-plant-balance-notice{display:flex;flex-direction:column;gap:3px;padding:9px 11px;border-radius:9px;margin-bottom:10px;font-size:12px;}
.delivery-plant-balance-notice.warning{background:#fffbeb;border:1px solid #fde68a;color:#854d0e;}
.delivery-plant-balance-notice.ok{background:#f0fdf4;border:1px solid #bbf7d0;color:#166534;}
.delivery-plant-balance-applied{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:8px 0 10px;font-size:12px;}
.delivery-plant-balance-applied>span{padding:5px 8px;border-radius:999px;background:#eef2ff;border:1px solid #c7d2fe;color:#3730a3;}
.delivery-plant-balance-table-wrap{max-height:360px;}
.delivery-plant-balance-table{min-width:1080px;}
.delivery-plant-balance-table td small{display:block;color:var(--muted);margin-top:2px;}
@media(max-width:1100px){.delivery-plant-balance-head{flex-direction:column}.delivery-plant-balance-actions{justify-content:flex-start}.delivery-plant-balance-summary{grid-template-columns:repeat(3,minmax(130px,1fr));}}
@media(max-width:700px){.delivery-plant-balance-summary{grid-template-columns:repeat(2,minmax(120px,1fr));}}

/* V72.1 - Carga progresiva */
.progressive-table-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 4px 4px;font-size:.78rem;color:var(--muted);}
.progressive-table-footer .mini-btn{flex:0 0 auto;}
@media(max-width:700px){.progressive-table-footer{align-items:flex-start;flex-direction:column;}}
