/* ====== FONDO CORPORATIVO ====== */
.bg-dashboard {
    background: url('/assets/img/FONDO DE OFICINA.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
}

/* Overlay suave para lectura */
.bg-dashboard::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(5, 20, 40, 0.65);
    z-index: -1;
}

/* ====== ESTILOS GENERALES ====== */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #fff;
}

/* HEADER */
.main-header {
    background-color: transparent;
    color: #fff;
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.dashboard-header {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    margin-top: 20px;
    border-radius: 10px;
}

.dashboard-header h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.dashboard-header p {
    font-size: 18px;
    opacity: 0.8;
}

/* ====== SIDEBAR ====== */
.sidebar {
    width: 220px;
    background-color: #2f4050;
    min-height: 100vh;
    color: #fff;
    padding-top: 20px;
    position: fixed;
    top: 80px;
    left: 0;
    z-index: 999;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar ul {
    padding-left: 0;
    list-style: none;
}

.sidebar ul li {
    padding: 15px 20px;
    border-bottom: 1px solid #3a4a5b;
}

.sidebar ul li a {
    color: #fff;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar ul li a:hover {
    background-color: #3b8ad7;
}

/* Submenú desplegable */
.has-submenu > a {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
}

.submenu {
    list-style: none;
    padding-left: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.submenu li a {
    font-size: 14px;
    opacity: 0.85;
    color: #fff;
    text-decoration: none;
    padding: 8px 0;
    display: block;
}

.submenu li a:hover {
    background-color: #333;
}

.has-submenu.open .submenu {
    max-height: 300px;
}

.arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.has-submenu.open .arrow {
    transform: rotate(180deg);
}

/* ====== CONTENEDOR PRINCIPAL ====== */
.main-content {
    margin-left: 250px;
    padding: 50px 20px 20px;
    margin-top: 100px;
}

h2 {
    font-size: 30px;
    margin-bottom: 20px;
}

/* ====== FORMULARIOS ====== */
form {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

label {
    font-size: 18px;
}

input[type="text"],
input[type="date"],
select {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border-radius: 8px;
    border: none;
    background: #fff;
    color: #333;
}

input[type="submit"] {
    background-color: #2563eb;
    color: #fff;
    font-weight: bold;
    padding: 12px 25px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

input[type="submit"]:hover {
    background-color: #1e40af;
}

/* Barra superior */
.top-bar {
    display: flex;
    justify-content: flex-end;  
    align-items: center;
    gap: 20px;  
    padding: 10px 25px;
    background-color: #002a55; 
    color: white;
    font-size: 15px;
}

.welcome-text {
    color: white;
    font-size: 16px;
    opacity: 0.9;
    padding-right: 20px;  
}

.logout-btn {
    color: #ff4d4d;
    text-decoration: none;
    font-weight: bold;
}

.logout-btn:hover {
    text-decoration: underline;
}

/* ====== FOOTER ====== */
.main-footer {
    width: 100%;
    text-align: center;
    padding: 25px 20px;
    margin-top: 200px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    backdrop-filter: blur(6px);
    background: rgba(0, 0, 0, 0.60);
}

.main-footer .container {
    max-width: 1200px;
    margin: 0 auto;
}

/* DASHBOARD PRO CARDS */
.dashboard-cards-pro {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-radius: 14px;
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.12);
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.35);
}

.stat-card .icon {
    font-size: 36px;
}

.stat-card .info {
    display: flex;
    flex-direction: column;
}

.stat-card .label {
    font-size: 14px;
    opacity: 0.9;
}

.stat-card .value {
    font-size: 28px;
    font-weight: bold;
    margin: 5px 0;
}

.stat-card a {
    font-size: 13px;
    color: #fff;
    text-decoration: underline;
}

/* Nuevo diseño de las tarjetas */
.dashboard-cards-professional {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.stat-card {
    background: rgba(255,255,255,0.15);
    padding: 20px;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    box-shadow: 0px 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0px 8px 25px rgba(0,0,0,0.4);
}

.stat-card .card-header {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #fff;
}

.stat-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.stat-card .value {
    font-size: 28px;
    font-weight: 600;
    color: #fff;
}

.stat-card a {
    font-size: 14px;
    color: #fff;
    text-decoration: underline;
    margin-top: 10px;
}

/* COLORES CORPORATIVOS */
.stat-card.blue   { background: rgba(52, 152, 219, 0.2); }
.stat-card.green  { background: rgba(46, 204, 113, 0.2); }
.stat-card.yellow { background: rgba(241, 196, 15, 0.2); }
.stat-card.red    { background: rgba(231, 76, 60, 0.2); }

.stat-card .value {
    font-size: 32px;
    font-weight: bold;
    color: white;
    margin-top: 10px;
}

/* Ajustes para centrar y reducir los cuadros de métricas */
.dashboard-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, 160px); /* Mantener el tamaño pequeño pero flexible */
    gap: 15px;
    margin: 25px 0;
    justify-content: center; /* Asegura que los cuadros estén centrados */
}

.kpi-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
    text-decoration: none;
    color: #fff;
    transition: all 0.25s ease;
    border: 1px solid rgba(255,255,255,0.08);
    min-height: 55px;
    max-width: 160px;
}

.kpi-card:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.12);
}

