/* ── admin.css ── Panel Administrativo Fundación Panorama de Colores */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&family=Playfair+Display:wght@700&display=swap');

/* ══════════════════════════════════════════════
   VARIABLES GLOBALES
══════════════════════════════════════════════ */
:root {
    --primary-purple: #4E1B95;
    --primary-purple-dark: #2D0A6E;
    --primary-green: #2D984F;
    --primary-green-dark: #1e7a38;
    --secondary-orange: #F59D1E;
    --danger: #e53e3e;
    --danger-dark: #c53030;
    --neutral-black: #1E1E1E;
    --neutral-gray: #6A6A6A;
    --neutral-light: #f0eaff;
    --light-bg: #f3eefe;
    --border-color: #e2d9f3;
    --sidebar-width: 240px;
    --transition: 0.25s ease;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --shadow-sm: 0 2px 8px rgba(78,27,149,0.08);
    --shadow-md: 0 4px 20px rgba(78,27,149,0.10);
    --shadow-lg: 0 10px 40px rgba(78,27,149,0.14);
}

/* ══════════════════════════════════════════════
   RESET & BASE
══════════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Nunito', sans-serif;
    background: var(--light-bg);
    color: var(--neutral-black);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* Evita scroll horizontal en body */
}

img { display: block; max-width: 100%; }
button { font-family: 'Nunito', sans-serif; }
a { color: inherit; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #f0eaff; }
::-webkit-scrollbar-thumb { background: #c9b8f0; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-purple); }

/* ══════════════════════════════════════════════
   LOGIN
══════════════════════════════════════════════ */
.login-screen {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-purple) 0%, #1a0850 50%, var(--primary-green) 100%);
    display: flex; align-items: center; justify-content: center;
    padding: 2rem 1rem; position: relative; overflow: hidden;
}
.login-screen::before,
.login-screen::after {
    content: ''; position: absolute; border-radius: 50%; pointer-events: none;
}
.login-screen::before {
    top: -120px; right: -120px; width: 450px; height: 450px;
    background: rgba(255,255,255,0.04);
}
.login-screen::after {
    bottom: -80px; left: -80px; width: 320px; height: 320px;
    background: rgba(255,255,255,0.03);
}
.login-card {
    background: white; border-radius: 24px; padding: 3rem 2.5rem;
    text-align: center; max-width: 420px; width: 100%;
    box-shadow: 0 30px 80px rgba(0,0,0,0.3);
    animation: popIn 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
    position: relative; z-index: 1;
}
@keyframes popIn {
    from { opacity: 0; transform: scale(0.85) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.login-logo img { height: 80px; width: 80px; object-fit: contain; margin: 0 auto 1rem; }
.login-card h1 {
    font-family: 'Playfair Display', serif; font-size: 1.75rem;
    color: var(--primary-purple); margin-bottom: 0.25rem;
}
.login-subtitle { font-size: 0.875rem; color: var(--neutral-gray); margin-bottom: 0.5rem; }
.login-desc {
    font-size: 0.8rem; color: var(--danger); font-weight: 700; margin-bottom: 2rem;
    background: #fff5f5; border: 1px solid #fed7d7;
    border-radius: var(--radius-sm); padding: 0.5rem 1rem;
}
.btn-google {
    display: flex; align-items: center; justify-content: center; gap: 0.75rem;
    width: 100%; padding: 0.9rem 1.5rem; background: white;
    border: 2px solid var(--border-color); border-radius: var(--radius-full);
    font-size: 0.95rem; font-weight: 700; color: var(--neutral-black);
    cursor: pointer; transition: all var(--transition); box-shadow: var(--shadow-sm);
}
.btn-google:hover {
    border-color: var(--primary-purple);
    box-shadow: 0 4px 16px rgba(78,27,149,0.15); transform: translateY(-2px);
}
.login-security {
    margin-top: 1.5rem; font-size: 0.75rem; color: var(--neutral-gray);
    display: flex; align-items: center; justify-content: center; gap: 0.4rem;
}
.login-security i { color: var(--primary-green); }

/* ══════════════════════════════════════════════
   ╔══════════════════════════════════════════╗
   ║  LAYOUT PRINCIPAL — FIX CRÍTICO         ║
   ║  El sidebar es position:fixed            ║
   ║  El main-content usa margin-left para    ║
   ║  dejar espacio al sidebar.               ║
   ║  display:block en body evita conflictos  ║
   ╚══════════════════════════════════════════╝
══════════════════════════════════════════════ */
.admin-panel {
    display: block;   /* ← NO grid, NO flex. El sidebar es fixed, el main fluye normal */
    min-height: 100vh;
}

/* ══════════════════════════════════════════════
   SIDEBAR (position: fixed — fuera del flujo)
══════════════════════════════════════════════ */
.sidebar {
    background: linear-gradient(180deg, var(--primary-purple) 0%, var(--primary-purple-dark) 100%);
    display: flex; flex-direction: column; padding: 1.5rem 0 1rem;
    position: fixed; top: 0; left: 0;
    width: var(--sidebar-width); height: 100vh;
    z-index: 200; box-shadow: 4px 0 24px rgba(0,0,0,0.18);
    overflow-y: auto; overflow-x: hidden;
    transition: transform var(--transition);
}
.sidebar-logo {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.12); margin-bottom: 1.25rem;
}
.sidebar-logo img {
    height: 42px; width: 42px; object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); flex-shrink: 0;
}
.sidebar-logo span { font-size: 0.85rem; font-weight: 800; color: white; line-height: 1.3; }
.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 0.25rem; padding: 0 0.75rem; }
.sidebar-link {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem;
    border-radius: var(--radius-sm); color: rgba(255,255,255,0.7);
    font-size: 0.9rem; font-weight: 600; text-decoration: none;
    transition: all var(--transition); white-space: nowrap;
}
.sidebar-link i { width: 18px; text-align: center; flex-shrink: 0; }
.sidebar-link:hover, .sidebar-link.active { background: rgba(255,255,255,0.15); color: white; }
.sidebar-link.active { box-shadow: inset 3px 0 0 rgba(255,255,255,0.4); }
.sidebar-user {
    display: flex; align-items: center; gap: 0.6rem; padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.12); margin-top: auto;
}
.sidebar-user img {
    width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
    border: 2px solid rgba(255,255,255,0.3); flex-shrink: 0;
}
.user-name {
    font-size: 0.8rem; font-weight: 700; color: white; margin: 0;
    max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-email {
    font-size: 0.68rem; color: rgba(255,255,255,0.6); margin: 0;
    max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#btnLogout {
    background: none; border: none; color: rgba(255,255,255,0.6); cursor: pointer;
    padding: 0.4rem; border-radius: 6px; font-size: 1rem;
    transition: all var(--transition); margin-left: auto; flex-shrink: 0;
}
#btnLogout:hover { color: white; background: rgba(255,255,255,0.15); }

/* Hamburguesa solo en móvil */
.sidebar-toggle {
    display: none; position: fixed; top: 1rem; left: 1rem; z-index: 300;
    background: var(--primary-purple); color: white; border: none;
    border-radius: var(--radius-sm); width: 44px; height: 44px;
    font-size: 1.1rem; cursor: pointer; box-shadow: var(--shadow-md);
    align-items: center; justify-content: center; transition: all var(--transition);
}
.sidebar-toggle:hover { background: var(--primary-purple-dark); }

.sidebar-backdrop {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); z-index: 199;
}
.sidebar-backdrop.active { display: block; }

