/**
 * Estados App - Custom Styles
 * Ubicación: public/botjdp/css/estados-app.css
 * 
 * Estructura:
 * 1. Variables y Reset
 * 2. Layout Principal
 * 3. Header
 * 4. Sección de Búsqueda
 * 5. Resultados y Tarjetas
 * 6. Panel de Administración
 * 7. Modales
 * 8. Componentes Auxiliares
 * 9. Responsive
 * 10. Animaciones
 */

/* ==================== 1. VARIABLES Y RESET ==================== */
:root {
    --app-primary: #c4a35a;
    --app-primary-dark: #a68b3d;
    --app-primary-light: #d4b896;
    --app-success: #2d6a4f;
    --app-warning: #f39c12;
    --app-danger: #c0392b;
    --app-info: #3498db;
    
    --app-bg: #f8fafc;
    --app-surface: #ffffff;
    --app-border: #e2e8f0;
    --app-text: #1e293b;
    --app-text-muted: #64748b;
    --app-text-light: #94a3b8;
    
    --app-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --app-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --app-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    --app-radius: 12px;
    --app-radius-sm: 8px;
    --app-radius-lg: 16px;
    
    --header-height: 72px;
    --admin-panel-width: 420px;
}

* {
    box-sizing: border-box;
}

body.neo-app {
    background: #eee;
    color: var(--app-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* ==================== 2. LAYOUT PRINCIPAL ==================== */
.neo-app-body {
    display: flex;
    min-height: calc(100vh - var(--header-height));
    padding-top: var(--header-height);
    background: #eee;
}

.app-content-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
    transition: all 0.3s ease;
}

.app-container {
    width: 100%;
    max-width: 720px;
    padding: 2rem 1rem;
}

.page-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--app-text);
    margin: 0;
}

.contact-info {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* ==================== 3. HEADER ==================== */
.neo-app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--app-surface);
    border-bottom: 1px solid var(--app-border);
    z-index: 100;
    box-shadow: var(--app-shadow-sm);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.5rem;
    position: relative;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo {
    height: 48px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

.header-title h1 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--app-text);
}

.header-subtitle {
    font-size: 0.8rem;
    color: var(--app-text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: absolute;
    right: 1.5rem;
}

/* ==================== 4. SECCIÓN DE BÚSQUEDA ==================== */
.neo-card {
    background: var(--app-surface);
    border-radius: var(--app-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--app-border);
}

/* Cuentas guardadas */
.saved-accounts-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--app-border);
}

.saved-accounts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.saved-accounts-header h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--app-text-muted);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.saved-accounts-header h4 i {
    color: var(--app-primary);
}

.saved-accounts-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.saved-account-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--app-bg);
    border-radius: var(--app-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.saved-account-item:hover {
    background: var(--app-surface);
    border-color: var(--app-primary-light);
}

.saved-account-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--app-primary), var(--app-primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.saved-account-info {
    flex: 1;
    min-width: 0;
}

.saved-account-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--app-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.saved-account-meta {
    font-size: 0.75rem;
    color: var(--app-text-muted);
}

.saved-account-remove {
    background: none;
    border: none;
    color: var(--app-text-light);
    cursor: pointer;
    padding: 0.25rem;
    opacity: 0;
    transition: all 0.2s;
}

.saved-account-item:hover .saved-account-remove {
    opacity: 1;
}

.saved-account-remove:hover {
    color: var(--app-danger);
}

.search-section {
    text-align: center;
}

.search-header {
    margin-bottom: 1.25rem;
}

.search-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.search-header h2 i {
    color: var(--app-primary);
}

.search-hint {
    color: var(--app-text-muted);
    margin: 0 0 1.5rem 0;
}

.search-form {
    max-width: 500px;
    margin: 0 auto;
}

.search-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    font-size: 1.1rem;
    padding: 0.875rem 1rem;
    border: 2px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--app-primary);
    box-shadow: 0 0 0 3px rgba(196, 163, 90, 0.15);
}

.search-btn {
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    white-space: nowrap;
}

