/* =========================================================
   INVENTORY CONTROL SYSTEM
   Global Stylesheet
   ========================================================= */

@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css");


/* =========================================================
   1. CSS VARIABLES
   ========================================================= */

:root {

    /* -------------------------
       Colors
       ------------------------- */

    --color-primary: #08a9e6;
    --color-primary-dark: #078fca;
    --color-primary-light: #eaf8fd;

    --color-black: #000000;
    --color-white: #ffffff;

    --color-text: #222222;
    --color-text-light: #666666;
    --color-text-muted: #888888;
    --color-text-secondary: #666666;

    --color-border: #dddddd;
    --color-border-light: #eeeeee;

    --color-background: #f7f7f7;
    --color-gray-light: #f5f5f5;

    --color-danger: #d9534f;
    --color-danger-dark: #c9302c;

    --color-success: #2e8b57;
    --color-success-dark: #267349;

    --color-warning-text: #9a5b00;

    /* -------------------------
       Layout
       ------------------------- */

    --sidebar-width: 260px;
    --page-padding: 32px;

    /* -------------------------
       Components
       ------------------------- */

    --border-radius: 6px;
    --card-radius: 8px;

    --shadow-small:
        0 1px 3px rgba(0, 0, 0, 0.08);

    --shadow-card:
        0 2px 8px rgba(0, 0, 0, 0.08);

    /* -------------------------
       Typography
       ------------------------- */

    --font-family:
        Arial,
        Helvetica,
        sans-serif;
}


/* =========================================================
   2. GLOBAL STYLES
   ========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;

    font-family: var(--font-family);
    color: var(--color-text);

    background-color: var(--color-background);
}

button,
input,
select,
textarea {
    font-family: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

a {
    color: inherit;
    text-decoration: none;
}


/* =========================================================
   3. SHARED BUTTONS
   ========================================================= */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 18px;

    border: 1px solid transparent;
    border-radius: var(--border-radius);

    font-size: 14px;
    font-weight: 600;

    text-decoration: none;
    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}


/* Primary */

.button-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

.button-primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}


/* Secondary */

.button-secondary {
    background-color: var(--color-white);
    border-color: var(--color-border);
    color: var(--color-text);
}

.button-secondary:hover {
    background-color: var(--color-gray-light);
}


/* Danger */

.button-danger {
    background-color: transparent;
    border-color: #dc3545;
    color: #dc3545;
}

.button-danger:hover {
    background-color: #dc3545;
    color: var(--color-white);
}


/* Success */

.button-success {
    background-color: var(--color-success);
    border-color: var(--color-success);
    color: var(--color-white);
}

.button-success:hover {
    background-color: var(--color-success-dark);
    border-color: var(--color-success-dark);
}


/* Small Button */

.small-button {
    padding: 7px 10px;
    font-size: 12px;
}


/* =========================================================
   4. SHARED TABLE / ROW UTILITIES
   ========================================================= */

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background-color: var(--color-gray-light);
}

.clickable-row td:first-child {
    color: var(--color-primary);
}


/* =========================================================
   5. LOGIN PAGE
   ========================================================= */

.login-page {
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    background-color: var(--color-white);
}


/* Login Navbar */

.login-navbar {
    width: 100%;
    height: 90px;

    background-color: var(--color-primary);
}

.login-navbar-container {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;

    padding: 0 32px;
}

.login-logo-link {
    display: flex;
    align-items: center;
}

.login-navbar-logo {
    width: 150px;
    height: auto;
    display: block;
}


/* Login Main */

.login-main {
    flex: 1;

    display: flex;
    justify-content: center;
    align-items: flex-start;

    padding: 50px 20px;
}

.login-form {
    width: 100%;
    max-width: 460px;
}

.login-card {
    padding: 35px 40px 30px;

    background-color: var(--color-white);

    border: 1px solid var(--color-border);
    border-radius: var(--card-radius);

    box-shadow: var(--shadow-card);
}


/* Login Title */

.login-title-row {
    margin-bottom: 25px;
    text-align: center;
}

.login-title-row h1 {
    margin-bottom: 8px;
    font-size: 28px;
}

.login-title-row p {
    color: var(--color-text-light);
    font-size: 14px;
}


/* Login Error */

.login-error {
    display: none;

    margin-bottom: 18px;
    padding: 10px 12px;

    border: 1px solid #e5a4a1;
    border-radius: var(--border-radius);

    background-color: #fff4f3;
    color: var(--color-danger);

    font-size: 14px;
}


/* Login Form */

.login-form-row {
    display: flex;
    flex-direction: column;
    gap: 7px;

    margin-bottom: 18px;
}

.login-form-row label {
    font-size: 14px;
    font-weight: 600;
}

.login-form-row input {
    width: 100%;

    padding: 11px 12px;

    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);

    font-size: 15px;

    outline: none;

    transition: border-color 0.15s ease;
}

.login-form-row input:focus {
    border-color: var(--color-primary);
}


/* Login Button */

#login-button {
    width: 100%;
    height: 46px;

    padding: 12px 16px;

    font-size: 16px;
}

#login-button:active {
    transform: translateY(1px);
}

#login-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.login-arrow {
    font-size: 17px;
}


/* Login Footer */

.login-footer {
    padding: 18px 20px;
    text-align: center;
}

.login-footer p {
    color: var(--color-text-muted);
    font-size: 12px;
}


/* =========================================================
   6. SIDEBAR
   ========================================================= */

.sidebar,
#sidebar-container {
    position: fixed;
    top: 0;
    left: 0;

    width: var(--sidebar-width);
    height: 100vh;

    z-index: 1000;
}

.sidebar {
    display: flex;
    flex-direction: column;

    background-color: var(--color-black);
    color: var(--color-white);
}


/* Sidebar Brand */

.sidebar-brand {
    min-height: 150px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 20px;

    border-bottom: 1px solid #222222;
}

.sidebar-logo {
    width: 212px;
    height: auto;

    object-fit: contain;

    margin-bottom: 10px;
}

.sidebar-brand h1 {
    margin: 0;

    font-size: 22px;
    font-weight: 700;

    text-align: center;
}


/* Sidebar Navigation */

.sidebar-navigation {
    flex: 1;
    padding: 18px 12px;
}