/* ══════════════════════════════════════════════
   ╔══════════════════════════════════════════╗
   ║  MAIN CONTENT — FIX DEFINITIVO          ║
   ║  margin-left = sidebar-width             ║
   ║  El elemento ocupa el ancho restante     ║
   ║  sin ningún desborde                     ║
   ╚══════════════════════════════════════════╝
══════════════════════════════════════════════ */
.main-content {
    margin-left: var(--sidebar-width);  /* Empieza donde acaba el sidebar fijo */
    padding: 2rem 2rem;
    min-height: 100vh;
    /* Ancho real = 100% del viewport - el sidebar */
    /* box-sizing: border-box ya aplica por el reset global */
}

/* ══════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════ */
.admin-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.5rem; gap: 1rem; flex-wrap: wrap;
}
.admin-header h2 {
    font-family: 'Playfair Display', serif; font-size: 1.6rem;
    color: var(--primary-purple); margin-bottom: 0.1rem; line-height: 1.2;
}
.admin-header p { font-size: 0.84rem; color: var(--neutral-gray); margin: 0; }

.header-actions {
    display: flex; gap: 0.75rem; align-items: center;
    flex-wrap: nowrap; /* Desktop: en una línea */
}

.search-box {
    display: flex; align-items: center; gap: 0.5rem;
    background: white; border: 1.5px solid var(--border-color);
    border-radius: var(--radius-full); padding: 0.55rem 1rem;
    box-shadow: var(--shadow-sm); transition: all var(--transition);
}
.search-box:focus-within {
    border-color: var(--primary-purple); box-shadow: 0 0 0 3px rgba(78,27,149,0.1);
}
.search-box i { color: var(--neutral-gray); font-size: 0.85rem; flex-shrink: 0; }
.search-box input {
    border: none; outline: none; font-family: 'Nunito', sans-serif;
    font-size: 0.875rem; width: 220px; color: var(--neutral-black); background: transparent;
}