.search-tags {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.search-tags .tag {
    font-size: 0.75rem;
    color: var(--app-text-muted);
    background: var(--app-bg);
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.search-tags .tag i {
    font-size: 0.7rem;
}

/* ==================== 5. RESULTADOS Y TARJETAS ==================== */
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--app-border);
}

.results-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.results-header h2 i {
    color: var(--app-primary);
}

.results-count {
    font-size: 0.875rem;
    color: var(--app-text-muted);
    background: var(--app-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.results-footer {
    margin-top: 1.5rem;
    text-align: center;
}

/* Account Card en resultados */
.account-result-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--app-bg);
    border-radius: var(--app-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.account-result-card:hover {
    background: var(--app-surface);
    border-color: var(--app-primary-light);
    transform: translateX(4px);
}

.account-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--app-primary), var(--app-primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
}

.account-info {
    flex: 1;
    min-width: 0;
}

.account-name {
    font-weight: 600;
    color: var(--app-text);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-meta {
    font-size: 0.8rem;
    color: var(--app-text-muted);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.account-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.account-amount {
    text-align: right;
    flex-shrink: 0;
}

.account-amount .amount {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--app-text);
}

.account-amount .label {
    font-size: 0.7rem;
    color: var(--app-text-muted);
    text-transform: uppercase;
}

.account-arrow {
    color: var(--app-text-light);
    font-size: 1rem;
}

/* Account Detail Card */
.account-section .account-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--app-border);
}

.account-section .account-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.account-card-detail {
    background: var(--app-surface);
    padding: 1rem 0;
    margin-bottom: 1.5rem;
}

.account-card-detail .card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.account-card-detail .avatar-large {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--app-primary), var(--app-primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
}

.account-card-detail .card-title {
    flex: 1;
}

.account-card-detail .card-title h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--app-text);
}

.account-card-detail .card-title p {
    margin: 0;
    color: var(--app-text-muted);
    font-size: 0.85rem;
}

.account-card-detail .card-body {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.account-card-detail .detail-item {
    padding: 0.5rem 0;
}

.account-card-detail .detail-item .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--app-text-muted);
    display: block;
    margin-bottom: 0.25rem;
}

.account-card-detail .detail-item .value {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--app-text);
    word-break: break-all;
}

.account-card-detail .detail-item .value.amount {
    font-size: 1.25rem;
    color: var(--app-primary);
}

/* Account Actions */
.account-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.25rem 1rem;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: var(--app-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #555;
}

.action-btn:hover {
    background: #eee;
    border-color: #ccc;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.action-btn i {
    font-size: 1.25rem;
    color: #666;
}

.action-btn span {
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    color: #555;
}

.action-btn.action-primary,
.action-btn.action-mercadopago {
    background: #f5f5f5;
    border-color: #e0e0e0;
    color: #555;
}

.action-btn.action-primary i,
.action-btn.action-mercadopago i {
    color: #666;
}

.action-btn.action-primary:hover,
.action-btn.action-mercadopago:hover {
    background: #eee;
    border-color: #ccc;
}

/* ==================== 6. PANEL DE ADMINISTRACIÓN ==================== */
/* En desktop: sidebar integrado sin overlay */
.admin-overlay {
    display: none; /* No se usa en desktop */
}

.admin-panel {
    width: 0;
    min-width: 0;
    height: calc(100vh - var(--header-height));
    background: var(--app-surface);
    border-left: 1px solid var(--app-border);
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: sticky;
    top: var(--header-height);
}

.admin-panel.open {
    width: var(--admin-panel-width);
    min-width: var(--admin-panel-width);
}

.admin-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--app-border);
    background: var(--app-bg);
}

.admin-panel-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.admin-panel-header h3 i {
    color: var(--app-primary);
}

.admin-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Tabs */
.neo-tabs-bar {
    display: flex;
    border-bottom: 1px solid var(--app-border);
    background: var(--app-bg);
}

.neo-tab {
    flex: 1;
    padding: 0.875rem 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--app-text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
}

.neo-tab i {
    font-size: 1rem;
}

