/* Inventory Module Styles */

/* --- General Layout --- */
.inventory-nav-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 6px;
    background: var(--bg-subtle-gray);
    border-radius: 12px;
    width: fit-content;
}

body[data-theme="dark"] .inventory-nav-tabs {
    background: rgba(148, 163, 184, 0.05);
}

.inventory-nav-tab {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.inventory-nav-tab:hover {
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-color);
}

body[data-theme="dark"] .inventory-nav-tab:hover {
    background: rgba(255, 255, 255, 0.1);
}

.inventory-nav-tab.active {
    background: var(--card-bg-color);
    color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body[data-theme="dark"] .inventory-nav-tab.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* --- Kits / Recetas Styles --- */
.inventory-modern-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem 2rem 1.5rem 2rem;
    border-radius: 12px 12px 0 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.inventory-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.inventory-header-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.inventory-header-title i {
    font-size: 2rem;
    opacity: 0.9;
}

.inventory-header-title h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

.inventory-stats {
    display: flex;
    gap: 1.5rem;
    position: relative;
    z-index: 2;
}

.inventory-stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    color: white;
    min-width: 180px;
    transition: transform 0.2s, background 0.2s;
}

.inventory-stat-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
}

.inventory-stat-item i {
    font-size: 1.5rem;
    opacity: 0.9;
}

.inventory-stat-info {
    display: flex;
    flex-direction: column;
}

.inventory-stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.inventory-stat-value {
    font-size: 1.35rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}

.inventory-stat-item.low-stock-alert {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #ef4444;
}

.inventory-stat-item.low-stock-empty {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

body[data-theme="dark"] .inventory-stat-item.low-stock-empty {
    background: rgba(16, 185, 129, 0.05);
}

.inventory-filters-container {
    background: var(--card-bg-color);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group-modern {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group-modern label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
}

.inventory-main-card {
    border-radius: 16px;
    overflow: hidden;
    border: none;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    background: var(--card-bg-color);
    animation: fadeIn 0.4s ease-out;
}

.filter-control-modern {
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.9rem;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: all 0.3s ease;
    width: 100%;
}

.filter-control-modern:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    outline: none;
    background-color: var(--card-bg-color);
}

.btn-new-item-modern {
    background: var(--card-bg-color);
    color: var(--primary-color);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.btn-new-item-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.product-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bg-subtle-indigo);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
}

.product-info {
    display: flex;
    flex-direction: column;
}

.product-name {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.product-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 8px;
    align-items: center;
}

.price-cell {
    font-family: 'Consolas', monospace;
    font-weight: 600;
    color: var(--text-color);
}

.category-badge {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #4b5563;
}

/* Kit Calculator & Modal */
.kit-calculator {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.calc-item {
    text-align: right;
}

.calc-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 2px;
}

.calc-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
}

.calc-value.cost {
    color: var(--danger-color);
}

.calc-value.profit {
    color: var(--success-color);
}

@keyframes popIn {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* Confetti Animation */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #f00;
    animation: fall linear forwards;
    opacity: 0;
}

@keyframes fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(200px) rotate(720deg);
        opacity: 0;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Conversion De Unidades --- */
.conversion-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-out;
}

.conversion-split-container {
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    gap: 1.5rem;
    align-items: stretch;
    min-height: 500px;
}

.conversion-card {
    background: var(--card-bg-color);
    border-radius: 20px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.conversion-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
}

.card-type-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.card-type-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.source-theme .card-type-icon {
    background: #fee2e2;
    color: #ef4444;
}

.source-theme h3 {
    color: #b91c1c;
    margin: 0;
    font-weight: 700;
}

.dest-theme .card-type-icon {
    background: #dcfce7;
    color: #10b981;
}

.dest-theme h3 {
    color: #047857;
    margin: 0;
    font-weight: 700;
}

.product-preview-box {
    cursor: pointer;
    background: var(--bg-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    text-align: center;
    border: 2px dashed var(--border-color);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    transition: all 0.3s;
}

.product-preview-box.active {
    background: var(--card-bg-color);
    border-style: solid;
    border-color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.1);
}

