/* Variables CSS para estado inicial de sidebar + tokens UI */
:root {
    --sidebar-width: 250px;
    /* Neutros modernos (look más profesional y menos "pesado") */
    --se-surface: #ffffff;
    --se-surface-2: #f6f7fb;
    --se-border: rgba(15, 23, 42, 0.10);
    --se-text: #0f172a;
    --se-muted: #64748b;

    /* Sidebar (clara por defecto) */
    --sidebar-bg: var(--se-surface);
    --sidebar-text: var(--se-text);
    --sidebar-muted: var(--se-muted);
    --sidebar-hover-bg: rgba(15, 23, 42, 0.04);
    --sidebar-active-bg: rgba(var(--main-color-rgb, 59, 130, 246), 0.10);
    --sidebar-active-border: rgba(var(--main-color-rgb, 59, 130, 246), 0.22);

    /* Sombras sutiles */
    --card-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    --card-shadow-hover: 0 10px 22px rgba(15, 23, 42, 0.08);
}

/* ==================================
   Admin UI (desktop) — minimalista
   ================================== */

.admin-shell {
    background: radial-gradient(1200px 400px at 20% -10%, rgba(var(--main-color-rgb), 0.10), transparent 70%),
                #f7f9fc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1.5rem;
}

.panel-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1.25rem;
    background: rgba(255,255,255,0.96);
    box-shadow: var(--card-shadow);
}

.kpi-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    background: rgba(255,255,255,0.95);
    box-shadow: var(--card-shadow);
}

.kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--main-color-rgb), 0.14);
    color: var(--main-color);
    flex: 0 0 auto;
}

/* ================================
   Buscador en campos desplegables
   ================================ */

.select-search-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
}

.select-search-wrapper > input.form-control {
    width: 100%;
}

/* ================================
   Select2 (buscador al desplegar)
   ================================ */

.select2-container {
    width: 100% !important;
}

.select2-hide-floating-label {
    display: none !important;
}

.select2-container--default .select2-selection--single {
    min-height: calc(1.5em + 0.75rem + 2px);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background-color: var(--bs-body-bg);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: calc(1.5em + 0.75rem);
    padding-left: 0.75rem;
    padding-right: 2rem;
    color: var(--bs-body-color);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    right: 0.75rem;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    padding: 0.375rem 0.75rem;
}

/* En modales Bootstrap, asegurar que el dropdown quede por encima del backdrop */
.modal .select2-container--open {
    z-index: calc(var(--bs-modal-zindex, 1055) + 5);
}

.modal .select2-dropdown {
    z-index: calc(var(--bs-modal-zindex, 1055) + 6);
}

/* Estado inicial de la sidebar basado en localStorage */
.sidebar-collapsed-init .sidebar {
    width: 70px !important;
    transition: none !important;
}

.sidebar-collapsed-init .sidebar .sidebar-title,
.sidebar-collapsed-init .sidebar .sidebar-label {
    display: none !important;
}

.sidebar-collapsed-init .sidebar .sidebar-header {
    justify-content: center !important;
}

.sidebar-collapsed-init .sidebar .sidebar-brand {
    width: 0;
    overflow: hidden;
    opacity: 0;
    display: none;
}

.sidebar-collapsed-init .sidebar #sidebar-toggle {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.sidebar-collapsed-init .sidebar #sidebar-toggle .bi {
    transform: rotate(180deg);
}

.sidebar-collapsed-init .with-sidebar {
    margin-left: 70px !important;
    transition: none !important;
}

.sidebar-expanded-init .sidebar {
    width: 250px !important;
    transition: none !important;
}

.sidebar-expanded-init .with-sidebar {
    margin-left: 250px !important;
    transition: none !important;
}

/* Sidebar styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width, 250px);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--se-border);
    box-shadow: none;
}

/* Activar transiciones solo después de la carga inicial */
.sidebar.expanded,
.sidebar.collapsed {
    transition: width 0.3s cubic-bezier(.4,0,.2,1);
}

/* Sidebar collapsed: show only icons, keep sidebar full height and avoid content cut-off */
.sidebar.collapsed {
    width: 70px !important; /* !important para sobrescribir las clases de inicialización */
    overflow-x: hidden;
    overflow-y: auto;
}

/* Sidebar expanded: mostrar completa */
.sidebar.expanded {
    width: 250px !important; /* !important para sobrescribir las clases de inicialización */
}

.sidebar-header {
    min-height: 92px;
    border-bottom: 1px solid var(--se-border);
}
.sidebar-brand {
    color: var(--sidebar-text) !important;
    font-size: 1.3rem;
    text-decoration: none;
    white-space: nowrap;
}

.sidebar-logo {
    height: 68px;
    width: auto;
    max-width: 260px;
    object-fit: contain;
    display: block;
}

.sidebar.collapsed .sidebar-logo,
.sidebar-collapsed-init .sidebar .sidebar-logo {
    height: 56px;
    max-width: 72px;
}
.sidebar-title {
    transition: opacity 0.2s;
}
/* Hide sidebar title when collapsed */
.sidebar.collapsed .sidebar-title,
.sidebar-collapsed-init .sidebar .sidebar-title {
    opacity: 0;
    width: 0;
    overflow: hidden;
    display: none;
}