.neo-tab:hover {
    color: var(--app-primary);
    background: rgba(196, 163, 90, 0.08);
}

.neo-tab.active {
    color: var(--app-primary);
    border-bottom-color: var(--app-primary);
}

.tab-content {
    display: none;
    padding: 1.25rem;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

#tab-operations {
    flex: 1;
    min-height: 0;
}

#tab-operations.active {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-height) - 200px);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stat-card {
    background: var(--app-bg);
    border-radius: var(--app-radius-sm);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--app-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.stat-card.stat-primary .stat-icon {
    background: rgba(196, 163, 90, 0.15);
    color: var(--app-primary);
}

.stat-card.stat-success .stat-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--app-success);
}

.stat-card.stat-warning .stat-icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--app-warning);
}

.stat-card.stat-info .stat-icon {
    background: rgba(6, 182, 212, 0.1);
    color: var(--app-info);
}

.stat-info {
    flex: 1;
}

.stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--app-text);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--app-text-muted);
    text-transform: uppercase;
}

/* Alert */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--app-radius-sm);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Dashboard Actions */
.dashboard-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dashboard-actions .neo-btn {
    justify-content: flex-start;
    padding: 0.75rem 1rem;
}

/* Upload Area */
.upload-dropzone {
    border: 2px dashed var(--app-border);
    border-radius: var(--app-radius);
    padding: 2rem 1rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: var(--app-primary);
    background: rgba(196, 163, 90, 0.08);
}

.upload-dropzone i {
    font-size: 2.5rem;
    color: var(--app-primary);
    margin-bottom: 0.75rem;
}

.upload-dropzone p {
    margin: 0 0 0.5rem 0;
    font-weight: 500;
}

.upload-dropzone span {
    color: var(--app-text-muted);
    font-size: 0.875rem;
}

.upload-dropzone button {
    margin-top: 0.75rem;
}

.upload-info {
    text-align: center;
    margin-top: 1rem;
}

.upload-info a {
    font-size: 0.85rem;
}

.upload-history {
    margin-top: 1.5rem;
}

.upload-history h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: var(--app-text-muted);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--app-bg);
    border-radius: var(--app-radius-sm);
    font-size: 0.85rem;
}

.history-item .icon {
    width: 32px;
    height: 32px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--app-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-item .info {
    flex: 1;
}

.history-item .records {
    font-weight: 600;
}

.history-item .date {
    font-size: 0.75rem;
    color: var(--app-text-muted);
}

/* Operations List */
.operations-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.operations-filters select {
    flex: 1;
}

.operations-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.operation-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--app-bg);
    border-radius: var(--app-radius-sm);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.operation-item .op-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.operation-item.payment_notice .op-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--app-success);
}

.operation-item.adhesion .op-icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--app-warning);
}

.operation-item .op-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.operation-item .op-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.operation-item .op-detail {
    color: var(--app-text-muted);
    font-size: 0.75rem;
    line-height: 1.4;
}

.operation-item .op-detail span {
    display: block;
}

.operation-item .op-date {
    font-size: 0.7rem;
    color: var(--app-text-light);
    margin-top: 0.25rem;
}

.operation-item .op-processed-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--app-text-muted);
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
}

.operation-item .op-processed-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--app-primary, #b8860b);
}

.operation-item .op-processed-label span {
    user-select: none;
}

.operations-end {
    text-align: center;
    padding: 1rem;
}

/* ==================== 7. MODALES ==================== */
.neo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.neo-modal {
    background: var(--app-surface);
    border-radius: var(--app-radius-lg);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

.neo-modal.neo-modal-large {
    max-width: 720px;
}

.neo-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--app-border);
}

.neo-modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.neo-modal-header h3 i {
    color: var(--app-primary);
}

.neo-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: 60vh;
}

.neo-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--app-border);
    background: var(--app-bg);
    border-radius: 0 0 var(--app-radius-lg) var(--app-radius-lg);
}

.modal-account-info {
    background: var(--app-bg);
    padding: 1rem;
    border-radius: var(--app-radius-sm);
    margin-top: 1rem;
}

