/* Variables globales */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --success-color: #4caf50;
    --danger-color: #f44336;
    --warning-color: #ff9800;
    --info-color: #2196f3;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --sidebar-width: 250px;
    --header-height: 60px;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Reset y estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #f5f7fa;
    color: var(--gray-800);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Layout del Dashboard */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: #fff;
    box-shadow: var(--box-shadow);
    position: fixed;
    height: 100%;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
    text-align: center;
}

.sidebar-header h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.sidebar-menu {
    padding: 20px 0;
}

.sidebar-menu ul li {
    position: relative;
}

.sidebar-menu ul li a {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    color: var(--gray-700);
    transition: var(--transition);
}

.sidebar-menu ul li a i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.sidebar-menu ul li.active a,
.sidebar-menu ul li a:hover {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 20px;
    transition: var(--transition);
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 20px;
}

.toggle-menu {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--gray-700);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info span {
    color: var(--gray-700);
    font-weight: 500;
}

.user-info i {
    font-size: 1.5rem;
    color: var(--gray-600);
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header-title h1 {
    font-size: 1.8rem;
    color: var(--gray-800);
    margin-bottom: 5px;
}

.header-title p {
    color: var(--gray-600);
    font-size: 0.9rem;
}

.quick-actions {
    display: flex;
    gap: 10px;
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-card-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-card-info h3 {
    color: var(--gray-600);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-color);
}

.stat-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(67, 97, 238, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Widgets */
.widget {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.widget-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget-header h3 {
    font-size: 1.2rem;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-header h3 i {
    color: var(--primary-color);
}

.widget-content {
    padding: 20px;
}

/* Recordatorios Widget */
.recordatorios-widget .widget-content {
    padding: 0;
}

.recordatorio-item {
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recordatorio-item:last-child {
    border-bottom: none;
}

.recordatorio-info p {
    margin: 0;
    color: var(--gray-700);
}

/* Calendar Widget */
.calendar-widget .widget-content {
    padding: 0;
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.calendar-nav h2 {
    font-size: 1.2rem;
    color: var(--gray-800);
}

.calendar {
    width: 100%;
}

.calendar table {
    width: 100%;
    border-collapse: collapse;
}

.calendar th {
    padding: 10px;
    text-align: center;
    background-color: var(--gray-100);
    color: var(--gray-700);
    font-weight: 500;
}

.calendar td {
    height: 100px;
    border: 1px solid var(--gray-200);
    vertical-align: top;
    padding: 5px;
    position: relative;
}

.calendar td.empty {
    background-color: var(--gray-100);
}

.calendar td.today {
    background-color: rgba(67, 97, 238, 0.05);
}

.day-number {
    font-weight: 500;
    margin-bottom: 5px;
    text-align: right;
}

.today .day-number {
    background-color: var(--primary-color);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.events {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow-y: auto;
    max-height: 70px;
}

.event {
    padding: 3px 5px;
    border-radius: 3px;
    font-size: 0.8rem;
    color: white;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Modales */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background-color: #fff;
    margin: 50px auto;
    width: 90%;
    max-width: 600px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s;
}

.modal-lg {
    max-width: 800px;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.2rem;
    color: var(--gray-800);
}

.modal-body {
    padding: 20px;
}

.close {
    color: var(--gray-600);
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    color: var(--danger-color);
}

/* Formularios */
.form-group {
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: 5px;
    color: var(--gray-700);
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    gap: 5px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #3d8b40;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #d32f2f;
}

.btn-secondary {
    background-color: var(--gray-500);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--gray-600);
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-icon:hover {
    background-color: var(--gray-200);
    color: var(--gray-800);
}

/* Lista de empleados */
.empleados-actions {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
}

.empleados-list {
    max-height: 400px;
    overflow-y: auto;
}

.empleado-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--gray-200);
}

.empleado-info {
    display: flex;
    flex-direction: column;
}

.empleado-nombre {
    font-weight: 500;
    color: var(--gray-800);
}

.empleado-email {
    color: var(--gray-600);
    font-size: 0.9rem;
}

.empleado-actions {
    display: flex;
    gap: 10px;
}

/* Detalle de novedad */
.novedad-detalle {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.novedad-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.novedad-tipo {
    padding: 5px 10px;
    border-radius: 20px;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
}

.novedad-info {
    margin-top: 10px;
}

.novedad-info p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.novedad-info i {
    color: var(--primary-color);
    width: 20px;
}

.novedad-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}

/* Loading */
.loading {
    text-align: center;
    padding: 20px;
    color: var(--gray-600);
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .toggle-menu {
        display: block;
    }
    
    .stats-cards {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .quick-actions {
        width: 100%;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 10px;
        width: calc(100% - 20px);
    }
}


/* Recordatorios */
.recordatorios-list {
    max-height: 300px;
    overflow-y: auto;
}

.recordatorio-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid var(--gray-200);
    transition: var(--transition);
}

.recordatorio-item:hover {
    background-color: var(--gray-100);
}

.recordatorio-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
}

.recordatorio-badge {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 5px;
}

.recordatorio-info {
    flex: 1;
}

.recordatorio-mensaje {
    margin: 0 0 5px;
    color: var(--gray-800);
    font-size: 0.95rem;
}

.recordatorio-detalle {
    margin: 0;
    color: var(--gray-600);
    font-size: 0.85rem;
}

.recordatorio-fecha {
    font-size: 0.75rem;
    border-radius: 12px;
    padding: 2px 8px;
    display: inline-block;
    margin-top: 5px;
}

.fecha-hoy {
    background-color: var(--primary-color);
    color: white;
}

.fecha-pasada {
    background-color: var(--danger-color);
    color: white;
}

.empty-state {
    text-align: center;
    padding: 20px;
    color: var(--gray-600);
}

.empty-state i {
    font-size: 2rem;
    color: var(--success-color);
    margin-bottom: 10px;
    display: block;
}

/* Recordatorios */
.recordatorios-list {
    max-height: 300px;
    overflow-y: auto;
}

.recordatorio-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--gray-200);
    transition: all 0.2s ease;
}

.recordatorio-item:hover {
    background-color: var(--gray-100);
}

.recordatorio-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.recordatorio-fecha-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.recordatorio-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.fecha-badge {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    text-align: center;
    min-width: 85px;
}

.fecha-hoy {
    background-color: var(--primary-color);
    color: white;
}

.fecha-pasada {
    background-color: var(--danger-color);
    color: white;
}

.recordatorio-info {
    flex: 1;
}

.recordatorio-titulo {
    font-weight: 600;
    margin: 0 0 3px;
    font-size: 0.95rem;
    color: var(--gray-800);
}

.recordatorio-empleado {
    font-weight: 500;
    margin: 0 0 5px;
    font-size: 1rem;
    color: var(--gray-900);
}

.recordatorio-detalle {
    margin: 0;
    color: var(--gray-600);
    font-size: 0.85rem;
}

.marcar-visto {
    color: var(--success-color);
    border: 1px solid var(--success-color);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.marcar-visto:hover {
    background-color: var(--success-color);
    color: white;
}

.empty-state {
    text-align: center;
    padding: 20px;
    color: var(--gray-600);
}

.empty-state i {
    font-size: 2rem;
    color: var(--success-color);
    margin-bottom: 10px;
    display: block;
}

/* Estilos para los recordatorios */
.recordatorio-titulo {
    font-weight: 600;
    margin: 0 0 5px;
    font-size: 0.95rem;
    color: var(--gray-800);
}

.recordatorio-empleado-nombre {
    font-size: 1.05rem;
    margin: 0 0 5px;
    color: #000000;
    font-weight: 700;
    line-height: 1.2;
}

.recordatorio-detalle {
    margin: 0;
    color: var(--gray-600);
    font-size: 0.9rem;
}

/* Resto de los estilos para mantener la estructura */
.recordatorios-list {
    max-height: 300px;
    overflow-y: auto;
}

.recordatorio-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--gray-200);
    transition: all 0.2s ease;
}

.recordatorio-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.recordatorio-fecha-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.recordatorio-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.fecha-badge {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    text-align: center;
    min-width: 85px;
}

.fecha-hoy {
    background-color: var(--primary-color);
    color: white;
}

.fecha-pasada {
    background-color: var(--danger-color);
    color: white;
}
/* Estilos para el calendario expandido */
.calendar .day {
    transition: height 0.3s ease;
    cursor: pointer;
}

.calendar .day-expanded {
    height: 50vh !important;
    min-height: 300px;
    overflow-y: auto;
    z-index: 100;
    position: relative;
    background-color: #fff;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

.calendar .day-expanded .events-container {
    max-height: none !important;
}

.calendar .day-expanded .event {
    padding: 8px;
    margin: 5px 0;
    font-size: 14px;
}

/* Asegurar que la tabla del calendario mantenga su estructura */
.calendar table {
    table-layout: fixed;
}

.calendar td {
    vertical-align: top;
}