.sidebar-link {
    width: 100%;

    display: flex;
    align-items: center;

    gap: 12px;

    margin-bottom: 4px;
    padding: 11px 12px;

    border-radius: var(--border-radius);

    color: #cccccc;

    font-size: 14px;

    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

.sidebar-link:hover {
    background-color: #1c1c1c;
    color: var(--color-white);
}

.sidebar-link.active {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.sidebar-icon {
    width: 20px;
    min-width: 20px;

    display: flex;
    justify-content: center;

    font-size: 20px;
}


/* Sidebar User */

.sidebar-user {
    display: flex;
    align-items: center;

    gap: 10px;

    margin-bottom: 10px;
    padding: 12px 14px;

    border-top: 1px solid #333333;
    border-bottom: 1px solid #333333;
}

.sidebar-user-icon {
    flex-shrink: 0;
    font-size: 22px;
}

.sidebar-user-info {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.sidebar-user-name {
    color: var(--color-white);

    font-size: 14px;
    font-weight: 600;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    margin-top: 3px;

    color: #aaaaaa;

    font-size: 12px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* Sidebar Footer */

.sidebar-footer {
    padding: 14px 12px;

    border-top: 1px solid #222222;
}

.sidebar-logout {
    width: 100%;

    display: flex;
    align-items: center;

    gap: 12px;

    padding: 11px 12px;

    border: none;
    border-radius: var(--border-radius);

    background: transparent;
    color: #cccccc;

    font-size: 14px;
    text-align: left;
}

.sidebar-logout:hover {
    background-color: #1c1c1c;
    color: var(--color-white);
}

.sidebar-copyright {
    padding: 12px 12px 4px;

    color: #777777;

    font-size: 11px;
    text-align: center;
}


/* =========================================================
   7. PAGE LAYOUT
   ========================================================= */

.page-content {
    min-height: 100vh;

    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);

    padding: var(--page-padding);

    background-color: var(--color-white);
}


/* Page Header */

.page-header {
    margin-bottom: 28px;
}

.page-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;
}

.page-header h1 {
    margin-bottom: 7px;

    font-size: 28px;
    font-weight: 600;
}

.page-header p {
    color: var(--color-text-light);
    font-size: 14px;
}


/* Page Section Header */

.page-section-header {
    margin-bottom: 20px;
}

.page-section-header h2 {
    margin-bottom: 6px;

    font-size: 20px;
    font-weight: 600;
}

.page-section-header p {
    color: var(--color-text-light);
    font-size: 14px;
}


/* =========================================================
   8. SHARED FORMS
   ========================================================= */

.form-row {
    display: flex;
    flex-direction: column;
    gap: 7px;

    margin-bottom: 18px;
}

.form-row label {
    font-size: 14px;
    font-weight: 600;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;

    padding: 10px 12px;

    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);

    background-color: var(--color-white);
    color: var(--color-text);

    font-size: 14px;

    outline: none;

    transition: border-color 0.15s ease;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    border-color: var(--color-primary);
}

/* Special Project Checkbox */

.form-row .checkbox-label {
    display: flex;
    flex-direction: row;
    align-items: center;

    gap: 8px;

    width: fit-content;

    margin: 0;

    cursor: pointer;
}

.form-row .checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;

    margin: 0;
    padding: 0;

    border: none;

    cursor: pointer;
}

.form-row .checkbox-label span {
    font-size: 14px;
    font-weight: 600;
}

.form-row input[readonly],
.non-editable-field {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

.form-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 10px;

    margin-top: 24px;
}

.form-help {
    color: var(--color-text-light);
    font-size: 12px;
}

.form-message {
    min-height: 20px;

    margin-top: 8px;

    font-size: 14px;
}

.form-message.error {
    color: #d93025;
}

.form-message.success {
    color: #188038;
}

.quantity-warning {
    color: var(--color-warning-text);
}


/* =========================================================
   9. ADD / EDIT ITEM FORMS
   ========================================================= */

.add-item-form-container,
.edit-item-container {
    width: 100%;
    max-width: none;

    padding: 28px;

    border: 1px solid var(--color-border);
    border-radius: var(--card-radius);

    background-color: var(--color-white);

    box-shadow: var(--shadow-card);
}

.add-item-form-container form,
.edit-item-container form {
    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 20px;
}

.add-item-form-container .form-row,
.edit-item-container .form-row {
    margin-bottom: 0;
}

.add-item-form-container .form-buttons,
.edit-item-container .form-buttons {
    grid-column: 1 / -1;
    margin-top: 4px;
}

.edit-item-container h2 {
    margin-bottom: 24px;

    font-size: 20px;
    font-weight: 600;
}



/* =========================================================
   ADD INVENTORY ITEM - FORM IMPROVEMENTS
   ========================================================= */

/* Add Item Form */

.add-item-form-container {
    padding: 32px;
    border-radius: 12px;
}

.add-item-form-container form {
    column-gap: 24px;
    row-gap: 24px;
}


/* Form Labels */

.add-item-form-container .form-row label {
    color: var(--color-text);
    font-size: 13px;
    font-weight: 600;
}


/* Input Fields */

.add-item-form-container .form-row input,
.add-item-form-container .form-row select {
    min-height: 42px;
    border-radius: 6px;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}


/* Focus State */

.add-item-form-container .form-row input:focus,
.add-item-form-container .form-row select:focus,
.add-item-form-container .form-group select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(8, 169, 230, 0.12);
}


/* Read-Only and Disabled Fields */

.add-item-form-container input:disabled,
.add-item-form-container select:disabled,
.add-item-form-container textarea:disabled,
.add-item-form-container input[readonly] {
    background-color: #eef1f4;
    color: #737b84;
    border-color: #d8dde3;
    cursor: not-allowed;
    opacity: 1;
}


/* Item Type Section */

.item-type-group {
    grid-column: 1 / -1;

    display: flex;
    flex-direction: column;
    gap: 12px;

    padding: 20px;

    border: 1px solid var(--color-border);
    border-radius: 10px;

    background-color: #f8fafc;
}

.item-type-group > label:first-child {
    font-size: 15px;
    font-weight: 700;
}


/* Item Type Options */

.item-type-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.item-type-option {
    min-height: 58px;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 14px 16px;

    border: 1px solid var(--color-border);
    border-radius: 8px;

    background-color: var(--color-white);

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        border-color 0.15s ease,
        background-color 0.15s ease,
        box-shadow 0.15s ease;
}