.filter-combo {
    padding: 0.58rem 2.2rem 0.58rem 1rem;
    border: 1.5px solid var(--border-color); border-radius: var(--radius-full);
    font-family: 'Nunito', sans-serif; font-size: 0.875rem; color: var(--neutral-black);
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%234E1B95' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 0.85rem center;
    cursor: pointer; outline: none; box-shadow: var(--shadow-sm);
    transition: all var(--transition); appearance: none; -webkit-appearance: none;
    white-space: nowrap; flex-shrink: 0;
}
.filter-combo:focus {
    border-color: var(--primary-purple); box-shadow: 0 0 0 3px rgba(78,27,149,0.1);
}

/* ══════════════════════════════════════════════
   STATS BAR
══════════════════════════════════════════════ */
.stats-bar { display: flex; gap: 0.75rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.stat-item {
    display: inline-flex; align-items: center; gap: 0.5rem; background: white;
    padding: 0.55rem 1.2rem; border-radius: var(--radius-full);
    font-size: 0.875rem; font-weight: 700; color: var(--primary-purple);
    box-shadow: var(--shadow-sm); white-space: nowrap;
}
.stat-item.alerta { color: var(--danger); }
.stat-item i { font-size: 0.875rem; }

/* ══════════════════════════════════════════════
   ╔══════════════════════════════════════════╗
   ║  TABLA — SCROLL HORIZONTAL CORRECTO     ║
   ╚══════════════════════════════════════════╝
══════════════════════════════════════════════ */
.table-wrapper {
    background: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: var(--shadow-md);
    /* Scroll interno horizontal — la tabla no expande el body */
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    /* Ancho acotado al contenedor padre */
    width: 100%;
    max-width: 100%;
}

.inscripciones-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 880px;      /* Todas las columnas visibles */
    table-layout: fixed;   /* Anchos controlados */
}

/* Anchos explícitos para cada columna */
.inscripciones-table thead tr th:nth-child(1) { width: 50px;  text-align: center; } /* # */
.inscripciones-table thead tr th:nth-child(2) { width: 62px;  } /* Foto */
.inscripciones-table thead tr th:nth-child(3) { width: 20%;   } /* Nombre */
.inscripciones-table thead tr th:nth-child(4) { width: 130px; } /* Documento */
.inscripciones-table thead tr th:nth-child(5) { width: 80px;  } /* Edad */
.inscripciones-table thead tr th:nth-child(6) { width: 18%;   } /* Acudiente */
.inscripciones-table thead tr th:nth-child(7) { width: 130px; } /* WhatsApp */
.inscripciones-table thead tr th:nth-child(8) { width: 85px;  } /* Alergia */
.inscripciones-table thead tr th:nth-child(9) { width: 130px; } /* Acciones */

.inscripciones-table thead {
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-purple-dark));
}
.inscripciones-table th {
    padding: 1rem 0.9rem; text-align: left; font-size: 0.7rem;
    font-weight: 800; color: rgba(255,255,255,0.92); letter-spacing: 0.07em;
    text-transform: uppercase; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}

