/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --error-color: #dc2626;
    --success-color: #16a34a;
    --bg-color: #f3f4f6;
    --text-color: #1f2937;
    --border-color: #d1d5db;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* === ESTILOS DEL LOGIN === */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 420px;
}

.login-box h1 {
    font-size: 28px;
    margin-bottom: 8px;
    color: var(--text-color);
    text-align: center;
}

.subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 30px;
    font-size: 14px;
}

/* Alertas */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background-color: #fee2e2;
    color: var(--error-color);
    border: 1px solid #fecaca;
}

/* Formulario */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-color);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Botones */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    width: 100%;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.form-footer {
    text-align: center;
    margin-top: 20px;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* === ESTILOS DEL DASHBOARD === */
.dashboard-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dashboard-header {
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: relative;
}

.logo h1 {
    font-size: 24px;
    color: var(--text-color);
    margin: 0;
}

/* Botón hamburguesa */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Navegación principal */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    display: block;
    padding: 10px 16px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-menu a:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
}

.nav-menu a:active {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Usuario y logout */
.user-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-name {
    font-weight: 500;
    color: var(--text-color);
    font-size: 14px;
    display: none;
}

.btn-logout {
    background-color: #ef4444;
    color: var(--white);
    padding: 8px 16px;
    font-size: 13px;
    white-space: nowrap;
}

.btn-logout:hover {
    background-color: #dc2626;
}

.dashboard-main {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Sección de Estadísticas */
/* ========== BANNER DE CAMPAÑA ========== */
.campaign-banner {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 32px;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(102, 126, 234, 0.3), 0 10px 10px -5px rgba(102, 126, 234, 0.2);
}

.campaign-content {
    position: relative;
    z-index: 2;
}

.campaign-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 20px;
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.campaign-badge svg {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

.campaign-main {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
}

.campaign-info .campaign-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    margin: 0 0 20px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.candidate-info {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.candidate-avatar {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
    border: 3px solid rgba(255, 255, 255, 0.5);
}

.candidate-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    margin: 0 0 6px 0;
}

.candidate-slogan {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-style: italic;
}

.campaign-cta {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 280px;
}

.vote-date {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.vote-date svg {
    color: var(--white);
    flex-shrink: 0;
}

.date-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.date-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.date-value {
    font-size: 1.1rem;
    color: var(--white);
    font-weight: 700;
}

.countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    min-width: 70px;
}

.countdown-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1;
}

.countdown-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 4px;
    font-weight: 500;
}

.countdown-separator {
    font-size: 1.5rem;
    color: var(--white);
    font-weight: 700;
}

.campaign-pattern {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0.1;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.5) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.5) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.3) 0%, transparent 50%);
    z-index: 1;
}