.item-type-option:hover {
    border-color: var(--color-primary);
    background-color: #f2fbff;
}

.item-type-option input[type="checkbox"] {
    width: 17px;
    height: 17px;

    flex-shrink: 0;

    margin: 0;
    padding: 0;

    accent-color: var(--color-primary);
    cursor: pointer;
}

.item-type-option span {
    line-height: 1.4;
}


/* Parent Item Dropdown */

.parent-item-group {
    grid-column: 1 / -1;

    display: flex;
    flex-direction: column;
    gap: 8px;

    padding: 20px;

    border: 1px solid #b8e5f7;
    border-radius: 10px;

    background-color: #f2fbff;
}

.parent-item-group label {
    font-size: 14px;
    font-weight: 700;
}

.parent-item-group select {
    width: 100%;
    min-height: 42px;

    padding: 10px 12px;

    border: 1px solid var(--color-border);
    border-radius: 6px;

    background-color: var(--color-white);

    font-size: 14px;
}


/* Specifications Checkbox */

.add-item-form-container .checkbox-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;

    gap: 12px;
}

.add-item-form-container .checkbox-row label {
    font-size: 13px;
    font-weight: 600;
}

.add-item-form-container .checkbox-row input[type="checkbox"] {
    width: 17px;
    height: 17px;

    flex-shrink: 0;

    margin: 0;

    accent-color: var(--color-primary);
}


/* Form Buttons */

.add-item-form-container .form-buttons {
    padding-top: 20px;

    border-top: 1px solid var(--color-border-light);
}


/* Responsive Item Type Options */

@media (max-width: 1000px) {
    .item-type-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .add-item-form-container {
        padding: 20px;
    }

    .item-type-options {
        grid-template-columns: 1fr;
    }

    .item-type-option {
        min-height: 50px;
    }
}

/* Require Specifications - single column */
.spec-required-group {
    grid-column: auto;
}

/* Keep checkbox card from stretching across the row */
.spec-required-group .item-type-options {
    grid-template-columns: 1fr;
}


/* =========================================================
   10. INVENTORY FILTERS
   ========================================================= */

.inventory-filter-container,
.location-filter-container {
    margin-bottom: 24px;
    padding: 18px;

    border: 1px solid var(--color-border);
    border-radius: var(--card-radius);

    background-color: #fafafa;
}

.inventory-filter-row,
.location-filter-row {
    display: flex;
    align-items: flex-end;

    gap: 14px;

    flex-wrap: wrap;
}

.inventory-filter-field,
.location-filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.inventory-filter-field {
    min-width: 130px;
}

.location-filter-field {
    min-width: 160px;
}

.inventory-filter-field label,
.location-filter-field label {
    color: var(--color-text-light);

    font-size: 12px;
    font-weight: 600;
}

.inventory-filter-field input,
.inventory-filter-field select,
.location-filter-field input,
.location-filter-field select {
    height: 38px;

    padding: 8px 10px;

    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);

    background-color: var(--color-white);

    font-size: 13px;

    outline: none;
}

.inventory-filter-field input:focus,
.inventory-filter-field select:focus,
.location-filter-field input:focus,
.location-filter-field select:focus {
    border-color: var(--color-primary);
}

.inventory-filter-field select {
    min-width: 150px;
}

.inventory-filter-field input[type="number"] {
    width: 100px;
}

.inventory-filter-field.search-field,
.location-filter-field.search-field {
    flex: 1;
}

.inventory-filter-field.search-field {
    min-width: 240px;
}

.location-filter-field.search-field {
    min-width: 250px;
}

.inventory-filter-field.search-field input,
.location-filter-field.search-field input {
    width: 100%;
}

.inventory-filter-actions,
.location-filter-actions {
    display: flex;
    align-items: flex-end;
}

.filter-checkbox {
    height: 38px;

    justify-content: center;
}

.filter-checkbox label {
    display: flex;
    align-items: center;

    gap: 7px;

    white-space: nowrap;
    cursor: pointer;
}


/* =========================================================
   11. INVENTORY TABLE
   ========================================================= */

.inventory-table-container,
.locations-table-container,
.vendors-table-container,
.item-history-table-container,
.requests-table-container,
.request-items-table-container,
.request-summary-table-container {
    width: 100%;

    overflow-x: auto;

    border: 1px solid var(--color-border);
    border-radius: var(--card-radius);

    background-color: var(--color-white);
}

.inventory-table,
.locations-table,
.vendors-table,
.item-history-table,
.requests-table,
.request-items-table,
.request-summary-table {
    width: 100%;

    border-collapse: collapse;

    font-size: 13px;
}

.inventory-table {
    min-width: 1100px;
}

.locations-table {
    min-width: 650px;
}

.item-history-table {
    min-width: 1600px;
}

.requests-table {
    min-width: 700px;
}

.request-items-table {
    min-width: 1000px;
}

.request-summary-table {
    min-width: 850px;
}


/* Shared Table Header */

.inventory-table thead,
.locations-table thead,
.vendors-table thead,
.item-history-table thead,
.requests-table thead,
.request-items-table thead,
.request-summary-table thead {
    background-color: var(--color-gray-light);
}

.inventory-table th,
.locations-table th,
.vendors-table th,
.item-history-table th,
.requests-table th,
.request-items-table th,
.request-summary-table th {
    padding: 12px 14px;

    border-bottom: 1px solid var(--color-border);

    color: var(--color-text-light);

    font-size: 14px;
    font-weight: 600;

    text-align: left;

    white-space: nowrap;
}


/* Shared Table Cells */

.inventory-table td,
.locations-table td,
.vendors-table td,
.item-history-table td,
.requests-table td,
.request-items-table td,
.request-summary-table td {
    padding: 13px 14px;

    border-bottom: 1px solid var(--color-border-light);

    vertical-align: middle;
}

.inventory-table tbody tr:hover,
.locations-table tbody tr:hover,
.vendors-table tbody tr:hover,
.item-history-table tbody tr:hover,
.requests-table tbody tr:hover,
.request-items-table tbody tr:hover,
.request-summary-table tbody tr:hover {
    background-color: #fafafa;
}

.inventory-table tbody tr:last-child td,
.locations-table tbody tr:last-child td,
.vendors-table tbody tr:last-child td,
.item-history-table tbody tr:last-child td,
.requests-table tbody tr:last-child td,
.request-items-table tbody tr:last-child td,
.request-summary-table tbody tr:last-child td {
    border-bottom: none;
}


