* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --navy: #0d214f;
    --navy-deep: #081633;
    --navy-soft: #13295f;
    --cyan: #18c2f1;
    --red: #ef3146;
    --white: #f7f8fb;
    --muted: rgba(240, 244, 255, 0.76);
    --line: rgba(255, 255, 255, 0.12);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

body {
    background:
        radial-gradient(circle at 20% 18%, rgba(24, 194, 241, 0.08), transparent 18%),
        radial-gradient(circle at 84% 70%, rgba(239, 49, 70, 0.12), transparent 24%),
        linear-gradient(180deg, #081633 0%, #0a1f4a 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--white);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    padding: 20px;
    border: none;
    backdrop-filter: none;
}

header {
    background: transparent;
    color: #ffffff;
    padding: 10px 0 20px;
    border-radius: 0;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-img {
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    font-weight: 900;
    font-size: 1.4em;
    text-align: center;
    line-height: 1.2;
    padding: 5px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.32);
    border: 3px solid white;
    overflow: hidden;
}

.logo-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-text {
    font-size: 2.5em;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
    color: white;
}

.logo-text small {
    font-size: 0.45em;
    display: block;
    font-weight: 400;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.9);
}

.header-title {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    text-align: right;
}

.header-title-text {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.header-title-text h1,
.header-title-text h2 {
    margin: 0;
}

.header-title-text h1 {
    font-size: 2em;
    margin-bottom: 1px;
    line-height: 1.05;
}

.header-title-text h2 {
    font-size: 0.96em;
    line-height: 1.15;
}

.header-title-logos {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

.header-title-logos::before {
    content: "";
    width: 1px;
    height: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.85));
}

.header-title-logos img {
    width: auto;
    height: 42px;
    object-fit: contain;
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.logo-link {
    display: inline-flex;
    align-items: center;
}

h1 {
    font-size: 2.2em;
    margin-bottom: 2px;
    font-weight: 700;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.18);
}

h2 {
    font-size: 1em;
    font-weight: 400;
    opacity: 0.95;
    text-shadow: none;
}

/* Hint para móvil */
.mobile-hint {
    display: none;
    background: rgba(24, 194, 241, 0.12);
    border: 1px solid rgba(24, 194, 241, 0.4);
    border-radius: 30px;
    padding: 10px 15px;
    margin-bottom: 15px;
    text-align: center;
    color: var(--cyan);
    font-size: 0.9em;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.hint-icon {
    font-size: 1.2em;
    margin-right: 8px;
}

.filters {
    background: transparent;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
    box-shadow: none;
    border: none;
}

.filter-group {
    flex: 1 1 200px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
}

select, input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.92);
    color: #0d214f;
}

select:focus, input:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(24, 194, 241, 0.15);
}

.btn {
    background: #ef3146;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn:hover {
    background: #d72a3e;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(239, 49, 70, 0.25);
}

.stats {
    background: transparent;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    border: none;
}

.table-container {
    overflow-x: auto;
    margin: 0 -5px;
    padding: 5px;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 18px 34px rgba(13, 33, 79, 0.16);
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.85);
    box-shadow:
        0 18px 34px rgba(13, 33, 79, 0.16),
        0 0 0 4px rgba(255, 255, 255, 0.18);
}

.scroll-hint {
    display: none;
    position: sticky;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #0d214f, #18c2f1);
    color: white;
    text-align: center;
    padding: 8px;
    font-size: 0.9em;
    font-weight: 600;
    border-radius: 20px;
    margin-top: 10px;
    animation: slideHint 1.5s infinite;
}

@keyframes slideHint {
    0% { transform: translateX(0); }
    50% { transform: translateX(10px); }
    100% { transform: translateX(0); }
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
    min-width: 1000px;
    color: #1d2a44;
    background: #ffffff;
}

