/* ============================================
   GRUPO SUR - Sistema de Afiliación v2
   Diseño moderno, responsive, mobile-first
   ============================================ */

/* --- Variables CSS --- */
:root {
    --primary: #1a237e;
    --primary-light: #283593;
    --primary-dark: #0d1257;
    --secondary: #0d47a1;
    --accent: #00bcd4;
    --accent-light: #4dd0e1;
    --success: #2e7d32;
    --success-light: #e8f5e9;
    --warning: #f57f17;
    --warning-light: #fff8e1;
    --danger: #c62828;
    --danger-light: #ffebee;
    --info: #0277bd;
    --info-light: #e1f5fe;

    --bg: #f0f2f5;
    --bg-card: #ffffff;
    --text: #1a1a2e;
    --text-secondary: #5f6368;
    --text-muted: #9aa0a6;
    --border: #e0e3e8;
    --border-focus: var(--accent);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow: 0 2px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --sidebar-width: 260px;
    --header-height: 64px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
}

a { color: var(--secondary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* --- Utilidades --- */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-1 { flex: 1; }

/* ============================================
   FORMULARIO PÚBLICO DE REGISTRO
   ============================================ */

/* --- Header público --- */
.public-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.public-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}
.public-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 4px;
}
.public-header p {
    font-size: 0.95rem;
    opacity: 0.85;
    font-weight: 300;
}

/* --- Container formulario --- */
.form-container {
    max-width: 780px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

/* --- Barra de progreso --- */
.progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
    gap: 0;
    margin-bottom: 8px;
}
.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}
.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all var(--transition);
    border: 3px solid transparent;
}
.step-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 6px;
    text-align: center;
    max-width: 80px;
    transition: color var(--transition);
    font-weight: 500;
}
.progress-step.active .step-circle {
    background: var(--accent);
    color: white;
    border-color: rgba(0,188,212,0.3);
    box-shadow: 0 0 0 4px rgba(0,188,212,0.15);
}
.progress-step.active .step-label { color: var(--accent); font-weight: 600; }
.progress-step.completed .step-circle {
    background: var(--success);
    color: white;
}
.progress-step.completed .step-label { color: var(--success); }
.progress-line {
    flex: 1;
    height: 3px;
    background: var(--border);
    margin: 0 -4px;
    margin-bottom: 20px;
    transition: background var(--transition);
    max-width: 80px;
}
.progress-line.completed { background: var(--success); }

/* --- Card de formulario --- */
.form-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 32px 28px;
    animation: fadeUp 0.4s ease;
}
.form-card h2 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.form-card h2 i { color: var(--accent); font-size: 1.1rem; }
.form-card .subtitle {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

/* --- Campos del formulario --- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-grid .full-width { grid-column: 1 / -1; }

.form-group {
    display: flex;
    flex-direction: column;
}
.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-group label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.9rem;
    color: var(--text);
    background: #fafbfc;
    transition: all var(--transition);
    outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    background: white;
    box-shadow: 0 0 0 3px rgba(0,188,212,0.12);
}
.form-group input.error,
.form-group select.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(198,40,40,0.1);
}
.form-group input.valid {
    border-color: var(--success);
}

.field-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.field-error {
    font-size: 0.75rem;
    color: var(--danger);
    margin-top: 4px;
    display: none;
}
.field-error.show { display: block; }
.field-info {
    font-size: 0.75rem;
    color: var(--warning);
    margin-top: 4px;
    display: none;
}
.field-info.show { display: block; }

/* --- Radio buttons custom --- */
.radio-group {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}
.radio-option {
    flex: 1;
    position: relative;
}
.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.radio-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all var(--transition);
    text-transform: none;
    letter-spacing: 0;
}
.radio-option input[type="radio"]:checked + label {
    border-color: var(--accent);
    background: rgba(0,188,212,0.08);
    color: var(--primary);
}