/* Responsive para campaign */
@media (max-width: 968px) {
    .campaign-main {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .campaign-cta {
        min-width: auto;
    }

    .campaign-info .campaign-title {
        font-size: 2rem;
    }
}

@media (max-width: 640px) {
    .campaign-banner {
        padding: 24px;
    }

    .campaign-info .campaign-title {
        font-size: 1.75rem;
    }

    .candidate-info {
        flex-direction: column;
        text-align: center;
    }

    .candidate-name {
        font-size: 1.25rem;
    }

    .countdown-item {
        min-width: 60px;
        padding: 10px 12px;
    }

    .countdown-value {
        font-size: 1.5rem;
    }
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
}

.stat-icon-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-icon-success {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.stat-icon-warning {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}

.stat-icon-info {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 4px 0;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    font-weight: 500;
}

/* Sección Geográfica */
.geo-section {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-header h2 {
    font-size: 24px;
    color: var(--text-color);
    margin: 0;
}

/* Buscador */
.search-box {
    position: relative;
    width: 100%;
    max-width: 300px;
}

.search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.search-box input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Acordeón */
.accordion-container {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.accordion-item {
    border-bottom: 1px solid var(--border-color);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    user-select: none;
}

.accordion-header:hover {
    background-color: #f9fafb;
}

.accordion-header.active {
    background-color: #f3f4f6;
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.accordion-icon {
    width: 20px;
    height: 20px;
    color: #6b7280;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.accordion-header.active .accordion-icon {
    transform: rotate(90deg);
}

.accordion-name {
    font-weight: 500;
    font-size: 15px;
    color: var(--text-color);
}

.accordion-badge {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

/* Contenido del acordeón */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content.active {
    max-height: 2000px;
}

/* Nivel 2: Ciudades */
.cities-list {
    background-color: #f9fafb;
    padding: 8px 0;
}

.city-item {
    border-bottom: 1px solid #e5e7eb;
}

.city-item:last-child {
    border-bottom: none;
}

.city-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px 12px 50px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.city-header:hover {
    background-color: #f3f4f6;
}

.city-header.active {
    background-color: #e5e7eb;
}

.city-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.city-icon {
    width: 16px;
    height: 16px;
    color: #9ca3af;
    transition: transform 0.3s ease;
}

.city-header.active .city-icon {
    transform: rotate(90deg);
}

.city-name {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.city-badge {
    background-color: #818cf8;
    color: var(--white);
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

/* Contenido de ciudades */
.city-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.city-content.active {
    max-height: 1000px;
}

/* Nivel 3: Barrios */
.neighborhoods-list {
    background-color: #ffffff;
    padding: 4px 0;
}

.neighborhood-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px 10px 80px;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.neighborhood-item:hover {
    background-color: #f9fafb;
}

.neighborhood-item:last-child {
    border-bottom: none;
}

.neighborhood-name {
    font-size: 13px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 8px;
}

.neighborhood-name::before {
    content: "•";
    color: #d1d5db;
    font-size: 18px;
}

.neighborhood-badge {
    background-color: #e0e7ff;
    color: #4f46e5;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
}

/* Estado vacío */
.empty-state {
    padding: 40px;
    text-align: center;
    color: #9ca3af;
}

.empty-state p {
    margin: 0;
    font-size: 14px;
}

/* Responsive */
@media (min-width: 1024px) {
    .user-name {
        display: block;
    }
}

@media (max-width: 1023px) {
    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }

    .actions-grid {
        grid-template-columns: 1fr;
    }

    /* Mostrar botón hamburguesa */
    .menu-toggle {
        display: flex;
        order: 2;
    }

    .logo {
        order: 1;
    }

    .user-menu {
        order: 3;
    }

    /* Menú móvil */
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .main-nav.active {
        max-height: 500px;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
        padding: 10px 0;
    }

    .nav-menu a {
        padding: 14px 20px;
        border-radius: 0;
        border-bottom: 1px solid var(--bg-color);
    }

    .nav-menu li:last-child a {
        border-bottom: none;
    }
}

@media (max-width: 768px) {
    .login-box {
        padding: 30px 24px;
    }

    .stats-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 20px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-icon {
        width: 56px;
        height: 56px;
    }

    .stat-icon svg {
        width: 28px;
        height: 28px;
    }

    .stat-value {
        font-size: 28px;
    }

    .stat-label {
        font-size: 13px;
    }

    .geo-section {
        padding: 20px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-header h2 {
        font-size: 20px;
    }

    .search-box {
        max-width: 100%;
    }

    .accordion-header {
        padding: 14px 16px;
    }

    .accordion-name {
        font-size: 14px;
    }

    .city-header {
        padding: 10px 16px 10px 40px;
    }

    .city-name {
        font-size: 13px;
    }

    .neighborhood-item {
        padding: 8px 16px 8px 60px;
    }

    .neighborhood-name {
        font-size: 12px;
    }

    .dashboard-main {
        padding: 20px 16px;
    }

    .btn-logout {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 20px;
    }

    .login-box {
        padding: 24px 20px;
    }

    .login-box h1 {
        font-size: 24px;
    }

    .stats-section {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 28px;
    }
}

/* ========== MODAL ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    overflow-y: auto;
}

.modal.active {
    display: block;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-container,
.modal-content {
    position: relative;
    max-width: 900px;
    margin: 40px auto;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 1001;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 24px;
    color: var(--text-color);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #6b7280;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.modal-close:hover {
    color: var(--error-color);
}

/* Buscador del modal */
.modal-search {
    padding: 20px 30px;
    background-color: #f9fafb;
    border-bottom: 1px solid var(--border-color);
}

.search-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
}

.search-input-group svg {
    color: #9ca3af;
    flex-shrink: 0;
}

.search-input-group input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    padding: 0;
}

.btn-search {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-search:hover {
    background-color: var(--primary-hover);
}

.btn-registraduria {
    background-color: #2e7d32;
    white-space: nowrap;
}

.btn-registraduria:hover {
    background-color: #1b5e20;
}

/* Tabs de navegación */
.tabs-navigation {
    display: flex;
    gap: 8px;
    padding: 20px 30px;
    border-bottom: 2px solid var(--border-color);
    overflow-x: auto;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.tab-btn:hover {
    background-color: #f3f4f6;
    color: var(--text-color);
}

.tab-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.tab-btn.completed {
    background-color: var(--success-color);
    color: var(--white);
}

.tab-btn.completed:hover {
    background-color: #15803d;
}

.tab-btn svg {
    flex-shrink: 0;
}

/* Formulario del modal */
.modal-form {
    padding: 30px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field.full-width {
    grid-column: 1 / -1;
}

.form-field label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 8px;
}

.required {
    color: var(--error-color);
}

.form-field input,
.form-field select {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-field input:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-field input:invalid:not(:placeholder-shown),
.form-field select:invalid:not(:placeholder-shown) {
    border-color: var(--error-color);
}

.field-hint {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
}

/* Footer del modal */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.btn-secondary {
    background-color: #f3f4f6;
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

.btn-primary:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-primary:disabled:hover {
    background-color: #9ca3af;
}

.btn-referencia {
    background-color: #f0f9ff;
    color: #0284c7;
    border: 2px dashed #0284c7;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
}

.btn-referencia:hover {
    background-color: #e0f2fe;
    border-color: #0369a1;
    color: #0369a1;
}

/* Responsive del modal */
@media (max-width: 768px) {
    .modal-container {
        margin: 20px;
        max-width: calc(100% - 40px);
    }

    .modal-header {
        padding: 20px;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .modal-search {
        padding: 16px 20px;
    }

    .tabs-navigation {
        padding: 16px 20px;
    }

    .tab-btn span {
        display: none;
    }

    .tab-btn {
        padding: 10px 12px;
    }

    .modal-form {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

/* ========== MINI MODAL DE REFERENCIA ========== */
.mini-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.mini-modal.active {
    display: flex;
}

.mini-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.mini-modal-content {
    position: relative;
    background: var(--white);
    border-radius: 16px;
    padding: 32px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 2001;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mini-modal-content h3 {
    font-size: 22px;
    color: var(--text-color);
    margin: 0 0 12px 0;
    text-align: center;
}

.mini-modal-content p {
    font-size: 15px;
    color: #6b7280;
    margin: 0 0 24px 0;
    text-align: center;
}

.mini-modal-form {
    margin-bottom: 24px;
}

.mini-modal-form input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
    text-align: center;
    font-weight: 500;
}

.mini-modal-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.error-text {
    display: block;
    color: var(--error-color);
    font-size: 13px;
    margin-top: 8px;
    text-align: center;
    font-weight: 500;
}

.mini-modal-buttons {
    display: flex;
    gap: 12px;
}

.btn-secondary-mini,
.btn-primary-mini {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary-mini {
    background-color: #f3f4f6;
    color: #6b7280;
}

.btn-secondary-mini:hover {
    background-color: #e5e7eb;
    color: var(--text-color);
}

.btn-primary-mini {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary-mini:hover {
    background-color: var(--primary-hover);
}

@media (max-width: 480px) {
    .mini-modal-content {
        padding: 24px;
    }

    .mini-modal-buttons {
        flex-direction: column;
    }
}

/* ========== SECCIÓN DE ACCIONES (VOTACIÓN Y LÍDERES) ========== */
.actions-section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 16px 0;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.actions-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.action-card {
    position: relative;
    background: var(--white);
    border-radius: 12px;
    padding: 32px 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    transition: height 0.3s ease;
}

.action-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    border-color: transparent;
}

.action-card:hover::before {
    height: 100%;
    opacity: 0.08;
}

.action-card:nth-child(1)::before {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.action-card:nth-child(2)::before {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}

.action-card:nth-child(3)::before {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
}

.action-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--white);
    font-size: 36px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.votacion-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.lideres-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 8px 20px rgba(240, 147, 251, 0.3);
}

.action-content {
    position: relative;
    z-index: 1;
}

.action-content h3 {
    margin: 0 0 12px 0;
    font-size: 1.4rem;
    color: var(--text-color);
    font-weight: 700;
}

.action-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Modal pequeño para votación */
.modal-small .modal-content {
    max-width: 500px;
    width: 90%;
}

.modal-small .modal-body {
    padding: 24px;
}

.modal-small .modal-body .search-input-group {
    margin-bottom: 20px;
}

.modal-body {
    padding: 24px;
}

#lideresModal .modal-body {
    padding: 24px;
}


.search-section {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.search-section h3 {
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 600;
}

.search-group {
    display: flex;
    gap: 12px;
}

.search-group .form-input {
    flex: 1;
    margin: 0;
}

/* Resultados de votación */
#votacionResult {
    margin-top: 0;
}

.votacion-info {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 4px;
}

.votacion-info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.votacion-info-item:last-child {
    border-bottom: none;
}

.votacion-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.votacion-value {
    font-weight: 500;
    color: var(--text-color);
    text-align: right;
    max-width: 60%;
}

/* Información de líder */
#liderInfo {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

#liderInfo:empty {
    padding: 0;
    border: none;
}

.lider-card {
    background: linear-gradient(135deg, #f093fb15 0%, #f5576c15 100%);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.lider-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
    font-weight: 600;
    flex-shrink: 0;
}

.lider-details h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 600;
}

.lider-stats {
    display: flex;
    gap: 16px;
    font-size: 0.9rem;
}

.lider-stat {
    color: var(--text-secondary);
}

.lider-stat strong {
    color: var(--text-color);
    font-weight: 600;
}

/* Lista de referidos */
#referidosList {
    padding-top: 24px;
}

#referidosList:empty {
    padding: 0;
}

#referidosList h4 {
    margin: 0 0 16px 0;
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 600;
}

.referidos-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.referido-item {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.referido-item:hover {
    background: #f5f5f5;
    transform: translateX(4px);
}

.referido-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
}

.referido-info {
    flex: 1;
}

.referido-name {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.referido-cedula {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.referido-badge {
    background: var(--primary-color);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Acciones del líder */
.lider-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

.badge-lider {
    background: #dcfce7;
    color: #16a34a;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.btn-success-sm {
    background: #22c55e;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.btn-success-sm:hover { background: #16a34a; }

.btn-danger-sm {
    background: #ef4444;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.btn-danger-sm:hover { background: #dc2626; }

/* Header referidos */
.referidos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.referidos-header h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 600;
}

/* Tabla de referidos */
.referidos-table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.referidos-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.referidos-table thead th {
    background: var(--bg-light);
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.referidos-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.referidos-table tbody tr:hover {
    background: #f9fafb;
}

.estado-select {
    padding: 4px 8px;
    border: 2px solid #6b7280;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background: white;
    min-width: 140px;
}

.notas-input {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    width: 100%;
    min-width: 120px;
}

.notas-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.acciones-cell {
    white-space: nowrap;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.btn-icon:hover { background: #fee2e2; color: #ef4444; }

/* Formulario inline de referido */
.form-referido {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.form-referido h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #16a34a;
    font-weight: 600;
}

.form-referido-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.form-referido-grid input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.form-referido-grid input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15);
}

.form-referido-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-cancel {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.btn-cancel:hover { background: #e5e7eb; }

.btn-save {
    background: #22c55e;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.btn-save:hover { background: #16a34a; }

/* Modal large */
.modal-large {
    max-width: 900px;
    width: 95%;
}

.empty-state {
    padding: 40px 24px;
    text-align: center;
    color: var(--text-secondary);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state p {
    margin: 0;
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .actions-grid {
        grid-template-columns: 1fr;
    }

    .action-card {
        padding: 28px 24px;
    }

    .action-icon {
        width: 64px;
        height: 64px;
        font-size: 32px;
        margin-bottom: 16px;
    }

    .action-content h3 {
        font-size: 1.2rem;
    }

    .action-content p {
        font-size: 0.9rem;
    }

    .search-group {
        flex-direction: column;
    }

    .votacion-info-item {
        flex-direction: column;
        gap: 8px;
    }

    .votacion-value {
        max-width: 100%;
        text-align: left;
    }

    .lider-card {
        flex-direction: column;
        text-align: center;
    }

    .lider-stats {
        justify-content: center;
    }
}

/* === NOTIFICACIONES === */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 400px;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left: 4px solid var(--success-color);
}

.notification-success::before {
    content: '';
    color: var(--success-color);
}

.notification-error {
    border-left: 4px solid var(--error-color);
}

.notification-error::before {
    content: '';
    color: var(--error-color);
}

.notification span {
    flex: 1;
    font-size: 14px;
    color: var(--text-color);
}

.notification-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #9ca3af;
    padding: 0;
    line-height: 1;
}

.notification-close:hover {
    color: var(--text-color);
}

@media (max-width: 480px) {
    .notification {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}

/* === AUTOCOMPLETADO DE BARRIOS === */
.barrio-autocomplete-container {
    position: relative;
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.autocomplete-suggestions.show {
    display: block;
}

.autocomplete-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.15s;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background-color: #f0f4ff;
}

.autocomplete-item .barrio-name {
    font-weight: 500;
    color: var(--text-color);
}

.autocomplete-item .barrio-location {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.autocomplete-no-results {
    padding: 12px;
    text-align: center;
    color: #6b7280;
    font-size: 13px;
}

.field-hint {
    display: block;
    font-size: 12px;
    margin-top: 4px;
    color: #6b7280;
}

.field-hint.success {
    color: var(--success-color);
}

.field-hint.error {
    color: var(--error-color);
}

#barrio.valid {
    border-color: var(--success-color);
}

#barrio.invalid {
    border-color: var(--error-color);
}

/* === PÁGINA CALLCENTER Y ESTADOS === */
.page-header {
    margin-bottom: 30px;
}

.page-header h2 {
    font-size: 28px;
    color: var(--text-color);
    margin-bottom: 8px;
}

.page-header p {
    color: #6b7280;
    font-size: 14px;
}

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.empty-state p {
    color: #9ca3af;
    font-size: 18px;
}

/* Menú activo */
.nav-menu a.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Nav items deshabilitados (próximamente) */
.nav-menu a.nav-disabled {
    color: #9ca3af;
    cursor: default;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-badge-soon {
    font-size: 10px;
    background: #e5e7eb;
    color: #6b7280;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 500;
    line-height: 1;
}

/* ========== Fuente badges (votación) ========== */
.votacion-fuente {
    margin-bottom: 12px;
}

.fuente-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fuente-registraduria {
    background: #dcfce7;
    color: #166534;
}

.fuente-local {
    background: #dbeafe;
    color: #1e40af;
}

.votacion-warning {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
}

/* ========== Action card militantes icon ========== */
.militantes-icon {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

/* ========== Scanner OCR - Action Card & QR Modal ========== */
.actions-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
    .actions-grid-3 {
        grid-template-columns: 1fr;
    }
}

.scanner-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.action-card-scanner {
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.action-card-scanner:hover {
    border-color: rgba(16, 185, 129, 0.4);
}

/* Modal Scanner QR */
.modal-scanner {
    max-width: 440px;
}

.scanner-qr-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 24px !important;
}

.scanner-qr-instructions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.scanner-qr-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #f0fdf4;
    border-radius: 10px;
    font-size: 14px;
    color: #1e293b;
}

.step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    min-width: 26px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
}

.scanner-qr-code {
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 16px;
    padding: 20px;
    border: 2px solid #e2e8f0;
    min-height: 280px;
    min-width: 280px;
}

.scanner-qr-code canvas {
    border-radius: 8px;
}

.qr-loading, .qr-error {
    color: #64748b;
    font-size: 14px;
    text-align: center;
}

.qr-error {
    color: #ef4444;
}

.qr-fallback {
    text-align: center;
    font-size: 13px;
    color: #475569;
}

.qr-fallback input {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    color: #1e293b;
}

.scanner-qr-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.scanner-qr-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #475569;
}

.scanner-qr-timer strong {
    color: #1e293b;
    font-variant-numeric: tabular-nums;
}

.scanner-qr-motor {
    font-size: 12px;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 8px;
}

/* Scanner Modal Tabs */
.scanner-modal-tabs {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 4px;
    width: 100%;
}

.scanner-modal-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.scanner-modal-tab.active {
    background: white;
    color: #1e293b;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.scanner-modal-tab:hover:not(.active) {
    color: #475569;
}

.scanner-tab-content {
    display: none;
    width: 100%;
}

.scanner-tab-content.active {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* CSV Upload Info */
.csv-upload-info {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 14px;
    font-size: 13px;
    color: #15803d;
    line-height: 1.5;
}

.csv-upload-info p {
    margin: 0;
}

.csv-estructura-code {
    background: #1e293b;
    color: #a5f3fc;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 11px;
    overflow-x: auto;
}

.csv-estructura-code code {
    white-space: nowrap;
}

.csv-upload-tip {
    font-size: 12px;
    color: #16a34a;
    font-style: italic;
}

/* CSV Input Options (file/paste toggle) */
.csv-input-options {
    display: flex;
    gap: 4px;
    background: #e2e8f0;
    border-radius: 8px;
    padding: 3px;
}

.csv-option-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.csv-option-btn.active {
    background: white;
    color: #1e293b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* CSV Upload Area */
.csv-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s;
    color: #64748b;
    font-size: 13px;
}

.csv-upload-area:hover {
    border-color: #4f46e5;
    background: #f5f3ff;
    color: #4f46e5;
}

.csv-upload-area svg {
    opacity: 0.5;
}

.csv-upload-area:hover svg {
    opacity: 1;
    color: #4f46e5;
}

/* CSV Textarea */
.csv-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.5;
    resize: vertical;
    color: #1e293b;
    background: #f8fafc;
}

.csv-textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.csv-textarea::placeholder {
    color: #94a3b8;
}

/* CSV Process Button */
.btn-csv-upload {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
}

.btn-csv-upload:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* CSV Results */
.csv-resultado-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.csv-resultado-header h4 {
    font-size: 15px;
    color: #1e293b;
    margin: 0;
}

.csv-resultado-header span {
    font-size: 12px;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 10px;
    border-radius: 12px;
}

.csv-result-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.csv-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 13px;
    border: 1px solid #e2e8f0;
}

.csv-result-item.csv-result-lider {
    background: #fffbeb;
    border-color: #fcd34d;
}

.csv-result-badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.csv-result-badge.lider {
    background: #fef3c7;
    color: #92400e;
}

.csv-result-badge.militante {
    background: #e0e7ff;
    color: #3730a3;
}

.csv-result-item strong {
    flex: 1;
    color: #1e293b;
}

.csv-result-detail {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
}

/* CSV Save Summary */
.csv-resumen-stats {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.csv-stat-ok, .csv-stat-dup, .csv-stat-err {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.csv-stat-ok {
    background: #dcfce7;
    color: #15803d;
}

.csv-stat-dup {
    background: #fef9c3;
    color: #854d0e;
}

.csv-stat-err {
    background: #fee2e2;
    color: #dc2626;
}

/* Override modal-scanner for wider CSV content */
.modal-scanner {
    max-width: 520px;
}

.scanner-qr-body {
    align-items: stretch;
}
