﻿/* =========================================================
   VECTIX — HOJA DE ESTILOS PRINCIPAL
   =========================================================
   SECTOR 01: Variables y normalización
   SECTOR 02: Estructura principal
   SECTOR 03: Barra lateral
   SECTOR 04: Barra superior
   SECTOR 05: Área de trabajo y contexto
   SECTOR 06: Componentes generales
   SECTOR 07: Formularios y botones
   SECTOR 08: Tablas y estados
   SECTOR 09: Dashboard y KPI
   SECTOR 10: Estado de vehículos
   SECTOR 11: Modales
   SECTOR 12: Popovers
   SECTOR 13: Firma digital
   SECTOR 14: Login
   SECTOR 15: Impresión
   SECTOR 16: Responsive
   SECTOR 17: Accesibilidad
   ========================================================= */


/* =========================================================
   SECTOR 01 — VARIABLES Y NORMALIZACIÓN
   ========================================================= */

:root {
    --vx-sidebar: #061426;
    --vx-sidebar-middle: #071a31;
    --vx-sidebar-dark: #041225;

    --vx-primary: #1267ff;
    --vx-primary-dark: #0f5ee8;

    --vx-bg: #f6f8fc;
    --vx-card: #ffffff;
    --vx-border: #dfe5ef;

    --vx-text: #07142b;
    --vx-muted: #64748b;

    --vx-green: #16a34a;
    --vx-red: #dc2626;
    --vx-orange: #f97316;
    --vx-purple: #7c3aed;
    --vx-cyan: #06b6d4;

    --vx-sidebar-width: 265px;
    --vx-topbar-height: 82px;

    --vx-radius-sm: 8px;
    --vx-radius-md: 12px;
    --vx-radius-lg: 16px;

    --vx-shadow-card: 0 8px 24px rgba(15, 23, 42, .05);
    --vx-shadow-popover: 0 18px 40px rgba(15, 23, 42, .16);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    overflow-x: hidden;
    color: var(--vx-text);
    background: var(--vx-bg);
    font-family: "Segoe UI", Inter, Arial, sans-serif;
    font-size: 15px;
}

body {
    min-height: 100vh;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}


/* =========================================================
   SECTOR 02 — ESTRUCTURA PRINCIPAL
   ========================================================= */

.vx-shell {
    min-height: 100vh;
    display: flex;
    background: var(--vx-bg);
}

.vx-main {
    width: calc(100% - var(--vx-sidebar-width));
    min-width: 0;
    margin-left: var(--vx-sidebar-width);
}

.vx-content {
    width: 100%;
    min-width: 0;
    padding: 24px 30px 30px;
}


/* =========================================================
   SECTOR 03 — BARRA LATERAL
   ========================================================= */

.vx-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 2000;

    width: var(--vx-sidebar-width);
    height: 100vh;

    padding: 24px 14px;
    overflow-x: hidden;
    overflow-y: auto;

    color: #fff;
    background:
        radial-gradient(
            circle at 20% 0%,
            rgba(37, 99, 235, .22),
            transparent 28%
        ),
        linear-gradient(
            180deg,
            var(--vx-sidebar) 0%,
            var(--vx-sidebar-middle) 48%,
            var(--vx-sidebar-dark) 100%
        );

    box-shadow: 12px 0 28px rgba(15, 23, 42, .12);
}

.vx-brand {
    margin-bottom: 26px;
    padding: 0 13px;

    display: flex;
    align-items: center;
    gap: 12px;
}

.vx-brand-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;

    border-radius: 14px;

    display: grid;
    place-items: center;

    color: #fff;
    background: linear-gradient(
        135deg,
        var(--vx-primary),
        var(--vx-primary-dark)
    );

    box-shadow: 0 12px 26px rgba(18, 103, 255, .34);
    font-size: 23px;
}

.vx-brand-icon i {
    color: inherit;
    line-height: 1;
}

.vx-brand-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.vx-brand-text {
    overflow: hidden;
    color: #fff;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 24px;
    font-weight: 850;
    letter-spacing: -.5px;
}

.vx-brand-copy small {
    margin-top: 2px;
    color: rgba(226, 232, 240, .62);
    font-size: 11px;
    font-weight: 650;
}

.vx-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vx-nav-section {
    margin: 17px 10px 7px;
    color: rgba(226, 232, 240, .68);
    font-size: 10.5px;
    font-weight: 850;
    letter-spacing: .9px;
    text-transform: uppercase;
}

.vx-nav-divider {
    height: 1px;
    margin: 13px 10px 2px;
    background: rgba(226, 232, 240, .12);
}

.vx-nav a {
    position: relative;

    min-height: 44px;
    padding: 0 12px;

    border-radius: 9px;

    display: flex;
    align-items: center;
    gap: 12px;

    color: #edf6ff;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 620;

    transition:
        background .15s ease,
        transform .15s ease,
        box-shadow .15s ease;
}

.vx-nav a i {
    width: 23px;
    min-width: 23px;

    color: #fff;
    text-align: center;
    font-size: 19px;
    line-height: 1;
    opacity: .96;
}

.vx-nav a span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vx-nav a.active,
.vx-nav a:hover {
    color: #fff;
    background: linear-gradient(
        90deg,
        var(--vx-primary),
        var(--vx-primary-dark)
    );

    box-shadow: 0 10px 24px rgba(18, 103, 255, .23);
    transform: translateX(1px);
}

.vx-nav a.active::before {
    content: "";
    position: absolute;
    left: 0;

    width: 3px;
    height: 22px;

    border-radius: 0 4px 4px 0;
    background: #fff;
}

.vx-nav-logout {
    margin-top: 2px;
    color: #fecaca !important;
}

.vx-nav-logout:hover {
    color: #fff !important;
    background: rgba(220, 38, 38, .78) !important;
    box-shadow: 0 10px 24px rgba(220, 38, 38, .20) !important;
}


/* =========================================================
   SECTOR 04 — BARRA SUPERIOR
   ========================================================= */

.vx-topbar {
    position: sticky;
    top: 0;
    z-index: 1500;

    min-height: var(--vx-topbar-height);
    padding: 0 28px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;

    background: #fff;
    border-bottom: 1px solid var(--vx-border);
}

.vx-top-left {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 16px;
}

.vx-top-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.vx-top-action {
    position: relative;

    display: flex;
    align-items: center;
    gap: 8px;

    color: var(--vx-text);
    text-decoration: none;
    white-space: nowrap;
}

.vx-top-action i {
    font-size: 21px;
}

.vx-top-click {
    cursor: pointer;
}

.vx-bell {
    position: relative;
}

