 :root {
            --primary-color: #6366f1;
            --secondary-color: #8b5cf6;
            --success-color: #10b981;
            --warning-color: #f59e0b;
            --danger-color: #ef4444;
            --dark-color: #1f2937;
            --light-bg: #f8fafc;
            --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
            --border-radius: 12px;
            
            /* Fuentes reducidas 20% */
            --font-xs: 0.66rem;
            --font-sm: 0.77rem; 
            --font-base: 0.88rem;
            --font-lg: 1.1rem;
            --font-xl: 1.32rem;
            --font-2xl: 1.76rem;
            --font-3xl: 2.2rem;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            color: var(--dark-color);
            font-size: var(--font-base);
        }

        .main-container {
            background: var(--light-bg);
            min-height: 100vh;
        }

        .dashboard-header {
            background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
            color: white;
            padding: 1.5rem 0;
            margin-bottom: 1rem;
            border-radius: 0 0 1.5rem 1.5rem;
            box-shadow: var(--card-shadow);
        }

        .dashboard-title {
            font-weight: 700;
            font-size: var(--font-3xl);
            margin-bottom: 0.25rem;
        }

        .dashboard-subtitle {
            opacity: 0.9;
            font-weight: 300;
            font-size: var(--font-sm);
        }

        .stats-card {
            background: white;
            border-radius: var(--border-radius);
            padding: 1rem;
            box-shadow: var(--card-shadow);
            border: none;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
            margin-bottom: 0.75rem;
        }

        .stats-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px -8px rgb(0 0 0 / 0.3);
        }

        .stats-icon {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            margin-bottom: 0.75rem;
        }

        .stats-number {
            font-size: var(--font-xl);
            font-weight: 700;
            margin-bottom: 0.25rem;
        }

        .stats-label {
            color: #6b7280;
            font-size: var(--font-xs);
            font-weight: 500;
        }

        .control-panel {
            background: white;
            border-radius: var(--border-radius);
            padding: 1.5rem;
            box-shadow: var(--card-shadow);
            margin-bottom: 1rem;
        }

        .section-title {
            font-weight: 600;
            font-size: var(--font-lg);
            margin-bottom: 1rem;
            color: var(--dark-color);
        }

        .action-btn {
            border-radius: 8px;
            padding: 0.6rem 1rem;
            font-weight: 500;
            transition: all 0.2s ease;
            border: none;
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            font-size: var(--font-sm);
        }

        .action-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }

        .btn-download {
            background: linear-gradient(135deg, var(--success-color), #059669);
            color: white;
        }

        .btn-delete {
            background: linear-gradient(135deg, var(--danger-color), #dc2626);
            color: white;
        }

        .btn-sound {
            background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
            color: white;
        }

        .btn-warning {
            background: linear-gradient(135deg, var(--warning-color), #d97706);
            color: white;
        }

        .filter-section {
            background: #f1f5f9;
            border-radius: var(--border-radius);
            padding: 1.5rem;
            margin-bottom: 1.5rem;
        }

        .form-control, .form-select {
            border-radius: 8px;
            border: 2px solid #e2e8f0;
            padding: 0.6rem 0.8rem;
            transition: all 0.2s ease;
            font-size: var(--font-sm);
        }

        .form-control:focus, .form-select:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
        }

        .form-label {
            font-size: var(--font-xs);
            font-weight: 600;
            margin-bottom: 0.4rem;
        }

        .table-container {
            background: white;
            border-radius: var(--border-radius);
            overflow: hidden;
            box-shadow: var(--card-shadow);
            margin-bottom: 1rem;
        }

        .table {
            margin-bottom: 0;
            font-size: var(--font-sm);
        }

        .table thead th {
            background: linear-gradient(135deg, #f8fafc, #e2e8f0);
            color: var(--dark-color);
            font-weight: 600;
            border: none;
            padding: 0.75rem 0.5rem;
            font-size: var(--font-xs);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .table tbody td {
            padding: 0.75rem 0.5rem;
            vertical-align: middle;
            border-color: #f1f5f9;
            font-size: var(--font-sm);
        }

        .table tbody tr:hover {
            background-color: #f8fafc;
        }

        .badge-amount {
            background: linear-gradient(135deg, var(--success-color), #059669);
            color: white;
            padding: 0.3rem 0.6rem;
            border-radius: 20px;
            font-weight: 600;
            font-size: var(--font-xs);
        }

        .badge-date {
            background: #e0e7ff;
            color: var(--primary-color);
            padding: 0.2rem 0.5rem;
            border-radius: 12px;
            font-size: var(--font-xs);
            font-weight: 500;
        }

        .empty-state {
            text-align: center;
            padding: 2rem;
            color: #6b7280;
        }

        .empty-state i {
            font-size: 3rem;
            margin-bottom: 0.75rem;
            opacity: 0.5;
        }

        .loading-spinner {
            display: none;
            text-align: center;
            padding: 1.5rem;
        }

        .responsive-table {
            overflow-x: auto;
        }

        /* Paginación */
        .pagination-container {
            background: white;
            border-radius: var(--border-radius);
            padding: 1rem;
            box-shadow: var(--card-shadow);
            margin-bottom: 1rem;
        }

        .pagination-info {
            font-size: var(--font-sm);
            color: #6b7280;
            margin-bottom: 0.75rem;
            text-align: center;
        }

        .pagination-controls {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 0.5rem;
            flex-wrap: wrap;
        }

        .pagination-btn {
            background: white;
            border: 2px solid #e2e8f0;
            color: var(--dark-color);
            padding: 0.5rem 0.75rem;
            border-radius: 8px;
            font-size: var(--font-sm);
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            min-width: 40px;
            text-align: center;
        }

        .pagination-btn:hover:not(:disabled) {
            border-color: var(--primary-color);
            color: var(--primary-color);
            transform: translateY(-1px);
        }

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

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

        .pulse-animation {
            animation: pulse 2s infinite;
        }

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

        .fade-in {
            animation: fadeIn 0.5s ease-in;
        }

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

        .auto-update-indicator {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: rgba(99, 102, 241, 0.9);
            color: white;
            padding: 6px 10px;
            border-radius: 16px;
            font-size: var(--font-xs);
            z-index: 1000;
            display: none;
        }

        .auto-update-indicator.active {
            display: block;
            animation: slideInRight 0.3s ease;
        }

        @keyframes slideInRight {
            from { transform: translateX(100%); }
            to { transform: translateX(0); }
        }

        /* Mobile First - Optimizado para Android */
        @media (max-width: 768px) {
            .dashboard-header {
                padding: 1rem 0;
                margin-bottom: 0.75rem;
                border-radius: 0 0 1rem 1rem;
            }

            .dashboard-title {
                font-size: var(--font-2xl);
                text-align: center;
            }

            .dashboard-subtitle {
                text-align: center;
                font-size: var(--font-xs);
            }

            .container {
                padding: 0 0.75rem;
            }

            /* Stats en 2x2 para móvil */
            .stats-mobile-row {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 0.5rem;
                margin-bottom: 0.75rem;
            }

            .stats-card {
                padding: 0.75rem;
                margin-bottom: 0;
            }

            .stats-icon {
                width: 36px;
                height: 36px;
                font-size: 1rem;
                margin-bottom: 0.5rem;
            }

            .stats-number {
                font-size: var(--font-lg);
                margin-bottom: 0.125rem;
            }

            .stats-label {
                font-size: 0.65rem;
            }

            .control-panel {
                padding: 1rem;
                margin-bottom: 0.75rem;
            }

            .section-title {
                font-size: var(--font-base);
                margin-bottom: 0.75rem;
                text-align: center;
            }

            /* Botones de acción apilados */
            .mobile-actions {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 0.5rem;
                margin-bottom: 0.75rem;
            }

            .action-btn {
                width: 100%;
                justify-content: center;
                padding: 0.75rem 0.5rem;
                font-size: var(--font-xs);
            }

            /* Filtros colapsables en móvil */
            .filter-toggle {
                display: block;
                width: 100%;
                background: var(--primary-color);
                color: white;
                border: none;
                padding: 0.75rem;
                border-radius: 8px;
                font-size: var(--font-sm);
                font-weight: 500;
                margin-bottom: 0.75rem;
            }

            .filter-section {
                padding: 0.75rem;
            }

            .filter-section.collapsed {
                display: none;
            }

            /* Tabla móvil - cards en lugar de tabla */
            .table-mobile-view {
                display: block;
            }

            .table-desktop-view {
                display: none;
            }

            .transaction-card {
                background: white;
                border-radius: 8px;
                padding: 0.75rem;
                margin-bottom: 0.5rem;
                box-shadow: 0 2px 4px rgba(0,0,0,0.1);
                border-left: 4px solid var(--primary-color);
            }

            .transaction-header {
                display: flex;
                justify-content: space-between;
                align-items: center;
                margin-bottom: 0.5rem;
            }

            .transaction-name {
                font-weight: 600;
                font-size: var(--font-sm);
                color: var(--dark-color);
            }

            .transaction-amount {
                background: linear-gradient(135deg, var(--success-color), #059669);
                color: white;
                padding: 0.25rem 0.5rem;
                border-radius: 12px;
                font-weight: 600;
                font-size: var(--font-xs);
            }

            .transaction-details {
                display: flex;
                justify-content: space-between;
                align-items: center;
                font-size: var(--font-xs);
                color: #6b7280;
            }

            .transaction-payment {
                background: #f3f4f6;
                padding: 0.2rem 0.4rem;
                border-radius: 6px;
                font-weight: 500;
            }

            /* Paginación móvil simplificada */
            .pagination-controls {
                justify-content: space-between;
            }

            .pagination-btn {
                padding: 0.6rem 0.8rem;
                font-size: var(--font-xs);
                min-width: 35px;
            }

            /* Ocultar algunos botones de página en móvil */
            .pagination-btn.page-number {
                display: none;
            }

            .pagination-btn.page-number.active,
            .pagination-btn.page-number.current-group {
                display: inline-block;
            }

            /* Header info compacto */
            .header-info {
                text-align: center !important;
                font-size: var(--font-xs);
            }

            .auto-update-indicator {
                bottom: 10px;
                right: 10px;
                padding: 4px 8px;
                border-radius: 12px;
                font-size: 0.6rem;
            }
        }

        /* Tablets */
        @media (min-width: 769px) and (max-width: 1024px) {
            .stats-card {
                padding: 1.25rem;
            }

            .control-panel {
                padding: 1.75rem;
            }

            .table-mobile-view {
                display: none;
            }

            .table-desktop-view {
                display: block;
            }

            .filter-toggle {
                display: none;
            }
        }

        /* Desktop */
        @media (min-width: 1025px) {
            .table-mobile-view {
                display: none;
            }

            .table-desktop-view {
                display: block;
            }

            .filter-toggle {
                display: none;
            }

            .mobile-actions {
                display: flex;
                flex-wrap: wrap;
                gap: 0.5rem;
            }

            .action-btn {
                width: auto;
            }
        }

        /* Mejoras de accesibilidad para Android */
        @media (pointer: coarse) {
            .action-btn, .pagination-btn, .form-control, .form-select {
                min-height: 44px; /* Tamaño mínimo de toque recomendado */
            }
        }

        /* Dark mode para Android con tema oscuro */
        @media (prefers-color-scheme: dark) {
            .main-container {
                background: var(--light-bg);
            }
        }