.inscripciones-table td {
    padding: 0.82rem 0.9rem; font-size: 0.86rem;
    border-bottom: 1px solid #f3eeff; vertical-align: middle;
    color: var(--neutral-black);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Nombre y acudiente sí pueden hacer wrap */
.inscripciones-table td:nth-child(3),
.inscripciones-table td:nth-child(6) {
    white-space: normal; word-break: break-word; line-height: 1.35;
}

.inscripciones-table tbody tr { transition: background var(--transition); cursor: pointer; }
.inscripciones-table tbody tr:hover { background: #fdf8ff; }
.inscripciones-table tbody tr:last-child td { border-bottom: none; }

.td-num { color: var(--neutral-gray); font-weight: 700; font-size: 0.75rem; text-align: center; }
.td-doc { font-size: 0.82rem; }
.inscripciones-table td strong { font-weight: 800; display: block; line-height: 1.3; }

.link-whatsapp {
    color: var(--primary-green); font-weight: 700; text-decoration: none;
    display: inline-flex; align-items: center; gap: 0.3rem;
    transition: opacity var(--transition);
}
.link-whatsapp:hover { opacity: 0.75; text-decoration: underline; }

.foto-perfil {
    width: 40px; height: 40px; border-radius: 50%;
    object-fit: cover; border: 2px solid var(--border-color); display: block;
}
.foto-placeholder {
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-purple-dark));
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 800; font-size: 0.85rem; flex-shrink: 0;
}

.badge-alergia {
    display: inline-flex; align-items: center; gap: 0.28rem;
    background: #fff5f5; color: var(--danger); border: 1px solid #fed7d7;
    border-radius: var(--radius-full); padding: 0.22rem 0.6rem;
    font-size: 0.74rem; font-weight: 700; white-space: nowrap;
}
.badge-ok { color: var(--primary-green); font-size: 0.78rem; font-weight: 700; }

.loading-row {
    text-align: center; padding: 3rem !important;
    color: var(--neutral-gray); font-size: 0.9rem; cursor: default !important;
}
.empty-row {
    text-align: center; padding: 3.5rem 1rem !important;
    color: var(--neutral-gray); line-height: 2.2; cursor: default !important;
}

/* Botones acciones */
.acciones { display: flex; gap: 0.3rem; }
.btn-ver, .btn-editar-sm, .btn-eliminar-sm {
    border: none; border-radius: var(--radius-sm);
    padding: 0.38rem 0.6rem; font-size: 0.75rem; font-weight: 700; cursor: pointer;
    transition: all var(--transition);
    display: inline-flex; align-items: center; gap: 0.25rem; white-space: nowrap;
}
.btn-ver { background: rgba(78,27,149,0.1); color: var(--primary-purple); }
.btn-ver:hover { background: var(--primary-purple); color: white; }
.btn-editar-sm { background: rgba(245,157,30,0.12); color: var(--secondary-orange); }
.btn-editar-sm:hover { background: var(--secondary-orange); color: white; }
.btn-eliminar-sm { background: rgba(229,62,62,0.1); color: var(--danger); }
.btn-eliminar-sm:hover { background: var(--danger); color: white; }

/* ══════════════════════════════════════════════
   PAGINACIÓN
══════════════════════════════════════════════ */
.paginacion-wrap {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.9rem 1.25rem; background: white;
    border-top: 1px solid var(--neutral-light);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-md); flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2rem;
}
.paginacion-info { font-size: 0.8rem; color: var(--neutral-gray); font-weight: 600; }
.paginacion-botones { display: flex; gap: 0.3rem; align-items: center; flex-wrap: wrap; }
.btn-pag {
    width: 34px; height: 34px; border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-color); background: white; color: var(--primary-purple);
    font-size: 0.82rem; font-weight: 700; cursor: pointer; transition: all var(--transition);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.btn-pag:hover:not(:disabled) { background: var(--primary-purple); color: white; border-color: var(--primary-purple); }
