/* ═══════════════════════════════════════════════════════════════════
   local_notas_secundaria — Instituto Santa Teresita del Niño Jesús
   Paleta: #E8771A (naranja) / #5C2E0A (marrón)
   ═══════════════════════════════════════════════════════════════════ */

/* ── Base ──────────────────────────────────────────────────────────── */
.notassec-plugin {
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #1a1a1a;
    padding: 0 0 2.5rem 0;
}

/* ── Header institucional — naranja sólido ─────────────────────────── */
.notassec-page-header {
    background: #E8771A;
    color: #fff;
    padding: 1.2rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 3px 10px rgba(92,46,10,0.25);
}
.notassec-logo-wrap { flex-shrink: 0; }
.notassec-logo {
    height: 64px;
    width: auto;
    border-radius: 50%;
    background: #fff;
    padding: 3px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.notassec-page-header h2 {
    margin: 0 0 0.15rem 0;
    font-size: 1.45rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.notassec-subtitulo {
    margin: 0;
    font-size: 0.92rem;
    color: #fff;
    opacity: 0.92;
}

/* ── Tabs de períodos ──────────────────────────────────────────────── */
.notassec-tabs {
    list-style: none;
    margin: 0 0 1.2rem 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    border-bottom: 3px solid #E8771A;
    gap: 2px;
}
.notassec-tabs li a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: #5C2E0A;
    text-decoration: none;
    border: 1px solid #d9b08c;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    background: #fdf5ee;
    transition: background 0.15s;
}
.notassec-tabs li a:hover {
    background: #fbe5cc;
    color: #3d1c05;
}
.notassec-tabs li.active a {
    background: #E8771A;
    color: #fff;
    border-color: #E8771A;
}

/* ── Selector de sección ───────────────────────────────────────────── */
.notassec-selector-form {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.notassec-selector-form .form-control {
    min-width: 220px;
}

/* ── Título de tabla ───────────────────────────────────────────────── */
.notassec-tabla-titulo {
    font-size: 1.05rem;
    color: #5C2E0A;
    font-weight: 700;
    margin-bottom: 0.8rem;
    padding-left: 0.5rem;
    border-left: 4px solid #E8771A;
}

/* ── Tablas ────────────────────────────────────────────────────────── */
.notassec-tabla thead th,
.notassec-tabla-resumen thead th {
    background: #5C2E0A;
    color: #fff;
    font-size: 0.78rem;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    padding: 0.4rem 0.5rem;
}
.notassec-tabla tbody tr:nth-child(even),
.notassec-tabla-resumen tbody tr:nth-child(even) {
    background: #fdf8f4;
}
.notassec-tabla td,
.notassec-tabla-resumen td {
    vertical-align: middle;
    font-size: 0.83rem;
    padding: 0.3rem 0.4rem;
    min-width: 130px;
}
.notassec-tabla td:first-child,
.notassec-tabla-resumen td:first-child {
    min-width: unset;
    white-space: nowrap;
}

/* ── Inputs de nota y observación ──────────────────────────────────── */
.notassec-tabla .notassec-select,
.notassec-tabla .notassec-num-input {
    width: 100%;
    min-width: 80px;
}
.notassec-tabla .notassec-obs-input {
    width: 100%;
    min-width: 120px;
}

/* ── Nota reprobada ────────────────────────────────────────────────── */
.notassec-reprobado {
    color: #c0392b !important;
    font-weight: 700;
}

/* ── Inasistencias bloque ──────────────────────────────────────────── */
.notassec-inas-resumen {
    background: #fdf5ee;
    border: 1px solid #e8c49a;
    border-radius: 6px;
    padding: 0.7rem 1rem;
    margin-top: 1rem;
    font-size: 0.91rem;
}

/* ── Botón institucional ───────────────────────────────────────────── */
.notassec-btn-primary {
    background: #E8771A;
    color: #fff !important;
    border: none;
    font-weight: 600;
    transition: background 0.2s;
    padding: 0.4rem 1rem;
    border-radius: 4px;
}
.notassec-btn-primary:hover {
    background: #5C2E0A;
    color: #fff !important;
}

/* ── Admin: badges de asignaciones ────────────────────────────────── */
.notassec-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fbe5cc;
    border: 1px solid #e8c49a;
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 0.77rem;
    margin: 2px;
    line-height: 1.4;
}
.notassec-del {
    color: #c0392b;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
}
.notassec-del:hover { color: #922b21; }

/* ── Formularios admin ─────────────────────────────────────────────── */
.notassec-form {
    background: #fdf8f4;
    border: 1px solid #e8c49a;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    gap: 0.5rem !important;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
.notassec-form .form-control {
    min-width: 170px;
}

/* ── Lista de hijos ────────────────────────────────────────────────── */
.notassec-lista-hijos {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
}
.notassec-lista-hijos li a {
    display: block;
    padding: 0.65rem 1.1rem;
    border: 1px solid #e8c49a;
    border-radius: 6px;
    margin-bottom: 0.4rem;
    color: #5C2E0A;
    font-weight: 600;
    text-decoration: none;
    background: #fdf5ee;
    transition: background 0.15s;
}
.notassec-lista-hijos li a:hover { background: #fbe5cc; }

/* ── Selector wrap centrado ────────────────────────────────────────── */
.notassec-selector-wrap {
    max-width: 440px;
    margin: 2rem auto;
    padding: 1.8rem;
    border: 1px solid #e8c49a;
    border-radius: 8px;
    text-align: center;
    background: #fffaf6;
}
.notassec-selector-wrap h4 { color: #5C2E0A; margin-bottom: 1rem; }

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE MÓVIL — tabla de carga de notas
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

    /* Header */
    .notassec-page-header {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
        gap: 0.8rem;
    }
    .notassec-page-header h2 { font-size: 1.1rem; }
    .notassec-logo { height: 48px; }

    /* Tabs — scroll horizontal */
    .notassec-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 2px;
        padding-bottom: 2px;
        border-bottom: 3px solid #E8771A;
    }
    .notassec-tabs li { flex-shrink: 0; }
    .notassec-tabs li a {
        padding: 0.4rem 0.7rem;
        font-size: 0.75rem;
        white-space: nowrap;
    }

    /* Selector de sección full width */
    .notassec-selector-form {
        flex-direction: column;
        align-items: stretch;
    }
    .notassec-selector-form .form-control,
    .notassec-selector-form select {
        width: 100%;
        min-width: unset;
    }

    /* Tabla de carga: layout de tarjetas por alumno en móvil */
    .notassec-tabla-mobile-wrap {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    /* Ocultar tabla normal y mostrar tarjetas en móvil */
    .notassec-tabla-desktop { display: none; }
    .notassec-tabla-card {
        background: #fff;
        border: 1px solid #e8c49a;
        border-radius: 8px;
        padding: 0.8rem;
        box-shadow: 0 2px 6px rgba(92,46,10,0.1);
    }
    .notassec-tabla-card .card-alumno-nombre {
        font-weight: 700;
        color: #5C2E0A;
        font-size: 0.95rem;
        padding: 0.4rem 0;
        border-bottom: 2px solid #E8771A;
        margin-bottom: 0.6rem;
    }
    .notassec-tabla-card .card-materia-row {
        display: flex;
        flex-direction: column;
        padding: 0.4rem 0;
        border-bottom: 1px solid #f0e0d0;
    }
    .notassec-tabla-card .card-materia-row:last-child { border-bottom: none; }
    .notassec-tabla-card .card-materia-label {
        font-weight: 600;
        font-size: 0.82rem;
        color: #5C2E0A;
        margin-bottom: 0.3rem;
    }
    .notassec-tabla-card .card-materia-inputs {
        display: flex;
        gap: 0.4rem;
        align-items: center;
        flex-wrap: wrap;
    }
    .notassec-tabla-card .notassec-select,
    .notassec-tabla-card .notassec-num-input {
        width: 90px;
        flex-shrink: 0;
    }
    .notassec-tabla-card .notassec-obs-input {
        flex: 1;
        min-width: 120px;
    }
    .notassec-tabla-card .input-group {
        flex: 1;
        min-width: 120px;
    }

    /* Tabla resumen en móvil: scroll horizontal */
    .notassec-tabla-resumen {
        font-size: 0.72rem;
    }
    .notassec-tabla-resumen thead th {
        font-size: 0.65rem;
        padding: 0.25rem;
    }
    .notassec-tabla-resumen td {
        font-size: 0.72rem;
        padding: 0.25rem;
        min-width: 55px;
    }

    /* Tabla regular en móvil */
    .notassec-tabla thead th {
        font-size: 0.68rem;
        padding: 0.25rem 0.2rem;
    }
    .notassec-tabla td {
        font-size: 0.75rem;
        padding: 0.25rem 0.2rem;
        min-width: 110px;
    }

    /* Inputs más grandes para touch */
    .notassec-tabla .form-control-sm,
    .notassec-tabla-card .form-control-sm {
        font-size: 0.9rem;
        padding: 0.4rem 0.5rem;
        height: auto;
    }

    /* Botón guardar observación más fácil de tocar */
    .notassec-obs-btn,
    .notassec-rec-obs-btn {
        min-width: 38px;
        min-height: 38px;
        font-size: 1rem;
        padding: 0.3rem 0.6rem;
    }

    /* Inasistencias */
    .notassec-inas-resumen {
        font-size: 0.82rem;
        padding: 0.5rem 0.7rem;
    }

    /* Título tabla */
    .notassec-tabla-titulo {
        font-size: 0.92rem;
    }
}

@media (max-width: 480px) {
    .notassec-page-header h2 { font-size: 0.98rem; }
    .notassec-tabs li a {
        padding: 0.35rem 0.5rem;
        font-size: 0.7rem;
    }
    .notassec-tabla td,
    .notassec-tabla thead th {
        min-width: 90px;
        font-size: 0.68rem;
    }
}