.sidebar-nav {
    margin-top: 1.5rem;
    flex: 1 1 auto;
}
.sidebar-nav .nav-link {
    color: var(--sidebar-muted);
    padding: 0.75rem 1.2rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.sidebar-nav .nav-link.active {
    background: var(--sidebar-active-bg) !important;
    color: var(--sidebar-text) !important;
    box-shadow: inset 0 0 0 1px var(--sidebar-active-border);
}
.sidebar-nav .nav-link:hover:not(.active),
.sidebar-nav .nav-link:focus:not(.active) {
    background: var(--sidebar-hover-bg);
    color: var(--sidebar-text);
}
.sidebar-nav .nav-link i {
    font-size: 1.5rem;
    min-width: 32px;
    text-align: center;
    color: var(--sidebar-muted);
}
.sidebar-nav .nav-link.active i {
    color: var(--main-color);
}

/* Submenú colapsable (Gestión) */
.sidebar-subnav {
    margin-left: 0.4rem;
    padding-left: 0.6rem;
    border-left: 1px solid var(--se-border);
}
.sidebar-subnav .nav-link {
    padding: 0.55rem 1.2rem;
    opacity: 0.95;
}
.sidebar-subnav .nav-link i {
    font-size: 1.25rem;
}
.sidebar-caret {
    font-size: 0.9rem;
    opacity: 0.75;
}
.sidebar.collapsed .sidebar-caret,
.sidebar-collapsed-init .sidebar .sidebar-caret {
    display: none !important;
}
/* Hide sidebar labels when collapsed */
.sidebar.collapsed .sidebar-label,
.sidebar-collapsed-init .sidebar .sidebar-label {
    display: none !important;
}
/* Adjust sidebar toggle button position and style for collapsed state */
/* When sidebar is collapsed, center the toggle button and keep dropdown accessible */
.sidebar.collapsed .sidebar-header,
.sidebar-collapsed-init .sidebar .sidebar-header {
    justify-content: center !important;
}
.sidebar.collapsed .sidebar-footer .dropdown,
.sidebar-collapsed-init .sidebar .sidebar-footer .dropdown {
    display: flex;
    justify-content: center;
}
.sidebar.collapsed .sidebar-footer .dropdown-toggle,
.sidebar-collapsed-init .sidebar .sidebar-footer .dropdown-toggle {
    padding: 0.5rem;
    width: 40px;
    justify-content: center;
}
.sidebar.collapsed .sidebar-footer .sidebar-label,
.sidebar-collapsed-init .sidebar .sidebar-footer .sidebar-label {
    display: none !important;
}
.sidebar.collapsed .sidebar-footer .dropdown-menu,
.sidebar-collapsed-init .sidebar .sidebar-footer .dropdown-menu {
    left: 60px !important;
    top: 0 !important;
    min-width: 160px;
}
.sidebar.collapsed #sidebar-toggle,
.sidebar-collapsed-init .sidebar #sidebar-toggle {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0.25rem 0.5rem;
}
.sidebar.collapsed .sidebar-brand,
.sidebar-collapsed-init .sidebar .sidebar-brand {
    padding: 0;
}
.sidebar.collapsed .sidebar-header .sidebar-brand,
.sidebar-collapsed-init .sidebar .sidebar-header .sidebar-brand {
    width: 0;
    overflow: hidden;
    opacity: 0;
    display: none;
}

.sidebar-footer {
    border-top: 1px solid var(--se-border);
    padding-top: 1rem;
}
.sidebar .dropdown-toggle {
    color: var(--sidebar-text) !important;
}
.sidebar .dropdown-toggle i {
    color: var(--main-color);
}
.sidebar #sidebar-toggle {
    border-color: var(--se-border) !important;
    color: var(--sidebar-muted) !important;
}
.sidebar #sidebar-toggle:hover {
    background: var(--sidebar-hover-bg) !important;
}
.sidebar .dropdown-toggle::after {
    display: none;
}
@media (max-width: 992px) {
    .sidebar {
        width: 70px;
    }
    .sidebar.expanded {
        width: 250px;
    }
}
/* Main content with sidebar */
.with-sidebar {
    margin-left: var(--sidebar-width, 250px);
}

/* Activar transiciones solo cuando las clases expanded/collapsed están presentes */
.sidebar.expanded ~ .with-sidebar,
.sidebar.collapsed ~ .with-sidebar {
    transition: margin-left 0.3s cubic-bezier(.4,0,.2,1);
}

.sidebar.collapsed ~ .with-sidebar {
    margin-left: 70px !important; /* !important para sobrescribir las reglas de inicialización */
}

