:root {
    --primary-color: #0d6efd;
    --primary-dark: #0043a8;
    --secondary-color: #f8f9fa;
    --background-color: #f1f5f9;
    --text-dark: #1e293b;
    --card-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --card-hover-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

body {
    background-color: var(--background-color);
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
}

/* Tarjetas del menú principal */
.menu-card {
    background: #ffffff;
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.75rem 1.25rem;
    height: 100%;
}
.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
    color: var(--primary-color);
}
.menu-card .icon {
    font-size: 2.6rem;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
}
.menu-card h4 {
    font-weight: 600;
    font-size: 1.15rem;
    margin: 0;
}
.menu-card p {
    font-size: 0.85rem;
}

/* Indicadores del tablero */
.kpi {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 1rem 1.25rem;
    height: 100%;
}
.kpi .valor {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
}
.kpi .etiqueta {
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.kpi.alerta .valor { color: #dc3545; }
.kpi.aviso .valor { color: #b45309; }
.kpi.bien .valor { color: #198754; }

/* Ingreso */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d6efd 0%, #0043a8 100%);
    padding: 1rem;
}
.login-card {
    width: 100%;
    max-width: 400px;
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2);
}
.login-logo {
    max-height: 80px;
}

.btn-primary-custom {
    background-color: var(--primary-color);
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: background 0.2s;
}
.btn-primary-custom:hover {
    background-color: #0b5ed7;
}

/* Secciones de cada módulo (igual que config.html de opsencuestas) */
.settings-section .card {
    border: none;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
}
.settings-section .card-header {
    background-color: #ffffff;
    border-bottom: 2px solid var(--background-color);
    font-weight: 600;
    color: var(--primary-color);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}
.sub-card {
    cursor: pointer;
    border-radius: 10px !important;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.sub-card h6 { font-size: 0.85rem; }
.sub-card.active {
    background-color: var(--primary-color);
    color: #fff;
}
.navbar-logo {
    object-fit: contain;
}

/* Tablas */
table.dataTable td, table.dataTable th { font-size: 0.85rem; }
.table-sm td, .table-sm th { vertical-align: middle; }
.matriz-permisos th, .matriz-permisos td { text-align: center; }
.matriz-permisos td:first-child, .matriz-permisos th:first-child { text-align: left; }

/* Hoja de vida */
.hv-seccion { margin-bottom: 1.25rem; }
.hv-seccion h6 {
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: .3rem;
    margin-bottom: .6rem;
}
.hv-dato small { color: #64748b; display: block; font-size: .72rem; text-transform: uppercase; }
.hv-dato span { font-weight: 600; }

/* Portal del conductor (celular) */
.portal .card { border: none; border-radius: 12px; box-shadow: var(--card-shadow); }
.portal .btn-lg { border-radius: 10px; }
.item-chequeo { border-bottom: 1px solid #eef2f7; padding: .6rem 0; }
.item-chequeo:last-child { border-bottom: none; }

/* Gráficas */
.grafica { position: relative; height: 320px; }

/* SweetAlert más compacto (como en opsencuestas) */
.swal2-popup {
    font-size: 0.85em !important;
    width: 24em !important;
    padding: 1.25em !important;
}
.swal2-popup.swal-formulario { width: 32em !important; }
.swal2-title { font-size: 1.5em !important; }
.swal2-icon {
    transform: scale(0.75);
    margin: 1em auto .5em !important;
}

@media print {
    .navbar, .no-print, .sub-card, .dataTables_filter, .dataTables_length, .dataTables_paginate { display: none !important; }
    body { background: #fff; }
}
