/* style.css - Estilos globales para todo el sistema */
@import url('https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');

/* Variables de color */
:root {
    --color-primario: #771f20;
    --color-secundario: #000000;
    --color-fondo: #ffffff;
    --color-texto: #000000;
    --color-hover: #5a1618;
    --color-borde: #cccccc;
}

/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-fondo);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--color-texto);
}

/* LOGIN */
.login-container {
    min-height: 100vh;
    background-image: url('fodoistjm.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    max-width: 450px;
    width: 100%;
}

.login-header {
    background-color: var(--color-primario);
    color: white;
    padding: 30px;
    text-align: center;
}

.login-header img {
    max-width: 80%;
    height: auto;
    margin-bottom: 10px;
}

.login-header h3 {
    margin: 0;
    font-weight: 600;
    font-size: 1.5rem;
}

.login-header p {
    margin: 5px 0 0;
    opacity: 0.9;
}

.login-body {
    padding: 30px;
}

.login-body .form-control {
    border-radius: 10px;
    border: 1px solid var(--color-borde);
    padding: 12px 15px;
}

.login-body .form-control:focus {
    border-color: var(--color-primario);
    box-shadow: 0 0 0 0.2rem rgba(119, 31, 32, 0.25);
}

.btn-login {
    background-color: var(--color-primario);
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    width: 100%;
    transition: background-color 0.3s;
}

.btn-login:hover {
    background-color: var(--color-hover);
    color: white;
}

/* ==========================================
   SIDEBAR (Fondo blanco en todo el sistema)
   ========================================== */
.sidebar {
    min-height: 100vh;
    background-color: #ffffff;        /* Fondo blanco */
    color: #000000;                   /* Texto oscuro */
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    z-index: 100;
    padding-top: 20px;
    box-shadow: 2px 0 8px rgba(0,0,0,0.05); /* Sutil sombra para separar */
}

.sidebar .brand {
    text-align: center;
    padding: 15px 0;
}

.sidebar .brand img {
    max-width: 80%;
    height: auto;
}

.sidebar .brand small {
    display: block;
    margin-top: 5px;
    color: #666666;  /* Color gris para el subtítulo */
    font-size: 0.9rem;
}

.sidebar .nav-link {
    color: #000000;                  /* Texto negro */
    padding: 12px 20px;
    margin: 5px 10px;
    border-radius: 10px;
    transition: all 0.3s;
    font-weight: 500;
}

.sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
    color: #771f20;                 /* Íconos en color institucional */
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background-color: #f0f0f0;      /* Fondo gris claro al pasar/activo */
    color: #771f20;                 /* Texto institucional al pasar/activo */
}

.sidebar .nav-link:hover i,
.sidebar .nav-link.active i {
    color: #771f20;                 /* Íconos mantienen color institucional */
}
/* Main content */
.main-content {
    margin-left: 260px;
    padding: 20px;
    background-color: var(--color-fondo);
}

/* Tarjetas de estadísticas */
.card-stats {
    border: none;
    border-radius: 15px;
    transition: transform 0.3s;
    background-color: var(--color-primario);
    color: white;
}

.card-stats:hover {
    transform: translateY(-5px);
}

/* Navbar interna */
.navbar-custom {
    background: white;
    border-radius: 15px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Tablas */
.table-custom {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.table-custom thead {
    background-color: var(--color-primario);
    color: white;
}

.table-custom thead th {
    font-weight: 500;
    padding: 12px 15px;
}

.table-custom tbody tr:hover {
    background-color: #f8f9fa;
}

/* Badges y etiquetas */
.badge {
    padding: 5px 10px;
    border-radius: 8px;
    font-weight: 500;
}

.badge.bg-admin { background-color: var(--color-primario); color: white; }
.badge.bg-docente { background-color: #28a745; color: white; }
.badge.bg-activo { background-color: #28a745; color: white; }
.badge.bg-inactivo { background-color: #6c757d; color: white; }

/* Botones */
.btn-primary {
    background-color: var(--color-primario);
    border-color: var(--color-primario);
}

.btn-primary:hover {
    background-color: var(--color-hover);
    border-color: var(--color-hover);
}

.btn-outline-primary {
    border-color: var(--color-primario);
    color: var(--color-primario);
}

.btn-outline-primary:hover {
    background-color: var(--color-primario);
    color: white;
}

/* Selector de estado (docente) */
.select-estado {
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 0.9rem;
    cursor: pointer;
    background-color: white;
}

.select-estado.completada { background: #d4edda; color: #155724; border-color: #c3e6cb; }
.select-estado.en_progreso { background: #fff3cd; color: #856404; border-color: #ffeaa7; }
.select-estado.pendiente { background: #e2e3e5; color: #383d41; border-color: #d6d8db; }

/* Botón flotante */
.btn-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--color-primario);
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    color: white;
    font-size: 24px;
    transition: transform 0.3s;
}

.btn-floating:hover {
    transform: scale(1.1);
    background-color: var(--color-hover);
    color: white;
}

/* Formularios */
.form-custom {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.form-control, .form-select {
    border-radius: 10px;
    border: 1px solid var(--color-borde);
    padding: 10px 15px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--color-primario);
    box-shadow: 0 0 0 0.2rem rgba(119, 31, 32, 0.25);
}

/* Reportes (impresión horizontal) */
@media print {
    .no-print, .sidebar, .filter-card, .btn-imprimir, .navbar-custom, .btn-floating {
        display: none !important;
    }

    @page {
        size: A4 landscape;
        margin: 1.5cm;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .report-container {
        margin: 0 !important;
        padding: 15px !important;
        box-shadow: none !important;
        background: white !important;
    }

    .firma-linea {
        border-top: 1px solid #000;
        width: 250px;
        margin-top: 40px;
        padding-top: 10px;
        text-align: center;
    }

    .table-reporte {
        width: 100%;
        font-size: 10px;
    }

    .table-reporte th, .table-reporte td {
        padding: 6px 8px;
    }

    tr {
        page-break-inside: avoid;
    }

    thead {
        display: table-header-group;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        min-height: auto;
    }
    .main-content {
        margin-left: 0;
    }
    .btn-floating {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
}

/* Botones de acción rápida en el dashboard */
.btn-dash {
    display: block;
    background: #ffffff;
    border: 2px solid #771f20;
    border-radius: 15px;
    padding: 25px 15px;
    text-align: center;
    text-decoration: none;
    color: #000000;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.btn-dash:hover {
    background: #771f20;
    color: #ffffff;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(119, 31, 32, 0.2);
    text-decoration: none;
}

.btn-dash i {
    display: block;
    font-size: 3rem;
    margin-bottom: 12px;
    color: #771f20;
    transition: color 0.3s;
}

.btn-dash:hover i {
    color: #ffffff;
}

.btn-dash span {
    font-size: 1.1rem;
    font-weight: 600;
    display: block;
}

/* Variantes de color para cada botón (opcional) */
.btn-dash.primary { border-color: #771f20; }
.btn-dash.primary i { color: #771f20; }
.btn-dash.primary:hover { background: #771f20; }

.btn-dash.success { border-color: #28a745; }
.btn-dash.success i { color: #28a745; }
.btn-dash.success:hover { background: #28a745; }

.btn-dash.info { border-color: #17a2b8; }
.btn-dash.info i { color: #17a2b8; }
.btn-dash.info:hover { background: #17a2b8; }

.btn-dash.warning { border-color: #ffc107; }
.btn-dash.warning i { color: #ffc107; }
.btn-dash.warning:hover { background: #ffc107; color: #000000; }
.btn-dash.warning:hover i { color: #000000; }