[x-cloak] { display: none !important; }

/* ── Global checkbox & radio theme colour ────────────────────────────────── */
input[type="checkbox"],
input[type="radio"] {
    accent-color: #7f1d1d;
}

#icon-rail {
    position: fixed;
    top: 0;
    left: 0;
    width: 72px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #1c1917 0%, #3d0808 55%, #111110 100%);
    border-right: 1px solid rgba(255, 255, 255, .06);
    z-index: 40;
    transition: transform .22s cubic-bezier(.4, 0, .2, 1);
}

@media (max-width: 1023px) {
    #icon-rail {
        transform: translateX(-100%);
    }

    #icon-rail.mob-open {
        transform: translateX(0);
    }
}

.rail-brand {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    flex-shrink: 0;
}

.rail-logo {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #991b1b, #7f1d1d);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}

.rail-logo svg {
    width: 18px;
    height: 18px;
    color: #fca5a5;
}

.rail-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px 0;
    scrollbar-width: none;
}

.rail-nav::-webkit-scrollbar {
    display: none;
}

.rail-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 72px;
    min-height: 58px;
    padding: 8px 4px;
    cursor: pointer;
    position: relative;
    border: none;
    background: none;
    color: rgb(255 255 255 / 65%);
    text-decoration: none;
    transition: background .14s, color .14s;
    -webkit-user-select: none;
    user-select: none;
}

.rail-tile:hover {
    background: rgba(255, 255, 255, .07);
    color: rgba(255, 255, 255, .82);
}

.rail-tile.active {
    background: rgba(185, 28, 28, .32);
    color: #fca5a5;
}

.rail-tile.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 26px;
    background: #f87171;
    border-radius: 0 3px 3px 0;
}

.rail-tile svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.rail-tile-label {
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: .015em;
    text-align: center;
    line-height: 1.15;
    max-width: 62px;
}

.rail-badge {
    position: absolute;
    top: 7px;
    right: 7px;
    min-width: 15px;
    height: 15px;
    background: #ef4444;
    color: #fff;
    font-size: 8.5px;
    font-weight: 700;
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 1.5px solid #1c1917;
}

.rail-user {
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, .08);
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#submenu-panel {
    position: fixed;
    top: 0;
    left: 72px;
    width: 0;
    height: 100vh;
    background: #211e1c;
    border-right: 1px solid rgba(255, 255, 255, .08);
    z-index: 39;
    overflow: hidden;
    transition: width .22s cubic-bezier(.4, 0, .2, 1), visibility 0s .22s;
    display: flex;
    flex-direction: column;
    box-shadow: none;
    visibility: hidden;
}

#submenu-panel.open {
    width: 192px;
    visibility: visible;
    box-shadow: 6px 0 32px rgba(0, 0, 0, .45);
    transition: width .22s cubic-bezier(.4, 0, .2, 1), visibility 0s 0s;
}

.sub-head {
    height: 56px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    flex-shrink: 0;
}

.sub-head-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 38, 38, .28);
    border-radius: 7px;
    flex-shrink: 0;
}

.sub-head-icon svg {
    width: 15px;
    height: 15px;
    color: #fca5a5;
}

.sub-head-title {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .07em;
    white-space: nowrap;
}

.sub-body {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .08) transparent;
}

.sub-body::-webkit-scrollbar {
    width: 3px;
}

.sub-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .08);
    border-radius: 2px;
}

.sub-section-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .2);
    padding: 12px 14px 3px;
    white-space: nowrap;
}

.sub-link {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 33px;
    padding: 0 14px;
    font-size: 12.5px;
    font-weight: 500;
    color: rgb(255 255 255 / 65%);
    white-space: nowrap;
    text-decoration: none;
    transition: background .12s, color .12s;
}

.sub-link:hover {
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .88);
}

.sub-link.active {
    color: #fca5a5;
    background: rgba(185, 28, 28, .2);
}

.sub-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
    opacity: .55;
}

.sub-link.active .sub-dot {
    opacity: 1;
}

#sub-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 38;
}

#sub-overlay.on {
    display: block;
}

#mob-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(3px);
    z-index: 35;
}

#main-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin-left: 72px;
    padding-top: 56px;
    transition: margin-left .22s cubic-bezier(.4, 0, .2, 1);
}

#main-wrap.shifted {
    margin-left: 264px;
}

@media (max-width: 1023px) {

    #main-wrap,
    #main-wrap.shifted {
        margin-left: 0 !important;
    }
}

#topbar {
    position: fixed;
    top: 0;
    left: 72px;
    right: 0;
    z-index: 20;
    height: 56px;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e7e5e4;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
    transition: left .22s cubic-bezier(.4, 0, .2, 1);
}

#main-wrap.shifted #topbar {
    left: 264px;
}

@media (max-width: 1023px) {
    #topbar {
        left: 0 !important;
    }
}

.dataTables_wrapper {
    font-family: inherit !important;
    font-size: 12px !important;
    color: #57534e !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.dataTables_wrapper .top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 16px !important;
    border-bottom: 1px solid #f5f5f4 !important;
    gap: 12px !important;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    float: none !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
}

.dataTables_length label,
.dataTables_filter label {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    color: #78716c !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

.dataTables_length select {
    height: 26px !important;
    padding: 0 20px !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #1c1917 !important;
    background-color: #fafaf9 !important;
    border: 1px solid #e7e5e4 !important;
    border-radius: 6px !important;
    outline: none !important;
    cursor: pointer !important;
}

.dataTables_length select:focus {
    border-color: #7f1d1d !important;
    box-shadow: 0 0 0 2px rgba(127, 29, 29, 0.08) !important;
}

.dataTables_filter input {
    height: 26px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
    color: #1c1917 !important;
    background-color: #fafaf9 !important;
    border: 1px solid #e7e5e4 !important;
    border-radius: 6px !important;
    outline: none !important;
    width: 160px !important;
    margin-left: 4px !important;
    transition: border-color 0.15s, box-shadow 0.15s !important;
}

.dataTables_filter input:focus {
    border-color: #7f1d1d !important;
    box-shadow: 0 0 0 2px rgba(127, 29, 29, 0.08) !important;
    background: #fff !important;
}

.dataTables_wrapper .bottom {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 16px !important;
    border-top: 1px solid #f5f5f4 !important;
    gap: 12px !important;
}

.dataTables_wrapper .dataTables_info {
    float: none !important;
    font-size: 11px !important;
    color: #a8a29e !important;
    padding: 0 !important;
    white-space: nowrap !important;
    font-variant-numeric: tabular-nums !important;
}

.dataTables_wrapper .dataTables_paginate {
    float: none !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
}

.dataTables_paginate .paginate_button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 28px !important;
    height: 28px !important;
    padding: 0 6px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #57534e !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    cursor: pointer !important;
    transition: background 0.1s !important;
    box-shadow: none !important;
    margin: 0 !important;
    line-height: 1 !important;
}

.dataTables_paginate .paginate_button:hover {
    background: #f5f5f4 !important;
    color: #1c1917 !important;
    border-color: transparent !important;
}

.dataTables_paginate .paginate_button.current,
.dataTables_paginate .paginate_button.current:hover {
    background: #7f1d1d !important;
    color: #fff !important;
    border-color: transparent !important;
    cursor: default !important;
}

