/* Shared UI foundation, based on the supplied Master Data portal reference. */
@font-face {
    font-family: Inter;
    src: url('../fonts/inter/inter-400.ttf') format('truetype');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: Inter;
    src: url('../fonts/inter/inter-500.ttf') format('truetype');
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: Inter;
    src: url('../fonts/inter/inter-600.ttf') format('truetype');
    font-style: normal;
    font-weight: 600;
    font-display: swap;
}
@font-face {
    font-family: Inter;
    src: url('../fonts/inter/inter-700.ttf') format('truetype');
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}
:root {
    --ui-font: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --ui-ink: #1e293b;
    --ui-muted: #64748b;
    --ui-line: #e2e8f0;
    --ui-canvas: #f8fafc;
    --ui-accent: #f97316;
    --retail-orange: #f97316;
    --retail-orange-dark: #c2410c;
    --retail-line: #e2e8f0;
    --retail-tint: #fff7ed;
    --shop-muted: #64748b;
    --bs-body-font-family: var(--ui-font);
    --bs-body-color: var(--ui-ink);
}
body,
.desktop-workspace,
.auth-page {
    font-family: var(--ui-font);
    font-size: 13px;
    line-height: 1.55;
    color: var(--ui-ink);
    background: var(--ui-canvas);
    -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
button,
input,
select,
textarea,
.btn,
.badge,
.form-label,
.form-control,
.form-select,
.table,
.navbar,
.sidebar,
.footer {
    font-family: var(--ui-font);
}
h1,
h2,
h3,
h4,
h5,
h6 {
    color: #0f172a;
    font-weight: 600;
    line-height: 1.3;
}
.desktop-workspace .page-title,
.page-title {
    font: 700 24px/1.3 var(--ui-font);
    letter-spacing: -0.6px;
    color: #0f172a;
}
.muted,
.text-secondary,
.text-muted {
    color: var(--ui-muted) !important;
}
small,
.small {
    font-size: 12px;
    line-height: 1.5;
}
.desktop-workspace .content-wrapper {
    padding: 28px 32px;
    background: var(--ui-canvas);
    width: 100%;
    max-width: 1504px;
    margin-inline: auto;
}
.desktop-workspace .card {
    border: 1px solid var(--ui-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px #0f172a04;
    min-width: 0;
}
.desktop-workspace .card-header,
.card-header {
    padding: 16px 20px;
    background: #fbfcfe;
    border-bottom: 1px solid #edf2f7;
    font: 600 14px/1.5 var(--ui-font);
    color: #0f172a;
    border-radius: 14px 14px 0 0;
}
.card-body {
    padding: 20px;
}
.card-footer {
    padding: 12px 20px;
    border-color: var(--ui-line);
    background: #fff;
    border-radius: 0 0 14px 14px;
}
.desktop-workspace .btn,
.btn {
    font: 600 13px/1.4 var(--ui-font);
    border-radius: 9px;
    padding: 9px 15px;
    min-height: 38px;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}
.desktop-workspace .btn-sm,
.btn-sm {
    font-size: 12px;
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 7px;
}
.btn-primary,
.btn-gradient-primary {
    background: #f97316 !important;
    border-color: #f97316 !important;
    color: #fff !important;
}
.btn-primary:hover,
.btn-gradient-primary:hover {
    background: #ea580c !important;
    border-color: #ea580c !important;
}
.btn-light,
.btn-outline-secondary {
    color: #475569;
    background: #fff;
    border: 1px solid var(--ui-line);
}
.btn-light:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}
.btn-outline-primary {
    color: #c2410c;
    border-color: #fed7aa;
}
.btn-outline-primary:hover {
    color: #9a3412;
    background: #fff7ed;
    border-color: #fb923c;
}
.btn:focus-visible,
a:focus-visible {
    outline: 3px solid #fdba74;
    outline-offset: 3px;
}
.form-label {
    font: 500 12px/1.5 var(--ui-font);
    color: #334155;
    margin-bottom: 6px;
}
.info-tooltip {
    display: inline-grid;
    place-items: center;
    width: 17px;
    height: 17px;
    padding: 0;
    margin: 0 0 0 5px;
    vertical-align: text-bottom;
    border: 1px solid #8acfc3;
    border-radius: 50%;
    background: #fff;
    color: #078878;
    font: 600 11px/1 var(--ui-font);
    cursor: help;
}
.info-tooltip i,
.info-tooltip span {
    font-size: 11px;
    line-height: 1;
}
.info-tooltip:hover,
.info-tooltip:focus-visible {
    color: #fff;
    background: #078878;
    border-color: #078878;
    outline: 0;
    box-shadow: 0 0 0 3px #ccfbf1;
}
.ui-help-tooltip {
    position: fixed;
    z-index: 2000;
    width: max-content;
    max-width: min(280px, calc(100vw - 24px));
    padding: 9px 11px;
    border-radius: 8px;
    background: #0f172a;
    color: #fff;
    font: 400 11px/1.5 var(--ui-font);
    text-align: left;
    box-shadow: 0 8px 22px #0f172a33;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.1s ease;
}
.ui-help-tooltip.is-visible {
    opacity: 1;
    visibility: visible;
}
.desktop-workspace .form-control,
.desktop-workspace select.form-select,
.form-control,
select.form-select {
    font: 400 13px/1.5 var(--ui-font);
    color: #1e293b;
    background-color: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    min-height: 38px;
    padding: 8px 11px;
    outline: 0;
    box-shadow: none;
}
.desktop-workspace select.form-select,
select.form-select {
    padding-right: 36px;
    background-position: right 11px center;
    background-size: 14px 10px;
    cursor: pointer;
}
.form-control::placeholder {
    color: #94a3b8;
    opacity: 1;
}
.form-control:disabled,
.form-select:disabled {
    background-color: #f1f5f9;
    color: #64748b;
}
.desktop-workspace .form-control:focus,
.desktop-workspace select.form-select:focus,
.form-control:focus,
select.form-select:focus {
    outline: 0;
    border-color: #fb923c;
    box-shadow: 0 0 0 3px #ffedd5;
}
textarea.form-control {
    min-height: 76px;
    resize: vertical;
}
.form-check:has(> .form-check-input) {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0;
    margin: 0;
    min-height: 22px;
}
.form-check:has(> .form-check-input) > .form-check-input {
    position: static;
    float: none;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
}
.form-check:has(> .form-check-input) > .form-check-label {
    font: 400 13px/1.5 var(--ui-font);
    margin: 0;
    padding: 0;
    color: #475569;
    cursor: pointer;
}
.form-check-input {
    border: 1px solid #cbd5e1;
    cursor: pointer;
}
.form-check-input:checked {
    background-color: #f97316;
    border-color: #f97316;
}
.form-check-input:focus {
    border-color: #fb923c;
    box-shadow: 0 0 0 3px #ffedd5;
}
.form-switch .form-check-input {
    width: 2.15em;
    height: 1.15em;
}
.desktop-workspace .table thead th {
    font: 600 11px/1.5 var(--ui-font);
    color: #64748b;
    background: #f8fafc;
    letter-spacing: 0.025em;
    border-color: var(--ui-line);
}
.desktop-workspace .table > :not(caption) > * > * {
    padding: 12px 16px;
    border-color: #edf2f7;
    vertical-align: middle;
}
.table td {
    font-size: 13px;
    line-height: 1.5;
    color: #334155;
    white-space: normal;
    overflow-wrap: anywhere;
}
.table th {
    white-space: nowrap;
}
.table td.text-end {
    font-variant-numeric: tabular-nums;
}
.table tbody tr:hover {
    background: #fafcff;
}
.table-responsive {
    border-radius: 12px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.badge {
    font: 500 11px/1.4 var(--ui-font);
    padding: 4px 8px;
    border-radius: 6px;
    letter-spacing: 0;
}
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: max-content;
    padding: 5px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    font: 600 11px/1.3 var(--ui-font);
    white-space: nowrap;
}
.status-badge i {
    font-size: 11px;
}
.status-badge-lg {
    padding: 7px 11px;
    font-size: 12px;
}
.status-draft,
.status-default {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}
.status-transit {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}
.status-received,
.status-open {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}
.status-discrepancy {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #c2410c;
}
.status-cancelled {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #be123c;
}
.status-closed {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #64748b;
}
.text-bg-success {
    background: #ecfdf5 !important;
    color: #047857 !important;
}
.text-bg-secondary {
    background: #f1f5f9 !important;
    color: #64748b !important;
}
.text-bg-danger {
    background: #fff1f2 !important;
    color: #be123c !important;
}
.text-bg-warning {
    background: #fffbeb !important;
    color: #a16207 !important;
}
.modal-content {
    background: #fff;
    border: 1px solid var(--ui-line);
    border-radius: 16px;
    box-shadow: 0 24px 70px #0f172a26;
    overflow: hidden;
}
.modal-header {
    padding: 20px 24px;
    background: #fff;
    border-bottom: 1px solid #edf2f7;
}
.modal-title {
    font: 600 17px/1.4 var(--ui-font);
    color: #0f172a;
}
.modal-body {
    padding: 24px;
    background: #fff;
}
.modal-footer {
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #edf2f7;
    gap: 8px;
}
.modal-dialog {
    margin: 28px auto;
}
.modal .btn-close {
    opacity: 0.55;
}
.modal-backdrop {
    background: #0f172a;
}
.operation-error-modal .modal-dialog {
    max-width: 520px;
}
.operation-error-modal .modal-header {
    align-items: center;
}
.operation-error-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 10px;
    background: #fff7ed;
    color: #ea580c;
    font-size: 20px;
}
.operation-error-message {
    margin: 0;
    color: #334155;
    font-size: 14px;
    line-height: 1.65;
}
.operation-error-instruction {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 18px;
    padding: 13px 14px;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    background: #fff7ed;
    color: #7c2d12;
}
.operation-error-instruction > i {
    margin-top: 1px;
    color: #ea580c;
    font-size: 15px;
}
.operation-error-instruction strong,
.operation-error-instruction span {
    display: block;
}
.operation-error-instruction strong {
    margin-bottom: 2px;
    font-size: 12px;
    font-weight: 600;
}
.operation-error-instruction span {
    font-size: 12px;
    line-height: 1.55;
}
.session-history-card .table-responsive {
    border-radius: 0 0 14px 14px;
}
.session-history-table {
    min-width: 1180px;
}
.session-history-table .session-row-open {
    background: #f0fdf4;
}
.session-history-table .session-row-open:hover {
    background: #ecfdf5;
}
.session-history-table td {
    vertical-align: middle;
}
.session-timeline {
    display: grid;
    grid-template-columns: minmax(138px, 1fr) auto minmax(138px, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 330px;
}
.session-timeline span {
    font-size: 12px;
    white-space: nowrap;
}
.session-timeline span small {
    display: block;
    color: #64748b;
    font-size: 10px;
}
.session-timeline > i {
    color: #94a3b8;
}
.session-timeline .session-duration {
    grid-column: 1/-1;
    color: #64748b;
    font-size: 10px;
}
.session-variance-warning {
    padding: 11px 12px;
    border: 1px solid #fecdd3;
    border-radius: 9px;
    background: #fff1f2;
    color: #9f1239;
    font-size: 12px;
    line-height: 1.5;
}
.session-variance-note {
    max-width: 190px;
    margin-left: auto;
    margin-top: 3px;
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.alert {
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.6;
    padding: 12px 16px;
}
.alert-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}
.alert-danger {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #9f1239;
}
.navbar .app-brand {
    font-family: var(--ui-font) !important;
}
.brand-name {
    font: 700 22px/1 var(--ui-font);
    letter-spacing: -0.7px;
}
.brand-symbol {
    border-radius: 11px;
    background: #fff7ed !important;
}
.location-title strong,
.profile-caption strong {
    font-family: var(--ui-font);
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}
.location-title small,
.profile-caption small {
    color: #64748b;
    font-size: 11px;
}
.navbar .branch-switch select.form-select {
    font-size: 12px;
    color: #334155;
    border: 1px solid var(--ui-line);
    min-height: 36px;
    padding-top: 7px;
    padding-bottom: 7px;
}
.sidebar .nav .nav-item .nav-link .menu-title {
    font: 500 13px/1.4 var(--ui-font);
}
.sidebar .app-nav-category {
    font: 600 10px/1.4 var(--ui-font);
    color: #94a3b8;
    letter-spacing: 0.08em;
}
.sidebar .nav .nav-item.active > .nav-link .menu-title {
    color: #c2410c;
}
.sidebar .nav .nav-item.active {
    border-radius: 8px;
}
.desktop-workspace .footer {
    border-color: var(--ui-line);
    color: #64748b;
    padding: 14px 32px;
    font-size: 11px;
}
.metric .label {
    font: 500 12px/1.4 var(--ui-font);
    text-transform: none;
    letter-spacing: 0;
    color: #64748b;
}
.metric .value,
.dashboard-workspace .metric .value {
    font: 700 26px/1.3 var(--ui-font);
    letter-spacing: -0.7px;
    color: #0f172a;
}
.dashboard-workspace .metric {
    border-top: 1px solid var(--ui-line);
    padding: 20px;
}
.auth-card {
    border: 1px solid var(--ui-line);
    border-radius: 18px;
    box-shadow: 0 12px 40px #0f172a08;
}
.auth-card h1 {
    font: 700 24px/1.3 var(--ui-font);
}
.pagination {
    gap: 4px;
    margin-bottom: 0;
    flex-wrap: wrap;
}
.page-link {
    border: 1px solid var(--ui-line);
    border-radius: 7px !important;
    color: #475569;
    font: 500 12px/1.5 var(--ui-font);
    padding: 6px 10px;
}
.page-item.active .page-link {
    background: #fff7ed;
    border-color: #fdba74;
    color: #c2410c;
}
.empty {
    font-size: 13px;
    color: #64748b !important;
    padding: 36px 20px !important;
}
[data-live-list] {
    position: relative;
    transition: opacity 0.15s ease;
}
[data-live-list].is-loading {
    opacity: 0.55;
    pointer-events: none;
}
[data-live-list].is-loading::after {
    content: '';
    position: absolute;
    top: 14px;
    right: 14px;
    width: 18px;
    height: 18px;
    border: 2px solid #fed7aa;
    border-top-color: #f97316;
    border-radius: 50%;
    animation: live-list-spin 0.65s linear infinite;
}
@keyframes live-list-spin {
    to {
        transform: rotate(360deg);
    }
}
form[x-data='formFeedback'] > span[x-cloak][role='status'] {
    display: none !important;
}
.btn.is-submitting {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: wait;
    opacity: 0.82;
}
.submit-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: submit-button-spin 0.65s linear infinite;
}
@keyframes submit-button-spin {
    to {
        transform: rotate(360deg);
    }
}
.variant-guide {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 14px 20px 0;
    padding: 10px 12px;
    border: 1px solid #fed7aa;
    border-radius: 9px;
    background: #fff7ed;
    color: #7c2d12;
    font-size: 12px;
    line-height: 1.55;
}
.variant-guide > i {
    color: #ea580c;
    font-size: 15px;
    margin-top: 1px;
}
.variant-guide strong {
    font-weight: 600;
}
.variant-table {
    width: 100%;
    table-layout: fixed;
}
.variant-table th {
    padding-inline: 8px !important;
    font-size: 10px !important;
    white-space: normal !important;
    line-height: 1.35;
}
.variant-table td {
    padding: 10px 6px !important;
}
.variant-table th:nth-child(1) {
    width: 8%;
}
.variant-table th:nth-child(2) {
    width: 9%;
}
.variant-table th:nth-child(3) {
    width: 11%;
}
.variant-table th:nth-child(4) {
    width: 14%;
}
.variant-table th:nth-child(5),
.variant-table th:nth-child(6),
.variant-table th:nth-child(7) {
    width: 10%;
}
.variant-table th:nth-child(8) {
    width: 12%;
}
.variant-table th:nth-child(9) {
    width: 7%;
}
.variant-table th:nth-child(10) {
    width: 5%;
}
.variant-table .form-control,
.variant-table .form-select {
    width: 100%;
    min-width: 0 !important;
    padding-inline: 8px;
    font-size: 12px;
}
.variant-table .form-select {
    padding-right: 27px;
    background-position: right 7px center;
}
.variant-table .info-tooltip {
    vertical-align: middle;
    margin-left: 2px;
}
.variant-table td:nth-child(9),
.variant-table th:nth-child(9),
.variant-table td:nth-child(10),
.variant-table th:nth-child(10) {
    text-align: center;
}
@media (max-width: 1100px) {
    .variant-table {
        min-width: 1050px;
        table-layout: fixed;
    }
}
.desktop-workspace.pos-workspace .content-wrapper {
    max-width: none;
    padding: 12px 16px;
}
.pos-workspace .cashier-title h1 {
    font: 700 22px/1.3 var(--ui-font);
}
.dashboard-actions {
    overflow: hidden;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    background: #fff;
}
.dashboard-actions-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    background: #fff7ed;
}
.dashboard-actions-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 10px;
    background: #ffedd5;
    color: #c2410c;
    font-size: 18px;
}
.dashboard-actions-heading h2 {
    margin: 0;
    font-size: 14px;
}
.dashboard-actions-heading p {
    margin: 2px 0 0;
    color: #7c2d12;
    font-size: 12px;
}
.dashboard-actions-heading .btn {
    margin-left: auto;
}
.dashboard-action-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.dashboard-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border-top: 1px solid #ffedd5;
}
.dashboard-action-row + .dashboard-action-row {
    border-left: 1px solid #ffedd5;
}
.dashboard-action-row strong,
.dashboard-action-row small {
    display: block;
}
.dashboard-action-row strong {
    font-size: 12px;
}
.dashboard-action-row small {
    font-size: 11px;
    color: #64748b;
}
.pos-workspace .form-control,
.pos-workspace select.form-select {
    min-height: 34px;
    font-size: 12px;
    padding-top: 6px;
    padding-bottom: 6px;
}
.pos-workspace .btn {
    font-size: 12px;
    min-height: 32px;
    padding: 7px 10px;
}
.pos-workspace .form-label {
    font-size: 12px;
}
@media (max-width: 991px) {
    .desktop-workspace .content-wrapper {
        padding: 22px 18px;
    }
    .desktop-workspace .page-title {
        font-size: 22px;
    }
    .table-responsive > .table {
        min-width: 600px;
    }
}
@media (max-width: 575px) {
    .desktop-workspace .content-wrapper {
        padding: 18px 12px;
    }
    .card-body {
        padding: 16px;
    }
    .desktop-workspace .card-header {
        padding: 14px 16px;
    }
    .modal-dialog {
        margin: 12px;
    }
    .modal-body {
        padding: 18px;
    }
    .modal-header,
    .modal-footer {
        padding: 16px 18px;
    }
    .navbar .branch-switch select.form-select {
        width: 150px;
        max-width: 150px;
    }
    .btn {
        max-width: 100%;
    }
    .desktop-workspace .content-wrapper > .d-flex {
        align-items: flex-start !important;
    }
    .desktop-workspace .footer {
        padding: 12px;
    }
}
@media print {
    body,
    .desktop-workspace {
        background: #fff;
    }
    .desktop-workspace .content-wrapper {
        padding: 0;
        max-width: none;
    }
    .desktop-workspace .card {
        box-shadow: none;
        border: 0;
    }
    .table-responsive > .table {
        min-width: 0;
    }
}