.sidebar.expanded ~ .with-sidebar {
    margin-left: 250px !important; /* !important para sobrescribir las reglas de inicialización */
}
@media (max-width: 992px) {
    .with-sidebar {
        margin-left: 70px;
    }
    .sidebar.expanded ~ .with-sidebar {
        margin-left: 250px;
    }
}
/* Nuevo diseño del contador de tiempo trabajado */
.time-tracker-card {
    background: linear-gradient(135deg, var(--main-color) 0%, #2b5876 100%);
    border: none;
    position: relative;
    overflow: hidden;
    min-height: 200px;
}

.time-display-container {
    position: relative;
    z-index: 2;
}

.time-icon i {
    font-size: 2.5rem;
    opacity: 0.9;
}

.time-display {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.time-display .hours,
.time-display .minutes {
    font-size: 4rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.time-display .separator {
    font-size: 3rem;
    color: rgba(255,255,255,0.8);
    font-weight: 300;
    margin: 0 0.2rem;
}

.time-labels {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-left: 0.5rem;
    align-self: flex-end;
    margin-bottom: 0.5rem;
}

.time-labels .hour-label,
.time-labels .minute-label {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1;
}

.progress-circle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #ffffff 0deg, #ffffff calc(var(--progress, 0) * 3.6deg), rgba(255,255,255,0.2) calc(var(--progress, 0) * 3.6deg), rgba(255,255,255,0.2) 360deg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.progress-circle::before {
    content: '';
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--main-color) 0%, #2b5876 100%);
    position: absolute;
}

.progress-value {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.progress-value .percentage {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
    line-height: 1;
}

.progress-value .progress-label {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 500;
}

.decorative-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    z-index: 1;
}

.decorative-shape.shape-1 {
    width: 150px;
    height: 150px;
    top: -75px;
    right: -75px;
}

.decorative-shape.shape-2 {
    width: 80px;
    height: 80px;
    bottom: -40px;
    left: -40px;
    background: rgba(255,255,255,0.05);
}

.decorative-shape.shape-3 {
    width: 60px;
    height: 60px;
    top: 50%;
    right: 10%;
    background: rgba(255,255,255,0.08);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .time-display .hours,
    .time-display .minutes {
        font-size: 3rem;
    }
    
    .time-display .separator {
        font-size: 2.5rem;
    }
    
    .progress-circle {
        width: 100px;
        height: 100px;
    }
    
    .progress-circle::before {
        width: 75px;
        height: 75px;
    }
    
    .progress-value .percentage {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .time-tracker-card .row {
        text-align: center;
    }
    
    .time-tracker-card .col-lg-4 {
        margin-top: 2rem;
    }
    
    .time-display {
        justify-content: center;
    }
}
/* Custom CSS for Portal del Empleado */

/* Global Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
    line-height: 1.6;
    /* --main-color: #4F8EF7; */
}

/* Main color utility classes */
.bg-main {
    background: var(--main-color) !important;
}
.text-main {
    color: var(--main-color) !important;
}
.btn-main {
    background: var(--main-color) !important;
    border: none;
    color: #fff;
    transition: all 0.3s;
}
.btn-main:hover {
    filter: brightness(1.1);
}
.btn-outline-main {
    border: 1px solid rgba(var(--main-color-rgb, 79, 142, 247), 0.55) !important;
    color: var(--main-color) !important;
    background: transparent !important;
    transition: all 0.3s;
}
.btn-outline-main:hover {
    background: rgba(var(--main-color-rgb, 79, 142, 247), 0.1) !important;
    transform: none;
}
.btn-outline-main.active {
    background: var(--main-color) !important;
    color: #fff !important;
    border-color: var(--main-color) !important;
}
.navbar-main {
    background: linear-gradient(90deg, var(--main-color) 0%, #2b5876 100%) !important;
}

/* Login Page Styles */

.login-container {
    min-height: 100vh;
    background: linear-gradient(120deg, var(--main-color) 0%, #2b5876 100%);
}

.login-form-container {
    max-width: 400px;
    width: 100%;
    padding: 2rem;
}

.login-icon i {
    font-size: 4rem;
}

.login-form {
    background: white;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.login-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grid" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M 50 0 L 0 0 0 50" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 80%;
}

.hero-overlay {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    padding: 3rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Dashboard Styles */

.welcome-card {
    background: linear-gradient(90deg, var(--main-color) 0%, #2b5876 100%);
    border: none;
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30px, -30px);
}


.bg-gradient-primary {
    background: linear-gradient(90deg, var(--main-color) 0%, #2b5876 100%) !important;
}

.action-icon i {
    font-size: 3rem;
}

.card {
    transition: all 0.3s ease;
    border-radius: 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: var(--card-shadow);
}

.card:hover {
    transform: none;
    box-shadow: var(--card-shadow-hover);
}

/* Button Styles */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}


.btn-primary {
    background: var(--main-color);
    border-color: var(--main-color);
    box-shadow: none;
}

.btn-primary:hover {
    filter: brightness(0.96);
    box-shadow: none;
}

.btn-success {
    background: var(--bs-success);
    border-color: var(--bs-success);
    box-shadow: none;
}

.btn-success:hover {
    filter: brightness(0.96);
    box-shadow: none;
}

.btn-danger {
    background: var(--bs-danger);
    border-color: var(--bs-danger);
    box-shadow: none;
}

.btn-danger:hover {
    filter: brightness(0.96);
    box-shadow: none;
}

/* Table Styles */
.table {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

/* Badge Styles */
.badge {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 500;
}

/* Empty State */
.empty-state i {
    font-size: 4rem;
    opacity: 0.5;
}

/* Form Styles */
.form-floating > .form-control {
    border-radius: 0.5rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}


.form-floating > .form-control:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 0.25rem rgba(79, 142, 247, 0.15);
    transform: translateY(-1px);
}

.form-floating > .form-select:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 0.25rem rgba(79, 142, 247, 0.15);
    transform: translateY(-1px);
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    margin: 0 0.25rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-form-container {
        padding: 1rem;
    }
    
    .login-form {
        padding: 2rem;
    }
    
    .hero-overlay {
        padding: 2rem;
    }
    
    .welcome-card {
        text-align: center;
    }
    
    .current-time {
        margin-top: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-in-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--main-color) 0%, #2b5876 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #3a6fd8 0%, #2b5876 100%);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

/* Icono minimalista girando (Bootstrap Icons) */
.se-spin {
    display: inline-block;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   ESTILOS ADICIONALES PARA TEMPLATES MODERNAS
   ============================================ */

/* FullCalendar: Mejorar nombres de días y números de días */
.fc .fc-col-header-cell-cushion {
    font-weight: 700;
    color: var(--main-color);
    padding: 6px 0;
    text-transform: uppercase;
    font-size: 0.8rem;
    border: none !important;
    box-shadow: 0 2px 8px rgba(79,142,247,0.04);
    transition: background 0.2s;
}

.fc .fc-daygrid-day-number {
    font-weight: 600;
    color: #222;
    background: #fff;
    border-radius: 50%;
    width: 2.1em;
    height: 2.1em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 0.95rem;
    border: 2px solid transparent;
    box-shadow: 0 1px 4px rgba(79,142,247,0.07);
    transition: background 0.2s, color 0.2s, border 0.2s;
    cursor: pointer;
    position: relative;
    z-index: 1;
    text-decoration: none !important;
}

.fc .fc-daygrid-day-number:hover, .fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-number {
    background: var(--main-color);
    color: #fff;
    border: 2px solid #2b5876;
    box-shadow: 0 2px 10px rgba(79,142,247,0.13);
}

.fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-number {
    background: #198754;
    color: #fff;
    border: 2px solid #198754;
}

.fc .fc-daygrid-day {
    background: transparent;
    border: none;
}

.fc .fc-daygrid-day-frame {
    background: transparent;
    border-radius: 12px;
    transition: background 0.2s;
}

.fc .fc-daygrid-day-frame:hover {
    background: rgba(79,142,247,0.07);
}

/* Quitar subrayado feo de los días */
.fc .fc-daygrid-day-number {
    text-decoration: none !important;
    border-bottom: none !important;
}

/* Mejoras para formularios */
.form-floating > .form-control:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 0.25rem rgba(79, 142, 247, 0.15);
    transform: translateY(-1px);
}

.form-floating > .form-select:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 0.25rem rgba(79, 142, 247, 0.15);
    transform: translateY(-1px);
}

/* Animaciones mejoradas para cards */
.card.fade-in {
    animation: cardFadeIn 0.6s ease-out forwards;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mejoras para badges */
.badge {
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.badge:hover {
    transform: scale(1.05);
}

/* Efectos hover para filas de tabla */
.table tbody tr {
    transition: all 0.3s ease;
    cursor: default;
}

.table tbody tr:hover {
    background-color: rgba(79, 142, 247, 0.05) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

/* Mejoras para botones */
.btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-main:hover {
    box-shadow: 0 8px 25px rgba(79, 142, 247, 0.3);
}

.btn-success:hover {
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.btn-warning:hover {
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
}

/* Mejoras para estado vacío */
.empty-state {
    padding: 3rem 2rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    transition: all 0.3s ease;
}

.empty-state:hover {
    border-color: var(--main-color);
    background: linear-gradient(135deg, rgba(79, 142, 247, 0.05) 0%, rgba(79, 142, 247, 0.02) 100%);
}

/* Mejoras para alertas */
.alert {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-left: 4px solid;
}

.alert-info {
    border-left-color: #0dcaf0;
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.1) 0%, rgba(13, 202, 240, 0.05) 100%);
}

.alert-warning {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
}

.alert-success {
    border-left-color: #198754;
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.1) 0%, rgba(25, 135, 84, 0.05) 100%);
}

/* Mejoras para selects y inputs de fecha */
.form-control[type="date"], .form-select {
    background-image: none;
    padding-right: 2.25rem;
}

.form-control[type="date"]::-webkit-calendar-picker-indicator {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%23212529' d='M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0zM1.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0z'/%3e%3c/svg%3e");
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.form-control[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Mejoras para progress bars en cards de tiempo */
.progress-info {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    overflow: hidden;
    height: 8px;
    margin-top: 1rem;
}

.progress-info .progress-bar {
    background: rgba(255, 255, 255, 0.9);
    transition: width 2s ease-in-out;
}

/* Mejoras para tooltips personalizados */
.tooltip-hover {
    position: relative;
    cursor: help;
}

.tooltip-hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

.tooltip-hover:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Mejoras para iconos */
.bi {
    transition: all 0.3s ease;
}

.card-header .bi, .btn .bi {
    vertical-align: -0.125em;
}

/* Mejoras para el texto truncado con hover */
.text-truncate[title] {
    cursor: help;
    transition: all 0.3s ease;
}

.text-truncate[title]:hover {
    color: var(--main-color) !important;
    text-decoration: underline;
}

/* Mejoras para mensajes flash */
.alert-dismissible {
    animation: slideInDown 0.4s ease-out;
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mejoras para dropdowns */
.dropdown-menu {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 0.75rem;
    animation: dropdownFadeIn 0.3s ease-out;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    margin: 0.25rem 0.5rem;
    width: 86%;
}

.dropdown-item:hover {
    color: var(--main-color);
    transform: translateX(5px);
}

/* Responsive improvements */
@media (max-width: 768px) {
    .welcome-card h1 {
        font-size: 1.5rem !important;
    }
    
    .welcome-card p {
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1.5rem !important;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Mejoras para estados de carga */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(79, 142, 247, 0.2);
    border-left: 4px solid var(--main-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Mejoras para navegación activa */
.nav-link.active {
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 0.75rem !important;
    font-weight: 600 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Reglas para el icono del botón toggle */
.sidebar.collapsed #sidebar-toggle .bi,
.sidebar-collapsed-init .sidebar #sidebar-toggle .bi {
    transform: rotate(180deg);
}

.sidebar.expanded #sidebar-toggle .bi {
    transform: rotate(0deg);
}

/* =========================================================
   Professional Theme Overrides (SaaS / Mobile-first)
   ========================================================= */

body {
    background-color: #F8FAFC;
    color: #0f172a;
}

/* Sidebar: navy / slate */
.sidebar {
    background: linear-gradient(135deg, var(--brand-primary, #1E293B) 0%, #0b1220 100%) !important;
    box-shadow: 0 18px 46px rgba(2, 6, 23, 0.22) !important;
}

/* Buttons: solid action */
.btn-main {
    background: var(--main-color) !important;
    border: 1px solid rgba(0,0,0,0.06) !important;
    color: #fff !important;
}
.btn-main:hover {
    filter: brightness(0.98);
    box-shadow: 0 12px 26px rgba(var(--main-color-rgb, 59, 130, 246), 0.22);
}

/* Login: less saturated, strong right panel */
.login-container {
    background: #F8FAFC !important;
}

.login-left {
    background: #F8FAFC;
}

.login-panel {
    width: min(420px, 92vw);
    padding: 2.0rem 1.75rem;
}

@media (min-width: 992px) {
    /* En la maqueta, el bloque izquierdo queda levemente más arriba del centro */
    .login-panel {
        transform: translateY(-64px);
    }
}

.login-top {
    margin-top: -20px;
}

.login-logo img {
    width: clamp(220px, 20vw, 320px);
    height: clamp(220px, 20vw, 320px);
    object-fit: contain;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.login-heading {
    font-weight: 700;
    font-size: 1.02rem;
    color: #111827;
}

.login-form {
    background: transparent;
    padding: 0;
    border: 0;
    box-shadow: none;
}

.login-form .form-control {
    height: 44px;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: #fff;
    font-weight: 500;
}

.login-form .form-control::placeholder {
    color: rgba(100, 116, 139, 0.85);
}

.login-form .form-control:focus {
    border-color: rgba(var(--main-color-rgb, 59, 130, 246), 0.9) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--main-color-rgb, 59, 130, 246), 0.10) !important;
}

.login-form .btn.btn-main {
    height: 44px;
    border-radius: 6px !important;
    font-weight: 700;
    font-size: 0.98rem;
    box-shadow: 0 10px 22px rgba(var(--main-color-rgb, 59, 130, 246), 0.22);
}

.login-help {
    font-size: 0.85rem;
    color: #334155;
}

/* Alerts en login: asegurar visibilidad y contraste */
.login-panel .alert {
    margin-top: 1rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

.login-panel .alert-danger {
    background-color: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FCA5A5;
    border-left: 4px solid #DC2626;
}

.login-panel .alert-success {
    background-color: #D1FAE5;
    color: #065F46;
    border: 1px solid #6EE7B7;
    border-left: 4px solid #10B981;
}

.login-hero {
    background: linear-gradient(180deg, #0b1220 0%, #111c33 100%) !important;
    display: flex;
    align-items: center;
}

.login-hero .hero-content {
    position: static;
    transform: none;
    text-align: left;
    width: 100%;
    padding: clamp(2.5rem, 6vw, 5rem);
}

.login-hero .hero-overlay {
    backdrop-filter: none;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: 0;
}

.login-hero .hero-title {
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 0 0 1rem;
    font-size: clamp(2.25rem, 4vw, 3.25rem);
}

.login-hero .hero-subtitle {
    color: rgba(255,255,255,0.62);
    font-size: 1rem;
    max-width: 44ch;
    margin: 0;
}

@media (max-width: 992px) {
    .login-panel { padding: 2rem 1.25rem; }
}

/* Reduce flashy effects */
.btn::before { display: none !important; }
.btn:hover { transform: none !important; }
.card:hover { transform: none !important; }
.table tbody tr:hover { transform: none !important; box-shadow: none !important; }
.nav-link.active { transform: none !important; box-shadow: none !important; }

/* Clean tables (no vertical lines, subtle dividers) */
.table.table-clean > :not(caption) > * > * {
    border-bottom-color: rgba(15, 23, 42, 0.08);
}
.table.table-clean thead th {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.85rem;
    color: #334155;
}
.table.table-clean tbody tr:hover {
    background-color: rgba(var(--main-color-rgb, 59, 130, 246), 0.04) !important;
}

/* Soft badges */
.badge-soft-success {
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.25);
}
.badge-soft-warning {
    background: rgba(245, 158, 11, 0.14);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.25);
}
.badge-soft-info {
    background: rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
    border: 1px solid rgba(59, 130, 246, 0.25);
}
.badge-soft-danger {
    background: rgba(244, 63, 94, 0.14);
    color: #be123c;
    border: 1px solid rgba(244, 63, 94, 0.25);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
    flex: 0 0 auto;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.75);
}

/* ================================
   Employee mobile cards (Rutas)
   ================================ */
.se-page {
    background: #f3f4f6;
    min-height: 100dvh;
    overflow-x: hidden;
}
.is-employee {
    background: #f3f4f6;
    overflow-x: hidden;
}
.is-employee main.with-tabbar {
    background: #f3f4f6;
    overflow-x: hidden;
}
.se-mobile { max-width: 520px; }

/* Minimal employee layout (inspirado en el mock) */
.em-min-page {
    min-height: 100dvh;
    padding: 14px 14px 10px;
}
.em-min-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 2px 10px;
}
.em-min-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.em-min-logo {
    height: 66px;
    width: auto;
    max-width: 300px;
    object-fit: contain;
}
.em-min-title {
    font-weight: 800;
    font-size: 1.05rem;
    color: #0f172a;
    line-height: 1.1;
}
.em-min-subtitle {
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
    margin-top: 2px;
}
.em-min-avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(15, 23, 42, 0.10);
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex: 0 0 auto;
}
.em-min-avatar i { font-size: 1.1rem; }
.em-min-initials {
    font-weight: 900;
    font-size: 0.80rem;
    letter-spacing: 0.02em;
}


.em-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 6px 0 0;
}
.em-card {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
    min-height: 72px;
}
.em-card-left {
    height: 100%;
    background: linear-gradient(180deg, rgba(var(--main-color-rgb, 59, 130, 246), 1) 0%, rgba(43, 88, 118, 1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.em-card-left i { color: #fff; font-size: 1.45rem; }
.em-card-body {
    min-width: 0;
    padding: 10px 0;
}
.em-card-title {
    font-weight: 900;
    color: #0f172a;
    font-size: 0.98rem;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.em-card-meta {
    margin-top: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.em-card-right {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 12px;
}
.em-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.75rem;
    font-weight: 800;
    border: 1px solid transparent;
    white-space: nowrap;
}
.em-badge-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}
.em-badge--enruta {
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
    border-color: rgba(16, 185, 129, 0.25);
}
.em-badge--enruta .em-badge-dot { background: rgba(16, 185, 129, 0.95); }

.em-badge--pendiente {
    background: rgba(148, 163, 184, 0.18);
    color: #475569;
    border-color: rgba(148, 163, 184, 0.30);
}
.em-badge--pendiente .em-badge-dot { background: rgba(148, 163, 184, 0.95); }

.em-badge--finalizada {
    background: rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, 0.25);
}
.em-badge--finalizada .em-badge-dot { background: rgba(59, 130, 246, 0.95); }

.em-action {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255,255,255,0.95);
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.em-action i { font-size: 1.1rem; }
.em-action:active { transform: translateY(1px); }

.em-empty {
    margin-top: 14px;
    padding: 18px;
    border: 1px dashed rgba(15, 23, 42, 0.14);
    border-radius: 16px;
    background: rgba(255,255,255,0.7);
    text-align: center;
}
.em-empty .t1 {
    font-weight: 900;
    color: #0f172a;
    margin-top: 6px;
}
.em-empty .t2 {
    color: #64748b;
    font-weight: 600;
    font-size: 0.85rem;
    margin-top: 6px;
}

/* App bar (mock-like, dark) */
.se-appbar {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 12px 0 22px;
    background: #0B2440;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

/* “Border-radius inverso” abajo en la cabecera (corte cóncavo visual).
   Truco: dibujar un bloque del color del fondo con radio arriba, pegado al bottom del appbar. */
.is-employee .se-appbar {
    border-bottom: 0;
}
.is-employee .se-appbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 24px;
    background: #E9EEF3;
    border-top-left-radius: 26px;
    border-top-right-radius: 26px;
    pointer-events: none;
}
.se-appbar-inner {
    position: relative;
    z-index: 3;
    padding-left: 16px;
    padding-right: 16px;
}
.se-appbar-row {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 8px;
}
.se-appbar-spacer { width: 44px; height: 32px; }
.se-appbar-brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    justify-self: center;
}


.se-appbar-logo {
    height: 70px;
    width: auto;
    max-width: 78vw;
    object-fit: contain;
}
.se-appbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.22);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex: 0 0 auto;
    justify-self: end;
}
.se-appbar-avatar i { font-size: 1.05rem; }
.se-appbar-initials {
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    line-height: 1;
}

/* Section heading under appbar */
.se-section-head {
    padding: 10px 8px 4px;
}
.se-section-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
}
.se-section-sub {
    margin-top: 4px;
    font-size: 0.80rem;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.02em;
}

/* Center stage for empty cards */
.se-center-stage {
    min-height: calc(100dvh - 66px - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px 0;
}

/* Outer body behind the floating card (curved with appbar) */
.is-employee .se-shell {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 26px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.70),
        inset 0 -1px 0 rgba(15, 23, 42, 0.04),
        0 14px 34px rgba(15, 23, 42, 0.10);
    /* Ojo: al ser .container-fluid, Bootstrap mete width:100%.
       Si además hay margen lateral, se genera overflow horizontal y la tabbar parece “corrida”. */
    width: calc(100% - 20px);
    max-width: 520px;
    margin: 6px auto 12px;
    padding: 22px 18px 18px !important;
    overflow: hidden;
}

.is-employee .se-shell::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 18px;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.10), rgba(15, 23, 42, 0.00));
    opacity: 0.25;
}

.is-employee .se-shell.se-shell-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.is-employee .se-shell.se-shell-center .se-surface {
    width: 100%;
}

/* Inner floating card when inside the shell */
.is-employee .se-shell .se-surface {
    margin: 0;
    min-height: 0;
    background: transparent;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    padding: 0;
}

.is-employee .se-shell .se-surface::before {
    content: none;
}



/* Floating body surface (like mock) */
.se-surface {
    position: relative;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 26px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.70),
        inset 0 -1px 0 rgba(15, 23, 42, 0.04),
        0 18px 44px rgba(15, 23, 42, 0.12);
    padding: 22px 18px;
    margin: -14px 10px 12px;
    min-height: 0;
}