.modal-toolbar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stats-toolbar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stats-toolbar input {
    flex: 1;
}

/* ==================== 8. COMPONENTES AUXILIARES ==================== */
/* Buttons */
.neo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--app-radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.neo-btn-primary {
    background: var(--app-primary);
    color: white;
}

.neo-btn-primary:hover {
    background: var(--app-primary-dark);
}

.neo-btn-success {
    background: var(--app-success);
    color: white;
}

.neo-btn-success:hover {
    background: #245a42;
}

.neo-btn-ghost {
    background: transparent;
    color: var(--app-text-muted);
}

.neo-btn-ghost:hover {
    background: var(--app-bg);
    color: var(--app-text);
}

.neo-btn-outline {
    background: transparent;
    border: 1px solid var(--app-border);
    color: var(--app-text);
}

.neo-btn-outline:hover {
    border-color: var(--app-primary);
    color: var(--app-primary);
}

.neo-btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

/* Forms */
.neo-form-input,
.neo-form-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    background: var(--app-surface);
    color: var(--app-text);
    transition: all 0.2s ease;
}

.neo-form-input:focus,
.neo-form-select:focus {
    outline: none;
    border-color: var(--app-primary);
    box-shadow: 0 0 0 3px rgba(196, 163, 90, 0.15);
}

.neo-form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: var(--app-text);
}

.form-group {
    margin-bottom: 1rem;
}

.neo-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.neo-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--app-primary);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.neo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.neo-table th,
.neo-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--app-border);
}

.neo-table th {
    background: var(--app-bg);
    font-weight: 600;
    color: var(--app-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.neo-table tbody tr:hover {
    background: var(--app-bg);
}

.text-center {
    text-align: center;
}

/* Links */
.neo-link {
    color: var(--app-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.neo-link:hover {
    text-decoration: underline;
}

/* Spinners */
.neo-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--app-border);
    border-top-color: var(--app-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.neo-spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid var(--app-border);
    border-top-color: var(--app-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-section {
    text-align: center;
    padding: 3rem 1rem;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-content p {
    color: var(--app-text-muted);
    margin: 0;
}

.loading-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    color: var(--app-text-muted);
    font-size: 0.85rem;
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--app-surface);
    border-radius: var(--app-radius-sm);
    box-shadow: var(--app-shadow-lg);
    animation: slideInRight 0.3s ease;
    max-width: 360px;
}

.toast.toast-success {
    border-left: 4px solid var(--app-success);
}

.toast.toast-success i {
    color: var(--app-success);
}

.toast.toast-error {
    border-left: 4px solid var(--app-danger);
}

.toast.toast-error i {
    color: var(--app-danger);
}

.toast.toast-warning {
    border-left: 4px solid var(--app-warning);
}

.toast.toast-warning i {
    color: var(--app-warning);
}

.toast .toast-message {
    flex: 1;
    font-size: 0.875rem;
}

.toast .toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--app-text-light);
    padding: 0.25rem;
}

/* Message Section */
.message-section {
    text-align: center;
    padding: 2rem;
}

.message-content i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.message-content.message-info i {
    color: var(--app-info);
}

.message-content.message-warning i {
    color: var(--app-warning);
}

.message-content.message-error i {
    color: var(--app-danger);
}

.message-content p {
    margin: 0 0 1rem 0;
    color: var(--app-text-muted);
}

/* Verify Section */
.verify-section {
    max-width: 480px;
    margin: 0 auto;
}

.verify-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--app-border);
}

.verify-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--app-text);
}

.verify-header h2 i {
    color: var(--app-primary);
    margin-right: 0.5rem;
}

.verify-content {
    margin-bottom: 1.5rem;
}

.verify-description {
    margin: 0 0 1rem 0;
    color: var(--app-text-muted);
    font-size: 0.95rem;
}

.verify-description strong {
    color: var(--app-text);
}

.verify-account-info {
    background: var(--app-bg);
    padding: 1rem;
    border-radius: var(--app-radius-sm);
    margin-bottom: 1.5rem;
}