.kpi-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* Centrar el texto dentro del cuadro */
}

.kpi-title {
    font-size: 13px;
    opacity: 0.8;
}

.kpi-number {
    font-size: 18px; /* Reducir el tamaño de la fuente */
    font-weight: 600;
    line-height: 1.1;
}

/* ====== CONTENIDO PRINCIPAL ====== */
.dashboard-container {
    padding-left: 40px;
}

.dashboard-section {
    max-width: 900px;
    margin: 80px auto;
    text-align: center;
}

.dashboard-section h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}

.dashboard-section p {
    font-size: 18px;
    opacity: 0.85;
    margin-bottom: 30px;
}

.quick-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.quick-actions a {
    padding: 14px 28px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    color: white;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.25s ease;
}

.quick-actions a:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.25);
}
.checkin-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.checkin-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checkin-row label {
    font-weight: 600;
    font-size: 15px;
}

.checkin-row select,
.checkin-row textarea {
    padding: 10px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
}
.checkin-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
}

.checkin-table th,
.checkin-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    text-align: center;
}

.checkin-table th {
    background: rgba(255,255,255,0.1);
    font-weight: 600;
}

.checkin-table td:first-child {
    text-align: left;
}

.checkin-row {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.evaluaciones-table {
    width: 100%;
    border-collapse: collapse;
}

.evaluaciones-table th,
.evaluaciones-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    text-align: center;
}

.evaluaciones-table th {
    background: rgba(255,255,255,0.1);
}

.evaluaciones-table a {
    color: #f1c40f;
    text-decoration: none;
}

.evaluaciones-table a:hover {
    text-decoration: underline;
}
.evaluaciones-table {
    width: 100%;
    border-collapse: collapse;
}

.evaluaciones-table th,
.evaluaciones-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    text-align: center;
}

.evaluaciones-table th {
    background: rgba(255,255,255,0.1);
}

.evaluaciones-table a {
    color: #f1c40f;
    text-decoration: none;
}

.evaluaciones-table a:hover {
    text-decoration: underline;
}
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #fff;
}

