/* =========================================================
   Inventory Module - Glassmorphism & Apple macOS Tokens
   /modules/inventory/css/inventory_main.css
   ========================================================= */

.inventory-header-icon {
    width: 46px;
    height: 46px;
    background: rgba(var(--bs-primary-rgb), 0.12);
    color: var(--apple-accent-color, #0d6efd);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================================
   Unified macOS Command Hub & Segmented Control Navigation
   ========================================================= */

.inventory-command-hub {
    background-color: var(--apple-card-bg) !important;
    border: 1px solid var(--apple-card-border) !important;
    border-radius: 1.25rem !important;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
    z-index: 1020;
    overflow: visible !important;
}

[data-bs-theme="dark"] .inventory-command-hub {
    background-color: var(--apple-card-bg-dark, rgba(30, 30, 35, 0.7)) !important;
    border-color: var(--apple-card-border-dark, rgba(255, 255, 255, 0.1)) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

/* Ensure Добави Dropdown Menu Floats Above Segmented Tabs and Following Content */
.inventory-command-hub .btn-group {
    position: relative;
    z-index: 1030;
}

.inventory-command-hub .dropdown-menu {
    z-index: 1060 !important;
    min-width: 230px;
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 0.85rem !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16), 0 3px 8px rgba(0, 0, 0, 0.08) !important;
    padding: 6px !important;
}

[data-bs-theme="dark"] .inventory-command-hub .dropdown-menu {
    background: #212529 !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75) !important;
}

.inventory-command-hub .dropdown-menu .dropdown-item {
    font-weight: 500;
    font-size: 0.88rem;
    padding: 8px 12px;
    border-radius: 0.55rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.inventory-command-hub .dropdown-menu .dropdown-item:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.08);
}

[data-bs-theme="dark"] .inventory-command-hub .dropdown-menu .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

/* Filter Bar Reset Icon Button Polish */
.inventory-reset-btn {
    border-color: var(--apple-card-border);
    color: var(--apple-secondary-text, var(--bs-secondary-color));
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.inventory-reset-btn:hover {
    background-color: rgba(var(--bs-danger-rgb), 0.1) !important;
    border-color: rgba(var(--bs-danger-rgb), 0.35) !important;
    color: var(--bs-danger) !important;
    transform: rotate(-15deg);
}

/* Filter Bar Full-Width Flex Layout */
.inventory-filter-bar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

@media (min-width: 768px) {
    .inventory-filter-bar {
        flex-direction: row;
        align-items: center;
    }
}

.inventory-filter-search {
    flex: 3 1 260px;
    min-width: 220px;
}

.inventory-filter-item {
    flex: 1.5 1 160px;
    min-width: 140px;
}

.inventory-filter-item-sm {
    flex: 1.2 1 140px;
    min-width: 120px;
}

.inventory-filter-item-lg {
    flex: 2 1 200px;
    min-width: 160px;
}

.inventory-filter-bar .tagify,
.inventory-filter-bar .input-group,
.inventory-filter-bar .form-control {
    width: 100% !important;
}


.inventory-segmented-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Apple macOS Inset Segmented Navigation Track - Full Width Expansion */
.inventory-segmented-nav,
.inventory-nav-tabs {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 8px;
    background: rgba(var(--bs-tertiary-bg-rgb, 240, 242, 245), 0.65);
    border: 1px solid var(--apple-card-border);
    padding: 5px;
    border-radius: 0.95rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    margin-bottom: 0;
    list-style: none;
    flex-wrap: nowrap;
}

.inventory-segmented-nav .nav-item,
.inventory-nav-tabs .nav-item {
    flex: 1 1 0;
    display: flex;
    min-width: fit-content;
}

/* Individual Segmented Tab Button */
.inventory-segmented-nav .nav-link,
.inventory-segmented-tab,
.inventory-nav-tabs .nav-link {
    border: none;
    color: var(--apple-secondary-text, var(--bs-secondary-color));
    font-weight: 600;
    font-size: 0.9rem;
    padding: 9px 18px;
    border-radius: 0.75rem;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 10px;
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
}

.inventory-segmented-nav .nav-link:hover,
.inventory-segmented-tab:hover,
.inventory-nav-tabs .nav-link:hover {
    color: var(--apple-text-color, var(--bs-body-color));
    background: var(--apple-hover-bg, rgba(0, 0, 0, 0.04));
    transform: translateY(-1px);
}

/* Active Segmented Tab Pill */
.inventory-segmented-nav .nav-link.active,
.inventory-segmented-tab.active,
.inventory-nav-tabs .nav-link.active {
    color: var(--bs-body-color) !important;
    background: #ffffff !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    font-weight: 700;
}

[data-bs-theme="dark"] .inventory-segmented-nav .nav-link.active,
[data-bs-theme="dark"] .inventory-segmented-tab.active,
[data-bs-theme="dark"] .inventory-nav-tabs .nav-link.active {
    background: rgba(255, 255, 255, 0.14) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .inventory-segmented-nav,
[data-bs-theme="dark"] .inventory-nav-tabs {
    background: rgba(0, 0, 0, 0.35) !important;
    border-color: rgba(255, 255, 255, 0.09) !important;
}

/* Category Icon Token inside Tab */
.inventory-tab-icon-token {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.inventory-segmented-tab:hover .inventory-tab-icon-token,
.inventory-nav-tabs .nav-link:hover .inventory-tab-icon-token {
    transform: scale(1.08);
}

.inventory-segmented-tab.active .inventory-tab-icon-token,
.inventory-nav-tabs .nav-link.active .inventory-tab-icon-token {
    transform: scale(1.1);
}

.inventory-tab-icon-token.icon-all {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
}

[data-bs-theme="dark"] .inventory-tab-icon-token.icon-all {
    color: #818cf8;
}

.inventory-tab-icon-token.icon-assets {
    background: rgba(var(--bs-primary-rgb), 0.14);
    color: var(--apple-accent-color, #0d6efd);
}

.inventory-tab-icon-token.icon-consumables {
    background: rgba(13, 202, 240, 0.15);
    color: #0891b2;
}

.inventory-tab-icon-token.icon-offcuts {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.inventory-tab-icon-token.icon-talpi {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

[data-bs-theme="dark"] .inventory-tab-icon-token.icon-talpi {
    color: #34d399;
}

/* Tab Counter Pill Badges */
.inventory-tab-pill-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    letter-spacing: 0.02em;
    background: rgba(var(--bs-secondary-rgb, 108, 117, 125), 0.12);
    color: var(--apple-secondary-text, var(--bs-secondary-color));
    transition: all 0.2s ease;
}

.inventory-segmented-tab.active .inventory-tab-pill-badge,
.inventory-nav-tabs .nav-link.active .inventory-tab-pill-badge {
    background: rgba(var(--bs-primary-rgb), 0.14) !important;
    color: var(--apple-accent-color, #0d6efd) !important;
}

[data-bs-theme="dark"] .inventory-tab-pill-badge {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

[data-bs-theme="dark"] .inventory-segmented-tab.active .inventory-tab-pill-badge,
[data-bs-theme="dark"] .inventory-nav-tabs .nav-link.active .inventory-tab-pill-badge {
    background: rgba(var(--bs-primary-rgb), 0.25) !important;
    color: var(--apple-accent-color, #8f8dff) !important;
}

/* Active Status Pulse Dot */
.inventory-active-indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--apple-accent-color, #0d6efd);
    display: inline-block;
    box-shadow: 0 0 8px var(--apple-accent-color, rgba(13, 110, 253, 0.6));
    flex-shrink: 0;
}

.inventory-kpi-card {
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
    border: 1px solid var(--apple-card-border) !important;
    border-radius: 1rem;
    background-color: var(--apple-card-bg) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.inventory-kpi-card:hover {
    background: rgba(var(--bs-body-tertiary-bg-rgb), 0.85) !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    border-color: var(--apple-accent-color) !important;
}

.inventory-kpi-card:active {
    transform: translateY(-1px) scale(0.99);
}

.inventory-kpi-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.inventory-kpi-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--apple-secondary-text, var(--bs-secondary-color));
    margin-bottom: 2px;
}

.inventory-kpi-value {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.inventory-table-wrapper {
    background-color: var(--apple-card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--apple-card-border);
    border-radius: 1rem;
    overflow: hidden;
}

.inventory-table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
}

.inventory-table thead th {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--apple-secondary-text, var(--bs-secondary-color));
    background: rgba(var(--bs-body-tertiary-bg-rgb), 0.5);
    border-bottom: 1px solid var(--apple-card-border);
    padding: 12px 14px;
}

.inventory-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.1);
    vertical-align: middle;
}

.inventory-table tbody tr:last-child td {
    border-bottom: none;
}

/* =========================================================
   TAGIFY INVENTORY POLISHED SELECT MODE (STRICTLY SCOPED TO INVENTORY)
   ========================================================= */
/* Completely hide original input elements replaced by Tagify within Inventory */
#inventory-main-container input.tagify--hidden,
#inventory-settings-container input.tagify--hidden,
[id^="inventoryModal"] input.tagify--hidden {
    display: none !important;
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: none !important;
}

#inventory-main-container .tagify,
#inventory-settings-container .tagify,
[id^="inventoryModal"] .tagify {
    border-radius: 0.5rem !important;
    background: rgba(var(--bs-body-bg-rgb), 0.9) !important;
    border: 1px solid var(--apple-card-border, #dee2e6) !important;
    min-height: 38px !important;
    height: 38px !important;
    max-height: 38px !important;
    padding: 0 !important;
    position: relative !important;
    box-sizing: border-box !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#inventory-main-container .tagify:hover,
#inventory-settings-container .tagify:hover,
[id^="inventoryModal"] .tagify:hover,
#inventory-main-container .tagify.tagify--focus,
#inventory-settings-container .tagify.tagify--focus,
[id^="inventoryModal"] .tagify.tagify--focus {
    border-color: var(--apple-accent-color, #0d6efd) !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15) !important;
}

/* Tag overlay ONLY in select mode (tagify--select) within Inventory */
#inventory-main-container .tagify.tagify--select .tagify__tag,
#inventory-settings-container .tagify.tagify--select .tagify__tag,
[id^="inventoryModal"] .tagify.tagify--select .tagify__tag {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0.75rem !important;
    right: 2rem !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    pointer-events: none;
    overflow: hidden !important;
}

#inventory-main-container .tagify.tagify--select .tagify__tag>div,
#inventory-settings-container .tagify.tagify--select .tagify__tag>div,
[id^="inventoryModal"] .tagify.tagify--select .tagify__tag>div {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    width: 100% !important;
    overflow: hidden !important;
}

#inventory-main-container .tagify.tagify--select .tagify__tag-text,
#inventory-settings-container .tagify.tagify--select .tagify__tag-text,
[id^="inventoryModal"] .tagify.tagify--select .tagify__tag-text {
    font-size: 0.9rem !important;
    font-weight: 400 !important;
    color: var(--bs-body-color) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    line-height: normal !important;
    max-width: 100% !important;
}

#inventory-main-container .tagify.tagify--select .tagify__tag-text i,
#inventory-settings-container .tagify.tagify--select .tagify__tag-text i,
[id^="inventoryModal"] .tagify.tagify--select .tagify__tag-text i {
    font-size: 1rem !important;
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1 !important;
}

/* Hide remove button ONLY in select mode within Inventory */
#inventory-main-container .tagify.tagify--select .tagify__tag__removeBtn,
#inventory-settings-container .tagify.tagify--select .tagify__tag__removeBtn,
[id^="inventoryModal"] .tagify.tagify--select .tagify__tag__removeBtn {
    display: none !important;
}

/* Placeholder and text input ONLY in select mode within Inventory */
#inventory-main-container .tagify.tagify--select .tagify__input,
#inventory-settings-container .tagify.tagify--select .tagify__input,
[id^="inventoryModal"] .tagify.tagify--select .tagify__input {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0.75rem !important;
    right: 2rem !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    font-size: 0.9rem !important;
    line-height: normal !important;
    caret-color: transparent !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

/* Hide placeholder text when a tag is selected ONLY in select mode */
#inventory-main-container .tagify.tagify--select:has(.tagify__tag) .tagify__input::before,
#inventory-main-container .tagify.tagify--select.tagify--has-tags .tagify__input::before,
#inventory-settings-container .tagify.tagify--select:has(.tagify__tag) .tagify__input::before,
#inventory-settings-container .tagify.tagify--select.tagify--has-tags .tagify__input::before,
[id^="inventoryModal"] .tagify.tagify--select:has(.tagify__tag) .tagify__input::before,
[id^="inventoryModal"] .tagify.tagify--select.tagify--has-tags .tagify__input::before {
    display: none !important;
    content: '' !important;
}

#inventory-main-container .tagify.tagify--select .tagify__input::before,
#inventory-settings-container .tagify.tagify--select .tagify__input::before,
[id^="inventoryModal"] .tagify.tagify--select .tagify__input::before {
    position: static !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    line-height: normal !important;
    color: var(--bs-secondary-color, #6c757d) !important;
    font-weight: 400 !important;
    opacity: 0.75 !important;
    white-space: nowrap !important;
}

/* Dropdown arrow on the right side */
#inventory-main-container .tagify.tagify--select::after,
#inventory-settings-container .tagify.tagify--select::after,
[id^="inventoryModal"] .tagify.tagify--select::after {
    right: 0.75rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    border-top-color: var(--bs-secondary-color, #6c757d) !important;
    pointer-events: none !important;
}

/* Hide number input spinners inside Inventory modals */
[id^="inventoryModal"] input[type=number]::-webkit-inner-spin-button,
[id^="inventoryModal"] input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

[id^="inventoryModal"] input[type=number] {
    -moz-appearance: textfield;
}

/* Modal Grouping Cards */
.inventory-modal-section {
    background: rgba(var(--bs-body-tertiary-bg-rgb), 0.4);
    border: 1px solid var(--apple-card-border, rgba(0, 0, 0, 0.06));
    border-radius: 0.75rem;
    padding: 1rem;
}

.inventory-modal-section-title {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bs-secondary-color, #6c757d);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.inventory-site-card {
    border-radius: 1rem;
    background-color: var(--apple-card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--apple-card-border);
    transition: all 0.2s ease;
}

.inventory-site-card:hover {
    border-color: var(--apple-accent-color, #0d6efd);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

/* Dark Mode Adjustments */
[data-bs-theme="dark"] .inventory-nav-tabs .nav-link.active {
    background: rgba(255, 255, 255, 0.12);
    color: var(--apple-accent-color, #8f8dff);
}

[data-bs-theme="dark"] .inventory-nav-tabs .nav-link:hover {
    background: var(--apple-hover-bg, rgba(255, 255, 255, 0.08));
}

[data-bs-theme="dark"] .inventory-kpi-card {
    background-color: var(--apple-card-bg-dark) !important;
    border-color: var(--apple-card-border-dark) !important;
}

/* Multi-select Tagify tags styling in Inventory */
#inventory-main-container .tagify:not(.tagify--select),
[id^="inventoryModal"] .tagify:not(.tagify--select) {
    min-height: 38px;
    height: auto !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    padding: 2px 6px !important;
    border-radius: 0.5rem;
}

#inventory-main-container .tagify:not(.tagify--select) .tagify__tag,
[id^="inventoryModal"] .tagify:not(.tagify--select) .tagify__tag {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    margin: 2px 3px !important;
    padding: 2px 6px !important;
    border-radius: 20px !important;
    background: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.12) !important;
    border: 1px solid rgba(var(--bs-primary-rgb, 13, 110, 253), 0.25) !important;
    pointer-events: auto !important;
    height: auto !important;
    width: auto !important;
}

#inventory-main-container .tagify:not(.tagify--select) .tagify__tag-text,
[id^="inventoryModal"] .tagify:not(.tagify--select) .tagify__tag-text {
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    color: var(--bs-primary) !important;
    padding-right: 2px;
}

#inventory-main-container .tagify:not(.tagify--select) .tagify__tag__removeBtn,
[id^="inventoryModal"] .tagify:not(.tagify--select) .tagify__tag__removeBtn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0.7;
    margin-left: 3px;
    cursor: pointer;
    border-radius: 50%;
}

#inventory-main-container .tagify:not(.tagify--select) .tagify__tag__removeBtn:hover,
[id^="inventoryModal"] .tagify:not(.tagify--select) .tagify__tag__removeBtn:hover {
    opacity: 1;
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

#inventory-main-container .tagify:not(.tagify--select) .tagify__input,
[id^="inventoryModal"] .tagify:not(.tagify--select) .tagify__input {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    min-height: 32px !important;
    margin: 0 4px !important;
    padding: 0 2px !important;
    height: 100% !important;
    width: auto !important;
    min-width: 140px !important;
    caret-color: auto !important;
    line-height: normal !important;
}

#inventory-main-container .tagify:not(.tagify--select) .tagify__input::before,
[id^="inventoryModal"] .tagify:not(.tagify--select) .tagify__input::before {
    display: inline-flex !important;
    align-items: center !important;
    top: 0 !important;
    bottom: 0 !important;
    height: 100% !important;
    line-height: 1 !important;
    margin: auto 0 !important;
    transform: none !important;
}

/* Specific vertical centering for General (Планки / Шини / ЕЗМ) Filter Bar */
#requests-general-container .tagify {
    min-height: 38px !important;
    height: 38px !important;
    max-height: 38px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 0.5rem !important;
    border-radius: 0.5rem !important;
    background: rgba(var(--bs-body-bg-rgb), 0.9) !important;
    border: 1px solid var(--apple-card-border, #dee2e6) !important;
    box-sizing: border-box !important;
}

#requests-general-container .tagify:not(.tagify--select) {
    height: auto !important;
    min-height: 38px !important;
    max-height: none !important;
}

#requests-general-container .tagify .tagify__input {
    display: flex !important;
    align-items: center !important;
    min-height: 36px !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 0.25rem !important;
    line-height: 1.4 !important;
}

#requests-general-container .tagify .tagify__input::before {
    display: flex !important;
    align-items: center !important;
    top: 0 !important;
    bottom: 0 !important;
    height: 100% !important;
    line-height: 1.4 !important;
    margin: auto 0 !important;
    transform: none !important;
    color: var(--bs-secondary-color, #6c757d) !important;
    opacity: 0.75 !important;
    font-size: 0.88rem !important;
}

/* =========================================================
   Inventory Settings - macOS System Settings Style Sidebar
   ========================================================= */
.inventory-settings-sidebar {
    background-color: var(--apple-card-bg) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--apple-card-border) !important;
    transition: all 0.25s ease;
}

.inventory-sidebar-heading {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--apple-secondary-text, var(--bs-secondary-color));
    opacity: 0.85;
}

.inventory-settings-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.inventory-settings-nav .nav-link {
    color: var(--apple-secondary-text, var(--bs-secondary-color));
    font-weight: 500;
    font-size: 0.88rem;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    user-select: none;
}

.inventory-settings-nav .nav-link:hover {
    color: var(--apple-accent-color);
    background: rgba(var(--bs-primary-rgb), 0.08);
    transform: translateX(3px);
}

.inventory-settings-nav .nav-link:hover .nav-link-icon {
    transform: scale(1.1);
    color: var(--apple-accent-color);
}

.inventory-settings-nav .nav-link .nav-link-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    transition: transform 0.2s ease, color 0.2s ease;
}

.inventory-settings-nav .nav-link.active {
    color: var(--apple-accent-color) !important;
    background: rgba(var(--bs-primary-rgb), 0.12) !important;
    border-color: rgba(var(--bs-primary-rgb), 0.28) !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(var(--bs-primary-rgb), 0.12);
}

.inventory-settings-nav .nav-link.active .nav-link-icon {
    color: var(--apple-accent-color) !important;
}

.inventory-settings-nav .nav-link .count-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.55rem;
    border-radius: 50rem;
    transition: all 0.2s ease;
    background-color: rgba(139, 139, 167, 0.15);
    color: var(--apple-secondary-text, #8B8BA7);
}

.inventory-settings-nav .nav-link.active .count-badge {
    background-color: var(--apple-accent-color) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(var(--bs-primary-rgb), 0.4);
}

@media (max-width: 991.98px) {
    .inventory-settings-sidebar {
        position: static !important;
        margin-bottom: 0.5rem;
    }

    .inventory-settings-nav .nav-link:hover {
        transform: none;
    }
}

/* =========================================================
   Harmonious Modern Color Palette Tokens
   Blurple, Seafoam Mint, Sunglow, Hot Pink, Cyan, Slate, Navy
   ========================================================= */
:root {
    --nom-blurple: #6C63FF;
    /* Primary / Brand */
    --nom-purple: #A855F7;
    /* Neon Violet / Orchid */
    --nom-cyan: #4CC9F0;
    /* Electric Tech Cyan - Info / Power */
    --nom-teal: #2DD4BF;
    /* Electric Teal / Spearmint */
    --nom-seafoam: #00C49A;
    /* Secondary Accent - Success / Active */
    --nom-sunglow: #FFD166;
    /* Secondary Accent - Warning / Special */
    --nom-orange: #FB923C;
    /* Sunset Orange / Tangerine - On Site / In Transit */
    --nom-hotpink: #FF6B6B;
    /* Secondary Accent - Danger / Urgent */
    --nom-slate: #8B8BA7;
    /* Lavender Slate - Inactive / Neutral */
    --nom-navy: #1A1A2E;
    /* Deep Navy / Dark Jewel */
    --nom-bg-light: #F9F9FB;
    /* Snow / Ghost White */
    --nom-text-dark: #2D3142;
    /* Slate Blue-Gray */
    --nom-text-light: #F1F5F9;
    /* Off-White */
}

/* Container Glassmorphism Accents */
#inventory-settings-container .inventory-settings-sidebar,
#inventory-settings-container .card-glass {
    border: 1px solid rgba(var(--bs-primary-rgb), 0.14) !important;
}

[data-bs-theme="dark"] #inventory-settings-container .inventory-settings-sidebar,
[data-bs-theme="dark"] #inventory-settings-container .card-glass {
    border: 1px solid rgba(var(--bs-primary-rgb), 0.22) !important;
    background: rgba(15, 23, 42, 0.78) !important;
}

/* Nomenclature Icon Badges (Circle with soft tint + solid icon) */
/* Header and Title Icon Containers - Solid Accent with Pure White Icons */
.inventory-header-icon,
.modal-header-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--apple-accent-color) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 14px var(--button-glow, rgba(var(--bs-primary-rgb), 0.35)) !important;
    flex-shrink: 0;
}

.inventory-header-icon i,
.modal-header-icon-box i {
    color: #ffffff !important;
    -webkit-text-stroke: 0.4px #ffffff !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25)) !important;
}

/* Nomenclature Icon Badges (Circle / Squircle with defined tint + border) */
.nom-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    transition: all 0.2s ease;
    border: 1.5px solid transparent;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.nom-color-primary,
.nom-color-blurple {
    background: rgba(var(--bs-primary-rgb), 0.14) !important;
    color: var(--apple-accent-color) !important;
    border-color: rgba(var(--bs-primary-rgb), 0.28) !important;
}

.nom-color-purple,
.nom-color-violet {
    background: rgba(168, 85, 247, 0.14) !important;
    color: #A855F7 !important;
    border-color: rgba(168, 85, 247, 0.3) !important;
}

.nom-color-info,
.nom-color-cyan {
    background: rgba(76, 201, 240, 0.16) !important;
    color: #0284c7 !important;
    border-color: rgba(76, 201, 240, 0.35) !important;
}

.nom-color-teal {
    background: rgba(45, 212, 191, 0.16) !important;
    color: #0d9488 !important;
    border-color: rgba(45, 212, 191, 0.35) !important;
}

.nom-color-success,
.nom-color-seafoam {
    background: rgba(0, 196, 154, 0.14) !important;
    color: #00C49A !important;
    border-color: rgba(0, 196, 154, 0.3) !important;
}

.nom-color-warning,
.nom-color-sunglow {
    background: rgba(255, 209, 102, 0.18) !important;
    color: #d97706 !important;
    border-color: rgba(255, 209, 102, 0.4) !important;
}

.nom-color-orange {
    background: rgba(251, 146, 60, 0.16) !important;
    color: #ea580c !important;
    border-color: rgba(251, 146, 60, 0.35) !important;
}

.nom-color-danger,
.nom-color-hotpink {
    background: rgba(255, 107, 107, 0.14) !important;
    color: #FF6B6B !important;
    border-color: rgba(255, 107, 107, 0.3) !important;
}

.nom-color-secondary,
.nom-color-slate {
    background: rgba(139, 139, 167, 0.14) !important;
    color: #8B8BA7 !important;
    border-color: rgba(139, 139, 167, 0.3) !important;
}

.nom-color-dark,
.nom-color-navy {
    background: rgba(26, 26, 46, 0.12) !important;
    color: #2D3142 !important;
    border-color: rgba(26, 26, 46, 0.25) !important;
}

[data-bs-theme="dark"] .nom-color-warning,
[data-bs-theme="dark"] .nom-color-sunglow {
    color: #FFD166 !important;
    border-color: rgba(255, 209, 102, 0.35) !important;
}

[data-bs-theme="dark"] .nom-color-info,
[data-bs-theme="dark"] .nom-color-cyan {
    color: #4CC9F0 !important;
    border-color: rgba(76, 201, 240, 0.35) !important;
}

[data-bs-theme="dark"] .nom-color-teal {
    color: #2DD4BF !important;
    border-color: rgba(45, 212, 191, 0.35) !important;
}

[data-bs-theme="dark"] .nom-color-orange {
    color: #FB923C !important;
    border-color: rgba(251, 146, 60, 0.35) !important;
}

[data-bs-theme="dark"] .nom-color-dark,
[data-bs-theme="dark"] .nom-color-navy {
    background: rgba(241, 245, 249, 0.12) !important;
    color: #F1F5F9 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Solid Badges in Table and Modal */
.nom-pill-primary,
.nom-pill-blurple {
    background-color: var(--apple-accent-color) !important;
    color: #ffffff !important;
}

.nom-pill-purple,
.nom-pill-violet {
    background-color: #A855F7 !important;
    color: #ffffff !important;
}

.nom-pill-info,
.nom-pill-cyan {
    background-color: #4CC9F0 !important;
    color: #0F172A !important;
    font-weight: 700 !important;
}

.nom-pill-teal {
    background-color: #2DD4BF !important;
    color: #0F172A !important;
    font-weight: 700 !important;
}

.nom-pill-success,
.nom-pill-seafoam {
    background-color: #00C49A !important;
    color: #ffffff !important;
}

.nom-pill-warning,
.nom-pill-sunglow {
    background-color: #FFD166 !important;
    color: #1A1A2E !important;
    font-weight: 700 !important;
}

.nom-pill-orange {
    background-color: #FB923C !important;
    color: #ffffff !important;
}

.nom-pill-danger,
.nom-pill-hotpink {
    background-color: #FF6B6B !important;
    color: #ffffff !important;
}

.nom-pill-secondary,
.nom-pill-slate {
    background-color: #8B8BA7 !important;
    color: #ffffff !important;
}

.nom-pill-dark,
.nom-pill-navy {
    background-color: #1A1A2E !important;
    color: #F1F5F9 !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Clean Status Badges (No Dot) */
.nom-status-active {
    background: rgba(0, 196, 154, 0.12) !important;
    color: #00C49A !important;
    border: 1px solid rgba(0, 196, 154, 0.3) !important;
    font-weight: 600;
}

.nom-status-inactive {
    background: rgba(139, 139, 167, 0.12) !important;
    color: #8B8BA7 !important;
    border: 1px solid rgba(139, 139, 167, 0.3) !important;
    font-weight: 500;
}

/* Additional Specific Status Styles for Machinery & Profiles */
.nom-status-onsite {
    background: rgba(251, 146, 60, 0.14) !important;
    color: #ea580c !important;
    border: 1px solid rgba(251, 146, 60, 0.35) !important;
    font-weight: 600;
}

[data-bs-theme="dark"] .nom-status-onsite {
    color: #FB923C !important;
}

.nom-status-repair {
    background: rgba(255, 209, 102, 0.16) !important;
    color: #d49800 !important;
    border: 1px solid rgba(255, 209, 102, 0.35) !important;
    font-weight: 600;
}

[data-bs-theme="dark"] .nom-status-repair {
    color: #FFD166 !important;
}

.nom-status-reserved {
    background: rgba(168, 85, 247, 0.14) !important;
    color: #A855F7 !important;
    border: 1px solid rgba(168, 85, 247, 0.35) !important;
    font-weight: 600;
}

.nom-status-scrapped {
    background: rgba(255, 107, 107, 0.14) !important;
    color: #FF6B6B !important;
    border: 1px solid rgba(255, 107, 107, 0.35) !important;
    font-weight: 600;
}

.nom-status-available {
    background: rgba(45, 212, 191, 0.14) !important;
    color: #0d9488 !important;
    border: 1px solid rgba(45, 212, 191, 0.35) !important;
    font-weight: 600;
}

[data-bs-theme="dark"] .nom-status-available {
    color: #2DD4BF !important;
}

/* =========================================================
   Nomenclature Modal - Visual Swatches, Icon Chips & Preview Card
   ========================================================= */
.nom-color-swatches {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.nom-color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    border: 2.5px solid transparent;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    padding: 0;
}

.nom-color-swatch[data-color="primary"] {
    background-color: var(--apple-accent-color) !important;
}

.nom-color-swatch[data-color="purple"] {
    background-color: #A855F7 !important;
}

.nom-color-swatch[data-color="info"] {
    background-color: #4CC9F0 !important;
    color: #0F172A !important;
}

.nom-color-swatch[data-color="teal"] {
    background-color: #2DD4BF !important;
    color: #0F172A !important;
}

.nom-color-swatch[data-color="success"] {
    background-color: #00C49A !important;
}

.nom-color-swatch[data-color="warning"] {
    background-color: #FFD166 !important;
    color: #1A1A2E !important;
}

.nom-color-swatch[data-color="orange"] {
    background-color: #FB923C !important;
}

.nom-color-swatch[data-color="danger"] {
    background-color: #FF6B6B !important;
}

.nom-color-swatch[data-color="secondary"] {
    background-color: #8B8BA7 !important;
}

.nom-color-swatch[data-color="dark"] {
    background-color: #1A1A2E !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.nom-color-swatch:hover {
    transform: scale(1.18);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.nom-color-swatch.active {
    border-color: #ffffff !important;
    box-shadow: 0 0 0 3.5px var(--apple-accent-color), 0 6px 14px var(--button-glow, rgba(var(--bs-primary-rgb), 0.4)) !important;
    transform: scale(1.14);
}

.nom-color-swatch.active i {
    font-size: 0.95rem;
    font-weight: 700;
}

#nom-icon-presets-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px !important;
    margin-top: 6px;
}

.nom-icon-chip {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    color: var(--apple-secondary-text);
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    padding: 0;
}

.nom-icon-chip:hover {
    background: rgba(var(--bs-primary-rgb), 0.08) !important;
    color: var(--apple-accent-color) !important;
    transform: translateY(-2px);
    border-color: var(--apple-accent-color) !important;
    box-shadow: 0 4px 10px rgba(var(--bs-primary-rgb), 0.15);
}

.nom-icon-chip.active {
    background: var(--apple-accent-color) !important;
    color: #ffffff !important;
    border-color: var(--apple-accent-color) !important;
    font-weight: bold;
    transform: scale(1.14);
    box-shadow: 0 4px 14px var(--button-glow, rgba(var(--bs-primary-rgb), 0.45)) !important;
    z-index: 2;
}

.nom-icon-chip.active i {
    color: #ffffff !important;
    -webkit-text-stroke: 0.45px #ffffff !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25)) !important;
}

#nom-icon-preview-box {
    background: rgba(var(--bs-primary-rgb), 0.12) !important;
    border-color: var(--bs-border-color) !important;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#nom-icon-preview-box i {
    font-size: 1.25rem !important;
    -webkit-text-stroke: 0.4px currentColor !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12)) !important;
}

.nom-preview-card {
    background-color: var(--bs-body-bg) !important;
    border: 1px solid var(--bs-border-color) !important;
    border-radius: 0.5rem;
    box-shadow: none !important;
    transition: all 0.2s ease;
}

[data-bs-theme="dark"] .nom-preview-card {
    background-color: var(--bs-body-bg) !important;
    border: 1px solid var(--bs-border-color) !important;
    box-shadow: none !important;
}

#inventory-nom-active:checked {
    background-color: #00C49A !important;
    border-color: #00C49A !important;
}

#modalInventoryNomenclature .form-control:focus,
#modalInventoryNomenclature .form-select:focus,
#inventory-settings-container .form-control:focus {
    border-color: var(--apple-accent-color) !important;
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.22) !important;
}

