/* =========================================
   ITAM System - Custom Stylesheet
   GLPI-Inspired Design
   ========================================= */

/* =========================================
   CSS VARIABLES - COLOR PALETTE
   ========================================= */
:root {
    /* Primary Colors - Blue/Gray Palette */
    --primary-blue: #0d6efd;
    --primary-dark: #0a58ca;
    --primary-light: #6ea8fe;
    
    /* Secondary Colors */
    --secondary-gray: #6c757d;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #495057;
    
    /* Status Colors */
    --success-green: #198754;
    --warning-yellow: #ffc107;
    --danger-red: #dc3545;
    --info-blue: #0dcaf0;
    
    /* Layout Colors */
    --header-bg: #ffffff;
    --sidebar-bg: #f8f9fa;
    --sidebar-hover: #e9ecef;
    --content-bg: #f8f9fa;
    
    /* Typography */
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    
    /* Shadows */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    /* Spacing */
    --header-height: 72px;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
}

/* =========================================
   GLOBAL STYLES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--content-bg);
}

/* =========================================
   LOGIN PAGE STYLES
   ========================================= */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    font-size: 4rem;
    color: var(--primary-blue);
}

.login-form .input-group-text {
    background-color: var(--light-gray);
    border-right: none;
}

.login-form .form-control {
    border-left: none;
    padding-left: 0;
}

.login-form .form-control:focus {
    border-color: #ced4da;
    box-shadow: none;
}

.btn-login {
    padding: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.forgot-password {
    color: var(--primary-blue);
    font-size: 0.875rem;
}

.forgot-password:hover {
    color: var(--primary-dark);
}

/* =========================================
   TOP HEADER
   ========================================= */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--medium-gray);
    box-shadow: var(--shadow-sm);
    z-index: 1030;
    padding: 0 20px;
}

.top-header .container-fluid {
    height: 100%;
}

.top-header .row {
    height: 100%;
}

.sidebar-toggle {
    color: var(--text-primary);
    font-size: 1.5rem;
    padding: 0;
    text-decoration: none;
    margin-right: 10px;
    line-height: 1;
}

.sidebar-toggle:hover {
    color: var(--primary-blue);
}

.header-brand {
    display: flex;
    align-items: center;
    min-height: 48px;
}

.header-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    line-height: 1.15;
}

.header-logo:hover {
    color: var(--text-primary);
}

.header-logo-img {
    height: 44px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    display: block;
}

.header-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(13, 110, 253, 0.1);
    color: var(--primary-blue);
    font-size: 1.35rem;
}

.header-brand-divider {
    width: 1px;
    height: 32px;
    background: var(--medium-gray);
    flex-shrink: 0;
}

.header-brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-width: 0;
}

.header-brand-name {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-primary);
    line-height: 1.1;
}

.header-brand-sub {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-secondary, #6c757d);
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    width: 100%;
}

.impersonation-search {
    width: min(360px, 42vw);
    flex: 0 1 360px;
}

.impersonation-search-group {
    height: 42px;
}

.impersonation-search-group .input-group-text {
    background: #fff;
    border-right: 0;
    color: #6c757d;
    padding-left: 12px;
    padding-right: 8px;
}

.impersonation-search-group .form-control {
    border-left: 0;
    height: 42px;
    box-shadow: none;
    font-size: 0.9rem;
}

.impersonation-search-group .form-control:focus {
    box-shadow: none;
    border-color: var(--medium-gray);
}

.impersonation-search-group:focus-within {
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.15);
    border-radius: 0.375rem;
}

.impersonation-search-group:focus-within .input-group-text,
.impersonation-search-group:focus-within .form-control {
    border-color: var(--primary-blue);
}

/* User Avatar */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--medium-gray);
}

.user-menu {
    color: var(--text-primary);
    text-decoration: none;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    max-width: 250px;
}

.user-menu:hover {
    color: var(--primary-blue);
}

.user-menu .user-avatar {
    flex-shrink: 0;
}

.user-menu span {
    max-width: 150px;
    overflow: hidden;
}

.user-menu strong,
.user-menu small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Notification Dropdown */
.notification-dropdown {
    min-width: 320px;
    max-height: 400px;
    overflow-y: auto;
}

.notification-dropdown .dropdown-item {
    white-space: normal;
    padding: 10px 15px;
}

