body {
    font-family: "Google Sans Flex", sans-serif;
}

.minimal-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.minimal-scrollbar::-webkit-scrollbar-track {
    border-radius: 10px;
    background: rgba(0,0,0,0.1);
}

.minimal-scrollbar::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: rgba(0,0,0,0.2);
}

.minimal-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.4);
}

.minimal-scrollbar::-webkit-scrollbar-thumb:active {
    background: rgba(0,0,0,.9);
}


.product-type-frame {
}

.product-type-bay {
    --bs-table-bg: #EEE9E9;
}

.product-type-multiseg {
    --bs-table-bg: #BCD2EE;
}

.product-type-welded-cill {
    --bs-table-bg: #FAFAD2;
}

.max-vh-100 {
    max-height: 100vh;
}

.max-w-1920 {
    max-width: 1920px;
}

.max-w-200 {
    max-width: 200px;
}

.slider {
    transition: left ease-out 0.3s;
}

.supplier-cell {
    width: 250px;
    max-width: 250px;
}

.prefix-pound:not(:empty)::before {
    content: "\00A3";
}

.suffix-percent:not(:empty)::after {
    content: "%";
}

.na-if-empty:empty::before {
    content: "N/A";
}

.switch-container .total-number:not(:empty)::before {
    content: "(";
}

.switch-container .total-number:not(:empty)::after {
    content: ")";
}

.bracket-enclosed::after {
    content: ")";
}

.bracket-enclosed::before {
    content: "(";
}

[switch-value], [on-click-toggle-jobs] {
    cursor: pointer;
}

.dropdown-item {
    cursor: pointer;
}

.background-white {
    background-color: white;
}

.card {
    border: 0;
}

.nav-link {
    color: black;
}

    .nav-link.active[data-bs-toggle='tab'], .nav-link:hover[data-bs-toggle='tab'] {
        color: rgb(50, 148, 210) !important;
    }

.max-size-128 {
    max-height: 128px;
    max-width: 128px;
}

#PartImage:hover ~ #PartImageOverlay, #PartImageOverlay:hover {
    display: flex !important;
    cursor: pointer;
}

.bg-orange {
    background-color: orange;
}

.bg-pink {
    background-color: pink;
}

.bg-yellow {
    background-color: yellow;
}

.bg-lightgreen {
    background-color: lightgreen;
}

.bg-lightgrey {
    background-color: lightgrey;
}

.flex-1-1-0 {
    flex: 1 1 0;
}

.flex-2-1-0 {
    flex: 2 1 0;
}

.card-warning {
    background-color: rgba(var(--bs-warning-rgb), var(--bs-bg-opacity)) !important;
}

.card-danger {
    background-color: rgba(var(--bs-danger-rgb), var(--bs-bg-opacity)) !important;
    color: white !important;
}

    .card-danger .card-footer-text {
        color: white !important;
    }

.card-footer-text {
    color: var(--bs-secondary-color);
}

.form-input-addon {
    position: relative;
}

    .form-input-addon > label {
        position: absolute;
        top: 0;
        right: 0;
        z-index: 2;
        max-width: 100%;
        height: 100%;
        padding: 0.375rem .75rem;
        overflow: hidden;
        color: rgba(var(--bs-body-color-rgb), .65);
        text-align: start;
        text-overflow: ellipsis;
        white-space: nowrap;
        pointer-events: none;
        border: var(--bs-border-width) solid transparent;
        transform-origin: 0 0;
        transition: opacity .1s ease-in-out, transform .1s ease-in-out;
    }

    /* hide arrows on number input */
    .form-input-addon > input::-webkit-outer-spin-button,
    .form-input-addon > input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    .form-input-addon > input[type=number] {
        -moz-appearance: textfield;
    }

.color-blue {
    color: rgb(50, 148, 210);
}

.bg-blue {
    background-color: rgb(50, 148, 210);
}

.text-primary {
    --bs-primary-rgb: 50, 148, 210;
}

    .text-primary:hover {
        --bs-primary-rgb: 37, 119, 171;
    }

.btn-primary {
    --bs-btn-bg: rgb(50, 148, 210);
    --bs-btn-border-color: rgb(50, 148, 210);
    --bs-btn-hover-bg: rgb(37, 119, 171);
    --bs-btn-hover-border-color: rgb(37, 119, 171);
    --bs-btn-active-bg: rgb(33, 104, 149);
    --bs-btn-active-border-color: rgb(33, 104, 149);
    --bs-btn-disabled-bg: rgb(91, 169, 219);
    --bs-btn-disabled-border-color: rgb(91, 169, 219);
}

.not-raised {
    background-color: #B0B0B0 !important;
}

.awaiting-approval {
    background-color: #F0AD4E !important;
}

.approved {
    background-color: #0275D8 !important;
}

.raised {
    background-color: #5BC0DE !important;
}

.partially-received {
    background-color: #8E44AD !important;
}

.complete {
    background-color: #5CB85C !important;
}

.archived {
    background-color: #6C757D !important;
}

    .archived, .archived a,
    .raised, .raised a,
    .partially-received, .partially-received a,
    .approved, .approved a {
        color: white;
    }