/* --- File upload custom --- */
.file-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: #fafbfc;
    position: relative;
    overflow: hidden;
}
.file-upload-area:hover {
    border-color: var(--accent);
    background: rgba(0,188,212,0.03);
}
.file-upload-area.has-file {
    border-color: var(--success);
    background: var(--success-light);
}
.file-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.file-upload-icon {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.file-upload-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.file-upload-text strong { color: var(--accent); }
.file-upload-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.file-preview {
    margin-top: 12px;
    display: none;
}
.file-preview img {
    max-height: 120px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}
.file-preview .file-name {
    font-size: 0.8rem;
    color: var(--success);
    font-weight: 600;
    margin-top: 6px;
}

/* --- Botones --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(26,35,126,0.3);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(26,35,126,0.4); }

.btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0,188,212,0.3);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-success { background: var(--success); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-xs { padding: 4px 10px; font-size: 0.75rem; border-radius: 6px; }
.btn-block { width: 100%; }
.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: 8px; }

/* --- Navegación del formulario --- */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* --- Página de formulario (multi-step) --- */
.form-page { display: none; }
.form-page.active { display: block; animation: fadeUp 0.35s ease; }

/* --- Mensaje de éxito --- */
.success-container {
    display: none;
    text-align: center;
    padding: 60px 20px;
    animation: fadeUp 0.5s ease;
}
.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--success-light);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 20px;
    animation: scaleIn 0.5s ease 0.2s both;
}
.success-container h2 {
    color: var(--success);
    font-size: 1.5rem;
    margin-bottom: 8px;
}
.success-container p {
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto;
}

/* ============================================
   PÁGINA DE CONSULTA DE ESTADO
   ============================================ */
.status-container {
    max-width: 500px;
    margin: 40px auto;
    padding: 0 16px;
}
.status-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 40px 32px;
    text-align: center;
}
.status-card h2 {
    color: var(--primary);
    margin-bottom: 6px;
}
.status-card .status-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 28px;
}
.status-search {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}
.status-search input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 1rem;
    outline: none;
    transition: border-color var(--transition);
}
.status-search input:focus { border-color: var(--accent); }

.status-result {
    display: none;
    padding: 24px;
    border-radius: var(--radius);
    text-align: left;
    animation: fadeUp 0.3s ease;
}
.status-result.show { display: block; }
.status-result .result-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}
.status-result .result-dni {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* --- Badges de estado --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-pending {
    background: var(--warning-light);
    color: var(--warning);
    border: 1px solid rgba(245,127,23,0.2);
}
.badge-approved {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid rgba(46,125,50,0.2);
}
.badge-rejected {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid rgba(198,40,40,0.2);
}
.badge-sm { padding: 3px 10px; font-size: 0.7rem; }

/* ============================================
   PANEL DE ADMINISTRACIÓN
   ============================================ */

/* --- Layout admin --- */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transition: transform var(--transition);
}
.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}
.sidebar-header h1 {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 2px;
}
.sidebar-header small {
    font-size: 0.7rem;
    opacity: 0.6;
    display: block;
    margin-top: 2px;
}
.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}
.nav-section {
    margin-bottom: 24px;
}
.nav-section-title {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.4);
    padding: 0 12px;
    margin-bottom: 8px;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.7);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    margin-bottom: 2px;
}
.nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
}
.nav-item.active {
    background: rgba(0,188,212,0.2);
    color: var(--accent-light);
}
.nav-item i { width: 20px; text-align: center; font-size: 1rem; }

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.8rem;
}
.sidebar-footer .admin-name {
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar-footer .admin-name i { color: var(--accent); }

/* --- Overlay mobile --- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

/* --- Contenido principal admin --- */
.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Top bar admin --- */
.admin-topbar {
    height: var(--header-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}
.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text);
    cursor: pointer;
    padding: 4px;
}
.topbar-title h2 {
    font-size: 1.1rem;
    color: var(--text);
}
.topbar-title p {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* --- Contenido del dashboard --- */
.admin-content {
    flex: 1;
    padding: 24px;
}

/* --- Stats cards --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform var(--transition), box-shadow var(--transition);
    border-left: 4px solid transparent;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.stat-card.total { border-left-color: var(--secondary); }
.stat-card.pending { border-left-color: var(--warning); }
.stat-card.approved { border-left-color: var(--success); }
.stat-card.rejected { border-left-color: var(--danger); }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}
.stat-card.total .stat-icon { background: var(--info-light); color: var(--secondary); }
.stat-card.pending .stat-icon { background: var(--warning-light); color: var(--warning); }
.stat-card.approved .stat-icon { background: var(--success-light); color: var(--success); }
.stat-card.rejected .stat-icon { background: var(--danger-light); color: var(--danger); }

.stat-info h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}
.stat-info p {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* --- Filtros y búsqueda --- */
.filters-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}
.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.filter-group input,
.filter-group select {
    padding: 8px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.85rem;
    outline: none;
    transition: border-color var(--transition);
    min-width: 160px;
}
.filter-group input:focus,
.filter-group select:focus { border-color: var(--accent); }

