@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800&family=Barlow:wght@400;500;600&display=swap');

:root {
    --azul:       #0E4b9c;
    --azul-dark:  #0a3a7a;
    --azul-light: #e8effc;
    --verde:      #28a745;
    --rojo:       #dc3545;
    --gris:       #6c757d;
    --texto:      #1a1a2e;
    --borde:      #d0ddf5;
    --fondo:      #f4f7ff;
}

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

body {
    font-family: Arial, sans-serif;
    background: var(--fondo);
    color: var(--texto);
    min-height: 100vh;
}

/* ── NAVBAR ── */
.navbar {
    width: 100%;
    background: var(--azul);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 18px 8px 14px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(14,75,156,0.4);
}
.nav-left img { height: 42px; }
.nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
}
.nav-label {
    font-family: sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
    border-bottom: 1px solid rgba(255,255,255,0.35);
    padding-bottom: 2px;
}
.nav-right .material-symbols-outlined { font-size: 20px; }
.cerrar {
    font-size: 20px;
    cursor: pointer;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, transform 0.4s;
    -webkit-tap-highlight-color: transparent;
}
.cerrar:hover, .cerrar:active {
    background: rgba(255,255,255,0.15);
    transform: rotate(180deg);
}

/* ── TÍTULO ── */
h1 {
    font-family: Arial, sans-serif;
    font-weight: 700;
    text-align: center;
    color: var(--azul);
    font-size: clamp(20px, 6vw, 34px);
    letter-spacing: 0.02em;
    padding: 18px 15px 4px;
}
.subtitulo {
    text-align: center;
    color: var(--gris);
    font-size: 17px;
    margin-bottom: 16px;
    letter-spacing: 0.03em;
    font-family: Arial, sans-serif;
}

/* ── CONTENEDOR ── */
.contenedor {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px 50px;
}