/* Nomenclature Scope / Section Container in Modal */
.nom-section-banner {
    background-color: var(--bs-body-bg) !important;
    border: 1px solid var(--bs-border-color) !important;
    border-radius: 0.5rem;
    padding: 0.55rem 0.85rem !important;
    min-height: 42px;
    box-shadow: none !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

[data-bs-theme="dark"] .nom-section-banner {
    background-color: var(--bs-body-bg) !important;
    border: 1px solid var(--bs-border-color) !important;
    box-shadow: none !important;
}

.nom-section-icon-wrap {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--apple-accent-color) !important;
    color: #ffffff !important;
    border: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.05rem;
    box-shadow: 0 2px 8px var(--button-glow, rgba(var(--bs-primary-rgb), 0.3)) !important;
}

.nom-section-icon-wrap i {
    color: #ffffff !important;
    -webkit-text-stroke: 0.4px #ffffff !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2)) !important;
}

/* Compact glass navigation toolbar */
.inventory-command-hub.inventory-glass-toolbar {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.48) !important;
    border: 1px solid rgba(255, 255, 255, 0.65) !important;
    border-radius: 18px !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

.inventory-glass-toolbar .inventory-segmented-wrapper {
    flex: 1;
    min-width: 0;
}

.inventory-glass-toolbar .inventory-segmented-nav {
    gap: 4px;
    background: transparent;
    border: 0;
    min-width: max-content;
}

