/* Cabecera */
.ficha-alumno-datos {
    background: #FEE7D8;
    border-left: 6px solid #F76300;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 25px;
}

.ficha-alumno-datos h2 {
    margin: 0 0 10px;
    color: #F76300;
}

/* Acordeón */
.acordeon-titulo {
    background: #F76300;
    color: white;
    padding: 12px 15px;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    border-radius: 6px;
    margin-top: 12px;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.2s ease;
}

.acordeon-titulo:hover {
    background: #d95500;
}

.acordeon-contenido {
    background: #fff;
    padding: 15px;
    border-left: 4px solid #F76300;
    border-radius: 0 0 6px 6px;
    margin-bottom: 10px;
    display: none; /* se abre con JS */
}
/*.acordeon-contenido {
    display: none;
    padding: 15px;
    border: 1px solid #ddd;
    border-top: none;
}*/
.acordeon-contenido.abierto {
    display: block;
}
/* PESTAÑAS */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.tab-btn {
    padding: 8px 15px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    cursor: pointer;
    border-radius: 4px;
}

.tab-btn.activo {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.tab-contenido {
    display: none;
}

.tab-contenido.activo {
    display: block;
}

@media (max-width: 600px) {
    .tabs {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
        scrollbar-width: thin; /* Firefox */
    }

    .tabs::-webkit-scrollbar {
        height: 6px;
    }

    .tabs::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 4px;
    }

    .tab-btn {
        flex: 0 0 auto; /* evita que se encojan */
    }
}


/* Calendario + leyenda */
.calendario-con-leyenda {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    margin-top: 15px;
}

.cal-wrapper {
    display: flex;
    justify-content: center;
}

.calendario {
    border-collapse: collapse;
    font-size: 13px;
    margin: 0 auto;
}

.calendario th {
    background: #ddd;
    padding: 5px;
}

.calendario td {
    width: 32px;
    height: 32px;
    padding: 2px;
    text-align: center;
    border: 1px solid #ccc;
}

.iconito {
    font-size: 11px;
    display: block;
    margin-top: 2px;
}

/* Leyenda */
.mensaje-ok {
    background: #e6ffed;
    border: 1px solid #2ecc71;
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    color: #2e7d32;
    font-weight: bold;
}

.leyenda-asistencias {
    min-width: 180px;
    font-size: 14px;
}

