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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f1f5f9;
    color: #1e293b;
    line-height: 1.5;
    min-height: 100vh;
}

/*GRID DEL DASHBOARD */
.dashboard {
    display: grid;
    grid-template-areas:
        "header header header"
        "nav    main   aside"
        "footer footer footer";
    grid-template-columns: 200px 1fr 280px;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
}

.dashboard-header {
    grid-area: header;
    background-color: #0d2154;
    color: white;
    padding: 18px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.4rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.logo h1 span {
    color: #3b82f6;
}

.usuario {
    font-size: 0.9rem;
    color: #cbd5e1;
}

.usuario strong {
    color: white;
    font-weight: 600;
}

/* NAV lateral — mismo azul oscuro que el header */
.dashboard-nav {
    grid-area: nav;
    background-color: #0d2154;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.dashboard-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dashboard-nav a {
    display: block;
    color: #cbd5e1;
    text-decoration: none;
    padding: 14px 24px;
    font-size: 0.9rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dashboard-nav a:hover {
    background-color: #1e3a8a;
    color: white;
}

/* Item activo con fondo azul brillante */
.dashboard-nav a.activo {
    background-color: #2563eb;
    color: white;
    font-weight: 600;
}

/* Botón "Volver al inicio"  */
.nav-volver {
    margin-top: auto;
    padding: 20px;
}

.btn-volver-edu {
    display: block;
    padding: 10px 14px;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    transition: background 0.3s ease;
}

.btn-volver-edu:hover {
    background: #2563eb;
}

/*CONTENIDO PRINCIPAL */
.dashboard-main {
    grid-area: main;
    padding: 25px 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Tarjetas de métricas — blancas, con fondo claro */
.tarjetas {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.tarjeta {
    background-color: #ffffff;
    padding: 18px 22px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tarjeta h3 {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 10px;
}

.tarjeta-numero {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1e3a8a;
    line-height: 1;
}

/* TABLA DE ENTREGAS */
.entregas {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.entregas h2 {
    background-color: #e2e8f0;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
    padding: 14px 22px;
    margin: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    padding: 14px 22px;
    text-align: left;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
}

td {
    padding: 14px 22px;
    font-size: 0.9rem;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background-color: #f8fafc;
}

/* ESTADOS CON COLOR*/
.estado {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.estado.entregado {
    background-color: #d1fae5;
    color: #065f46;
}

.estado.pendiente {
    background-color: #fef3c7;
    color: #92400e;
}

/*ASIDE (AVISO)*/
.dashboard-aside {
    grid-area: aside;
    background-color: #f8fafc;
    padding: 25px 22px;
}

.dashboard-aside h2 {
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.lista-avisos {
    list-style: none;
    padding-left: 0;
}

.lista-avisos li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: #334155;
    line-height: 1.5;
}

.lista-avisos li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #2563eb;
    font-weight: bold;
    font-size: 1.1rem;
    line-height: 1;
}

/* FOOTER*/
.dashboard-footer {
    grid-area: footer;
    background-color: #0d2154;
    color: #cbd5e1;
    padding: 14px 30px;
    text-align: center;
    font-size: 0.8rem;
}

/* RESPONSIVE*/
@media (max-width: 900px) {
    .dashboard {
        grid-template-areas:
            "header"
            "nav"
            "main"
            "aside"
            "footer";
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .dashboard-nav ul {
        display: flex;
        justify-content: space-around;
        flex-wrap: wrap;
    }

    .dashboard-nav a {
        padding: 10px 14px;
    }

    .nav-volver {
        margin-top: 0;
        padding: 10px;
    }

    .dashboard-main {
        padding: 20px 15px;
    }

    .tarjetas {
        grid-template-columns: 1fr;
    }

    .entregas {
        overflow-x: auto;
    }

    table {
        min-width: 500px;
    }
}