.pp-big-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    transition: all 0.3s;
}

.active .pp-big-icon {
    color: var(--primary-color);
    transform: scale(1.1);
}

.pp-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.pp-stock {
    font-size: 0.9rem;
    color: var(--text-muted);
    background: var(--border-color);
    padding: 4px 12px;
    border-radius: 20px;
}

.center-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.flow-arrow {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.4);
    animation: pulse-glow 2s infinite;
}

.control-group-lg {
    margin-bottom: 2rem;
}

.control-group-lg label {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.input-brutal {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    outline: none;
    transition: all 0.2s;
    background: var(--bg-color);
}

.input-brutal:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.action-bar-brutal {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.btn-action-brutal {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: 16px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.4);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-action-brutal:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 30px -10px rgba(79, 70, 229, 0.5);
}

.btn-action-brutal:active {
    transform: translateY(1px);
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .conversion-split-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .center-connector {
        transform: rotate(90deg);
        margin: 1rem 0;
    }
}

/* Conversion Animation Modal */
.conv-anim-stage {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3rem 1rem;
    position: relative;
    background: var(--bg-color);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.conv-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    width: 120px;
    transition: all 0.5s ease;
}

.conv-icon-box {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--card-bg-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.3s;
}

.source-box .conv-icon-box {
    color: #ef4444;
    border: 2px solid #fee2e2;
}

.dest-box .conv-icon-box {
    color: #10b981;
    border: 2px solid #d1fae5;
}

.conv-label {
    font-weight: 600;
    text-align: center;
    font-size: 0.9rem;
    color: #475569;
    opacity: 0;
    animation: fadeInName 0.5s forwards 0.2s;
}

@keyframes fadeInName {
    to {
        opacity: 1;
    }
}

/* Animation States */
.anim-step-1 .source-box .conv-icon-box {
    animation: shake 0.5s ease-in-out, openLid 0.5s forwards 0.5s;
    border-color: #ef4444;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px) rotate(-5deg);
    }

    75% {
        transform: translateX(5px) rotate(5deg);
    }
}

.particle {
    position: absolute;
    left: 20%;
    top: 50%;
    width: 20px;
    height: 20px;
    background: #6366f1;
    border-radius: 4px;
    opacity: 0;
    z-index: 1;
}

.anim-step-2 .particle {
    animation: flyOver 1s cubic-bezier(0.45, 0.05, 0.55, 0.95) forwards;
}

@keyframes flyOver {
    0% {
        transform: translate(0, 0) scale(0.5);
        opacity: 0;
        left: 15%;
    }

    20% {
        opacity: 1;
        transform: translate(0, -20px) scale(1);
    }

    80% {
        opacity: 1;
        transform: translate(calc(100% + 150px), -20px) scale(1);
        /* Approx distance to dest */
        left: 15%;
    }

    100% {
        transform: translate(calc(100% + 180px), 0) scale(0.5);
        opacity: 0;
        left: 15%;
    }
}

.anim-step-3 .dest-box .conv-icon-box {
    animation: bounce 0.5s ease infinite;
}

