/* Dashboard | Instituto Loher Tlalnepantla
   Design: Premium & Modern Look
   Version: 1.0 
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    --loher-orange: #FF7E00;
    --loher-orange-hover: #e67200;
    --loher-gray-dark: #2C2C2C;
    --loher-gray-light: #F4F7F6;
    --white: #ffffff;
    --border-color: rgba(0,0,0,0.06);
    --shadow: 0 10px 30px rgba(0,0,0,0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- RESET & BASE --- */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--loher-gray-light);
    color: var(--loher-gray-dark);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- SIDEBAR --- */
.sidebar {
    background-color: var(--loher-gray-dark);
    min-height: 100vh;
    color: white;
    padding: 2rem 1.2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.sidebar img {
    max-width: 140px;
    margin-bottom: 2rem;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.6) !important;
    transition: var(--transition);
    border-radius: 12px;
    margin-bottom: 8px;
    padding: 12px 15px;
    font-weight: 500;
}

.sidebar .nav-link:hover {
    background: rgba(255, 126, 0, 0.1);
    color: var(--loher-orange) !important;
}

.sidebar .nav-link.active {
    background: var(--loher-orange);
    color: white !important;
    box-shadow: 0 4px 15px rgba(255, 126, 0, 0.3);
}

/* --- MAIN CONTENT & CARDS --- */
main {
    padding-top: 2rem;
}

.card {
    border: none;
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--shadow);
    transition: var(--transition);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}

.card-header {
    background-color: transparent !important;
    border-bottom: 1px solid var(--border-color) !important;
    font-weight: 700;
    padding: 1.5rem;
    font-size: 1.1rem;
}

/* --- FORMULARIOS --- */
.form-control {
    border-radius: 12px;
    padding: 12px 15px;
    border: 1px solid #e1e1e1;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--loher-orange);
    box-shadow: 0 0 0 4px rgba(255, 126, 0, 0.1);
    outline: none;
}

.form-label {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* --- BOTONES --- */
.btn-primary {
    background-color: var(--loher-orange);
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: var(--transition);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--loher-orange-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 126, 0, 0.3);
}

/* --- TABLA MODERNA --- */
.table-responsive {
    overflow-x: auto;
}

.table {
    border-collapse: separate;
    border-spacing: 0 10px; /* Crea el efecto de celdas flotantes */
    margin-top: -10px;
}

.table thead th {
    border: none;
    color: #a0a0a0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 1rem;
}

.table tbody tr {
    background-color: var(--white);
    transition: var(--transition);
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.table tbody tr td {
    border: none;
    padding: 1.2rem 1rem;
    vertical-align: middle;
}

.table tbody tr td:first-child { border-radius: 15px 0 0 15px; }
.table tbody tr td:last-child { border-radius: 0 15px 15px 0; }

.table tbody tr:hover {
    transform: scale(1.01);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* --- MODALES & EXPEDIENTE --- */
.modal-content {
    border: none;
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
}

.item-mes {
    border: 2px solid #f0f0f0 !important;
    border-radius: 15px;
    padding: 20px 10px;
    transition: var(--transition);
    background: #ffffff;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.item-mes:hover {
    border-color: var(--loher-orange) !important;
    background-color: #fffaf5;
}

/* Clase para cuando el checkbox está activo (usada via JS) */
.item-mes.pagado {
    background-color: var(--loher-orange) !important;
    border-color: var(--loher-orange) !important;
    color: white !important;
    box-shadow: 0 8px 20px rgba(255, 126, 0, 0.25);
}

.item-mes.pagado .form-check-label {
    color: white !important;
}

/* --- BADGES --- */
.badge {
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 600;
}

.status-activo { 
    background: #e8f5e9 !important; 
    color: #2e7d32 !important; 
}

.text-orange { color: var(--loher-orange) !important; }

/* --- ANIMACIONES --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate__fadeIn {
    animation: fadeIn 0.5s ease-out forwards;
}

/* --- PERSONALIZACIÓN DE SCROLLBAR --- */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--loher-gray-light);
}

::-webkit-scrollbar-thumb {
    background: #d1d1d1;
    border-radius: 10px;
    border: 2px solid var(--loher-gray-light);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--loher-orange);
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
        padding: 1rem;
    }
    
    .table tbody tr td {
        padding: 0.8rem;
    }
}