@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap");
:root {
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    color: #0f172a;
    background: #f8fafc;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: #f8fafc;
}
.font-display {
    font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
}
.font-mono-code {
    font-family: "JetBrains Mono", monospace;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
.app {
    min-height: 100vh;
    display: flex;
}
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 274px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    box-shadow: 8px 0 30px rgba(15, 23, 42, 0.04);
}
.brand {
    height: 76px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid #f1f5f9;
}
.brandmark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: linear-gradient(45deg, #059669, #14b8a6);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 21px;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
}
.brandtext {
    margin-left: 11px;
}
.brandname {
    font-family: "Space Grotesk";
    font-size: 19px;
    font-weight: 800;
}
.brandname span {
    color: #059669;
}
.version {
    font-size: 9px;
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 2px 5px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
}
.tagline {
    font-size: 9px;
    color: #64748b;
    margin-top: 2px;
}
.nav {
    flex: 1;
    padding: 14px 12px;
    overflow: auto;
    min-height: 0;
}
.nav-title {
    font-size: 9px;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 8px 10px;
}
.nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 11px;
    margin: 3px 0;
    border-radius: 9px;
    text-decoration: none;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
}
.nav a:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.nav a.active {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #bbf7d0;
}
.ico {
    width: 19px;
    text-align: center;
    font-size: 15px;
}
.badge {
    margin-left: auto;
    background: #f43f5e;
    color: #fff;
    border-radius: 999px;
    padding: 2px 6px;
    font-size: 9px;
    font-family: monospace;
}
.sidebar-foot {
    margin-top: auto;
    padding: 14px;
    border-top: 1px solid #f1f5f9;
}
.rolebox {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    padding: 11px;
}
.rolebox small {
    color: #94a3b8;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}
.rolebox strong {
    display: block;
    font-size: 12px;
    margin-top: 4px;
    color: #0f172a;
    word-break: break-all;
}
.logout-form {
    margin-top: 10px;
}
.logout-btn {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 10px 11px;
    margin: 0;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
}
.logout-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.content {
    margin-left: 274px;
    min-width: 0;
    width: calc(100% - 274px);
}
.topbar {
    height: 66px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 30;
}
.crumb {
    font-size: 11px;
    color: #64748b;
}
.live {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    font-weight: 700;
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    padding: 6px 9px;
    border-radius: 999px;
}
.dot {
    width: 7px;
    height: 7px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 4px #d1fae5;
}
.page {
    max-width: 1280px;
    margin: auto;
    padding: 28px;
}
.hero-dark {
    background: linear-gradient(135deg, #0f172a, #172554 55%, #064e3b);
    color: white;
    border-radius: 24px;
    padding: 42px;
    position: relative;
    overflow: hidden;
}
.hero-dark:after {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    border: 1px solid rgba(52, 211, 153, 0.15);
    border-radius: 50%;
    right: -80px;
    top: -100px;
    box-shadow:
            0 0 0 55px rgba(52, 211, 153, 0.03),
            0 0 0 110px rgba(52, 211, 153, 0.025);
}
.eyebrow {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #34d399;
}
.h1 {
    font-family: "Space Grotesk";
    font-size: 38px;
    line-height: 1.08;
    font-weight: 800;
    margin: 8px 0 12px;
}
.lead {
    color: #cbd5e1;
    line-height: 1.7;
    font-size: 14px;
    max-width: 700px;
}
.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 24px;
}
.btn {
    border: 0;
    border-radius: 10px;
    padding: 10px 15px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.btn-green {
    background: #10b981;
    color: #fff;
}
.btn-white {
    background: #fff;
    color: #0f172a;
}
.btn-outline {
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #334155;
}
.section {
    margin-top: 24px;
}
.section-title {
    font-family: "Space Grotesk";
    font-size: 20px;
    font-weight: 800;
    margin: 0;
}
.section-sub {
    font-size: 11px;
    color: #64748b;
    margin: 5px 0 0;
}
.grid {
    display: grid;
    gap: 14px;
}
.grid4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.grid3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.035);
    padding: 24px;
}
.pad {
    padding: 18px;
}
.kpi .label {
    font-size: 10px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.kpi .value {
    font-family: "Space Grotesk";
    font-size: 26px;
    font-weight: 800;
    margin-top: 8px;
}
.kpi .trend {
    font-size: 10px;
    font-weight: 700;
    color: #059669;
    margin-top: 5px;
}
.map {
    min-height: 300px;
    border-radius: 15px;
    background:
            radial-gradient(
                    circle at 20% 30%,
                    rgba(16, 185, 129, 0.16),
                    transparent 25%
            ),
            linear-gradient(135deg, #0f172a, #1e293b);
    position: relative;
    overflow: hidden;
}
.map:before {
    content: "MAPA SATELITAL DE OPERACIONES";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #64748b;
    font: 700 11px "JetBrains Mono";
    letter-spacing: 0.12em;
}
.pin {
    position: absolute;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #10b981;
    border: 3px solid #fff;
    box-shadow: 0 0 0 7px rgba(16, 185, 129, 0.2);
}
.pin.red {
    background: #f43f5e;
    box-shadow: 0 0 0 7px rgba(244, 63, 94, 0.2);
}
.fleet-map__canvas {
    width: 100%;
    height: 320px;
    border-radius: 15px;
    overflow: hidden;
    z-index: 0;
}
.fleet-map__reset {
    margin-top: 10px;
    padding: 7px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-size: 12px;
    cursor: pointer;
}
.fleet-map__popup-action {
    display: block;
    margin-top: 8px;
    padding: 5px 8px;
    border: 0;
    border-radius: 6px;
    background: #059669;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
}
.fleet-map__attribution {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 11px;
}
.fleet-map__attribution a {
    color: #047857;
}
.fleet-map__message {
    margin: 10px 0 0;
    color: #64748b;
    font-size: 12px;
}
.table-wrap {
    overflow: auto;
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}
.table th {
    text-align: left;
    color: #64748b;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: #f8fafc;
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
}
.table td {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
}
.pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
}
.green {
    background: #ecfdf5;
    color: #047857;
}
.amber {
    background: #fffbeb;
    color: #b45309;
}
.rose {
    background: #fff1f2;
    color: #be123c;
}
.sky {
    background: #eff6ff;
    color: #0369a1;
}
.slate {
    background: #f1f5f9;
    color: #475569;
}
.dark-panel {
    background: #0f172a;
    color: white;
    border-radius: 18px;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}
.field label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: #334155;
    margin-bottom: 5px;
}
.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 10px 11px;
    border: 1px solid #94a3b8;
    border-radius: 10px;
    background: #fff;
    color: #000;
    font: 500 11px "Plus Jakarta Sans";

}
.field textarea {
    min-height: 90px;
    resize: vertical;
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
    border-color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12);
}
.full {
    grid-column: 1/-1;
}
.modalish {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 20px;
}
.statline {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 11px;
}
.timeline {
    border-left: 2px solid #d1fae5;
    margin-left: 8px;
    padding-left: 18px;
}
.stop {
    position: relative;
    padding: 10px 0;
}
.stop:before {
    content: "";
    position: absolute;
    left: -25px;
    top: 15px;
    width: 10px;
    height: 10px;
    background: #10b981;
    border: 3px solid #ecfdf5;
    border-radius: 50%;
}
.progress {
    height: 9px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
}
.progress > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #10b981, #14b8a6);
    border-radius: inherit;
}
.footer {
    padding: 25px 28px;
    color: #94a3b8;
    font-size: 10px;
    text-align: center;
}
.notice {
    padding: 11px 13px;
    border-radius: 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 10px;
}
.mission {
    border: 1px solid #a7f3d0;
    background: linear-gradient(135deg, #ecfdf5, #fff);
    border-radius: 18px;
    padding: 20px;
}
.badge-card {
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    text-align: center;
}
.muted {
    color: #64748b;
}
.center {
    text-align: center;
}
.right {
    text-align: right;
}
@media (max-width: 1100px) {
    .sidebar {
        width: 230px;
    }
    .content {
        margin-left: 230px;
        width: calc(100% - 230px);
    }
    .grid4 {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 760px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        max-height: none;
    }
    .app {
        display: block;
    }
    .content {
        margin-left: 0;
        width: 100%;
    }
    .nav {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
    .brand {
        height: 68px;
    }
    .topbar {
        position: relative;
    }
    .page {
        padding: 18px;
    }
    .grid3,
    .grid2,
    .grid4,
    .form-grid {
        grid-template-columns: 1fr;
    }
    .hero-dark {
        padding: 26px;
    }
    .h1 {
        font-size: 30px;
    }
}
input,
select,
textarea {
    background: #f8fafc;
    color: #0f172a;
    border: 1px solid #94a3b8;
}
input::placeholder,
textarea::placeholder {
    color: #94a3b8;
}
input:focus,
select:focus,
textarea:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

/* ---- Flujo 3: recepción de lote ---- */
.lote-fila {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 14px;
    background: #f8fafc;
}
.lote-fila-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: #0f172a;
}
.lote-quitar {
    padding: 3px 10px;
    font-size: 11px;
    color: #b91c1c;
    border-color: #fecaca;
}
.lote-resultado {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #a7f3d0;
    background: #ecfdf5;
    font-size: 13px;
    color: #065f46;
}
.lote-resultado ul {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 6px;
}
.lote-resultado li {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---- Paginación ---- */
.paginacion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    font-size: 12px;
    color: #64748b;
    flex-wrap: wrap;
}
.paginacion-links {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.paginacion-links a,
.paginacion-links span {
    min-width: 30px;
    padding: 5px 9px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
}
.paginacion-links a:hover {
    border-color: #059669;
    color: #059669;
}
.paginacion-links .actual {
    background: #059669;
    border-color: #059669;
    color: #fff;
}
.paginacion-links .deshabilitado {
    color: #cbd5e1;
}

/* ---- Avisos de funcionamiento degradado ---- */
.aviso-degradado {
    margin: 12px 0;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #92400e;
    font-size: 12px;
}

/* =====================================================================
   Identidad visual DonaTrack (logo y banner: teal sobre verde oscuro)
   Esta capa va al final para pisar los estilos base sin tocarlos.
   ===================================================================== */
:root {
    --dt-900: #062e2c;
    --dt-800: #0b3b3a;
    --dt-700: #135e58;
    --dt-600: #1f7a74;
    --dt-500: #2a9d8f;
    --dt-300: #7dd3c7;
    --dt-100: #d7f0ec;
    --dt-50: #effaf8;
    --dt-ring: 0 0 0 3px rgba(42, 157, 143, 0.25);
}

/* ---- Marca en el sidebar ---- */
.brandmark {
    background: none;
    box-shadow: 0 8px 20px rgba(31, 122, 116, 0.25);
    border-radius: 50%;
    overflow: hidden;
    font-size: 0;
}
.brandmark img {
    width: 100%;
    height: 100%;
    display: block;
}
.brandname span {
    color: var(--dt-600);
}
.version {
    background: var(--dt-100);
    color: var(--dt-700);
    border-color: var(--dt-300);
}
.nav a {
    transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.nav a:hover {
    transform: translateX(2px);
}
.nav a.active {
    background: var(--dt-50);
    color: var(--dt-700);
    border: 1px solid var(--dt-100);
    box-shadow: inset 3px 0 0 var(--dt-500);
}

/* ---- Botones ---- */
.btn {
    transition: transform .12s ease, box-shadow .15s ease, background-color .15s ease, opacity .15s ease;
}
.btn:hover {
    transform: translateY(-1px);
}
.btn:active {
    transform: translateY(0);
}
.btn:focus-visible,
.field input:focus-visible,
.field select:focus-visible {
    outline: none;
    box-shadow: var(--dt-ring);
}
.btn-green {
    background: var(--dt-600);
    box-shadow: 0 6px 16px rgba(31, 122, 116, 0.22);
}
.btn-green:hover {
    background: var(--dt-700);
}
.btn[disabled],
.btn.cargando {
    opacity: .65;
    pointer-events: none;
}

/* ---- Hero con el banner "Cada ayuda deja huella" ---- */
.hero-dark {
    background: linear-gradient(135deg, var(--dt-900), var(--dt-800) 55%, var(--dt-700));
}
.eyebrow {
    color: var(--dt-300);
}
.acento-marca {
    color: var(--dt-300);
}

/* ---- Tarjetas y KPIs ---- */
.card {
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card.kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
    border-color: var(--dt-100);
}
.kpi .trend {
    color: var(--dt-600);
}

/* ---- Tablas ---- */
.table-wrap {
    border-radius: 12px;
}
.table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}
.table tbody tr {
    transition: background-color .12s ease;
}
.table tbody tr:nth-child(even) td {
    background: #fcfdfd;
}
.table tbody tr:hover td {
    background: var(--dt-50);
}
.table td:first-child {
    font-weight: 600;
}

/* ---- Pills de estado (con punto de color) ---- */
.pill {
    gap: 5px;
    border: 1px solid transparent;
    white-space: nowrap;
}
.pill.estado:before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.estado-EN_DEPOSITO { background: #eff6ff; color: #1d4ed8; border-color: #dbeafe; }
.estado-ASIGNACION_REALIZADA { background: #f5f3ff; color: #6d28d9; border-color: #ede9fe; }
.estado-LISTO_PARA_ENTREGAR,
.estado-RUTA_PLANIFICADA { background: #fffbeb; color: #b45309; border-color: #fef3c7; }
.estado-EN_TRASLADO { background: var(--dt-50); color: var(--dt-700); border-color: var(--dt-100); }
.estado-EN_TRASLADO:before { animation: pulso-estado 1.4s ease-in-out infinite; }
.estado-ENTREGADA,
.estado-CONFIRMADA { background: #ecfdf5; color: #047857; border-color: #d1fae5; }
.estado-ENTREGA_FALLIDA,
.estado-EN_CONFLICTO { background: #fff1f2; color: #be123c; border-color: #ffe4e6; }
.estado-VENCIDA { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
@keyframes pulso-estado {
    0%, 100% { opacity: 1; }
    50% { opacity: .25; }
}

/* ---- Estado vacío (listas sin datos) ---- */
.vacio {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 26px 12px;
    color: #64748b;
    text-align: center;
}
.vacio img {
    width: 64px;
    height: 64px;
    opacity: .9;
}
.vacio b {
    color: #0f172a;
    font-size: 13px;
}
.vacio span {
    font-size: 11px;
}

/* ---- Transiciones entre páginas ---- */
.content {
    animation: entrar-pagina .32s ease-out both;
}
@keyframes entrar-pagina {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}
body.saliendo .content {
    transition: opacity .18s ease, transform .18s ease;
    opacity: 0;
    transform: translateY(-4px);
}
.page > .section,
.page > section {
    animation: entrar-pagina .38s ease-out both;
}
.page > :nth-child(2) { animation-delay: .04s; }
.page > :nth-child(3) { animation-delay: .08s; }
.page > :nth-child(4) { animation-delay: .12s; }
@media (prefers-reduced-motion: reduce) {
    .content, .page > *, body.saliendo .content, .card, .btn, .nav a { animation: none !important; transition: none !important; }
}

/* ---- Skeletons (contenido cargando) ---- */
.skeleton {
    border-radius: 10px;
    background: linear-gradient(90deg, #eef2f5 25%, #f8fafc 37%, #eef2f5 63%);
    background-size: 400% 100%;
    animation: brillo-skeleton 1.3s ease infinite;
}
@keyframes brillo-skeleton {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}
.skeleton-pagina {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 274px;
    z-index: 40;
    background: #f8fafc;
    padding: 94px 28px 28px;
    display: none;
}
.skeleton-pagina.visible {
    display: block;
    animation: entrar-pagina .15s ease-out both;
}
.skeleton-pagina .esqueleto {
    max-width: 1280px;
    margin: auto;
    display: grid;
    gap: 16px;
}
.skeleton-pagina .fila-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

/* ---- Spinner con la marca (formularios) ---- */
#loading-overlay {
    background: rgba(6, 46, 44, 0.45) !important;
    backdrop-filter: blur(2px);
}
#loading-overlay .spinner {
    border-color: rgba(255, 255, 255, .25) !important;
    border-top-color: var(--dt-300) !important;
}
.spinner-marca {
    display: grid;
    place-items: center;
    gap: 12px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.spinner-marca img {
    width: 54px;
    height: 54px;
    animation: latido 1.2s ease-in-out infinite;
}
@keyframes latido {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* ---- Toasts (avisos de éxito / error / advertencia) ---- */
.dt-toasts {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(380px, calc(100vw - 36px));
}
.dt-toast {
    position: relative;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--dt-500);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
    font-size: 12px;
    color: #0f172a;
    overflow: hidden;
    animation: toast-entra .28s cubic-bezier(.2, .8, .2, 1) both;
}
.dt-toast.saliendo {
    animation: toast-sale .22s ease-in both;
}
.dt-toast .dt-toast-icono {
    font-size: 16px;
    line-height: 1;
}
.dt-toast .dt-toast-titulo {
    display: block;
    font-weight: 800;
    margin-bottom: 2px;
}
.dt-toast .dt-toast-cerrar {
    margin-left: auto;
    border: 0;
    background: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 14px;
}
.dt-toast .dt-toast-progreso {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: currentColor;
    opacity: .35;
    transform-origin: left;
    animation: toast-tiempo linear forwards;
}
.dt-toast:hover .dt-toast-progreso {
    animation-play-state: paused;
}
.dt-toast.exito { border-left-color: #10b981; color: #047857; }
.dt-toast.error { border-left-color: #e11d48; color: #be123c; }
.dt-toast.aviso { border-left-color: #f59e0b; color: #b45309; }
.dt-toast.info { border-left-color: var(--dt-500); color: var(--dt-700); }
.dt-toast .dt-toast-texto { color: #334155; }
@keyframes toast-entra {
    from { opacity: 0; transform: translateX(24px) scale(.98); }
    to { opacity: 1; transform: none; }
}
@keyframes toast-sale {
    to { opacity: 0; transform: translateX(24px); }
}
@keyframes toast-tiempo {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* ---- Login / registro con la marca ---- */
.marca-auth {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin-bottom: 14px;
}
.marca-auth img {
    width: 52px;
    height: 52px;
}
.marca-auth span {
    font-family: "Space Grotesk";
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
}
.marca-auth span b {
    color: var(--dt-600);
}

/* Banner de campaña de la landing */
.banner-campana {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 1;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 14px 34px rgba(6, 46, 44, 0.25);
}

/* ---- Novedades ---- */
.filtros-novedades {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.filtros-novedades a {
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all .15s ease;
}
.filtros-novedades a:hover { border-color: var(--dt-300); color: var(--dt-700); }
.filtros-novedades a.activo { background: var(--dt-600); border-color: var(--dt-600); color: #fff; }
.grid-novedades {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.card.novedad {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.card.novedad:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
}
.novedad-imagen {
    aspect-ratio: 16 / 10;
    background: var(--dt-50);
    overflow: hidden;
}
.novedad-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.novedad-imagen-vacia {
    display: grid;
    place-items: center;
    font-size: 54px;
    background: linear-gradient(135deg, var(--dt-50), var(--dt-100));
}
.novedad-cuerpo { padding: 16px; }
.novedad-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #64748b;
}
.novedad-cuerpo h3 {
    font-family: "Space Grotesk";
    font-size: 16px;
    margin: 10px 0 6px;
}
.novedad-cuerpo p {
    font-size: 13px;
    color: #475569;
    line-height: 1.55;
    margin: 0;
    white-space: pre-line;
}

/* Avisos de login / registro: legibles y con icono, en vez del badge monoespaciado */
.aviso-auth {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
  font-family: inherit;
  border: 1px solid transparent;
  animation: aviso-auth-entrar .25s ease-out;
}
.aviso-auth::before {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.aviso-auth.error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.aviso-auth.error::before { content: "!"; background: #dc2626; }
.aviso-auth.ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.aviso-auth.ok::before { content: "✓"; background: #059669; }
@keyframes aviso-auth-entrar { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Estado de la licencia de los choferes (Gestión de personal) */
.celda-licencia { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.licencia-VENCIDA { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
.licencia-POR_VENCER { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.licencia-POR_VENCER:before { animation: pulso-estado 1.4s ease-in-out infinite; }
.licencia-VIGENTE { background: #ecfdf5; color: #047857; border-color: #d1fae5; }

/* Referencia de color de cada camión: mismo color que su recorrido en el mapa */
.truck-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border-radius: 4px;
  vertical-align: -1px;
  border: 1.5px dashed #cbd5e1; /* sin recorrido en el mapa */
  background: transparent;
}
.truck-swatch--en-mapa {
  border: 0;
  background: var(--truck-color);
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--truck-color);
}
.fleet-map__leyenda {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: #334155;
}
.fleet-map__leyenda li { display: inline-flex; align-items: center; font-weight: 600; }
.fleet-map__pin { background: none; border: 0; }
.fleet-map__pin span {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--truck-color);
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .35);
}