.se-surface::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 18px;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.10), rgba(15, 23, 42, 0.00));
    opacity: 0.35;
}
.se-surface-center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100dvh - 66px - 112px);
}
.se-surface-center .se-route-card.se-empty-card {
    box-shadow: none;
    background: transparent;
}
.se-surface-center .se-empty-card {
    margin: 0;
}

.se-header {
    width: 100%;
    padding: 14px 0 18px;
    border-radius: 0;
    background: #F3F4F6;
    border: 0;
    box-shadow: none;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.se-header-inner {
    padding-left: 16px;
    padding-right: 16px;
}
.se-header-top {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 8px;
}
.se-header-spacer { width: 44px; height: 44px; }
.se-topicon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255,255,255,0.90);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    text-decoration: none;
    position: relative;
}
.se-topicon i { font-size: 1.35rem; }
.se-topicon[disabled] { opacity: 0.55; }
.se-header-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}
.se-logo {
    width: auto;
    height: 46px;
    max-width: min(240px, 62vw);
    object-fit: contain;
    transform: scale(1.35);
    transform-origin: center;
    will-change: transform;
}
.se-brand {
    display: none;
}
.se-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
}
.se-dateblock {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}
.se-day {
    font-size: 0.72rem;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.08em;
}
.se-day::after {
    content: "·";
    margin-left: 8px;
    color: #94a3b8;
    font-weight: 700;
}
.se-date {
    font-size: 0.80rem;
    font-weight: 600;
    color: #94a3b8;
}
.se-avatar {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 0;
    background: rgba(255,255,255,0.98);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    text-decoration: none;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.10);
}
.se-avatar i { font-size: 1.2rem; }
.se-avatar-dot { position: relative; }
.se-avatar-dot::after {
    content: "";
    position: absolute;
    top: 9px;
    right: 9px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(248,250,252,1);
}