.leyenda-asistencias ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.leyenda-asistencias li {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

@media (max-width: 600px) {
    .calendario-con-leyenda {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .cal-wrapper {
        width: 100%;
        overflow-x: auto; /* por si acaso */
    }

    .calendario td {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .leyenda-asistencias {
        text-align: center;
    }
}

.color-box {
    width: 16px;
    height: 16px;
    display: inline-block;
    margin-right: 8px;
    border: 1px solid #999;
}

.color-box.falta-prof { background: #D32F2F; }
.color-box.falta-alum { background: #FFCDD2; }
.color-box.clase-pres { background: #81C784; }
.color-box.clase-online { background: #64B5F6; }
.color-box.recuperacion { background: #FFF59D; }

/* Totales */
.totales-mes {
    margin-top: 20px;
    text-align: center;
}

.totales-mes ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.totales-mes li {
    margin: 4px 0;
    font-size: 14px;
}

/*Estilos para panel profesor*/
/* ============================
   TABLA DE ASISTENCIAS
============================ */

.tabla-asistencias {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    font-size: 14px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.tabla-asistencias th {
    background: #F76300;
    color: white;
    padding: 10px;
    text-align: left;
    font-weight: bold;
}

.tabla-asistencias td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.tabla-asistencias tr:nth-child(even) {
    background: #FFF5EF;
}

.tabla-asistencias tr:hover {
    background: #FFE2D2;
}


/* ============================
   BOTÓN BORRAR (ICONO)
============================ */

.btn-borrar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #d9534f;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.2s ease;
}

.btn-borrar:hover {
    background: #c9302c;
}

/* Icono de papelera */
.btn-borrar::before {
    content: "🗑️";
    font-size: 15px;
}

/*================================
        FORMULARIO
================================*/

/* Contenedor del formulario */
.form-asistencia {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap; /* permite apilar en móvil */
    margin-top: 15px;
    background: #FFF5EF;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #F76300;
}

/* Cada campo */
.form-asistencia p {
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* Etiquetas */
.form-asistencia label {
    font-weight: bold;
    margin-bottom: 0px !important;
    color: #F76300;
}
.form-asistencia p {
    margin-bottom: 2px; /* controla el espacio entre bloques */
}

/* Inputs y selects */
.form-asistencia input[type="date"],
.form-asistencia select {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    min-width: 150px;
}

/* Botón */
.form-asistencia button {
    background: #F76300;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.2s ease;
}

.form-asistencia button:hover {
    background: #d95500;
}

/* Móvil */
@media (max-width: 600px) {
    .form-asistencia {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .form-asistencia p {
        width: 100%;
    }

    .form-asistencia input,
    .form-asistencia select,
    .form-asistencia button {
        width: 100%;
    }
}
/* ============================
   PANEL PROFESOR
============================ */

/* Título principal */
.panel-profesor-titulo {
    color: #F76300;
    margin-bottom: 15px;
}

/* Caja de datos del profesor */
.panel-profesor-datos {
    background: #FEE7D8;
    border-left: 6px solid #F76300;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 25px;
    font-size: 15px;
}

.panel-profesor-datos p {
    margin: 4px 0;
}

/* Subtítulo */
.panel-profesor-subtitulo {
    color: #F76300;
    margin-top: 25px;
    margin-bottom: 10px;
}

/* Mensaje sin alumnos */
.panel-profesor-noalumnos {
    background: #FFF5EF;
    border-left: 4px solid #F76300;
    padding: 12px;
    border-radius: 6px;
    color: #444;
}

/* Lista de alumnos */
.panel-profesor-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

.panel-profesor-item {
    background: #FFF5EF;
    border-left: 4px solid #F76300;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    transition: background 0.2s ease;
}

.panel-profesor-item:hover {
    background: #FFE2D2;
}

/* Enlace al alumno */
.panel-profesor-alumno {
    font-weight: bold;
    color: #F76300;
    text-decoration: none;
    font-size: 16px;
}

.panel-profesor-alumno:hover {
    text-decoration: underline;
}

/* Actividades */
.panel-profesor-actividades {
    color: #555;
    font-size: 13px;
}
/* ============================
   FORMULARIO DE PAGOS
============================ */

.form-pagos {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e3e3e3;
    max-width: 600px;
    margin: 20px auto;
    display: grid;
    gap: 15px;
}

.form-pagos label {
    font-weight: 600;
    color: #333;
}

.form-pagos input,
.form-pagos select,
.form-pagos textarea {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 15px;
    transition: border-color 0.2s ease;
}

.form-pagos input:focus,
.form-pagos select:focus,
.form-pagos textarea:focus {
    border-color: #0073aa;
    outline: none;
}

.form-pagos button {
    background: #0073aa;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.form-pagos button:hover {
    background: #005f87;
}

/* ============================
   FORMULARIO DE PAGOS MOD.
============================ */

.form-pagos-linea {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap; /* permite apilar en móvil */
    margin-top: 15px;
    background: #FFF5EF;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #F76300;
}

/* Cada campo */
.form-pagos-linea p {
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* Etiquetas */
.form-pagos-linea label {
    font-weight: bold;
    margin-bottom: 2px;
    color: #F76300;
}

/* Inputs y selects */
.form-pagos-linea input,
.form-pagos-linea select {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    min-width: 130px;
}

/* Campo observaciones más ancho */
.form-pagos-linea .campo-observ {
    flex: 1;
}

/* Botón */
.form-pagos-linea button {
    background: #F76300;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.2s ease;
}

.form-pagos-linea button:hover {
    background: #d95500;
}

/* Móvil */
@media (max-width: 600px) {
    .form-pagos-linea {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .form-pagos-linea p,
    .form-pagos-linea input,
    .form-pagos-linea select,
    .form-pagos-linea button {
        width: 100%;
    }
}


/* ============================
   TABLA DE PAGOS
============================ */

.tabla-pagos {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.tabla-pagos th {
    background: #F76300;
    color: white;
    padding: 10px;
    text-align: left;
    font-weight: bold;
}

.tabla-pagos td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.tabla-pagos tr:nth-child(even) {
    background: #FFF5EF;
}

.tabla-pagos tr:hover {
    background: #FFE2D2;
}

/* Botón borrar dentro de la tabla */
.btn-borrar-pago {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #d9534f;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.2s ease;
}

.btn-borrar-pago:hover {
    background: #c9302c;
}

.btn-borrar-pago::before {
    content: "🗑️";
    font-size: 15px;
}

/* Responsive */
@media (max-width: 600px) {
    .form-pagos {
        padding: 12px;
        gap: 10px;
    }

    .form-pagos button {
        width: 100%;
    }
}
/* ============================
   TABLA DE PAGOS → TARJETAS EN MÓVIL
============================ */

@media (max-width: 600px) {

    /* Ocultamos la cabecera */
    .tabla-pagos thead {
        display: none;
    }

    /* Cada fila se convierte en tarjeta */
    .tabla-pagos tr {
        display: block;
        background: #FFF5EF;
        margin-bottom: 12px;
        padding: 12px;
        border-radius: 8px;
        border-left: 4px solid #F76300;
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    }

    /* Cada celda se convierte en línea con etiqueta */
    .tabla-pagos td {
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
        border: none;
        font-size: 14px;
    }

    /* Etiqueta automática */
    .tabla-pagos td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #F76300;
        margin-right: 10px;
    }

    /* Botón borrar ocupa toda la línea */
    .tabla-pagos td:last-child {
        justify-content: flex-start;
        margin-top: 8px;
    }
}