/* =========================================================
   12. ARCHIVED ROWS
   ========================================================= */

.inventory-table tr.archived-row,
.locations-table tr.archived-row,
.vendors-table tr.archived-row {
    background-color: #f5f5f5;
    color: #777777;
}

.inventory-table tr.archived-row:hover,
.locations-table tr.archived-row:hover,
.vendors-table tr.archived-row:hover {
    background-color: #eeeeee;
}

.inventory-table tr.archived-row td,
.locations-table tr.archived-row td,
.vendors-table tr.archived-row td {
    color: #777777;
}

.archived-badge {
    display: inline-block;

    margin-left: 8px;
    padding: 4px 8px;

    border-radius: 4px;

    background-color: #e0e0e0;
    color: #666666;

    font-size: 12px;
    font-weight: 600;
}


/* =========================================================
   13. SORTING
   ========================================================= */

.sortable-header {
    cursor: pointer;
    user-select: none;
}

.sortable-header:hover {
    background-color: var(--color-gray-light);
}

#part-id-sort-indicator {
    margin-left: 4px;
    font-size: 0.85em;
}


/* =========================================================
   14. ITEM HISTORY
   ========================================================= */

.history-back-button {
    position: fixed;

    bottom: 24px;
    left: var(--sidebar-width);

    z-index: 1000;
}

.history-link {
    display: inline-block;

    color: var(--color-black);

    font-size: 14px;
    font-weight: 600;

    text-decoration: underline;
}

.history-link:hover {
    text-decoration: underline;
}

.item-history-table tbody tr {
    cursor: pointer;
}


/* Transaction History Header */

.history-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.history-header-actions {
    display: flex;
    align-items: center;

    gap: 10px;
}

.history-header-actions #history-count {
    margin-right: 10px;
    white-space: nowrap;
}

.history-header-actions .button {
    white-space: nowrap;
}


/* =========================================================
   15. ITEM DETAILS
   ========================================================= */

.item-details-container,
.location-details-container {
    width: 100%;

    padding: 26px;

    border: 1px solid var(--color-border);
    border-radius: var(--card-radius);

    background-color: var(--color-white);

    box-shadow: var(--shadow-card);
}

.item-details-grid,
.location-details-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));
}

.detail-field {
    min-width: 0;

    padding: 18px;

    border-right: 1px solid var(--color-border-light);
    border-bottom: 1px solid var(--color-border-light);
}

.detail-field:nth-child(3n) {
    border-right: none;
}

.detail-field:nth-last-child(-n + 3) {
    border-bottom: none;
}

.detail-label {
    display: block;

    margin-bottom: 7px;

    color: var(--color-text-light);

    font-size: 12px;
    font-weight: 600;

    text-transform: uppercase;
}

.detail-value {
    display: block;

    color: var(--color-text);

    font-size: 15px;
    font-weight: 500;

    overflow-wrap: anywhere;
}


/* =========================================================
   16. LOCATION FORMS
   ========================================================= */

.edit-location-container {
    display: none;

    width: 100%;
    max-width: 760px;

    margin-top: 28px;
    padding: 28px;

    border: 1px solid var(--color-border);
    border-radius: var(--card-radius);

    background-color: var(--color-white);

    box-shadow: var(--shadow-card);
}

.add-location-container {
    width: 100%;
    max-width: 760px;

    padding: 28px;

    border: 1px solid var(--color-border);
    border-radius: var(--card-radius);

    background-color: var(--color-white);

    box-shadow: var(--shadow-card);
}

.edit-location-container h2 {
    margin-bottom: 24px;

    font-size: 20px;
    font-weight: 600;
}


/* =========================================================
   17. REQUESTS PAGE
   ========================================================= */

.request-summary {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 16px;

    margin-bottom: 24px;
}

.request-summary-card {
    min-height: 108px;

    padding: 20px;

    border: 1px solid var(--color-border);
    border-radius: var(--card-radius);

    background-color: var(--color-white);

    box-shadow: var(--shadow-card);
}

.request-summary-card:first-child {
    background-color: #eef4fb;
}

.request-summary-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;
}

.request-summary-card-header h2 {
    margin: 0;

    color: var(--color-text);

    font-size: 24px;
    font-weight: 700;
}

.request-summary-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 5px 10px;

    border-radius: 20px;

    background-color: #e4efff;
    color: #315da8;

    font-size: 12px;
    font-weight: 600;
}

.request-summary-count {
    margin-top: 10px;

    color: var(--color-text);

    font-size: 24px;
    font-weight: 700;
}


/* Requests Section */

.requests-section {
    min-height: 500px;

    padding: 20px;

    border: 1px solid var(--color-border);
    border-radius: var(--card-radius);

    background-color: var(--color-white);

    box-shadow: var(--shadow-card);
}

.requests-section-header {
    margin-bottom: 14px;
}

.requests-section-header h2 {
    margin: 0;

    color: var(--color-text);

    font-size: 20px;
    font-weight: 700;
}


/* =========================================================
   18. STATUS BADGES
   ========================================================= */

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 5px 10px;

    border-radius: 20px;

    font-size: 12px;
    font-weight: 600;

    white-space: nowrap;
}


/* Request Statuses */

.status.pending,
.status.draft {
    background-color: #fff3cd;
    color: #856404;
}

.status.pending-part-selection {
    background-color:  #EDE3FF;
    color: #6941A5;
}

.status.partially-completed,
.status.finalized {
    background-color: #cfe2ff;
    color: #084298;
}

.status.completed,
.status.reconciled {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status.denied {
    background-color: #f8d7da;
    color: #842029;
}


/* Inventory Statuses */

.status.in-stock {
    background-color: #d1f7e5;
    color: #167653;
}

.status.assorted {
    background-color:  #EDE3FF;
    color: #6941A5;
}

.status.low-stock {
    background-color: #ffe0a3;
    color: var(--color-warning-text);
}

.status.out-of-stock {
    background-color: #f8d7da;
    color: #a12630;
}


/* =========================================================
   19. REQUEST DETAILS
   ========================================================= */

.request-details-card {
    margin-bottom: 24px;

    border: 1px solid var(--color-border);
    border-radius: var(--card-radius);

    background-color: var(--color-white);
}

.request-details-card-header {
    padding: 16px 18px;

    border-bottom: 1px solid var(--color-border);
}

.request-details-card-header h2 {
    margin: 0;

    font-size: 16px;
    font-weight: 600;
}

.request-details-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 20px;

    padding: 20px;
}