.se-cards-area {
    background: transparent;
    border-radius: 0;
    padding: 0;
}

.se-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 14px;
    padding: 10px 12px;
}
.se-bar-title {
    font-size: 0.70rem;
    font-weight: 900;
    letter-spacing: 0.10em;
}
.se-bar i { opacity: 0.8; }
.se-bar-dark {
    background: #334155;
    color: #fff;
}
.se-bar-light {
    background: rgba(15, 23, 42, 0.06);
    color: #334155;
}

/* Route cards (mock-like) */
.se-route-card {
    border-radius: 26px;
    background: #ffffff;
    border: 0;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}
.se-route-card-active { position: relative; }
.se-route-card-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: var(--accent-blue);
}
.se-route-card-pending { background: rgba(255,255,255,0.92); }
.se-route-card-done { opacity: 0.85; background: rgba(248,250,252,0.85); box-shadow: var(--card-shadow); }

.se-route-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
}
.se-route-top-active {
    background: linear-gradient(90deg, rgba(34,197,94,0.25) 0%, rgba(59,130,246,0.18) 78%, rgba(59,130,246,0.10) 100%);
}
.se-route-top-done { background: rgba(15, 23, 42, 0.06); }

.se-route-body { padding: 12px; }
.se-route-title { font-weight: 800; color: #0f172a; }
.se-route-sub { color: #0f172a; font-size: 0.88rem; }
.se-route-sub-muted { color: #94a3b8; }

.se-pill {
    font-size: 0.70rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
.se-pill-active { background: rgba(34,197,94,0.16); color: #047857; border-color: rgba(34,197,94,0.22); }
.se-pill-pending { background: rgba(245, 158, 11, 0.20); color: #92400e; border-color: rgba(245, 158, 11, 0.26); }
.se-pill-muted { background: rgba(15, 23, 42, 0.10); color: #334155; border-color: rgba(15, 23, 42, 0.14); }
.se-pill-done { background: rgba(16, 185, 129, 0.14); color: #047857; border-color: rgba(16, 185, 129, 0.20); }

/* Admin sidebar: siempre oscuro + activo azul brillante */
.sidebar {
    background: var(--sidebar-bg) !important;
    background-image: none !important;
}

.se-route-amount {
    font-weight: 900;
    font-size: 1.00rem;
    color: #16a34a;
    white-space: nowrap;
}
.se-route-amount-done { color: #16a34a; }

.se-chip {
    font-size: 0.70rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
.se-chip-success { background: rgba(16, 185, 129, 0.18); color: #047857; border-color: rgba(16, 185, 129, 0.25); }
.se-chip-danger { background: rgba(244, 63, 94, 0.14); color: #be123c; border-color: rgba(244, 63, 94, 0.22); }
.se-chip-success-soft { background: rgba(16, 185, 129, 0.10); color: #047857; border-color: rgba(16, 185, 129, 0.16); }
.se-chip-warn { background: rgba(245, 158, 11, 0.16); color: #92400e; border-color: rgba(245, 158, 11, 0.22); }
.se-chip-muted { background: rgba(15, 23, 42, 0.10); color: #334155; border-color: rgba(15, 23, 42, 0.14); }

.se-btn {
    border: 0;
    border-radius: 14px;
    padding: 12px 14px;
    font-weight: 900;
    letter-spacing: 0.04em;
}
.se-btn-primary,
.se-btn-main {
    background: var(--accent-dark);
    color: #fff;
    border: 0;
    border-radius: 14px;
    padding: 16px 18px;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    box-shadow: 0 10px 20px rgba(0,0,0,0.18);
}
.se-btn-primary:hover,
.se-btn-main:hover {
    filter: brightness(0.98);
    color: #fff;
}
.se-btn-secondary {
    background: rgba(var(--main-color-rgb, 59, 130, 246), 0.12);
    color: var(--main-color);
}
.se-btn-secondary:hover { filter: brightness(0.98); color: var(--main-color); }

.se-amount {
    font-weight: 900;
    font-size: 1.05rem;
    white-space: nowrap;
}
.se-amount-plus { color: #16a34a; }
.se-amount-minus { color: #ef4444; }

@media (max-width: 768px) {
    .sidebar { display: none !important; }
    .with-sidebar,
    .sidebar-collapsed-init .with-sidebar,
    .sidebar-expanded-init .with-sidebar,
    .sidebar.collapsed ~ .with-sidebar,
    .sidebar.expanded ~ .with-sidebar {
        margin-left: 0 !important;
        transition: none !important;
    }
    .with-tabbar { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 86px); }
}

.mobile-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 520px;
    transform: none;
    bottom: env(safe-area-inset-bottom, 0);
    height: 60px;
    padding: 0 env(safe-area-inset-right, 0) 0 env(safe-area-inset-left, 0);
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(14px);
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 -14px 34px rgba(15, 23, 42, 0.10);
    z-index: 1045;
}
.mobile-tabbar .tab-item {
    flex: 1 1 33.333%;
    text-decoration: none;
    color: #475569;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 7px 0;
    font-size: 0.70rem;
    font-weight: 600;
}
.mobile-tabbar .tab-item i { font-size: 1.18rem; }
.mobile-tabbar .tab-item.active { color: #3B82F6; }

/* Empleado: tabbar flotante tipo app (como el mock) */
.is-employee main.with-tabbar {
    padding-bottom: 120px;
}

.is-employee .mobile-tabbar {
    left: 50%;
    right: auto;
    width: auto;
    max-width: 360px;
    transform: translateX(-50%);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
    height: auto;
    padding: 0;
    gap: 14px;
    justify-content: center;
    border-radius: 0;
    border: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
}

.is-employee .mobile-tabbar .tab-item {
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(15, 23, 42, 0.10);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.10);
    padding: 0;
    gap: 0;
    font-size: 0;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.is-employee .mobile-tabbar .tab-item span {
    display: none;
}

.is-employee .mobile-tabbar .tab-item i {
    font-size: 1.35rem;
    display: block;
    line-height: 1;
}

.is-employee .mobile-tabbar .tab-item.active {
    color: #fff;
    background: var(--main-color);
    border-color: rgba(var(--main-color-rgb, 59, 130, 246), 0.35);
    box-shadow: 0 14px 30px rgba(var(--main-color-rgb, 59, 130, 246), 0.32);
}

/* Empty state (empleado_inicio) */
.se-empty-card {
    padding: 46px 22px;
    margin: 0;
    box-shadow: none;
    background: transparent;
}
.se-empty-icon {
    width: 88px;
    height: 88px;
    border-radius: 999px;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 12px auto 22px;
    color: #fff;
    background: #60A5FA;
    box-shadow: 0 14px 30px rgba(59, 130, 246, 0.25);
}
.se-empty-icon i { font-size: 2.4rem; }
.se-empty-title {
    font-size: 1.45rem;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 10px;
}
.se-empty-sub {
    color: #94a3b8;
    font-weight: 500;
    line-height: 1.35;
    font-size: 0.82rem;
    max-width: 300px;
    margin: 0 auto 22px;
}
.se-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 999px;
    padding: 7px 14px 7px 10px;
    font-weight: 500;
    font-size: 0.88rem;
    color: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #F3F4F6;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.se-empty-btn-ico {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(59, 130, 246, 0.24);
    color: #3B82F6;
}
.se-empty-btn-ico i { font-size: 0.95rem; }

/* ================================
   Bottom Sheet: Gestión (mobile)
   ================================ */
.gestion-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.35);
    backdrop-filter: blur(4px);
    z-index: 1060;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.gestion-overlay.open { opacity: 1; pointer-events: auto; }

.gestion-sheet {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: #fff;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -16px 48px rgba(15,23,42,0.14);
    z-index: 1061;
    padding: 12px 20px calc(env(safe-area-inset-bottom, 0px) + 80px);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
}
.gestion-sheet.open { transform: translateY(0); }

.gestion-sheet-handle {
    width: 36px; height: 4px;
    background: #cbd5e1;
    border-radius: 4px;
    margin: 0 auto 14px;
}
.gestion-sheet-title {
    font-weight: 800;
    font-size: 1.05rem;
    color: #0f172a;
    margin-bottom: 16px;
}
.gestion-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px 8px;
}
.gestion-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #0f172a;
    padding: 10px 4px;
    border-radius: 16px;
    transition: background 0.15s;
}
.gestion-item:hover,
.gestion-item:active { background: rgba(15,23,42,0.04); color: #0f172a; }
.gestion-item-icon {
    width: 52px; height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}
.gestion-item-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
}

/* ================================
   Admin mobile optimizations
   ================================ */
.admin-mob-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 4px 10px;
}
.admin-mob-head .em-min-logo { height: 54px; }

@media (max-width: 767.98px) {
    body.is-admin {
        background: #f7f9fc;
    }
    .is-admin .admin-shell {
        border-radius: 0;
        border: none;
        padding: 12px !important;
        padding-top: calc(env(safe-area-inset-top, 0px) + 12px) !important;
        margin: 0;
    }
    .is-admin .admin-shell .panel-card {
        border-radius: 14px;
        margin-left: 0;
        margin-right: 0;
    }
    .is-admin .panel-card {
        border-radius: 1rem;
        padding: 14px !important;
    }
    .is-admin .kpi-card {
        padding: 12px !important;
        border-radius: 0.85rem;
    }
    .is-admin .kpi-card .value {
        font-size: 1.2rem;
    }
    .is-admin .kpi-card .label {
        font-size: 0.78rem;
    }
    .is-admin .kpi-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        font-size: 0.9rem;
    }
    /* Compact mobile cards for admin lists */
    .admin-mob-card {
        display: grid;
        grid-template-columns: 52px 1fr auto;
        align-items: center;
        gap: 10px;
        background: rgba(255,255,255,0.95);
        border: 1px solid rgba(15, 23, 42, 0.08);
        border-radius: 14px;
        overflow: hidden;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
        min-height: 64px;
        margin-bottom: 8px;
    }
    .admin-mob-card-icon {
        height: 100%;
        background: linear-gradient(180deg, rgba(var(--main-color-rgb, 59, 130, 246), 1) 0%, rgba(43, 88, 118, 1) 100%);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .admin-mob-card-icon i { color: #fff; font-size: 1.2rem; }
    .admin-mob-card-body {
        min-width: 0;
        padding: 8px 0;
    }
    .admin-mob-card-title {
        font-weight: 800;
        color: #0f172a;
        font-size: 0.9rem;
        line-height: 1.15;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .admin-mob-card-meta {
        margin-top: 2px;
        font-size: 0.73rem;
        font-weight: 600;
        color: #64748b;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .admin-mob-card-right {
        display: flex;
        align-items: center;
        gap: 8px;
        padding-right: 10px;
        flex-shrink: 0;
    }
}

/* ================================
   Weekday chip selector (asignar)
   ================================ */
.asign-weekday-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    background: #fff;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
    transition: all 0.15s ease;
    user-select: none;
}
.asign-weekday-chip:has(input:checked) {
    background: var(--main-color);
    border-color: var(--main-color);
    color: #fff;
    box-shadow: 0 2px 8px rgba(var(--main-color-rgb, 59,130,246), 0.35);
}
.asign-weekday-chip:hover {
    border-color: var(--main-color);
}