.dataTables_paginate .paginate_button.disabled,
.dataTables_paginate .paginate_button.disabled:hover {
    color: #d6d3d1 !important;
    background: transparent !important;
    cursor: default !important;
    pointer-events: none !important;
}

.dataTables_paginate .paginate_button.previous,
.dataTables_paginate .paginate_button.next {
    padding: 0 8px !important;
}

.dataTables_paginate .ellipsis {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 28px !important;
    height: 28px !important;
    font-size: 11px !important;
    color: #a8a29e !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    color: white !important;
    border: 1px solid rgba(0, 0, 0, 0.3);
    background-color: rgba(0, 0, 0, 0.05);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(230, 230, 230, 0.05)), color-stop(100%, rgba(0, 0, 0, 0.05)));
    background: -webkit-linear-gradient(top, rgba(230, 230, 230, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%);
    background: -moz-linear-gradient(top, rgba(230, 230, 230, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%);
    background: -ms-linear-gradient(top, rgba(230, 230, 230, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%);
    background: -o-linear-gradient(top, rgba(230, 230, 230, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%);
    background: linear-gradient(to bottom, rgba(230, 230, 230, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%);
}
table {
    width: 100% !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
}

table thead tr {
    background-color: #fafaf9 !important;
    border-bottom: 1px solid #e7e5e4 !important;
}

table thead th {
    padding: 9px 16px !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #78716c !important;
    text-align: left !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    border: none !important;
    background: transparent !important;
    white-space: nowrap !important;
}

table thead th.dt-center {
    text-align: center !important;
}

table thead th.sorting,
table thead th.sorting_asc,
table thead th.sorting_desc {
    cursor: pointer !important;
    padding-right: 22px !important;
    position: relative !important;
}

table thead th.sorting_asc::after {
    color: #7f1d1d !important;
}

table thead th.sorting_desc::after {
    color: #7f1d1d !important;
}

table tbody tr {
    border-bottom: 1px solid #f5f5f4 !important;
    transition: background 0.1s !important;
}

table tbody tr:last-child {
    border-bottom: none !important;
}

table tbody tr:hover {
    background-color: #fafaf9 !important;
}

table tbody td {
    padding: 5px 16px !important;
    font-size: 12px !important;
    color: #57534e !important;
    border: none !important;
    vertical-align: middle !important;
}

table tbody td.td-name {
    font-weight: 500 !important;
    color: #1c1917 !important;
}

table tbody td.td-num {
    color: #a8a29e !important;
    font-variant-numeric: tabular-nums !important;
}

table tbody td.td-date {
    color: #a8a29e !important;
    white-space: nowrap !important;
    font-variant-numeric: tabular-nums !important;
}

table tbody td.td-center {
    text-align: center !important;
}

table.dataTable.no-footer {
    border-bottom: 0;
}

.act-group {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.act-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
    text-decoration: none;
    flex-shrink: 0;
    color: inherit;
}

.act-btn svg {
    width: 13px;
    height: 13px;
    display: block;
}

.act-fields {
    color: #7f1d1d;
}

.act-fields:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.act-edit {
    color: #78716c;
}

.act-edit:hover {
    background: #f5f5f4;
    border-color: #d6d3d1;
}

.act-delete {
    color: #dc2626;
}

.act-delete:hover {
    background: #fef2f2;
    border-color: #fecaca;
}

.tb-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.12s;
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
}

.tb-btn svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.tb-btn-add {
    background: var(--brand-light);
    color: var(--brand);
    border-color: var(--brand);
}

.tb-btn-add:hover {
    background: var(--brand);
    color: #fff;
}

.tb-btn-fields {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.tb-btn-fields:hover {
    background: #dbeafe;
}

.tb-btn-edit {
    background: #f5f5f4;
    color: #57534e;
    border-color: #d6d3d1;
}

.tb-btn-edit:hover {
    background: #e7e5e4;
}

.tb-btn-delete {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.tb-btn-delete:hover {
    background: #fee2e2;
}

.tb-btn-clear {
    background: transparent;
    color: #a8a29e;
    border-color: transparent;
}

.tb-btn-clear:hover {
    color: #57534e;
}

.cb-input {
    width: 14px;
    height: 14px;
    accent-color: #7f1d1d;
    cursor: pointer;
    display: block;
    margin: 0 auto;
}

/* ── Form helpers ─────────────────────────────────────────────────────────── */
.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #57534e;
    margin-bottom: 6px;
}

/* Base input styling - applies to all text-based inputs */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="month"],
input[type="search"],
input[type="tel"],
input[type="time"],
input[type="week"],
textarea,
select,
.form-input {
    width: 100%;
    height: 24px;
    padding: 6px 12px;
    font-size: 10px;
    color: #1c1917;
    background: #fafaf9;
    border: 1px solid #d6d3d1;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
    font-family: inherit;
    line-height: 1.5;
}

/* Focus state for all inputs */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="month"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="time"]:focus,
input[type="week"]:focus,
textarea:focus,
select:focus,
.form-input:focus {
    border-color: #7f1d1d;
    box-shadow: 0 0 0 3px rgba(127, 29, 29, 0.08);
    background-color: #fff;
}

/* Placeholder styling */
input::placeholder,
textarea::placeholder {
    color: #a8a29e;
    opacity: 1;
}

/* Error state */
input.border-red-400,
select.border-red-400,
textarea.border-red-400,
.form-input.border-red-400 {
    border-color: #f87171;
    background: #fff5f5;
}

/* Select dropdown specific styling */
select,
select.form-input,
select[class*="border"],
select[class*="rounded"],
select[class*="px-"],
select[class*="py-"],
select[class*="text-"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2378716c'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 14px !important;
    padding-right: 36px !important;
    cursor: pointer !important;
    height: 25px !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    padding-left: 12px !important;
    background-color: #fafaf9 !important;
    border: 1px solid #d6d3d1 !important;
    border-radius: 8px !important;
    font-size: 10px !important;
    color: #1c1917 !important;
    line-height: 1 !important;
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s !important;
}

select:focus,
select.form-input:focus,
select[class*="border"]:focus,
select[class*="rounded"]:focus {
    background-color: #fff !important;
    border-color: #7f1d1d !important;
    box-shadow: 0 0 0 3px rgba(127, 29, 29, 0.08) !important;
    outline: none !important;
}

/* Textarea specific styling */
textarea,
textarea.form-input {
    height: auto;
    /* min-height: 80px; */
    resize: vertical;
    padding: 8px 12px;
}

/* Disabled state */
input:disabled,
select:disabled,
textarea:disabled,
.form-input:disabled {
    background-color: #f5f5f4;
    color: #a8a29e;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Read-only state */
input:read-only,
textarea:read-only {
    background-color: #f5f5f4;
    cursor: default;
}

/* Number input - hide spinner arrows */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Date/Time inputs */
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="month"],
input[type="week"] {
    cursor: pointer;
}

/* Form error message */
.form-error {
    margin-top: 4px;
    font-size: 11px;
    color: #dc2626;
}

/* Form group spacing */
.form-group {
    margin-bottom: 16px;
}

/* Required field indicator */
.form-label .text-red-500,
.form-label .text-red-600 {
    color: #dc2626;
    margin-left: 2px;
}

/* Input with icon/prefix */
.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-left: 36px;
}

.input-with-icon .icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #78716c;
    pointer-events: none;
}

