        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: #f5f7fa;
            color: #333;
        }

        .header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px 30px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .header-left h1 {
            font-size: 28px;
            margin-bottom: 5px;
        }

        .header-left p {
            opacity: 0.9;
            font-size: 14px;
        }

        .header-actions {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .header-btn {
            background: rgba(255, 255, 255, 0.2);
            color: white;
            border: 1px solid rgba(255, 255, 255, 0.3);
            padding: 10px 16px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .header-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
        }

        .sync-status {
            font-size: 11px;
            opacity: 0.8;
            margin-top: 3px;
        }

        /* Badge de notificación para nuevos reportes */
        .sync-badge {
            position: relative;
        }

        .sync-badge::after {
            content: attr(data-count);
            position: absolute;
            top: -8px;
            right: -8px;
            background: #ef4444;
            color: white;
            border-radius: 50%;
            width: 22px;
            height: 22px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            font-weight: 700;
            animation: pulse 2s infinite;
            border: 2px solid white;
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.1); }
        }

        .notification-badge {
            position: absolute;
            top: -8px;
            right: -8px;
            background: #ef4444;
            color: white;
            border-radius: 50%;
            width: 22px;
            height: 22px;
            font-size: 11px;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            animation: pulse 2s infinite;
            box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
        }

        .sync-notification {
            position: fixed;
            top: 80px;
            right: 20px;
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            color: white;
            padding: 20px 25px;
            border-radius: 12px;
            box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
            z-index: 10000;
            font-weight: 600;
            display: none;
            animation: slideInRight 0.3s ease;
        }

        @keyframes slideInRight {
            from {
                transform: translateX(400px);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        .container {
            display: flex;
            height: calc(100vh - 100px);
            padding: 20px;
            gap: 20px;
        }

        .sidebar {
            width: 350px;
            background: white;
            border-radius: 12px;
            padding: 20px;
            overflow-y: auto;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        }

        .sidebar h2 {
            font-size: 18px;
            margin-bottom: 15px;
            color: #667eea;
            border-bottom: 2px solid #667eea;
            padding-bottom: 10px;
        }

        /* Buscador de disponibilidad */
        .availability-search {
            background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
            border: 2px solid #667eea;
            border-radius: 12px;
            padding: 15px;
            margin-bottom: 20px;
        }

        .availability-search h3 {
            font-size: 14px;
            color: #667eea;
            margin-bottom: 10px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .date-input-wrapper {
            position: relative;
            margin-bottom: 10px;
        }

        .date-input-wrapper input[type="date"] {
            width: 100%;
            padding: 10px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            font-size: 14px;
            font-family: inherit;
            transition: all 0.3s;
        }

        .date-input-wrapper input[type="date"]:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        .search-legend {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            margin-top: 10px;
            font-size: 11px;
        }

        .search-legend-item {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .search-legend-dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
        }

        .search-legend-dot.available {
            background: #dc2626;
        }

        .search-legend-dot.occupied {
            background: #22c55e;
        }

        .search-legend-dot.pending {
            background: #f59e0b;
        }

        .search-legend-dot.blocked {
            background: #6b7280;
        }

        .clear-search-btn {
            width: 100%;
            padding: 8px;
            background: white;
            border: 2px solid #667eea;
            border-radius: 8px;
            color: #667eea;
            font-weight: 600;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.3s;
            margin-top: 8px;
        }

        .clear-search-btn:hover {
            background: #667eea;
            color: white;
        }

        .apartment-group {
            margin-bottom: 25px;
        }

        .apartment-group h3 {
            font-size: 14px;
            color: #666;
            margin-bottom: 10px;
            font-weight: 600;
        }

        .apartment-item {
            padding: 12px;
            margin-bottom: 8px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s;
            border: 2px solid #e0e0e0;
            background: #fafafa;
            position: relative;
        }

        .apartment-item:hover {
            transform: translateX(5px);
            border-color: #667eea;
            box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
        }

        .apartment-item.selected {
            background: #667eea;
            color: white;
            border-color: #667eea;
        }

        /* Estados de disponibilidad */
        .apartment-item.status-available {
            border-color: #dc2626;
            background: #fef2f2;
        }

        .apartment-item.status-available:hover {
            border-color: #dc2626;
            background: #fee2e2;
        }

        .apartment-item.status-occupied {
            border-color: #22c55e;
            background: #f0fdf4;
        }

        .apartment-item.status-occupied:hover {
            border-color: #22c55e;
            background: #dcfce7;
        }

        .apartment-item.status-pending {
            border-color: #f59e0b;
            background: #fffbeb;
        }

        .apartment-item.status-pending:hover {
            border-color: #f59e0b;
            background: #fef3c7;
        }

        .apartment-item.status-blocked {
            border-color: #6b7280;
            background: #f3f4f6;
        }

        .apartment-item.status-blocked:hover {
            border-color: #6b7280;
            background: #e5e7eb;
        }

        .apartment-item .apt-name {
            font-weight: 600;
            font-size: 15px;
        }

        .apartment-item .apt-info {
            font-size: 12px;
            opacity: 0.8;
            margin-top: 4px;
        }

        .apartment-item .apt-status {
            font-size: 11px;
            font-weight: 600;
            margin-top: 6px;
            padding: 4px 8px;
            border-radius: 4px;
            display: inline-block;
        }

        /* Rojo = Disponible para ocupar */
        .apartment-item.status-available .apt-status {
            background: #dc2626;
            color: white;
        }

        /* Verde = Ocupado/Confirmado */
        .apartment-item.status-occupied .apt-status {
            background: #22c55e;
            color: white;
        }

        /* Amarillo = Pendiente de pago */
        .apartment-item.status-pending .apt-status {
            background: #f59e0b;
            color: white;
        }

        /* Gris = Bloqueado por mantenimiento */
        .apartment-item.status-blocked .apt-status {
            background: #6b7280;
            color: white;
        }

        .main-content {
            flex: 1;
            background: white;
            border-radius: 12px;
            padding: 25px;
            overflow-y: auto;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        }

        .tabs {
            display: flex;
            gap: 6px;
            margin-bottom: 25px;
            border-bottom: 2px solid #e0e0e0;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: thin;
            scrollbar-color: #c4b5fd #f3f4f6;
            padding-bottom: 2px;
            position: relative;
        }

        .tabs::-webkit-scrollbar {
            height: 6px;
        }

        .tabs::-webkit-scrollbar-track {
            background: #f3f4f6;
            border-radius: 3px;
        }

        .tabs::-webkit-scrollbar-thumb {
            background: linear-gradient(135deg, #667eea, #764ba2);
            border-radius: 3px;
        }

        .tabs::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(135deg, #5a6fd6, #6a4199);
        }

        .tabs-wrapper {
            position: relative;
        }

        .tabs-scroll-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-60%);
            z-index: 10;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            border: 2px solid #e5e7eb;
            background: white;
            color: #667eea;
            font-size: 14px;
            font-weight: 700;
            cursor: pointer;
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            opacity: 0;
            pointer-events: none;
        }

        .tabs-scroll-btn:hover {
            background: #667eea;
            color: white;
            border-color: #667eea;
        }

        .tabs-scroll-btn.visible {
            opacity: 1;
            pointer-events: auto;
        }

        .tabs-scroll-left {
            left: -8px;
        }

        .tabs-scroll-right {
            right: -8px;
        }

        .tab {
            padding: 10px 16px;
            cursor: pointer;
            border: none;
            background: none;
            font-size: 14px;
            font-weight: 500;
            color: #666;
            border-bottom: 3px solid transparent;
            transition: all 0.3s;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .tab:hover {
            color: #667eea;
        }

        .tab.active {
            color: #667eea;
            border-bottom-color: #667eea;
        }

        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
        }

        .calendar-container {
            margin-top: 20px;
        }

        .calendar-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .calendar-header h3 {
            font-size: 20px;
            color: #333;
        }

        .calendar-nav {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .calendar-nav button {
            padding: 8px 16px;
            border: none;
            background: #667eea;
            color: white;
            border-radius: 6px;
            cursor: pointer;
            font-weight: 500;
            transition: background 0.3s;
        }

        .calendar-nav button:hover {
            background: #5568d3;
        }

        .calendar-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 8px;
            margin-top: 15px;
        }

        .calendar-day-header {
            text-align: center;
            font-weight: 600;
            padding: 10px;
            background: #f5f7fa;
            border-radius: 6px;
            font-size: 13px;
            color: #666;
        }

        .calendar-day {
            aspect-ratio: 1;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            padding: 8px;
            cursor: pointer;
            transition: all 0.3s;
            position: relative;
            background: white;
            display: flex;
            flex-direction: column;
        }

        .calendar-day:hover {
            border-color: #667eea;
            transform: scale(1.05);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
        }

        .calendar-day.other-month {
            opacity: 0.3;
        }

        .calendar-day.today {
            border-color: #667eea;
            background: #f0f3ff;
        }

        .calendar-day .date {
            font-weight: 600;
            font-size: 14px;
            margin-bottom: 4px;
        }

        .calendar-day .reservation-indicator {
            width: 100%;
            height: 4px;
            border-radius: 2px;
            margin-top: auto;
        }

        .calendar-day .occupied-info {
            font-size: 10px;
            color: #666;
            margin-top: 4px;
            line-height: 1.3;
        }

        .calendar-day .occupied-list {
            display: flex;
            flex-wrap: wrap;
            gap: 2px;
            margin-top: 2px;
        }

        .calendar-day .apt-badge {
            background: #667eea;
            color: white;
            padding: 1px 4px;
            border-radius: 3px;
            font-size: 9px;
            font-weight: 600;
        }

        .calendar-day .apt-badge.confirmed {
            background: #22c55e;
        }

        .calendar-day .apt-badge.pending {
            background: #eab308;
        }

        .calendar-day .apt-badge.cancelled {
            background: #ef4444;
        }

        .calendar-day.confirmed .reservation-indicator {
            background: #22c55e;
        }

        .calendar-day.pending .reservation-indicator {
            background: #eab308;
        }

        .calendar-day.cancelled .reservation-indicator {
            background: #ef4444;
        }

        .form-container {
            max-width: 800px;
        }

        .form-section {
            margin-bottom: 30px;
            padding: 20px;
            background: #f9fafb;
            border-radius: 8px;
            border: 1px solid #e5e7eb;
        }

        .form-section h3 {
            font-size: 16px;
            margin-bottom: 15px;
            color: #667eea;
            font-weight: 600;
        }

        .form-row {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 15px;
            margin-bottom: 15px;
        }

        .form-group {
            display: flex;
            flex-direction: column;
        }

        .form-group label {
            font-weight: 500;
            margin-bottom: 6px;
            font-size: 14px;
            color: #374151;
        }

        .form-group input,
        .form-group select,
        .form-group textarea {
            padding: 10px 12px;
            border: 2px solid #e5e7eb;
            border-radius: 6px;
            font-size: 14px;
            transition: border-color 0.3s;
        }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: #667eea;
        }

        .form-group select option:disabled {
            background: #fee2e2;
            font-style: italic;
        }

        .form-group select option:not(:disabled) {
            background: white;
        }

        .form-group textarea {
            resize: vertical;
            min-height: 100px;
            font-family: inherit;
        }

        .photo-upload {
            border: 2px dashed #d1d5db;
            border-radius: 8px;
            padding: 30px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
            background: white;
        }

        .photo-upload:hover {
            border-color: #667eea;
            background: #f9fafb;
        }

        .photo-upload input[type="file"] {
            display: none;
        }

        .photo-preview {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 15px;
        }

        .photo-preview img {
            width: 120px;
            height: 120px;
            object-fit: cover;
            border-radius: 6px;
            border: 2px solid #e5e7eb;
        }

        .button-group {
            display: flex;
            gap: 10px;
            margin-top: 25px;
        }

        .btn {
            padding: 12px 30px;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 14px;
        }

        .btn-primary {
            background: #667eea;
            color: white;
        }

        .btn-primary:hover {
            background: #5568d3;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
        }

        .btn-secondary {
            background: #6b7280;
            color: white;
        }

        .btn-secondary:hover {
            background: #4b5563;
        }

        .status-legend {
            display: flex;
            gap: 20px;
            padding: 15px;
            background: #f9fafb;
            border-radius: 8px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .status-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
        }

        .status-dot {
            width: 20px;
            height: 20px;
            border-radius: 4px;
        }

        .status-dot.confirmed { background: #22c55e; }
        .status-dot.pending { background: #eab308; }
        .status-dot.cancelled { background: #ef4444; }

        .reservations-list {
            margin-top: 20px;
        }

        .reservation-card {
            background: white;
            border: 2px solid #e5e7eb;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 15px;
            transition: all 0.3s;
        }

        .reservation-card:hover {
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }

        .reservation-card.confirmed {
            border-left: 5px solid #22c55e;
        }

        .reservation-card.pending {
            border-left: 5px solid #eab308;
        }

        .reservation-card.cancelled {
            border-left: 5px solid #ef4444;
            opacity: 0.7;
        }

        .reservation-header {
            display: flex;
            justify-content: space-between;
            align-items: start;
            margin-bottom: 15px;
        }

        .reservation-guest {
            font-size: 18px;
            font-weight: 600;
            color: #333;
        }

        .reservation-status {
            padding: 6px 12px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
            text-transform: uppercase;
        }

        .reservation-status.confirmed {
            background: #dcfce7;
            color: #166534;
        }

        .reservation-status.pending {
            background: #fef9c3;
            color: #854d0e;
        }

        .reservation-status.cancelled {
            background: #fee2e2;
            color: #991b1b;
        }

        .reservation-details {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-top: 15px;
        }

        .detail-item {
            font-size: 14px;
        }

        .detail-label {
            font-weight: 600;
            color: #6b7280;
            font-size: 12px;
            text-transform: uppercase;
            margin-bottom: 4px;
        }

        .detail-value {
            color: #333;
        }

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.6);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }

        .modal.active {
            display: flex;
        }

        .modal-content {
            background: white;
            border-radius: 12px;
            padding: 30px;
            max-width: 900px;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
            padding-bottom: 15px;
            border-bottom: 2px solid #e5e7eb;
        }

        .modal-header h2 {
            font-size: 24px;
            color: #333;
        }

        .close-modal {
            background: none;
            border: none;
            font-size: 28px;
            cursor: pointer;
            color: #6b7280;
            padding: 0;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 6px;
            transition: all 0.3s;
        }

        .close-modal:hover {
            background: #f3f4f6;
            color: #333;
        }

        .alert {
            padding: 15px 20px;
            border-radius: 8px;
            margin-bottom: 20px;
            display: none;
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 2000;
            min-width: 300px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }

        .alert.active {
            display: block;
        }

        .alert-success {
            background: #dcfce7;
            color: #166534;
            border: 1px solid #22c55e;
        }

        .alert-error {
            background: #fee2e2;
            color: #991b1b;
            border: 1px solid #ef4444;
        }

        .alert-info {
            background: #dbeafe;
            color: #1e40af;
            border: 1px solid #3b82f6;
        }

        .day-detail-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.6);
            z-index: 999;
            justify-content: center;
            align-items: center;
        }

        .day-detail-modal.active {
            display: flex;
        }

        .day-detail-content {
            background: white;
            border-radius: 12px;
            padding: 30px;
            max-width: 1000px;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            width: 90%;
        }

        .day-detail-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
            padding-bottom: 15px;
            border-bottom: 2px solid #e5e7eb;
        }

        .day-detail-header h2 {
            font-size: 24px;
            color: #333;
        }

        .guest-cards-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
            gap: 20px;
            margin-top: 20px;
        }

        .guest-card {
            background: #f9fafb;
            border-radius: 12px;
            padding: 20px;
            border: 2px solid #e5e7eb;
            transition: all 0.3s;
        }

        .guest-card:hover {
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            transform: translateY(-2px);
        }

        .guest-card.confirmed {
            border-left: 5px solid #22c55e;
        }

        .guest-card.pending {
            border-left: 5px solid #eab308;
        }

        .guest-card.cancelled {
            border-left: 5px solid #ef4444;
            opacity: 0.7;
        }

        .guest-card-header {
            display: flex;
            justify-content: space-between;
            align-items: start;
            margin-bottom: 15px;
        }

        /* ========== ESTILOS HISTORIAL DE HUÉSPEDES ========== */
        .guest-history-section {
            display: none;
            margin-top: 20px;
            padding: 20px;
            background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
            border: 2px solid #3b82f6;
            border-radius: 12px;
            animation: slideDown 0.3s ease;
        }

        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .guest-history-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 2px solid #3b82f6;
        }

        .guest-history-title {
            font-size: 16px;
            font-weight: 700;
            color: #1e40af;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .guest-history-stats {
            display: flex;
            gap: 15px;
            margin-bottom: 15px;
        }

        .guest-stat {
            background: white;
            padding: 10px 15px;
            border-radius: 8px;
            text-align: center;
            flex: 1;
        }

        .guest-stat-value {
            font-size: 24px;
            font-weight: 700;
            color: #1e40af;
        }

        .guest-stat-label {
            font-size: 11px;
            color: #6b7280;
            text-transform: uppercase;
            margin-top: 4px;
        }

        .guest-history-list {
            max-height: 250px;
            overflow-y: auto;
            margin-bottom: 15px;
        }

        .history-item {
            background: white;
            padding: 12px;
            border-radius: 8px;
            margin-bottom: 8px;
            border-left: 4px solid #3b82f6;
        }

        .history-item-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 6px;
        }

        .history-item-depto {
            font-weight: 700;
            color: #1e40af;
            font-size: 14px;
        }

        .history-item-dates {
            font-size: 12px;
            color: #6b7280;
        }

        .history-item-note {
            font-size: 13px;
            color: #374151;
            background: #f9fafb;
            padding: 8px;
            border-radius: 6px;
            margin-top: 6px;
            font-style: italic;
        }

        .guest-behavior-form {
            background: white;
            padding: 15px;
            border-radius: 8px;
            border: 2px dashed #3b82f6;
        }

        .guest-behavior-form label {
            font-size: 13px;
            font-weight: 600;
            color: #1e40af;
            display: block;
            margin-bottom: 8px;
        }

        .guest-behavior-form textarea {
            width: 100%;
            min-height: 80px;
            padding: 10px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            font-size: 13px;
            resize: vertical;
        }

        .guest-behavior-form textarea:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .behavior-rating {
            display: flex;
            gap: 10px;
            margin-bottom: 15px;
        }

        .behavior-badge {
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            border: 2px solid transparent;
        }

        .behavior-badge:hover {
            transform: scale(1.05);
        }

        .behavior-badge.excelente {
            background: #dcfce7;
            color: #166534;
        }

        .behavior-badge.excelente.selected {
            border-color: #22c55e;
            box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
        }

        .behavior-badge.bueno {
            background: #dbeafe;
            color: #1e40af;
        }

        .behavior-badge.bueno.selected {
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
        }

        .behavior-badge.regular {
            background: #fef3c7;
            color: #92400e;
        }

        .behavior-badge.regular.selected {
            border-color: #f59e0b;
            box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
        }

        .behavior-badge.problematico {
            background: #fee2e2;
            color: #991b1b;
        }

        .behavior-badge.problematico.selected {
            border-color: #ef4444;
            box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
        }

        .guest-name-big {
            font-size: 18px;
            font-weight: 700;
            color: #333;
            margin-bottom: 5px;
        }

        .guest-apartment {
            font-size: 14px;
            color: #667eea;
            font-weight: 600;
        }

        .guest-info-row {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            margin-top: 15px;
        }

        .guest-info-item {
            font-size: 13px;
        }

        .guest-info-label {
            font-weight: 600;
            color: #6b7280;
            font-size: 11px;
            text-transform: uppercase;
            margin-bottom: 3px;
        }

        .guest-info-value {
            color: #333;
        }

        .stats-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .stat-card-report {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 25px;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
        }

        .stat-card-report.green {
            background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
        }

        .stat-card-report.orange {
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
        }

        .stat-card-report.blue {
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        }

        .stat-label-report {
            font-size: 14px;
            opacity: 0.9;
            margin-bottom: 8px;
            font-weight: 500;
        }

        .stat-value-report {
            font-size: 36px;
            font-weight: 700;
            margin-bottom: 5px;
        }

        .stat-subtitle {
            font-size: 12px;
            opacity: 0.8;
        }

        .report-section {
            background: white;
            padding: 25px;
            border-radius: 12px;
            border: 1px solid #e5e7eb;
            margin-bottom: 25px;
        }

        .report-section h3 {
            font-size: 18px;
            margin-bottom: 20px;
            color: #333;
            border-bottom: 2px solid #667eea;
            padding-bottom: 10px;
        }

        .source-breakdown {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
        }

        .source-item {
            padding: 15px;
            background: #f9fafb;
            border-radius: 8px;
            border-left: 4px solid #667eea;
        }

        .source-name {
            font-weight: 600;
            color: #333;
            margin-bottom: 8px;
        }

        .source-stats {
            font-size: 14px;
            color: #666;
        }

        .source-amount {
            font-size: 20px;
            font-weight: 700;
            color: #667eea;
            margin-top: 8px;
        }

        /* Estilos adicionales para reportes mejorados */
        .top-apartments-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 15px;
        }

        .top-apartment-card {
            background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
            padding: 20px;
            border-radius: 12px;
            border: 2px solid #3b82f6;
            position: relative;
        }

        .top-apartment-card.worst {
            background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
            border-color: #ef4444;
        }

        .top-badge {
            position: absolute;
            top: 10px;
            right: 10px;
            background: #3b82f6;
            color: white;
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 700;
        }

        .top-badge.worst {
            background: #ef4444;
        }

        .apartment-name-report {
            font-size: 18px;
            font-weight: 700;
            color: #1e40af;
            margin-bottom: 12px;
        }

        .apartment-name-report.worst {
            color: #991b1b;
        }

        .apartment-stats-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin-top: 10px;
        }

        .apartment-stat-item {
            background: white;
            padding: 10px;
            border-radius: 6px;
            text-align: center;
        }

        .apartment-stat-value {
            font-size: 24px;
            font-weight: 700;
            color: #667eea;
        }

        .apartment-stat-label {
            font-size: 11px;
            color: #6b7280;
            margin-top: 3px;
        }

        .occupancy-meter {
            width: 100%;
            height: 30px;
            background: #e5e7eb;
            border-radius: 15px;
            overflow: hidden;
            position: relative;
            margin: 15px 0;
        }

        .occupancy-fill {
            height: 100%;
            background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
            transition: width 0.5s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 700;
            font-size: 14px;
        }

        .payment-methods-chart {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .payment-bar {
            background: #f9fafb;
            border-radius: 8px;
            padding: 12px;
            border-left: 4px solid #667eea;
        }

        .payment-bar-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 8px;
        }

        .payment-bar-name {
            font-weight: 600;
            color: #333;
        }

        .payment-bar-amount {
            font-weight: 700;
            color: #667eea;
        }

        .payment-bar-graph {
            width: 100%;
            height: 8px;
            background: #e5e7eb;
            border-radius: 4px;
            overflow: hidden;
        }

        .payment-bar-fill {
            height: 100%;
            background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
            transition: width 0.5s ease;
        }

        .insights-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
        }

        .insight-card {
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            padding: 20px;
            border-radius: 12px;
            border: 2px solid #f59e0b;
        }

        .insight-icon {
            font-size: 32px;
            margin-bottom: 10px;
        }

        .insight-value {
            font-size: 28px;
            font-weight: 700;
            color: #92400e;
            margin-bottom: 5px;
        }

        .insight-label {
            font-size: 13px;
            color: #78350f;
            font-weight: 600;
        }

        #guest-search-results::-webkit-scrollbar {
            width: 6px;
        }

        #guest-search-results::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 10px;
        }

        #guest-search-results::-webkit-scrollbar-thumb {
            background: #667eea;
            border-radius: 10px;
        }

        .no-guests-message {
            text-align: center;
            padding: 60px 20px;
            color: #6b7280;
        }

        .no-guests-message h3 {
            font-size: 20px;
            margin-bottom: 10px;
        }

        .day-actions {
            display: flex;
            gap: 10px;
            margin-top: 25px;
            padding-top: 20px;
            border-top: 2px solid #e5e7eb;
        }

        @media (max-width: 968px) {
            .container {
                flex-direction: column;
                height: auto;
            }
            
            .sidebar {
                width: 100%;
                max-height: 300px;
            }

            .guest-cards-grid {
                grid-template-columns: 1fr;
            }
        }

        @keyframes pulse {
            0%, 100% {
                opacity: 1;
            }
            50% {
                opacity: 0.5;
            }
        }

        /* ========== ESTILOS MÓDULO DE MANTENIMIENTO ========== */
        
        .maintenance-badge {
            position: absolute;
            top: 8px;
            right: 8px;
            background: #ef4444;
            color: white;
            font-size: 10px;
            font-weight: 700;
            padding: 4px 8px;
            border-radius: 12px;
            animation: pulse 2s infinite;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-bottom: 25px;
        }

        .stat-card {
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            padding: 20px;
            border-radius: 10px;
            border: 2px solid #fbbf24;
        }

        .stat-card h3 {
            font-size: 14px;
            color: #92400e;
            margin-bottom: 8px;
            font-weight: 600;
        }

        .stat-card .stat-value {
            font-size: 28px;
            font-weight: 700;
            color: #78350f;
        }

        .maintenance-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
            padding-bottom: 15px;
            border-bottom: 2px solid #f0f0f0;
        }

        .maintenance-header h2 {
            font-size: 22px;
            color: #333;
        }

        .btn-add-maintenance {
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 600;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .btn-add-maintenance:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
        }

        .maintenance-filters {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .filter-btn-maintenance {
            padding: 8px 16px;
            border: 2px solid #e5e7eb;
            background: white;
            border-radius: 8px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 500;
            transition: all 0.3s;
        }

        .filter-btn-maintenance:hover {
            border-color: #f59e0b;
            background: #fffbeb;
        }

        .filter-btn-maintenance.active {
            background: #f59e0b;
            color: white;
            border-color: #f59e0b;
        }

        .maintenance-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .maintenance-card {
            background: #f9fafb;
            border: 2px solid #e5e7eb;
            border-radius: 10px;
            padding: 16px;
            transition: all 0.3s;
            cursor: pointer;
        }

        .maintenance-card:hover {
            border-color: #f59e0b;
            box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
            transform: translateY(-2px);
        }

        .maintenance-card.pending {
            border-left: 4px solid #ef4444;
        }

        .maintenance-card.in-progress {
            border-left: 4px solid #f59e0b;
        }

        .maintenance-card.completed {
            border-left: 4px solid #22c55e;
        }

        .maintenance-header-card {
            display: flex;
            justify-content: space-between;
            align-items: start;
            margin-bottom: 12px;
        }

        .maintenance-type {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 16px;
            font-weight: 600;
            color: #1f2937;
        }

        .maintenance-type .icon {
            font-size: 24px;
        }

        .status-badge-maintenance {
            padding: 6px 12px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
        }

        .status-badge-maintenance.pending {
            background: #fee2e2;
            color: #991b1b;
        }

        .status-badge-maintenance.in-progress {
            background: #fef3c7;
            color: #92400e;
        }

        .status-badge-maintenance.completed {
            background: #dcfce7;
            color: #166534;
        }

        .maintenance-details {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 10px;
            margin-bottom: 10px;
        }

        .maintenance-description {
            background: white;
            padding: 10px;
            border-radius: 6px;
            font-size: 13px;
            color: #4b5563;
            margin-top: 8px;
        }

        .no-maintenance {
            text-align: center;
            padding: 40px;
            color: #9ca3af;
        }

        /* ========== RESPONSIVE DESIGN PARA MÓVIL ========== */
        @media (max-width: 768px) {
            /* Header más compacto */
            .header {
                padding: 15px;
                flex-direction: column;
                gap: 15px;
            }

            .header-left h1 {
                font-size: 22px;
            }

            .header-left p {
                font-size: 12px;
            }

            /* Logo responsive en móvil */
            #logo-container {
                padding: 8px 12px !important;
            }

            #system-logo {
                height: 50px !important;
            }

            .header-actions {
                flex-wrap: wrap;
                justify-content: center;
                width: 100%;
                gap: 8px;
            }

            .header-btn {
                padding: 8px 12px;
                font-size: 11px;
                white-space: nowrap;
            }

            /* Ocultar separadores en móvil */
            [id^="separator-"] {
                display: none !important;
            }

            /* Container responsivo */
            .container {
                flex-direction: column;
                height: auto;
                padding: 10px;
                gap: 15px;
            }

            /* Sidebar a ancho completo */
            .sidebar {
                width: 100%;
                max-height: none;
            }

            /* Main content a ancho completo */
            .main-content {
                width: 100% !important;
            }

            /* Calendar responsivo */
            .calendar-grid {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }

            .calendar-day {
                min-width: 120px;
            }

            /* Modales a pantalla completa en móvil */
            .modal-content {
                width: 95%;
                max-width: 95%;
                margin: 10px;
                max-height: 95vh;
                overflow-y: auto;
            }

            /* Formularios más grandes */
            .form-group input,
            .form-group select,
            .form-group textarea {
                font-size: 16px; /* Evita zoom en iOS */
                padding: 12px;
            }

            /* Botones más grandes y táctiles */
            .btn,
            .btn-primary,
            .btn-secondary,
            .btn-danger,
            .btn-success {
                padding: 14px 20px;
                font-size: 15px;
                min-height: 48px; /* Tamaño mínimo táctil */
            }

            /* Tabs responsivos */
            .tabs {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                gap: 5px;
            }

            .tab {
                min-width: 100px;
                font-size: 12px;
                padding: 10px 12px;
            }

            /* Tarjetas de reserva más grandes */
            .reservation-card {
                padding: 15px;
            }

            /* Stats del header */
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 10px;
            }

            /* Ocultar algunos botones menos importantes en móvil */
            #backup-btn,
            #import-btn,
            #expenses-btn,
            #inventory-btn,
            #excel-export-btn {
                display: none !important;
            }

            /* Mantener solo los botones esenciales */
            #sync-mobile-btn,
            #tools-btn,
            #blocks-btn {
                display: flex !important;
            }

            /* Notificación responsive */
            .sync-notification {
                top: 10px;
                right: 10px;
                left: 10px;
                padding: 15px;
                font-size: 14px;
            }

            /* Tablas con scroll horizontal */
            .table-responsive {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }

            table {
                min-width: 600px;
            }

            /* Guest cards en columna */
            .guest-card {
                flex-direction: column;
                align-items: flex-start;
            }

            /* Availability search más compacto */
            .availability-search {
                padding: 12px;
            }

            /* Reports list responsive */
            .reports-list {
                gap: 10px;
            }

            /* Actions más grandes */
            .actions {
                flex-direction: column;
                gap: 8px;
            }

            .actions button {
                width: 100%;
            }

            /* Filters responsive */
            .filters {
                flex-direction: column;
                gap: 10px;
            }

            .filter-group {
                width: 100%;
            }
        }

        /* Estilos para tablets */
        @media (min-width: 769px) and (max-width: 1024px) {
            .container {
                padding: 15px;
            }

            .sidebar {
                width: 280px;
            }

            .header-btn {
                font-size: 12px;
                padding: 8px 14px;
            }
        }

        /* ========== ESTILOS PARA ITINERARIO DE ENTREGAS ========== */
        .itinerary-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 30px;
            border-radius: 12px;
            margin-bottom: 30px;
            text-align: center;
        }

        .itinerary-header h2 {
            font-size: 32px;
            margin-bottom: 10px;
        }

        .itinerary-header p {
            font-size: 18px;
            opacity: 0.9;
        }

        .itinerary-controls {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
        }

        .itinerary-table {
            background: white;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .itinerary-table table {
            width: 100%;
            border-collapse: collapse;
        }

        .itinerary-table thead {
            background: #667eea;
            color: white;
        }

        .itinerary-table th {
            padding: 15px;
            text-align: left;
            font-weight: 600;
            font-size: 14px;
        }

        .itinerary-table td {
            padding: 15px;
            border-bottom: 1px solid #e5e7eb;
        }

        .itinerary-table tbody tr:hover {
            background: #f9fafb;
        }

        .itinerary-table tbody tr:last-child td {
            border-bottom: none;
        }

        .garage-badge {
            background: #dbeafe;
            color: #1e40af;
            padding: 6px 12px;
            border-radius: 6px;
            font-weight: 600;
            font-size: 13px;
            display: inline-block;
        }

        .garage-badge.none {
            background: #f3f4f6;
            color: #6b7280;
        }

        .empty-itinerary {
            text-align: center;
            padding: 80px 20px;
            color: #6b7280;
        }

        .empty-itinerary-icon {
            font-size: 64px;
            margin-bottom: 20px;
        }

        .empty-itinerary h3 {
            font-size: 22px;
            margin-bottom: 10px;
            color: #374151;
        }

        /* ========== ESTILOS PARA IMPRESIÓN ========== */
        @media print {
            /* Ocultar todo excepto el itinerario */
            body * {
                visibility: hidden;
            }

            #itinerary-tab,
            #itinerary-tab * {
                visibility: visible;
            }

            #itinerary-tab {
                position: absolute;
                left: 0;
                top: 0;
                width: 100%;
            }

            /* Ocultar elementos de navegación y controles */
            .header,
            .sidebar,
            .tabs,
            .itinerary-controls,
            .btn,
            button {
                display: none !important;
            }

            /* Ajustar el contenido para impresión */
            .itinerary-header {
                background: none !important;
                color: #000 !important;
                border: 2px solid #000;
                page-break-inside: avoid;
            }

            .itinerary-table {
                box-shadow: none;
                border: 1px solid #000;
            }

            .itinerary-table th {
                background: #f0f0f0 !important;
                color: #000 !important;
                border: 1px solid #000;
            }

            .itinerary-table td {
                border: 1px solid #000;
            }

            .garage-badge {
                border: 1px solid #000;
                background: none !important;
                color: #000 !important;
            }

            /* Asegurar que todo quepa en una página */
            @page {
                margin: 1.5cm;
            }
        }

        /* ========== ESTILOS PARA MÓDULO DE GASTOS ========== */
        .gastos-container {
            max-width: 1400px;
            margin: 0 auto;
        }

        .gastos-header {
            background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
            color: white;
            padding: 30px;
            border-radius: 12px;
            margin-bottom: 30px;
            text-align: center;
        }

        .gastos-header h2 {
            font-size: 32px;
            margin-bottom: 10px;
        }

        .gastos-form {
            background: white;
            padding: 25px;
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            margin-bottom: 30px;
        }

        .gastos-list {
            background: white;
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            overflow: hidden;
        }

        .gasto-item {
            padding: 20px;
            border-bottom: 1px solid #e5e7eb;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: background 0.2s;
        }

        .gasto-item:hover {
            background: #f9fafb;
        }

        .gasto-item:last-child {
            border-bottom: none;
        }

        .gasto-info {
            flex: 1;
        }

        .gasto-monto {
            font-size: 24px;
            font-weight: 700;
            color: #ef4444;
            margin-right: 20px;
        }

        .gasto-actions {
            display: flex;
            gap: 10px;
        }

        /* ========== ESTILOS PARA MÓDULO DE INVENTARIO ========== */
        .inventario-container {
            max-width: 1400px;
            margin: 0 auto;
        }

        .inventario-header {
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
            color: white;
            padding: 30px;
            border-radius: 12px;
            margin-bottom: 30px;
            text-align: center;
        }

        .inventario-header h2 {
            font-size: 32px;
            margin-bottom: 10px;
        }

        .inventario-form {
            background: white;
            padding: 25px;
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            margin-bottom: 30px;
        }

        .inventario-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 20px;
        }

        .inventario-item {
            background: white;
            padding: 20px;
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            transition: transform 0.2s, box-shadow 0.2s;
        }

        .inventario-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }

        .inventario-item-header {
            display: flex;
            justify-content: space-between;
            align-items: start;
            margin-bottom: 15px;
        }

        .inventario-item-nombre {
            font-size: 18px;
            font-weight: 600;
            color: #1f2937;
        }

        .inventario-item-cantidad {
            font-size: 24px;
            font-weight: 700;
            color: #3b82f6;
            text-align: center;
            margin: 15px 0;
        }

        .inventario-item-actions {
            display: flex;
            gap: 10px;
            margin-top: 15px;
        }

        .badge-bajo {
            background: #fee2e2;
            color: #991b1b;
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
        }

        .badge-ok {
            background: #dcfce7;
            color: #166534;
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
        }

        /* ========== ESTILOS PARA FILTROS Y BUSCADOR DE INVENTARIO ========== */
        .inventario-controls {
            background: white;
            padding: 20px;
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            margin-bottom: 25px;
        }

        .inventario-search-filter {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 15px;
            margin-bottom: 0;
        }

        .search-box {
            position: relative;
        }

        .search-box input {
            width: 100%;
            padding: 14px 45px 14px 45px;
            border: 2px solid #e5e7eb;
            border-radius: 10px;
            font-size: 15px;
            transition: all 0.3s;
        }

        .search-box input:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .search-icon {
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 20px;
            color: #9ca3af;
        }

        .clear-search {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            background: #ef4444;
            color: white;
            border: none;
            border-radius: 50%;
            width: 24px;
            height: 24px;
            display: none;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 14px;
            font-weight: 700;
        }

        .clear-search:hover {
            background: #dc2626;
        }

        .filter-box select {
            width: 100%;
            padding: 14px 15px;
            border: 2px solid #e5e7eb;
            border-radius: 10px;
            font-size: 15px;
            background: white;
            cursor: pointer;
            transition: all 0.3s;
        }

        .filter-box select:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        /* ========== ESTILOS PARA CATEGORÍAS COLAPSABLES ========== */
        .inventario-categoria {
            background: white;
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            margin-bottom: 20px;
            overflow: hidden;
        }

        .categoria-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 20px 25px;
            cursor: pointer;
            background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
            border-bottom: 2px solid #e5e7eb;
            transition: all 0.3s;
            user-select: none;
        }

        .categoria-header:hover {
            background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
        }

        .categoria-header.collapsed {
            border-bottom: none;
        }

        .categoria-titulo {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .categoria-icon {
            font-size: 28px;
        }

        .categoria-nombre {
            font-size: 22px;
            font-weight: 700;
            color: #1f2937;
        }

        .categoria-count {
            background: #3b82f6;
            color: white;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 600;
        }

        .categoria-toggle {
            font-size: 28px;
            color: #6b7280;
            transition: transform 0.3s;
        }

        .categoria-toggle.collapsed {
            transform: rotate(-90deg);
        }

        .categoria-items {
            padding: 20px;
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 20px;
        }

        .categoria-items.collapsed {
            display: none;
        }

        .inventario-empty {
            grid-column: 1/-1;
            text-align: center;
            padding: 60px 20px;
            color: #6b7280;
        }

        .inventario-empty-icon {
            font-size: 48px;
            margin-bottom: 20px;
        }

        @media (max-width: 768px) {
            .inventario-search-filter {
                grid-template-columns: 1fr;
            }
            
            .categoria-nombre {
                font-size: 18px;
            }
            
            .categoria-icon {
                font-size: 24px;
            }
        }

        /* ========== ESTILOS LIMPIEZA PMS ========== */
        .limpieza-badge {
            padding: 6px 12px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
            display: inline-block;
        }

        .limpieza-badge.limpio {
            background: #dcfce7;
            color: #166534;
        }

        .limpieza-badge.pendiente {
            background: #fef3c7;
            color: #92400e;
        }

        /* Botones de día (Hoy/Mañana/Pasado) */
        .limpieza-day-tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 25px;
            background: #f9fafb;
            padding: 15px;
            border-radius: 12px;
            flex-wrap: wrap;
        }

        .limpieza-day-btn {
            flex: 1;
            min-width: 120px;
            padding: 14px 24px;
            border: 2px solid #e5e7eb;
            background: white;
            border-radius: 10px;
            font-size: 15px;
            font-weight: 600;
            color: #6b7280;
            cursor: pointer;
            transition: all 0.3s;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }

        .limpieza-day-btn:hover {
            background: #f3f4f6;
            border-color: #d1d5db;
        }

        .limpieza-day-btn.active {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-color: #667eea;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
        }

        .limpieza-day-btn:active {
            transform: scale(0.97);
        }

        @media (max-width: 768px) {
            .limpieza-day-tabs {
                flex-direction: row;
                gap: 8px;
                padding: 12px;
            }

            .limpieza-day-btn {
                min-width: 100px;
                padding: 12px 16px;
                font-size: 14px;
            }
        }

        .btn-observacion {
            background: #667eea;
            color: white;
            border: none;
            padding: 10px 16px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            white-space: nowrap;
            min-height: 44px; /* Tamaño táctil mínimo recomendado */
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
        }

        .btn-observacion:hover {
            background: #5568d3;
        }

        .btn-observacion:active {
            background: #4556b8;
            transform: scale(0.97);
        }

        /* Modal de observación - Optimizado para móviles */
        .modal-observacion {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.75);
            z-index: 999999;
            justify-content: center;
            align-items: center;
            padding: 15px;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }

        .modal-observacion.active {
            display: flex !important;
        }

        .modal-observacion-content {
            background: white;
            border-radius: 16px;
            padding: 25px 20px;
            width: 100%;
            max-width: 500px;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
            position: relative;
            -webkit-overflow-scrolling: touch;
        }

        .modal-observacion-header {
            font-size: 20px;
            font-weight: 700;
            color: #667eea;
            margin-bottom: 15px;
            line-height: 1.3;
        }

        .modal-observacion-depto {
            font-size: 15px;
            color: #6b7280;
            margin-bottom: 20px;
            font-weight: 600;
        }

        .modal-observacion-textarea {
            width: 100%;
            min-height: 150px;
            padding: 15px;
            border: 2px solid #e0e0e0;
            border-radius: 10px;
            font-family: inherit;
            font-size: 16px; /* Importante: 16px evita zoom en iOS */
            resize: vertical;
            margin-bottom: 20px;
            box-sizing: border-box;
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
        }

        .modal-observacion-textarea:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        .modal-observacion-buttons {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
            flex-wrap: wrap;
        }

        .modal-observacion-btn {
            padding: 14px 24px;
            border: none;
            border-radius: 10px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            flex: 1;
            min-width: 120px;
        }

        .modal-observacion-btn.guardar {
            background: #10b981;
            color: white;
        }

        .modal-observacion-btn.guardar:active {
            background: #059669;
            transform: scale(0.98);
        }

        .modal-observacion-btn.cancelar {
            background: #e5e7eb;
            color: #374151;
        }

        .modal-observacion-btn.cancelar:active {
            background: #d1d5db;
            transform: scale(0.98);
        }

        /* Estilos específicos para móviles */
        @media (max-width: 768px) {

            /* Asegurar que la tabla de limpiezas sea scrollable horizontalmente */
            .itinerary-table {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }

            .itinerary-table table {
                min-width: 100%;
                width: max-content;
            }

            /* Asegurar que todas las columnas sean visibles */
            .itinerary-table th,
            .itinerary-table td {
                display: table-cell !important;
                visibility: visible !important;
                white-space: nowrap;
                padding: 12px 8px;
            }

            /* Hacer que el botón de observación sea más grande en móviles */
            .btn-observacion {
                padding: 12px 16px;
                font-size: 15px;
                min-height: 48px;
                width: auto;
            }

            /* Modal optimizado para móviles */
            .modal-observacion {
                padding: 10px;
                align-items: flex-start;
                padding-top: 40px;
            }

            .modal-observacion-content {
                padding: 20px 15px;
                max-height: 85vh;
                border-radius: 12px;
                width: 100%;
                max-width: 100%;
            }

            .modal-observacion-header {
                font-size: 18px;
            }

            .modal-observacion-textarea {
                min-height: 120px;
                font-size: 16px; /* Mantener 16px para evitar zoom en iOS */
            }

            .modal-observacion-buttons {
                flex-direction: column;
            }

            .modal-observacion-btn {
                width: 100%;
                padding: 16px;
                font-size: 16px;
            }
        }

        /* ========== ESTILOS PARA ACOMPAÑANTES ========== */
        .companion-item {
            background: #f9fafb;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 12px;
            position: relative;
            transition: all 0.2s ease;
        }

        .companion-item:hover {
            border-color: #d1d5db;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        }

        .companion-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
            padding-bottom: 10px;
            border-bottom: 1px solid #e5e7eb;
        }

        .companion-title {
            font-weight: 600;
            color: #374151;
            font-size: 14px;
        }

        .companion-remove-btn {
            background: #ef4444;
            color: white;
            border: none;
            border-radius: 6px;
            padding: 6px 12px;
            font-size: 12px;
            cursor: pointer;
            transition: background 0.2s;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .companion-remove-btn:hover {
            background: #dc2626;
        }

        .companion-fields {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }

        .companion-field {
            display: flex;
            flex-direction: column;
        }

        .companion-field label {
            font-size: 13px;
            color: #6b7280;
            margin-bottom: 4px;
            font-weight: 500;
        }

        .companion-field input {
            padding: 8px 12px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            font-size: 14px;
            transition: border-color 0.2s;
        }

        .companion-field input:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .btn-add-companion {
            transition: all 0.2s ease;
        }

        .btn-add-companion:hover {
            background: #059669 !important;
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
        }

        .btn-add-companion:disabled {
            background: #9ca3af !important;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        @media (max-width: 768px) {
            .companion-fields {
                grid-template-columns: 1fr;
            }
        }