.request-detail-field {
    display: flex;
    flex-direction: column;

    gap: 6px;
}

.request-detail-label {
    color: var(--color-text-light);

    font-size: 12px;
    font-weight: 600;
}

.request-detail-value {
    color: var(--color-text);
    font-size: 14px;
}

.request-details-section {
    margin-bottom: 24px;
}

.request-details-section-header {
    margin-bottom: 12px;
}

.request-details-section-header h2 {
    margin: 0;

    font-size: 18px;
    font-weight: 600;
}

.request-details-actions {
    display: flex;
    justify-content: flex-start;
}


/* =========================================================
   20. REQUEST ITEM ACTIONS
   ========================================================= */

.request-item-actions {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 24px;
    padding: 20px;

    border: 1px solid var(--color-border);
    border-radius: var(--card-radius);

    background-color: var(--color-white);
}

.request-quantity-control {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.request-quantity-control label {
    color: var(--color-text-light);

    font-size: 12px;
    font-weight: 600;
}

.request-quantity-control input {
    width: 120px;
    height: 38px;

    padding: 8px 10px;

    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);

    font-size: 14px;

    outline: none;
}

.request-quantity-control input:focus {
    border-color: var(--color-primary);
}

.request-action-buttons {
    display: flex;
    gap: 10px;
}


/* =========================================================
   21. TABS
   ========================================================= */

.tabs {
    display: flex;

    gap: 0;

    margin-bottom: 24px;

    border-bottom: 1px solid var(--color-border);
}

.tab-button {
    padding: 12px 20px;

    background-color: transparent;

    border: none;
    border-bottom: 3px solid transparent;

    color: var(--color-text-secondary);

    font-size: 15px;
    font-weight: 600;

    cursor: pointer;
}

.tab-button:hover {
    color: var(--color-text);
}

.tab-button.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-count {
    min-width: 22px;
    height: 22px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-left: 8px;
    padding: 0 6px;

    border-radius: 12px;

    background-color: var(--color-primary);
    color: var(--color-white);

    font-size: 12px;
    font-weight: 700;
}


/* =========================================================
   22. SUBMIT REQUEST PAGE
   ========================================================= */

.submit-request-section {
    margin-bottom: 32px;
}

.submit-request-card {
    width: 100%;
    max-width: 760px;

    padding: 28px;

    border: 1px solid var(--color-border);
    border-radius: var(--card-radius);

    background-color: var(--color-white);

    box-shadow: var(--shadow-card);
}

.submit-request-card-header {
    margin-bottom: 26px;
}

.submit-request-card-header h2 {
    margin-bottom: 6px;

    font-size: 20px;
    font-weight: 600;
}

.submit-request-card-header p {
    color: var(--color-text-light);
    font-size: 14px;
}


/* =========================================================
   23. SEARCH DROPDOWNS
   ========================================================= */

.search-dropdown {
    position: relative;
    width: 100%;
}

.search-dropdown-results {
    position: absolute;

    top: calc(100% + 4px);
    left: 0;

    width: 100%;
    max-height: 280px;

    overflow-y: auto;

    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);

    background-color: var(--color-white);

    box-shadow: var(--shadow-card);

    z-index: 100;
}

.search-dropdown-option {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 11px 13px;

    border-bottom: 1px solid var(--color-border-light);

    cursor: pointer;
}

.search-dropdown-option:last-child {
    border-bottom: none;
}

.search-dropdown-option:hover {
    background-color: var(--color-gray-light);
}

.dropdown-option-main,
.selected-option-main {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dropdown-option-main strong {
    font-size: 14px;
}

.dropdown-option-main span {
    color: var(--color-text-light);
    font-size: 13px;
}

.dropdown-option-secondary {
    color: var(--color-text-light);

    font-size: 12px;

    white-space: nowrap;
}

.search-dropdown-empty {
    padding: 14px;

    color: var(--color-text-light);

    font-size: 13px;

    text-align: center;
}


/* =========================================================
   24. SELECTED OPTIONS
   ========================================================= */

.selected-option {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-top: 8px;
    padding: 10px 12px;

    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius);

    background-color: #f7f9fb;
}

.selected-option-main strong {
    font-size: 13px;
}

.selected-option-main span {
    color: var(--color-text-light);
    font-size: 12px;
}

.selected-option-secondary {
    color: var(--color-text-light);

    font-size: 12px;

    white-space: nowrap;
}


/* =========================================================
   25. REQUEST SUMMARY
   ========================================================= */

.submit-request-summary {
    width: 100%;
}

.request-summary-table th {
    padding: 12px 14px;
}

.request-summary-table td {
    padding: 13px 14px;
}

.submit-request-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 28px;

    margin-top: 20px;
}

.request-total {
    display: flex;
    align-items: center;

    gap: 7px;

    color: var(--color-text-light);

    font-size: 13px;
}

.request-total strong {
    color: var(--color-text);
    font-size: 15px;
}


/* =========================================================
   26. FIFO COST BREAKDOWN
   ========================================================= */

.cost-breakdown {
    width: 100%;
}

.cost-breakdown-row {
    display: grid;

    grid-template-columns:
        1.5fr
        0.8fr
        1fr
        1fr
        1.2fr;

    align-items: center;

    gap: 20px;

    padding: 16px 0;

    border-bottom: 1px solid #e5e5e5;
}

.cost-breakdown-vendor {
    font-weight: 600;
}

.cost-breakdown-quantity,
.cost-breakdown-unit-cost,
.cost-breakdown-total,
.cost-breakdown-date {
    color: #555555;
}

.cost-breakdown-total {
    font-weight: 600;
}

.cost-breakdown-date {
    font-size: 14px;
}

.cost-breakdown-total-row {
    display: flex;
    justify-content: flex-end;

    gap: 30px;

    padding-top: 18px;

    font-size: 17px;
    font-weight: 700;
}

.request-cost-empty {
    margin: 0;

    color: #777777;

    font-style: italic;
}


/* =========================================================
   27. PHYSICAL REPORTS
   ========================================================= */

.report-number {
    color: var(--color-primary);
    font-weight: 600;
}

