/* --- Tipografía global (Outfit) --- */
        *, *::before, *::after { box-sizing: border-box; }
        body {
            font-family: 'Outfit', 'Inter', sans-serif !important;
            margin: 0;
            padding: 0;
        }
        h1, h2, h3, h4, h5, h6,
        .section-title, .inv-card, .fi, select, input, button, label {
            font-family: 'Outfit', 'Inter', sans-serif !important;
        }

        /* --- Layout --- */
        .inv-main {
            display: flex;
            justify-content: center;
            padding: 28px 4% 50px;
            margin-left: 100px;
        }
        .inv-card {
            width: 100%;
            max-width: 1160px;
            background: rgba(255,255,255,0.88);
            backdrop-filter: blur(28px);
            border: 1px solid rgba(255,255,255,0.65);
            padding: 38px 42px;
            border-radius: 28px;
            box-shadow: 0 18px 55px rgba(0,0,0,0.10);
        }

        /* --- Header Superior --- */
        .dashboard-header {
            position: sticky;
            top: 0;
            background: rgba(15, 23, 42, 0.85);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            z-index: 9999;
        }
        .header-content {
            max-width: 1600px;
            margin: 0 auto;
            padding: 10px 30px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .header-brand {
            display: flex;
            align-items: center;
            gap: 18px;
        }
        .logo-mini {
            width: 32px;
            height: 32px;
            background: var(--grad-premium);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            box-shadow: var(--shadow-orange);
        }
        .header-title {
            font-size: 1.15rem;
            font-weight: 800;
            color: var(--white);
            margin: 0;
        }
        .header-nav {
            display: flex;
            align-items: center;
            gap: 14px;
            margin-left: auto;
            padding: 4px 8px;
            background: rgba(255, 255, 255, 0.03);
            border-radius: 14px;
            border: 1px solid rgba(255, 255, 255, 0.05);
        }
        .header-nav-btn {
            width: 38px;
            height: 38px;
            border-radius: 12px;
            border: 1px solid rgba(255,255,255,0.12);
            background: rgba(255,255,255,0.08);
            color: rgba(255,255,255,0.8);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }
        .header-nav-btn:hover { background: var(--grad-premium); color: white; transform: translateY(-2px); }
        .header-divider { width: 1px; height: 24px; background: rgba(255,255,255,0.15); margin: 0 18px; }

        /* --- Section boxes --- */
        .section-box {
            background: #ffffff;
            border-radius: 18px;
            padding: 22px 26px;
            box-shadow: 0 3px 12px rgba(0,0,0,0.04);
            border: 1px solid rgba(0,0,0,0.06);
        }
        .section-title {
            font-size: 0.95rem;
            color: #0f172a;
            margin: 0 0 18px 0;
            display: flex;
            align-items: center;
            gap: 11px;
            font-weight: 800;
        }
        .section-title i { color: var(--primary); }

        /* --- Inputs --- */
        .fi {
            background: #f8fafc;
            color: #0f172a;
            border: 1px solid #e2e8f0;
            width: 100%;
            padding: 11px 13px;
            border-radius: 11px;
            font-weight: 600;
            font-size: 0.88rem;
            box-sizing: border-box;
            transition: border 0.2s, box-shadow 0.2s;
        }
        .fi:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,0.12); }
        .label-sm { font-size: 0.72rem; font-weight: 800; color: #475569; margin-bottom: 7px; display: block; text-transform: uppercase; }


        /* --- CAByS Autocomplete Premium --- */
        .autocomplete-wrapper { position: relative; width: 100%; }
        .autocomplete-dropdown {
            display: none;
            position: absolute;
            top: calc(100% + 4px);
            left: 0; right: 0;
            background: #ffffff;
            border: 1.5px solid #dbeafe;
            border-radius: 14px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.12);
            z-index: 9999;
            max-height: 300px;
            overflow-y: auto;
        }
        .autocomplete-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 16px;
            cursor: pointer;
            border-bottom: 1px solid #f1f5f9;
            transition: all 0.2s ease;
        }
        .autocomplete-item:hover { background: #f0f7ff; }
        .autocomplete-item:last-child { border-bottom: none; }
        .autocomplete-info { flex: 1; min-width: 0; }
        .autocomplete-name {
            font-weight: 800;
            font-size: 0.88rem;
            color: #1e293b;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-bottom: 2px;
        }
        .autocomplete-subinfo {
            font-size: 0.70rem;
            color: #94a3b8;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .autocomplete-badge {
            font-family: monospace;
            background: #f1f5f9;
            padding: 2px 6px;
            border-radius: 4px;
            font-weight: 700;
            color: #64748b;
        }
        .autocomplete-tax {
            font-weight: 900;
            font-size: 0.8rem;
            color: #1e40af;
            background: #dbeafe;
            padding: 2px 8px;
            border-radius: 6px;
            white-space: nowrap;
        }


        /* --- Form grid --- */
        .form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
        .form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

        /* --- Buttons --- */
        .btn-registrar {
            width: 100%;
            padding: 16px;
            background: var(--grad-premium);
            border: none;
            border-radius: 13px;
            color: white;
            font-size: 1rem;
            font-weight: 800;
            cursor: pointer;
            box-shadow: 0 8px 22px rgba(30,64,175,0.28);
            transition: transform 0.2s, opacity 0.2s;
            margin-top: 18px;
        }
        .btn-registrar:hover { opacity: 0.92; transform: translateY(-2px); }

        /* --- Import bar (compact horizontal) --- */
        .import-bar {
            background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 60%, #3b82f6 100%);
            border-radius: 14px;
            padding: 12px 22px;
            color: white;
            display: flex;
            align-items: center;
            gap: 16px;
            margin-bottom: 8px;
        }
        .import-bar .ib-icon {
            width: 38px; height: 38px;
            background: rgba(255,255,255,0.15);
            border-radius: 10px;
            display: flex; align-items: center; justify-content: center;
            font-size: 1rem;
            flex-shrink: 0;
        }
        .import-bar .ib-text {
            flex: 1;
            font-size: 0.82rem;
            font-weight: 600;
            line-height: 1.3;
        }
        .import-bar .ib-text span { font-weight: 400; opacity: 0.8; font-size: 0.75rem; }
        .import-bar .ib-actions { display: flex; gap: 8px; flex-shrink: 0; }
        .btn-import {
            padding: 8px 16px;
            border-radius: 8px;
            font-weight: 700;
            font-size: 0.78rem;
            cursor: pointer;
            border: none;
            white-space: nowrap;
            transition: transform 0.15s, opacity 0.15s;
        }
        .btn-import:hover { transform: translateY(-1px); opacity: 0.9; }
        .btn-import.outline { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3); color: white; }
        .btn-import.solid { background: #ffffff; color: #1e40af; }

        /* --- Table --- */
        .inv-table { width: 100%; border-collapse: collapse; }
        .inv-table thead tr { background: #e8edf4; }
        .inv-table th { color: #475569; padding: 10px 14px; text-align: left; font-size: 0.75rem; font-weight: 800; }
        .inv-table tbody td { padding: 11px 14px; color: #0f172a; font-size: 0.86rem; border-bottom: 1px solid #f1f5f9; font-weight: 500; }
        .inv-table tbody tr:hover td { background: #f8fbff; }
        .table-wrap { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px; overflow: hidden; }
        .btn-action { background: none; border: none; cursor: pointer; padding: 6px 8px; border-radius: 7px; font-size: 0.9rem; }
        .btn-action.del { color: #ef4444; }
        .btn-action.del:hover { background: #fee2e2; }

        .filter-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
        .count-badge { font-size: 0.8rem; font-weight: 700; color: #64748b; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 20px; padding: 4px 12px; }

        /* --- Panel contextual Producto / Servicio --- */
        .ctx-panel {
            border-radius: 13px;
            padding: 16px 18px;
            margin-bottom: 14px;
            display: none;
            animation: ctxSlide 0.35s ease;
        }
        .ctx-panel.active { display: block; }
        .ctx-panel.producto {
            background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
            border: 1px solid #bbf7d0;
        }
        .ctx-panel.servicio {
            background: linear-gradient(135deg, #faf5ff 0%, #f5f3ff 100%);
            border: 1px solid #ddd6fe;
        }
        .ctx-panel .ctx-title {
            font-size: 0.72rem;
            font-weight: 800;
            text-transform: uppercase;
            margin: 0 0 12px;
            display: flex;
            align-items: center;
            gap: 7px;
        }
        .ctx-panel.producto .ctx-title { color: #15803d; }
        .ctx-panel.servicio .ctx-title { color: #7c3aed; }
        @keyframes ctxSlide {
            from { opacity: 0; transform: translateY(-8px); }
            to   { opacity: 1; transform: translateY(0); }
        }

        /* --- Estilos Responsivos Inventario --- */
        @media (max-width: 1024px) {
            .inv-main {
                margin-left: 62px;
                padding: 20px 2%;
            }
        }

        @media (max-width: 768px) {
            .inv-main {
                margin-left: 0;
                padding: 15px 15px 100px;
            }
            .inv-card {
                padding: 25px 20px;
                border-radius: 18px;
            }
            .form-grid-2, .form-grid-3 {
                grid-template-columns: 1fr;
            }
            .import-bar {
                flex-direction: column;
                align-items: flex-start;
            }
            .table-wrap {
                overflow-x: auto;
            }
            .inv-table {
                min-width: 600px;
            }
            .filter-bar {
                flex-direction: column;
                gap: 15px;
                align-items: flex-start;
            }
        }
        }