.inventory-glass-toolbar .inventory-segmented-tab {
    padding: 9px 12px;
    gap: 7px;
    font-size: 0.85rem;
    font-weight: 500;
    transform: none;
}

.inventory-glass-toolbar .inventory-segmented-tab.active {
    background: rgba(255, 255, 255, 0.78) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    font-weight: 600;
}

.inventory-glass-toolbar .inventory-tab-icon-token {
    width: 18px;
    height: 20px;
    background: transparent;
    color: inherit;
    transform: none;
}

.inventory-glass-toolbar .active .inventory-tab-icon-token {
    color: var(--apple-accent-color, #0d6efd);
}

.inventory-glass-toolbar .inventory-tab-pill-badge {
    font-size: 0.68rem;
    padding: 3px 6px;
    font-weight: 600;
}

.inventory-glass-toolbar .inventory-segmented-tab:focus-visible {
    outline: 2px solid var(--apple-accent-color, #0d6efd);
    outline-offset: -2px;
}

.inventory-toolbar-actions {
    flex-shrink: 0;
}

.inventory-toolbar-actions:empty {
    display: none;
}

[data-bs-theme="dark"] .inventory-command-hub.inventory-glass-toolbar {
    background: rgba(35, 38, 44, 0.58) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

[data-bs-theme="dark"] .inventory-glass-toolbar .inventory-segmented-nav {
    background: rgba(0, 0, 0, 0.16) !important;
}

[data-bs-theme="dark"] .inventory-glass-toolbar .inventory-segmented-tab.active {
    background: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

@media (max-width: 767.98px) {
    .inventory-command-hub.inventory-glass-toolbar {
        flex-wrap: wrap;
    }

    .inventory-glass-toolbar .inventory-segmented-wrapper {
        flex-basis: 100%;
    }

    .inventory-glass-toolbar .inventory-toolbar-actions {
        margin-left: auto;
    }
}

/* Category navigation and records workspace */
.inventory-workspace {
    display: block;
}

.inventory-records-panel {
    background: var(--apple-card-bg, rgba(255, 255, 255, 0.6));
    border: 1px solid var(--apple-card-border, rgba(255, 255, 255, 0.65));
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    min-width: 0;
}

.inventory-category-tabs {
    padding: 12px 12px 0;
    border-bottom: 1px solid var(--apple-card-border, rgba(120, 130, 145, 0.15));
}

.inventory-category-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 5px;
    overflow-x: auto;
    padding: 0 0 8px;
}

.inventory-category-nav>.nav-item {
    flex-shrink: 0;
}

.inventory-category-nav .inventory-category-link {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 13px 10px;
    position: relative;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--apple-secondary-text, var(--bs-secondary-color));
    text-align: left;
    font-size: 0.85rem;
    line-height: 1.4;
    transition: background-color 150ms ease, color 150ms ease;
}

.inventory-category-link .inventory-tab-label {
    flex: 1;
}

.inventory-category-link .inventory-tab-icon-token {
    width: 20px;
    background: transparent;
    color: inherit;
}

.inventory-category-nav .inventory-category-link:hover {
    background: var(--apple-hover-bg, rgba(120, 130, 145, 0.08));
    color: var(--bs-body-color);
}

.inventory-category-nav .inventory-category-link.active {
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--apple-accent-color, var(--bs-primary));
    font-weight: 600;
}

.inventory-category-link.active::before {
    content: '';
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 0;
    height: 3px;
    border-radius: 3px;
    background: var(--apple-accent-color, var(--bs-primary));
}

.inventory-category-link:focus-visible {
    outline: 2px solid var(--apple-accent-color, var(--bs-primary));
    outline-offset: -2px;
}

.inventory-category-link.active .inventory-tab-pill-badge {
    color: inherit;
    background: rgba(var(--bs-primary-rgb), 0.1);
}

.inventory-records-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 20px 12px;
}