.reports-empty {
    padding: 40px 20px;

    color: var(--color-text-light);

    font-size: 14px;
    text-align: center;
}


/* Create Report */

.report-create-card {
    max-width: 700px;

    margin: 40px auto;
    padding: 40px;

    background: var(--color-white);

    border: 1px solid var(--color-border);
    border-radius: 10px;

    text-align: center;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.report-create-icon {
    margin-bottom: 15px;
    font-size: 42px;
}

.report-create-card h2 {
    margin: 0 0 12px;
    color: var(--color-text);
}

.report-create-card > p {
    max-width: 550px;

    margin: 8px auto;

    color: var(--color-text-light);

    line-height: 1.6;
}

.report-create-info {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 15px;

    margin: 30px 0;
    padding: 20px;

    background: #f8f9fa;

    border-radius: 8px;
}

.report-info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.report-info-label {
    color: var(--color-text-light);

    font-size: 12px;
    font-weight: 600;

    text-transform: uppercase;
}

.report-info-value {
    color: var(--color-text);

    font-size: 14px;
    font-weight: 500;
}

.report-create-actions {
    display: flex;
    justify-content: center;

    gap: 12px;

    margin-top: 25px;
}

.report-create-actions button {
    min-width: 180px;
}


/* =========================================================
   28. REPORT DETAILS
   ========================================================= */

.report-details-card {
    margin-bottom: 20px;
    padding: 25px;

    background: var(--color-white);

    border: 1px solid var(--color-border);
    border-radius: var(--card-radius);
}

.report-details-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 20px;
}

.report-detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.report-detail-label {
    color: var(--color-text-light);

    font-size: 12px;
    font-weight: 600;

    text-transform: uppercase;
}

.report-detail-value {
    color: var(--color-text);

    font-size: 14px;
    font-weight: 500;
}


/* Report Summary */

.report-summary-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 20px;

    margin-bottom: 20px;
}

.report-summary-card {
    display: flex;
    flex-direction: column;

    gap: 8px;

    padding: 20px;

    background: var(--color-white);

    border: 1px solid var(--color-border);
    border-radius: var(--card-radius);
}

.report-summary-label {
    color: var(--color-text-light);

    font-size: 13px;
    font-weight: 600;
}

.report-summary-value {
    color: var(--color-text);

    font-size: 28px;
    font-weight: 700;
}


/* Report Header / Export */

.report-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-actions {
    display: flex;
    justify-content: flex-end;

    margin-bottom: 10px;
}

.export-container {
    position: relative;

    display: inline-flex;
    align-items: center;
}

.export-menu {
    display: none;

    position: absolute;

    top: 100%;
    right: 0;

    min-width: 130px;

    overflow: hidden;

    background: var(--color-white);

    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);

    z-index: 1000;
}

.export-menu.show {
    display: block;
}

.export-menu button {
    display: block;

    width: 100%;

    padding: 10px 14px;

    border: none;

    background: var(--color-white);

    font-size: 14px;
    text-align: left;

    cursor: pointer;
}

.export-menu button:hover {
    background: #f3f3f3;
}


/* =========================================================
   29. USAGE REPORTS
   ========================================================= */

.usage-summary-container {
    display: flex;

    gap: 20px;

    margin-bottom: 20px;
}

.usage-summary-card {
    min-width: 220px;

    padding: 20px 24px;

    background-color: var(--color-white);

    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);

    box-shadow: var(--shadow-card);
}

