/* ===============================
    ESTILO GENERAL
================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    padding: 10px;
}

/* ===============================
    HEADER
================================= */
.header {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.header h1 {
    font-size: 1.5rem; /* Ajustado para móvil */
    margin-bottom: 5px;
}

/* ===============================
    LAYOUT PRINCIPAL
================================= */
.container {
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 !important; /* Elimina padding lateral en móvil */
}

@media (min-width: 992px) {
    .container {
        flex-direction: row;
        padding: 0 20px !important;
    }
}

/* ===============================
    SIDEBAR (LISTA)
================================= */
.list {
    background: #ffffff;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

@media (min-width: 992px) {
    .list { width: 280px; flex: 0 0 280px; }
}

.list ul { list-style: none; padding: 0; }
.list li { padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.list li a { color: #2563eb; text-decoration: none; display: block; }

/* ===============================
    CONTENIDO PRINCIPAL (ARTICLE)
================================= */
.article {
    background: #ffffff;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    flex: 1;
    min-width: 0; /* Vital para que la tabla no rompa el layout */
}

/* ===============================
    TABLA RESPONSIVA
================================= */
.table-responsive {
    border-radius: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    min-width: 600px; /* Fuerza el scroll lateral en pantallas pequeñas */
    margin-bottom: 0;
}

.table thead {
    background-color: #1e293b;
    color: white;
}

/* ===============================
    FOOTER
================================= */
.footer {
    text-align: center;
    padding: 20px;
    color: #64748b;
    font-size: 0.9rem;
}