        :root {
            --bg: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
            --card: #ffffff;
            --text: #1e293b;
            --muted: #64748b;
            --border: #e2e8f0;
            --green: #22c55e;
            --yellow: #eab308;
            --red: #ef4444;
            --blue: #3b82f6;
            --purple: #8b5cf6;
            --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        }

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

        body {
            font-family: 'Nunito', -apple-system, sans-serif;
            background: var(--bg);
            color: var(--text);
            min-height: 100vh;
            padding: 16px;
            padding-bottom: 100px;
        }

        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 12px;
            padding-bottom: 10px;
            border-bottom: 1px solid var(--border);
            text-align: left;
        }

        .header-title-box {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .header-icon {
            width: 36px;
            height: 36px;
            border-radius: 10px;
            background: linear-gradient(135deg, #10b981, #059669);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            color: white;
            box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
            flex-shrink: 0;
        }

        .header h1 {
            font-size: 1.25rem;
            font-weight: 800;
            color: var(--text);
            margin: 0;
            letter-spacing: -0.3px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .header p {
            color: var(--muted);
            font-size: 0.75rem;
            margin: 1px 0 0;
        }

        .header-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        /* Compact KPI Strip */
        .stats-grid {
            display: grid;
            gap: 8px;
            grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: 14px;
            padding: 10px 14px;
            margin-bottom: 12px;
            box-shadow: var(--shadow);
        }

        .stat-card {
            background: transparent;
            border-radius: 8px;
            padding: 4px 8px;
            box-shadow: none;
            text-align: left;
            border-right: 1px solid rgba(226, 232, 240, 0.7);
        }

        .stat-card:last-child {
            border-right: none;
        }

        @media (max-width: 768px) {
            .stat-card {
                border-right: none;
                border-bottom: 1px solid rgba(226, 232, 240, 0.7);
                padding-bottom: 6px;
            }
            .stat-card:last-child {
                border-bottom: none;
            }
        }

        .stat-header {
            display: flex;
            align-items: center;
            gap: 5px;
            margin-bottom: 2px;
        }

        .stat-icon {
            font-size: 0.85rem;
            display: inline-block;
        }

        .stat-label {
            font-size: 0.68rem;
            color: var(--muted);
            text-transform: uppercase;
            font-weight: 700;
            letter-spacing: 0.4px;
        }

        .stat-value {
            font-size: 1.05rem;
            font-weight: 800;
            color: var(--text);
            line-height: 1.2;
        }

        /* Sections */
        .section {
            background: var(--card);
            border-radius: 20px;
            padding: 20px;
            box-shadow: var(--shadow);
            margin-bottom: 20px;
        }

        .section-title {
            font-size: 1.1rem;
            font-weight: 700;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        /* Forms */
        .form-group {
            margin-bottom: 12px;
        }

        .form-group label {
            display: block;
            font-size: 0.8rem;
            color: var(--muted);
            margin-bottom: 4px;
        }

        .form-control {
            width: 100%;
            padding: 10px 14px;
            border: 1px solid var(--border);
            border-radius: 10px;
            font-size: 1rem;
            font-family: inherit;
        }

        .form-control:focus {
            outline: none;
            border-color: var(--blue);
        }

        .form-row {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
        }

        /* Buttons */
        .btn {
            padding: 12px 20px;
            border: none;
            border-radius: 12px;
            font-size: 1rem;
            font-weight: 700;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: all 0.2s;
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--blue), #2563eb);
            color: white;
        }

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

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

        .btn-block {
            width: 100%;
        }

        /* Lists */
        .list-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 0;
            border-bottom: 1px solid var(--border);
        }

        .list-item:last-child {
            border-bottom: none;
        }

        .list-info {
            flex: 1;
        }

        .list-title {
            font-weight: 700;
        }

        .list-meta {
            font-size: 0.8rem;
            color: var(--muted);
        }

        .list-value {
            font-size: 1.1rem;
            font-weight: 800;
            color: var(--green);
        }

        .badge {
            font-size: 0.7rem;
            padding: 2px 8px;
            border-radius: 20px;
            font-weight: 600;
        }

        .badge-paid {
            background: #dcfce7;
            color: #166534;
        }

        .badge-pending {
            background: #fef3c7;
            color: #92400e;
        }

        /* Tabs */
        .tabs {
            display: flex;
            gap: 6px;
            margin-bottom: 14px;
            overflow-x: auto;
            padding-bottom: 2px;
            scrollbar-width: none;
        }
        .tabs::-webkit-scrollbar {
            display: none;
        }

        .tab {
            padding: 7px 14px;
            background: var(--card);
            border: 1px solid var(--border);
            color: var(--muted);
            border-radius: 10px;
            font-size: 0.82rem;
            font-weight: 700;
            cursor: pointer;
            white-space: nowrap;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .tab:hover {
            color: var(--text);
            background: rgba(241, 245, 249, 0.8);
            border-color: #cbd5e1;
        }

        
        /* Tabs 3 Zonas Operativas */
        .tabs-nav-wrapper {
            display: flex;
            gap: 12px;
            margin-bottom: 16px;
            flex-wrap: wrap;
            background: rgba(15, 23, 42, 0.45);
            padding: 10px;
            border-radius: 14px;
            border: 1px solid var(--border);
        }
        .tab-zone {
            display: flex;
            flex-direction: column;
            gap: 6px;
            flex: 1 1 auto;
            min-width: 200px;
            background: var(--card);
            padding: 8px 10px;
            border-radius: 10px;
            border: 1px solid var(--border);
        }
        .tab-zone-label {
            font-size: 0.72rem;
            text-transform: uppercase;
            font-weight: 700;
            color: var(--muted);
            letter-spacing: 0.5px;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .tab-zone-buttons {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }

        .tab.active {
            background: #2563eb;
            color: white;
            border-color: #2563eb;
            box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
        }

        /* Modal */
        .modal {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.5);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            padding: 16px;
        }

        .modal.active {
            display: flex;
        }

        .modal-content {
            background: var(--card);
            border-radius: 20px;
            padding: 24px;
            max-width: 500px;
            width: 100%;
            max-height: 90vh;
            overflow-y: auto;
        }

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

        .modal-close {
            background: none;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: var(--muted);
        }

        /* Empty state */
        .empty {
            text-align: center;
            padding: 40px 20px;
            color: var(--muted);
        }

        .empty i {
            font-size: 2rem;
            opacity: 0.5;
            margin-bottom: 12px;
        }

        /* Compra Items Cards */
        .compra-item-card {
            transition: all 0.2s ease;
        }
        .compra-item-card:hover {
            border-color: #cbd5e1;
            box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
        }
        .compra-item-card .btn-delete-item:hover {
            background: #fecaca;
            color: #dc2626;
        }

        .admin-controls {
            display: none;
        }

        body.admin-mode .admin-controls {
            display: inline-block;
        }

        .action-btn {
            background: none;
            border: none;
            cursor: pointer;
            margin-left: 5px;
            font-size: 0.9rem;
        }