.verify-account-info p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.verify-account-info strong {
    color: var(--app-text);
}

.verify-form {
    margin-top: 1rem;
}

.verify-form .neo-form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.verify-form .neo-form-input {
    width: 100%;
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
}

.verify-error {
    margin-top: 0.5rem;
    color: var(--app-danger);
    font-size: 0.85rem;
}

.verify-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--app-border);
}

.no-results {
    text-align: center;
    padding: 2rem 1rem;
}

/* ==================== CUENTAS VERIFICADAS ==================== */
.saved-accounts-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--app-border);
}

.saved-accounts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.saved-accounts-header h4 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--app-text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.saved-accounts-header h4 i {
    color: var(--app-success);
}

.saved-accounts-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.saved-account-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--app-bg);
    border-radius: var(--app-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.saved-account-item:hover {
    background: var(--app-surface);
    border-color: var(--app-primary-light);
}

.saved-account-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--app-success), #1a5a3a);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.saved-account-info {
    flex: 1;
    min-width: 0;
}

.saved-account-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--app-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.saved-account-meta {
    font-size: 0.75rem;
    color: var(--app-text-muted);
}

.saved-account-remove {
    background: none;
    border: none;
    color: var(--app-text-light);
    cursor: pointer;
    padding: 0.25rem;
    opacity: 0;
    transition: all 0.2s;
}

.saved-account-item:hover .saved-account-remove {
    opacity: 1;
}

.saved-account-remove:hover {
    color: var(--app-danger);
}

/* ==================== 9. RESPONSIVE ==================== */
/* Móvil: admin panel como overlay */
@media (max-width: 768px) {
    :root {
        --header-height: 56px;
        --admin-panel-width: 100%;
    }
    
    .header-content {
        padding: 0 0.75rem;
    }
    
    .header-brand {
        gap: 0.5rem;
    }
    
    .header-logo {
        height: 56px;
        max-width: 200px;
    }
    
    .header-title {
        display: none;
    }
    
    .header-subtitle {
        display: none;
    }
    
    .header-actions {
        right: 0.75rem;
    }
    
    .header-actions .btn-text {
        display: none;
    }
    
    .neo-btn {
        padding: 0.5rem;
    }
    
    .neo-btn-ghost {
        min-width: 36px;
        height: 36px;
    }
    
    .app-container {
        padding: 1rem;
    }
    
    /* En móvil: overlay y panel fijo */
    .admin-overlay {
        display: block;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 89;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    body.admin-open .admin-overlay {
        opacity: 1;
        visibility: visible;
    }
    
    .admin-panel {
        position: fixed;
        top: var(--header-height);
        right: 0;
        left: 0;
        width: 100%;
        min-width: 100%;
        z-index: 90;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }
    
    .admin-panel.open {
        transform: translateX(0);
        width: 100%;
        min-width: 100%;
    }
    
    .search-input-wrapper {
        flex-direction: column;
    }
    
    .search-btn {
        width: 100%;
    }
    
    .account-actions {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .account-card-detail .card-body {
        grid-template-columns: 1fr;
    }
    
    .neo-modal {
        margin: 0.5rem;
        max-height: 95vh;
    }
}

@media (max-width: 480px) {
    .search-tags {
        display: none;
    }
    
    .header-logo {
        height: 52px;
        max-width: 180px;
    }
    
    .account-result-card {
        flex-wrap: wrap;
    }
    
    .account-amount {
        width: 100%;
        text-align: left;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px dashed var(--app-border);
    }
    
    .account-arrow {
        display: none;
    }
}

/* ==================== 10. ANIMACIONES ==================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Result card animation */
.account-result-card {
    animation: fadeIn 0.3s ease;
}

.results-list .account-result-card:nth-child(1) { animation-delay: 0s; }
.results-list .account-result-card:nth-child(2) { animation-delay: 0.05s; }
.results-list .account-result-card:nth-child(3) { animation-delay: 0.1s; }
.results-list .account-result-card:nth-child(4) { animation-delay: 0.15s; }
.results-list .account-result-card:nth-child(5) { animation-delay: 0.2s; }

/* Focus visible para accesibilidad */
:focus-visible {
    outline: 2px solid var(--app-primary);
    outline-offset: 2px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==================== 11. ADMIN CHAT ==================== */
.admin-chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-height) - 200px);
    min-height: 300px;
    background: var(--app-surface);
    border-radius: var(--app-radius);
    overflow: hidden;
}