.inventory-records-heading .btn {
    flex-shrink: 0;
}

.inventory-record-filters {
    padding: 8px 20px 20px;
    border-bottom: 1px solid var(--apple-card-border, rgba(120, 130, 145, 0.15));
}

.inventory-search-field {
    margin-bottom: 8px;
}

.inventory-records-panel .inventory-table-wrapper {
    border: 0;
    border-radius: 0 0 20px 20px;
    box-shadow: none !important;
    margin-bottom: 0 !important;
    background: transparent;
}

.inventory-records-panel #requests-module-container {
    padding: 12px 20px 20px;
}

[data-bs-theme="dark"] .inventory-records-panel {
    background: var(--apple-card-bg-dark, rgba(30, 30, 35, 0.65));
    border-color: var(--apple-card-border-dark, rgba(255, 255, 255, 0.1));
}

@media (max-width: 991.98px) {
    .inventory-records-heading {
        padding: 16px 12px 12px;
    }

    .inventory-record-filters {
        padding: 4px 12px 16px;
    }

    .inventory-records-panel #requests-module-container {
        padding: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .inventory-category-nav .inventory-category-link {
        transition: none;
    }
}

/* Icon dropdown filters within the records panel */
#inventory-main-container .inventory-record-filters .tagify.tagify--select::after {
    display: none !important;
}