/* Notification Badge */
.top-header .badge {
    font-size: 0.65rem;
    padding: 3px 6px;
    font-weight: 600;
}

.top-header .position-relative {
    position: relative;
}

/* Notification Button */
#notificationDropdown {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
}

/* Notification Badge Positioning */
.top-header #notificationDropdown .badge {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.65rem;
    padding: 2px 5px;
    transform: translate(15%, -15%);
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================
   MAIN CONTAINER & LAYOUT
   ========================================= */
.main-container {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* =========================================
   SIDEBAR
   ========================================= */
.sidebar {
    position: fixed;
    left: 0;
    top: var(--header-height);
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background-color: var(--sidebar-bg);
    overflow-y: auto;
    overflow-x: hidden;
    transition: all 0.3s ease;
    z-index: 1020;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: var(--sidebar-hover);
    border-radius: 3px;
}

/* Sidebar Navigation */
.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 4px solid transparent;
}

.nav-item i {
    font-size: 1.25rem;
    width: 30px;
    margin-right: 12px;
}

.nav-item:hover {
    background-color: var(--sidebar-hover);
    color: var(--primary-blue);
}

.nav-item.active {
    background-color: #e7f1ff;
    color: var(--primary-blue);
    border-left: 4px solid var(--primary-blue);
    font-weight: 500;
}

/* Nav Section */
.nav-section {
    margin-top: 15px;
}

.nav-section-title {
    padding: 8px 20px;
    color: #6c757d;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background-color: #e9ecef;
}

/* Nested Subsection Styles */
.nav-subsection {
    margin-top: 5px;
    margin-left: 0;
}

.nav-subsection-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 20px 6px 40px;
    background: none;
    border: none;
    color: #868e96;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 5px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.nav-subsection-toggle:hover {
    color: var(--primary-blue);
    background-color: var(--sidebar-hover);
}

.nav-subsection-toggle[aria-expanded="true"] .nav-subsection-icon {
    transform: rotate(180deg);
}

.nav-subsection-title {
    flex: 1;
}

.nav-subsection-icon {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    margin-left: 8px;
}

.nav-subsection-content {
    padding: 0;
}

.nav-item-sub {
    padding-left: 40px;
    font-size: 0.9rem;
}

.nav-item-sub i {
    font-size: 1.1rem;
    width: 24px;
}

/* Sidebar Collapsed State */
body.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .nav-item span,
body.sidebar-collapsed .nav-section-title {
    display: none;
}

body.sidebar-collapsed .nav-subsection-toggle,
body.sidebar-collapsed .nav-subsection-content,
body.sidebar-collapsed .nav-item-sub {
    display: none;
}

body.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* =========================================
   MAIN CONTENT AREA
   ========================================= */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px;
    transition: margin-left 0.3s ease;
    background-color: var(--content-bg);
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.page-actions {
    display: flex;
    gap: 10px;
}

/* =========================================
   STAT CARDS
   ========================================= */