th {
    background: #0d214f;
    color: white;
    font-weight: 600;
    padding: 15px 10px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;
    font-size: 0.95em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

td {
    padding: 12px 10px;
    border-bottom: 1px solid #e7edf6;
    text-align: left;
    vertical-align: middle;
}

tr {
    transition: all 0.2s ease;
}

tbody tr {
    background: #ffffff;
}

tbody tr:nth-child(even) {
    background: #f4f7fc;
}

tbody tr:hover {
    background: #eaf4ff;
    transform: scale(1.005);
    box-shadow: 0 10px 22px rgba(13, 33, 79, 0.12);
}

.curso-badge {
    background: transparent;
    color: #0d214f;
    padding: 4px 8px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85em;
    display: inline-block;
    border: none;
}

.grupo-badge {
    background: transparent;
    color: #0d214f;
    padding: 4px 8px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85em;
    display: inline-block;
    border: none;
}

.subgrupo-badge {
    background: transparent;
    color: #0d214f;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.75em;
    display: inline-block;
    margin-left: 5px;
    border: 1px dashed rgba(13, 33, 79, 0.45);
}

.docente {
    font-weight: 600;
    color: #0d214f;
}

.asignatura {
    color: #1f2f4d;
}

.hora {
    font-weight: 600;
    color: #7a1220;
    background: rgba(239, 49, 70, 0.16);
    padding: 3px 8px;
    border-radius: 15px;
    display: inline-block;
    font-size: 0.85em;
    border: 1px solid rgba(239, 49, 70, 0.35);
}

.aula {
    font-weight: 600;
    color: #0d214f;
    background: rgba(24, 194, 241, 0.16);
    padding: 3px 8px;
    border-radius: 15px;
    display: inline-block;
    font-size: 0.85em;
    margin-left: 5px;
    border: 1px solid rgba(24, 194, 241, 0.35);
}

.grupo-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: rgba(13, 33, 79, 0.7);
    font-style: italic;
}

.footer {
    background: transparent;
    color: white;
    padding: 10px 0 0;
    border-radius: 0;
    margin-top: 20px;
    display: block;
    font-size: 0.9em;
}

.footer-main {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 14px;
}

.footer-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    max-width: 46%;
}

.footer-info p {
    margin: 0;
    line-height: 1.35;
}

.footer-visits {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 600;
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.45);
    width: fit-content;
}

.footer-visits strong {
    font-size: 1.1em;
}

.footer-divider {
    width: 1px;
    min-height: 74px;
    background: rgba(255, 255, 255, 0.6);
    display: none;
}

.footer-logos {
    flex: 0 0 auto;
    width: auto;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 4px;
    background: transparent;
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: none;
    border: none;
}

.footer-logo-item {
    flex: 0 1 120px;
    min-width: 115px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.footer-logos img {
    width: 100%;
    max-width: 120px;
    height: 62px;
    object-fit: contain;
    background: transparent;
    border-radius: 0;
    padding: 0;
}

.footer-logo-item-compact img {
    max-width: 96px;
    height: 52px;
}

.footer-logo-item span {
    font-size: 0.67em;
    line-height: 1.25;
    color: rgba(255, 255, 255, 0.86);
}

.footer a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid white;
    padding-bottom: 2px;
    font-size: 0.9em;
}

.footer a:hover {
    color: rgba(255, 255, 255, 0.86);
    border-bottom-color: rgba(255, 255, 255, 0.86);
}

.footer-logos .logo-link {
    border-bottom: none;
    padding-bottom: 0;
}

.footer-logos .logo-link:hover {
    border-bottom: none;
}