.admin-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--app-bg);
    border-bottom: 1px solid var(--app-border);
    font-weight: 600;
    font-size: 0.9rem;
}

.admin-chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: #f9f9f9;
}

.chat-message {
    max-width: 85%;
    animation: fadeInUp 0.2s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.user {
    align-self: flex-end;
}

.chat-message.assistant {
    align-self: flex-start;
}

.chat-message .message-content {
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-message.user .message-content {
    background: var(--app-primary);
    color: white;
    border-bottom-right-radius: 0.25rem;
}

.chat-message.assistant .message-content {
    background: white;
    color: var(--app-text);
    border: 1px solid var(--app-border);
    border-bottom-left-radius: 0.25rem;
}

.chat-message.typing .message-content {
    display: flex;
    gap: 0.25rem;
    padding: 1rem;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--app-text-muted);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
}

.admin-chat-input {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid var(--app-border);
    background: var(--app-surface);
}

.admin-chat-input input {
    flex: 1;
    border-radius: 1.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--app-border);
    outline: none;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.admin-chat-input input:focus {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 2px rgba(186, 155, 94, 0.15);
}

.admin-chat-input button {
    border-radius: 50%;
    width: 38px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#tab-chat {
    padding: 1rem;
}

#tab-chat.active {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Chat FAB (Floating Action Button) */
.chat-fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--app-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease;
    z-index: 100;
}

.chat-fab:hover {
    background: var(--app-primary-dark);
    transform: scale(1.05);
}

body.admin-open .chat-fab {
    display: none;
}

@media (max-width: 768px) {
    .chat-fab {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

/* Chat data table */
.chat-data-container {
    margin-top: 0.75rem;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--app-border);
}

.chat-data-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--app-bg);
    border-bottom: 1px solid var(--app-border);
    font-size: 0.75rem;
    color: var(--app-text-muted);
}

.chat-data-header .data-count {
    font-weight: 500;
}

.chat-data-header .btn-download-csv {
    background: var(--app-primary);
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: background 0.2s;
}

.chat-data-header .btn-download-csv:hover {
    background: var(--app-primary-dark);
}

.chat-data-table {
    width: 100%;
    font-size: 0.75rem;
    border-collapse: collapse;
    max-height: 200px;
    overflow-y: auto;
    display: block;
}

.chat-data-table thead {
    position: sticky;
    top: 0;
    background: var(--app-bg);
}

.chat-data-table th,
.chat-data-table td {
    padding: 0.4rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--app-border);
    white-space: nowrap;
}

.chat-data-table th {
    font-weight: 600;
    color: var(--app-text-muted);
}

.chat-data-truncated {
    padding: 0.5rem;
    text-align: center;
    font-size: 0.7rem;
    color: var(--app-text-muted);
    font-style: italic;
    background: var(--app-bg);
}
/* ==================== TOGGLE SWITCH PARA ADHESIONES ==================== */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    margin-right: 8px;
    vertical-align: middle;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 20px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--app-primary, #b8860b);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 1px var(--app-primary, #b8860b);
}

/* Status labels */
.status-label {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 3px;
    vertical-align: middle;
}

.status-label.status-accepted {
    background-color: #d4edda;
    color: #155724;
}

.status-label.status-cancelled {
    background-color: #f8d7da;
    color: #721c24;
}

/* Pending adhesions alert */
.pending-adhesions-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.pending-adhesions-alert i {
    color: #e0a800;
}

/* Badge para contador de pendientes */
.pending-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 0.75rem;
    font-weight: bold;
    color: white;
    background-color: #dc3545;
    border-radius: 10px;
    margin-left: 5px;
}