/* Small input variant */
input.input-sm,
select.input-sm {
    height: 28px;
    padding: 4px 10px;
    font-size: 12px;
}

/* Large input variant */
input.input-lg,
select.input-lg {
    height: 42px;
    padding: 10px 14px;
    font-size: 14px;
}
#filter-status{
        padding: 0px 25px;
}
.select2-container--default .select2-selection--single .select2-selection__clear {
    cursor: pointer;
    float: right;
    font-weight: bold;
    height: 26px;
    margin-right: 20px;
    padding-right: 0px;
    margin-left: 10px;
}

div.dataTables_processing>div:last-child>div {
    position: absolute;
    top: 0;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #7f1d1d;
    background: #7f1d1d;
    animation-timing-function: cubic-bezier(0, 1, 1, 0);
}
/* Hover option */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #7f1d1d !important;
    color: #fff !important;
}

/* Selected option */
.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: #7f1d1d !important;
    color: #fff !important;
}

/* Selected item (closed select) */
.select2-container--default .select2-selection--single {
    border-color: #7f1d1d;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #7f1d1d !important;
    box-shadow: 0 0 0 2px rgba(127, 29, 29, 0.15);
}

/* Multi-select selected tags */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #7f1d1d !important;
    border-color: #7f1d1d !important;
    color: #fff !important;
}
.select2-container--default .select2-selection--single .select2-selection__clear {
    cursor: pointer;
    float: right;
    font-weight: bold;
    height: 26px;
    margin-right: 0px !important;
    padding-right: 0px;
}

/* ── Select2 Custom Global Overrides ─────────────────────────────────────── */
.select2-container--default .select2-selection--single {
    height: 24px !important;
    border: 1px solid #d6d3d1 !important;
    border-radius: 0.5rem !important;
    background: #fafaf9 !important;
    display: flex !important;
    align-items: center !important;
    min-height: 24px !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    font-size: 10px !important;
    color: #292524 !important;
    padding-left: 12px !important;
    line-height: 34px !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 34px !important;
    right: 8px !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-width: 4px 4px 0 4px !important;
    margin-top: -2px !important;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #a8a29e !important;
}
.select2-container--default .select2-results__option {
    font-size: .75rem !important;
    padding: .4rem .75rem !important;
}
.select2-search--dropdown .select2-search__field {
    font-size: .75rem !important;
    border: 1px solid #d6d3d1 !important;
    border-radius: .375rem !important;
    padding: .3rem .5rem !important;
}
.select2-dropdown {
    border: 1px solid #d6d3d1 !important;
    border-radius: .5rem !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08) !important;
}
.select2-container--open .select2-selection--single {
    border-color: #7f1d1d !important;
    box-shadow: 0 0 0 3px rgba(127, 29, 29, .08) !important;
}