/* ── FILTRO ── */
.marco {
    border: 1.5px solid var(--azul);
    border-radius: 14px;
    padding: 12px 14px 10px;
    background: white;
    max-width: 340px;
    margin: 0 auto 4px;
    box-shadow: 0 2px 10px rgba(14,75,156,0.08);
}
legend {
    padding: 0 8px;
    color: var(--azul);
    font-family: Arial, sans-serif;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.grid-1 { display: grid; grid-template-columns: 1fr; gap: 10px; }
label {
    display: block;
    margin-bottom: 4px;
    color: var(--texto);
    font-weight: 600;
    font-size: 12px;
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: Arial, sans-serif;
}
select {
    width: 100%;
    padding: 10px 34px 10px 12px;
    border-radius: 8px;
    border: 1.5px solid var(--borde);
    font-size: 15px;
    font-family: Arial, sans-serif;
    background: var(--fondo);
    color: var(--texto);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%230E4b9c' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
    transition: border-color 0.2s;
}
select:focus { outline: none; border-color: var(--azul); }

/* ── BOTONES ── */
.boton-centro {
    text-align: center;
    margin-top: 14px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.btn-registrar, .btn-limpiar {
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-family: Arial, sans-serif;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    transition: transform 0.12s, box-shadow 0.12s;
    -webkit-tap-highlight-color: transparent;
    min-width: 130px;
    justify-content: center;
    touch-action: manipulation;
}
.btn-registrar {
    background: var(--verde);
    color: white;
    box-shadow: 0 3px 10px rgba(40,167,69,0.3);
}
.btn-registrar:active { transform: scale(0.96); box-shadow: none; }
.btn-limpiar {
    background: white;
    color: var(--gris);
    border: 1.5px solid var(--borde);
}
.btn-limpiar:active { transform: scale(0.96); }

/* ── CONTADOR ── */
.contador {
    text-align: right;
    font-size: 12px;
    color: var(--gris);
    margin: 12px 2px 2px;
    font-style: italic;
    font-family: Arial, sans-serif;
}

/* ── BADGES ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 20px;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}
.badge-no        { background: #f8d7da; color: #721c24; }
/* ──  badge verde para Suplente ── */
.badge-suplente  {
	  background: transparent;
    border: 1px solid #d8dde6;
    color: #9aa3b0;
	 text-transform: lowercase;
	}
	
/* background: #d0e4f7; color: #0a3a7a; }

/* Pagado = Sí: texto simple, sin badge */
.pagado-si {
    color: var(--verde);
    font-weight: 700;
    font-size: 13px;
    font-family: Arial, sans-serif;
	
}

/* ══════════════════════════════════════
   MÓVIL: tarjetas apiladas por sede
   ══════════════════════════════════════ */
.cards-wrapper {
    display: flex;
    flex-direction: column;
    border: 1.5px solid var(--borde);
    border-radius: 10px;
    overflow: hidden;
    background: white;
    box-shadow: 0 3px 10px rgba(14,75,156,0.07);
    margin-top: 10px;
}

.sede-badge-mobile {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--azul-dark);
    border-bottom: 1px solid var(--borde);
    font-family: Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: white;
}

.card-inscrito-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--borde);
    transition: background 0.12s;
    -webkit-tap-highlight-color: transparent;
}
.card-inscrito-item:last-child { border-bottom: none; }
.card-inscrito-item:active { background: #dce9fc; }

.card-num {
    font-family: Arial, sans-serif;
    font-weight: 800;
    font-size: 18px;
    color: var(--azul);
    min-width: 22px;
    text-align: center;
    opacity: 0.45;
}

.card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.card-nombre {
    font-weight: 600;
    font-size: 14px;
    color: var(--texto);
    font-family: Arial, sans-serif;
}
.card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.card-obs {
    font-size: 12px;
    color: var(--gris);
    font-style: italic;
    font-family: Arial, sans-serif;
}

/* ══════════════════════════════════════
   ESCRITORIO: dos tablas paralelas
   ══════════════════════════════════════ */
.tablas-sedes { display: none; }

@media (min-width: 540px) {
    .cards-wrapper { display: none !important; }
    .tablas-sedes {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* cambiar a dos si solo se ponen dos sedes */
        gap: 14px;
        border: 1.5px solid var(--borde);
        border-radius: 10px;
        background: var(--fondo);
        padding: 14px;
        box-shadow: 0 3px 10px rgba(14,75,156,0.07);
        margin-top: 10px;
    }

    .tablas-sedes:has(.tabla-sede-wrap:only-child) {
        grid-template-columns: 1fr;
        max-width: 560px;
    }

    .tabla-sede-wrap {
        background: white;
        border-radius: 8px;
        overflow: hidden;
        border: 1.5px solid var(--borde);
    }

    .sede-subheader {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 8px 12px;
        background: var(--azul-dark);
        color: white;
        font-family: Arial, sans-serif;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.07em;
        text-transform: uppercase;
    }

    .tabla-inscritos {
        width: 100%;
        border-collapse: collapse;
        font-family: Arial, sans-serif;
    }

    .tabla-inscritos thead tr { background: #dce9fc; }
    .tabla-inscritos thead th {
        padding: 7px 10px;
        font-family: Arial, sans-serif;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        text-align: left;
        color: var(--azul);
    }

    .fila-inscrito td {
        padding: 8px 10px;
        border-bottom: 1px solid var(--borde);
        vertical-align: middle;
        font-size: 13px;
        font-family: Arial, sans-serif;
    }
    .fila-par  td { background: white; }
    .fila-impar td { background: #f8faff; }
    .fila-inscrito:hover td { background: #dce9fc; transition: background 0.15s; }
    .fila-inscrito:last-child td { border-bottom: none; }

    .celda-num {
        font-family: Arial, sans-serif;
        font-weight: 800;
        font-size: 15px;
        color: var(--azul);
        opacity: 0.4;
        width: 28px;
        text-align: center;
    }
    .celda-nombre { font-weight: 600; color: var(--texto); }
    .celda-pagado { white-space: nowrap; }
    .celda-obs {
        font-size: 12px;
        color: var(--gris);
        font-style: italic;
    }
}

/* ── MENSAJES ── */
.aviso-error, .aviso-vacio {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: Arial, sans-serif;
}
.aviso-error { background: #ffe5e5; color: #c0392b; border: 1px solid #f5c6cb; }
.aviso-vacio { background: #fff3cd; color: #856404; border: 1px solid #ffc107; }

/* ── NAVBAR en móvil pequeño ── */
@media (max-width: 480px) {
    .nav-label { display: none; }
    h1 { font-size: 19px; padding: 14px 12px 4px; }
}
