/* Variables CSS para estado inicial de sidebar */
:root {
    --sidebar-width: 250px;
}

/* 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: linear-gradient(135deg, var(--main-color) 0%, #2b5876 100%);
    color: #fff;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(79,142,247,0.10);
}

/* 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: 64px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand {
    color: #fff;
    font-size: 1.3rem;
    text-decoration: none;
    white-space: nowrap;
}
.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: #fff;
    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, .sidebar-nav .nav-link:focus, .sidebar-nav .nav-link:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}
.sidebar-nav .nav-link i {
    font-size: 1.5rem;
    min-width: 32px;
    text-align: center;
}
/* 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 rgba(255,255,255,0.08);
    padding-top: 1rem;
}
.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: 2px solid var(--main-color) !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: translateY(-2px);
}
.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;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* 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: linear-gradient(90deg, var(--main-color) 0%, #2b5876 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(79, 142, 247, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 142, 247, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(86, 171, 47, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(86, 171, 47, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(255, 65, 108, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 65, 108, 0.4);
}

/* 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;
}

@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);
}