.stat-card {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 1.75rem;
    color: white;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.stat-change {
    font-size: 0.875rem;
}

/* =========================================
   CARDS
   ========================================= */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.card-header {
    background-color: white;
    border-bottom: 1px solid var(--medium-gray);
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 20px;
}

/* =========================================
   ACTIVITY STREAM
   ========================================= */
.activity-stream {
    position: relative;
}

.activity-item {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid var(--medium-gray);
}

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

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: white;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 0.9375rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.activity-time {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* =========================================
   TABLES
   ========================================= */
.table {
    background-color: white;
}

.table thead {
    background-color: var(--light-gray);
}

.table thead th {
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--dark-gray);
    border-bottom: 2px solid var(--medium-gray);
    padding: 12px;
}

.table tbody td {
    vertical-align: middle;
    padding: 12px;
}

.table-hover tbody tr:hover {
    background-color: #e7f1ff;
    cursor: pointer;
}

th.sortable {
    user-select: none;
    white-space: nowrap;
}

th.sortable .sort-icon {
    font-size: 0.75rem;
    opacity: 0.55;
    margin-left: 0.2rem;
}

th.sortable:hover .sort-icon {
    opacity: 1;
}

/* Table Actions - compact icon buttons */
.table-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.table-actions .btn,
.btn-icon-sm {
    --bs-btn-padding-y: 0;
    --bs-btn-padding-x: 0;
    padding: 0;
    font-size: 0.7rem;
    min-width: 1.5rem;
    width: 1.5rem;
    height: 1.5rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.3rem;
}

.table-actions .btn i,
.btn-icon-sm i {
    font-size: 0.7rem;
    line-height: 1;
}

/* =========================================
   BADGES
   ========================================= */
.badge {
    padding: 6px 12px;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    padding: 8px 16px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* =========================================
   FORMS
   ========================================= */
.form-label {
    font-weight: 500;
    color: var(--dark-gray);
    margin-bottom: 8px;
}

.form-control,
.form-select {
    border-radius: 6px;
    border: 1px solid var(--medium-gray);
    padding: 10px 14px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* =========================================
   FILTERS
   ========================================= */
.filter-bar {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.filter-bar .row {
    align-items: end;
}

/* =========================================
   TABS
   ========================================= */
.nav-tabs {
    border-bottom: 2px solid var(--medium-gray);
}

.nav-tabs .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 12px 20px;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-light);
}

.nav-tabs .nav-link.active {
    color: var(--primary-blue);
    background-color: transparent;
    border-bottom-color: var(--primary-blue);
}

/* =========================================
   FOOTER
   ========================================= */
.main-footer {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid var(--medium-gray);
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    body.sidebar-collapsed .main-content {
        margin-left: 0;
    }
}

@media (max-width: 767.98px) {
    .main-content {
        padding: 20px 15px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        margin-right: 15px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
}

/* =========================================
   UTILITY CLASSES
   ========================================= */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shadow-hover {
    transition: box-shadow 0.2s;
}

.shadow-hover:hover {
    box-shadow: var(--shadow-md);
}

/* Avatar Group */
.avatar-group {
    display: flex;
    align-items: center;
}

.avatar-group img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid white;
    margin-left: -10px;
}

.avatar-group img:first-child {
    margin-left: 0;
}

/* Progress Bar Custom */
.progress {
    height: 8px;
    border-radius: 4px;
}

/* =========================================
   CUSTOM SCROLLBAR
   ========================================= */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-gray);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-gray);
}

/* =========================================
   ICON PICKER
   ========================================= */
.icon-item {
    transition: all 0.2s ease;
    border: 1px solid var(--medium-gray) !important;
}

.icon-item:hover {
    background-color: var(--primary-blue) !important;
    color: white !important;
    border-color: var(--primary-blue) !important;
    transform: scale(1.05);
}

.icon-item:hover .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.icon-item i {
    display: block;
    margin-bottom: 0.25rem;
}

/* =========================================
   PAGINATION & SEARCH STYLES
   ========================================= */

/* Remove border from last table row */
.table tbody tr:last-child td {
    border-bottom: none;
}

/* Search input group - remove border from buttons */
.input-group .btn-outline-secondary {
    border-left: none;
    border-color: var(--medium-gray);
}

.input-group .btn-outline-secondary:first-child {
    border-left: 1px solid var(--medium-gray);
}

.input-group .form-control:focus + .btn-outline-secondary,
.input-group .btn-outline-secondary:focus {
    border-color: var(--primary-blue);
    box-shadow: none;
}

/* Pagination - Theme Colors */
.pagination {
    margin: 0;
}

.pagination .page-link {
    color: var(--text-primary);
    border-color: var(--medium-gray);
    padding: 0.5rem 0.75rem;
    transition: all 0.2s;
}

.pagination .page-link:hover {
    color: var(--primary-blue);
    background-color: var(--light-gray);
    border-color: var(--primary-light);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
}

.pagination .page-item.disabled .page-link {
    color: var(--text-muted);
    background-color: white;
    border-color: var(--medium-gray);
    cursor: not-allowed;
    opacity: 0.6;
}

/* =========================================
   SEARCHABLE SELECT STYLES
   ========================================= */
.searchable-select-badges.has-badges {
    margin-top: 0.65rem;
}

#stmUserSelectWrapper.has-badges,
#stmUnitSelectWrapper.has-badges,
#userSelectWrapper.has-badges,
#unitSelectWrapper.has-badges {
    margin-top: 0.65rem;
}