.usage-summary-label {
    margin-bottom: 8px;

    color: var(--color-text-secondary);

    font-size: 14px;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.usage-summary-value {
    color: var(--color-text);

    font-size: 28px;
    font-weight: 700;
}


/* =========================================================
   30. MISCELLANEOUS
   ========================================================= */

/* Respect the HTML hidden attribute */

[hidden] {
    display: none !important;
}


/* =========================================================
   31. RESPONSIVE DESIGN
   ========================================================= */

/* -----------------------------------------
   Tablet / Medium Screens
   ----------------------------------------- */

@media (max-width: 1000px) {

    .page-content {
        padding: 24px;
    }

    .add-item-form-container form,
    .edit-item-container form {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .item-details-grid,
    .location-details-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .detail-field:nth-child(3n) {
        border-right: 1px solid var(--color-border-light);
    }

    .detail-field:nth-child(2n) {
        border-right: none;
    }

    .detail-field:nth-last-child(-n + 3) {
        border-bottom: 1px solid var(--color-border-light);
    }

    .detail-field:nth-last-child(-n + 2) {
        border-bottom: none;
    }
}


/* -----------------------------------------
   Smaller Screens
   ----------------------------------------- */

@media (max-width: 900px) {

    .request-details-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}


/* -----------------------------------------
   Mobile
   ----------------------------------------- */

@media (max-width: 760px) {

    :root {
        --sidebar-width: 0px;
    }

    /* Sidebar */

    .sidebar,
    #sidebar-container {
        position: relative;

        width: 100%;
        height: auto;

        min-height: 0;
    }

    .sidebar-navigation {
        padding: 10px;
    }

    .sidebar-footer {
        display: none;
    }


    /* Page */

    .page-content {
        width: 100%;
        margin-left: 0;

        padding: 20px;
    }

    .page-header-top {
        flex-direction: column;
        align-items: flex-start;
    }


    /* Filters */

    .inventory-filter-row,
    .location-filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .inventory-filter-field,
    .location-filter-field,
    .inventory-filter-field.search-field,
    .location-filter-field.search-field {
        width: 100%;
        min-width: 0;
    }

    .inventory-filter-field input[type="number"] {
        width: 100%;
    }

    .inventory-filter-actions,
    .location-filter-actions {
        width: 100%;
    }

    .clear-filter-button {
        width: 100%;
    }


    /* Details */

    .item-details-grid,
    .location-details-grid {
        grid-template-columns: 1fr;
    }

    .detail-field,
    .detail-field:nth-child(2n),
    .detail-field:nth-child(3n) {
        border-right: none;
        border-bottom: 1px solid var(--color-border-light);
    }

    .detail-field:last-child {
        border-bottom: none;
    }


    /* Forms */

    .add-item-form-container,
    .edit-item-container,
    .edit-location-container,
    .add-location-container {
        padding: 20px;
    }

    .add-item-form-container form,
    .edit-item-container form {
        grid-template-columns: 1fr;
    }


    /* Requests */

    .request-summary {
        grid-template-columns: 1fr;
    }

    .request-item-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .request-quantity-control input {
        width: 100%;
    }

    .request-action-buttons {
        width: 100%;

        flex-direction: column;
    }

    .request-action-buttons .button {
        width: 100%;
    }


    /* Submit Request */

    .submit-request-card {
        padding: 20px;
    }

    .submit-request-footer {
        flex-direction: column;
        align-items: stretch;

        gap: 12px;
    }

    .request-total {
        justify-content: space-between;
    }


    /* Report */

    .report-create-card {
        margin: 25px 15px;
        padding: 25px;
    }

    .report-create-info {
        grid-template-columns: 1fr;
    }

    .report-create-actions {
        flex-direction: column;
    }

    .report-create-actions button {
        width: 100%;
    }


    /* History */

    .history-header-actions {
        flex-wrap: wrap;
    }
}


/* -----------------------------------------
   Small Mobile
   ----------------------------------------- */

@media (max-width: 600px) {

    .login-navbar-container {
        padding: 0 18px;
    }

    .login-card {
        padding: 24px;
    }

    .login-title-row h1 {
        font-size: 24px;
    }

    .page-content {
        padding: 16px;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .form-buttons {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .inventory-header-buttons,
    .item-detail-buttons,
    .location-detail-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .inventory-header-buttons > *,
    .item-detail-buttons > *,
    .location-detail-buttons > * {
        width: 100%;
    }

    .request-details-grid {
        grid-template-columns: 1fr;
    }

    .cost-breakdown-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .cost-breakdown-total-row {
        justify-content: space-between;
        gap: 10px;
    }

    .usage-summary-container {
        flex-direction: column;
    }

    .usage-summary-card {
        width: 100%;
        min-width: 0;
    }
}


/* =====================================================
   SEARCHABLE DROPDOWN
   ===================================================== */

.searchable-dropdown {
    position: relative;
    width: 100%;
}


.searchable-dropdown input {
    width: 100%;
    box-sizing: border-box;
}


.searchable-dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;

    background: white;

    border: 1px solid #ccc;
    border-top: none;

    max-height: 220px;
    overflow-y: auto;

    z-index: 1000;

    display: none;

    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.1);
}


.searchable-dropdown-option {
    padding: 10px 12px;

    cursor: pointer;

    background: white;
}


.searchable-dropdown-option:hover {
    background: #f1f1f1;
}


.searchable-dropdown-add-new {
    font-weight: 600;
    color: #08a9e6;
}


.searchable-dropdown-add-new:hover {
    background: #f1f1f1;
}

/* =====================================================
   DEFECTIVE RETURN ROW
   ===================================================== */

.defective-return-row {
    background-color: #ffb3b9;
}

.defective-return-row:hover {
    background-color: #ffb3b9;
}


/* =====================================================
   REPORTS DROPDOWN
   ===================================================== */

.sidebar-dropdown {
    width: 100%;
}


/* Reports Button */

.sidebar-dropdown-toggle {
    width: 100%;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    background: transparent;
    color: inherit;
}


.sidebar-dropdown-toggle:hover {
    background-color: #222;
}


/* Dropdown Arrow */

.sidebar-dropdown-arrow {
    margin-left: auto;
    font-size: 14px;
    transition: transform 0.2s ease;
}


/* Rotate Arrow When Open */

.sidebar-dropdown.open .sidebar-dropdown-arrow {
    transform: rotate(180deg);
}


/* Dropdown Menu */

.sidebar-dropdown-menu {
    display: none;
    padding-left: 25px;
}


/* Show Dropdown */

.sidebar-dropdown.open .sidebar-dropdown-menu {
    display: block;
}


/* Report Sub-links */

.sidebar-sublink {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0 15px;
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    border-radius: 4px;
}


.sidebar-sublink:hover {
    background-color: #222;
    color: white;
}


/* Active Report Page */

.sidebar-sublink.active {
    background-color: #08a9e6;
    color: white;
}

.special-project-row {
    background-color: #bfdaf9;
}

.special-project-row:hover {
    background-color: #bfdaf9;
}

/* ==========================================
   RECONCILIATION ADJUSTMENT MODAL
   ========================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    box-sizing: border-box;
}

.modal-overlay[hidden] {
    display: none;
}

.modal-container {
    width: 100%;
    max-width: 750px;
    max-height: 90vh;
    overflow-y: auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #ddd;
}

.modal-header h2 {
    margin: 0 0 8px 0;
}

.modal-description {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.reconcile-adjustment-items {
    padding: 20px 24px;
}

.reconcile-adjustment-card {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 18px;
    margin-bottom: 16px;
}

.reconcile-adjustment-card:last-child {
    margin-bottom: 0;
}

.reconcile-adjustment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 16px;
}

.reconcile-adjustment-header h3 {
    margin: 0 0 4px 0;
}

.reconcile-adjustment-header p {
    margin: 0;
    color: #666;
}

.reconcile-adjustment-quantity {
    font-size: 18px;
    font-weight: 600;
}

.reconcile-adjustment-details {
    display: grid;
    grid-template-columns:
        repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 18px;
    padding: 12px;
    background-color: #f7f7f7;
    border-radius: 5px;
}

.reconcile-adjustment-details div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reconcile-adjustment-details span {
    font-size: 12px;
    color: #666;
}

.reconcile-adjustment-details strong {
    font-size: 15px;
}

.reconcile-adjustment-form {
    display: grid;
    grid-template-columns:
        2fr 1fr;
    gap: 16px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px 24px;
    border-top: 1px solid #ddd;
}

#reconcile-adjustment-modal {
    z-index: 1000;
    overflow: hidden;
}

#reconcile-adjustment-modal .modal-container {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#reconcile-adjustment-modal .reconcile-adjustment-items {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ==========================================
   EXTERNAL PURCHASE MODAL
   ========================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, 0.5);

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 1000;
}


.modal-container {
    width: 100%;
    max-width: 500px;

    background: #ffffff;

    border-radius: 8px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.2);

    overflow: hidden;
}


.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 20px 24px;

    border-bottom: 1px solid #e5e5e5;
}


.modal-header h2 {
    margin: 0;
}


.modal-close {
    border: none;
    background: none;

    font-size: 28px;

    cursor: pointer;

    line-height: 1;
}


.modal-body {
    padding: 24px;
}


.modal-description {
    margin-top: 0;
    margin-bottom: 20px;

    color: #666666;
}


.modal-body .form-group {
    margin-bottom: 18px;
}


.modal-body .form-group label {
    display: block;

    margin-bottom: 6px;

    font-weight: 600;
}


.modal-body .form-group input {
    width: 100%;
    box-sizing: border-box;

    padding: 10px 12px;

    border: 1px solid #cccccc;
    border-radius: 5px;

    font-size: 14px;
}


.external-purchase-total {
    display: flex;

    justify-content: space-between;
    align-items: center;

    margin-top: 20px;
    padding-top: 16px;

    border-top: 1px solid #e5e5e5;

    font-size: 16px;
}


.external-purchase-total strong {
    font-size: 18px;
}


.modal-footer {
    display: flex;

    justify-content: flex-end;

    gap: 10px;

    padding: 16px 24px;

    border-top: 1px solid #e5e5e5;
}

.wrapped-header {
    white-space: normal;
    line-height: 1.15;
    text-align: center;
}

/* ==========================================
   ADMIN / ACTION NOTES
   ========================================== */

.optional-label {
    font-weight: 400;
    color: #6b7280;
}

/* External Purchase modal notes */
.admin-notes-field {
    width: 100%;
    margin-top: 18px;
}

.admin-notes-field label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}