.form-group input,
.form-group select {
    width: 100%;
    max-width: 420px;
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.glass-card {
    padding: 30px;
    max-width: 600px;
    margin: auto;
}
/* =========================
   RESPONSIVE GENERAL
========================= */

/* TABLET */
@media (max-width: 1024px) {

    .sidebar{
        width:180px;
    }

    .main-content{
        margin-left:190px;
        padding:40px 15px;
    }

    .dashboard-section{
        max-width:95%;
        margin:60px auto;
    }

    .glass-card{
        max-width:90%;
        padding:20px;
    }

    .dashboard-header h1{
        font-size:28px;
    }

}

/* MÓVIL */
@media (max-width: 768px){

    /* Ocultar sidebar en móvil */
    .sidebar{
        position:relative;
        width:100%;
        min-height:auto;
        top:0;
    }

    .main-content{
        margin-left:0;
        padding:20px 12px;
    }

    .dashboard-container{
        padding-left:0;
    }

    .dashboard-header{
        margin-top:10px;
    }

    .dashboard-header h1{
        font-size:22px;
    }

    .dashboard-header p{
        font-size:14px;
    }

    /* Cards y formularios */
    .glass-card{
        width:100%;
        max-width:100%;
        padding:16px;
    }

    form{
        padding:14px;
    }

    /* Botones meses */
    .meses-container{
        overflow-x:auto;
        justify-content:flex-start;
    }

    /* Tablas */
    table{
        font-size:12px;
    }

}

/* MÓVILES MUY PEQUEÑOS */
@media (max-width:480px){

    .btn-mes{
        padding:6px 12px;
        font-size:12px;
    }

    .dashboard-header h1{
        font-size:20px;
    }

}
/* ============================= */
/* SIDEBAR RESPONSIVE - MOBILE */
/* ============================= */

@media (max-width: 768px) {

    /* Ocultar sidebar por defecto */
    aside.sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 260px;
        height: 100%;
        background: #1f2d3d;
        z-index: 9999;
        transition: left 0.3s ease;
        overflow-y: auto;
    }

    /* Mostrar sidebar */
    aside.sidebar.active {
        left: 0;
    }

    /* El contenido principal ocupa todo */
    .dashboard-container {
        margin-left: 0 !important;
        width: 100% !important;
    }

    /* Fondo oscuro al abrir menú */
    body.menu-open::after {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.45);
        z-index: 9998;
    }
}

/* =============================== */
/* DASHBOARD DIRECCIÓN - MOBILE */
/* =============================== */

@media (max-width: 768px) {

    /* Contenedor principal */
    .dashboard-container {
        padding: 15px;
    }

    /* Header */
    .dashboard-header h1 {
        font-size: 22px;
        margin-bottom: 5px;
        text-align: center;
    }

    .dashboard-header p {
        font-size: 14px;
        text-align: center;
        opacity: 0.85;
    }

    /* KPIs en columna */
    .dashboard-kpis {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 15px;
    }

    .kpi-card {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 14px;
        border-radius: 14px;
        width: 100%;
    }

    .kpi-icon {
        font-size: 28px;
        margin-right: 12px;
    }

    .kpi-title {
        font-size: 14px;
    }

    .kpi-number {
        font-size: 20px;
        font-weight: bold;
    }

    /* Sección gestión */
    .dashboard-section {
        margin-top: 25px;
        text-align: center;
    }

    .dashboard-section h2 {
        font-size: 18px;
    }

    .dashboard-section p {
        font-size: 14px;
        opacity: 0.85;
    }

    /* Acciones rápidas */
    .quick-actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 15px;
    }

    .quick-actions a {
        width: 100%;
        padding: 14px;
        font-size: 16px;
        border-radius: 14px;
    }

    /* Fondo más limpio en móvil */
    body.bg-dashboard {
        background: #0a2540 !important;
    }
}
/* =============================== */
/* HEADER MOBILE */
/* =============================== */
@media (max-width: 768px) {

    .header-dashboard {
        padding: 10px 12px;
    }

    .header-brand span {
        font-size: 11px;
        line-height: 1.2;
    }

    .header-actions {
        gap: 8px;
    }

    .logout-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .menu-toggle {
        font-size: 24px;
    }
}
@media (max-width: 768px) {

    /* Header más compacto */
    .header-dashboard {
        padding: 8px 12px;
    }

    /* Ocultar texto largo */
    .header-brand span {
        display: none;
    }

    /* Logo más pequeño */
    .header-brand img {
        width: 30px;
        opacity: 0.9;
    }

    /* Botón hamburguesa */
    .menu-toggle {
        font-size: 24px;
        margin-right: 4px;
    }

    /* Botón cerrar sesión más discreto */
    .logout-btn {
        padding: 6px 10px;
        font-size: 12px;
        border-radius: 4px;
    }
}
