/* Importar una fuente moderna */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    --primary: #1e3a8a;
    --secondary: #3b82f6;
    --accent: #10b981;
    --background: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
}

/* 1. CORRECCIÓN GLOBAL: Permitir el scroll siempre */
html {
    height: auto;
    min-height: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ocupa al menos el alto de la pantalla */
    margin: 0;
}

/* Barra de navegación moderna */
.navbar {
    background-color: var(--primary) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 2rem;
    flex-shrink: 0; /* Que no se encoja */
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--white) !important;
}

.nav-link {
    color: rgba(255,255,255,0.8) !important;
    font-weight: 500;
}

/* 2. CONTENEDOR PRINCIPAL: Corregido para que no corte nada */

.container {
    background: #ffffff !important;
    padding: 2rem !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1) !important;
    margin-top: 2rem !important;
    margin-bottom: 2rem !important;
    /* ESTO ES LO MÁS IMPORTANTE: */
    height: auto !important; /* Permite que crezca */
    min-height: fit-content !important; /* Se ajusta al contenido */
    overflow: visible !important; /* NO corta nada */
    display: block !important; /* Layout normal */
}

/* Asegura que el cuerpo de la página permita scroll */
html, body {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh !important;
}

/* Estilo para las Tablas */
.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

    .table thead th {
        background-color: #f1f5f9;
        color: var(--text-muted);
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.75rem;
        padding: 12px;
    }

/* Botones */
.btn {
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
}

.btn-primary {
    background-color: var(--primary);
    border: none;
}

/* Títulos */
h1, h2, h3 {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

/* 3. FOOTER: Corregido para que no se encime */
footer {
    position: static !important; /* Quita cualquier posición fija */
    padding: 20px 0 !important;
    margin-top: 50px !important; /* Separa el footer del cuadro blanco */
    background-color: #f8fafc !important;
    border-top: 1px solid #dee2e6 !important;
    width: 100% !important;
    display: block !important;
}
