        * { box-sizing: border-box; }
        body { 
            background: #f0f2f5; 
            margin: 0;
            overflow-x: hidden;
            padding-bottom: 20px;
        }
        
        /* LOGIN */ 
        .login-container {
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        .login-box {
            background: white;
            border-radius: 20px;
            padding: 40px;
            width: 100%;
            max-width: 400px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.3);
        }
        .login-logo {
            text-align: center;
            margin-bottom: 30px;
        }
        .login-logo i {
            font-size: 60px;
            color: #667eea;
        }
        .login-title {
            text-align: center;
            font-size: 24px;
            font-weight: 700;
            color: #333;
            margin-bottom: 30px;
        }
        
        /* DASHBOARD */
        .dashboard-container {
            padding: 12px;
            min-height: 100vh;
        }
        .dashboard-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 30px 20px;
            border-radius: 15px;
            margin-bottom: 30px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.1);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .user-info {
            display: flex;
            align-items: center;
            gap: 15px;
        }
        .user-avatar {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 28px;
            color: #667eea;
            font-weight: 700;
        }
        .user-details {
            text-align: right;
        }
        .user-name {
            font-size: 12px;
            font-weight: 600;
            margin-bottom: 2px;
        }
        .user-role {
            font-size: 12px;
            opacity: 0.9;
            margin-bottom: 2px;
        }
        .user-store {
            font-size: 11px;
            opacity: 0.8;
            background: rgba(255,255,255,0.2);
            padding: 2px 8px;
            border-radius: 10px;
            display: inline-block;
            cursor: pointer;
        }
        .user-store:hover {
            background: rgba(255,255,255,0.3);
        }
        .btn-logout {
            background: rgba(255,255,255,0.2);
            color: white;
            border: 2px solid rgba(255,255,255,0.3);
            padding: 10px 15px;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
        }
        .btn-logout:hover {
            background: rgba(255,255,255,0.3);
            border-color: rgba(255,255,255,0.5);
            transform: translateY(-2px);
        }
        .dashboard-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-top: 20px;
        }
        .dashboard-card {
            background: white;
            border-radius: 15px;
            padding: 30px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 2px 10px rgba(0,0,0,0.08);
        }
        .dashboard-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0,0,0,0.15);
        }
        .dashboard-icon {
            width: 80px;
            height: 80px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 20px;
            font-size: 35px;
            color: white;
        }
        .dashboard-title {
            font-size: 20px;
            font-weight: 600;
            color: #333;
            margin-bottom: 10px;
        }
        .dashboard-desc {
            font-size: 14px;
            color: #999;
        }
        
        /* CALENDARIO EN DASHBOARD */
        .dashboard-card-calendario {
            background: white;
            border-radius: 15px;
            padding: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.08);
            overflow: hidden; /* Evitar que el contenido se salga */
        }
        
        .dashboard-card-calendario h5 {
            margin: 0 0 5px 0;
            color: #333;
            font-size: 16px;
            font-weight: 600;
        }
        
        .dashboard-card-calendario small {
            color: #999;
            font-size: 12px;
        }
        
        /* Estilos para FullCalendar */
        #calendar {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: white;
            border-radius: 10px;
            padding: 10px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            overflow-x: auto; /* Scroll horizontal si es necesario */
        }
        
        /* Toolbar del calendario */
        #calendar .fc-header-toolbar {
            margin-bottom: 15px !important;
            padding: 10px !important;
            background: #f8f9fa !important;
            border-radius: 8px !important;
            flex-wrap: wrap !important;
            gap: 10px !important;
        }
        
        #calendar .fc-toolbar-chunk {
            display: flex !important;
            gap: 5px !important;
            flex-wrap: wrap !important;
            align-items: center !important;
        }
        
        /* Botones del calendario */
        #calendar .fc-button {
            background: #667eea !important;
            border: none !important;
            padding: 8px 12px !important;
            border-radius: 6px !important;
            font-size: 13px !important;
            font-weight: 500 !important;
            transition: all 0.2s ease !important;
            white-space: nowrap !important;
        }
        
        #calendar .fc-button:hover {
            background: #5568d3 !important;
            transform: translateY(-1px) !important;
            box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3) !important;
        }
        
        #calendar .fc-button:active {
            transform: translateY(0) !important;
        }
        
        #calendar .fc-button-active {
            background: #764ba2 !important;
        }
        
        #calendar .fc-button:disabled {
            opacity: 0.5 !important;
            cursor: not-allowed !important;
        }
        
        /* Título del calendario */
        #calendar .fc-toolbar-title {
            font-size: 18px !important;
            font-weight: 600 !important;
            color: #333 !important;
            margin: 0 10px !important;
        }
        
        /* Encabezados de días */
        #calendar .fc-col-header-cell {
            background: #f8f9fa !important;
            font-weight: 600 !important;
            color: #667eea !important;
            padding: 10px 5px !important;
            font-size: 12px !important;
            border: none !important;
        }
        
        /* Números de día */
        #calendar .fc-daygrid-day-number {
            color: #333 !important;
            font-weight: 500 !important;
            padding: 8px !important;
            font-size: 13px !important;
        }
        
        /* Celdas de días */
        #calendar .fc-daygrid-day {
            border: 1px solid #f0f0f0 !important;
        }
        
        #calendar .fc-day-today {
            background: rgba(102, 126, 234, 0.08) !important;
        }
        
        #calendar .fc-day-today .fc-daygrid-day-number {
            background: #667eea !important;
            color: white !important;
            border-radius: 50% !important;
            width: 28px !important;
            height: 28px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            margin: 2px !important;
        }
        
        /* Eventos */
        #calendar .fc-event {
            border: none !important;
            border-radius: 4px !important;
            padding: 3px 6px !important;
            font-size: 11px !important;
            cursor: pointer !important;
            margin-bottom: 2px !important;
            white-space: normal !important;
            line-height: 1.4 !important;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
        }
        
        #calendar .fc-event-title {
            font-weight: 500 !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
            display: -webkit-box !important;
            -webkit-line-clamp: 2 !important;
            -webkit-box-orient: vertical !important;
        }
        
        #calendar .fc-event-title strong {
            color: rgba(255,255,255,0.95) !important;
            margin-right: 4px !important;
        }
        
        #calendar .fc-event:hover {
            opacity: 0.9 !important;
            transform: translateY(-1px) !important;
            box-shadow: 0 2px 6px rgba(0,0,0,0.15) !important;
            transition: all 0.2s ease !important;
        }
        
        #calendar .fc-daygrid-event-dot {
            display: none !important;
        }
        
        #calendar .fc-more-link {
            color: #667eea !important;
            font-weight: 600 !important;
            font-size: 11px !important;
            padding: 2px 6px !important;
            border-radius: 4px !important;
            background: rgba(102, 126, 234, 0.1) !important;
        }
        
        #calendar .fc-more-link:hover {
            background: rgba(102, 126, 234, 0.2) !important;
        }
        
        /* Popover de eventos */
        #calendar .fc-popover {
            border-radius: 8px !important;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
            border: none !important;
        }
        
        #calendar .fc-popover-header {
            background: #667eea !important;
            color: white !important;
            padding: 10px !important;
            border-radius: 8px 8px 0 0 !important;
        }
        
        /* HEADER BAR */
        .header-bar { 
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 15px;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 100;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        .btn-back {
            background: rgba(255,255,255,0.2);
            color: white;
            border: 1px solid rgba(255,255,255,0.3);
            padding: 8px 15px;
            border-radius: 8px;
            cursor: pointer;
        }
        
        /* VISTAS */
        .view-container {
            display: none;
            /*padding-top: 70px;*/
        }
        .view-container.active {
            display: block;
        }
        
        /* COMÚN */
        .search-box {
            background: white;
            border-radius: 15px;
            padding: 15px;
            /*margin: 15px;*/
            /*margin: 95px 15px 15px 15px;*/
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        .btn-view-toggle {
            background: rgba(255,255,255,0.2);
            color: white;
            border: 1px solid rgba(255,255,255,0.3);
            padding: 8px 15px;
            border-radius: 8px;
            margin-left: 10px;
        }
        .badge-cart {
            position: absolute;
            top: -5px;
            right: -5px;
            background: #ff4757;
            border-radius: 50%;
            padding: 4px 8px;
            font-size: 12px;
        }
        .cliente-bar {
            background: white;
            padding: 12px 15px;
            margin: 0 15px 15px;
            border-radius: 10px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        /* CATEGORÍAS */
        .category-selector {
            background: white;
            margin: 15px;
            padding: 15px;
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            cursor: pointer;
            transition: all 0.3s;
        }
        .category-display {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .category-icon {
            width: 45px;
            height: 45px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 20px;
            flex-shrink: 0;
        }
        .category-icon img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 10px;
        }
        .category-dropdown {
            background: white;
            margin: 0 15px 15px;
            border-radius: 12px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.15);
            max-height: 400px;
            overflow: hidden;
        }
        .category-list {
            max-height: 340px;
            overflow-y: auto;
        }
        .category-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 15px;
            cursor: pointer;
            transition: background 0.2s;
            border-bottom: 1px solid #f0f2f5;
        }
        .category-item:hover {
            background: #f8f9fa;
        }
        .category-item.active {
            background: #e8eaf6;
        }
        
        /* PRODUCTOS */
        .products-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 15px;
            padding: 15px;
        }
        .product-card {
            background: white;
            border-radius: 12px;
            padding: 12px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        }
        .product-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.15);
        }
        .product-img {
            width: 100%;
            height: 100px;
            object-fit: cover;
            border-radius: 8px;
            margin-bottom: 8px;
            background: #f0f2f5;
        }
        
        /* DOCUMENTOS */
        .document-list {
            padding: 15px;
        }
        .document-item {
            background: white;
            border-radius: 12px;
            padding: 15px;
            margin-bottom: 15px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            transition: all 0.3s;
        }
        .document-item:hover {
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }
        .document-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 10px;
        }
        .document-actions {
            display: flex;
            gap: 5px;
        }
        .doc-check {
            width: 18px;
            height: 18px;
            cursor: pointer;
        }
        
        /* CIERRE DE CAJA */
        .caja-summary {
            background: white;
            border-radius: 15px;
            padding: 20px;
            margin: 15px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        .summary-row {
            display: flex;
            justify-content: space-between;
            padding: 10px 0;
            border-bottom: 1px solid #f0f2f5;
        }
        .summary-total {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-radius: 10px;
            padding: 20px;
            margin-top: 20px;
            text-align: center;
        }
        
        /* PANELES */
        .slide-panel {
            position: fixed;
            top: 0;
            right: -100%;
            width: 100%;
            max-width: 500px;
            height: 100%;
            background: white;
            box-shadow: none; /* Sin sombra cuando está oculto */
            z-index: 200;
            overflow-y: auto;
            transition: right 0.3s ease, box-shadow 0.3s ease;
        }
        .slide-panel.active {
            right: 0;
            box-shadow: -5px 0 15px rgba(0,0,0,0.3); /* Sombra solo cuando está visible */
        }
        .bottom-panel {
            position: fixed;
            bottom: -100%;
            left: 0;
            right: 0;
            background: white;
            border-radius: 20px 20px 0 0;
            box-shadow: 0 -5px 15px rgba(0,0,0,0.3);
            z-index: 200;
            max-height: 80vh;
            overflow-y: auto;
            transition: bottom 0.3s ease;
        }
        .bottom-panel.active {
            bottom: 0;
        }
        .panel-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px;
            position: sticky;
            top: 0;
            z-index: 10;
        }
        .panel-content {
            padding: 20px;
        }
        .panel-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.5);
            z-index: 199;
            display: none;
        }
        
        /* FOOTER PWA */
        .dashboard-footer {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 15px 20px;
            text-align: center;
            margin-top: 30px;
            border-radius: 15px 15px 0 0;
            box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        }
        .btn-instalar-pwa {
            background: white;
            color: #667eea;
            border: none;
            padding: 10px 20px;
            border-radius: 25px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        }
        .btn-instalar-pwa:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
            background: #f8f9fa;
        }
        .btn-instalar-pwa:active {
            transform: translateY(0);
        }
        .btn-instalar-pwa i {
            font-size: 18px;
        }
        
        /* FORMULARIOS */
        .form-group-custom {
            margin-bottom: 20px;
        }
        .form-group-custom label {
            display: block;
            margin-bottom: 5px;
            font-weight: 600;
            color: #333;
        }
        .form-control-custom {
            width: 100%;
            padding: 12px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            font-size: 16px;
            transition: border-color 0.3s;
        }
        .form-control-custom:focus {
            outline: none;
            border-color: #667eea;
        }
        .btn-primary-custom {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 12px 20px;
            border-radius: 8px;
            font-weight: 600;
            width: 100%;
            cursor: pointer;
        }
        .btn-secondary-custom {
            background: #6c757d;
            color: white;
            border: none;
            padding: 12px 20px;
            border-radius: 8px;
            font-weight: 600;
            width: 100%;
            cursor: pointer;
            margin-top: 10px;
        }
        
        /* TOTAL BAR */
        .cart-total-bar {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            padding: 15px;
            box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
            z-index: 50;
        }
        
        /* FILTROS FECHA */
        .date-filters {
            background: white;
            padding: 15px;
            margin: 15px;
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        }
        
        /* TABLA PRODUCTOS */
        .products-table {
            background: white;
            border-radius: 12px;
            margin: 15px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        }
        .table-responsive {
            overflow-x: auto;
        }

        /* ========================================
           HISTORIA CLÍNICA STYLES
           ======================================== */

        /* Botones de acción en el header */
        .hc-action-buttons {
            display: flex;
            gap: 8px;
        }

        .btn-hc-action {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            border-radius: 8px;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
        }

        .btn-hc-action:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
        }

        .btn-hc-action:active:not(:disabled) {
            transform: translateY(0);
        }

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

        .btn-hc-delete {
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
        }

        .btn-hc-delete:hover:not(:disabled) {
            box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
        }

        /* Lista de pacientes */
        .pacientes-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .paciente-item {
            background: white;
            border-radius: 12px;
            padding: 15px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            cursor: pointer;
            transition: all 0.3s ease;
            border: 2px solid transparent;
        }

        .paciente-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.12);
            border-color: #667eea;
        }

        .paciente-item.selected {
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
            border-color: #667eea;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
        }

        .paciente-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }

        .paciente-nombre {
            font-weight: 600;
            font-size: 16px;
            color: #333;
        }

        .paciente-dni {
            font-size: 14px;
            color: #667eea;
            font-weight: 500;
        }

        .paciente-info {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            font-size: 13px;
            color: #666;
        }

        .paciente-info-item {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .paciente-info-item i {
            color: #667eea;
            width: 16px;
        }

        /* Secciones del formulario */
        .section-title {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 10px 15px;
            border-radius: 8px;
            font-weight: 600;
            font-size: 14px;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .section-title i {
            font-size: 16px;
        }

        /* Ajustes de formulario */
        #formHistoriaClinica .form-label {
            font-weight: 500;
            font-size: 13px;
            color: #555;
            margin-bottom: 5px;
        }

        #formHistoriaClinica .form-control,
        #formHistoriaClinica .form-select {
            border-radius: 8px;
            border: 1px solid #e0e0e0;
            padding: 10px 12px;
            font-size: 14px;
            transition: all 0.3s ease;
        }

        #formHistoriaClinica .form-control:focus,
        #formHistoriaClinica .form-select:focus {
            border-color: #667eea;
            box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
        }

        #formHistoriaClinica textarea.form-control {
            resize: vertical;
            min-height: 60px;
        }

        /* ========================================
           FICHA MÉDICA STYLES
           ======================================== */

        .ficha-section {
            background: #f8f9fa;
            padding: 15px;
            border-radius: 8px;
            border-left: 3px solid #667eea;
        }

        .ficha-label {
            font-size: 12px;
            font-weight: 600;
            color: #667eea;
            text-transform: uppercase;
            margin-bottom: 5px;
            display: block;
        }

        .ficha-value {
            font-size: 14px;
            color: #333;
            margin: 0;
            padding: 8px;
            background: white;
            border-radius: 6px;
            min-height: 40px;
        }

        .paciente-selected-header {
            display: flex;
            justify-content: space-between;
            align-items: start;
        }

        .paciente-selected-info {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            margin-top: 8px;
            font-size: 14px;
            color: #666;
        }

        .paciente-selected-info span {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .paciente-selected-info i {
            color: #667eea;
        }

        .paciente-clinicos {
            margin-top: 10px;
        }

        .paciente-clinicos .badge {
            margin-right: 5px;
        }

        /* ========================================
           CITAS STYLES
           ======================================== */

        /* Lista de citas */
        .citas-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .cita-item {
            background: white;
            border-radius: 12px;
            padding: 15px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            cursor: pointer;
            transition: all 0.3s ease;
            border-left: 4px solid #667eea;
        }

        .cita-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.12);
        }

        .cita-item.selected {
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
            border-left-color: #764ba2;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
        }

        .cita-item.estado-pendiente {
            border-left-color: #f39c12;
        }

        .cita-item.estado-confirmada {
            border-left-color: #10ac84;
        }

        .cita-item.estado-atendida {
            border-left-color: #667eea;
        }

        .cita-item.estado-cancelada {
            border-left-color: #ee5a6f;
            opacity: 0.7;
        }

        .cita-header {
            display: flex;
            justify-content: space-between;
            align-items: start;
            margin-bottom: 10px;
        }

        .cita-paciente {
            font-weight: 600;
            font-size: 16px;
            color: #333;
        }

        .cita-estado {
            font-size: 12px;
            padding: 4px 10px;
            border-radius: 12px;
            font-weight: 500;
        }

        .cita-estado.pendiente {
            background: #fff3cd;
            color: #856404;
        }

        .cita-estado.confirmada {
            background: #d4edda;
            color: #155724;
        }

        .cita-estado.atendida {
            background: #d1ecf1;
            color: #0c5460;
        }

        .cita-estado.cancelada {
            background: #f8d7da;
            color: #721c24;
        }

        .cita-info {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            font-size: 13px;
            color: #666;
            margin-top: 8px;
        }

        .cita-info-item {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .cita-info-item i {
            color: #667eea;
            width: 16px;
        }

        .cita-motivo {
            margin-top: 8px;
            padding: 8px;
            background: #f8f9fa;
            border-radius: 6px;
            font-size: 13px;
            color: #555;
        }

        /* ========================================
           AGENDA/CALENDARIO STYLES
           ======================================== */

        #calendarioAgenda {
            background: white;
            border-radius: 10px;
            padding: 10px;
        }

        /* Estilos para eventos en la lista de hoy */
        .evento-hoy-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px;
            border-radius: 8px;
            background: #f8f9fa;
            margin-bottom: 10px;
            transition: all 0.3s ease;
        }

        .evento-hoy-item:hover {
            background: #e9ecef;
            transform: translateX(5px);
        }

        .evento-hora-badge {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 8px 12px;
            border-radius: 8px;
            font-weight: 600;
            font-size: 14px;
            min-width: 80px;
            text-align: center;
        }

        .evento-detalles {
            flex: 1;
        }

        .evento-titulo {
            font-weight: 600;
            font-size: 15px;
            color: #333;
            margin-bottom: 4px;
        }

        .evento-descripcion {
            font-size: 13px;
            color: #666;
        }

        .evento-tipo-badge {
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 500;
        }

        .evento-tipo-cita {
            background: #d1ecf1;
            color: #0c5460;
        }

        .evento-tipo-reunion {
            background: #fff3cd;
            color: #856404;
        }

        .evento-tipo-recordatorio {
            background: #f8d7da;
            color: #721c24;
        }

        .evento-tipo-cumpleanos {
            background: #f5c6cb;
            color: #721c24;
        }

        .evento-tipo-festivo {
            background: #d4edda;
            color: #155724;
        }

        .evento-tipo-otros {
            background: #e2e3e5;
            color: #383d41;
        }

        /* Ajustes para el formulario de eventos */
        #formEvento .form-label {
            font-weight: 500;
            font-size: 13px;
            color: #555;
            margin-bottom: 5px;
        }

        #formEvento .form-control,
        #formEvento .form-select {
            border-radius: 8px;
            border: 1px solid #e0e0e0;
            padding: 10px 12px;
            font-size: 14px;
            transition: all 0.3s ease;
        }

        #formEvento .form-control:focus,
        #formEvento .form-select:focus {
            border-color: #667eea;
            box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
        }

        /* Ajustes para el formulario de citas */
        #formCita .form-label {
            font-weight: 500;
            font-size: 13px;
            color: #555;
            margin-bottom: 5px;
        }

        #formCita .form-control,
        #formCita .form-select {
            border-radius: 8px;
            border: 1px solid #e0e0e0;
            padding: 10px 12px;
            font-size: 14px;
            transition: all 0.3s ease;
        }

        #formCita .form-control:focus,
        #formCita .form-select:focus {
            border-color: #667eea;
            box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
        }

        /* CONTROLES DE CANTIDAD */
        .cantidad-controls {
            display: grid;
            grid-template-columns: 60px 1fr 60px;
            gap: 10px;
            align-items: center;
        }
        .btn-cantidad {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            border-radius: 8px;
            padding: 12px;
            font-size: 20px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .btn-cantidad:active {
            transform: scale(0.9);
        }
        .quick-quantity {
            display: flex;
            gap: 8px;
            justify-content: center;
        }
        .quick-quantity button {
            flex: 1;
        }
        
        .input-group-text {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            font-weight: 600;
        }
        
        .input-group .form-control {
            border: 2px solid #e0e0e0;
            border-left: none;
            font-size: 18px;
            font-weight: 600;
        }
        
        .input-group .form-control:focus {
            border-color: #667eea;
            box-shadow: none;
        }
        
        #cantidadCalculada {
            display: none;
            margin-top: 8px;
            padding: 8px;
            background: #e8f5e9;
            border-radius: 6px;
            color: #2e7d32;
            font-size: 14px;
        }
        
        #cantidadCalculada:not(:empty) {
            display: block;
        }
        
        #productoCantidad {
            font-weight: 600;
            font-size: 20px;
            color: #667eea;
        }
        
        #productoMonto {
            font-weight: 600;
            font-size: 18px;
            color: #10ac84;
        }
        
        #productoMonto::placeholder {
            color: #95a5a6;
            font-size: 14px;
            font-weight: normal;
        }
        
        .cangrejo-box {
            background: linear-gradient(135deg, rgba(16, 172, 132, 0.1) 0%, rgba(16, 172, 132, 0.05) 100%);
            padding: 15px;
            border-radius: 12px;
            border: 2px dashed #10ac84;
        }
        
        .cangrejo-box label {
            color: #10ac84;
        }
        
        .oculto-forzado {
            display: none !important;
        }
        
        .preview-imagen-container {
            position: relative;
            display: inline-block;
            margin-top: 10px;
        }
        
        .preview-imagen-container img {
            max-width: 100%;
            max-height: 200px;
            border-radius: 8px;
            border: 2px solid #e0e0e0;
            display: block;
        }
        
        .btn-eliminar-preview {
            position: absolute;
            top: -8px;
            right: -8px;
            width: 30px;
            height: 30px;
            background: #ff4757;
            color: white;
            border: 2px solid white;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            font-weight: bold;
            box-shadow: 0 2px 8px rgba(0,0,0,0.3);
            transition: all 0.3s;
        }
        
        .btn-eliminar-preview:hover {
            background: #ee5a6f;
            transform: scale(1.1);
        }
        
        .btn-eliminar-preview:active {
            transform: scale(0.95);
        }


                                                
        #reporte_cierre * { box-sizing: border-box; }
        #reporte_cierre {
        font-family: Arial, sans-serif;
        font-size: 10pt !important;
        margin: 0;
        padding: 20px;
        color: #000;
        }
        #reporte_cierre .container { max-width: 800px; margin: auto; }
        #reporte_cierre h2, #reporte_cierre h3 { text-align: center; margin: 5px 0; }
        #reporte_cierre table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 15px;
        }
        #reporte_cierre th, #reporte_cierre td {
        border: 1px solid #000;
        padding: 4px 6px;
        text-align: left;
        font-size: 9pt;
        }
        #reporte_cierre th { background-color: #f0f0f0; }
        #reporte_cierre .no-border td {
        border: none;
        padding: 2px 0;
        }
        #reporte_cierre .signature {
        display: flex;
        justify-content: space-between;
        margin-top: 40px;
        }
        #reporte_cierre .signature div {
        width: 45%;
        text-align: center;
        }
        #reporte_cierre .signature div hr { margin-top: 50px; }

        @media print {
            #reporte_cierre {
                margin: 0;
                padding: 0;
            }
            #reporte_cierre .container {
                width: 100%;
                padding: 0;
                margin: 0;
            }
            @page {
                size: auto;
                margin: 10mm;
            }
        }
        
        /* ========================================
           RESPONSIVE DESIGN - MOBILE FIRST
           ======================================== */
        
        /* Tablets y pantallas medianas (hasta 768px) */
        @media (max-width: 768px) {
            
            /* ===== ACCORDION CONSULTAS MÉDICAS - TABLETS ===== */
            #accordionConsulta .accordion-button {
                padding: 14px 12px !important;
                font-size: 15px !important;
            }
            
            #accordionConsulta .accordion-body {
                padding: 15px 12px !important;
            }
            
            #accordionConsulta .col-md-3,
            #accordionConsulta .col-md-4,
            #accordionConsulta .col-md-6 {
                padding-left: 8px !important;
                padding-right: 8px !important;
            }
            
            #formularioConsultaContainer {
                padding: 15px 12px !important;
            }
            
            .dashboard-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 15px;
                padding: 15px;
            }

            .products-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 12px;
                padding: 12px;
            }

            /* Calendario responsive en tablets/móviles */
            .dashboard-card-calendario {
                grid-column: span 2 !important; /* Ocupa todo el ancho */
                padding: 12px !important;
            }

            #calendar {
                padding: 5px !important;
            }

            /* Ajustes del toolbar en móvil */
            #calendar .fc-header-toolbar {
                padding: 8px !important;
                gap: 8px !important;
            }

            #calendar .fc-toolbar-title {
                font-size: 14px !important;
                margin: 0 5px !important;
            }

            #calendar .fc-button {
                padding: 6px 10px !important;
                font-size: 11px !important;
            }

            /* Encabezados de días más pequeños */
            #calendar .fc-col-header-cell {
                padding: 6px 2px !important;
                font-size: 11px !important;
            }

            /* Números de día más compactos */
            #calendar .fc-daygrid-day-number {
                padding: 4px !important;
                font-size: 11px !important;
            }

            #calendar .fc-day-today .fc-daygrid-day-number {
                width: 22px !important;
                height: 22px !important;
            }

            /* Eventos más pequeños en móvil */
            #calendar .fc-event {
                padding: 2px 4px !important;
                font-size: 9px !important;
                margin-bottom: 1px !important;
            }

            #calendar .fc-event-title {
                -webkit-line-clamp: 1 !important; /* Solo 1 línea en móvil */
                line-clamp: 1 !important;
            }

            #calendar .fc-more-link {
                font-size: 9px !important;
                padding: 1px 4px !important;
            }

            /* Ajustar altura de celdas en móvil */
            #calendar .fc-daygrid-day-frame {
                min-height: 40px !important;
            }
        }
        
        /* Móviles (hasta 576px) */
        @media (max-width: 576px) {
            
            /* ===== ACCORDION CONSULTAS MÉDICAS - RESPONSIVE ===== */
            /* Reducir padding del accordion en móviles */
            #accordionConsulta .accordion-button {
                padding: 12px 10px !important;
                font-size: 14px !important;
            }
            
            #accordionConsulta .accordion-button i {
                font-size: 14px !important;
                margin-right: 8px !important;
            }
            
            #accordionConsulta .accordion-body {
                padding: 15px 12px !important;
            }
            
            /* Reducir padding de los campos del formulario */
            #accordionConsulta .form-label {
                font-size: 13px !important;
                margin-bottom: 4px !important;
            }
            
            #accordionConsulta .form-control,
            #accordionConsulta .form-select {
                padding: 8px 10px !important;
                font-size: 14px !important;
            }
            
            #accordionConsulta textarea.form-control {
                padding: 10px !important;
            }
            
            #accordionConsulta .form-control small,
            #accordionConsulta small.text-muted {
                font-size: 11px !important;
            }
            
            /* Reducir márgenes entre campos */
            #accordionConsulta .row {
                margin-bottom: 8px !important;
            }
            
            #accordionConsulta .col-12,
            #accordionConsulta .col-md-3,
            #accordionConsulta .col-md-4,
            #accordionConsulta .col-md-6 {
                margin-bottom: 8px !important;
                padding-left: 5px !important;
                padding-right: 5px !important;
            }
            
            /* Card de archivos adjuntos más compacto */
            #accordionConsulta .card {
                margin-bottom: 8px !important;
            }
            
            #accordionConsulta .card-body {
                padding: 10px 8px !important;
            }
            
            #accordionConsulta .alert {
                padding: 8px 10px !important;
                font-size: 11px !important;
                margin-bottom: 10px !important;
            }
            
            /* Botones más compactos */
            #formularioConsultaContainer .btn {
                padding: 8px 12px !important;
                font-size: 13px !important;
            }
            
            /* Reducir espaciado del contenedor principal */
            #datosConsultaContainer {
                padding: 0 !important;
            }
            
            #formularioConsultaContainer {
                padding: 10px !important;
            }
            
            #formularioConsultaContainer .card-body {
                padding: 12px 8px !important;
            }
            
            /* ===== HEADER BAR ===== */
            .header-bar {
                padding: 8px 10px !important;
                height: 60px !important;
            }
            
            .btn-back {
                padding: 8px 12px !important;
                font-size: 13px !important;
                min-width: auto !important;
            }
            
            .btn-back i {
                margin-right: 4px !important;
            }
            
            #pedidoTitle {
                font-size: 13px !important;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                max-width: 140px !important;
            }
            
            .btn-view-toggle {
                width: 36px !important;
                height: 36px !important;
                padding: 0 !important;
                font-size: 15px !important;
                margin-left: 4px !important;
            }
            
            .badge-cart {
                min-width: 16px !important;
                height: 16px !important;
                font-size: 10px !important;
                line-height: 16px !important;
                top: -4px !important;
                right: -4px !important;
            }
            
            .btn-logout {
                width: 36px !important;
                height: 36px !important;
                font-size: 15px !important;
            }
            
            /* ===== DASHBOARD ===== */
            .dashboard-header {
                padding: 15px !important;
            }
            
            .dashboard-header h2 {
                font-size: 20px !important;
            }
            
            .dashboard-header p {
                font-size: 12px !important;
            }
            
            .user-info {
                flex-direction: row !important;
                gap: 8px !important;
            }
            
            .user-details {
                /*display: none !important;*/ /* Ocultar detalles en móvil */
            }
            
            .user-avatar {
                width: 36px !important;
                height: 36px !important;
                font-size: 16px !important;
            }
            
            .dashboard-grid {
                grid-template-columns: repeat(2, 1fr) !important;
                gap: 12px !important;
                padding: 12px !important;
            }
            
            .dashboard-card {
                padding: 20px 15px !important;
            }
            
            .dashboard-icon {
                font-size: 32px !important;
                margin-bottom: 10px !important;
            }
            
            .dashboard-title {
                font-size: 14px !important;
            }
            
            .dashboard-desc {
                font-size: 11px !important;
            }
            
            /* ===== PRODUCTOS GRID ===== */
            .products-grid {
                grid-template-columns: repeat(2, 1fr) !important;
                gap: 10px !important;
                padding: 10px !important;
            }
            
            .product-card {
                padding: 10px !important;
                border-radius: 10px !important;
            }
            
            .product-img {
                height: 100px !important;
                border-radius: 8px !important;
            }
            
            .product-card div:nth-child(2) {
                font-size: 13px !important;
                margin-bottom: 4px !important;
            }
            
            .product-card div:nth-child(3) {
                font-size: 15px !important;
            }
            
            .product-card div:nth-child(4) {
                font-size: 11px !important;
            }
            
            /* ===== CATEGORY SELECTOR ===== */
            .category-selector {
                margin: 0 12px 12px 12px !important;
            }
            
            .category-display {
                padding: 10px 12px !important;
            }
            
            .category-icon {
                width: 35px !important;
                height: 35px !important;
            }
            
            .category-text small {
                font-size: 10px !important;
            }
            
            .category-text strong {
                font-size: 13px !important;
            }
            
            /* ===== SEARCH BOX ===== */
            .search-box {
                /*padding: 0 12px !important;*/
                margin-bottom: 12px !important;
            }
            
            .search-box input {
                font-size: 14px !important;
                padding: 10px 12px !important;
            }
            
            .search-box button {
                padding: 10px !important;
                font-size: 14px !important;
            }
            
            /* ===== CLIENTE BAR ===== */
            .cliente-bar {
                margin: 0 12px 12px 12px !important;
                padding: 10px !important;
            }
            
            .cliente-nombre {
                font-size: 13px !important;
            }
            
            .cliente-doc {
                font-size: 11px !important;
            }
            
            /* ===== CART TOTAL BAR ===== */
            .cart-total-bar {
                padding: 12px 15px !important;
            }
            
            .cart-total-bar small {
                font-size: 11px !important;
            }
            
            .cart-total-bar h4 {
                font-size: 22px !important;
            }
            
            .cart-total-bar .btn {
                padding: 10px 20px !important;
                font-size: 15px !important;
            }
            
            /* ===== PANELES LATERALES ===== */
            .slide-panel {
                width: 100% !important;
                max-width: 100% !important;
            }
            
            .bottom-panel {
                height: 90vh !important;
                max-height: 90vh !important;
            }
            
            .panel-header {
                padding: 12px 15px !important;
            }
            
            .panel-header h5 {
                font-size: 16px !important;
            }
            
            .panel-content {
                padding: 15px !important;
            }
            
            /* ===== FORMULARIOS ===== */
            .form-group-custom {
                margin-bottom: 15px !important;
            }
            
            .form-group-custom label {
                font-size: 13px !important;
                margin-bottom: 6px !important;
            }
            
            .form-control-custom,
            .form-control {
                font-size: 14px !important;
                padding: 10px 12px !important;
            }
            
            /* ===== BOTONES ===== */
            .btn-primary-custom,
            .btn-secondary-custom {
                padding: 12px 15px !important;
                font-size: 14px !important;
                min-height: 44px !important; /* Tamaño táctil recomendado */
            }
            
            .btn-sm {
                padding: 6px 10px !important;
                font-size: 12px !important;
                min-height: 32px !important;
            }
            
            /* ===== CONTROLES DE CANTIDAD ===== */
            .cantidad-controls {
                gap: 8px !important;
            }
            
            .btn-cantidad {
                width: 44px !important;
                height: 44px !important;
                font-size: 18px !important;
                min-width: 44px !important; /* Táctil */
            }
            
            .cantidad-controls input {
                font-size: 16px !important;
                padding: 8px !important;
            }
            
            #simboloDescuento {
                padding: 10px !important;
                font-size: 16px !important;
            }
            
            /* ===== QUICK QUANTITY ===== */
            .quick-quantity button {
                padding: 8px 12px !important;
                font-size: 13px !important;
                min-height: 36px !important;
            }
            
            /* ===== ALERTS Y DIVS INFO ===== */
            .alert {
                padding: 10px 12px !important;
                font-size: 13px !important;
            }
            
            .cangrejo-box {
                padding: 12px !important;
            }
            
            .cangrejo-box label {
                font-size: 13px !important;
            }
            
            .cangrejo-box small {
                font-size: 11px !important;
            }
            
            /* ===== CARRITO ITEMS ===== */
            .cart-item {
                padding: 12px !important;
                margin-bottom: 10px !important;
            }
            
            .cart-item-name {
                font-size: 13px !important;
            }
            
            .cart-item-price {
                font-size: 12px !important;
            }
            
            .cart-item-qty {
                font-size: 11px !important;
            }
            
            .btn-action {
                width: 32px !important;
                height: 32px !important;
                font-size: 13px !important;
            }
            
            /* ===== DOCUMENTOS ===== */
            .date-filters {
                padding: 12px !important;
            }
            
            .date-filters label {
                font-size: 12px !important;
            }
            
            .date-filters input,
            .date-filters button {
                font-size: 13px !important;
            }
            
            .document-item {
                padding: 12px !important;
                margin-bottom: 10px !important;
            }
            
            .document-item h6 {
                font-size: 14px !important;
            }
            
            .document-item small {
                font-size: 11px !important;
            }
            
            /* ===== PRODUCTOS TABLE ===== */
            .products-table {
                font-size: 13px !important;
            }

            .products-table th,
            .products-table td {
                padding: 8px 6px !important;
                font-size: 12px !important;
            }

            /* ===== HISTORIA CLÍNICA RESPONSIVE ===== */
            .hc-action-buttons {
                gap: 6px !important;
            }

            .btn-hc-action {
                width: 36px !important;
                height: 36px !important;
                font-size: 14px !important;
            }

            .paciente-item {
                padding: 12px !important;
            }

            .paciente-nombre {
                font-size: 14px !important;
            }

            .paciente-dni {
                font-size: 12px !important;
            }

            .paciente-info {
                gap: 10px !important;
                font-size: 12px !important;
            }

            .section-title {
                font-size: 13px !important;
                padding: 8px 12px !important;
            }

            #formHistoriaClinica .form-label {
                font-size: 12px !important;
            }

            #formHistoriaClinica .form-control,
            #formHistoriaClinica .form-select {
                font-size: 13px !important;
                padding: 8px 10px !important;
            }

            /* ===== FICHA MÉDICA RESPONSIVE ===== */
            .ficha-section {
                padding: 10px !important;
            }

            .ficha-label {
                font-size: 11px !important;
            }

            .ficha-value {
                font-size: 13px !important;
                padding: 6px !important;
                min-height: 35px !important;
            }

            .paciente-selected-header h5 {
                font-size: 15px !important;
            }

            .paciente-selected-info {
                gap: 10px !important;
                font-size: 12px !important;
            }

            .paciente-clinicos .badge {
                font-size: 11px !important;
                padding: 4px 8px !important;
            }

            #fichaMedicaView .section-title {
                font-size: 13px !important;
                padding: 8px 12px !important;
            }

            #fichaMedicaView .form-label {
                font-size: 12px !important;
            }

            #fichaMedicaView .form-control,
            #fichaMedicaView .form-select {
                font-size: 13px !important;
                padding: 8px 10px !important;
            }

            #fichaMedicaView .col-md-3,
            #fichaMedicaView .col-md-4,
            #formHistoriaClinica .col-md-6 {
                margin-bottom: 15px !important;
            }

            #formHistoriaClinica .btn {
                font-size: 13px !important;
                padding: 8px 16px !important;
            }

            #formHistoriaClinica textarea.form-control {
                min-height: 80px !important;
            }

            /* ===== CITAS RESPONSIVE ===== */
            .cita-item {
                padding: 12px !important;
            }

            .cita-paciente {
                font-size: 14px !important;
            }

            .cita-estado {
                font-size: 11px !important;
                padding: 3px 8px !important;
            }

            .cita-info {
                gap: 10px !important;
                font-size: 12px !important;
            }

            .cita-motivo {
                font-size: 12px !important;
                padding: 6px !important;
            }

            #formCita .form-label {
                font-size: 12px !important;
            }

            #formCita .form-control,
            #formCita .form-select {
                font-size: 13px !important;
                padding: 8px 10px !important;
            }

            #formCita .col-md-3,
            #formCita .col-md-4,
            #formCita .col-md-6,
            #formCita .col-md-8 {
                margin-bottom: 15px !important;
            }

            #formCita .btn {
                font-size: 13px !important;
                padding: 8px 16px !important;
            }

            #formCita textarea.form-control {
                min-height: 70px !important;
            }

            /* ===== AGENDA RESPONSIVE ===== */
            #calendarioAgenda {
                padding: 5px !important;
            }

            .evento-hoy-item {
                padding: 10px !important;
                gap: 10px !important;
            }

            .evento-hora-badge {
                min-width: 70px !important;
                font-size: 12px !important;
                padding: 6px 10px !important;
            }

            .evento-titulo {
                font-size: 14px !important;
            }

            .evento-descripcion {
                font-size: 12px !important;
            }

            .evento-tipo-badge {
                font-size: 10px !important;
                padding: 3px 8px !important;
            }

            #formEvento .form-label {
                font-size: 12px !important;
            }

            #formEvento .form-control,
            #formEvento .form-select {
                font-size: 13px !important;
                padding: 8px 10px !important;
            }

            #formEvento .col-md-4,
            #formEvento .col-md-6,
            #formEvento .col-md-8 {
                margin-bottom: 15px !important;
            }

            #formEvento .btn {
                font-size: 13px !important;
                padding: 8px 16px !important;
            }

            #formEvento textarea.form-control {
                min-height: 70px !important;
            }

            /* ===== CATEGORY DROPDOWN ===== */
            .category-dropdown {
                max-height: 60vh !important;
            }
            
            .category-item {
                padding: 10px 12px !important;
            }
            
            .category-item > div:first-child {
                width: 40px !important;
                height: 40px !important;
            }
            
            .category-item i {
                font-size: 20px !important;
            }
            
            .category-item div > div:first-child {
                font-size: 13px !important;
            }
            
            .category-item div > div:last-child {
                font-size: 11px !important;
            }
            
            /* ===== SUGGESTIONS BOX ===== */
            #suggestionsBox {
                max-height: 250px !important;
                font-size: 13px !important;
            }
            
            .suggestion-item-api {
                padding: 10px !important;
            }
            
            /* ===== MODAL TIENDA ===== */
            .tienda-item {
                padding: 12px !important;
                font-size: 14px !important;
            }
            
            /* ===== PREVIEW IMAGEN ===== */
            .preview-imagen-container {
                max-width: 200px !important;
                max-height: 200px !important;
            }
            
            .preview-imagen-container img {
                max-height: 200px !important;
            }
            
            /* ===== CAJA VIEW ===== */
            #cajaView .card {
                margin-bottom: 15px !important;
            }
            
            #cajaView .card-body {
                padding: 12px !important;
            }
            
            #cajaView h6 {
                font-size: 14px !important;
            }
            
            #cajaView label {
                font-size: 12px !important;
            }
            
            #cajaView button {
                padding: 10px !important;
                font-size: 14px !important;
            }
            
            /* ===== REPORTE CIERRE ===== */
            #reporte_cierre {
                font-size: 12px !important;
            }
            
            #reporte_cierre h2 {
                font-size: 18px !important;
            }
            
            #reporte_cierre h3 {
                font-size: 15px !important;
            }
            
            #reporte_cierre table {
                font-size: 11px !important;
            }
            
            #reporte_cierre th,
            #reporte_cierre td {
                padding: 6px 4px !important;
            }
            
            /* ===== AJUSTES GENERALES ===== */
            body {
                font-size: 14px !important;
            }
            
            h1 { font-size: 24px !important; }
            h2 { font-size: 20px !important; }
            h3 { font-size: 18px !important; }
            h4 { font-size: 16px !important; }
            h5 { font-size: 14px !important; }
            h6 { font-size: 13px !important; }
            
            /* Margen superior para contenido debajo del header */
            #pedidoView > div:first-child,
            #documentosView > div:first-child,
            #productosView > div:first-child {
                /*margin-top: 60px !important;*/
            }
        }
        
        /* Móviles muy pequeños (hasta 375px) */
        @media (max-width: 375px) {
            #pedidoTitle {
                max-width: 100px !important;
                font-size: 12px !important;
            }
            
            .btn-view-toggle {
                width: 34px !important;
                height: 34px !important;
                font-size: 14px !important;
            }
            
            .dashboard-grid {
                grid-template-columns: 1fr !important;
            }
            
            .dashboard-card-calendario {
                grid-column: span 1 !important;
                padding: 12px !important;
            }
            
            /* 📅 CALENDARIO RESPONSIVE MÓVIL */
            #calendar {
                font-size: 11px !important;
                padding: 5px !important;
            }
            
            /* Toolbar responsive */
            #calendar .fc-header-toolbar {
                padding: 8px 5px !important;
                gap: 5px !important;
                flex-direction: column !important;
            }
            
            #calendar .fc-toolbar-chunk {
                width: 100% !important;
                justify-content: center !important;
                gap: 3px !important;
            }
            
            /* Botones más pequeños en móvil */
            #calendar .fc-button {
                padding: 6px 8px !important;
                font-size: 10px !important;
                border-radius: 4px !important;
            }
            
            /* Título del mes */
            #calendar .fc-toolbar-title {
                font-size: 15px !important;
                text-align: center !important;
                width: 100% !important;
                margin: 5px 0 !important;
            }
            
            /* Encabezados de días (L, M, X...) */
            #calendar .fc-col-header-cell {
                padding: 6px 2px !important;
                font-size: 10px !important;
            }
            
            /* Ocultar texto completo de días, mostrar solo inicial */
            #calendar .fc-col-header-cell-cushion {
                padding: 4px 2px !important;
            }
            
            /* Números de día */
            #calendar .fc-daygrid-day-number {
                padding: 4px !important;
                font-size: 11px !important;
            }
            
            /* Día de hoy */
            #calendar .fc-day-today .fc-daygrid-day-number {
                width: 24px !important;
                height: 24px !important;
                font-size: 10px !important;
            }
            
            /* Eventos en móvil */
            #calendar .fc-event {
                padding: 2px 4px !important;
                font-size: 9px !important;
                margin-bottom: 1px !important;
                line-height: 1.2 !important;
            }
            
            #calendar .fc-event-title {
                -webkit-line-clamp: 1 !important; /* Solo 1 línea en móvil */
            }
            
            #calendar .fc-event-time {
                font-size: 8px !important;
            }
            
            /* Link de +más eventos */
            #calendar .fc-more-link {
                font-size: 9px !important;
                padding: 1px 4px !important;
            }
            
            /* Reducir altura de celdas en móvil */
            #calendar .fc-daygrid-day-frame {
                min-height: 50px !important;
            }
            
            /* Popover en móvil */
            #calendar .fc-popover {
                max-width: 90vw !important;
            }
            
            .products-grid {
                grid-template-columns: 1fr !important;
            }
            
            .product-img {
                height: 120px !important;
            }
        }
                                                