.check::after {
    content: '\2713';
}

.cross::after {
    content: '\2716';
    font-family: Arial, Helvetica, sans-serif;
}

.cursor-help {
    cursor: help;
}

.rotate-45 {
    transform: rotate(45deg);
}

.fs-7 {
    font-size: 0.85rem;
}

.border-dashed {
    background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='0.375rem' ry='0.375rem' stroke='rgba(0, 0, 0, 0.5)' stroke-width='6' stroke-dasharray='6%2c 19' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e");
}

.dragging {
    z-index: 2;
    background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='0.375rem' ry='0.375rem' stroke='rgba(0, 0, 0, 0.5)' stroke-width='6' stroke-dasharray='6%2c 19' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e");
    background-color: white;
}

    .dragging .bi {
        display: block;
        pointer-events: none;
    }

.d-none-not-important {
    display: none;
}

.flex-basis-100 {
    flex-basis: 100%;
}

.flex-basis-50 {
    flex-basis: 50%;
}

.d-flex-equal-items {
    display: flex;
}

    .d-flex-equal-items > * {
        flex: 1 1 0;
    }

.end-025-rem {
    right: 0.25rem;
}

.cursor-pointer {
    cursor: pointer;
}

.size-3 {
    width: 3rem;
    height: 3rem;
}

.size-2 {
    width: 2rem;
    height: 2rem;
}

.size-1 {
    width: 1rem;
    height: 1rem;
}

.bi {
    line-height: var(--icon-size);
    font-size: var(--icon-size);
}

.icon-size-1_75 {
    --icon-size: 1.75rem;
}

.icon-size-1_3 {
    --icon-size: 1.3rem;
}

.width-3 {
    width: 3rem;
}

.max-width-48 {
    max-width: 48px;
}

.height-1_5 {
    height: 1.5rem;
}

.height-1_4 {
    height: 1.4rem;
}

.border-0_2rem {
    border-width: 0.2rem !important;
}

.grid-2-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.grid-item-span-2-cols {
    grid-column: span 2;
}

.width-1percent {
    width: 1%;
}

.fw-500 {
    font-weight: 500;
}

@media print {
    .no-print {
        display: none !important;
    }
}

.max-width-500 {
    max-width: 500px;
}

.d-flex-equal-items {
    display: flex;
}

    .d-flex-equal-items > * {
        flex: 1 1 0;
    }

:root {
    --bg: #f5f6f8;
    --white: #ffffff;
    --border: #e4e7ec;
    --border-strong: #cdd2da;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --accent: #2563eb;
    --accent-light: #eff6ff;
    --accent-mid: #dbeafe;
    --green: #16a34a;
    --green-light: #f0fdf4;
    --green-mid: #dcfce7;
    --red: #dc2626;
    --red-light: #fef2f2;
    --amber: #d97706;
    --amber-light: #fffbeb;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 14px;
}

.select-bootstrap-icon {
    font-family: 'bootstrap-icons', 'Plus Jakarta Sans', sans-serif;
}

/* HEADER */

.badge-admin {
    background: var(--accent-light);
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    border: 1px solid var(--accent-mid);
}

/* PAGE HEADER */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.4px;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 3px;
    font-weight: 400;
}

/* STATS */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s;
}

    .stat-card:hover {
        box-shadow: var(--shadow-md);
    }

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 26px;
    font-weight: 700;
    margin-top: 4px;
    letter-spacing: -0.5px;
}

.stat-change {
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}

    .stat-change.up {
        color: var(--green);
    }

    .stat-change.neutral {
        color: var(--text-muted);
    }

/* CARD */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* TOOLBAR */
.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 340px;
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 13px;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 8px 12px 8px 32px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    background: var(--white);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

    .search-input:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
    }

.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    background: var(--white);
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s;
}

    .filter-select:focus {
        border-color: var(--accent);
    }

/* TABLE */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

thead tr {
    background: var(--bg);
}

th {
    padding: 11px 16px;
    text-align: left;
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

.page-group-header {
    transition: background 0.1s;
    cursor: pointer;
}

    .page-group-header:hover td, .page-group-header:hover th {
        background: #fafbfc !important;
    }

.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    color: white;
    text-transform: uppercase;
}

.user-name {
    font-weight: 600;
    font-size: 13.5px;
}

.user-email {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 1px;
}

.actions-cell {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: flex-end;
}

/* BADGES */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 9px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-admin {
    background: #eef2ff;
    color: #4f46e5;
    border: 1px solid #e0e7ff;
}

.badge-editor {
    background: var(--green-light);
    color: var(--green);
    border: 1px solid var(--green-mid);
}

.badge-viewer {
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid var(--accent-mid);
}

.badge-inactive {
    background: var(--bg);
    color: var(--text-muted);
    border: 1px solid var(--border-strong);
}

.badge-active {
    background: var(--green-light);
    color: var(--green);
    border: 1px solid var(--green-mid);
}

.badge-pending {
    background: var(--amber-light);
    color: var(--amber);
    border: 1px solid #fde68a;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.dot-green {
    background: var(--green);
}