.searchable-select-wrapper {
    position: relative;
    display: block;
}

/* Trigger: div with form-select class — looks exactly like a native select */
.searchable-select-wrapper .searchable-select-trigger.form-select {
    cursor: pointer;
    display: flex;
    align-items: center;
    /* Override Bootstrap's form-select cursor */
    user-select: none;
}

.searchable-select-wrapper .searchable-select-trigger.form-select:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.searchable-select-wrapper .ss-selected-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dropdown panel */
.searchable-select-panel {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    z-index: 1060;
    background: #fff;
    border: 1px solid var(--medium-gray, #dee2e6);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    max-height: 280px;
    overflow-y: auto;
}

/* Option items */
.searchable-select-panel .ss-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.1s;
}

.searchable-select-panel .ss-option:hover {
    background-color: var(--light-gray, #f8f9fa);
}

.searchable-select-panel .ss-option .form-check-input {
    margin-top: 0;
    flex-shrink: 0;
    pointer-events: none;
}

/* Inventory detail: stock meter + assignment tree */
.inventory-file-drop {
    border: 2px dashed #c5d0de;
    border-radius: 0.75rem;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.inventory-file-drop:hover,
.inventory-file-drop.drag-over {
    border-color: #0d6efd;
    background: #f0f6ff;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.08);
}

.inventory-stock-meter {
    padding: 1rem 1.15rem;
    border-radius: 0.75rem;
    background: #f8f9fb;
    border: 1px solid #e9ecef;
}

.inventory-stock-progress {
    height: 0.65rem;
    border-radius: 999px;
    overflow: hidden;
    background: #e9ecef;
}

.inventory-stock-progress .progress-bar {
    transition: width 0.35s ease;
}

.inventory-tree-branch {
    position: relative;
}

.inventory-tree-node {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.65rem;
    background: #fff;
    border: 1px solid #e5e9f0;
}

.inventory-tree-root > i {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e8f0fe;
    color: #0d6efd;
    flex-shrink: 0;
}

.inventory-tree-root-stock > i {
    background: #fff4e0;
    color: #d97706;
}

.inventory-tree-title {
    font-weight: 600;
    line-height: 1.3;
}

.inventory-tree-sub {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.15rem;
}

.inventory-tree-children {
    list-style: none;
    margin: 0.35rem 0 0 1.15rem;
    padding: 0 0 0 1.15rem;
    border-left: 2px solid #e5e9f0;
}

.inventory-tree-leaf {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.85rem;
    margin-bottom: 0.35rem;
    border-radius: 0.5rem;
    background: #fafbfc;
    border: 1px solid #eef1f5;
    font-weight: 500;
}

.inventory-tree-leaf i {
    flex-shrink: 0;
}

.inventory-tree-qty {
    font-size: 0.85rem;
    font-weight: 600;
    color: #b45309;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    padding: 0.15rem 0.65rem;
    white-space: nowrap;
}

.inventory-file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}

.inventory-file-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 0.9rem;
    border: 1px solid #e5e9f0;
    border-radius: 0.75rem;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.inventory-file-card:hover {
    border-color: #c5d4ea;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.inventory-file-card.is-deleted {
    opacity: 0.65;
    background: #fafafa;
}

.inventory-file-icon {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.6rem;
    background: #f1f5f9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.inventory-file-meta {
    min-width: 0;
    flex: 1;
}

.inventory-file-name {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}

a.inventory-file-name:hover {
    color: #0d6efd;
}

.inventory-file-sub {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.15rem;
}

.inventory-file-del {
    flex-shrink: 0;
    align-self: center;
}

.inventory-ticket-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.75rem;
}

.inventory-ticket-card {
    display: block;
    padding: 0.9rem 1rem;
    border: 1px solid #e5e9f0;
    border-radius: 0.75rem;
    background: linear-gradient(180deg, #fbfdff 0%, #fff 100%);
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.inventory-ticket-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 4px 14px rgba(13, 110, 253, 0.1);
    transform: translateY(-1px);
    color: inherit;
}

.inventory-ticket-no {
    font-weight: 700;
    font-size: 0.85rem;
    color: #0d6efd;
}

.inventory-ticket-subject {
    margin-top: 0.4rem;
    font-size: 0.92rem;
    font-weight: 500;
    color: #334155;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