#inventory-main-container .inventory-record-filters .tagify {
    width: 100%;
    overflow: visible;
}

.inventory-record-filters .form-label {
    display: block;
}

.inventory-filter-dropdown {
    z-index: 1100;
}

.inventory-filter-dropdown .tagify__dropdown__wrapper {
    background: var(--apple-card-bg, var(--bs-body-bg));
    color: var(--bs-body-color);
    border: 1px solid var(--apple-card-border, var(--bs-border-color));
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 5px;
}

.inventory-filter-dropdown .tagify__dropdown__item {
    border-radius: 8px;
    cursor: pointer;
}

[data-bs-theme="dark"] .inventory-filter-dropdown .tagify__dropdown__wrapper {
    background: var(--apple-card-bg-dark, #212529);
    border-color: var(--apple-card-border-dark, rgba(255, 255, 255, 0.12));
}

/* Separate glass actions for consumable records */
.inventory-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.inventory-row-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid var(--apple-card-border, var(--bs-border-color));
    background: rgba(var(--bs-body-bg-rgb), 0.65);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
    transition: background-color 150ms ease, border-color 150ms ease;
}

.inventory-row-action:hover {
    background: rgba(var(--bs-primary-rgb), 0.1);
    border-color: rgba(var(--bs-primary-rgb), 0.3);
}

.inventory-row-action-danger:hover {
    background: rgba(var(--bs-danger-rgb), 0.1);
    border-color: rgba(var(--bs-danger-rgb), 0.3);
}

.inventory-row-action:focus-visible {
    outline: 2px solid var(--apple-accent-color, var(--bs-primary));
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .inventory-row-action {
        transition: none;
    }
}

/* Search icons sit inside the field, matching the dropdown filters. */
.inventory-search-control {
    position: relative;
    min-width: 0;
}

.inventory-search-control .inventory-search-icon {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    pointer-events: none;
}

.inventory-search-control>.form-control {
    padding-left: 2.3rem;
    min-height: 38px;
}

