
:root {
    --azul-oscuro: #0f172a;
    --azul-medio: #1e3a8a;
    --azul-principal: #2563eb;
    --azul-claro: #3b82f6;
    --fondo: #f1f5f9;
    --blanco: #ffffff;
    --texto: #334155;
    --borde: #e2e8f0;
}

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

body {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 280px;
    grid-template-rows: 90px 1fr auto;
    grid-template-areas:
        "header header header"
        "menu contenido avisos"
        "footer footer footer";
    font-family: Arial, Helvetica, sans-serif;
    background-color: var(--fondo);
    color: var(--texto);
}

/* ENCABEZADO */
header {
    grid-area: header;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 35px;
    background: linear-gradient(
        120deg,
        #0f172a,
        #1e3a8a,
        #2563eb
    );
    color: white;
}

.logo h1 {
    color: white;
    font-size: 32px;
}

.logo h1 span {
    color: #93c5fd;
}

.profesor {
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
}

/* MENÚ LATERAL */
.sidebar {
    grid-area: menu;
    background: linear-gradient(
        180deg,
        #0f172a,
        #1e3a8a
    );
}

.sidebar ul {
    list-style: none;
    padding-top: 15px;
}

.sidebar a {
    display: block;
    padding: 19px 28px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 17px;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.sidebar a:hover {
    background-color: #2563eb;
    color: white;
    border-left-color: #93c5fd;
    padding-left: 35px;
}

/* CONTENIDO PRINCIPAL */
main {
    grid-area: contenido;
    min-width: 0;
    padding: 30px 25px;
}

/* TARJETAS */
.tarjeta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 25px;
}

.card,
.entregas {
    background-color: white;
    border: 1px solid var(--borde);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.card {
    min-height: 150px;
    padding: 25px 22px;
    border-top: 4px solid var(--azul-principal);
    transition: transform 0.3s ease,
                box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
}

.card h2 {
    margin-bottom: 15px;
    color: #334155;
    font-size: 20px;
    line-height: 1.35;
}

.card p {
    color: #2563eb;
    font-size: 36px;
    font-weight: bold;
}

/* ENTREGAS RECIENTES */
.entregas {
    padding: 25px 22px;
}

.entregas h1,
.entregas h2 {
    margin-bottom: 25px;
    color: #0f172a;
    font-size: 25px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

/* TABLA */
table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
}

thead {
    background-color: #eff6ff;
}

th {
    padding: 13px 10px;
    border-bottom: 2px solid #bfdbfe;
    color: #1e3a8a;
    text-align: left;
    font-size: 14px;
}

td {
    padding: 15px 10px;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    font-size: 15px;
    vertical-align: middle;
}

tbody tr {
    transition: background-color 0.3s;
}

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

/* ESTADOS */
.estado-entregado,
.estado-pendiente {
    display: inline-block;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
}

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

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

/* AVISOS */
.avisos {
    grid-area: avisos;
    padding: 25px;
    border-left: 1px solid var(--borde);
    background-color: #ffffff;
}

.avisos h2 {
    margin-bottom: 20px;
    color: #1e3a8a;
    font-size: 20px;
}

.avisos ul {
    padding-left: 20px;
}

.avisos li {
    margin-bottom: 15px;
    color: #64748b;
    font-size: 15px;
    line-height: 1.5;
}

.avisos strong {
    color: #334155;
}

/* PIE DE PÁGINA */
.footer {
    grid-area: footer;
    padding: 18px 10px;
    background-color: #0f172a;
    color: white;
    text-align: center;
}

.footer p {
    font-size: 14px;
}

/* TABLETS */
@media (max-width: 1000px) {
    body {
        grid-template-columns: 200px minmax(0, 1fr);
        grid-template-rows: 90px 1fr auto auto;
        grid-template-areas:
            "header header"
            "menu contenido"
            "menu avisos"
            "footer footer";
    }

    .avisos {
        border-top: 1px solid var(--borde);
        border-left: 0;
    }
}

/* CELULARES */
@media (max-width: 650px) {
    body {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto 1fr auto auto;
        grid-template-areas:
            "header"
            "menu"
            "contenido"
            "avisos"
            "footer";
    }

    header {
        min-height: 75px;
        padding: 12px 18px;
    }

    .logo h1 {
        font-size: 25px;
    }

    .profesor {
        font-size: 13px;
        text-align: right;
    }

    .sidebar ul {
        display: flex;
        flex-wrap: wrap;
        padding-top: 0;
    }

    .sidebar li {
        flex: 1 1 auto;
    }

    .sidebar a {
        padding: 14px 12px;
        text-align: center;
        font-size: 14px;
    }

    .sidebar a:hover {
        padding-left: 12px;
    }

    main {
        padding: 20px 15px;
    }

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

    .avisos {
        padding: 20px;
    }
}