/* Responsive para móviles - MEJORADO */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
    }

    header {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

    .header-logo {
        flex-direction: column;
        gap: 10px;
    }

    .logo-img {
        width: 60px;
        height: 60px;
        font-size: 1.2em;
    }

    .logo-text {
        font-size: 1.8em;
        text-align: center;
    }

    .header-title {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }

    .header-title-text {
        align-items: center;
    }

    .header-title-logos {
        flex-direction: row;
        align-items: center;
        gap: 4px;
    }

    .header-title-logos img {
        height: 33px;
    }

    h1 {
        font-size: 1.5em;
    }

    h2 {
        font-size: 0.9em;
    }

    /* Mostrar hint en móvil */
    .mobile-hint {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .filters {
        flex-direction: column;
        gap: 12px;
        padding: 15px;
    }

    .filter-group {
        width: 100%;
    }

    label {
        font-size: 0.85em;
        margin-bottom: 5px;
    }

    select, input {
        padding: 10px 12px;
        font-size: 0.95em;
    }

    .btn {
        width: 100%;
        padding: 12px;
        font-size: 1em;
    }

    .stats {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        padding: 12px;
    }

    .stats span {
        width: 100%;
        padding: 5px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    }

    .stats span:last-child {
        border-bottom: none;
    }

    /* Mostrar hint de scroll en la tabla */
    .scroll-hint {
        display: block;
    }

    .table-container {
        margin: 0;
        border-radius: 10px;
    }

    table {
        font-size: 0.85em;
    }

    th {
        padding: 12px 8px;
        font-size: 0.85em;
        white-space: nowrap;
    }

    td {
        padding: 10px 8px;
        white-space: nowrap;
    }

    .hora, .aula {
        display: inline-block;
        margin: 2px 0;
        font-size: 0.8em;
        padding: 2px 6px;
    }

    .curso-badge, .grupo-badge {
        font-size: 0.8em;
        padding: 3px 6px;
    }

    .subgrupo-badge {
        font-size: 0.7em;
        padding: 2px 4px;
    }

    .footer {
        flex-direction: column;
        text-align: center;
        font-size: 0.85em;
        padding: 12px 15px;
    }

    .footer-main {
        justify-content: center;
        width: 100%;
        flex-direction: column;
        align-items: center;
    }

    .footer-info {
        max-width: 100%;
        align-items: center;
        text-align: center;
    }

    .footer-logos {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
        padding: 10px;
    }

    .footer-logo-item {
        min-width: 112px;
        max-width: 140px;
    }

    .footer-logo-item span {
        font-size: 0.67em;
    }

    .footer-visits {
        justify-content: center;
        width: auto;
    }

    .footer-divider {
        width: 100%;
        min-height: 1px;
        height: 1px;
    }

    .footer a {
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
    }

    .container {
        padding: 12px;
    }

    .logo-img {
        width: 50px;
        height: 50px;
        font-size: 1em;
    }

    .logo-text {
        font-size: 1.5em;
    }

    .header-title-logos img {
        height: 29px;
        padding: 0;
    }

    h1 {
        font-size: 1.3em;
    }

    h2 {
        font-size: 0.85em;
    }

    .mobile-hint {
        font-size: 0.85em;
        padding: 8px 12px;
    }

    .filters {
        padding: 12px;
    }

    .filter-group label {
        font-size: 0.8em;
    }

    select, input, .btn {
        font-size: 0.9em;
    }

    th {
        font-size: 0.8em;
        padding: 10px 5px;
    }

    td {
        font-size: 0.8em;
        padding: 8px 5px;
    }

    .stats {
        font-size: 0.85em;
    }

    .footer {
        font-size: 0.8em;
        padding: 10px;
    }
}

/* Orientación landscape en móvil */
@media (max-width: 768px) and (orientation: landscape) {
    .container {
        max-width: 100%;
    }

    .filters {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .filter-group:last-of-type {
        grid-column: span 2;
    }

    .btn {
        grid-column: span 2;
    }
}
/* Responsive para móviles - MEJORADO */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
    }

    header {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

    .header-logo {
        flex-direction: column;
        gap: 10px;
    }

    .logo-img {
        width: 60px;
        height: 60px;
        font-size: 1.2em;
    }

    .logo-img img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .logo-text {
        font-size: 1.8em;
        text-align: center;
    }

    .header-title {
        text-align: center;
    }

    h1 {
        font-size: 1.5em;
    }

    h2 {
        font-size: 0.9em;
    }

    /* Mostrar hint en móvil */
    .mobile-hint {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 15px;
    }

    /* FILTROS REDISEÑADOS - MÁS COMPACTOS */
    .filters {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 15px;
        margin-bottom: 15px;
    }

    /* El buscador de docente ocupa las 2 columnas */
    .filter-group:nth-child(3) {
        grid-column: span 2;
    }

    /* El buscador de asignatura ocupa las 2 columnas */
    .filter-group:nth-child(4) {
        grid-column: span 2;
    }

    /* El botón ocupa las 2 columnas */
    .btn {
        grid-column: span 2;
        width: 100%;
        margin-top: 5px;
    }

    .filter-group {
        width: 100%;
        margin: 0;
    }

    label {
        font-size: 0.8em;
        margin-bottom: 3px;
        white-space: nowrap;
    }

    select, input {
        padding: 8px 10px;
        font-size: 0.9em;
        width: 100%;
    }

    .stats {
        flex-direction: column;
        text-align: center;
        gap: 5px;
        padding: 10px;
        font-size: 0.85em;
    }

    .stats span {
        width: 100%;
        padding: 3px 0;
    }

    /* Mostrar hint de scroll en la tabla */
    .scroll-hint {
        display: block;
        font-size: 0.8em;
        padding: 6px;
    }

    .table-container {
        margin: 0;
        border-radius: 10px;
    }

    table {
        font-size: 0.85em;
        min-width: 900px; /* Un poco más angosta para móvil */
    }

    th {
        padding: 10px 6px;
        font-size: 0.8em;
        white-space: nowrap;
    }

    td {
        padding: 8px 6px;
        white-space: nowrap;
    }

    .hora, .aula {
        display: inline-block;
        margin: 2px 0;
        font-size: 0.75em;
        padding: 2px 5px;
    }

    .curso-badge, .grupo-badge {
        font-size: 0.75em;
        padding: 2px 5px;
    }

    .subgrupo-badge {
        font-size: 0.65em;
        padding: 1px 3px;
    }

    .docente, .asignatura {
        font-size: 0.85em;
    }

    .footer {
        flex-direction: column;
        text-align: center;
        font-size: 0.8em;
        padding: 12px 15px;
        gap: 8px;
    }

    .footer-main {
        justify-content: center;
        width: 100%;
        flex-direction: column;
        align-items: center;
    }

    .footer-info {
        max-width: 100%;
        align-items: center;
        text-align: center;
    }

    .footer-logos {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 5px;
        padding: 8px;
    }

    .footer-logo-item {
        min-width: 105px;
        max-width: 132px;
    }

    .footer-logo-item span {
        font-size: 0.65em;
    }

    .footer-divider {
        width: 100%;
        min-height: 1px;
        height: 1px;
    }

    .footer a {
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
    }

    .container {
        padding: 12px;
    }

    .logo-img {
        width: 50px;
        height: 50px;
        font-size: 1em;
    }

    .logo-text {
        font-size: 1.5em;
    }

    h1 {
        font-size: 1.3em;
    }

    h2 {
        font-size: 0.85em;
    }

    .mobile-hint {
        font-size: 0.8em;
        padding: 6px 10px;
    }

    /* FILTROS AÚN MÁS COMPACTOS PARA PANTALLAS MUY PEQUEÑAS */
    .filters {
        gap: 8px;
        padding: 12px;
    }

    label {
        font-size: 0.75em;
    }

    select, input {
        padding: 7px 8px;
        font-size: 0.85em;
    }

    .btn {
        padding: 10px;
        font-size: 0.9em;
    }

    .stats {
        font-size: 0.8em;
        padding: 8px;
    }

    th {
        font-size: 0.75em;
        padding: 8px 4px;
    }

    td {
        font-size: 0.75em;
        padding: 6px 4px;
    }

    .hora, .aula {
        font-size: 0.7em;
        padding: 2px 4px;
    }

    .footer {
        font-size: 0.75em;
        padding: 10px;
    }

    .footer-logos img {
        max-width: 110px;
        height: 56px;
        padding: 0;
    }
}

/* Orientación landscape en móvil */
@media (max-width: 768px) and (orientation: landscape) {
    .container {
        max-width: 100%;
    }

    /* En landscape, los filtros se ven mejor en 3 columnas */
    .filters {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .filter-group:nth-child(3),
    .filter-group:nth-child(4),
    .btn {
        grid-column: auto; /* Vuelven a su tamaño normal */
    }

    /* El botón ocupa una columna */
    .btn {
        grid-column: auto;
    }
}
