/* SegurCarga — tema de la interfaz web.
   Los nombres de clase (.gac-*) y de variable (--gac-*) se conservan porque los referencian las vistas; sus valores
   salen de los tokens de marca (segurcarga-tokens.css). Aplicar la clase gac-theme al body del host. */
:root {
 --gac-navy:var(--sc-navy); --gac-primary:var(--sc-teal); --gac-primary-hover:var(--sc-teal-hover);
 --gac-background:var(--sc-canvas); --gac-surface:var(--sc-surface); --gac-text:var(--sc-ink);
 --gac-muted:var(--sc-muted-text); --gac-border:var(--sc-border); --gac-focus:var(--sc-teal);
 --gac-radius:var(--sc-radius-card); --gac-shadow:var(--sc-shadow-card);
}
body.gac-theme {font-family:var(--sc-font);font-size:1rem;line-height:1.5;background:var(--gac-background);color:var(--gac-text);}
.gac-theme .mud-typography {font-family:inherit;}

/* ── Cabecera ─────────────────────────────────────────────────────────────────────────────────── */
.gac-theme .gac-appbar {background:var(--sc-navy);color:#fff;box-shadow:none;border-bottom:1px solid rgb(255 255 255 / 8%);}
.gac-theme .gac-appbar-logo {display:block;height:34px;width:auto;}
.gac-theme .gac-appbar-symbol {display:none;height:32px;width:32px;}
.gac-theme .gac-appbar-section {margin-left:20px;padding-left:20px;border-left:1px solid rgb(255 255 255 / 24%);font-size:1rem;font-weight:600;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:34vw;}
.gac-theme .gac-appbar-user {margin-right:8px;font-size:.8125rem;color:#c9d8e3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px;}
.gac-theme .gac-appbar :is(button,a):focus-visible {outline-color:#fff;}
@media(max-width:900px){.gac-theme .gac-appbar-user{display:none;}}
@media(max-width:600px){.gac-theme .gac-appbar-logo{display:none;}.gac-theme .gac-appbar-symbol{display:block;}.gac-theme .gac-appbar-section{margin-left:8px;padding-left:12px;max-width:44vw;font-size:.9375rem;}}

/* ── Navegación lateral ───────────────────────────────────────────────────────────────────────── */
.gac-theme .gac-drawer {background:var(--sc-navy);color:#e9f0f6;border-right:0;}
.gac-theme .gac-drawer .mud-nav-link {color:inherit;border-radius:8px;margin:4px 8px;width:calc(100% - 16px);font-weight:500;}
.gac-theme .gac-drawer .mud-nav-link:hover {background:rgb(255 255 255 / 8%);}
.gac-theme .gac-drawer .mud-nav-link.active {background:var(--sc-navy-hover);color:#fff;box-shadow:inset 3px 0 0 var(--sc-amber);}
.gac-theme .gac-drawer .mud-nav-link :is(.mud-icon-root,.mud-nav-link-icon) {color:var(--sc-route-light);}

/* ── Superficies y tipografía ─────────────────────────────────────────────────────────────────── */
.gac-theme .gac-panel,.gac-theme .gac-order-card {border:1px solid var(--gac-border);border-radius:var(--gac-radius);background:var(--gac-surface);box-shadow:var(--gac-shadow);}
.gac-theme .gac-label {color:var(--gac-muted);font-size:.8125rem;font-weight:600;}
.gac-theme .gac-page {padding:24px;max-width:1600px;margin:auto;}
.gac-theme .gac-panel {padding:24px;width:100%;min-width:0;}
.gac-theme .gac-page > .mud-typography-h4 {font-size:1.625rem;letter-spacing:-.02em;line-height:1.25;}
.gac-theme .mud-input-label {font-size:.9375rem;}

/* ── Botones y foco ───────────────────────────────────────────────────────────────────────────── */
.gac-theme .gac-button {text-transform:none;letter-spacing:0;font-weight:600;border-radius:var(--sc-radius-control);min-height:44px;}
.gac-theme .gac-button-primary {background:var(--gac-primary);color:#fff;}
.gac-theme .gac-button-primary:hover {background:var(--gac-primary-hover);}
.gac-theme .gac-button-cta.mud-button-root {background:var(--sc-amber);color:var(--sc-navy);}
.gac-theme .gac-button-cta.mud-button-root:hover {background:#f6b45d;}
.gac-theme .gac-button:disabled {background:#e4eaf0;color:#566879;box-shadow:none;cursor:not-allowed;}
.gac-theme :is(button,a,input,select,textarea,[tabindex]):focus-visible {outline:3px solid var(--gac-focus);outline-offset:2px;}

/* ── Estados (chips con icono y texto: el estado nunca se comunica solo con el color) ─────────── */
.gac-theme .gac-status {--gac-status-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='6'/%3E%3C/svg%3E");display:inline-flex;align-items:center;gap:6px;padding:4px 12px 4px 10px;border-radius:999px;font-size:.8125rem;font-weight:650;line-height:1.4;white-space:nowrap;}
.gac-theme .gac-status::before {content:"";flex:none;width:14px;height:14px;background:currentColor;-webkit-mask:var(--gac-status-icon) center/contain no-repeat;mask:var(--gac-status-icon) center/contain no-repeat;}
.gac-theme .gac-status-pendiente {color:#855000;background:#fff3db;--gac-status-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm1 5h-2v6l5 3 1-1.7-4-2.3Z'/%3E%3C/svg%3E");}
.gac-theme .gac-status-aceptada {color:#1856a1;background:#eaf2ff;--gac-status-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-2 15-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8Z'/%3E%3C/svg%3E");}
.gac-theme .gac-status-rechazada {color:#b42332;background:#fdecef;--gac-status-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm5 13.6L15.6 17 12 13.4 8.4 17 7 15.6 10.6 12 7 8.4 8.4 7 12 10.6 15.6 7 17 8.4 13.4 12Z'/%3E%3C/svg%3E");}
.gac-theme .gac-status-preparado {color:#006b76;background:#dff5f4;--gac-status-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 3 7v10l9 5 9-5V7Zm0 2.2 6.5 3.6L12 11.4 5.5 7.8ZM5 9.5l6 3.3v6.5l-6-3.3Zm8 9.8v-6.5l6-3.3v6.5Z'/%3E%3C/svg%3E");}
.gac-theme .gac-status-recogido {color:#6241a5;background:#f0ebfa;--gac-status-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 8h-3V4H3a2 2 0 0 0-2 2v11h2a3 3 0 0 0 6 0h6a3 3 0 0 0 6 0h2v-5Zm-1 1.5 2 2.5h-4V9.5ZM6 18.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Zm12 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Z'/%3E%3C/svg%3E");}
.gac-theme .gac-status-finalizada {color:#176b46;background:#e7f5ec;--gac-status-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14.4 6 14 4H5v17h2v-7h5.6l.4 2h7V6Z'/%3E%3C/svg%3E");}

/* ── Estados de interfaz: vacío y carga con la misma presentación ──────────────────────── */
.gac-theme .gac-empty {text-align:center;padding:40px 20px;color:var(--gac-muted);}
.gac-theme .gac-empty img {width:112px;height:112px;}
.gac-theme .gac-loading-overlay {position:fixed;inset:0;z-index:1050;display:grid;place-items:center;background:rgb(18 48 71 / 38%);backdrop-filter:blur(1px);}
.gac-theme .gac-loading-card {display:flex;align-items:center;gap:14px;padding:16px 22px;border-radius:var(--gac-radius);background:var(--gac-surface);color:var(--gac-text);box-shadow:0 8px 28px rgb(18 48 71 / 22%);font-weight:600;}
.gac-theme .mud-alert {border-radius:var(--sc-radius-control);}

/* ── Tablas ───────────────────────────────────────────────────────────────────────────────────── */
.gac-theme .gac-table .mud-table-cell {padding:14px 16px;border-color:var(--sc-hairline);}
.gac-theme .gac-table .mud-table-head .mud-table-cell {background:#eef3f6;color:var(--gac-muted);font-size:.8125rem;font-weight:650;}
.gac-theme .gac-table .mud-table-body .mud-table-row:hover {background:var(--sc-teal-tint);}
.gac-theme .gac-table .mud-table-container {overflow-x:auto;}
/* En pantallas estrechas las filas pasan a tarjetas: cada celda con su etiqueta (data-label) en vez de una tabla comprimida. */
@media(max-width:640px){
 .gac-theme .gac-table .mud-table-container {overflow-x:visible;}
 .gac-theme .gac-table table {display:block;}
 .gac-theme .gac-table thead {display:none;}
 .gac-theme .gac-table tbody {display:block;}
 .gac-theme .gac-table tr.mud-table-row {display:block;margin:0 0 12px;border:1px solid var(--gac-border);border-radius:var(--gac-radius);background:var(--gac-surface);overflow:hidden;}
 .gac-theme .gac-table td.mud-table-cell {display:flex;justify-content:space-between;align-items:center;gap:16px;padding:10px 14px;text-align:right;border-bottom:1px solid var(--sc-hairline);}
 .gac-theme .gac-table td.mud-table-cell[data-label]::before {content:attr(data-label);flex:0 0 38%;text-align:left;font-size:.75rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--gac-muted);}
 .gac-theme .gac-table td.mud-table-cell:last-child {border-bottom:0;flex-wrap:wrap;justify-content:flex-start;gap:4px 8px;text-align:left;}
 .gac-theme .gac-table td.mud-table-cell:last-child[data-label]::before {flex:0 0 100%;}
}
.gac-theme .gac-filter-grid {display:grid;grid-template-columns:minmax(180px,1fr) minmax(260px,1.5fr) auto;gap:16px;align-items:end;}

/* ── Acceso: formulario centrado y sobrio, sin fondos fotográficos ────────────────────────────── */
.gac-theme .sc-auth {min-height:100dvh;display:grid;place-items:center;padding:32px 16px;background:var(--gac-background);}
.gac-theme .sc-auth__panel {width:min(440px,100%);}
.gac-theme .sc-auth__brand {display:block;height:48px;width:auto;margin:0 auto 24px;}
.gac-theme .sc-auth__brand--dark {display:none;}
.gac-theme .sc-auth__card {padding:32px;background:var(--gac-surface);border:1px solid var(--gac-border);border-radius:var(--gac-radius);box-shadow:var(--gac-shadow);}
.gac-theme .sc-auth__eyebrow {display:block;margin-bottom:4px;}
.gac-theme .sc-auth__title {margin:0 0 4px;font-size:1.5rem;font-weight:700;letter-spacing:-.02em;line-height:1.25;}
.gac-theme .sc-auth__intro {margin:0 0 24px;color:var(--gac-muted);}
.gac-theme .sc-auth__footer {margin-top:24px;text-align:center;font-size:.8125rem;color:var(--gac-muted);}
@media(max-width:480px){.gac-theme .sc-auth{padding:24px 12px;align-items:start;}.gac-theme .sc-auth__card{padding:24px 20px;}}
/* Apartado de descarga de la app móvil en el login. */
.gac-theme .gac-app-download {padding-top:20px;border-top:1px solid var(--gac-border);}

@media(prefers-reduced-motion:reduce){.gac-theme *, .gac-theme *::before,.gac-theme *::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;}}
@media(max-width:900px){.gac-theme .gac-filter-grid{grid-template-columns:1fr}.gac-theme .gac-page{padding:16px}.gac-theme .gac-panel{padding:16px}}

/* Transportistas compartidos entre gestores: fila resaltada en la tabla (ámbar claro + etiqueta de texto "Compartido"). */
.gac-theme .gac-row-shared td {background:#fff3d6 !important;}
.gac-theme .gac-row-shared:hover td {background:#ffe9b8 !important;}

/* ── Modo oscuro: se sincroniza con el isDarkMode EXISTENTE (data-gac-theme del body) ─────────── */
body.gac-theme[data-gac-theme="dark"] {--gac-background:#0c1b28;--gac-surface:#142a3b;--gac-text:#f1f5f8;--gac-muted:#aebfcd;--gac-border:#35506a;--gac-primary:#4dc3c8;--gac-primary-hover:#74d4d8;--gac-focus:#8fdde0;--sc-hairline:#223b50;--sc-teal-tint:#173246;}
.gac-theme[data-gac-theme="dark"] .gac-button-primary {color:#0c1b28;}
.gac-theme[data-gac-theme="dark"] .gac-button:disabled {background:#223b50;color:#aebfcd;}
.gac-theme[data-gac-theme="dark"] .gac-table .mud-table-head .mud-table-cell {background:#1b3346;color:#aebfcd;}
.gac-theme[data-gac-theme="dark"] .gac-table .mud-table-body .mud-table-row:hover {background:#173246;}
.gac-theme[data-gac-theme="dark"] .gac-table .mud-table-cell {border-color:#223b50;}
.gac-theme[data-gac-theme="dark"] .gac-status-pendiente {color:#f4cb82;background:#40321c;}
.gac-theme[data-gac-theme="dark"] .gac-status-aceptada {color:#a9cdff;background:#203552;}
.gac-theme[data-gac-theme="dark"] .gac-status-rechazada {color:#ffabb5;background:#452632;}
.gac-theme[data-gac-theme="dark"] .gac-status-preparado {color:#7de1df;background:#173d42;}
.gac-theme[data-gac-theme="dark"] .gac-status-recogido {color:#d3baff;background:#342947;}
.gac-theme[data-gac-theme="dark"] .gac-status-finalizada {color:#7dd9ae;background:#1d3b31;}
body.gac-theme[data-gac-theme="dark"] .gac-row-shared td {background:#3d3517 !important;}
body.gac-theme[data-gac-theme="dark"] .gac-row-shared:hover td {background:#4a3f1b !important;}
body.gac-theme[data-gac-theme="dark"] .sc-auth__brand--light {display:none;}
body.gac-theme[data-gac-theme="dark"] .sc-auth__brand--dark {display:block;}
