* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, Arial, sans-serif;
    background: #FFFFFF; /* #f4f6f8; */
    color: #1f2933;
}

/* =========================
   TOP NAVIGATION
   ========================= */

.top-nav {
    height: 68px;
    background: #111827;
    color: white;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 24px;

    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    z-index: 1000;

    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav-left {
    display: flex;
    align-items: center;
}

.brand {
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.brand-name {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 1px;
}

.brand-subtitle {
    font-size: 10px;
    opacity: .65;
    letter-spacing: 1.5px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-icon-button {
    border: none;
    background: transparent;
    color: white;
    font-size: 19px;
    cursor: pointer;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;

    border-radius: 50%;

    background: #374151;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 600;
}

.user-name {
    font-size: 14px;
}

.user-arrow {
    font-size: 9px;
    opacity: .7;
}

/* =========================
   SIDEBAR
   ========================= */

.sidebar {
    position: fixed;

    top: 68px;
    left: 0;
    bottom: 0;

    width: 235px;

    background: #1f2937;

    display: flex;
    flex-direction: column;

    z-index: 900;

    transition: transform .25s ease;
}

.sidebar-menu {
    padding: 20px 12px;
}

.sidebar a {
    display: flex;
    align-items: center;

    height: 46px;

    padding: 0 14px;

    margin-bottom: 4px;

    border-radius: 7px;

    color: #cbd5e1;

    text-decoration: none;

    font-size: 14px;

    transition: all .15s ease;
}

.sidebar a:hover {
    background: #374151;
    color: white;
}

.sidebar a.active {
    background: #111827;
    color: white;
}

.menu-icon {
    width: 32px;

    font-size: 17px;

    opacity: .85;
}

.sidebar-divider {
    height: 1px;
    background: #374151;
    margin: 18px 10px;
}

.sidebar-bottom {
    margin-top: auto;
    padding: 12px;
    border-top: 1px solid #374151;
}

/* =========================
   MAIN CONTENT
   ========================= */

.main-content {
    margin-left: 235px;

    padding: 92px 30px 40px;

    min-height: 100vh;
}

/* =========================
   MOBILE MENU
   ========================= */

.mobile-menu-button {
    display: none;

    border: none;
    background: transparent;
    color: white;

    font-size: 24px;

    margin-right: 15px;

    cursor: pointer;
}

@media (max-width: 800px) {

    .mobile-menu-button {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding-left: 18px;
        padding-right: 18px;
    }

    .user-name,
    .user-arrow {
        display: none;
    }
}

/* =========================
   SIDEBAR PARENT MENU
   ========================= */

.sidebar-parent {
    width: 100%;

    display: flex;
    align-items: center;

    height: 46px;

    padding: 0 14px;

    margin-bottom: 4px;

    border: none;
    border-radius: 7px;

    background: transparent;

    color: #cbd5e1;

    font-family: inherit;
    font-size: 14px;

    text-align: left;

    cursor: pointer;

    transition: all .15s ease;
}

.sidebar-parent:hover {
    background: #374151;
    color: white;
}

.sidebar-parent.open {
    color: white;
    background: #374151;
}

.sidebar-parent .menu-text {
    flex: 1;
}

.submenu-arrow {
    font-size: 20px;

    transition: transform .2s ease;

    opacity: .7;
}

.sidebar-parent.open .submenu-arrow {
    transform: rotate(90deg);
}


/* =========================
   SIDEBAR SUBMENU
   ========================= */

.sidebar-submenu {
    max-height: 0;

    overflow: hidden;

    transition:
        max-height .25s ease,
        opacity .2s ease;

    opacity: 0;
}

.sidebar-submenu.open {
    max-height: 400px;
    opacity: 1;
}

.sidebar-submenu a {
    height: 38px;

    margin: 2px 0 2px 32px;

    padding-left: 15px;

    border-left: 1px solid #4b5563;

    border-radius: 0 6px 6px 0;

    font-size: 13px;

    color: #9ca3af;
}

.sidebar-submenu a:hover {
    color: white;
    background: #374151;
}

.sidebar-submenu a.active {
    color: white;
    background: #111827;
    border-left: 2px solid #ffffff;
}

/* ============================================================
   PARTS SEARCH TABLE - COLUMN SPACING
   ============================================================ */

.parts-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.parts-table th,
.parts-table td {
    padding: 2px 16px;
    vertical-align: middle;
}

/* Extra breathing room between columns */
.parts-table th + th,
.parts-table td + td {
    border-left: 1px solid transparent;
}

/* Part number */
.parts-table th:nth-child(2),
.parts-table td:nth-child(2) {
    padding-left: 20px;
    padding-right: 20px;
}

/* Description */
.parts-table th:nth-child(3),
.parts-table td:nth-child(3) {
    padding-left: 24px;
    padding-right: 24px;
}

/* Numeric columns */
.parts-table th.number-column,
.parts-table td.number-column {
    padding-left: 18px;
    padding-right: 18px;
    text-align: right;
}

/* Bin location */
.parts-table th:nth-child(8),
.parts-table td:nth-child(8) {
    padding-left: 20px;
    padding-right: 20px;
}

/* Vendor */
.parts-table th:nth-child(9),
.parts-table td:nth-child(9) {
    padding-left: 20px;
    padding-right: 20px;
}

/* Checkbox column */
.parts-table .select-column {
    width: 65px;
    min-width: 65px;
    text-align: center;
    padding-left: 12px;
    padding-right: 12px;
}

/* ============================================================
   SEARCH FORM
   ============================================================ */

.search-form {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 16px;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
}

.search-input-wrapper input {
    width: 100%;
    box-sizing: border-box;
}

.search-form .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* ============================================================
   SELECTED PARTS HEADER
   ============================================================ */

.selected-parts-header {
    display: flex;
    align-items: center;
}

.selected-parts-title {
    display: flex;
    align-items: baseline;
    gap: 28px;
}

.selected-parts-title h2 {
    margin: 0;
}

.selected-parts-summary {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #64748b;
    font-size: 14px;
}

.selected-parts-summary span {
    white-space: nowrap;
}

.selected-parts-summary strong {
    color: #1e293b;
    font-weight: 600;
    margin-left: 3px;
}

.selected-parts-summary strong.warning {
    color: #dc2626;
}

.add-parts-container {
    margin-top: 20px;
}