#inventory-main-container .inventory-search-control .tagify {
    padding-left: 2rem !important;
}

.inventory-search-control .inventory-tagify-wrapper {
    width: 100%;
    min-width: 0;
}

/* Quiet, consistent labels for table metadata and status. */
.inventory-records-panel .table tbody .badge {
    --inventory-label-rgb: var(--bs-secondary-rgb, 108, 117, 125);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    padding: 0.35rem 0.55rem !important;
    border-radius: 7px !important;
    border: 1px solid rgba(var(--inventory-label-rgb), 0.12) !important;
    background: rgba(var(--inventory-label-rgb), 0.06) !important;
    color: var(--bs-secondary-color) !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    line-height: 1.35;
    letter-spacing: 0;
    white-space: normal;
    text-align: left;
    vertical-align: middle;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.inventory-records-panel .table tbody .badge>.bi {
    flex-shrink: 0;
    margin: 0 !important;
    font-size: 0.85rem;
}

.inventory-records-panel .table tbody .badge.bg-primary {
    --inventory-label-rgb: var(--bs-primary-rgb);
    color: var(--bs-primary-text-emphasis, #084298) !important;
}

.inventory-records-panel .table tbody .badge.bg-success {
    --inventory-label-rgb: var(--bs-success-rgb);
    color: var(--bs-success-text-emphasis, #0f5132) !important;
}

.inventory-records-panel .table tbody .badge.bg-danger {
    --inventory-label-rgb: var(--bs-danger-rgb);
    color: var(--bs-danger-text-emphasis, #842029) !important;
}

.inventory-records-panel .table tbody .badge.bg-warning {
    --inventory-label-rgb: var(--bs-warning-rgb);
    color: var(--bs-warning-text-emphasis, #664d03) !important;
}

.inventory-records-panel .table tbody .badge.bg-info {
    --inventory-label-rgb: var(--bs-info-rgb);
    color: var(--bs-info-text-emphasis, #055160) !important;
}

.inventory-records-panel .table tbody .badge.font-monospace {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

[data-bs-theme="dark"] .inventory-records-panel .table tbody .badge {
    background: rgba(var(--inventory-label-rgb), 0.12) !important;
    border-color: rgba(var(--inventory-label-rgb), 0.18) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* Let asset status labels determine their column width without wrapping. */
#inventory-tab-assets .inventory-status-column {
    width: 1%;
    min-width: 140px;
}

#inventory-tab-assets .table tbody td:first-child .badge {
    white-space: nowrap;
    max-width: none;
}

/* Align the quantity text and icon by their centers, not font baselines. */
.inventory-records-panel .table tbody .inventory-quantity-label {
    align-items: center;
    justify-content: center;
    min-height: 28px;
    line-height: 1 !important;
}

.inventory-records-panel .table tbody .inventory-quantity-label>.bi {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.inventory-quantity-label>.bi::before {
    display: block;
    vertical-align: 0;
}

.inventory-quantity-label>span {
    line-height: 1;
}

/* Timber filters share the inventory field style and retain multiple selection. */
#inventory-tab-talpi .inventory-talpi-filters {
    padding: 8px 0 20px;
}

.inventory-talpi-filter-control {
    position: relative;
    min-width: 0;
}

.inventory-talpi-filter-icon {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    line-height: 1;
    z-index: 1;
    pointer-events: none;
}

.inventory-talpi-filter-icon::before {
    display: block;
    line-height: 1;
    vertical-align: 0;
}

#inventory-main-container .inventory-talpi-filter-control .tagify {
    width: 100%;
    padding-left: 2rem !important;
    align-items: center !important;
}

#inventory-main-container .inventory-talpi-filter-control .tagify:not(.tagify--select) {
    height: auto !important;
    max-height: none !important;
    flex-wrap: wrap;
}

#inventory-main-container .inventory-talpi-filter-control .tagify.tagify--select .tagify__tag,
#inventory-main-container .inventory-talpi-filter-control .tagify.tagify--select .tagify__input {
    left: 2.3rem !important;
    right: 0.75rem !important;
}

#inventory-main-container .inventory-talpi-filter-control .tagify:not(.tagify--select) .tagify__input {
    min-width: 4rem;
    font-size: 0.9rem;
}

.inventory-talpi-filter-control>.form-control {
    padding-left: 2.3rem;
}

/* Center empty timber placeholders within the same 38px field height. */
#inventory-main-container .inventory-talpi-filter-control .tagify:not(.tagify--select) .tagify__input {
    display: flex;
    align-items: center;
    min-height: 36px;
    margin: 0;
    padding: 0 0.3rem;
    line-height: 1.4;
}

#inventory-main-container .inventory-talpi-filter-control .tagify:not(.tagify--select) .tagify__input::before {
    display: flex;
    align-items: center;
    top: 0;
    bottom: 0;
    height: auto;
    line-height: 1.4;
    transform: none;
}

/* A selected object status uses the same tag layout as the other timber fields. */
#inventory-main-container .inventory-talpi-filter-control .tagify.tagify--maxTags .tagify__input {
    display: none;
}

#inventory-main-container .inventory-talpi-filter-control .tagify:not(.tagify--select) .tagify__tag {
    margin: 4px 3px;
    font-size: 0.9rem;
}

.inventory-talpi-filters .inventory-clear-filters {
    color: var(--apple-secondary-text, var(--bs-secondary-color));
    background: transparent;
    border: 0;
    border-radius: 8px;
    padding: 6px 9px;
    font-weight: 500;
}

.inventory-talpi-filters .inventory-clear-filters:hover:not(:disabled) {
    color: var(--bs-body-color);
    background: var(--apple-hover-bg, rgba(120, 130, 145, 0.1));
}

.inventory-talpi-filters .inventory-clear-filters:disabled {
    opacity: 0.4;
}

.inventory-talpi-filters .inventory-clear-filters:focus-visible {
    outline: 2px solid var(--apple-accent-color, var(--bs-primary));
    outline-offset: 2px;
}

.inventory-talpi-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
    gap: 8px;
}

.inventory-talpi-filter-item {
    min-width: 0;
}

.inventory-talpi-filter-grid .inventory-clear-filters {
    padding: 0 2px;
    font-size: 0.75rem;
    line-height: 1.5;
    white-space: nowrap;
}

@media (max-width: 1199.98px) {
    .inventory-talpi-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .inventory-talpi-filter-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.inventory-talpi-status-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.inventory-talpi-status-label .form-label {
    white-space: nowrap;
}

/* Local Tagify single-value styling, independent of the shared tag theme. */
#inventory-main-container #talpiObjectStatusFilter[hidden] {
    display: none !important;
}

#inventory-main-container .inventory-talpi-single-value {
    --tag-bg: transparent;
    --tag-hover: transparent;
    --tag-border-radius: 0;
    /* Match multi-select: 36px input + 4px margins + 4px padding + 2px border. */
    min-height: 46px !important;
    height: 46px !important;
    max-height: 46px !important;
}

#inventory-main-container .inventory-talpi-single-value .tagify__tag,
#inventory-main-container .inventory-talpi-single-value .tagify__tag>div,
#inventory-main-container .inventory-talpi-single-value .tagify__tag-text {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

#inventory-main-container .inventory-talpi-single-value .tagify__tag>div::before {
    display: none !important;
    box-shadow: none !important;
}

#inventory-main-container .inventory-talpi-single-value .tagify__tag__removeBtn {
    display: none !important;
}

/* Informational Talpi cards have no click action. */
.inventory-talpi-info-card {
    cursor: default;
}

.inventory-talpi-info-card:hover {
    transform: none;
}

.inventory-kpi-card[data-stock-status][aria-pressed="true"],
.inventory-kpi-card[data-stock-status]:focus-visible {
    outline: 2px solid var(--apple-accent-color, var(--bs-primary));
    outline-offset: 2px;
}

/* Verified handovers use native modal dialogs with keyboard focus containment. */
.iv-dialog {
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    overflow: auto;
    border: 1px solid var(--bs-border-color);
    border-radius: 16px;
    padding: 24px;
    color: var(--bs-body-color);
    background: var(--bs-body-bg);
}

.iv-dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.iv-dialog>button {
    margin: 4px;
}

.iv-details {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px 16px;
}

.iv-details dd {
    overflow-wrap: anywhere;
    margin: 0;
}

.iv-transfer-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 12px;
}