.vx-bell-badge {
    position: absolute;
    top: -8px;
    right: -9px;

    min-width: 18px;
    height: 18px;
    padding: 0 5px;

    border-radius: 999px;

    display: grid;
    place-items: center;

    color: #fff;
    background: #ef4444;

    font-size: 10px;
    font-weight: 850;
}

.vx-avatar {
    width: 39px;
    height: 39px;
    min-width: 39px;

    border-radius: 50%;

    display: grid;
    place-items: center;

    color: #fff;
    background: #16233a;

    font-size: 17px;
    font-weight: 850;
}

.vx-user-menu {
    border: 0;
    padding: 0;

    display: flex;
    align-items: center;
    gap: 9px;

    color: var(--vx-text);
    background: transparent;

    cursor: pointer;
}

.vx-mobile-menu-btn {
    width: 42px;
    height: 42px;

    border: 0;
    border-radius: 9px;

    display: none;
    align-items: center;
    justify-content: center;

    color: var(--vx-text);
    background: transparent;

    font-size: 27px;
}

.vx-mobile-menu-btn:hover {
    background: #f1f5f9;
}

.vx-mobile-overlay {
    display: none;
}


/* =========================================================
   SECTOR 05 — CONTEXTO Y ÁREA DE TRABAJO
   ========================================================= */

.vx-page-context {
    min-width: 0;
}

.vx-page-context strong {
    display: block;

    overflow: hidden;
    color: var(--vx-text);
    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 18px;
    font-weight: 850;
    letter-spacing: -.2px;
}

.vx-page-context span {
    display: block;
    margin-top: 2px;

    overflow: hidden;
    color: var(--vx-muted);
    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 12.5px;
}

