/* Global Font & Body */
body {
    font-family: 'Outfit', sans-serif;
    background-color: #f3f4f6; /* Light gray background */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #111827;
}

/* -------------------------------------------------------------------------
   SIDEBAR CORE - "Deep Dark Premium"
   ------------------------------------------------------------------------- */
/* Forced consistency variable for sidebar width in collapsed mode if needed */
:root {
    --sidebar-width-collapsed: 4.5rem; /* Standard mini width (approx 72px) */
    --sidebar-bg: #111827;    /* Slate 900 */
    --sidebar-hover-bg: #1f2937; /* Slate 800 */
    --accent-color: #6366f1;  /* Indigo 500 */
}

.app-sidebar,
.sidebar-brand,
.sidebar-footer,
.sidebar-wrapper {
    background-color: var(--sidebar-bg) !important;
}

.app-sidebar {
    border-right: none;
    box-shadow: 4px 0 24px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Space between nav and footer */
    z-index: 1040;
}

/* Brand - Top Section */
.sidebar-brand {
    background-color: transparent !important;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center; /* Center logo in collapsed */
}

.brand-link {
    color: #fff !important;
    font-weight: 700;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.sidebar-brand .brand-text {
    margin-left: 0.5rem;
    transition: opacity 0.3s;
}

/* Navigation Items */
.sidebar-wrapper {
    flex-grow: 1; /* Take available space */
    padding: 10px 0;
    scrollbar-width: none; /* Hide scrollbar for cleaner look */
}

.nav-sidebar .nav-item {
    margin: 4px 10px; /* spacing around items */
}

.nav-sidebar .nav-link {
    color: #9ca3af; /* Slate 400 */
    border-radius: 8px; /* Rounded items */
    padding: 10px 12px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-sidebar .nav-link:hover {
    background-color: rgba(255,255,255,0.05);
    color: #fff;
}

.nav-sidebar .nav-link.active {
    background-color: var(--accent-color);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3); /* Glow effect */
}

.nav-sidebar .nav-icon {
    font-size: 1.2rem;
    margin-right: 0.8rem;
    width: 24px;
    text-align: center;
    transition: margin 0.3s;
}

/* Sidebar Footer (Profile) */
.sidebar-footer {
    padding: 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.user-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
    text-decoration: none;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.user-panel:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.user-panel img {
    width: 36px;
    height: 36px;
    border-radius: 8px; /* Rounded square avatar */
    object-fit: cover;
}

/* -------------------------------------------------------------------------
   STRICT SIDEBAR LOCK (COLLAPSED STATE)
   ------------------------------------------------------------------------- */

/* 1. Global Width Locking (Disable all transitions to stop shrinking feel) */
.sidebar-collapse .app-sidebar,
.sidebar-collapse .app-main,
.sidebar-collapse .app-header,
.sidebar-collapse .sidebar-brand,
.sidebar-collapse .sidebar-footer,
.sidebar-collapse .nav-link,
.sidebar-collapse .nav-icon {
    transition: none !important;
}

/* 2. Force Exact Width (73px) and Matching Margin (72px) */
/* The 1px overlap (73px width vs 72px margin) ensures no white line appears between them */
body.sidebar-collapse {
    --lte-sidebar-width: 73px !important;
    --lte-sidebar-collapsed-width: 73px !important;
}

.sidebar-collapse .app-sidebar,
.sidebar-collapse .app-sidebar:hover {
    width: 73px !important;
    min-width: 73px !important;
    max-width: 73px !important;
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    overflow: hidden !important;
    z-index: 1050 !important;
    border-right: none !important;
    box-shadow: none !important;
}

/* 3. Force Content to Align (72px from left) */
.sidebar-collapse .app-main,
.sidebar-collapse .app-header {
    margin-left: 72px !important;
    width: calc(100% - 72px) !important;
    position: relative !important;
}

/* 4. Hide all text elements strictly */
.sidebar-collapse .brand-text,
.sidebar-collapse .nav-link p,
.sidebar-collapse .info,
.sidebar-collapse .nav-arrow,
.sidebar-collapse .nav-header {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    position: absolute !important;
}

/* 5. Center Logo and Icons */
.sidebar-collapse .sidebar-brand,
.sidebar-collapse .nav-item,
.sidebar-collapse .sidebar-footer,
.sidebar-collapse .user-panel {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

.sidebar-collapse .nav-link {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: 46px !important;
    width: 100% !important;
    border-radius: 0 !important;
}

.sidebar-collapse .nav-link.active {
    background-color: var(--accent-color) !important;
}

.sidebar-collapse .nav-icon,
.sidebar-collapse .user-panel img {
    margin: 0 !important;
    font-size: 1.4rem !important;
}

.sidebar-collapse .app-header .container-fluid {
    padding-left: 0.25rem !important;
}

/* Navbar Tweaks to match */
.app-header {
    border-bottom: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Vehicle Search Bar Component */
.vehicle-search-bar {
    background-color: #1f3a6e; /* Deep Blue from image */
    padding: 12px;
    border-radius: 8px; /* Slightly rounded container */
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap; /* responsive */
    margin-bottom: 15px;
}

.vehicle-search-bar .form-select {
    border-radius: 4px; 
    border: 1px solid rgba(255,255,255,0.1);
    height: 40px;
    flex: 1; /* Distribute space */
    min-width: 150px;
    background-color: #fff;
    color: #333;
}

.vehicle-search-bar .btn-search {
    background-color: #38bdf8; /* Light Blue/Cyan */
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
    height: 40px;
    padding: 0 20px;
    transition: background 0.2s;
}

.vehicle-search-bar .btn-search:hover {
    background-color: #0ea5e9;
    color: white;
}

/* Adjust select2 inside the bar */
.vehicle-search-bar .select2-container .select2-selection--single {
    height: 40px !important;
    border-radius: 4px !important;
    border: 1px solid #ced4da !important;
}

.vehicle-search-bar .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    line-height: 38px !important;
}

/* -------------------------------------------------------------------------
   BTN-XS (Bootstrap 5 doesn't have this)
   ------------------------------------------------------------------------- */
.btn-xs {
    padding: 0.15rem 0.4rem;
    font-size: 0.75rem;
    line-height: 1.3;
    border-radius: 0.2rem;
}

/* -------------------------------------------------------------------------
   INLINE EDIT STYLES
   ------------------------------------------------------------------------- */
.edit-input {
    transition: all 0.2s ease;
}

/* Action buttons in fitment tables - compact spacing */
#mfr_table td .btn-xs,
#sup_table td .btn-xs {
    margin: 1px;
}

/* Inline editing flash animation */
@keyframes flashGreen {
    0% { background-color: #d4edda; }
    100% { background-color: transparent; }
}