/* =========================================================
   ADD ITEM CHOICE MODAL - DUAL THEME & HOVER ENHANCEMENTS
   ========================================================= */
#inventoryModalAddChoice .modal-content {
    background: rgba(var(--bs-body-bg-rgb), 0.94) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    border: 1px solid var(--bs-border-color-translucent) !important;
    border-radius: 1.25rem !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28) !important;
    overflow: hidden;
}

[data-bs-theme="light"] #inventoryModalAddChoice .modal-content {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

[data-bs-theme="dark"] #inventoryModalAddChoice .modal-content {
    background: rgba(28, 30, 36, 0.94) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

#inventoryModalAddChoice .modal-header {
    border-bottom: 1px solid var(--bs-border-color-translucent) !important;
    background: rgba(var(--bs-primary-rgb), 0.05) !important;
}

[data-bs-theme="light"] #inventoryModalAddChoice .modal-header {
    background: rgba(var(--bs-primary-rgb), 0.04) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

[data-bs-theme="dark"] #inventoryModalAddChoice .modal-header {
    background: rgba(var(--bs-primary-rgb), 0.08) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-bs-theme="dark"] #inventoryModalAddChoice .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.75;
}

[data-bs-theme="dark"] #inventoryModalAddChoice .btn-close:hover {
    opacity: 1;
}

/* Choice Cards - Base Structure */
#inventoryModalAddChoice .inventory-add-choice-card {
    position: relative;
    border: 1.5px solid transparent;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

#inventoryModalAddChoice .inventory-add-choice-card:focus-visible {
    outline: 2px solid var(--apple-accent-color, var(--bs-primary));
    outline-offset: 2px;
}

#inventoryModalAddChoice .inventory-choice-icon-wrap {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

#inventoryModalAddChoice .inventory-choice-icon-wrap i {
    transition: all 0.25s ease;
}

#inventoryModalAddChoice .inventory-choice-title {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 2px;
    transition: color 0.2s ease;
}

#inventoryModalAddChoice .inventory-choice-desc {
    line-height: 1.35;
    transition: color 0.2s ease;
}

#inventoryModalAddChoice .inventory-choice-arrow {
    opacity: 0.6;
    transition: all 0.25s ease;
}

#inventoryModalAddChoice .inventory-add-choice-card:hover .inventory-choice-arrow,
#inventoryModalAddChoice .inventory-add-choice-card:focus-visible .inventory-choice-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* Base / Fallback Default Styling */
#inventoryModalAddChoice .inventory-add-choice-asset {
    background: rgba(var(--bs-body-bg-rgb), 0.7);
    border-color: rgba(var(--bs-primary-rgb), 0.25);
}

#inventoryModalAddChoice .inventory-add-choice-asset .inventory-choice-icon-wrap {
    background: rgba(var(--bs-primary-rgb), 0.12);
    color: var(--bs-primary);
}

#inventoryModalAddChoice .inventory-add-choice-consumable {
    background: rgba(var(--bs-body-bg-rgb), 0.7);
    border-color: rgba(2, 132, 199, 0.3);
}

#inventoryModalAddChoice .inventory-add-choice-consumable .inventory-choice-icon-wrap {
    background: rgba(2, 132, 199, 0.12);
    color: #0284c7;
}

/* Ensure Icons ALWAYS remain visible with crisp contrast on hover & focus */
#inventoryModalAddChoice .inventory-add-choice-card:hover .inventory-choice-icon-wrap i,
#inventoryModalAddChoice .inventory-add-choice-card:focus-visible .inventory-choice-icon-wrap i {
    color: #ffffff !important;
}

/* --- LIGHT THEME --- */
[data-bs-theme="light"] #inventoryModalAddChoice .inventory-add-choice-asset {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(var(--bs-primary-rgb), 0.22);
}

[data-bs-theme="light"] #inventoryModalAddChoice .inventory-add-choice-asset .inventory-choice-icon-wrap {
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.18);
}

[data-bs-theme="light"] #inventoryModalAddChoice .inventory-add-choice-asset .inventory-choice-title {
    color: #1e293b;
}

[data-bs-theme="light"] #inventoryModalAddChoice .inventory-add-choice-asset .inventory-choice-desc {
    color: #64748b;
}

[data-bs-theme="light"] #inventoryModalAddChoice .inventory-add-choice-asset:hover {
    background: rgba(var(--bs-primary-rgb), 0.08);
    border-color: var(--bs-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -4px rgba(var(--bs-primary-rgb), 0.22), 0 0 0 1px var(--bs-primary);
}

[data-bs-theme="light"] #inventoryModalAddChoice .inventory-add-choice-asset:hover .inventory-choice-icon-wrap {
    background: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    box-shadow: 0 4px 14px rgba(var(--bs-primary-rgb), 0.4);
}

[data-bs-theme="light"] #inventoryModalAddChoice .inventory-add-choice-asset:hover .inventory-choice-icon-wrap i {
    color: #ffffff !important;
}

[data-bs-theme="light"] #inventoryModalAddChoice .inventory-add-choice-asset:hover .inventory-choice-title {
    color: var(--bs-primary);
}

[data-bs-theme="light"] #inventoryModalAddChoice .inventory-add-choice-asset:hover .inventory-choice-desc {
    color: #475569;
}

[data-bs-theme="light"] #inventoryModalAddChoice .inventory-add-choice-asset:hover .inventory-choice-arrow {
    color: var(--bs-primary);
}

[data-bs-theme="light"] #inventoryModalAddChoice .inventory-add-choice-consumable {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(2, 132, 199, 0.25);
}

[data-bs-theme="light"] #inventoryModalAddChoice .inventory-add-choice-consumable .inventory-choice-icon-wrap {
    background: rgba(2, 132, 199, 0.1);
    color: #0284c7;
    border: 1px solid rgba(2, 132, 199, 0.2);
}

[data-bs-theme="light"] #inventoryModalAddChoice .inventory-add-choice-consumable .inventory-choice-title {
    color: #1e293b;
}

[data-bs-theme="light"] #inventoryModalAddChoice .inventory-add-choice-consumable .inventory-choice-desc {
    color: #64748b;
}

[data-bs-theme="light"] #inventoryModalAddChoice .inventory-add-choice-consumable:hover {
    background: rgba(2, 132, 199, 0.08);
    border-color: #0284c7;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -4px rgba(2, 132, 199, 0.22), 0 0 0 1px #0284c7;
}

[data-bs-theme="light"] #inventoryModalAddChoice .inventory-add-choice-consumable:hover .inventory-choice-icon-wrap {
    background: #0284c7 !important;
    border-color: #0284c7 !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}

[data-bs-theme="light"] #inventoryModalAddChoice .inventory-add-choice-consumable:hover .inventory-choice-icon-wrap i {
    color: #ffffff !important;
}

[data-bs-theme="light"] #inventoryModalAddChoice .inventory-add-choice-consumable:hover .inventory-choice-title {
    color: #0284c7;
}

[data-bs-theme="light"] #inventoryModalAddChoice .inventory-add-choice-consumable:hover .inventory-choice-desc {
    color: #475569;
}

[data-bs-theme="light"] #inventoryModalAddChoice .inventory-add-choice-consumable:hover .inventory-choice-arrow {
    color: #0284c7;
}

/* --- DARK THEME --- */
[data-bs-theme="dark"] #inventoryModalAddChoice .inventory-add-choice-asset {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(96, 165, 250, 0.3);
}

[data-bs-theme="dark"] #inventoryModalAddChoice .inventory-add-choice-asset .inventory-choice-icon-wrap {
    background: rgba(59, 130, 246, 0.18);
    color: #93c5fd;
    border: 1px solid rgba(96, 165, 250, 0.25);
}

[data-bs-theme="dark"] #inventoryModalAddChoice .inventory-add-choice-asset .inventory-choice-title {
    color: #f1f5f9;
}

[data-bs-theme="dark"] #inventoryModalAddChoice .inventory-add-choice-asset .inventory-choice-desc {
    color: #94a3b8;
}

[data-bs-theme="dark"] #inventoryModalAddChoice .inventory-add-choice-asset:hover {
    background: rgba(59, 130, 246, 0.16);
    border-color: #60a5fa;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px -4px rgba(59, 130, 246, 0.35), 0 0 0 1px #60a5fa;
}