.dot-amber {
    background: var(--amber);
}

.dot-gray {
    background: var(--text-muted);
}

/* FORM */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* PERMISSION SECTIONS */
.perm-section {
    margin-bottom: 10px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
}

.perm-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg);
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

    .perm-section-header:hover {
        background: #eef0f3;
    }

.perm-section-title {
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.perm-chevron {
    color: var(--text-muted);
    font-size: 11px;
    transition: transform 0.2s;
    margin-left: 6px;
}

.perm-section.open .perm-chevron {
    transform: rotate(180deg);
}

.perm-section-body {
    display: none;
    border-top: 1px solid var(--border);
}

.perm-section.open .perm-section-body {
    display: block;
}

.perm-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
}

    .perm-row:last-child {
        border-bottom: none;
    }

.perm-label-wrap {
    flex: 1;
    min-width: 0;
}

.perm-label-text {
    font-size: 13px;
    color: var(--text-secondary);
}

.perm-label-sub {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 1px;
}

.perm-controls {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-shrink: 0;
}

.perm-btn {
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border-strong);
    background: var(--white);
    color: var(--text-muted);
    transition: all 0.12s;
    font-family: inherit;
}

    .perm-btn:hover {
        background: var(--bg);
    }

    .perm-btn.none-on {
        background: var(--red-light);
        color: var(--red);
        border-color: #fecaca;
    }

    .perm-btn.view-on {
        background: var(--accent-light);
        color: var(--accent);
        border-color: var(--accent-mid);
    }

    .perm-btn.edit-on {
        background: var(--green-light);
        color: var(--green);
        border-color: var(--green-mid);
    }

.page-badge {
    font-size: 10px;
    padding: 2px 7px;
    margin-left: 8px;
}

/* MATRIX */
.matrix-table th:first-child, .matrix-table td:first-child {
    position: sticky;
    left: 0;
    background: var(--white);
    z-index: 1;
}

.matrix-table thead tr th:first-child {
    background: var(--bg);
}

.page-group-header td {
    background: var(--bg);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 8px 16px;
    line-height: initial;
}

.page-group-header:hover > td {
    background: #fafbfc;
}

.perm-icon {
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.1s;
    display: inline-block;
}

    .perm-icon:hover {
        transform: scale(1.3);
    }

/* ROLES */
.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.role-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s, border-color 0.15s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

    .role-card:hover {
        box-shadow: var(--shadow-md);
        border-color: var(--border-strong);
    }

    .role-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
    }

    .role-card.admin::before {
        background: #6366f1;
    }

    .role-card.editor::before {
        background: var(--green);
    }

    .role-card.viewer::before {
        background: var(--accent);
    }

    .role-card.custom::before {
        background: var(--amber);
    }

.role-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
}

.role-card.admin .role-icon {
    background: #eef2ff;
}

.role-card.editor .role-icon {
    background: var(--green-light);
}

.role-card.viewer .role-icon {
    background: var(--accent-light);
}

.role-card.custom .role-icon {
    background: var(--amber-light);
}

.role-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.role-desc {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.role-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.role-users {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ACTIVITY */
.activity-item {
    display: flex;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
}

    .activity-item:hover {
        background: #fafbfc;
    }

    .activity-item:last-child {
        border-bottom: none;
    }

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.activity-text {
    font-size: 13.5px;
    line-height: 1.5;
}

    .activity-text strong {
        font-weight: 600;
    }

.activity-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* TOAST */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--text-primary);
    color: white;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: toastIn 0.25s ease;
    max-width: 300px;
}

    .toast.success {
        background: #166534;
    }

    .toast.error {
        background: #991b1b;
    }

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* EMPTY */
.empty-state {
    padding: 48px 24px;
    text-align: center;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.empty-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.empty-sub {
    font-size: 13px;
    margin-top: 4px;
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.modal-subtitle {
    font-size: 12.5px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.translate-select-spinner {
    transform: translate(-150%, -50%) !important;
}

[isArchived="1"] {
    --bs-btn-color: #fff;
    --bs-btn-bg: #198754;
    --bs-btn-border-color: #198754;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #157347;
    --bs-btn-hover-border-color: #146c43;
    --bs-btn-focus-shadow-rgb: 60, 153, 110;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #146c43;
    --bs-btn-active-border-color: #13653f;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #198754;
    --bs-btn-disabled-border-color: #198754;
}

.bg-image {
    background-image: url(../img/background-blur.png);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    padding: 20px;
    filter: blur(100);
}

.bg-image-overlay {
    height: calc(100vh - 40px);
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
}

.login {
    position: absolute;
    left: 50%;
    top: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    min-width: 300px;
    min-height: 300px;
    color: white;
}

.login .btn-primary {
    background-color: #01342b;
    border: 1px solid #01221c;
}

.login .btn-primary:hover {
    background-color: #01221c;
}

.login #forgotPasswordButton:hover {
    color: darkgrey !important;
    transition-duration: 0.3s;
}

.login .validation-summary-errors ul {
    list-style-type: none;
    padding-left: 0;
}