/**
 * Estilos Responsive - Diseño Mobile Moderno y Elegante
 * Mobile-First Approach con UX optimizada para smartphones
 * VERSIÓN 2.0 - MEJORAS MÓVIL COMPLETAS
 */
/* ============================================
   VERIFICACIÓN DE VERSIÓN - V2.0
   Si ves este comentario, el CSS se está cargando correctamente
   ============================================ */

/* ============================================
   MOBILE (< 768px) - DISEÑO MEJORADO
   ============================================ */
@media (max-width: 767px) {
    /* ============================================
       SIDEBAR MEJORADO PARA MÓVIL - DISEÑO ELEGANTE
       ============================================ */
    .sidebar {
        width: 90% !important;
        max-width: 360px !important;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2) !important;
        background: white !important;
    }
    
    .sidebar-header {
        padding: 24px 20px !important;
        background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%) !important;
        color: white !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }
    
    .sidebar-header h2 {
        color: white !important;
        font-size: 22px !important;
        font-weight: 800 !important;
        letter-spacing: -0.5px !important;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    }
    
    .sidebar-toggle {
        color: white !important;
        font-size: 32px !important;
        width: 48px !important;
        height: 48px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 12px !important;
        transition: all 0.2s !important;
        background: rgba(255, 255, 255, 0.15) !important;
        backdrop-filter: blur(10px) !important;
    }
    
    .sidebar-toggle:active {
        background: rgba(255, 255, 255, 0.3) !important;
        transform: scale(0.95) !important;
    }
    
    .sidebar-nav {
        padding: 12px 12px 24px 12px !important;
        background: #f8fafc !important;
    }
    
    .nav-item {
        padding: 20px 16px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        min-height: 72px !important;
        display: flex !important;
        align-items: center !important;
        border: none !important;
        border-radius: 16px !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        margin-bottom: 8px !important;
        background: white !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
        position: relative !important;
        overflow: hidden !important;
    }
    
    .nav-item::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: var(--color-primary);
        transform: scaleY(0);
        transition: transform 0.3s ease;
    }
    
    .nav-item:hover::before,
    .nav-item:active::before {
        transform: scaleY(1);
    }
    
    .nav-item:active {
        background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
        transform: scale(0.97) !important;
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15) !important;
    }
    
    .nav-icon {
        font-size: 32px !important;
        margin-right: 16px !important;
        width: 48px !important;
        height: 48px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
        border-radius: 12px !important;
        flex-shrink: 0 !important;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08)) !important;
        transition: all 0.3s ease !important;
    }
    
    .nav-item:active .nav-icon {
        transform: scale(1.1) !important;
        background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
    }
    
    .nav-item span:not(.nav-icon) {
        flex: 1 !important;
        color: #1e293b !important;
        font-weight: 600 !important;
        letter-spacing: -0.2px !important;
    }
    
    .nav-section {
        margin-bottom: 24px !important;
    }
    
    .nav-section-title {
        padding: 12px 16px 8px !important;
        font-size: 12px !important;
        font-weight: 800 !important;
        letter-spacing: 1.2px !important;
        text-transform: uppercase !important;
        color: #64748b !important;
        background: transparent !important;
        margin-bottom: 8px !important;
    }
    
    /* Colores específicos para diferentes tipos de items */
    .nav-item[href*="dashboard"] .nav-icon {
        background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
    }
    
    .nav-item[href*="ingresos"] .nav-icon {
        background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%) !important;
    }
    
    .nav-item[href*="egresos"] .nav-icon {
        background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%) !important;
    }
    
    .nav-item[href*="movimientos"] .nav-icon,
    .nav-item[href*="listar"] .nav-icon {
        background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%) !important;
    }
    
    .nav-item[href*="recordatorios"] .nav-icon {
        background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
    }
    
    .nav-item[href*="calendario"] .nav-icon {
        background: linear-gradient(135deg, #ddd6fe 0%, #c4b5fd 100%) !important;
    }
    
    .nav-item[href*="reportes"] .nav-icon,
    .nav-item[href*="informes"] .nav-icon {
        background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
    }
    
    .nav-item[href*="usuarios"] .nav-icon {
        background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%) !important;
    }
    
    .nav-item[href*="perfil"] .nav-icon {
        background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%) !important;
    }
    
    /* ============================================
       HEADER MEJORADO PARA MÓVIL
       ============================================ */
    .main-header {
        height: auto !important;
        min-height: 64px !important;
        padding: 8px 16px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 200 !important;
        background: white !important;
    }
    
    .menu-toggle {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 48px !important;
        height: 48px !important;
        font-size: 26px !important;
        color: var(--color-text) !important;
        background: var(--color-bg) !important;
        border-radius: 12px !important;
        transition: all 0.2s !important;
        margin-right: 12px !important;
    }
    
    .menu-toggle:active {
        background: var(--color-border) !important;
        transform: scale(0.95) !important;
    }
    
    .header-content {
        flex: 1;
        min-width: 0;
        align-items: flex-start !important;
        gap: 8px !important;
        flex-wrap: wrap !important;
    }
    
    .header-content h1 {
        font-size: 18px !important;
        font-weight: 700 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 60% !important;
    }
    
    .user-menu {
        flex-direction: row !important;
        gap: 8px !important;
        align-items: center !important;
        min-width: 0 !important;
        flex-wrap: nowrap !important;
    }
    
    .user-name {
        font-size: 13px !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 140px !important;
    }
    
    .user-role {
        font-size: 11px;
        padding: 3px 10px;
        border-radius: 10px;
    }
    
    /* Campanita de alertas en móvil */
    #agroAlertsButton {
        display: inline-block !important;
        font-size: 22px !important;
        line-height: 1 !important;
        padding: 6px !important;
        border-radius: 10px !important;
        background: var(--color-bg) !important;
    }
    #agroAlertsDropdown {
        position: fixed !important;
        left: 8px !important;
        right: 8px !important;
        top: 64px !important;
        width: auto !important;
        max-width: none !important;
        max-height: 70vh !important;
        overflow: auto !important;
        border-radius: 12px !important;
        box-shadow: 0 12px 24px rgba(0,0,0,0.2) !important;
    }
    
    .btn-logout {
        padding: 8px 14px;
        font-size: 13px;
        font-weight: 600;
        border-radius: 8px;
        min-height: 36px;
        transition: all 0.2s;
    }
    
    .btn-logout:active {
        transform: scale(0.95);
        opacity: 0.9;
    }
    
    /* ============================================
       CONTENIDO PRINCIPAL MEJORADO
       ============================================ */
    .main-content {
        padding: 16px !important;
        padding-bottom: 24px !important;
    }
    
    /* ============================================
       GRID RESPONSIVE MEJORADO - UNA COLUMNA EN MÓVIL
       ============================================ */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        display: grid !important;
    }
    
    /* ============================================
       STAT CARDS MEJORADAS PARA MÓVIL - DISEÑO ELEGANTE
       ============================================ */
    .stat-card {
        padding: 24px 20px !important;
        border-radius: 20px !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
        margin-bottom: 0 !important;
        min-height: 140px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        position: relative !important;
        overflow: hidden !important;
        background: white !important;
        border: 1px solid rgba(0, 0, 0, 0.05) !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    
    .stat-card:active {
        transform: scale(0.98) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
    }
    
    .stat-label {
        font-size: 14px !important;
        font-weight: 600 !important;
        color: var(--color-text-light) !important;
        margin-bottom: 12px !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        line-height: 1.4 !important;
    }
    
    .stat-value {
        font-size: 28px !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        margin-bottom: 8px !important;
        color: var(--color-text) !important;
    }
    
    .stat-icon {
        position: absolute !important;
        right: 20px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        font-size: 56px !important;
        opacity: 0.15 !important;
        z-index: 0 !important;
        pointer-events: none !important;
    }
    
    /* Colores específicos para stat-cards */
    .stat-card.success {
        background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important;
        border-left: 4px solid #10b981 !important;
    }
    
    .stat-card.success .stat-value {
        color: #059669 !important;
    }
    
    .stat-card.info {
        background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
        border-left: 4px solid #3b82f6 !important;
    }
    
    .stat-card.info .stat-value {
        color: #2563eb !important;
    }
    
    .stat-card.danger {
        background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%) !important;
        border-left: 4px solid #ef4444 !important;
    }
    
    .stat-card.danger .stat-value {
        color: #dc2626 !important;
    }
    
    /* Asegurar que el contenido esté por encima del icono */
    .stat-label,
    .stat-value {
        position: relative !important;
        z-index: 1 !important;
    }
    
    /* ============================================
       CARDS MEJORADAS PARA MÓVIL
       ============================================ */
    .card {
        padding: 20px !important;
        border-radius: 16px !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
        margin-bottom: 20px !important;
    }
    
    .card-header {
        margin-bottom: 20px !important;
        padding-bottom: 16px !important;
        flex-wrap: wrap !important;
        gap: 12px !important;
    }
    
    .card-title {
        font-size: 20px !important;
        font-weight: 700 !important;
    }
    
    /* ============================================
       STAT CARDS MEJORADAS
       ============================================ */
    /* Estilos duplicados eliminados - usar los estilos mejorados de arriba (líneas 290-374) */
    
    /* ============================================
       BOTONES MEJORADOS PARA MÓVIL
       ============================================ */
    .btn {
        width: 100% !important;
        padding: 16px 24px !important;
        font-size: 17px !important;
        font-weight: 600 !important;
        border-radius: 14px !important;
        min-height: 56px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
        transition: all 0.2s ease !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        border: none !important;
        cursor: pointer !important;
        -webkit-tap-highlight-color: transparent !important;
    }
    
    .btn:active {
        transform: scale(0.97) !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15) !important;
    }
    
    .btn-primary {
        background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%) !important;
        color: white !important;
    }
    
    .btn-primary:active {
        opacity: 0.9 !important;
    }
    
    .btn-success {
        background: linear-gradient(135deg, var(--color-success) 0%, #059669 100%) !important;
        color: white !important;
    }
    
    .btn-danger {
        background: linear-gradient(135deg, var(--color-danger) 0%, #dc2626 100%) !important;
        color: white !important;
    }
    
    .btn-secondary {
        background: linear-gradient(135deg, var(--color-text-light) 0%, #475569 100%) !important;
        color: white !important;
    }
    
    .btn-sm {
        padding: 12px 20px !important;
        font-size: 15px !important;
        min-height: 44px !important;
        border-radius: 12px !important;
    }
    
    .btn-lg {
        padding: 18px 28px !important;
        font-size: 18px !important;
        min-height: 60px !important;
        border-radius: 16px !important;
    }
    
    /* Botones en grupos - mejor espaciado */
    .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 24px;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    /* Botones en línea (dashboard acciones rápidas) */
    .card > div[style*="display: flex"] .btn {
        flex: 1;
        min-width: 0;
    }
    
    /* ============================================
       FORMULARIOS MEJORADOS PARA MÓVIL
       ============================================ */
    .form-group {
        margin-bottom: 24px;
    }
    
    .form-label {
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 10px;
        color: var(--color-text);
        display: block;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        width: 100%;
        padding: 16px;
        font-size: 17px; /* Evita zoom automático en iOS */
        border: 2px solid var(--color-border);
        border-radius: 12px;
        transition: all 0.2s;
        background: white;
        -webkit-appearance: none;
        appearance: none;
    }
    
    .form-input:focus,
    .form-select:focus,
    .form-textarea:focus {
        outline: none;
        border-color: var(--color-primary);
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    }
    
    .form-select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231e293b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 16px center;
        padding-right: 44px;
    }
    
    .form-textarea {
        min-height: 120px;
        resize: vertical;
        font-family: inherit;
    }
    
    .form-checkbox {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 16px;
        background: var(--color-bg);
        border-radius: 12px;
        cursor: pointer;
        transition: background 0.2s;
        min-height: 56px;
    }
    
    .form-checkbox:active {
        background: var(--color-border);
    }
    
    .form-checkbox input[type="checkbox"] {
        width: 24px;
        height: 24px;
        cursor: pointer;
        accent-color: var(--color-primary);
    }
    
    .form-error {
        font-size: 14px;
        margin-top: 8px;
        padding: 12px;
        background: #fee2e2;
        color: #991b1b;
        border-radius: 8px;
        border-left: 4px solid var(--color-danger);
    }
    
    .form-help {
        font-size: 14px;
        margin-top: 8px;
        color: var(--color-text-light);
        padding-left: 4px;
    }
    
    /* ============================================
       TABLAS COMO CARDS EN MÓVIL
       ============================================ */
    .table-container {
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    }
    
    .table {
        display: block;
    }
    
    .table thead {
        display: none;
    }
    
    .table tbody,
    .table tr,
    .table td {
        display: block;
        width: 100%;
    }
    
    .table tr {
        background: white;
        border: 1px solid var(--color-border);
        border-radius: 12px;
        margin-bottom: 12px;
        padding: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        transition: transform 0.2s, box-shadow 0.2s;
    }
    
    .table tr:active {
        transform: scale(0.98);
    }
    
    .table td {
        padding: 10px 0;
        border-bottom: 1px solid var(--color-border);
        text-align: right;
        font-size: 15px;
    }
    
    .table td:before {
        content: attr(data-label);
        float: left;
        font-weight: 700;
        color: var(--color-text-light);
        font-size: 13px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .table td:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    
    /* ============================================
       MODALES MEJORADAS PARA MÓVIL
       ============================================ */
    .modal-overlay {
        padding: 16px;
        align-items: flex-end;
    }
    
    .modal {
        padding: 24px 20px;
        margin: 0;
        max-width: 100%;
        max-height: 90vh;
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
        animation: slideUp 0.3s ease;
    }
    
    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    .modal-header {
        margin-bottom: 24px;
        padding-bottom: 16px;
        border-bottom: 2px solid var(--color-border);
    }
    
    .modal-title {
        font-size: 22px;
        font-weight: 700;
    }
    
    .modal-close {
        width: 40px;
        height: 40px;
        font-size: 24px;
        border-radius: 12px;
        transition: background 0.2s;
    }
    
    .modal-close:active {
        background: var(--color-bg);
    }
    
    /* ============================================
       TOAST NOTIFICATIONS MEJORADAS
       ============================================ */
    .toast-container {
        top: 16px;
        right: 16px;
        left: 16px;
        right: auto;
        max-width: calc(100% - 32px);
    }
    
    .toast {
        min-width: auto;
        width: 100%;
        padding: 16px 20px;
        border-radius: 12px;
        font-size: 15px;
    }
    
    /* ============================================
       BADGES MEJORADOS
       ============================================ */
    .badge {
        padding: 6px 14px;
        font-size: 13px;
        font-weight: 600;
        border-radius: 16px;
    }
    
    /* ============================================
       UTILIDADES ADICIONALES PARA MÓVIL
       ============================================ */
    /* Mejorar scroll en móvil */
    * {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Prevenir selección accidental de texto */
    .btn, .nav-item, .stat-card {
        -webkit-user-select: none;
        user-select: none;
    }
    
    /* Mejorar área de toque */
    a, button {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Espaciado mejorado entre secciones */
    .mb-3 {
        margin-bottom: 24px;
    }
    
    /* Ocultar elementos innecesarios en móvil */
    .desktop-only {
        display: none !important;
    }
}

/* ============================================
   TABLET (768px - 1024px)
   ============================================ */
@media (min-width: 768px) and (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .menu-toggle {
        display: block;
    }
    
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .main-content {
        padding: 24px 20px;
        padding-bottom: 24px !important;
    }
    
    /* Ocultar barra de navegación inferior en tablet */
    .bottom-nav {
        display: none !important;
    }
    
    /* Mostrar widget de acciones rápidas en tablet */
    .card[data-widget-id="acciones_rapidas"] {
        display: block !important;
    }
}

/* ============================================
   DESKTOP (> 1024px)
   ============================================ */
@media (min-width: 1025px) {
    .sidebar {
        transform: translateX(0);
    }
    
    .sidebar-overlay {
        display: none !important;
    }
    
    .menu-toggle {
        display: none;
    }
    
    .main-content {
        margin-left: var(--sidebar-width);
        padding: 30px;
        padding-bottom: 30px !important;
    }
    
    .sidebar-toggle {
        display: none;
    }
    
    /* Ocultar barra de navegación inferior en desktop */
    .bottom-nav {
        display: none !important;
    }
    
    /* Mostrar widget de acciones rápidas en desktop */
    .card[data-widget-id="acciones_rapidas"] {
        display: block !important;
    }
}

/* ============================================
   SIDEBAR OVERLAY MEJORADO (Mobile/Tablet)
   ============================================ */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
    animation: fadeIn 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ============================================
   CHART CONTAINER RESPONSIVE MEJORADO
   ============================================ */
.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: white;
    padding: 16px;
}

@media (max-width: 767px) {
    .chart-container {
        height: 300px;
        padding: 12px;
    }
}

/* ============================================
   MEJORAS ADICIONALES PARA MÓVIL
   ============================================ */
@media (max-width: 767px) {
    /* Mejorar scroll del sidebar */
    .sidebar {
        -webkit-overflow-scrolling: touch;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* Mejorar animación del sidebar */
    .sidebar.active {
        transform: translateX(0) !important;
    }
    
    /* Efecto de entrada suave para items del menú */
    .sidebar-nav .nav-item {
        animation: slideInLeft 0.3s ease backwards;
    }
    
    .sidebar-nav .nav-item:nth-child(1) { animation-delay: 0.05s; }
    .sidebar-nav .nav-item:nth-child(2) { animation-delay: 0.1s; }
    .sidebar-nav .nav-item:nth-child(3) { animation-delay: 0.15s; }
    .sidebar-nav .nav-item:nth-child(4) { animation-delay: 0.2s; }
    .sidebar-nav .nav-item:nth-child(5) { animation-delay: 0.25s; }
    .sidebar-nav .nav-item:nth-child(6) { animation-delay: 0.3s; }
    
    @keyframes slideInLeft {
        from {
            opacity: 0;
            transform: translateX(-20px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
    
    /* Mejorar botones pequeños en cards */
    .card-header .btn-sm {
        width: auto;
        min-width: 80px;
        padding: 10px 16px;
    }
    
    /* Mejorar espaciado en recordatorios */
    .card > div[style*="padding: 15px"] {
        padding: 16px !important;
    }
    
    /* Mejorar botones dentro de cards flex */
    .card > div[style*="display: flex"] {
        flex-direction: column;
        gap: 12px;
    }
    
    .card > div[style*="display: flex"] .btn {
        width: 100%;
    }
    
    /* Mejorar links pequeños */
    a.btn-sm, button.btn-sm {
        min-height: 44px;
    }
    
    /* Mejorar inputs de archivo */
    .form-file {
        padding: 16px;
        font-size: 16px;
        border-radius: 12px;
        border: 2px dashed var(--color-border);
        background: var(--color-bg);
        text-align: center;
        cursor: pointer;
        transition: all 0.2s;
    }
    
    .form-file:active {
        background: var(--color-border);
        border-color: var(--color-primary);
    }
    
    /* Mejorar preview de archivos */
    .file-preview {
        margin-top: 16px;
        padding: 16px;
        background: var(--color-bg);
        border-radius: 12px;
    }
    
    /* Mejorar mensajes de error */
    .error-message {
        padding: 16px;
        margin-bottom: 20px;
        background: #fee2e2;
        color: #991b1b;
        border-radius: 12px;
        border-left: 4px solid var(--color-danger);
        font-size: 15px;
    }
    
    /* Mejorar mensajes de éxito */
    .success-message {
        padding: 16px;
        margin-bottom: 20px;
        background: #d1fae5;
        color: #065f46;
        border-radius: 12px;
        border-left: 4px solid var(--color-success);
        font-size: 15px;
    }
    
    /* Mejorar loading spinner */
    .loading {
        width: 24px;
        height: 24px;
        border-width: 3px;
    }
    
    /* Mejorar texto en recordatorios */
    .card small {
        font-size: 14px;
        line-height: 1.5;
    }
    
    /* Mejorar badges en móvil */
    .badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 28px;
    }
    
    /* ============================================
       BOTTOM NAVIGATION BAR - BARRA INFERIOR FIJA MEJORADA
       ============================================ */
    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-top: 2px solid var(--color-border);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        padding: 12px 0;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
        height: auto;
        min-height: 80px;
    }
    
    .bottom-nav-scroll {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE y Edge */
        padding: 0 8px;
        gap: 8px;
        align-items: center;
    }
    
    .bottom-nav-scroll::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .bottom-nav-item {
        flex: 0 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 10px 16px;
        text-decoration: none;
        color: var(--color-text-light);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 16px;
        min-width: 70px;
        min-height: 68px;
        -webkit-tap-highlight-color: transparent;
        position: relative;
        background: white;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
    
    .bottom-nav-item:active {
        transform: scale(0.92);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    .bottom-nav-icon {
        font-size: 28px;
        margin-bottom: 6px;
        display: block;
        line-height: 1;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
        transition: all 0.3s ease;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        background: var(--color-bg);
    }
    
    .bottom-nav-item:active .bottom-nav-icon {
        transform: scale(1.15);
    }
    
    .bottom-nav-label {
        font-size: 11px;
        font-weight: 700;
        text-align: center;
        line-height: 1.2;
        letter-spacing: 0.2px;
        white-space: nowrap;
    }
    
    /* Colores específicos para cada botón con gradientes */
    .bottom-nav-item.dashboard {
        color: #f59e0b;
    }
    
    .bottom-nav-item.dashboard .bottom-nav-icon {
        background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    }
    
    .bottom-nav-item.dashboard:active {
        background: rgba(245, 158, 11, 0.1);
    }
    
    .bottom-nav-item.ingreso {
        color: var(--color-success);
    }
    
    .bottom-nav-item.ingreso .bottom-nav-icon {
        background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    }
    
    .bottom-nav-item.ingreso:active {
        background: rgba(16, 185, 129, 0.1);
    }
    
    .bottom-nav-item.egreso {
        color: var(--color-danger);
    }
    
    .bottom-nav-item.egreso .bottom-nav-icon {
        background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    }
    
    .bottom-nav-item.egreso:active {
        background: rgba(239, 68, 68, 0.1);
    }
    
    .bottom-nav-item.movimientos {
        color: #6366f1;
    }
    
    .bottom-nav-item.movimientos .bottom-nav-icon {
        background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    }
    
    .bottom-nav-item.movimientos:active {
        background: rgba(99, 102, 241, 0.1);
    }
    
    .bottom-nav-item.recordatorios {
        color: var(--color-primary);
    }
    
    .bottom-nav-item.recordatorios .bottom-nav-icon {
        background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    }
    
    .bottom-nav-item.recordatorios:active {
        background: rgba(37, 99, 235, 0.1);
    }
    
    .bottom-nav-item.calendario {
        color: #a855f7;
    }
    
    .bottom-nav-item.calendario .bottom-nav-icon {
        background: linear-gradient(135deg, #ddd6fe 0%, #c4b5fd 100%);
    }
    
    .bottom-nav-item.calendario:active {
        background: rgba(168, 85, 247, 0.1);
    }
    
    .bottom-nav-item.reportes {
        color: #3b82f6;
    }
    
    .bottom-nav-item.reportes .bottom-nav-icon {
        background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    }
    
    .bottom-nav-item.reportes:active {
        background: rgba(59, 130, 246, 0.1);
    }
    
    /* Ajustar padding del contenido principal para la barra inferior */
    .main-content {
        padding-bottom: 100px !important;
    }
    
    /* Ocultar widget de acciones rápidas en móvil (ya está en la barra inferior) */
    .card[data-widget-id="acciones_rapidas"] {
        display: none !important;
    }
    
    /* Asegurar que el body tenga espacio para la barra */
    body {
        padding-bottom: 0;
    }
}