/* --- Tabla --- */
.table-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.table-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.table-header h3 {
    font-size: 1rem;
    color: var(--text);
}
.table-wrapper {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
}
thead th {
    background: #f8f9fa;
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    border-bottom: 2px solid var(--border);
}
tbody td {
    padding: 12px 16px;
    font-size: 0.85rem;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
}
tbody tr:hover { background: #f8f9fc; }
tbody tr:last-child td { border-bottom: none; }

.table-actions {
    display: flex;
    gap: 6px;
}

/* --- Paginación --- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px;
    border-top: 1px solid var(--border);
}
.pagination button {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}
.pagination button:hover { border-color: var(--accent); color: var(--accent); }
.pagination button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* --- Modales --- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.show { display: flex; }

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: fadeUp 0.3s ease;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 1;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-header h3 {
    font-size: 1.1rem;
    color: var(--text);
}
.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg);
    border-radius: 50%;
    font-size: 1.1rem;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.modal-close:hover { background: var(--danger-light); color: var(--danger); }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* --- Status modal --- */
.status-options {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}
.status-option {
    flex: 1;
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
}
.status-option:hover { border-color: var(--accent); }
.status-option.selected-approved {
    border-color: var(--success);
    background: var(--success-light);
}
.status-option.selected-rejected {
    border-color: var(--danger);
    background: var(--danger-light);
}
.status-option i { font-size: 1.5rem; margin-bottom: 8px; display: block; }
.status-option span { font-weight: 700; font-size: 0.85rem; }

/* ============================================
   LOGIN
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--secondary) 100%);
    padding: 20px;
}
.login-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
    animation: fadeUp 0.5s ease;
}
.login-card h1 {
    text-align: center;
    color: var(--primary);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 4px;
}
.login-card .login-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 32px;
}
.login-card .form-group { margin-bottom: 18px; }
.login-error {
    background: var(--danger-light);
    color: var(--danger);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 16px;
    display: none;
    text-align: center;
}
.login-error.show { display: block; }

/* ============================================
   ALERTAS Y TOASTS
   ============================================ */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.35s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}
.toast-success { background: var(--success); color: white; }
.toast-error { background: var(--danger); color: white; }
.toast-warning { background: var(--warning); color: white; }
.toast-info { background: var(--info); color: white; }

/* --- Loading --- */
.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.8);
    z-index: 9998;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}
.loading-overlay.show { display: flex; }
.spinner {
    width: 44px;
    height: 44px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* --- Empty state --- */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}
.empty-state i {
    font-size: 3rem;
    margin-bottom: 12px;
    display: block;
}
.empty-state p { font-size: 0.95rem; }

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes fadeOut {
    to { opacity: 0; transform: translateY(-10px); }
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 280px;
    }

    /* Sidebar colapsable */
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.show { display: block; }

    .admin-main { margin-left: 0; }
    .hamburger { display: block; }

    /* Formulario */
    .form-grid { grid-template-columns: 1fr; }
    .form-card { padding: 24px 18px; }
    .public-header h1 { font-size: 1.4rem; }

    /* Stats */
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-info h3 { font-size: 1.2rem; }

    /* Filtros */
    .filters-row { flex-direction: column; }
    .filter-group { width: 100%; }
    .filter-group input,
    .filter-group select { min-width: 100%; }

    /* Admin content */
    .admin-content { padding: 16px; }
    .admin-topbar { padding: 0 16px; }

    /* Tabla */
    .table-actions { flex-direction: column; }

    /* Modales */
    .modal { max-width: 100%; margin: 10px; }
    .modal-body .form-grid { grid-template-columns: 1fr; }

    /* Status */
    .status-search { flex-direction: column; }
    .status-options { flex-direction: column; }

    /* Progress bar */
    .step-label { font-size: 0.6rem; max-width: 60px; }
    .step-circle { width: 34px; height: 34px; font-size: 0.8rem; }
    .progress-line { max-width: 40px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card { gap: 12px; }
    .form-card { padding: 20px 14px; }
    .form-navigation { flex-direction: column; gap: 10px; }
    .form-navigation .btn { width: 100%; }
    .radio-group { flex-direction: column; }
}

/* --- Print --- */
@media print {
    .sidebar, .admin-topbar, .filters-card, .form-navigation, .table-actions { display: none !important; }
    .admin-main { margin-left: 0 !important; }
}