.vx-page-actions {
    margin-bottom: 16px;

    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.vx-page-head {
    margin-bottom: 20px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.vx-page-head h3 {
    margin: 0;
    color: var(--vx-text);
    font-size: 25px;
    font-weight: 900;
}

.vx-page-head p {
    margin: 4px 0 0;
    color: var(--vx-muted);
    font-size: 13px;
}

.vx-title {
    margin: 0 0 20px;
    color: var(--vx-text);
    font-size: 25px;
    font-weight: 850;
}

.vx-last-update {
    color: var(--vx-muted);
    font-size: 12px;
    white-space: nowrap;
}


/* =========================================================
   SECTOR 06 — COMPONENTES GENERALES
   ========================================================= */

.vx-panel,
.vx-form-card,
.vx-ticket-card,
.vx-status-card,
.card {
    border: 1px solid var(--vx-border);
    border-radius: 14px;

    background: var(--vx-card);
    box-shadow: var(--vx-shadow-card);
}

.vx-panel,
.vx-form-card,
.vx-ticket-card {
    width: 100%;
    min-width: 0;
    padding: 20px;
}

.vx-panel h5,
.vx-status-card h5 {
    margin: 0 0 14px;
    color: var(--vx-text);
    font-size: 16px;
    font-weight: 850;
}

.vx-empty-state {
    min-height: 140px;
    padding: 22px;

    border: 1px dashed #cbd5e1;
    border-radius: 12px;

    display: grid;
    place-items: center;

    color: var(--vx-muted);
    background: #f8fafc;

    text-align: center;
}

.vx-empty-state i {
    display: block;
    margin-bottom: 7px;
    color: #94a3b8;
    font-size: 28px;
}


/* =========================================================
   SECTOR 07 — FORMULARIOS Y BOTONES
   ========================================================= */

.form-label {
    margin-bottom: 6px;
    color: var(--vx-text);
    font-size: 13px;
    font-weight: 750;
}

.form-control,
.form-select {
    width: 100%;
    min-height: 42px;

    border: 1px solid var(--vx-border);
    border-radius: 9px;

    color: var(--vx-text);
    background: #fff;

    font-size: 14px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--vx-primary);
    box-shadow: 0 0 0 4px rgba(18, 103, 255, .10);
}

textarea.form-control {
    min-height: 92px;
    resize: vertical;
}

.btn {
    min-height: 40px;
    border-radius: 9px;
    font-weight: 720;
}

.btn-sm {
    min-height: 31px;
    border-radius: 7px;
    font-size: 12px;
}

.btn-primary {
    border-color: var(--vx-primary);
    background: linear-gradient(
        90deg,
        var(--vx-primary),
        var(--vx-primary-dark)
    );
}

.btn-primary:hover {
    border-color: var(--vx-primary-dark);
    filter: brightness(.97);
}

.vx-link {
    margin-top: 13px;

    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: var(--vx-primary);
    text-decoration: none;

    font-size: 13px;
    font-weight: 800;
}

/* =========================================================
   SECTOR 07.1 — ESTADO INFORMATIVO DEL CHOFER
   ========================================================= */

.vx-driver-status-row {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.vx-driver-status-label {
    color: var(--vx-muted);
    font-size: 11.5px;
    font-weight: 650;
}

.vx-driver-status-badge {
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    font-weight: 850;
}

    .vx-driver-status-badge.inside {
        color: #166534;
        background: #dcfce7;
    }

    .vx-driver-status-badge.outside {
        color: #9a3412;
        background: #ffedd5;
    }

.vx-driver-vehicle {
    color: var(--vx-muted);
    font-size: 11.5px;
}

    .vx-driver-vehicle strong {
        color: var(--vx-text);
    }

.vx-driver-change-warning {
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px solid #fde68a;
    border-radius: 9px;
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: #92400e;
    background: #fffbeb;
    font-size: 11.5px;
}

    .vx-driver-change-warning i {
        margin-top: 1px;
        color: #f59e0b;
    }
/* =========================================================
   SECTOR 08 — TABLAS Y ESTADOS
   ========================================================= */

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table,
.vx-table,
.vx-status-table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: collapse;
}

.table > :not(caption) > * > * {
    background: transparent;
}

.vx-table th,
.vx-status-table th {
    padding: 10px 8px;

    color: var(--vx-text);
    background: #f8fafc;

    border-bottom: 1px solid var(--vx-border);

    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.vx-table td,
.vx-status-table td {
    padding: 10px 8px;

    color: #0f172a;
    border-bottom: 1px solid #edf2f7;

    font-size: 13px;
    vertical-align: middle;
}

.vx-table tbody tr:hover,
.vx-status-table tbody tr:hover {
    background: #f8fafc;
}

.vx-click-row {
    cursor: pointer;
}

.vx-badge {
    min-height: 25px;
    padding: 4px 10px;

    border-radius: 999px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 11.5px;
    font-weight: 850;
}

.vx-badge.entry,
.vx-badge.green {
    color: #15803d;
    background: #dcfce7;
}

.vx-badge.exit {
    color: #1d4ed8;
    background: #dbeafe;
}

.vx-badge.red {
    color: #dc2626;
    background: #fee2e2;
}


/* =========================================================
   SECTOR 09 — DASHBOARD Y KPI
   ========================================================= */

.vx-kpi-grid {
    margin-bottom: 18px;

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: 14px;
}

.vx-kpi {
    min-height: 128px;
    padding: 17px;

    border: 1px solid var(--vx-border);
    border-radius: 14px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;

    background: var(--vx-card);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}

.vx-kpi-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vx-kpi-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;

    border-radius: 14px;

    display: grid;
    place-items: center;

    font-size: 23px;
}

.vx-kpi-icon.blue {
    color: #2563eb;
    background: #dbeafe;
}

.vx-kpi-icon.red {
    color: var(--vx-red);
    background: #fee2e2;
}

.vx-kpi-icon.orange {
    color: var(--vx-orange);
    background: #ffedd5;
}

.vx-kpi-icon.purple {
    color: var(--vx-purple);
    background: #ede9fe;
}

.vx-kpi-icon.green {
    color: var(--vx-green);
    background: #dcfce7;
}

.vx-kpi-label {
    color: var(--vx-text);
    font-size: 13px;
    font-weight: 720;
}

.vx-kpi-value {
    color: var(--vx-text);
    font-size: 28px;
    font-weight: 850;
    line-height: 1;
}

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

.vx-quick-actions {
    display: grid;
    gap: 11px;
}

.vx-action-btn {
    min-height: 48px;
    padding: 0 14px;

    border: 1px solid var(--vx-border);
    border-radius: 10px;

    display: flex;
    align-items: center;
    gap: 11px;

    background: #fff;
    text-decoration: none;

    font-size: 13px;
    font-weight: 750;
}

.vx-action-btn i {
    font-size: 20px;
}

.vx-action-btn.green { color: #15803d; }
.vx-action-btn.orange { color: #ea580c; }
.vx-action-btn.cyan { color: #0891b2; }
.vx-action-btn.purple { color: #6d28d9; }
.vx-action-btn.blue { color: var(--vx-primary); }


/* =========================================================
   SECTOR 10 — ESTADO DE VEHÍCULOS
   ========================================================= */

.vx-status-kpis {
    margin-bottom: 18px;

    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.vx-status-kpi {
    min-width: 0;
    min-height: 100px;
    padding: 15px 18px;

    border: 1px solid var(--vx-border);
    border-radius: 14px;

    display: flex;
    align-items: center;
    gap: 14px;

    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}

.vx-status-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;

    border-radius: 15px;

    display: grid;
    place-items: center;

    font-size: 24px;
}

.vx-status-kpi.green .vx-status-icon {
    color: var(--vx-green);
    background: #dcfce7;
}

.vx-status-kpi.red .vx-status-icon {
    color: var(--vx-red);
    background: #fee2e2;
}

.vx-status-kpi.blue .vx-status-icon {
    color: #2563eb;
    background: #dbeafe;
}

.vx-status-kpi.purple .vx-status-icon {
    color: var(--vx-purple);
    background: #ede9fe;
}

.vx-status-kpi span {
    display: block;
    overflow: hidden;
    color: var(--vx-text);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12.5px;
    font-weight: 800;
}

.vx-status-kpi strong {
    display: block;
    margin-top: 3px;
    color: var(--vx-text);
    font-size: 28px;
    font-weight: 900;
}

.vx-status-kpi small {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: var(--vx-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
}

.vx-status-layout {
    margin-bottom: 16px;

    display: grid;
    grid-template-columns:
        minmax(0, 1.02fr)
        minmax(0, .98fr)
        minmax(320px, .88fr);

    gap: 14px;
}

.vx-status-bottom {
    display: grid;
    grid-template-columns:
        minmax(0, .82fr)
        minmax(0, 1.12fr)
        minmax(290px, .86fr);

    gap: 14px;
}

.vx-status-card {
    min-width: 0;
    padding: 15px 17px;
}

.vx-status-table-card {
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

.vx-status-table-card .table-responsive {
    flex: 1;
}

.vx-card-title {
    margin-bottom: 9px;
    padding-bottom: 11px;

    border-bottom: 1px solid var(--vx-border);

    display: flex;
    align-items: center;
    justify-content: space-between;

    color: var(--vx-text);
    font-size: 15px;
    font-weight: 900;
}

.vx-card-title b {
    min-width: 27px;
    padding: 4px 8px;

    border-radius: 999px;

    color: var(--vx-green);
    background: #e8f5ee;

    text-align: center;
    font-size: 11px;
}

.vx-dot {
    width: 9px;
    height: 9px;
    margin-right: 7px;
    border-radius: 50%;
    display: inline-block;
}

.vx-dot.green { background: var(--vx-green); }
.vx-dot.red { background: var(--vx-red); }

.vx-selected-card {
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

.vx-selected-head {
    margin-bottom: 12px;

    display: flex;
    align-items: center;
    gap: 10px;
}

.vx-selected-head strong {
    color: var(--vx-primary);
    font-size: 26px;
    font-weight: 900;
}

.vx-detail-list {
    margin-bottom: 14px;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
}

.vx-detail-list div {
    min-width: 0;

    display: grid;
    grid-template-columns: 17px minmax(62px, .8fr) minmax(0, 1.2fr);
    align-items: center;
    gap: 5px;

    font-size: 11.5px;
}

.vx-detail-list i {
    color: var(--vx-text);
    font-size: 11.5px;
    opacity: .82;
}

.vx-detail-list span {
    color: var(--vx-muted);
}

.vx-detail-list b {
    min-width: 0;
    overflow: hidden;
    color: var(--vx-text);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11.5px;
}

.vx-selected-actions {
    margin-top: auto;

    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 8px;
}

.vx-status-table td:last-child {
    white-space: nowrap;
}

.vx-status-table .btn-sm {
    width: 31px;
    height: 31px;
    min-height: 31px;
    padding: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.vx-quick-actions.vehicle-actions {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.vx-quick-actions.vehicle-actions a,
.vx-quick-actions.vehicle-actions button {
    min-height: 65px;
    padding: 11px 13px;

    border: 1px solid transparent;
    border-radius: 11px;

    display: flex;
    align-items: center;
    gap: 10px;

    color: inherit;
    text-align: left;
    text-decoration: none;

    cursor: pointer;
}

.vx-quick-actions.vehicle-actions .green {
    color: #15803d;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.vx-quick-actions.vehicle-actions .blue {
    color: #2563eb;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.vx-quick-actions.vehicle-actions .purple {
    color: var(--vx-purple);
    background: #faf5ff;
    border-color: #ddd6fe;
}

.vx-quick-actions.vehicle-actions .orange {
    color: var(--vx-orange);
    background: #fff7ed;
    border-color: #fed7aa;
}


/* =========================================================
   SECTOR 11 — MODALES
   ========================================================= */

.vx-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 5000;

    padding: 18px;

    display: grid;
    place-items: center;

    background: rgba(2, 6, 23, .55);
}

.vx-modal-card {
    width: min(760px, 100%);
    max-height: calc(100vh - 36px);

    padding: 21px;
    overflow-y: auto;

    border-radius: 16px;
    background: #fff;

    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.vx-modal-header {
    position: sticky;
    top: -21px;
    z-index: 2;

    margin: -21px -21px 17px;
    padding: 17px 21px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: #fff;
    border-bottom: 1px solid var(--vx-border);
}

.vx-modal-header h5 {
    margin: 0;
    color: var(--vx-text);
    font-size: 17px;
    font-weight: 900;
}


/* =========================================================
   SECTOR 12 — POPOVERS
   ========================================================= */

.vx-popover {
    position: absolute;
    top: 45px;
    right: 0;
    z-index: 2600;

    overflow: hidden;

    color: var(--vx-text);
    background: #fff;

    border: 1px solid var(--vx-border);
    border-radius: 14px;

    box-shadow: var(--vx-shadow-popover);
}

.vx-calendar-popover {
    width: 280px;
    padding: 15px;
}

.vx-calendar-title {
    margin-bottom: 11px;
    font-weight: 850;
    text-transform: capitalize;
}

.vx-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    text-align: center;
}

.vx-calendar-grid span {
    height: 29px;
    border-radius: 8px;
    display: grid;
    place-items: center;
}

.vx-calendar-days span {
    color: var(--vx-muted);
    font-size: 11px;
    font-weight: 750;
}

.vx-calendar-grid span.active {
    color: #fff;
    background: var(--vx-primary);
    font-weight: 850;
}

.vx-notification-popover {
    width: 340px;
    padding: 13px;
}

.vx-popover-title {
    margin-bottom: 8px;
    font-weight: 850;
}

.vx-notification-item {
    padding: 9px;
    border-radius: 9px;

    display: block;

    color: var(--vx-text);
    border-bottom: 1px solid var(--vx-border);

    text-decoration: none;
}

.vx-notification-item:hover,
.vx-user-popover a:hover {
    background: #f8fafc;
}

.vx-notification-item span,
.vx-notification-item small {
    display: block;
    color: var(--vx-muted);
}

.vx-popover-link {
    margin-top: 10px;
    display: block;
    color: var(--vx-primary);
    text-decoration: none;
    font-weight: 800;
}

.vx-user-wrapper {
    position: relative;
}

.vx-user-popover {
    width: 260px;
    padding: 10px;
}

.vx-user-header {
    margin-bottom: 7px;
    padding: 9px;

    border-bottom: 1px solid var(--vx-border);

    display: flex;
    align-items: center;
    gap: 10px;
}

.vx-user-header small {
    display: block;
    color: var(--vx-muted);
}

.vx-user-popover a {
    padding: 9px;
    border-radius: 8px;

    display: flex;
    align-items: center;
    gap: 9px;

    color: var(--vx-text);
    text-decoration: none;
    font-weight: 650;
}

.vx-user-popover a.danger {
    color: var(--vx-red);
}


/* =========================================================
   SECTOR 13 — FIRMA DIGITAL
   ========================================================= */

.vx-signature-box {
    width: 100%;
    background: #fff;
}

.vx-signature-canvas {
    width: 100%;
    height: 165px;

    border: 1px solid var(--vx-border);
    border-radius: 10px;

    background: #fff;

    touch-action: none;
    cursor: crosshair;
}


/* =========================================================
   SECTOR 14 — LOGIN
   ========================================================= */

.vx-auth-page {
    position: relative;

    width: 100%;
    min-height: 100vh;

    padding: 24px;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--vx-bg);
}

.vx-auth-page::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 0;

    width: 52%;

    background:
        radial-gradient(
            circle at 20% 10%,
            rgba(18, 103, 255, .28),
            transparent 34%
        ),
        linear-gradient(
            180deg,
            #061426 0%,
            #071a31 100%
        );

    clip-path: polygon(0 0, 100% 0, 58% 100%, 0 100%);
}

.vx-login-card {
    position: relative;
    z-index: 2;

    width: min(430px, 100%);
    padding: 32px;

    border: 1px solid rgba(223, 229, 239, .85);
    border-radius: 18px;

    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .20);
}

.vx-login-brand {
    margin-bottom: 22px;
    text-align: center;
}

.vx-login-logo {
    width: 56px;
    height: 56px;
    margin: 0 auto 13px;

    border-radius: 16px;

    display: grid;
    place-items: center;

    color: #fff;
    background: linear-gradient(
        135deg,
        var(--vx-primary),
        var(--vx-primary-dark)
    );

    font-size: 27px;
    font-weight: 900;
}

.vx-login-brand h1 {
    margin: 0;
    color: #0f172a;
    font-size: 29px;
    font-weight: 900;
}

.vx-login-brand p {
    margin: 5px 0 0;
    color: var(--vx-muted);
}

.vx-login-form {
    margin-top: 19px;
}

.vx-login-form .form-control {
    height: 45px;
}

.vx-login-form .btn-primary {
    width: 100%;
    height: 45px;
    border: 0;
    font-weight: 850;
}


/* =========================================================
   SECTOR 15 — IMPRESIÓN
   ========================================================= */

@media print {
    @page {
        margin: 12mm;
    }

    html,
    body {
        overflow: visible !important;
        background: #fff !important;
    }

    body * {
        visibility: hidden;
    }

    .print-area,
    .print-area * {
        visibility: visible;
    }

    .print-area {
        position: absolute;
        inset: 0;

        width: 100%;
        padding: 0 !important;

        border: 0 !important;
        background: #fff !important;
        box-shadow: none !important;
    }

    .vx-sidebar,
    .vx-topbar,
    .vx-mobile-overlay,
    .vx-mobile-menu-btn,
    button,
    a.btn,
    .no-print {
        display: none !important;
    }

    .table-responsive {
        overflow: visible !important;
    }

    table {
        width: 100% !important;
        page-break-inside: auto;
    }

    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
}


/* =========================================================
   SECTOR 16 — RESPONSIVE
   ========================================================= */

@media (max-width: 1500px) {
    .vx-status-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vx-selected-card {
        grid-column: 1 / -1;
        min-height: 0;
    }

    .vx-detail-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .vx-status-bottom {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vx-status-bottom .vx-status-card:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1200px) and (min-width: 901px) {
    :root {
        --vx-sidebar-width: 235px;
    }

    .vx-nav a {
        gap: 9px;
        font-size: 12.5px;
    }

    .vx-topbar {
        padding: 0 21px;
    }

    .vx-content {
        padding: 22px;
    }
}

@media (max-width: 1100px) {
    .vx-ticket-layout {
        grid-template-columns: 1fr;
    }

    .vx-status-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vx-status-layout,
    .vx-status-bottom {
        grid-template-columns: 1fr;
    }

    .vx-selected-card,
    .vx-status-bottom .vx-status-card:last-child {
        grid-column: auto;
    }

    .vx-detail-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .vx-shell {
        display: block;
    }

    .vx-sidebar {
        left: -285px;
        width: 285px;
        padding: 23px 14px;

        transition: left .22s ease;
        box-shadow: 18px 0 45px rgba(15, 23, 42, .28);
    }

    body.vx-sidebar-open {
        overflow: hidden;
    }

    body.vx-sidebar-open .vx-sidebar {
        left: 0;
    }

    .vx-mobile-overlay {
        position: fixed;
        inset: 0;
        z-index: 1900;
        background: rgba(2, 6, 23, .52);
    }

    body.vx-sidebar-open .vx-mobile-overlay {
        display: block;
    }

    .vx-main {
        width: 100%;
        margin-left: 0;
    }

    .vx-mobile-menu-btn {
        display: inline-flex;
    }

    .vx-topbar {
        min-height: 70px;
        padding: 11px 17px;
        gap: 13px;
    }

    .vx-top-left {
        flex: 1;
    }

    .vx-top-actions {
        gap: 11px;
    }

    .vx-top-action span {
        display: none;
    }

    .vx-user-menu > span {
        display: none;
    }

    .vx-content {
        padding: 17px;
    }

    .vx-page-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .vx-page-actions,
    .vx-page-head > .d-flex {
        width: 100%;
        justify-content: flex-start;
    }

    .vx-popover {
        position: fixed;
        top: 74px;
        right: 12px;
        left: 12px;

        width: auto;
        max-width: 420px;

        margin-left: auto;
    }
}

@media (max-width: 700px) {
    .vx-status-kpis,
    .vx-detail-list,
    .vx-selected-actions,
    .vx-quick-actions.vehicle-actions {
        grid-template-columns: 1fr;
    }

    .vx-status-table-card {
        min-height: 0;
    }

    .vx-login-card {
        padding: 24px;
    }

    .vx-auth-page::before {
        width: 100%;
        height: 40%;
        clip-path: polygon(0 0, 100% 0, 100% 72%, 0 100%);
    }
}

@media (max-width: 600px) {
    .vx-topbar {
        padding: 9px 13px;
    }

    .vx-page-context strong {
        font-size: 15px;
    }

    .vx-page-context span {
        font-size: 10.5px;
    }

    .vx-content {
        padding: 13px;
    }

    .vx-panel,
    .vx-form-card,
    .vx-ticket-card,
    .vx-status-card {
        padding: 15px;
    }

    .vx-kpi-grid,
    .vx-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .vx-page-actions .btn,
    .vx-page-head .btn {
        width: 100%;
    }

    .vx-modal-backdrop {
        padding: 9px;
    }

    .vx-modal-card {
        max-height: calc(100vh - 18px);
        padding: 15px;
    }

    .vx-signature-canvas {
        height: 140px;
    }
}


/* =========================================================
   SECTOR 17 — ACCESIBILIDAD
   ========================================================= */

:focus-visible {
    outline: 3px solid rgba(18, 103, 255, .38);
    outline-offset: 2px;
}

button:disabled,
.btn:disabled,
.btn.disabled {
    cursor: not-allowed;
    opacity: .58;
}

.text-muted {
    color: var(--vx-muted) !important;
}

.text-primary {
    color: var(--vx-primary) !important;
}

.alert {
    border-radius: 10px;
    font-size: 14px;
}

.alert-danger {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.alert-success {
    color: #166534;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.vx-sidebar,
.vx-modal-card,
.table-responsive {
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 transparent;
}

.vx-sidebar::-webkit-scrollbar,
.vx-modal-card::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

.vx-sidebar::-webkit-scrollbar-thumb,
.vx-modal-card::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #94a3b8;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* =========================================================
   SECTOR 05.1 — ENCABEZADO DEL ÁREA DE TRABAJO
   =========================================================
   El nombre y la descripción de la página se muestran ahora
   en la barra superior mediante .vx-page-context.

   Estas reglas ocultan solamente el encabezado principal
   duplicado dentro del área de trabajo.
   ========================================================= */

/* Títulos principales antiguos ubicados directamente
   al inicio del área de trabajo */
.vx-content > .vx-title:first-child,
.vx-content > h1:first-child,
.vx-content > h2:first-child,
.vx-content > h3:first-child {
    display: none !important;
}

/* Encabezado compuesto:
   oculta el bloque izquierdo que contiene título y descripción,
   pero conserva las acciones del lado derecho */
.vx-content > .vx-page-head:first-child > div:first-child {
    display: none !important;
}

/* Cuando el encabezado conserva botones contextuales,
   estos se alinean a la derecha y usan menos espacio */
.vx-content > .vx-page-head:first-child {
    min-height: 0;
    margin: 0 0 16px;
    padding: 0;

    justify-content: flex-end;
    align-items: center;
}

/* El grupo de botones ocupa únicamente el espacio necesario */
.vx-content > .vx-page-head:first-child > .d-flex,
.vx-content > .vx-page-head:first-child > .vx-page-actions {
    width: auto;
    margin-left: auto;
}

/* Páginas que ya utilizan exclusivamente vx-page-actions */
.vx-content > .vx-page-actions:first-child {
    margin-top: 0;
    margin-bottom: 16px;
}

/* Si el encabezado queda completamente vacío,
   no debe reservar altura */
.vx-content > .vx-page-head:first-child:empty {
    display: none !important;
    margin: 0 !important;
}

/* Ajuste para páginas cuyo contenido comienza
   inmediatamente con KPI o tarjetas */
.vx-content > .vx-kpi-grid:first-child,
.vx-content > .vx-status-kpis:first-child,
.vx-content > .vx-dashboard-grid:first-child,
.vx-content > .vx-form-card:first-child,
.vx-content > .card:first-child {
    margin-top: 0;
}

/* Tablet y móvil */
@media (max-width: 900px) {
    .vx-content > .vx-page-head:first-child {
        width: 100%;
        align-items: stretch;
    }

    .vx-content > .vx-page-head:first-child > .d-flex,
    .vx-content > .vx-page-head:first-child > .vx-page-actions {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 600px) {
    .vx-content > .vx-page-head:first-child {
        margin-bottom: 12px;
    }

    .vx-content > .vx-page-actions:first-child {
        margin-bottom: 12px;
    }
}

/* =========================================================
   SECTOR 07.2 — SELECTOR DE ACOMPAÑANTES
   ========================================================= */

.vx-passenger-selector {
    padding: 14px;
    border: 1px solid var(--vx-border);
    border-radius: 12px;
    background: #f8fafc;
}

.vx-passenger-head {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.vx-passenger-count {
    padding: 4px 9px;
    border-radius: 999px;
    color: #1d4ed8;
    background: #dbeafe;
    font-size: 11px;
    font-weight: 800;
}

.vx-passenger-search {
    position: relative;
}

.vx-passenger-search i {
    position: absolute;
    top: 50%;
    left: 12px;
    z-index: 1;
    color: var(--vx-muted);
    transform: translateY(-50%);
}

.vx-passenger-search .form-control {
    padding-left: 36px;
}

.vx-passenger-list {
    max-height: 220px;
    margin-top: 10px;
    overflow-y: auto;
    display: grid;
    gap: 6px;
}

.vx-passenger-empty {
    padding: 18px;
    border: 1px dashed var(--vx-border);
    border-radius: 9px;
    color: var(--vx-muted);
    background: #fff;
    text-align: center;
}

.vx-passenger-option {
    padding: 8px 10px;
    border: 1px solid var(--vx-border);
    border-radius: 9px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    cursor: pointer;
}

.vx-passenger-option:hover {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.vx-passenger-option.disabled {
    opacity: .52;
    cursor: not-allowed;
}

.vx-passenger-option input {
    width: 17px;
    height: 17px;
}

.vx-passenger-person {
    min-width: 0;
    display: grid;
    flex: 1;
}

.vx-passenger-person strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vx-passenger-person small {
    color: var(--vx-muted);
}

.vx-passenger-driver-tag {
    padding: 3px 7px;
    border-radius: 999px;
    color: #166534;
    background: #dcfce7;
    font-size: 10px;
    font-weight: 800;
}

.vx-passenger-manual {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--vx-border);
    border-radius: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    background: #fff;
}

.vx-passenger-manual-title,
.vx-passenger-manual .alert,
.vx-passenger-manual .d-flex {
    grid-column: 1 / -1;
}

.vx-passenger-manual-title,
.vx-passenger-selected-title {
    color: var(--vx-text);
    font-size: 12px;
    font-weight: 800;
}

.vx-passenger-selected-title {
    margin-top: 13px;
}

.vx-passenger-chips {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.vx-passenger-chip {
    padding: 5px 9px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1d4ed8;
    background: #dbeafe;
    font-size: 12px;
    font-weight: 700;
}

.vx-passenger-chip small {
    padding: 2px 5px;
    border-radius: 999px;
    color: #6d28d9;
    background: #ede9fe;
    font-size: 9px;
}

.vx-passenger-chip button {
    border: 0;
    padding: 0;
    color: inherit;
    background: transparent;
    font-size: 17px;
    line-height: 1;
}

@media (max-width: 600px) {
    .vx-passenger-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .vx-passenger-manual {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   SECTOR 07.3 — CONFIGURACIÓN SMTP
   ========================================================= */

.vx-email-settings-summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.vx-email-settings-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vx-email-status {
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.vx-email-status.enabled {
    color: #166534;
    background: #dcfce7;
}

.vx-email-status.disabled {
    color: #64748b;
    background: #e2e8f0;
}

.vx-email-settings-details {
    margin-top: 18px;
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.vx-email-settings-details > div {
    padding: 12px;
    border: 1px solid var(--vx-border);
    border-radius: 10px;
    background: #f8fafc;
}

.vx-email-settings-details span {
    display: block;
    color: var(--vx-muted);
    font-size: 11px;
}

.vx-email-settings-details strong {
    display: block;
    margin-top: 4px;
    overflow-wrap: anywhere;
    font-size: 13px;
}

.vx-email-modal {
    width: min(850px, 100%);
}

.vx-email-modal-body {
    display: grid;
    gap: 16px;
}

.vx-email-test-panel {
    padding: 13px;
    border: 1px dashed #bfdbfe;
    border-radius: 10px;
    background: #eff6ff;
}

@media (max-width: 900px) {
    .vx-email-settings-details {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .vx-email-settings-summary {
        flex-direction: column;
    }

    .vx-email-settings-actions {
        width: 100%;
        justify-content: space-between;
    }

    .vx-email-settings-details {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   SECTOR 07.4 — CENTRO DE CONFIGURACIÓN
   ========================================================= */

/*
 * Cuadrícula preparada para agregar futuras tarjetas:
 * correo, integraciones, seguridad, respaldos, auditoría, etc.
 */
.vx-settings-extension-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

/* Tarjeta estándar de módulo de configuración */
.vx-settings-module-card {
    min-width: 0;
    min-height: 100%;
    padding: 17px;
    border: 1px solid var(--vx-border);
    border-radius: 13px;
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: 0 5px 18px rgba(15, 23, 42, .035);
}

/* Encabezado del módulo */
.vx-settings-module-header {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 11px;
}

.vx-settings-module-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-size: 19px;
}

.vx-settings-module-icon.email {
    color: #1d4ed8;
    background: #dbeafe;
}

.vx-settings-module-title {
    min-width: 0;
    padding-right: 92px;
}

.vx-settings-module-title h5 {
    margin: 0;
    color: var(--vx-text);
    font-size: 15px;
    font-weight: 800;
}

.vx-settings-module-title p {
    margin: 4px 0 0;
    color: var(--vx-muted);
    font-size: 11.5px;
    line-height: 1.4;
}

/* Estado superior */
.vx-settings-status {
    position: absolute;
    top: 0;
    right: 0;
    min-height: 25px;
    padding: 4px 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 800;
}

.vx-settings-status.enabled {
    color: #166534;
    background: #dcfce7;
}

.vx-settings-status.disabled {
    color: #64748b;
    background: #e2e8f0;
}

/* Datos dispuestos verticalmente */
.vx-settings-module-content {
    margin-top: 17px;
    border-top: 1px solid var(--vx-border);
}

.vx-settings-data-row {
    min-width: 0;
    min-height: 48px;
    padding: 10px 0;
    border-bottom: 1px solid var(--vx-border);
    display: grid;
    gap: 3px;
}

.vx-settings-data-label {
    color: var(--vx-muted);
    font-size: 10.5px;
    font-weight: 650;
}

.vx-settings-data-value {
    overflow-wrap: anywhere;
    color: var(--vx-text);
    font-size: 12.5px;
    font-weight: 750;
}

/* Acciones inferiores */
.vx-settings-module-actions {
    margin-top: auto;
    padding-top: 15px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.vx-settings-module-actions .btn {
    min-height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Modal SMTP */
.vx-email-modal {
    width: min(820px, 100%);
}

.vx-email-test-modal {
    width: min(520px, 100%);
}

.vx-email-modal-body {
    display: grid;
    gap: 16px;
}

.vx-email-enabled-box {
    padding: 12px 13px;
    border: 1px solid var(--vx-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: #f8fafc;
}

.vx-email-enabled-box > div:first-child {
    display: grid;
    gap: 2px;
}

.vx-email-enabled-box strong {
    color: var(--vx-text);
    font-size: 13px;
}

.vx-email-enabled-box small {
    color: var(--vx-muted);
    font-size: 11px;
}

.vx-modal-footer {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--vx-border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Neutralizar la antigua distribución horizontal */
.vx-email-settings-details {
    display: none !important;
}

.vx-email-settings-summary {
    display: contents;
}

.vx-email-settings-actions {
    display: contents;
}

/* Tablet */
@media (max-width: 1050px) {
    .vx-settings-extension-grid {
        grid-template-columns: 1fr;
    }
}

/* Móvil */
@media (max-width: 600px) {
    .vx-settings-module-card {
        padding: 14px;
    }

    .vx-settings-module-title {
        padding-right: 0;
    }

    .vx-settings-status {
        position: static;
        width: max-content;
        grid-column: 1 / -1;
        margin-top: 2px;
    }

    .vx-settings-module-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .vx-settings-module-actions .btn {
        width: 100%;
    }

    .vx-email-enabled-box {
        align-items: flex-start;
    }

    .vx-modal-footer {
        display: grid;
        grid-template-columns: 1fr;
    }

    .vx-modal-footer .btn {
        width: 100%;
    }
}

/* =========================================================
   SECTOR 08.1 — CONSULTA PROFESIONAL DE TICKETS
   ========================================================= */

/* ---------------------------------------------------------
   08.1.1 — CONTENEDORES PRINCIPALES
   --------------------------------------------------------- */

.vx-ticket-consult-page {
    display: grid;
    gap: 14px;
}

.vx-ticket-consult-page .vx-form-card,
.vx-ticket-consult-page .vx-panel {
    margin: 0;
}

.vx-ticket-consult-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.vx-ticket-consult-summary h5 {
    margin: 0 0 3px;
    color: var(--vx-text);
    font-size: 15px;
    font-weight: 800;
}

.vx-ticket-consult-summary p {
    margin: 0;
    color: var(--vx-muted);
    font-size: 12px;
}

/* ---------------------------------------------------------
   08.1.2 — FILTROS
   --------------------------------------------------------- */

.vx-ticket-filter-actions {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.vx-ticket-filter-actions .btn {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.vx-ticket-filter-actions .spinner-border {
    width: 14px;
    height: 14px;
}

/* ---------------------------------------------------------
   08.1.3 — TABLA DE TICKETS
   --------------------------------------------------------- */

.vx-panel .table-responsive {
    border-radius: inherit;
}

.vx-panel .table {
    min-width: 920px;
}

.vx-panel .table thead th {
    padding: 10px 12px;
    border-bottom: 1px solid var(--vx-border);
    color: var(--vx-muted);
    background: #f8fafc;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.vx-panel .table tbody td {
    padding: 10px 12px;
    border-bottom-color: var(--vx-border);
    color: var(--vx-text);
    font-size: 12px;
    vertical-align: middle;
}

.vx-panel .table tbody tr:last-child td {
    border-bottom: 0;
}

.vx-panel .table tbody tr {
    transition:
        background-color .15s ease,
        box-shadow .15s ease;
}

.vx-panel .table tbody tr:hover {
    background: #f8fbff;
}

.vx-panel .table tbody tr.table-active {
    --bs-table-bg-state: #eff6ff;
    box-shadow: inset 3px 0 0 #2563eb;
}

.vx-panel .table td strong {
    font-weight: 800;
}

.vx-panel .table .btn-sm {
    width: 31px;
    height: 31px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
}

.vx-panel .table .btn-sm i {
    margin: 0;
}

/* ---------------------------------------------------------
   08.1.4 — BADGES Y ESTADOS
   --------------------------------------------------------- */

.badge-soft-green {
    min-height: 25px;
    padding: 4px 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #166534;
    background: #dcfce7;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

.badge-soft-green i {
    margin: 0;
}

.vx-ticket-status-failed {
    min-height: 25px;
    padding: 4px 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #991b1b;
    background: #fee2e2;
    font-size: 10px;
    font-weight: 800;
}

.vx-ticket-status-pending {
    min-height: 25px;
    padding: 4px 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #92400e;
    background: #fef3c7;
    font-size: 10px;
    font-weight: 800;
}

/* ---------------------------------------------------------
   08.1.5 — DETALLE DEL TICKET
   --------------------------------------------------------- */

.vx-ticket-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.vx-ticket-detail-header small {
    display: block;
    margin-bottom: 2px;
    color: var(--vx-muted);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
}

.vx-ticket-detail-header h5 {
    margin: 0;
    color: var(--vx-text);
    font-size: 16px;
    font-weight: 850;
}

.vx-ticket-detail-field {
    min-height: 79px;
    padding: 12px 13px;
    border: 1px solid var(--vx-border);
    border-radius: 10px;
    display: grid;
    align-content: start;
    gap: 4px;
    background: #f8fafc;
}

.vx-ticket-detail-field > span:first-child {
    color: var(--vx-muted);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .015em;
    text-transform: uppercase;
}

.vx-ticket-detail-field > strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--vx-text);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
}

.vx-ticket-detail-field > small {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--vx-muted);
    font-size: 11px;
    line-height: 1.35;
}

/* ---------------------------------------------------------
   08.1.6 — PARTICIPANTES
   --------------------------------------------------------- */

.vx-ticket-participant-list {
    margin-top: 9px;
    display: grid;
    gap: 7px;
}

.vx-ticket-participant {
    min-width: 0;
    min-height: 51px;
    padding: 9px 10px;
    border: 1px solid var(--vx-border);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
}

.vx-ticket-participant > div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.vx-ticket-participant strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--vx-text);
    font-size: 12.5px;
    font-weight: 800;
}

.vx-ticket-participant small {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--vx-muted);
    font-size: 10.5px;
}

.vx-ticket-participant .badge {
    flex: 0 0 auto;
    font-size: 9.5px;
}

/* ---------------------------------------------------------
   08.1.7 — ACCIONES DEL DETALLE
   --------------------------------------------------------- */

.vx-ticket-detail-actions {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--vx-border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.vx-ticket-detail-actions .btn {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.vx-ticket-detail-actions .btn i {
    margin: 0;
}

/* ---------------------------------------------------------
   08.1.8 — RESULTADO DE ENVÍOS
   --------------------------------------------------------- */

.vx-ticket-delivery-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.vx-ticket-delivery-summary h5 {
    margin: 0 0 3px;
    color: var(--vx-text);
    font-size: 15px;
    font-weight: 800;
}

.vx-ticket-delivery-summary p {
    margin: 0;
    color: var(--vx-muted);
    font-size: 12px;
}

.vx-ticket-delivery-result {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 750;
}

.vx-ticket-delivery-result.success {
    color: #166534;
}

.vx-ticket-delivery-result.failed {
    color: #b91c1c;
}

.vx-ticket-delivery-result i {
    margin: 0;
}

/* ---------------------------------------------------------
   08.1.9 — ESTADOS VACÍOS Y CARGA
   --------------------------------------------------------- */

.vx-ticket-empty-state {
    min-height: 170px;
    padding: 30px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 6px;
    color: var(--vx-muted);
    text-align: center;
}

.vx-ticket-empty-state i {
    margin: 0;
    color: #94a3b8;
    font-size: 31px;
}

.vx-ticket-loading {
    min-height: 160px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    color: var(--vx-muted);
    text-align: center;
}

/* ---------------------------------------------------------
   08.1.10 — ALERTAS
   --------------------------------------------------------- */

.vx-ticket-alert {
    min-height: 44px;
    margin-bottom: 13px;
    padding: 10px 13px;
    border-radius: 10px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 12px;
}

.vx-ticket-alert i {
    margin: 1px 0 0;
    flex: 0 0 auto;
}

/* ---------------------------------------------------------
   08.1.11 — TABLET
   --------------------------------------------------------- */

@media (max-width: 1100px) {
    .vx-ticket-filter-actions {
        width: 100%;
    }

    .vx-ticket-filter-actions .btn {
        flex: 1 1 auto;
    }

    .vx-ticket-detail-field {
        min-height: 72px;
    }
}

/* ---------------------------------------------------------
   08.1.12 — MÓVIL
   --------------------------------------------------------- */

@media (max-width: 700px) {
    .vx-ticket-consult-summary,
    .vx-ticket-detail-header,
    .vx-ticket-delivery-summary {
        align-items: stretch;
        flex-direction: column;
    }

    .vx-ticket-filter-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .vx-ticket-filter-actions .btn {
        width: 100%;
    }

    .vx-ticket-detail-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .vx-ticket-detail-actions .btn {
        width: 100%;
    }

    .vx-ticket-participant {
        align-items: flex-start;
        flex-direction: column;
    }

    .vx-ticket-participant .badge {
        align-self: flex-start;
    }

    .vx-panel .table {
        min-width: 850px;
    }
}

/* =========================================================
   FIN SECTOR 08.1 — CONSULTA PROFESIONAL DE TICKETS
   ========================================================= */

/* =========================================================
   SECTOR 09.1 — INFORME EJECUTIVO
   ========================================================= */

.vx-executive-report-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #1d4ed8;
    background: #dbeafe;
    font-size: 21px;
}

.vx-executive-report-icon i {
    margin: 0;
}

.vx-executive-report-summary {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.vx-executive-report-summary > div {
    min-height: 70px;
    padding: 12px;
    border: 1px solid var(--vx-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
}

.vx-executive-report-summary i {
    width: 32px;
    height: 32px;
    margin: 0;
    border-radius: 8px;
    display: grid;
    place-items: center;
    flex: 0 0 32px;
    color: #1d4ed8;
    background: #dbeafe;
}

.vx-executive-report-summary span {
    color: var(--vx-text);
    font-size: 12px;
    font-weight: 750;
}

@media (max-width: 850px) {
    .vx-executive-report-summary {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .vx-executive-report-summary {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   FIN SECTOR 09.1 — INFORME EJECUTIVO
   ========================================================= */

/* =========================================================
   SECTOR 10.1 — MENÚ COMPACTO
   ========================================================= */

.vx-nav-compact {
    height: calc(100vh - 82px);
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.vx-nav-compact .vx-nav-section {
    margin: 5px 10px 3px;
    font-size: 9px;
}

.vx-nav-compact > a {
    min-height: 36px;
    height: 36px;
    padding: 0 10px;
    gap: 9px;
    font-size: 12.5px;
}

.vx-nav-group {
    margin: 0;
}

.vx-nav-group summary {
    min-height: 36px;
    padding: 0 10px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: rgba(255, 255, 255, .88);
    cursor: pointer;
    list-style: none;
    font-size: 12.5px;
    font-weight: 650;
    user-select: none;
}

.vx-nav-group summary::-webkit-details-marker {
    display: none;
}

.vx-nav-group summary:hover,
.vx-nav-group[open] > summary {
    color: #fff;
    background: rgba(255, 255, 255, .09);
}

.vx-nav-group-label {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}

.vx-nav-group-label > i {
    width: 19px;
    min-width: 19px;
    text-align: center;
    font-size: 16px;
}

.vx-nav-chevron {
    width: auto !important;
    min-width: auto !important;
    font-size: 10px !important;
    transition: transform .18s ease;
}

.vx-nav-group[open] .vx-nav-chevron {
    transform: rotate(180deg);
}

.vx-nav-submenu {
    margin: 1px 0 3px 14px;
    padding-left: 7px;
    border-left: 1px solid rgba(255, 255, 255, .15);
    display: grid;
    gap: 1px;
}

.vx-nav-submenu a {
    min-height: 32px !important;
    height: 32px !important;
    padding: 0 8px !important;
    gap: 7px !important;
    font-size: 11.5px !important;
}

.vx-nav-submenu a i {
    width: 17px !important;
    min-width: 17px !important;
    font-size: 13px !important;
}

.vx-nav-spacer {
    flex: 1 1 auto;
    min-height: 3px;
}

.vx-nav-logout {
    min-height: 36px !important;
    height: 36px !important;
    margin-top: 1px !important;
}

@media (max-width: 900px) {
    .vx-nav-compact {
        height: auto;
        overflow: visible;
    }

    .vx-nav-group summary {
        min-height: 42px;
    }

    .vx-nav-submenu a {
        min-height: 38px !important;
        height: 38px !important;
    }
}

/* =========================================================
   FIN SECTOR 10.1 — MENÚ COMPACTO
   ========================================================= */