[data-bs-theme="dark"] #inventoryModalAddChoice .inventory-add-choice-asset:hover .inventory-choice-icon-wrap {
    background: #3b82f6 !important;
    border-color: #60a5fa !important;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.5);
}

[data-bs-theme="dark"] #inventoryModalAddChoice .inventory-add-choice-asset:hover .inventory-choice-icon-wrap i {
    color: #ffffff !important;
}

[data-bs-theme="dark"] #inventoryModalAddChoice .inventory-add-choice-asset:hover .inventory-choice-title {
    color: #ffffff;
}

[data-bs-theme="dark"] #inventoryModalAddChoice .inventory-add-choice-asset:hover .inventory-choice-desc {
    color: #cbd5e1;
}

[data-bs-theme="dark"] #inventoryModalAddChoice .inventory-add-choice-asset:hover .inventory-choice-arrow {
    color: #60a5fa;
}

[data-bs-theme="dark"] #inventoryModalAddChoice .inventory-add-choice-consumable {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(56, 189, 248, 0.3);
}

[data-bs-theme="dark"] #inventoryModalAddChoice .inventory-add-choice-consumable .inventory-choice-icon-wrap {
    background: rgba(14, 165, 233, 0.18);
    color: #67e8f9;
    border: 1px solid rgba(56, 189, 248, 0.25);
}

[data-bs-theme="dark"] #inventoryModalAddChoice .inventory-add-choice-consumable .inventory-choice-title {
    color: #f1f5f9;
}

[data-bs-theme="dark"] #inventoryModalAddChoice .inventory-add-choice-consumable .inventory-choice-desc {
    color: #94a3b8;
}

[data-bs-theme="dark"] #inventoryModalAddChoice .inventory-add-choice-consumable:hover {
    background: rgba(14, 165, 233, 0.16);
    border-color: #38bdf8;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px -4px rgba(14, 165, 233, 0.35), 0 0 0 1px #38bdf8;
}

[data-bs-theme="dark"] #inventoryModalAddChoice .inventory-add-choice-consumable:hover .inventory-choice-icon-wrap {
    background: #0284c7 !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.5);
}

[data-bs-theme="dark"] #inventoryModalAddChoice .inventory-add-choice-consumable:hover .inventory-choice-icon-wrap i {
    color: #ffffff !important;
}

[data-bs-theme="dark"] #inventoryModalAddChoice .inventory-add-choice-consumable:hover .inventory-choice-title {
    color: #ffffff;
}

[data-bs-theme="dark"] #inventoryModalAddChoice .inventory-add-choice-consumable:hover .inventory-choice-desc {
    color: #cbd5e1;
}

[data-bs-theme="dark"] #inventoryModalAddChoice .inventory-add-choice-consumable:hover .inventory-choice-arrow {
    color: #38bdf8;
}

/* =========================================================
   MODAL CONVERT ITEM BUTTON (LIGHT & DARK THEMES)
   ========================================================= */
.inventory-modal-convert-btn,
#inventory-asset-edit-convert-btn,
#inventory-consumable-edit-convert-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.45rem 1rem;
    border-radius: 0.5rem;
    background-color: #fff7ed !important;
    color: #c2410c !important;
    border: 1.5px solid #ea580c !important;
    box-shadow: 0 1px 3px rgba(234, 88, 12, 0.12);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
}

.inventory-modal-convert-btn i,
#inventory-asset-edit-convert-btn i,
#inventory-consumable-edit-convert-btn i {
    font-size: 1rem;
    color: #ea580c !important;
    transition: transform 0.25s ease, color 0.2s ease;
}

.inventory-modal-convert-btn:hover,
#inventory-asset-edit-convert-btn:hover,
#inventory-consumable-edit-convert-btn:hover {
    background-color: #ea580c !important;
    color: #ffffff !important;
    border-color: #c2410c !important;
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
    transform: translateY(-1px);
}

.inventory-modal-convert-btn:hover i,
#inventory-asset-edit-convert-btn:hover i,
#inventory-consumable-edit-convert-btn:hover i {
    color: #ffffff !important;
    transform: rotate(180deg);
}

.inventory-modal-convert-btn:active,
#inventory-asset-edit-convert-btn:active,
#inventory-consumable-edit-convert-btn:active {
    transform: translateY(0);
    background-color: #c2410c !important;
    color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(194, 65, 12, 0.3);
}

.inventory-modal-convert-btn:focus-visible,
#inventory-asset-edit-convert-btn:focus-visible,
#inventory-consumable-edit-convert-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.35);
}

/* Dark Theme */
[data-bs-theme="dark"] .inventory-modal-convert-btn,
[data-bs-theme="dark"] #inventory-asset-edit-convert-btn,
[data-bs-theme="dark"] #inventory-consumable-edit-convert-btn {
    background-color: rgba(249, 115, 22, 0.16) !important;
    color: #fdba74 !important;
    border: 1.5px solid #f97316 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .inventory-modal-convert-btn i,
[data-bs-theme="dark"] #inventory-asset-edit-convert-btn i,
[data-bs-theme="dark"] #inventory-consumable-edit-convert-btn i {
    color: #fb923c !important;
}

[data-bs-theme="dark"] .inventory-modal-convert-btn:hover,
[data-bs-theme="dark"] #inventory-asset-edit-convert-btn:hover,
[data-bs-theme="dark"] #inventory-consumable-edit-convert-btn:hover {
    background-color: #f97316 !important;
    color: #ffffff !important;
    border-color: #fdba74 !important;
    box-shadow: 0 4px 18px rgba(249, 115, 22, 0.45);
}

[data-bs-theme="dark"] .inventory-modal-convert-btn:hover i,
[data-bs-theme="dark"] #inventory-asset-edit-convert-btn:hover i,
[data-bs-theme="dark"] #inventory-consumable-edit-convert-btn:hover i {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .inventory-modal-convert-btn:focus-visible,
[data-bs-theme="dark"] #inventory-asset-edit-convert-btn:focus-visible,
[data-bs-theme="dark"] #inventory-consumable-edit-convert-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.45);
}
/* ======================================================================
   Item history card (js/inventory_history.js)
   ====================================================================== */
/* The core modals.css forces margin-top / overflow:visible on every modal; keep this one inside the viewport and scroll the body. */
#inventoryHistoryDrawer .modal-dialog { margin: 1rem auto !important; max-width: 760px; }
#inventoryHistoryDrawer .modal-content { display: flex; flex-direction: column; max-height: calc(100vh - 2rem); overflow: hidden !important; border-radius: 1rem !important; }
#inventoryHistoryDrawer .modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.inv-hist-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .5rem .75rem; }
.inv-hist-fact { display: flex; flex-direction: column; font-size: .8rem; line-height: 1.25; }
.inv-hist-fact > i { display: none; }
.inv-hist-fact strong { font-weight: 600; word-break: break-word; }
.inv-hist-timeline { list-style: none; margin: 0; padding: 0 0 0 .25rem; position: relative; }
.inv-hist-timeline::before { content: ""; position: absolute; left: 1.05rem; top: .5rem; bottom: .5rem; width: 2px; background: var(--bs-border-color); }
.inv-hist-item { position: relative; display: flex; gap: .75rem; padding-bottom: 1rem; }
.inv-hist-dot { flex: 0 0 auto; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; z-index: 1; margin-left: .25rem; }
.inv-hist-card { flex: 1 1 auto; min-width: 0; background: var(--bs-tertiary-bg); border-radius: .75rem; padding: .6rem .8rem; font-size: .88rem; }
.inv-hist-route { margin-top: .25rem; font-size: .82rem; }
.inv-hist-changes { list-style: none; margin: .35rem 0 0; padding: 0; font-size: .82rem; }
.inv-hist-changes del { color: var(--bs-danger); opacity: .8; }
.inv-hist-changes ins { text-decoration: none; color: var(--bs-success); font-weight: 600; }
.inv-hist-note { margin-top: .4rem; padding: .4rem .6rem; border-left: 3px solid var(--bs-warning); background: rgba(var(--bs-warning-rgb), .08); border-radius: .25rem; white-space: pre-wrap; word-break: break-word; }
.inv-hist-item.is-voided .inv-hist-card > :not(.d-flex):not(.inv-hist-correct) { opacity: .55; text-decoration: line-through; }
.inv-hist-correct { margin-top: .5rem; padding-top: .5rem; border-top: 1px dashed var(--bs-border-color); }
