/* Central Taxingón · portal de operación. El logo y los colores son los oficiales. */
#screen.wide { max-width: none; }
.portal-loading { min-height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 18px; color: var(--muted); background: #fff; font-size: .875rem; }
.portal-loading img { width: 190px; height: auto; }
.view-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; }
.admin-shell { --portal-bg: #f7f7fc; --portal-line: #e1e3ef; --adm-pad: clamp(20px, 2.4vw, 40px); display: flex; height: 100%; width: 100%; overflow: hidden; }
.admin-shell .admin-main, .admin-shell.tab-panel .admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--portal-bg); }
.admin-shell .body { padding: 10px var(--adm-pad) 36px; overflow: auto; min-height: 0; overscroll-behavior: contain; scrollbar-gutter: stable; }
.admin-shell .admin-side { display: flex; flex-direction: column; flex: 0 0 228px; width: 228px; height: 100%; padding: 27px 14px 16px; background: var(--navy); color: #fff; border: 0; gap: 12px; overflow-y: auto; }
.admin-shell .as-brand { flex-direction: column; align-items: flex-start; gap: 11px; padding: 0 10px 20px; }
.admin-shell .as-logo { display: block; width: 100%; max-width: 186px; height: auto; }
.as-brand-caption { font-size: .61rem; letter-spacing: .19em; font-weight: 600; color: #fff; padding-left: 3px; }
.admin-shell .as-nav { display: flex; flex-direction: column; flex: 1; gap: 22px; overflow: visible; }
.as-group { display: flex; flex-direction: column; gap: 4px; }
.as-group-label { font-size: .62rem; text-transform: uppercase; letter-spacing: .12em; color: #cacaf0; padding: 0 13px 5px; font-weight: 600; }
.admin-shell .as-item { min-height: 43px; display: flex; align-items: center; gap: 12px; position: relative; width: 100%; padding: 10px 13px; border: 0; border-radius: 8px; font-size: .84rem; font-weight: 500; line-height: 1.3; background: transparent; color: #f7f7ff; cursor: pointer; text-align: left; }
.admin-shell .as-item:hover { background: #2525a4; color: #fff; }
.admin-shell .as-item.active { background: var(--accent); color: #fff; font-weight: 600; }
.admin-shell .as-item.active::before { content: ''; position: absolute; left: -3px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--brand); }
.admin-shell .as-ic { display: inline-flex; flex: 0 0 18px; align-items: center; justify-content: center; line-height: 0; }
.admin-shell .as-ic svg { width: 18px; height: 18px; }
.admin-shell .as-foot { border-top: 1px solid #4b4bb2; padding-top: 16px; margin-top: 10px; }
.admin-shell .as-user { display: flex; gap: 10px; align-items: center; width: 100%; border: 0; background: transparent; color: #fff; text-align: left; padding: 4px; cursor: pointer; }
.as-user-copy { flex: 1; min-width: 0; display: grid; gap: 3px; }
.admin-shell .as-av { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 9px; background: #fff; color: var(--navy); display: grid; place-items: center; font-size: .76rem; font-weight: 700; }
.admin-shell .as-name { color: #fff; font-size: .8rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.admin-shell .as-sub { color: #d1d1f0; font-size: .68rem; }
.admin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 65px; padding: 12px var(--adm-pad); border-bottom: 1px solid var(--portal-line); background: #fff; }
.admin-breadcrumb { display: flex; align-items: center; gap: 10px; font-size: .76rem; color: var(--muted); }
.admin-breadcrumb strong { color: var(--navy); font-weight: 600; }
.breadcrumb-separator { color: #b1b2c4; }
.admin-tools { display: flex; align-items: center; gap: 12px; }
.toolbar-button { border: 0; background: transparent; border-radius: 8px; min-height: 38px; padding: 8px 10px; cursor: pointer; color: var(--navy); font-size: .76rem; font-weight: 500; display: inline-flex; align-items: center; gap: 7px; }
.toolbar-button:hover { background: var(--lav); }
.account-button { border-left: 1px solid var(--portal-line); border-radius: 0; padding-left: 18px; }
.inbox-indicator { background: var(--brand); border-radius: 5px; padding: 2px 5px; font-size: .6rem; color: var(--navy); }
.inbox-indicator[hidden] { display: none; }
.admin-shell .admin-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px var(--adm-pad) 22px; }
.ah-eyebrow { color: var(--muted); font-size: .65rem; letter-spacing: .035em; display: block; margin-bottom: 6px; }
.admin-shell .ah-title { font-size: clamp(1.65rem, 2.25vw, 2.1rem); line-height: 1.18; font-weight: 700; letter-spacing: -.045em; color: var(--navy); }
.admin-shell .ah-title:focus { outline: none; }
.admin-shell .ah-sub { color: var(--muted); font-size: .8rem; margin-top: 7px; line-height: 1.5; }
.ah-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.admin-shell .ah-refresh { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--portal-line); background: #fff; color: var(--navy); cursor: pointer; }
.admin-shell .ah-refresh svg { width: 17px; height: 17px; }
.admin-shell .btn { font-size: .86rem; min-height: 42px; border-radius: 12px; box-shadow: none; }
.admin-shell .btn-sm { min-height: 36px; padding: 8px 12px; font-size: .76rem; }
.admin-shell .btn-primary, .admin-shell .btn-dark { color: #fff; background: var(--navy); }
.admin-shell .btn-primary:hover, .admin-shell .btn-dark:hover { background: #2323a4; }
.admin-shell .card { border: 1px solid var(--portal-line); box-shadow: none; border-radius: 14px; padding: 20px; }
.admin-shell .h2 { font-size: 1.08rem; color: var(--navy); font-weight: 650; }
.admin-shell .col { gap: 18px; }
.admin-shell .stats { gap: 14px; }
.admin-shell .stat { border: 1px solid var(--portal-line); box-shadow: none; border-radius: 12px; padding: 20px; background: #fff; }
.admin-shell .stat:hover { transform: none; box-shadow: none; }
.admin-shell .stat .v { color: var(--navy); font-size: 1.75rem; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.admin-shell .stat .k { color: var(--muted); font-size: .76rem; margin-top: 6px; }
.admin-shell .stat-ic { display: none; }
.admin-shell .table { font-size: .8rem; }
.admin-shell .table th { font-size: .7rem; text-transform: none; letter-spacing: 0; font-weight: 500; background: #f4f4fb; color: #525675; padding: 12px 14px; }
.admin-shell .table td { padding: 14px; line-height: 1.45; border-bottom: 1px solid #ececf4; }
.admin-shell .table tr:last-child td { border-bottom: 0; }
.admin-shell .table tbody tr:hover td { background: #f8f8fc; }
.admin-shell .table tbody tr:nth-child(even) td { background: #fafafe; }
.admin-shell .table tbody tr.sel td { background: #fffbe2; }
.admin-shell .table .num { font-variant-numeric: tabular-nums; }
.admin-shell .badge { font-size: .68rem; padding: 4px 8px; white-space: normal; }
.admin-shell .input { border: 1px solid #d7d9e6; border-radius: 10px; background: #fff; min-height: 42px; font-size: .86rem; }
.admin-shell .input::placeholder { color: #70738a; }
.admin-shell .chip { min-height: 34px; padding: 7px 13px; font-weight: 500; font-size: .72rem; border-radius: 8px; color: #525675; border: 1px solid transparent; background: #f1f1f8; }
.admin-shell .chip.sel { background: var(--lav); color: var(--navy); border-color: #cacbe8; }
.admin-shell .bars { gap: 8px; }
.admin-shell .bars .bar { background: var(--accent); border-radius: 4px 4px 0 0; }
.admin-shell .text-action, .text-action { display: inline-flex; align-items: center; min-height: 34px; border: 0; background: none; padding: 4px 0; color: var(--accent); font-size: .75rem; font-weight: 600; cursor: pointer; text-align: left; }
.text-action:hover { text-decoration: underline; text-underline-offset: 4px; }
.operation-view { display: flex; flex-direction: column; gap: 18px; }
.op-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.op-metric { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; background: #fff; border: 1px solid var(--portal-line); border-radius: 12px; min-width: 0; position: relative; }
.op-metric::before { content: ''; width: 23px; height: 3px; background: var(--lav); border-radius: 2px; }
.op-metric.attention::before { background: var(--brand); }
.op-metric.has-waiting { border-color: #e6d665; background: #fffef2; }
.op-metric-label { font-size: .875rem; color: #414466; font-weight: 500; }
.op-number { font-size: clamp(1.9rem, 2.5vw, 2.65rem); line-height: 1.05; letter-spacing: -.06em; color: var(--navy); font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.op-metric-note { font-size: .75rem; line-height: 1.4; color: var(--muted); }
.op-data-note { color: var(--muted); font-size: .65rem; line-height: 1.5; margin-top: -8px; }
.op-workspace { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(270px, 1fr); gap: 18px; }
.op-card { min-width: 0; padding: 18px; border: 1px solid var(--portal-line); border-radius: 14px; background: #fff; }
.op-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.op-card h2 { font-size: 1.02rem; line-height: 1.35; font-weight: 650; letter-spacing: -.025em; color: var(--navy); }
.op-map { height: 345px; border-radius: 10px; overflow: hidden; background: var(--lav); position: relative; z-index: 0; }
.op-map-foot { margin-top: 12px; font-size: .62rem; line-height: 1.6; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; color: var(--muted); }
.op-connection { color: var(--ok); }
.op-connection::before { content: ''; display: inline-block; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: currentColor; vertical-align: middle; }
.op-connection.is-stale { color: var(--danger); }
.op-map-unavailable { font-size: .85rem; line-height: 1.6; padding: 28px; color: var(--navy); }
.op-pending-list { display: flex; flex-direction: column; }
.op-pending-row { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 19px 0; background: transparent; border: 0; border-bottom: 1px solid var(--portal-line); cursor: pointer; }
.op-pending-row:hover { background: #fafafe; }
.op-pending-row:last-child { border-bottom: 0; }
.op-pending-count { flex: 0 0 32px; font-size: 1.8rem; line-height: 1; font-weight: 500; color: var(--navy); font-variant-numeric: tabular-nums; letter-spacing: -.05em; }
.op-pending-copy { display: grid; gap: 5px; flex: 1; min-width: 0; }
.op-pending-label { font-size: .875rem; font-weight: 600; color: #20233e; }
.op-pending-action { font-size: .75rem; color: var(--accent); }
.op-arrow { color: var(--accent); font-size: 1rem; }
.op-attention-note { padding: 12px; margin-top: 12px; border-radius: 7px; font-size: .65rem; background: #f5f5fc; color: #555975; }
.op-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.op-table-wrap { overflow-x: auto; border-radius: 8px; }
.op-table-wrap .table { width: 100%; }
.op-route { min-width: 150px; max-width: 360px; }
.op-route span { display: block; overflow-wrap: anywhere; }
.op-route .muted { font-size: .73rem; margin-top: 3px; }
.op-trip-id { font-variant-numeric: tabular-nums; color: var(--navy); font-weight: 600; }
.op-empty { padding: 35px 20px; border-top: 1px solid var(--portal-line); text-align: center; }
.op-empty strong { color: var(--navy); font-size: .88rem; }
.op-empty p { color: var(--muted); font-size: .76rem; margin-top: 7px; }
.inbox-list { max-height: 60vh; overflow: auto; margin-top: 20px; }
.inbox-message { padding: 16px 0; border-bottom: 1px solid var(--lav); font-size: .88rem; }
.inbox-message p { margin: 6px 0; }
.account-menu { display: flex; flex-direction: column; gap: 12px; }
.account-menu .btn { justify-content: flex-start; }
.admin-backdrop, .menu-toggle, .side-close { display: none; }
.admin-shell button:focus-visible, .admin-shell input:focus-visible, .admin-shell select:focus-visible, .admin-shell textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; box-shadow: none; }
.admin-shell .admin-side button:focus-visible { outline-color: var(--brand); }
.modal[hidden] { display: none !important; }

@media (min-width: 1700px) {
    .admin-shell .admin-side { flex-basis: 252px; width: 252px; padding-left: 22px; padding-right: 22px; }
    .op-map { height: 405px; }
}
@media (min-width: 981px) and (max-height: 1080px) {
    .admin-shell .admin-head { padding-top: 20px; padding-bottom: 18px; }
    .op-metric { padding: 15px 18px; gap: 8px; }
    .op-map { height: 280px; }
    .op-pending-row { padding: 14px 0; }
}
@media (max-width: 1180px) {
    .admin-shell .admin-side { flex-basis: 204px; width: 204px; padding-left: 10px; padding-right: 10px; }
    .op-workspace { grid-template-columns: minmax(0, 1.5fr) minmax(235px, 1fr); }
    .op-metrics { gap: 10px; }
    .op-metric { padding: 15px; }
    .op-pending-row { gap: 9px; }
    .op-card { padding: 15px; }
    .admin-shell .as-item { font-size: .8rem; }
}
@media (max-width: 980px) {
    .admin-shell { --adm-pad: 20px; }
    .admin-shell .admin-side { display: none; position: fixed; top: 0; bottom: 0; left: 0; height: 100dvh; width: 252px; padding: 24px 16px; z-index: 900; box-shadow: 8px 0 28px #0003; }
    .admin-shell.menu-open .admin-side { display: flex; }
    .admin-shell.menu-open .admin-backdrop { display: block; position: fixed; inset: 0; border: 0; background: #11133c80; z-index: 899; }
    .menu-toggle, .side-close { display: block; min-height: 40px; padding: 8px 12px; cursor: pointer; border: 1px solid var(--portal-line); border-radius: 8px; color: var(--navy); background: #fff; font-size: .75rem; font-weight: 600; }
    .side-close { color: #fff; background: transparent; border-color: #4b4bb2; margin-bottom: 10px; }
    .admin-shell .as-nav { gap: 16px; }
    .admin-shell .as-item { font-size: .88rem; }
    .admin-shell .admin-head { padding-top: 20px; }
    .admin-toolbar { min-height: 62px; }
}
@media (max-width: 720px) {
    .admin-shell { --adm-pad: 16px; }
    .op-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .op-workspace { grid-template-columns: 1fr; }
    .op-attention { order: -1; }
    .op-pending-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
    .op-pending-row { align-items: flex-start; padding: 15px 0; }
    .op-pending-count { font-size: 1.5rem; flex-basis: 24px; }
    .op-pending-label { font-size: .71rem; }
    .op-attention-note { margin-top: 6px; }
    .op-map { height: 320px; }
    .admin-shell .admin-head { flex-wrap: wrap; gap: 14px; }
    .admin-shell .ah-title { font-size: 1.65rem; }
    .admin-shell .ah-actions { width: 100%; justify-content: flex-end; }
    .admin-shell .ah-actions .btn { flex: 1; }
    .admin-breadcrumb > span, .admin-breadcrumb > strong { display: none; }
    .admin-tools { gap: 2px; }
    .toolbar-button { padding: 6px 8px; font-size: .71rem; }
    .account-button { max-width: 142px; text-align: right; padding-left: 10px; }
    .op-card-head { align-items: flex-start; }
    .op-card-head .text-action { font-size: .67rem; flex: 0 0 auto; }
    .admin-shell .stats.c3, .admin-shell .stats.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-shell .card .stats.c3, .admin-shell .card .stats.c2 { grid-template-columns: 1fr; }
    .admin-shell .row { flex-wrap: wrap; }
    .admin-shell .op-table-wrap .table td { padding: 10px 12px; }
    .op-route { max-width: none; }
}
@media (max-width: 400px) {
    .admin-shell { --adm-pad: 12px; }
    .op-metric { padding: 14px; }
    .op-number { font-size: 1.85rem; }
    .op-metric-note { font-size: .62rem; }
    .op-pending-list { grid-template-columns: 1fr; }
    .op-pending-row { align-items: center; }
    .op-pending-label { font-size: .8rem; }
    .op-card-head { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
    .admin-shell *, .admin-shell *::before { transition: none !important; animation: none !important; }
}
/* El proveedor de mapa no afecta al layout ni a los controles de despacho. */
.google-panel-canvas { width: 100%; height: 100%; }
.admin-shell .map-mini { flex-shrink: 0; }
.google-panel-notice { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 700; max-width: calc(100% - 32px); padding: 8px 12px; border-radius: 8px; background: #fff; color: #19213a; box-shadow: 0 2px 12px #19213a22; font: 500 12px/1.4 Inter, sans-serif; }
.google-panel-notice[hidden] { display: none; }
.google-panel-marker { position: absolute; transform: translate(-50%,-50%); display: grid; place-items: center; width: 32px; height: 32px; border: 0; padding: 0; background: transparent; cursor: pointer; }
.google-panel-marker .car-pin { display: grid; place-items: center; width: 32px; height: 32px; }
.google-panel-marker .pin-dot { display: block; }
.google-panel-marker:focus-visible { outline: 3px solid #1d4db8; outline-offset: 3px; border-radius: 8px; }