.anim-step-4 .dest-box .conv-icon-box {
    animation: popSuccess 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    background: #10b981;
    color: white;
    border-color: #10b981;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes popSuccess {
    0% {
        transform: scale(0.8);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes openLid {
    to {
        transform: translateY(5px);
        box-shadow: inset 0 10px 10px -5px rgba(0, 0, 0, 0.1);
        background: #fef2f2;
    }
}

.conv-status-text {
    text-align: center;
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    min-height: 24px;
    font-weight: 500;
}

/* --- Adjustments Styles --- */
.adj-summary-group {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.adj-h {
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.adj-list {
    max-height: 100px;
    overflow-y: auto;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.processing-anim {
    text-align: center;
    padding: 2rem;
}

.scan-line {
    height: 4px;
    background: var(--primary-color);
    width: 100%;
    animation: scan 1.5s infinite linear;
    border-radius: 2px;
}

@keyframes scan {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.adjust-row {
    transition: transform 0.2s, box-shadow 0.2s;
}

.adjust-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025) !important;
    z-index: 10;
    position: relative;
}

.qty-pill {
    display: inline-flex;
    align-items: center;
    background: var(--bg-color);
    border-radius: 50px;
    padding: 4px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.qty-pill:focus-within {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
    transform: translateY(-1px);
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--card-bg-color);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
    font-size: 0.9rem;
}

.qty-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 4px 6px -1px rgba(var(--primary-rgb), 0.3);
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-input {
    width: 80px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 700;
    font-size: 1.1rem;
    color: #334155;
    outline: none;
    font-family: inherit;
}

.th-custom {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-bottom: 1rem;
}

/* Filter focus styles */
#adjust-search:focus,
#adjust-category-filter:focus,
#adjust-status-filter:focus {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

/* --- Transfers Styles --- */
.transfer-tab {
    background: transparent;
    border: none;
    padding: 8px 24px;
    cursor: pointer;
    color: #64748b;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.transfer-tab:hover {
    color: var(--text-color);
}

.transfer-tab.active {
    background: var(--card-bg-color);
    color: var(--primary-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.badge-count {
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 99px;
    min-width: 18px;
    text-align: center;
}

.transfer-card {
    background: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.transfer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    border-color: #cbd5e1;
}

.t-status {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-PENDING {
    background: var(--bg-subtle-orange);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-COMPLETED {
    background: var(--bg-subtle-emerald);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-CANCELLED {
    background: var(--bg-subtle-red);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.transfer-row-anim {
    animation: slideInUp 0.3s ease-out forwards;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* TomSelect Fixes for Transfers */
.ts-dropdown {
    z-index: 10000 !important;
}

.ts-wrapper.single .ts-control {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding-left: 2rem !important;
}

/* Custom Scrollbar for dropdown */
.ts-dropdown-content::-webkit-scrollbar {
    width: 6px;
}

.ts-dropdown-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

/* Search Icon in TomSelect */
.ts-wrapper::before {
    content: '\f002';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 10px;
    top: 12px;
    color: #94a3b8;
    z-index: 1;
    pointer-events: none;
    font-size: 0.9rem;
}

/* --- Import/Export Styles --- */
.impex-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 1rem;
}

.impex-card {
    background: var(--card-bg-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s;
}

.impex-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.impex-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.impex-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.impex-desc {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    background: var(--bg-color);
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.drop-zone i {
    font-size: 2rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.preview-table-container {
    margin-top: 2rem;
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    display: none;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.preview-table th {
    background: var(--bg-color);
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.preview-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-color);
}

.step-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
}

.step-number {
    width: 24px;
    height: 24px;
    background: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
}

/* --- Tags Styles --- */
.tag-icon-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.tag-icon-option.selected {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.tag-icon-option.selected i {
    color: white !important;
}

/* --- Inventory Table Premium Styles --- */
.inventory-main-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    /* Spaced row effect */
    margin-top: -8px;
}

.inventory-main-table thead th {
    background: transparent;
    color: var(--text-muted);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    padding: 18px 24px;
    border: none;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
}

body[data-theme="dark"] .inventory-main-table thead th {
    background: rgba(15, 23, 42, 0.3);
    color: #94a3b8;
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.inventory-main-table tbody tr {
    background: var(--card-bg-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.inventory-main-table tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -10px rgba(0, 0, 0, 0.1);
    z-index: 10;
    position: relative;
    background: var(--card-bg-color);
}

body[data-theme="dark"] .inventory-main-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
    box-shadow: 0 12px 20px -10px rgba(0, 0, 0, 0.3);
}

.inventory-main-table td {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.inventory-main-table td:first-child {
    border-left: 1px solid var(--border-color);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.inventory-main-table td:last-child {
    border-right: 1px solid var(--border-color);
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Product Cell & Icons */
.product-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.product-icon-wrapper .p-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-name {
    font-weight: 700;
    color: var(--text-color);
    font-size: 0.95rem;
}

.product-sub {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.p-sku i {
    font-size: 0.7rem;
    margin-right: 4px;
    opacity: 0.7;
}

/* Category Badge */
.category-badge-modern {
    background: var(--bg-subtle-indigo);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Stock Pills */
.stock-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.85rem;
}

.stock-pill i {
    font-size: 0.9rem;
}

.stock-pill.stock-high {
    background: var(--bg-subtle-emerald);
    color: var(--success-color);
}

.stock-pill.stock-medium {
    background: var(--bg-subtle-orange);
    color: var(--warning-color);
}

.stock-pill.stock-low {
    background: var(--bg-subtle-red);
    color: var(--danger-color);
    animation: pulseAlpha 2s infinite;
}

.badge-service {
    background: var(--bg-subtle-gray);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Action Buttons */
.btn-action-premium {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--card-bg-color);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 4px;
}

.btn-action-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-action-premium.edit:hover {
    color: #6366f1;
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
}

.btn-action-premium.log:hover {
    color: #8b5cf6;
    border-color: #8b5cf6;
    background: rgba(139, 92, 241, 0.05);
}

.btn-action-premium.deactivate:hover {
    color: #ef4444;
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.btn-action-premium.activate:hover {
    color: #10b981;
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

/* Price Styling */
.price-cell-brutal {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 800;
    color: var(--primary-color);
    font-size: 1rem;
}

.cost-cell {
    font-family: 'Outfit', 'Inter', sans-serif;
    color: var(--text-muted);
    font-weight: 500;
}

@keyframes pulseAlpha {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.2);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.inventory-main-table tbody tr {
    animation: fadeInUp 0.4s ease-out forwards;
}
/* --- Serial Management Styles --- */
.serial-summary {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.serial-summary-card {
    flex: 1;
    min-width: 120px;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.serial-summary-card:hover { transform: translateY(-3px); }

.sc-count { font-size: 1.5rem; font-weight: 800; margin-bottom: 4px; }
.sc-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; opacity: 0.8; }

.sc-en_stock { background: #ecfdf5; color: #059669; border: 1px solid #10b98130; }
.sc-vendido { background: #eff6ff; color: #2563eb; border: 1px solid #3b82f630; }
.sc-reservado { background: #fffbeb; color: #d97706; border: 1px solid #f59e0b30; }
.sc-defectuoso { background: #fef2f2; color: #dc2626; border: 1px solid #ef444430; }
.sc-devuelto { background: #f5f3ff; color: #7c3aed; border: 1px solid #8b5cf630; }

.serial-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.serial-table th {
    background: #f8fafc;
    padding: 12px 15px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    border-bottom: 2px solid #e2e8f0;
}

.serial-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.chip-estado {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.chip-estado.EN_STOCK { background: #d1fae5; color: #065f46; }
.chip-estado.VENDIDO { background: #dbeafe; color: #1e40af; }
.chip-estado.RESERVADO { background: #fef3c7; color: #92400e; }
.chip-estado.DEFECTUOSO { background: #fee2e2; color: #991b1b; }
.chip-estado.DEVUELTO { background: #ede9fe; color: #5b21b6; }

/* --- Loading / Skeleton Styles --- */
.inventory-loading-container {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeIn 0.3s ease-in;
}

.skeleton-header {
    height: 120px;
    background: linear-gradient(90deg, var(--bg-subtle-gray) 25%, var(--border-color) 50%, var(--bg-subtle-gray) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 12px;
}

.skeleton-filters {
    height: 50px;
    background: linear-gradient(90deg, var(--bg-subtle-gray) 25%, var(--border-color) 50%, var(--bg-subtle-gray) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 10px;
    width: 70%;
}

.skeleton-table {
    height: 350px;
    background: linear-gradient(90deg, var(--bg-subtle-gray) 25%, var(--border-color) 50%, var(--bg-subtle-gray) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 12px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.loading-text-ux {
    text-align: center;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 0.5rem;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    font-family: 'Outfit', sans-serif;
}

body[data-theme="dark"] .skeleton-header,
body[data-theme="dark"] .skeleton-filters,
body[data-theme="dark"] .skeleton-table {
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.5) 25%, rgba(51, 65, 85, 0.8) 50%, rgba(30, 41, 59, 0.5) 75%);
    background-size: 200% 100%;
}
