@import url('../fonts/outfit.css');
:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --bg: #f8fafc;
    --card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
}
body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}
.container {
    width: 96%;
    max-width: 1600px;
    margin: 2rem auto;
    background: var(--card);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
}
h1 { 
    color: var(--text-main); 
    font-weight: 800; 
    font-size: 2rem; 
    margin-bottom: 2.5rem; 
    letter-spacing: -0.02em;
}
h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; color: var(--text-main); }
.search-box {
    background: #f1f5f9;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 2rem;
}
.form-group label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.9rem; color: var(--text-muted); }
input { 
    width: 100%; 
    padding: 12px 16px; 
    border: 2px solid var(--border); 
    border-radius: 12px; 
    font-size: 1rem;
    transition: all 0.2s;
}
input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1); }
.tabs-container {
    display: flex;
    gap: 8px;
    background: #f1f5f9;
    padding: 6px;
    border-radius: 14px;
    margin-bottom: 2rem;
    overflow-x: auto;
}
.tab-btn-evento {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.tab-btn-evento.active {
    background: var(--card);
    color: var(--primary);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
.tab-btn-evento:hover:not(.active) {
    background: rgba(0,0,0,0.05);
}
.btn-archive-ev {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: 'Outfit', sans-serif;
}
.btn-archive-ev:hover {
    background: #fecaca;
    color: #dc2626;
}
.table-container { 
    background: white; 
    border-radius: 16px; 
    border: 1px solid var(--border);
    overflow: hidden; 
}
table { width: 100%; border-collapse: collapse; text-align: left; }
th { background: #f8fafc; padding: 14px 20px; font-weight: 700; font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; border-bottom: 1px solid var(--border); }
td { padding: 14px 20px; font-size: 0.95rem; border-bottom: 1px solid var(--border); }
.badge { padding: 4px 10px; border-radius: 6px; font-weight: 700; font-size: 0.75rem; }
.badge-pagado { background: #dcfce7; color: #166534; }
.badge-no-pagado { background: #fee2e2; color: #991b1b; }
.btn-pay-small {
    background: var(--success);
    color: white;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-pay-small:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }
button.primary { background: var(--primary); margin-top: 15px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
a { text-decoration: none; color: var(--text-muted); font-weight: 600; font-size: 0.9rem; }
a:hover { color: var(--primary); }
.main-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 8px;
}
.main-tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    margin-bottom: -10px;
}
.main-tab-btn:hover { color: var(--primary); background: #f1f5f9; }
.main-tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); background: #eef2ff; }
.section-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.event-select {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-main);
    background: white;
    cursor: pointer;
}
.event-select:focus { outline: none; border-color: var(--primary); }
.btn-load {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}
.btn-load:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-export {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-export.excel { background: #16a34a; color: white; }
.btn-export.pdf { background: #dc2626; color: white; }
.btn-export:hover { opacity: 0.9; transform: translateY(-1px); }
.stat-card {
    flex: 1;
    min-width: 120px;
    padding: 18px;
    border-radius: 16px;
    text-align: center;
}
.stat-card span { display: block; font-size: 2rem; font-weight: 800; }
.stat-card label { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; color: var(--text-muted); }
.stat-total { background: #f1f5f9; }
.stat-asistio { background: #dcfce7; }
.stat-asistio span { color: #166534; }
.stat-noasistio { background: #fee2e2; }
.stat-noasistio span { color: #991b1b; }
.modal-qr {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}
.modal-qr-content {
    background-color: white;
    padding: 30px;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    position: relative;
}
.close-qr {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #94a3b8;
}
.close-qr:hover { color: var(--danger); }
.btn-print {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    margin-top: 15px;
    cursor: pointer;
    font-weight: 700;
    width: 100%;
}
.btn-print:hover { opacity: 0.9; }
@media print {
    body * { visibility: hidden; }
    .modal-qr, .modal-qr * { visibility: visible; }
    .modal-qr { position: absolute; left: 0; top: 0; background: none; }
    .close-qr, .btn-print { display: none; }
}