.btn-pag.activo { background: var(--primary-purple); color: white; border-color: var(--primary-purple); box-shadow: 0 2px 8px rgba(78,27,149,0.25); }
.btn-pag:disabled { opacity: 0.3; cursor: not-allowed; }
.pag-dots { font-size: 0.85rem; color: var(--neutral-gray); padding: 0 0.15rem; }

/* ══════════════════════════════════════════════
   ESTADÍSTICAS
══════════════════════════════════════════════ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.25rem; }
.stat-card {
    background: white; border-radius: var(--radius-lg); padding: 2rem 1.5rem;
    text-align: center; box-shadow: var(--shadow-md);
    transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.stat-card i { font-size: 2.25rem; margin-bottom: 0.85rem; display: block; }
.stat-card.purple i { color: var(--primary-purple); }
.stat-card.red    i { color: var(--danger); }
.stat-card.green  i { color: var(--primary-green); }
.stat-card.orange i { color: var(--secondary-orange); }
.stat-number { font-size: 2.8rem; font-weight: 900; line-height: 1; margin-bottom: 0.4rem; }
.stat-card.purple .stat-number { color: var(--primary-purple); }
.stat-card.red    .stat-number { color: var(--danger); }
.stat-card.green  .stat-number { color: var(--primary-green); }
.stat-card.orange .stat-number { color: var(--secondary-orange); }
.stat-label { font-size: 0.85rem; color: var(--neutral-gray); font-weight: 600; }

/* ══════════════════════════════════════════════
   MODALES
══════════════════════════════════════════════ */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.65);
    z-index: 500; display: flex; align-items: center; justify-content: center;
    padding: 1.25rem; backdrop-filter: blur(3px); overflow-y: auto;
}
.modal-box {
    background: white; border-radius: var(--radius-xl);
    max-width: 620px; width: 100%; max-height: 92vh; overflow-y: auto;
    box-shadow: 0 30px 80px rgba(0,0,0,0.25); animation: slideUp 0.3s ease both;
    display: flex; flex-direction: column; margin: auto;
}
.modal-hv-box   { max-width: 700px; }
.modal-edit-box { max-width: 740px; }
.modal-confirm-box { max-width: 390px; text-align: center; padding: 2.5rem 2rem; align-items: center; }
@keyframes slideUp {
    from { opacity: 0; transform: translateY(28px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.25rem 1.75rem; border-bottom: 1px solid var(--neutral-light);
    position: sticky; top: 0; background: white; z-index: 2;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0; gap: 1rem;
}
.modal-header h3 {
    font-family: 'Playfair Display', serif; font-size: 1.2rem; color: var(--primary-purple);
    margin: 0; line-height: 1.3; min-width: 0; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.modal-close-btn {
    background: none; border: none; font-size: 1.1rem; color: var(--neutral-gray);
    cursor: pointer; padding: 0.4rem; border-radius: var(--radius-sm);
    transition: all var(--transition); line-height: 1; flex-shrink: 0;
}
.modal-close-btn:hover { background: var(--neutral-light); color: var(--primary-purple); }
.modal-body { padding: 1.5rem 1.75rem; flex: 1; }
.modal-footer {
    display: flex; gap: 0.6rem; padding: 1rem 1.75rem;
    border-top: 1px solid var(--neutral-light); justify-content: flex-end;
    flex-wrap: wrap; position: sticky; bottom: 0; background: white; z-index: 2;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* Hoja de vida */
.hv-cabecera {
    display: flex; align-items: center; gap: 1.5rem;
    background: linear-gradient(135deg, #4E1B95 0%, #2D0A6E 60%, #1a5c35 100%);
    border-radius: var(--radius-md); padding: 1.5rem;
    margin-bottom: 1.5rem; color: white;
}
.hv-foto-wrap { position: relative; flex-shrink: 0; }
.hv-foto {
    width: 96px; height: 96px; border-radius: var(--radius-sm);
    object-fit: cover; border: 3px solid rgba(255,255,255,0.4); display: block;
}
.hv-foto-placeholder {
    width: 96px; height: 96px; border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.15); border: 3px solid rgba(255,255,255,0.3);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 800; color: white;
}
.hv-badge-inscrito {
    position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%);
    background: var(--primary-green); color: white; font-size: 0.58rem; font-weight: 800;
    padding: 0.16rem 0.55rem; border-radius: var(--radius-full);
    white-space: nowrap; letter-spacing: 0.07em; text-transform: uppercase;
    border: 2px solid rgba(255,255,255,0.25);
}
.hv-info-principal { flex: 1; min-width: 0; }
.hv-nombre { font-family: 'Playfair Display', serif; font-size: 1.4rem; margin-bottom: 0.5rem; line-height: 1.25; word-break: break-word; }
.hv-meta { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.hv-chip {
    background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25);
    border-radius: var(--radius-full); padding: 0.2rem 0.7rem;
    font-size: 0.72rem; font-weight: 700; display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap;
}
.hv-chip-rojo  { background: rgba(229,62,62,0.3);  border-color: rgba(229,62,62,0.5); }
.hv-chip-verde { background: rgba(45,152,79,0.35); border-color: rgba(45,152,79,0.5); }
.hv-fecha-insc { font-size: 0.72rem; opacity: 0.75; display: inline-flex; align-items: center; gap: 0.35rem; }
.hv-seccion { margin-bottom: 1.4rem; }
.hv-seccion-titulo {
    font-size: 0.75rem; font-weight: 800; color: var(--primary-purple);
    text-transform: uppercase; letter-spacing: 0.08em;
    border-bottom: 2px solid var(--neutral-light); padding-bottom: 0.4rem;
    margin-bottom: 0.85rem; display: flex; align-items: center; gap: 0.4rem;
}
.hv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; }
.hv-item { background: #fdfbff; border: 1px solid var(--neutral-light); border-radius: var(--radius-sm); padding: 0.65rem 0.9rem; }
.hv-item-full { grid-column: 1 / -1; }
.hv-label { font-size: 0.65rem; font-weight: 800; color: var(--neutral-gray); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.2rem; }
.hv-valor { font-size: 0.9rem; font-weight: 600; color: var(--neutral-black); line-height: 1.4; word-break: break-word; }
.hv-alerta-box { background: #fff5f5; border: 1.5px solid #fed7d7; border-radius: var(--radius-sm); padding: 0.6rem 0.85rem; color: var(--danger-dark); font-weight: 700; font-size: 0.875rem; margin-top: 0.2rem; line-height: 1.5; }
.hv-tallas { display: grid !important; grid-template-columns: 1fr 1fr 1fr !important; gap: 0.65rem; }
.hv-talla-card { background: #fdfbff; border: 1px solid var(--neutral-light); border-radius: var(--radius-md); padding: 1rem 0.5rem 0.85rem; text-align: center; transition: all var(--transition); }
.hv-talla-card:hover { border-color: #c9b8f0; box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.hv-talla-icono { font-size: 1.4rem; margin-bottom: 0.25rem; line-height: 1; }
.hv-talla-valor { font-size: 1.6rem; font-weight: 800; color: var(--primary-purple); line-height: 1; margin-bottom: 0.2rem; }
.hv-talla-etiq { font-size: 0.63rem; font-weight: 800; color: var(--neutral-gray); text-transform: uppercase; letter-spacing: 0.07em; }

.doc-preview-wrap { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.doc-preview-thumb { width: 165px; height: 110px; object-fit: cover; border-radius: var(--radius-sm); border: 2px solid var(--border-color); cursor: zoom-in; transition: all var(--transition); display: block; flex-shrink: 0; }
.doc-preview-thumb:hover { transform: scale(1.03); box-shadow: var(--shadow-md); border-color: var(--primary-purple); }
.doc-preview-acciones { display: flex; flex-direction: column; gap: 0.5rem; justify-content: center; }
.btn-doc-ver { background: rgba(78,27,149,0.08); color: var(--primary-purple); border: 1.5px solid var(--border-color); border-radius: var(--radius-sm); padding: 0.55rem 1rem; font-size: 0.82rem; font-weight: 700; cursor: pointer; transition: all var(--transition); display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; text-decoration: none; }
.btn-doc-ver:hover { background: var(--primary-purple); color: white; border-color: var(--primary-purple); }
.btn-doc-descargar { background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark)); color: white; border: none; border-radius: var(--radius-sm); padding: 0.55rem 1rem; font-size: 0.82rem; font-weight: 700; cursor: pointer; text-decoration: none; transition: all var(--transition); display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.btn-doc-descargar:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(45,152,79,0.3); }
.doc-sin-foto { color: var(--neutral-gray); font-size: 0.85rem; display: inline-flex; align-items: center; gap: 0.55rem; background: #f9f7ff; border-radius: var(--radius-sm); padding: 0.85rem 1.1rem; border: 1.5px dashed #d5c8f0; }

/* Botones modales */
.btn-pdf { background: linear-gradient(135deg, var(--danger-dark), var(--danger)); color: white; border: none; border-radius: var(--radius-full); padding: 0.6rem 1.25rem; font-size: 0.875rem; font-weight: 700; cursor: pointer; transition: all var(--transition); display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.btn-pdf:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(229,62,62,0.35); }
.btn-editar { background: rgba(245,157,30,0.1); color: var(--secondary-orange); border: 1.5px solid var(--secondary-orange); border-radius: var(--radius-full); padding: 0.6rem 1.25rem; font-size: 0.875rem; font-weight: 700; cursor: pointer; transition: all var(--transition); display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.btn-editar:hover { background: var(--secondary-orange); color: white; }
.btn-eliminar { background: rgba(229,62,62,0.08); color: var(--danger); border: 1.5px solid var(--danger); border-radius: var(--radius-full); padding: 0.6rem 1.25rem; font-size: 0.875rem; font-weight: 700; cursor: pointer; transition: all var(--transition); display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.btn-eliminar:hover { background: var(--danger); color: white; }
.btn-cancelar { background: var(--neutral-light); color: var(--primary-purple); border: none; border-radius: var(--radius-full); padding: 0.6rem 1.25rem; font-size: 0.875rem; font-weight: 700; cursor: pointer; transition: all var(--transition); white-space: nowrap; }
.btn-cancelar:hover { background: var(--border-color); }
.btn-guardar { background: linear-gradient(135deg, var(--primary-purple), var(--primary-purple-dark)); color: white; border: none; border-radius: var(--radius-full); padding: 0.6rem 1.5rem; font-size: 0.875rem; font-weight: 700; cursor: pointer; transition: all var(--transition); display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.btn-guardar:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(78,27,149,0.32); }

/* Form editar */
.edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; margin-bottom: 1.25rem; }
.edit-field { display: flex; flex-direction: column; gap: 0.3rem; }
.edit-field-full { grid-column: 1 / -1; }
.edit-field label { font-size: 0.76rem; font-weight: 700; color: var(--neutral-black); letter-spacing: 0.02em; }
.edit-field input, .edit-field select, .edit-field textarea { padding: 0.62rem 0.9rem; border: 1.5px solid var(--border-color); border-radius: var(--radius-sm); font-family: 'Nunito', sans-serif; font-size: 0.875rem; color: var(--neutral-black); background: #fdfbff; outline: none; transition: all var(--transition); appearance: none; -webkit-appearance: none; width: 100%; }
.edit-field input:focus, .edit-field select:focus, .edit-field textarea:focus { border-color: var(--primary-purple); box-shadow: 0 0 0 3px rgba(78,27,149,0.1); background: white; }
.edit-field textarea { resize: vertical; min-height: 64px; }
.edit-field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%234E1B95' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.85rem center; padding-right: 2.2rem; }
.edit-actions { display: flex; gap: 0.75rem; justify-content: flex-end; flex-wrap: wrap; }

/* Confirmar eliminar */
.confirm-icon { width: 68px; height: 68px; background: #fff5f5; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.75rem; color: var(--danger); margin: 0 auto 1.25rem; }
.modal-confirm-box h3 { font-family: 'Playfair Display', serif; font-size: 1.25rem; color: var(--neutral-black); margin-bottom: 0.7rem; }
.modal-confirm-box p { font-size: 0.875rem; color: var(--neutral-gray); margin-bottom: 1.75rem; line-height: 1.65; }
.confirm-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.btn-eliminar-confirm { background: var(--danger); color: white; border: none; border-radius: var(--radius-full); padding: 0.7rem 1.5rem; font-size: 0.875rem; font-weight: 700; cursor: pointer; transition: all var(--transition); display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.btn-eliminar-confirm:hover { background: var(--danger-dark); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(229,62,62,0.35); }

/* Animaciones */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
.fa-spin { animation: spin 1s linear infinite; }

/* ══════════════════════════════════════════════
   RESPONSIVE — ≤ 1280px
══════════════════════════════════════════════ */
@media (max-width: 1280px) {
    .main-content { padding: 1.75rem 1.5rem; }
    .search-box input { width: 180px; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — ≤ 1024px (laptop pequeño)
══════════════════════════════════════════════ */
@media (max-width: 1024px) {
    :root { --sidebar-width: 200px; }
    .search-box input { width: 150px; }
    .main-content { padding: 1.5rem 1.25rem; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — ≤ 768px (tablet/móvil)
══════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* Sidebar oculto */
    .sidebar { transform: translateX(-100%); width: 260px; }
    .sidebar.open { transform: translateX(0); }
    .sidebar-toggle { display: flex; }

    /* Contenido ocupa todo el ancho */
    .main-content { margin-left: 0; padding: 1rem; padding-top: 4.5rem; }

    /* Header apilado */
    .admin-header { flex-direction: column; align-items: flex-start; }
    .header-actions { width: 100%; flex-wrap: wrap; }
    .search-box { flex: 1; min-width: 0; }
    .search-box input { width: 100%; }
    .filter-combo { width: 100%; }

    /* Tabla scroll - min-width reduce para caber mejor */
    .inscripciones-table { min-width: 620px; }
    /* Ocultar Edad */
    .inscripciones-table th:nth-child(5),
    .inscripciones-table td:nth-child(5) { display: none; }

    /* Paginación centrada */
    .paginacion-wrap { justify-content: center; }
    .paginacion-info { text-align: center; width: 100%; }

    /* Modales desde abajo */
    .modal-overlay { padding: 0; align-items: flex-end; }
    .modal-box { max-height: 93vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; margin: 0; width: 100%; }
    .modal-hv-box, .modal-edit-box { max-width: 100%; }
    .modal-footer { justify-content: center; }

    /* HV */
    .hv-cabecera { flex-direction: column; text-align: center; gap: 1rem; padding: 1.25rem 1rem; }
    .hv-meta { justify-content: center; }
    .hv-fecha-insc { justify-content: center; }
    .hv-grid { grid-template-columns: 1fr; }
    .hv-item-full { grid-column: 1; }

    /* Edit */
    .edit-grid { grid-template-columns: 1fr; }
    .edit-field-full { grid-column: 1; }

    /* Doc */
    .doc-preview-wrap { flex-direction: column; }
    .doc-preview-thumb { width: 100%; height: 160px; }
    .doc-preview-acciones { flex-direction: row; flex-wrap: wrap; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — ≤ 480px
══════════════════════════════════════════════ */
@media (max-width: 480px) {
    .main-content { padding: 1rem; padding-top: 4.5rem; }
    .admin-header h2 { font-size: 1.3rem; }
    .inscripciones-table { min-width: 480px; }
    /* Ocultar Acudiente */
    .inscripciones-table th:nth-child(6),
    .inscripciones-table td:nth-child(6) { display: none; }
    .hv-tallas { grid-template-columns: 1fr 1fr !important; }
    .hv-talla-card:last-child { grid-column: 1 / -1; }
    .hv-nombre { font-size: 1.1rem; }
    .modal-body { padding: 1.25rem 1rem; }
    .modal-header { padding: 1rem; }
    .modal-footer { padding: 0.85rem 1rem; gap: 0.5rem; }
    .btn-pdf, .btn-editar, .btn-eliminar, .btn-cancelar, .btn-guardar { font-size: 0.8rem; padding: 0.55rem 0.9rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-number { font-size: 2.2rem; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — ≤ 360px
══════════════════════════════════════════════ */
@media (max-width: 360px) {
    .stats-grid { grid-template-columns: 1fr; }
    .hv-tallas { grid-template-columns: 1fr 1fr !important; }
    .btn-pag { width: 30px; height: 30px; font-size: 0.76rem; }
}