* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f5f5f5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.stat-card i {
    font-size: 45px;
    margin-bottom: 15px;
}

.stat-card h3 {
    font-size: 36px;
    font-weight: bold;
    margin: 10px 0;
}

.stat-card p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.table-responsive {
    margin-top: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #343a40;
    color: white;
    border: none;
    padding: 12px;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
    transition: background-color 0.3s;
}

.alert {
    border-radius: 10px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn {
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #ddd;
    transition: all 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.nav-tabs .nav-link {
    color: #555;
    border: none;
    padding: 12px 20px;
    transition: all 0.3s;
}

.nav-tabs .nav-link:hover {
    color: #667eea;
    border: none;
}

.nav-tabs .nav-link.active {
    color: #667eea;
    border-bottom: 3px solid #667eea;
    background: transparent;
}

@media (max-width: 768px) {
    .stat-card h3 {
        font-size: 24px;
    }
    .stat-card i {
        font-size: 30px;
    }
    .nav-tabs .nav-link {
        padding: 8px 12px;
        font-size: 14px;
    }
    .btn {
        padding: 6px 15px;
        font-size: 14px;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
/* ========== NUEVOS ESTILOS PARA EL JEFE ========== */

/* Sidebar lateral */
.sidebar-jefe {
    width: 260px;
    background: linear-gradient(180deg, #1a5f3a 0%, #0d3b23 100%);
    color: white;
    height: calc(100vh - 60px);
    position: sticky;
    top: 0;
    transition: all 0.3s;
}

.sidebar-jefe .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 12px 20px;
    border-radius: 10px;
    margin: 5px 10px;
    transition: all 0.3s;
}

.sidebar-jefe .nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-jefe .nav-link.active {
    background: rgba(255,255,255,0.2);
    color: white;
}

.sidebar-jefe .nav-link i {
    width: 25px;
    margin-right: 10px;
}

/* Layout principal */
.main-layout {
    display: flex;
    min-height: calc(100vh - 60px);
}

.content-area {
    flex: 1;
    padding: 20px;
    background: #f0f2f5;
    overflow-y: auto;
}

/* Dashboard buttons */
.dashboard-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.dashboard-btn {
    flex: 1;
    padding: 15px;
    background: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    color: #495057;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    cursor: pointer;
}

.dashboard-btn i {
    font-size: 20px;
    margin-right: 10px;
}

.dashboard-btn.active-btn {
    background: #1a5f3a;
    color: white;
}

/* Subpage content */
.subpage-content {
    display: none;
}

.subpage-content.active-subpage {
    display: block;
}

/* Lista de trabajadores */
.lista-trabajadores {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trabajador-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.trabajador-card:hover {
    transform: translateX(5px);
    background: #e8f5e9;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.trabajador-icon {
    width: 50px;
    height: 50px;
    background: #e8f5e9;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trabajador-icon i {
    font-size: 24px;
    color: #1a5f3a;
}

.trabajador-info {
    flex: 1;
}

.trabajador-id {
    font-weight: bold;
    color: #1a5f3a;
    font-size: 14px;
}

.trabajador-nombre {
    font-size: 16px;
    color: #333;
}

/* Nave buttons grid */
.nave-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.nave-btn {
    padding: 15px;
    background: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.nave-btn:hover {
    background: #1a5f3a;
    color: white;
    transform: translateY(-3px);
}

/* Rancho buttons vertical */
.rancho-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rancho-btn {
    padding: 18px 25px;
    background: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.rancho-btn:hover {
    background: #1a5f3a;
    color: white;
    transform: translateX(10px);
}

/* Modal / Interfaz de detalle */
.detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.detail-card {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: #1a5f3a;
    color: white;
    border-radius: 20px 20px 0 0;
}

.detail-header .btn-back {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
}

.detail-header .btn-back:hover {
    background: rgba(255,255,255,0.3);
}

.detail-body {
    padding: 25px;
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
}

.kpi-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.kpi-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.kpi-card:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.kpi-card i {
    font-size: 35px;
    margin-bottom: 10px;
}

.kpi-card .kpi-value {
    font-size: 32px;
    font-weight: bold;
}

.kpi-card .kpi-label {
    font-size: 12px;
    opacity: 0.9;
}

/* Chart container */
.chart-container {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

/* Tabla de registros */
.registros-tabla {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.registros-tabla th {
    background: #343a40;
    color: white;
    padding: 12px;
    text-align: left;
}

.registros-tabla td {
    padding: 10px 12px;
    border-bottom: 1px solid #dee2e6;
}

.registros-tabla tr:hover {
    background: #f8f9fa;
}

.btn-mostrar-tabla {
    background: #1a5f3a;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
}

.empty-state {
    text-align: center;
    padding: 50px;
    color: #6c757d;
}

.empty-state i {
    font-size: 50px;
    margin-bottom: 15px;
}