/* ── Dashboard & Shared Layout Components ───────────────────────────────── */
.entry-grid { display: grid; grid-template-columns: 1fr; height: calc(100vh - 120px); }
.kpi-card { text-align: center; padding: .6rem; border-radius: .5rem; border: 1px solid #e7e5e4; }
.top-bar { display: flex; align-items: center; gap: .35rem; margin-bottom: .35rem; }
.top-bar-fill { flex: 1; height: 5px; background: #e7e5e4; border-radius: 3px; overflow: hidden; }
.top-bar-fill span { display: block; height: 100%; border-radius: 3px; }
.dash-table { width: 100%; font-size: .7rem; border-collapse: collapse; }
.dash-table th { background: #fafaf9; color: #78716c; font-size: .6rem; text-transform: uppercase; letter-spacing: .03em; padding: .4rem .6rem; text-align: center !important; border-bottom: 2px solid #e7e5e4; }
.dash-table td { padding: .4rem .6rem; border-bottom: 1px solid #f5f5f4; }
.dash-table tr:hover td { background: #fafaf9; }
.dash-table tr.dash-row-mismatch td { background: #fef9c3 !important; }
.dash-table tr.dash-row-mismatch:hover td { background: #fef08a !important; }
.dash-tally-reason { display: block; font-size: .58rem; color: #b45309; margin-top: .15rem; line-height: 1.35; font-weight: 500; }
.dash-tally-badge { display: inline-flex; align-items: center; gap: .2rem; font-size: .58rem; color: #b45309; font-weight: 700; margin-left: .35rem; }
.dash-tally-badge-ok { display: inline-flex; align-items: center; gap: .2rem; font-size: .58rem; color: #15803d; font-weight: 600; padding: .1rem .3rem; background: #dcfce7; border-radius: .25rem; }
.dash-tally-badge-error { display: inline-flex; align-items: center; gap: .2rem; font-size: .58rem; color: #dc2626; font-weight: 600; padding: .1rem .3rem; background: #fee2e2; border-radius: .25rem; }
.dash-table tr.cw-row:hover td { background: #fef2f2 !important; }
.dash-table tr.cw-row-selected td { background: #7f1d1d !important; color: #fff !important; }
.dash-table tr.cw-row-selected:hover td { background: #991b1b !important; color: #fff !important; }
.skel { background: linear-gradient(90deg,#f5f5f4 25%,#e7e5e4 50%,#f5f5f4 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: .25rem; height: 1rem; }
@keyframes shimmer { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }
@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }

/* ── Wizard & Dropzone Styles ───────────────────────────────────────────── */
.wizard-steps { display: flex; align-items: center }
.ws-item { display: flex; align-items: center; gap: .4rem; flex-shrink: 0 }
.ws-dot { width: 1.6rem; height: 1.6rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .65rem; font-weight: 700; transition: all .25s; flex-shrink: 0 }
.ws-dot.done { background: #16a34a; color: #fff }
.ws-dot.active { background: #7f1d1d; color: #fff; box-shadow: 0 0 0 3px rgba(127, 29, 29, .18) }
.ws-dot.pending { background: #e7e5e4; color: #a8a29e }
.ws-line { flex: 1; height: 2px; background: #e7e5e4; margin: 0 .6rem }
.ws-line.done { background: #16a34a }
.ws-label { font-size: .68rem; font-weight: 500; white-space: nowrap }
.ws-label.active { color: #7f1d1d }
.ws-label.pending { color: #a8a29e }
.ws-label.done { color: #16a34a }
.wizard-panel { display: none }
.wizard-panel.active { display: block }
.drop-zone { border: 2px dashed #d6d3d1; border-radius: .75rem; padding: 1.2rem; cursor: pointer; transition: all .2s; text-align: center }
.drop-zone:hover, .drop-zone.dragover { border-color: #b91c1c; background: rgba(185, 28, 28, .04) }
.drop-zone.has-file { border-color: #16a34a; background: rgba(22, 163, 74, .04) }

/* ── Collapsible Filter Section ─────────────────────────────────────────── */
.filter-section { transition: max-height .3s ease, opacity .2s ease; overflow: hidden; }
.filter-section.collapsed { max-height: 0; opacity: 0; }
.filter-section.expanded { max-height: 500px; opacity: 1; }

/* ── Workflow UI & Data Table Controls ───────────────────────────────────── */
.upload-progress { height: 4px; background: #e7e5e4; border-radius: 2px; overflow: hidden; }
.upload-progress-bar { height: 100%; background: #7f1d1d; transition: width .3s; width: 0%; }
.badge { display: inline-flex; align-items: center; padding: .18rem .55rem; border-radius: 9999px; font-size: .62rem; font-weight: 600; white-space: nowrap; }
.badge-yes, .badge-approved { background: #dcfce7; color: #15803d; }
.badge-no { background: #f5f5f4; color: #78716c; }
.badge-rejected { background: #fee2e2; color: #b91c1c; }
.badge-pending { background: #fef9c3; color: #a16207; }

#scansTable, #pendingNamingTable, #pendingVerifyTable, #billTable, #punchTable, #paTable, #reportTable, #pendingTable, #notificationTable { border-collapse: collapse; width: 100% !important; table-layout: fixed; }
.badge-sent { background: #dcfce7; color: #15803d; display: inline-flex; align-items: center; padding: .15rem .5rem; border-radius: 9999px; font-size: .6rem; font-weight: 600; }
.badge-no_token { background: #fef9c3; color: #a16207; display: inline-flex; align-items: center; padding: .15rem .5rem; border-radius: 9999px; font-size: .6rem; font-weight: 600; }
.badge-assigned { background: #dbeafe; color: #1e40af; display: inline-flex; align-items: center; padding: .15rem .5rem; border-radius: 9999px; font-size: .6rem; font-weight: 600; }
.td-clicked { color: #16a34a; font-weight: 600; }
.td-viewed { color: #2563eb; font-weight: 600; }
.td-null { color: #d1d5db; }
.action-grid { grid-template-columns: 1fr !important; }
@media(min-width:768px) { .action-grid { grid-template-columns: 1fr 1fr !important; } }
#scansTable thead th, #pendingNamingTable thead th, #pendingVerifyTable thead th { background: #fafaf9; color: #78716c; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .55rem .75rem; border-bottom: 2px solid #e7e5e4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: sticky; top: 0; z-index: 1; }
#scansTable thead th.sorting:after, #scansTable thead th.sorting_asc:after, #scansTable thead th.sorting_desc:after, #pendingNamingTable thead th.sorting:after, #pendingNamingTable thead th.sorting_asc:after, #pendingNamingTable thead th.sorting_desc:after, #pendingVerifyTable thead th.sorting:after, #pendingVerifyTable thead th.sorting_asc:after, #pendingVerifyTable thead th.sorting_desc:after { font-size: .55rem; opacity: .6; margin-left: .2rem; }
#scansTable tbody td, #pendingNamingTable tbody td, #pendingVerifyTable tbody td { padding: .55rem .75rem; border-bottom: 1px solid #f0eeec; color: #292524; vertical-align: middle; font-size: .73rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#scansTable tbody tr:hover td, #pendingNamingTable tbody tr:hover td, #pendingVerifyTable tbody tr:hover td { background: #fafaf9; }
#scansTable tbody tr:last-child td, #pendingNamingTable tbody tr:last-child td, #pendingVerifyTable tbody tr:last-child td { border-bottom: none; }
#scansTable th:nth-child(1), #scansTable td:nth-child(1) { width: 42px; text-align: center; }
#scansTable th:nth-child(4), #scansTable td:nth-child(4) { width: 90px; }
#scansTable th:nth-child(5), #scansTable td:nth-child(5) { width: 88px; text-align: center; }
#scansTable th:nth-child(6), #scansTable td:nth-child(6) { width: 95px; text-align: center; }
#scansTable th:nth-child(9), #scansTable td:nth-child(9) { width: 88px; text-align: center; }

.dt-ctrl-bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem 1.25rem; flex-wrap: wrap; }
.dt-length-sel { height: 1.9rem; padding: 0 1.4rem 0 .5rem; font-size: .72rem; border: 1px solid #d6d3d1; border-radius: .375rem; background: #fafaf9; color: #292524; appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23a8a29e' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .35rem center; }
.dt-search-wrap { position: relative; }
.dt-search-wrap svg { position: absolute; left: .5rem; top: 50%; transform: translateY(-50%); color: #a8a29e; pointer-events: none; width: 13px; height: 13px; }
.dt-search-input { height: 1.9rem; padding: 0 .65rem 0 1.85rem; font-size: .72rem; border: 1px solid #d6d3d1; border-radius: .375rem; background: #fafaf9; outline: none; width: 170px; color: #292524; }
.dt-search-input:focus { border-color: #7f1d1d; box-shadow: 0 0 0 3px rgba(127, 29, 29, .08); }

.dt-actions { display: flex; align-items: center; gap: .2rem; justify-content: center; }
.dt-btn { width: 1.65rem; height: 1.65rem; display: inline-flex; align-items: center; justify-content: center; border-radius: .325rem; transition: all .15s; border: none; background: transparent; cursor: pointer; color: #a8a29e; flex-shrink: 0; }
.dt-btn.blue:hover { background: #eff6ff; color: #7f1d1d; }
.dt-btn.green:hover { background: #f0fdf4; color: #16a34a; }
.dt-btn.red:hover { background: #fef2f2; color: #dc2626; }

.export-menu { position: relative; display: inline-block; }
.export-drop { display: none; position: absolute; right: 0; top: calc(100% + .3rem); z-index: 60; background: #fff; border: 1px solid #e7e5e4; border-radius: .5rem; box-shadow: 0 6px 20px rgba(0, 0, 0, .1); min-width: 150px; overflow: hidden; }
.export-menu.open .export-drop { display: block; }
.export-drop a, .export-drop button { display: flex; align-items: center; gap: .5rem; padding: .5rem .875rem; font-size: .73rem; color: #292524; text-decoration: none; background: none; border: none; width: 100%; cursor: pointer; text-align: left; }
.export-drop a:hover, .export-drop button:hover { background: #f5f5f4; }

#logCanvas { position: fixed; top: 0; right: -420px; width: 420px; height: 100vh; background: #fff; z-index: 200; box-shadow: -4px 0 24px rgba(0, 0, 0, .12); transition: right .3s cubic-bezier(.4, 0, .2, 1); display: flex; flex-direction: column; }
#logCanvas.open { right: 0; }
#logCanvasBackdrop { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 199; }
#logCanvasBackdrop.open { display: block; }
.lc-header { display: flex; align-items: center; justify-content: space-between; padding: .875rem 1.25rem; border-bottom: 1px solid #f0eeec; flex-shrink: 0; }
.lc-body { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; }
.log-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid #f5f5f4; }
.log-row:last-child { border-bottom: none; }
.sf-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .6rem 1rem; border-bottom: 1px solid #f5f5f4; }
.sf-row:last-child { border-bottom: none; }

.step2-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; align-items: start; }
@media(min-width:1024px) { .step2-grid { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); } }
.file-viewer { width: 100%; height: 100%; background: #1c1917; border-radius: .75rem; overflow: hidden; position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.file-viewer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem .875rem; background: rgba(0, 0, 0, .35); flex-shrink: 0; }
.file-viewer-body { flex: 1; position: relative; width: 100%; height: 100%; min-height: 0; }
.file-viewer > iframe, .file-viewer > img, .file-viewer-body iframe, .file-viewer-body img { position: absolute; inset: 0; width: 100%; height: 100%; border: none; object-fit: contain; background: #1c1917; }
.viewer-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; color: #57534e; }
.col-scroll { max-height: calc(100vh - 180px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #d6d3d1 transparent; }
.col-scroll::-webkit-scrollbar { width: 4px; }
.col-scroll::-webkit-scrollbar-track { background: transparent; }
.col-scroll::-webkit-scrollbar-thumb { background: #d6d3d1; border-radius: 2px; }

.modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 300; backdrop-filter: blur(2px); }
.modal-backdrop.open { display: block; }
.modal-container { display: none; position: fixed; inset: 0; z-index: 301; padding: 1.5rem; overflow-y: auto; }
.modal-container.open { display: flex; align-items: center; justify-content: center; }
.modal-dialog { background: #fff; border-radius: 1rem; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); width: 100%; max-width: 1200px; max-height: 90vh; display: flex; flex-direction: column; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid #e7e5e4; flex-shrink: 0; }
.modal-body { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.modal-viewer-section { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #1c1917; }
.modal-viewer-toolbar { display: flex; align-items: center; justify-content: space-between; padding: .5rem 1rem; background: rgba(0, 0, 0, .4); flex-shrink: 0; }
.modal-viewer-body { flex: 1; position: relative; min-height: 400px; }
.modal-viewer-body iframe, .modal-viewer-body img { position: absolute; inset: 0; width: 100%; height: 100%; border: none; object-fit: contain; background: #1c1917; }
.modal-tabs-bar { display: flex; align-items: center; gap: 0; padding: 0 1rem; background: #fafaf9; border-bottom: 1px solid #e7e5e4; flex-shrink: 0; flex-wrap: wrap; position: relative; }
.modal-tab { padding: .55rem .85rem; font-size: .68rem; font-weight: 600; color: #78716c; background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; transition: all .15s; white-space: nowrap; }
.modal-tab:hover { color: #292524; }
.modal-tab.active { color: #7f1d1d; border-bottom-color: #7f1d1d; }
.modal-tab-files { display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 10; background: #fff; border-bottom: 1px solid #e7e5e4; box-shadow: 0 4px 12px rgba(0, 0, 0, .08); padding: .4rem .75rem; max-height: 150px; overflow-y: auto; }
.modal-tab-files.open { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.modal-tab-files .file-group-label { font-size: .6rem; font-weight: 700; color: #78716c; text-transform: uppercase; letter-spacing: .03em; padding: .25rem 0; margin-top: .35rem; }
.modal-tab-files .file-group-label:first-child { margin-top: 0; }
.modal-tab-files .file-link { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .55rem; border-radius: .35rem; cursor: pointer; font-size: .67rem; color: #292524; transition: background .12s; border: 1px solid #e7e5e4; background: #fafaf9; white-space: nowrap; }
.modal-tab-files .file-link:hover { background: #f5f5f4; border-color: #d6d3d1; }
.modal-tab-files .file-link.active { background: #fef2f2; color: #7f1d1d; font-weight: 600; border-color: #7f1d1d; }
.modal-tab-files .file-ext { width: 1.1rem; height: 1.1rem; display: flex; align-items: center; justify-content: center; background: #f5f5f4; border-radius: .2rem; font-size: 6px; font-weight: 700; color: #78716c; text-transform: uppercase; flex-shrink: 0; border: 1px solid #e7e5e4; }

.tabs { display: flex; gap: .25rem; border-bottom: 2px solid #e7e5e4; padding: 0 1.25rem; background: #fff; }
.tab-btn { padding: .625rem 1rem; font-size: .72rem; font-weight: 600; color: #78716c; background: transparent; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; cursor: pointer; transition: all .15s; position: relative; }
.tab-btn:hover { color: #292524; background: #fafaf9; }
.tab-btn.active { color: #7f1d1d; border-bottom-color: #7f1d1d; }
.tab-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 1.25rem; height: 1.25rem; padding: 0 .35rem; border-radius: 9999px; background: #e7e5e4; color: #57534e; font-size: .6rem; font-weight: 700; margin-left: .35rem; }
.tab-btn.active .tab-badge { background: #7f1d1d; color: #fff; }

.filter-bar { display: flex; align-items: center; gap: .75rem; padding: .875rem 1.25rem; background: #fafaf9; border-bottom: 1px solid #e7e5e4; flex-wrap: wrap; }
.filter-input { height: 2rem; padding: 0 .65rem; font-size: .72rem; border: 1px solid #d6d3d1; border-radius: .375rem; background: #fff; outline: none; color: #292524; }
.filter-input:focus { border-color: #7f1d1d; box-shadow: 0 0 0 3px rgba(127, 29, 29, .08); }
.filter-btn { height: 2rem; display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 600; border-radius: .375rem; cursor: pointer; transition: all .15s; }
.filter-btn-primary { background: #7f1d1d; color: #fff; border: none; padding: 0 .875rem; }
.filter-btn-primary:hover { background: #6b1a1a; }
.filter-btn-secondary { background: #fff; color: #57534e; border: 1px solid #d6d3d1; padding: 0 .75rem; }
.filter-btn-secondary:hover { background: #f5f5f4; }

/* ── Summary & Detail Table Styles ────────────────────────────────────────── */
#summaryTable, #detailTable { border-collapse: collapse; width: 100% !important; table-layout: auto; }
#summaryTable thead th, #detailTable thead th { background: #fafaf9; color: #78716c; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .5rem .75rem; border-bottom: 2px solid #e7e5e4; white-space: nowrap; text-align: center; }
#summaryTable thead th:nth-child(1), #summaryTable thead th:nth-child(2) { text-align: left; }
#summaryTable thead th.sorting:after, #summaryTable thead th.sorting_asc:after, #summaryTable thead th.sorting_desc:after { font-size: .5rem; opacity: .5; margin-left: .2rem; }
#summaryTable tbody td, #detailTable tbody td { padding: .5rem .75rem; border-bottom: 1px solid #f0eeec; color: #292524; vertical-align: middle; font-size: .72rem; text-align: center; }
#summaryTable tbody td:nth-child(1) { text-align: center; color: #a8a29e; width: 40px; }
#summaryTable tbody td:nth-child(2) { text-align: left; font-weight: 500; }
#summaryTable tbody tr:hover td, #detailTable tbody tr:hover td { background: #fafaf9; }
#summaryTable tbody tr:last-child td { border-bottom: none; }
#summaryTable thead tr.group-header th { background: #f0eeec; font-size: .6rem; color: #57534e; padding: .3rem .75rem; border-bottom: 1px solid #e7e5e4; }
.num-cell { cursor: pointer; font-weight: 600; border-radius: .3rem; padding: .2rem .5rem; transition: all .15s; display: inline-block; min-width: 2rem; }
.num-cell:hover { color: #7f1d1d; text-decoration: underline; }
.num-cell.zero { color: #d6d3d1; cursor: default; font-weight: 400; }
.num-cell.zero:hover { background: transparent; color: #d6d3d1; }
tr.grand-total td { background: #fef9c3 !important; font-weight: 700; font-size: .73rem; border-top: 2px solid #e7e5e4; }
#summaryTable tfoot tr { background: #fafaf9 !important; border-top: 2px solid #e7e5e4; }
#summaryTable tfoot td { padding: 0.75rem 1rem; vertical-align: middle; font-weight: 600; border-bottom: none; }
#detailTable_wrapper > .dataTables_length, #detailTable_wrapper > .dataTables_filter, #detailTable_wrapper > .dataTables_info, #detailTable_wrapper > .dataTables_paginate { display: none !important; }
.filter-btn-secondary:hover { background: #f5f5f4; }

/* ── Verification Table & Modal Viewer ───────────────────────────────────── */
#verificationTable { border-collapse: collapse; width: 100% !important; table-layout: auto; }
#verificationTable thead th { background: #fafaf9; color: #78716c; font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .45rem .6rem; border-bottom: 2px solid #e7e5e4; white-space: nowrap; text-align: left; }
#verificationTable tbody td { padding: .45rem .6rem; border-bottom: 1px solid #f0eeec; color: #292524; vertical-align: middle; font-size: .7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#verificationTable tbody tr { cursor: pointer; transition: background .1s; }
#verificationTable tbody tr:hover td { background: #fef2f2; }
#verificationTable_wrapper > .dataTables_length, #verificationTable_wrapper > .dataTables_filter, #verificationTable_wrapper > .dataTables_info, #verificationTable_wrapper > .dataTables_paginate { display: none !important; }

.detail-grid { display: grid; grid-template-columns: 1fr; gap: 0; height: 100%; }
@media(min-width:768px) { .detail-grid { grid-template-columns: 1.5fr 1fr; } }
.vm-tabs-bar { display: flex; align-items: center; gap: 0; padding: 0 .75rem; background: #fafaf9; border-bottom: 1px solid #e7e5e4; flex-shrink: 0; flex-wrap: wrap; position: relative; }
.vm-tab { padding: .4rem .65rem; font-size: .63rem; font-weight: 600; color: #78716c; background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.vm-tab:hover { color: #292524; }
.vm-tab.active { color: #7f1d1d; border-bottom-color: #7f1d1d; }
.vm-tab-files { display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 10; background: #fff; border-bottom: 1px solid #e7e5e4; box-shadow: 0 4px 12px rgba(0, 0, 0, .08); padding: .3rem .5rem; max-height: 100px; overflow-y: auto; }
.vm-tab-files.open { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem; }
.vm-tab-files .file-link { display: inline-flex; align-items: center; gap: .25rem; padding: .15rem .4rem; border-radius: .25rem; cursor: pointer; font-size: .6rem; color: #292524; border: 1px solid #e7e5e4; background: #fafaf9; white-space: nowrap; }
.vm-tab-files .file-link:hover { background: #f5f5f4; }
.vm-tab-files .file-link.active { background: #fef2f2; color: #7f1d1d; border-color: #7f1d1d; }
.vm-tab-files .file-ext { width: .9rem; height: .9rem; display: flex; align-items: center; justify-content: center; background: #f5f5f4; border-radius: .15rem; font-size: 5px; font-weight: 700; color: #78716c; text-transform: uppercase; flex-shrink: 0; border: 1px solid #e7e5e4; }
.vm-viewer { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #1c1917; }
.vm-viewer-bar { padding: .35rem .65rem; background: rgba(0, 0, 0, .4); flex-shrink: 0; }
.vm-viewer-body { flex: 1; position: relative; min-height: 300px; }
.vm-viewer-body iframe, .vm-viewer-body img { position: absolute; inset: 0; width: 100%; height: 100%; border: none; object-fit: contain; background: #1c1917; }
.info-row { display: flex; align-items: center; gap: .4rem; padding: .3rem 0; border-bottom: 1px solid #f5f5f4; }
.info-row:last-child { border-bottom: none; }
.info-label { font-size: .58rem; font-weight: 700; color: #78716c; text-transform: uppercase; letter-spacing: .03em; width: 90px; flex-shrink: 0; }
.info-value { font-size: .7rem; color: #292524; word-break: break-word; flex: 1; }

/* ── Classification Specific Styles ──────────────────────────────────────── */
.cls-table { border-collapse: collapse; width: 100% !important; }
.cls-table thead th { background: #fafaf9; color: #78716c; font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .5rem .7rem; border-bottom: 2px solid #e7e5e4; white-space: nowrap; text-align: left; }
.cls-table tbody td { padding: .5rem .7rem; border-bottom: 1px solid #f0eeec; color: #292524; vertical-align: middle; font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cls-table tbody tr { cursor: pointer; transition: background .1s; }
.cls-table tbody tr:hover td { background: #fef2f2; }
#queueTable tbody tr { cursor: default; }

.badge-processing { background: #dbeafe; color: #1d4ed8; display: inline-flex; align-items: center; padding: .15rem .55rem; border-radius: 9999px; font-size: .6rem; font-weight: 600; }
.badge-failed { background: #fee2e2; color: #b91c1c; display: inline-flex; align-items: center; padding: .15rem .55rem; border-radius: 9999px; font-size: .6rem; font-weight: 600; }

.act-group { display: flex; align-items: center; gap: .2rem; }
.act-btn { width: 1.6rem; height: 1.6rem; display: inline-flex; align-items: center; justify-content: center; border-radius: .3rem; border: none; background: transparent; cursor: pointer; color: #a8a29e; transition: all .12s; flex-shrink: 0; }
.act-btn.act-edit:hover { background: #eff6ff; color: #7f1d1d; }

#bulkBar { display: none; align-items: center; gap: .75rem; padding: .5rem 1rem; background: #fef3c7; border-bottom: 1px solid #fde68a; }

#clsTable_wrapper > .dataTables_length, #clsTable_wrapper > .dataTables_filter, #clsTable_wrapper > .dataTables_info, #clsTable_wrapper > .dataTables_paginate,
#queueTable_wrapper > .dataTables_length, #queueTable_wrapper > .dataTables_filter, #queueTable_wrapper > .dataTables_info, #queueTable_wrapper > .dataTables_paginate { display: none !important; }

.pill-toggle { display: flex; background: #f5f5f4; border-radius: 9999px; padding: 3px; gap: 2px; border: 1px solid #e7e5e4; }
.pill-btn { padding: 4px 16px; border: none; background: transparent; font-size: 0.75rem; font-weight: 500; color: #78716c; border-radius: 9999px; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.pill-btn:hover:not(.active) { color: #44403c; }
.pill-btn.active { background: #7f1d1d; color: #ffffff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.05); border: 1px solid #e7e5e4; margin: -1px; }

/* ── Main & Sub Tabs ─────────────────────────────────────────────────────── */
.main-tabs { display: flex; gap: .2rem; border-bottom: 2px solid #e7e5e4; padding: 0 1rem; background: #fff; flex-shrink: 0; }
.main-tab-btn { padding: .55rem 1rem; font-size: .72rem; font-weight: 600; color: #78716c; background: transparent; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; cursor: pointer; transition: all .15s; display: flex; align-items: center; gap: .4rem; }
.main-tab-btn:hover { color: #292524; background: #fafaf9; }
.main-tab-btn.active { color: #7f1d1d; border-bottom-color: #7f1d1d; }

.sub-tabs { display: flex; gap: .25rem; border-bottom: 1px solid #e7e5e4; padding: 0 1rem; background: #fafaf9; }
.sub-tab-btn { padding: .45rem .75rem; font-size: .68rem; font-weight: 600; color: #78716c; background: transparent; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; transition: all .15s; display: flex; align-items: center; gap: .35rem; }
.sub-tab-btn:hover { color: #292524; background: #f0efee; }
.sub-tab-btn.active { color: #7f1d1d; border-bottom-color: #7f1d1d; }

/* ── Invoice Entry Form & Viewer ─────────────────────────────────────────── */
.entry-grid { display: grid; grid-template-columns: 1fr; height: calc(100vh - 120px); }
@media(min-width:1024px) { .entry-grid { grid-template-columns: 4fr 8fr; } }
.file-panel { display: flex; flex-direction: column; border-right: 1px solid #e7e5e4; overflow: hidden; background: #292524; height: 100%; min-height: 0; border-radius: .75rem 0 0 .75rem; }
.file-tabs { display: flex; gap: 0; padding: 0 .5rem; background: #fafaf9; border-bottom: 1px solid #e7e5e4; flex-wrap: wrap; }
.file-tab { padding: .35rem .6rem; font-size: .6rem; font-weight: 600; color: #78716c; border: none; background: none; border-bottom: 2px solid transparent; cursor: pointer; }
.file-tab.active { color: #7f1d1d; border-bottom-color: #7f1d1d; }

.form-panel { display: flex; flex-direction: column; overflow-y: auto; padding: .75rem 1rem; background: #fff; }
.f-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin-bottom: .6rem; }
.f-row.cols-1 { grid-template-columns: 1fr; }
.f-row.cols-2 { grid-template-columns: repeat(2, 1fr); }
.f-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.f-group { min-width: 0; }
.f-group label { font-size: .6rem; font-weight: 600; color: #78716c; text-transform: uppercase; display: block; margin-bottom: 2px; }
.f-group .hint { font-size: .55rem; color: #dc2626; display: block; margin-bottom: 1px; }
.f-input { height: 28px; width: 100%; padding: 0 .5rem; font-size: .72rem; border: 1px solid #d6d3d1; border-radius: .375rem; background: #fff; outline: none; color: #292524; }
.f-input:focus { border-color: #7f1d1d; box-shadow: 0 0 0 2px rgba(127, 29, 29, .06); }
textarea.f-input { height: 60px; resize: vertical; padding: .4rem .5rem; }

.items-table { width: 100%; border-collapse: collapse; font-size: .7rem; }
.items-table th { background: #7f1d1d; color: #fff; font-size: .58rem; font-weight: 600; text-transform: uppercase; padding: .4rem .4rem; text-align: center; white-space: nowrap; position: sticky; top: 0; z-index: 2; }
.items-table td { padding: 5px 5px !important; border-bottom: 1px solid #e7e5e4; text-align: center; vertical-align: middle; }
.items-table tbody tr:nth-child(even) { background: #fafaf9; }
.items-table tbody tr:hover { background: #fef2f2; }
.items-table input:focus, .items-table select:focus { border-color: #7f1d1d; outline: none; box-shadow: 0 0 0 2px rgba(127, 29, 29, .08); }
.items-table input[readonly] { background: #f5f5f4; color: #57534e; }

.btn-add-row, .btn-add-emp, .btn-add-meals-emp, .btn-add-labour { background: #7f1d1d; color: #fff; border: none; border-radius: .25rem; width: 20px; height: 20px; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.btn-del-row, .btn-del-emp, .btn-del-meals-emp, .btn-del-labour { background: #292524; color: #fff; border: none; border-radius: .25rem; width: 20px; height: 20px; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }

.form-footer { display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem; border-top: 1px solid #e7e5e4; background: #fafaf9; flex-shrink: 0; }
.form-footer .btn-cancel { margin-right: auto; }
.btn-draft { height: 34px; padding: 0 1.25rem; font-size: .72rem; font-weight: 600; border: none; border-radius: .5rem; background: #7f1d1d; color: #fff; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.btn-draft:hover { background: #6b1a1a; }
.btn-submit { height: 34px; padding: 0 1.25rem; font-size: .72rem; font-weight: 600; border: none; border-radius: .5rem; background: #16a34a; color: #fff; cursor: pointer; }
.btn-submit:hover { background: #15803d; }
.btn-approve { height: 34px; padding: 0 1.25rem; font-size: .72rem; font-weight: 600; border: none; border-radius: .5rem; background: #7f1d1d; color: #fff; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; }
.btn-approve:hover { background: #6b1a1a; }
.btn-reject { height: 34px; padding: 0 1.25rem; font-size: .72rem; font-weight: 600; border: none; border-radius: .5rem; background: #dc2626; color: #fff; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; }
.btn-reject:hover { background: #b91c1c; }
.btn-back { height: 34px; padding: 0 1rem; font-size: .72rem; font-weight: 600; border: 1px solid #d6d3d1; border-radius: .5rem; background: #fff; color: #57534e; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: .3rem; }
#alertBox { display: none; padding: .5rem .75rem; border-radius: .5rem; font-size: .7rem; margin-bottom: .5rem; }
#alertBox.error { display: block; background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
#alertBox.success { display: block; background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.btn-draft:disabled, .btn-submit:disabled { cursor: not-allowed; pointer-events: none; }

/* ── Sortable Drag & Drop ─────────────────────────────────────────────────── */
.sortable-ghost { opacity: 0.4; background: #fef3c7; border-radius: 0.5rem; border: 2px dashed #f59e0b; }
.sortable-chosen { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); border-radius: 0.5rem; }
.sortable-drag { opacity: 0.95; transform: rotate(1deg); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18); }
#sortable-fields .field-item { transition: transform 0.15s ease; }

/* ── Pagination Wrapper (Red Theme) ─────────────────────────────────────── */
.pagination-wrapper nav { display: flex; justify-content: center; align-items: center; }
.pagination-wrapper .flex { width: 100%; }
.pagination-wrapper nav span, .pagination-wrapper nav a { display: inline-flex; align-items: center; justify-content: center; min-width: 2.5rem; height: 2.5rem; padding: 0.5rem; margin: 0 0.125rem; font-size: 0.875rem; font-weight: 500; border-radius: 0.5rem; transition: all 0.2s; }
.pagination-wrapper nav a { background-color: #f5f5f4; color: #57534e; border: 1px solid #e7e5e4; }
.pagination-wrapper nav a:hover { background-color: #b91c1c; color: white; border-color: #b91c1c; }
.pagination-wrapper nav span[aria-current="page"] { background-color: #b91c1c; color: white; border: 1px solid #b91c1c; font-weight: 600; }
.pagination-wrapper nav span[aria-disabled="true"] { background-color: transparent; color: #a8a29e; border: none; cursor: default; }
.pagination-wrapper nav a[rel="prev"], .pagination-wrapper nav a[rel="next"] { background-color: #b91c1c; color: white; border-color: #b91c1c; }
.pagination-wrapper nav a[rel="prev"]:hover, .pagination-wrapper nav a[rel="next"]:hover { background-color: #991b1b; border-color: #991b1b; }
.pagination-wrapper nav span[aria-disabled="true"][rel="prev"], .pagination-wrapper nav span[aria-disabled="true"][rel="next"] { background-color: #e7e5e4; color: #a8a29e; border-color: #e7e5e4; cursor: not-allowed; }

/* ── Custom Checkbox (Red Theme) ─────────────────────────────────────────── */
.custom-checkbox { appearance: none; -webkit-appearance: none; width: 1.125rem; height: 1.125rem; border: 2px solid #d6d3d1; border-radius: 0.25rem; background-color: white; cursor: pointer; position: relative; transition: all 0.2s ease; }
.custom-checkbox:hover { border-color: #b91c1c; }
.custom-checkbox:checked { background-color: #b91c1c; border-color: #b91c1c; }
.custom-checkbox:checked::after { content: ''; position: absolute; left: 0.25rem; top: 0.0625rem; width: 0.375rem; height: 0.625rem; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.custom-checkbox:focus { outline: none; box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.1); }
.custom-checkbox:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Form Resets ──────────────────────────────────────────────────────────── */
:where([type='checkbox']), :where([type='radio']) { -webkit-appearance: none; -moz-appearance: none; appearance: none; padding: 0; print-color-adjust: exact; display: inline-block; vertical-align: middle; background-origin: border-box; user-select: none; flex-shrink: 0; height: 1rem; width: 1rem; color: #7f1d1d; background-color: #fff; border-color: #d6d3d1; border-width: 1px; border-style: solid; }
:where([type='checkbox']) { border-radius: 0.25rem; }
:where([type='radio']) { border-radius: 100%; }
:where([type='checkbox']:checked), :where([type='radio']:checked) { border-color: transparent; background-color: #450a0a; background-size: 100% 100%; background-position: center; background-repeat: no-repeat; }
:where([type='checkbox']:checked) { background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e"); }
:where([type='radio']:checked) { background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e"); }
:where([type='checkbox']:focus), :where([type='radio']:focus) { outline: 2px solid transparent; outline-offset: 2px; box-shadow: 0 0 0 3px rgba(127, 29, 29, 0.08); }

/* ── Core Tokens & Extra Layout ───────────────────────────────────────────── */
:root { --brand: #7f1d1d; --brand-dark: #450a0a; --brand-light: #fef2f2; --accent: #b91c1c; --sidebar-w: 260px; --topbar-h: 64px; }
.nav-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 1rem; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500; color: #a8a29e; transition: all 150ms; cursor: pointer; user-select: none; }
.nav-item:hover { background: rgba(255,255,255,.05); color: #f5f5f4; }
.nav-item.active { background: rgba(127,29,29,.4); color: #fca5a5; box-shadow: inset 3px 0 0 #ef4444; }
.nav-item .icon { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.stat-card { position: relative; overflow: hidden; background-color: #fff; border: 1px solid #e7e5e4; border-radius: 1rem; padding: 1.25rem; transition: box-shadow 200ms; }
.stat-card:hover { box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1); }
.stat-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,.6) 0%, transparent 60%); pointer-events: none; }
.sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 20; }
@media (min-width: 1024px) { .sidebar-overlay { display: none; } }
[type='checkbox']:checked, [type='radio']:checked { border-color: transparent; background-color: rgb(153 27 27) !important; background-size: 100% 100%; background-position: center; background-repeat: no-repeat; }
.sidebar-scroll::-webkit-scrollbar { width: 4px; }
.sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 4px; }
.nav-item.\!px-0 { padding-left: 0 !important; padding-right: 0 !important; justify-content: center; gap: 0; }

/* ── SSH Terminal ─────────────────────────────────────────────────────────── */
#terminal-wrap { height: calc(100vh - 108px); background: #0d0d0d; border-radius: .75rem; overflow: hidden; border: 1px solid #27272a; display: flex; flex-direction: column; }
#term-topbar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .45rem 1rem; background: #18181b; border-bottom: 1px solid #27272a; flex-shrink: 0; }
#term-topbar .dots { display: flex; gap: .35rem; }
#term-topbar .dot { width: .7rem; height: .7rem; border-radius: 50%; }
#term-topbar .dot-r { background: #ef4444; }
#term-topbar .dot-y { background: #f59e0b; }
#term-topbar .dot-g { background: #22c55e; }
#term-topbar .title { font-size: .72rem; font-family: monospace; color: #71717a; letter-spacing: .04em; }
#term-topbar .tb-btn { height: 1.6rem; padding: 0 .65rem; font-size: .68rem; font-weight: 600; border-radius: .35rem; border: 1px solid #3f3f46; background: transparent; color: #a1a1aa; cursor: pointer; transition: all .15s; font-family: inherit; }
#term-topbar .tb-btn:hover { background: #27272a; color: #e4e4e7; }
#xterm-container { flex: 1; min-height: 0; padding: .5rem .25rem .25rem .5rem; background: #0d0d0d; }
#xterm-container .xterm { height: 100%; }
#xterm-container .xterm-viewport { overflow-y: auto !important; }
#term-statusbar { display: flex; align-items: center; gap: 1rem; padding: .3rem 1rem; background: #18181b; border-top: 1px solid #27272a; flex-shrink: 0; font-family: monospace; font-size: .65rem; color: #52525b; }
#term-statusbar .sb-item { display: flex; align-items: center; gap: .35rem; }
#term-statusbar .sb-dot { width: .45rem; height: .45rem; border-radius: 50%; background: #22c55e; }
#term-statusbar #sb-cwd { color: #a1a1aa; max-width: 500px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Developer Documentation & Markdown Styles ──────────────────────────── */
code, pre {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.sidebar-scroll::-webkit-scrollbar {
    width: 4px;
}
.sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-scroll::-webkit-scrollbar-thumb {
    background: #d6d3d1;
    border-radius: 9999px;
}
.sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background: #a8a29e;
}

.markdown-body h1 {
    font-size: 1.875rem;
    font-weight: 800;
    color: #1c1917;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e7e5e4;
    padding-bottom: 0.5rem;
    letter-spacing: -0.025em;
}
.markdown-body h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1c1917;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #f5f5f4;
    padding-bottom: 0.35rem;
}
.markdown-body h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #292524;
    margin-top: 1.35rem;
    margin-bottom: 0.5rem;
}
.markdown-body p {
    color: #44403c;
    line-height: 1.65;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}
.markdown-body ul {
    list-style-type: disc;
    padding-left: 1.25rem;
    margin-bottom: 1rem;
    color: #44403c;
    font-size: 0.875rem;
}
.markdown-body ol {
    list-style-type: decimal;
    padding-left: 1.25rem;
    margin-bottom: 1rem;
    color: #44403c;
    font-size: 0.875rem;
}
.markdown-body li {
    margin-bottom: 0.35rem;
    line-height: 1.5;
}
.markdown-body strong {
    color: #1c1917;
    font-weight: 600;
}
.markdown-body a {
    color: #991b1b;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
}
.markdown-body a:hover {
    color: #7f1d1d;
}
.markdown-body blockquote {
    border-left: 4px solid #991b1b;
    background-color: #fafaf9;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
    font-size: 0.85rem;
    color: #57534e;
}
.markdown-body code:not(pre code) {
    background-color: #f5f5f4;
    color: #991b1b;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    border: 1px solid #e7e5e4;
    font-size: 0.8em;
}
.markdown-body pre {
    background-color: #1c1917;
    color: #f5f5f4;
    padding: 1rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.25rem 0;
    font-size: 0.8rem;
    line-height: 1.6;
    border: 1px solid #292524;
}
.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    font-size: 0.8rem;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid #e7e5e4;
}
.markdown-body th {
    background-color: #f5f5f4;
    color: #1c1917;
    font-weight: 600;
    text-align: left;
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid #e7e5e4;
}
.markdown-body td {
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid #f5f5f4;
    color: #44403c;
}
.markdown-body tr:nth-child(even) td {
    background-color: #fafaf9;
}
.markdown-body hr {
    border: 0;
    height: 1px;
    background: #e7e5e4;
    margin: 2rem 0;
}