body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f9;
    margin: 0;
    padding: 0;
    color: #333;
}

/* Contenedor general */
.container {
    width: 95%;
    max-width: 1100px;
    margin: 40px auto;
}

/* Tarjetas */
.card {
    background: #fff;
    padding: 20px 25px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    margin-bottom: 20px;
}

/* Barra superior */
.topbar {
    background: #007bff;
    color: #fff;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar a {
    color: #fff;
    text-decoration: none;
    margin-left: 15px;
}

/* Botones */
.btn-primary {
    background: #1d4ed8;        /* azul principal */
    color: #ffffff;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.btn-primary:hover {
    background: #1e40af;
}

/* OJO: aquí el nombre correcto es btn-secondary */
.btn-secondary {
    background: #ffffff;
    color: #1d4ed8;
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid #93c5fd;
    font-size: 13px;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #eff6ff;
    border-color: #60a5fa;
}

/* Variación pequeña para botones de acciones en tabla */
.btn-small {
    padding: 4px 10px;
    font-size: 12px;
}

/* Botón volver */
.btn-back {
    margin-top: 12px;
    display: inline-block;
}


/* Tabla */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th {
    background: #007bff;
    color: white;
    padding: 10px;
}

td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

tr:hover {
    background: #f1f8ff;
}

/* Login */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #e9eff5;
}

.login-container {
    background: white;
    padding: 30px 35px;
    width: 350px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    text-align: center;
}

.login-form {
    margin-top: 20px;
    text-align: left;
}

.login-form input {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 15px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* ===== Layout ancho para páginas con tablas grandes ===== */
.container-wide {
    max-width: 100%;
    margin: 20px auto;
    padding: 0 20px;
}

.card-wide {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* Tabla de asignaciones sin scroll horizontal, ajustando texto */
.asig-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto; /* que reparta el ancho según contenido */
    font-size: 13px;
}

.asig-table th,
.asig-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #eee;
    text-align: left;
    white-space: normal;        /* permite saltos de línea */
    word-wrap: break-word;      /* rompe palabras largas si es necesario */
}

.asig-table thead th {
    background: #007bff;
    color: #fff;
}

.asig-table tr:nth-child(even) td {
    background: #f9fbff;
}

/* =============== */
/* GRID CONTAINER */
/* =============== */
.container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

/* TITULOS */
.title-main {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 16px;
    color: #444;
}

/* TARJETAS GENERALES */
.card {
    background: #fff;
    padding: 22px;
    border-radius: 14px;
    margin-bottom: 20px;
}

.shadow, .shadow-lg {
    box-shadow: 0 3px 10px rgba(0,0,0,0.10);
}

.shadow-lg {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* GRID PARA LOS RESÚMENES */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

/* GRID PARA ACCESOS RÁPIDOS */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

/* TARJETAS DE ESTADISTICAS */
.stat-card {
    text-align: center;
    color: #fff;
    border-radius: 14px;
    padding: 25px;
}

.stat-card h3 {
    margin: 0;
    font-size: 18px;
}

.stat-number {
    margin-top: 10px;
    font-size: 36px;
    font-weight: bold;
    display: block;
}

/* COLORES */
.blue { background: #1976D2; }
.green { background: #388E3C; }
.orange { background: #F57C00; }
.red { background: #D32F2F; }

/* ACCESOS RÁPIDOS */
.quick-card {
    display: block;
    text-decoration: none;
    color: #222;
    transition: transform 0.15s ease-in-out;
    border-left: 6px solid #1976D2;
}

.quick-card:hover {
    transform: translateY(-4px);
    background: #f5f8ff;
}

.quick-card h3 {
    margin: 0 0 10px;
    font-size: 20px;
}

.section-title {
    margin-top: 20px;
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: 700;
}

/* ========== Dashboard bonito ========== */

body {
    background-color: #f3f4f6;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #111827;
}

/* Barra superior */
.topbar {
    background-color: #1d4ed8;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 24px;
    font-size: 14px;
}

.topbar-left {
    font-weight: 600;
}

.topbar-right {
    font-size: 13px;
}

.topbar-link {
    color: #bfdbfe;
    text-decoration: none;
}

.topbar-link:hover {
    text-decoration: underline;
}

/* Contenedor principal */
.page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

/* Títulos */
.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-size: 28px;
    margin: 0 0 4px;
}

.page-subtitle {
    font-size: 14px;
    color: #4b5563;
    margin: 0;
}

/* Secciones del dashboard */
.dashboard-section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 18px;
    margin: 0 0 12px;
}

/* Tarjetas de resumen (métricas) */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}

.summary-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 16px 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
}

.summary-value {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
}

.summary-extra {
    font-size: 12px;
    color: #6b7280;
}

/* Colores sutiles por tipo de tarjeta (solo borde/etiqueta) */
.summary-docentes .summary-value { color: #1d4ed8; }
.summary-cursos   .summary-value { color: #047857; }
.summary-asignados .summary-value { color: #7c3aed; }
.summary-pendientes .summary-value { color: #b91c1c; }

/* Tarjetas de accesos rápidos */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}

.quick-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 18px 20px;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition:
        transform 0.12s ease,
        box-shadow 0.12s ease,
        border-color 0.12s ease;
}

.quick-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
    border-color: #2563eb;
}

.quick-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.quick-title {
    font-size: 15px;
    font-weight: 600;
}

.quick-text {
    font-size: 13px;
    color: #4b5563;
    margin: 0;
}

/* Un poco de respiro en pantallas chicas */
@media (max-width: 640px) {
    .page-wrapper {
        padding: 16px 10px 32px;
    }

    .page-title {
        font-size: 22px;
    }
}