/* Shared textarea styling */
.admin-notes-field textarea {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    box-sizing: border-box;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    resize: vertical;

    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;

    color: #172033;
    background-color: #ffffff;
}


/* Shared focus styling */
.admin-notes-field textarea:focus {
    outline: none;
    border-color: #08a9e6;
    box-shadow:
        0 0 0 2px rgba(8, 169, 230, 0.12);
}


/* Character counter */
.admin-notes-counter {
    margin-top: 6px;
    text-align: right;
    font-size: 12px;
    color: #637083;
}


.request-note-container textarea {
    width: 100%;
    min-height: 60px;
    max-height: 80px;

    padding: 10px 12px;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    resize: vertical;
}

.request-note-container textarea:focus {
    outline: none;

    border-color: #08a9e6;

    box-shadow:
        0 0 0 2px rgba(8, 169, 230, 0.12);
}

.request-note-container {
    position: absolute;

    top: calc(100% + 8px);
    left: 0;

    width: 300px;

    z-index: 100;
}

.request-note-group {
    position: relative;
}

/* .admin-note-entry {
    padding: 10px 14px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-left: 4px solid #0078d4;
    border-radius: 6px;
} */

.admin-note-entry {
    padding: 10px 14px;
    background: #f8f9fa;
    border-left: 4px solid #0078d4;
    border-radius: 6px;
    min-height: 100px;
}

.admin-note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.admin-note-header span {
    color: #666;
    font-size: 0.85rem;
}


.admin-note-body {
    white-space: pre-wrap;
    line-height: 1.5;
    margin-top: 2px;
}

.admin-notes-history {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.checkbox-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.checkbox-row input[type="checkbox"] {
    width: auto !important;
    margin-top: 8px;
    margin-left: 0;
    align-self: flex-start;
}

.quantity-details-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.request-specifications-content {
    padding: 20px;
}

.request-specifications-text {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.6;
    color: #172033;
}

.inventory-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.inventory-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.inventory-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

.part-id-cell {
    color: var(--color-primary);
}

/* Greyed-out fields that cannot be edited */
input:disabled,
select:disabled,
textarea:disabled,
input:read-only {
    background-color: #e9ecef;
    color: #6c757d;
    border-color: #ced4da;
    cursor: not-allowed;
    opacity: 1;
}



/* =====================================================
   COMPACT ITEM DETAILS
   ===================================================== */

.item-details-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 24px;
}

/* Section headings */
.item-details-section {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

/* Smaller section heading */
.item-details-section-header {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e3e8ee;
}

.item-details-section-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #263445;
}

.item-details-section-header p {
    display: none;
}

/* Four detail blocks across */
.item-details-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

/* Grey detail blocks */
.detail-field {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    padding: 12px 14px;
    background: #f3f5f7;
    border: 1px solid #e7ebef;
    border-radius: 7px;
}

/* Labels */
.detail-label {
    font-size: 11px;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Values */
.detail-value {
    font-size: 14px;
    font-weight: 500;
    color: #263445;
    overflow-wrap: anywhere;
}

/* Responsive layout */
@media (max-width: 1200px) {
    .item-details-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .item-details-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 550px) {
    .item-details-grid {
        grid-template-columns: 1fr;
    }

    .detail-field {
        padding: 10px 12px;
    }
}



/* =====================================================
   EDIT ITEM TYPE CHECKBOXES
   ===================================================== */

.edit-item-type-group,
.edit-spec-required-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Keep checkbox cards in a row */
.edit-item-type-group .item-type-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

/* Specifications uses one card */
.edit-spec-required-group .item-type-options {
    display: grid;
    grid-template-columns: 1fr;
}

/* Parent dropdown */
#edit-parent-item-container select {
    width: 100%;
}

/* Disabled checkbox cards */
.item-type-option:has(input:disabled) {
    opacity: 0.65;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .edit-item-type-group .item-type-options {
        grid-template-columns: 1fr;
    }
}


#assorted-child-selection .form-group {
    margin-bottom: 20px;
}

#assorted-child-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: #ffffff;
    font-size: 14px;
}

#assorted-child-help {
    margin-top: 8px;
    color: #6b7280;
    font-size: 13px;
}



/* INVENTORY PAGINATION */

.inventory-pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 18px 4px;
}

.inventory-pagination-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 14px;
}

.inventory-pagination-info select {
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: white;
}

.inventory-pagination {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.pagination-button {
    min-width: 36px;
    padding: 8px 11px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    cursor: pointer;
    font-size: 14px;
}

.pagination-button:hover:not(:disabled) {
    background: #f0f7fb;
    border-color: #08a9e6;
}

.pagination-button.active {
    background: #08a9e6;
    color: white;
    border-color: #08a9e6;
}

.pagination-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pagination-ellipsis {
    padding: 0 4px;
    color: #777;
}

@media (max-width: 700px) {

    .inventory-pagination-container {
        flex-direction: column;
        align-items: flex-start;
    }

}
