:root { --soft: #f4f7fa; --ink: #1f2933; --line: #d7dde3; }
body { background: linear-gradient(180deg, #f7fafc 0, var(--soft) 280px); color: var(--ink); }
.card { border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.metric { min-height: 112px; }
.metric .value { font-size: 1.8rem; font-weight: 700; }
.metric-icon { font-size: 1.35rem; color: #2f5f89; }
.table-responsive { background: #fff; border-radius: 8px; border: 1px solid var(--line); }
.scan-input { font-size: 1.35rem; min-height: 54px; }
.btn-touch { min-height: 46px; }
.status-pill { padding: .25rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.status-aperturada { background: #e7f0ff; color: #194b8f; }
.status-en-proceso { background: #fff4ce; color: #755600; }
.status-cerrada { background: #dff7e8; color: #1f6b3a; }
.status-observada { background: #fde2e1; color: #9b1c1c; }
.status-despachado { background: #d7f5e5; color: #146c43; }
.uull-dispatched-row > * { background: #eefbf3 !important; }
.uull-dispatched-row:hover > * { background: #def7e8 !important; }
.uull-filter-row th { background: #f8fafc; padding: .35rem .45rem; }
.report-pick-list { max-height: 310px; overflow: auto; }
.report-pick-list-wide { max-height: 420px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; align-content: start; }
.report-option { display: flex; gap: .55rem; align-items: flex-start; padding: .45rem .35rem; border-bottom: 1px solid #dbe3ea; font-size: .9rem; }
.report-pick-list-wide .report-option { border: 1px solid #dbe3ea; border-radius: 7px; background: #fff; min-height: 62px; }
.report-option:last-child { border-bottom: 0; }
.report-option.is-dispatched { background: #eefbf3; border-radius: 6px; }
@media (max-width: 768px) {
  main { padding-left: .75rem !important; padding-right: .75rem !important; }
  .table { font-size: .86rem; }
  .btn { white-space: normal; }
  .report-pick-list-wide { grid-template-columns: 1fr; }
}
@media (min-width: 769px) and (max-width: 1300px) {
  .report-pick-list-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.dispatch-dashboard { --navy: #0f355b; --blue: #2f6f9f; --sky: #eaf4fb; --muted: #64748b; --green: #1f9d55; --orange: #f59e0b; --red: #dc2626; max-width: 1880px; margin: 0 auto; }
.dash-hero { background: #123f67; color: #fff; border-radius: 10px; padding: 12px 16px; display: flex; justify-content: space-between; gap: 14px; align-items: center; box-shadow: 0 8px 18px rgba(17, 54, 92, .16); margin-bottom: 10px; border: 1px solid rgba(255,255,255,.12); }
.dash-hero h1 { margin: 0; font-size: 1.45rem; font-weight: 850; letter-spacing: 0; }
.dash-hero-meta { display: grid; justify-items: end; gap: 2px; text-align: right; font-size: .78rem; color: #d8ecfb; min-width: min(520px, 45vw); }
.dash-hero-meta strong { color: #fff; }
.dash-actions { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.dash-kpis { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 8px; margin-bottom: 10px; }
.dash-kpi { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 11px; min-height: 116px; box-shadow: 0 6px 16px rgba(15, 23, 42, .045); position: relative; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.dash-kpi:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(15, 23, 42, .08); }
.dash-kpi::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--blue); }
.dash-kpi.good::before { background: var(--green); }
.dash-kpi.warn::before { background: var(--orange); }
.dash-kpi.bad::before { background: var(--red); }
.dash-kpi-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--sky); color: var(--blue); font-size: 1.05rem; margin-bottom: 8px; box-shadow: inset 0 0 0 1px rgba(47,111,159,.08); }
.dash-kpi.good .dash-kpi-icon { background: #e8f7ee; color: var(--green); }
.dash-kpi.warn .dash-kpi-icon { background: #fff7e6; color: var(--orange); }
.dash-kpi-title { color: #486178; font-size: .75rem; font-weight: 850; text-transform: uppercase; line-height: 1.2; }
.dash-kpi-value { color: #0f172a; font-weight: 900; font-size: 1.7rem; line-height: 1.05; margin-top: 6px; }
.dash-mini-bar { height: 6px; background: #edf2f7; border-radius: 99px; overflow: hidden; margin-top: 8px; }
.dash-mini-bar span { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.dash-kpi.good .dash-mini-bar span { background: var(--green); }
.dash-kpi.warn .dash-mini-bar span { background: var(--orange); }
.dash-card { background: #fff; border: 1px solid #e0e8f1; border-radius: 10px; box-shadow: 0 6px 16px rgba(15, 23, 42, .04); padding: 11px; min-width: 0; }
.dash-card.primary { margin-bottom: 10px; }
.dash-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: start; margin-bottom: 8px; padding-bottom: 7px; border-bottom: 1px solid #eef3f8; }
.dash-card h2 { font-size: .9rem; color: #12385f; font-weight: 850; margin: 0; display: inline-flex; gap: 7px; align-items: center; text-transform: uppercase; }
.dash-card h2 i { color: var(--blue); }
.dash-card p { color: var(--muted); margin: 3px 0 0; font-size: .86rem; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; }
.dash-grid.lower { align-items: stretch; }
.dash-grid.one { grid-template-columns: 1fr; }
.dash-grid > .dash-card { height: 100%; }
.dash-main-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: stretch; }
.dash-stack { display: grid; gap: 10px; align-content: start; }
.dash-zone-card { min-height: 100%; }
.dash-table-wrap { border: 0; border-radius: 10px; background: transparent; }
.dash-table { font-size: .85rem; border-collapse: separate; border-spacing: 0; }
.dash-table thead th { background: #eef6fc; color: #12385f; border-bottom: 1px solid #d8e7f2; font-size: .72rem; text-transform: uppercase; letter-spacing: .025em; vertical-align: middle; padding-top: 7px; padding-bottom: 7px; }
.dash-table thead th:first-child { border-top-left-radius: 9px; }
.dash-table thead th:last-child { border-top-right-radius: 9px; }
.dash-table tbody td { border-color: #edf2f7; vertical-align: middle; padding-top: 6px; padding-bottom: 6px; }
.dash-table tbody tr:nth-child(even) td { background: #fbfdff; }
.dash-table tbody tr:hover td { background: #f3f8fc; }
.dash-table.compact { font-size: .8rem; }
.dash-table .num { text-align: center; font-weight: 700; }
.dash-table .danger { color: var(--red); font-weight: 850; }
.dash-badge { display: inline-flex; align-items: center; justify-content: center; min-height: 24px; padding: 3px 9px; border-radius: 999px; font-size: .73rem; font-weight: 850; white-space: nowrap; }
.dash-badge.blue { background: #e6f2fb; color: #19577f; }
.dash-badge.gray { background: #eef2f7; color: #334155; }
.dash-progress { position: relative; height: 22px; min-width: 112px; background: #edf2f7; border-radius: 999px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(15,23,42,.03); }
.dash-progress span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--blue); }
.dash-progress.good span { background: var(--green); }
.dash-progress.warn span { background: var(--orange); }
.dash-progress.bad span { background: var(--red); }
.dash-progress strong { position: relative; z-index: 1; display: grid; place-items: center; height: 100%; color: #0f172a; font-size: .74rem; }
.gre-control { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 12px; align-items: stretch; min-height: 150px; }
.gre-control.stacked { grid-template-columns: 300px minmax(0, 1fr); gap: 12px; }
.gre-summary { display: grid; grid-template-columns: 104px 1fr; gap: 14px; align-items: center; padding: 10px; border: 1px solid #edf2f7; border-radius: 10px; background: #fbfdff; min-height: 142px; }
.gre-ring-svg { width: 104px; height: 104px; position: relative; display: grid; place-items: center; }
.gre-ring-svg svg { width: 104px; height: 104px; transform: rotate(-90deg); }
.gre-ring-svg circle { fill: none; stroke-width: 14; stroke-linecap: round; }
.gre-ring-svg .track { stroke: #e5eaf0; }
.gre-ring-svg .value { stroke: var(--green); }
.gre-ring-svg span { position: absolute; font-weight: 850; color: #0f172a; font-size: 1.22rem; }
.gre-main { color: #12385f; font-weight: 850; font-size: 1.1rem; margin-bottom: 4px; }
.gre-carriers { min-width: 0; align-self: stretch; }
.gre-carriers .dash-table-wrap { height: 100%; }
.gre-carriers .dash-table.compact { font-size: .76rem; }
.gre-carriers .dash-table thead th { position: sticky; top: 0; z-index: 1; }
@media (max-width: 1400px) { .dash-kpis { grid-template-columns: repeat(4, minmax(170px, 1fr)); } }
@media (max-width: 992px) { .dash-kpis, .dash-grid, .dash-main-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-hero { align-items: flex-start; flex-direction: column; } .dash-hero-meta { text-align: left; justify-items: start; min-width: 0; } }
@media (max-width: 900px) { .gre-control, .gre-control.stacked, .gre-summary { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .dash-kpis, .dash-grid, .dash-main-grid { grid-template-columns: 1fr; } .dash-hero { padding: 18px; } .dash-hero h1 { font-size: 1.45rem; } }

.ops-report { background: #f4f6f9; border: 1px solid #d1d9e3; padding: 10px; max-width: 1460px; margin: 0 auto; }
.ops-title { background: #123456; color: #fff; text-align: center; font-weight: 800; letter-spacing: .5px; font-size: 1.75rem; padding: 7px 10px; }
.ops-metrics { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 7px; margin: 6px 0 10px; }
.ops-card { background: #fff; border: 1px solid #1f3348; min-height: 104px; padding: 7px 8px; box-shadow: 1px 2px 4px rgba(0,0,0,.25); }
.ops-card-head { display: grid; grid-template-columns: 42px 1fr; gap: 7px; align-items: start; color: #05090d; font-weight: 800; font-size: .94rem; line-height: 1.18; }
.ops-card strong { display: block; text-align: center; color: #000; font-size: 2rem; line-height: 1; margin-top: 15px; }
.ops-icon { width: 38px; height: 38px; display: inline-block; background: #111; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.ops-icon-clipboard { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='4' y='3' width='16' height='18' rx='2'/%3E%3Cpath d='M9 3h6v4H9zM8 11h8M8 15h8M8 19h5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='4' y='3' width='16' height='18' rx='2'/%3E%3Cpath d='M9 3h6v4H9zM8 11h8M8 15h8M8 19h5'/%3E%3C/svg%3E"); }
.ops-icon-docs { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M7 7V3h10l4 4v12H7z'/%3E%3Cpath d='M17 3v5h5M3 8h4v13h11v-2M10 12h8M10 16h8'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M7 7V3h10l4 4v12H7z'/%3E%3Cpath d='M17 3v5h5M3 8h4v13h11v-2M10 12h8M10 16h8'/%3E%3C/svg%3E"); }
.ops-icon-boxcheck { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='m3 7 9-4 9 4-9 4zM3 7v10l9 4 9-4V7M12 11v10M7 4l10 5'/%3E%3Cpath d='m8 15 2 2 5-6'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='m3 7 9-4 9 4-9 4zM3 7v10l9 4 9-4V7M12 11v10M7 4l10 5'/%3E%3Cpath d='m8 15 2 2 5-6'/%3E%3C/svg%3E"); }
.ops-icon-box { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='m3 7 9-4 9 4-9 4zM3 7v10l9 4 9-4V7M12 11v10'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='m3 7 9-4 9 4-9 4zM3 7v10l9 4 9-4V7M12 11v10'/%3E%3C/svg%3E"); }
.ops-icon-dispatch { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M3 7h11v10H3zM14 11h3l3 3v3h-6zM6 19a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM18 19a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM7 7V4h4v3'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M3 7h11v10H3zM14 11h3l3 3v3h-6zM6 19a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM18 19a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM7 7V4h4v3'/%3E%3C/svg%3E"); }
.ops-icon-bar { background: linear-gradient(90deg, #ffcc2e 0 20%, #e8edf2 20%); width: 100%; height: 11px; -webkit-mask-image: none; mask-image: none; margin-top: 22px; }
.ops-panel { min-width: 0; }
.ops-panel.full { margin-bottom: 12px; }
.ops-section-title { background: #33658f; color: #fff; text-align: center; font-weight: 800; padding: 4px 8px; font-size: .92rem; }
.ops-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 20px; align-items: start; }
.ops-lower { display: grid; grid-template-columns: .95fr 1fr; gap: 28px; margin-top: 8px; }
.ops-table-wrap { border: 0; border-radius: 0; background: transparent; }
.ops-table { border-collapse: separate; border-spacing: 0; table-layout: fixed; width: 100%; font-size: .88rem; }
.ops-table th, .ops-table td { border: 1px solid #d5dde7; text-align: center; vertical-align: middle; padding: 7px 5px; background: #f1f3f7; color: #02070d; }
.ops-table thead th { background: #33658f; color: #fff; font-weight: 800; }
.ops-table tbody tr:nth-child(even) th, .ops-table tbody tr:nth-child(even) td { background: #eaf0f6; }
.ops-table tbody th { font-weight: 800; }
.ops-table.compact { font-size: .72rem; }
.ops-table.compact th, .ops-table.compact td { padding: 5px 4px; }
.ops-table .pending { color: #e00013; font-weight: 800; }
.ops-table tr.empty td { height: 27px; color: transparent; }
.gre-monitor { display: grid; grid-template-columns: 160px 1fr; align-items: center; gap: 20px; background: #f4f6f9; padding: 16px 18px; min-height: 188px; }
.donut { width: 145px; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(#33658f calc(var(--p) * 1%), #d4d4d4 0); display: grid; place-items: center; position: relative; }
.donut::after { content: ""; position: absolute; inset: 17px; background: #f4f6f9; border-radius: 50%; box-shadow: inset 0 0 0 1px #e2e7ef; }
.donut span { position: relative; z-index: 1; font-weight: 800; font-size: 1.65rem; color: #000; }
.gre-legend { font-weight: 800; font-size: .84rem; }
.dot { width: 22px; height: 22px; display: inline-block; border-radius: 50%; margin-right: 10px; vertical-align: middle; }
.dot.green { background: #00bf13; }
.dot.red { background: #f00014; }
@media (max-width: 1200px) {
  .ops-metrics { grid-template-columns: repeat(3, minmax(170px, 1fr)); }
  .ops-grid, .ops-lower { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 700px) {
  .ops-title { font-size: 1.25rem; }
  .ops-metrics { grid-template-columns: 1fr; }
  .gre-monitor { grid-template-columns: 1fr; justify-items: center; }
}
