:root,
[data-bs-theme="light"] {
    --navy-950: #010f34;
    --navy-900: #021e5d;
    --navy-800: #042359;
    --blue-700: #023295;
    --blue-600: #0446af;
    --blue-500: #015ce4;
    --sky-400: #0496f9;
    --blue-100: #dce9fc;
    --blue-50: #eef4fe;
    --app-bg: #f3f6fb;
    --surface: #fff;
    --surface-2: #f8fafd;
    --line: #dce3ef;
    --line-strong: #b9c5da;
    --field: #7886a3;
    --text: #0b1b3a;
    --text-2: #3d4c70;
    --muted: #56657f;
    --success: #0b7a4b;
    --success-bg: #e4f5ec;
    --warning: #8a4b00;
    --warning-bg: #fff1d6;
    --danger: #b42318;
    --danger-bg: #fdeae7;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px rgba(2, 30, 93, .08);
    --shadow-md: 0 10px 28px rgba(2, 30, 93, .16);
    --focus-ring: 0 0 0 3px rgba(1, 92, 228, .25);

    --bs-font-sans-serif: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, system-ui, sans-serif;
    --bs-body-font-family: var(--bs-font-sans-serif);
    --bs-body-font-size: .875rem;
    --bs-body-line-height: 1.5;
    --bs-body-color: var(--text);
    --bs-body-color-rgb: 11, 27, 58;
    --bs-body-bg: var(--app-bg);
    --bs-body-bg-rgb: 243, 246, 251;
    --bs-secondary-color: var(--muted);
    --bs-tertiary-bg: var(--surface-2);
    --bs-border-color: var(--line);
    --bs-border-radius: var(--radius-sm);
    --bs-border-radius-sm: 5px;
    --bs-border-radius-lg: var(--radius-md);
    --bs-border-radius-xl: var(--radius-lg);
    --bs-emphasis-color: var(--text);
    --bs-heading-color: var(--text);
    --bs-link-color: var(--blue-500);
    --bs-link-color-rgb: 1, 92, 228;
    --bs-link-hover-color: var(--blue-600);
    --bs-link-hover-color-rgb: 4, 70, 175;
    --bs-focus-ring-color: rgba(1, 92, 228, .25);

    --bs-secondary: var(--muted);
    --bs-secondary-rgb: 86, 101, 127;
    --bs-primary: var(--blue-500);
    --bs-primary-rgb: 1, 92, 228;
    --bs-primary-bg-subtle: var(--blue-50);
    --bs-primary-border-subtle: var(--blue-100);
    --bs-primary-text-emphasis: var(--blue-700);
    --bs-success: var(--success);
    --bs-success-rgb: 11, 122, 75;
    --bs-success-bg-subtle: var(--success-bg);
    --bs-success-border-subtle: #b5e1c9;
    --bs-success-text-emphasis: var(--success);
    --bs-warning: #b86a00;
    --bs-warning-rgb: 184, 106, 0;
    --bs-warning-bg-subtle: var(--warning-bg);
    --bs-warning-border-subtle: #f3d08e;
    --bs-warning-text-emphasis: var(--warning);
    --bs-danger: var(--danger);
    --bs-danger-rgb: 180, 35, 24;
    --bs-danger-bg-subtle: var(--danger-bg);
    --bs-danger-border-subtle: #f1bbb5;
    --bs-danger-text-emphasis: var(--danger);
    --bs-info: var(--blue-500);
    --bs-info-rgb: 1, 92, 228;
    --bs-info-bg-subtle: var(--blue-50);
    --bs-info-border-subtle: var(--blue-100);
    --bs-info-text-emphasis: var(--blue-700);
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: 700;
}

:focus-visible {
    outline: 3px solid rgba(4, 150, 249, .75);
    outline-offset: 2px;
}

.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
    outline-offset: 0;
}

.ltr {
    unicode-bidi: isolate;
    direction: ltr;
    text-align: end;
}

[dir="ltr"] .ltr {
    text-align: start;
}

.num {
    font-variant-numeric: tabular-nums;
    text-align: end;
}

.kbd {
    display: inline-block;
    padding: 0 6px;
    border: 1px solid var(--line-strong);
    border-bottom-width: 2px;
    border-radius: 5px;
    background: #fff;
    color: var(--text-2);
    font-size: 11px;
    font-weight: 500;
    line-height: 20px;
    unicode-bidi: isolate;
    direction: ltr;
    white-space: nowrap;
}

.app-skip {
    position: fixed;
    top: 8px;
    inset-inline-start: 8px;
    z-index: 3000;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: #fff;
    box-shadow: var(--shadow-md);
}

[dir="rtl"] .bi-chevron-right,
[dir="rtl"] .bi-chevron-left,
[dir="rtl"] .bi-arrow-right,
[dir="rtl"] .bi-arrow-left {
    transform: scaleX(-1);
}

.app-shell {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    min-height: 100vh;
}

.app-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
}

.app-sidebar {
    --bs-offcanvas-width: 280px;
    --bs-offcanvas-bg: var(--navy-800);
    --bs-offcanvas-color: #fff;
    --bs-offcanvas-border-width: 0;
    --bs-offcanvas-zindex: 1045;
    background-color: var(--navy-800);
    color: #fff;
}

.app-sidebar-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.app-brand:hover,
.app-brand:focus-visible {
    opacity: .92;
}

.app-brand-emblem {
    width: auto;
    height: 34px;
}

.app-brand-wordmark {
    width: auto;
    height: 26px;
}

.app-sidebar-close {
    margin-inline-start: auto;
}

.app-nav {
    flex: 1;
    padding: 8px 10px 12px;
    overflow-y: auto;
}

.app-nav-group:first-child {
    display: none;
}

.app-nav-group {
    margin: 0;
    padding: 12px 12px 4px;
    color: #a0abc0;
    font-size: 11px;
    font-weight: 600;
}

.app-nav-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.app-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    color: #d2d7e1;
    font-weight: 500;
    text-decoration: none;
}

.app-nav-link .bi {
    flex: none;
    font-size: 20px;
    line-height: 1;
}

.app-nav-link:hover {
    background: rgba(255, 255, 255, .09);
    color: #fff;
}

.app-nav-link.active {
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-weight: 700;
}

.app-nav-link.active::before {
    content: "";
    position: absolute;
    inset-block: 8px;
    inset-inline-start: 0;
    width: 3px;
    border-radius: 3px;
    background: var(--sky-400);
}

.app-sidebar-foot {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 14px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.app-user-link {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: #fff;
    text-decoration: none;
}

.app-avatar {
    display: inline-grid;
    flex: none;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--blue-500);
    color: #fff;
    font-weight: 700;
}

.app-user {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.3;
}

.app-user-name {
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-user-sub {
    overflow: hidden;
    color: #a7b2c5;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-logout {
    display: inline-grid;
    flex: none;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    color: #d2d7e1;
    font-size: 20px;
}

.app-logout:hover {
    background: rgba(255, 255, 255, .09);
    color: #fff;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 64px;
    padding: 0 24px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.app-title {
    flex: 1;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    font-size: 18px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-company,
.app-clock {
    margin: 0;
    color: var(--muted);
    white-space: nowrap;
}

.app-clock {
    unicode-bidi: isolate;
}

.app-menu-toggle {
    display: none;
}

.app-main {
    flex: 1;
    min-width: 0;
    padding: 24px;
}

.app-main:focus {
    outline: 0;
}

.app-footer {
    padding: 16px 24px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

@media (max-height: 960px) {
    .app-nav {
        padding-block: 4px 8px;
    }

    .app-nav-group {
        padding-block: 8px 2px;
    }

    .app-nav-link {
        min-height: 36px;
    }

    .app-sidebar-foot {
        padding-block: 8px;
    }
}

@media (min-width: 640px) and (max-width: 1099.98px) {
    .app-shell {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .app-brand-wordmark,
    .app-nav-text,
    .app-user,
    .app-logout {
        display: none;
    }

    .app-sidebar-head {
        justify-content: center;
        padding-inline: 0;
    }

    .app-nav-link {
        justify-content: center;
        padding: 0;
    }

    .app-nav-group {
        margin-top: 6px;
        padding: 0;
        border-top: 1px solid rgba(255, 255, 255, .12);
        font-size: 0;
    }

    .app-nav-group:first-child {
        margin-top: 0;
        border-top: 0;
    }

    .app-sidebar-foot {
        justify-content: center;
        padding-inline: 0;
    }

    .app-user-link {
        flex: none;
        justify-content: center;
    }

    .app-company {
        display: none;
    }

    .app-main {
        padding: 20px;
    }

    .btn {
        --bs-btn-padding-y: .625rem;
    }
}

@media (min-width: 640px) {
    .app-sidebar.offcanvas {
        position: sticky;
        top: 0;
        inset-inline: auto;
        height: 100vh;
        width: auto;
        transform: none;
        visibility: visible;
        transition: none;
    }

    .app-sidebar-close {
        display: none;
    }
}

@media (max-width: 639.98px) {
    .app-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-menu-toggle {
        display: inline-flex;
    }

    .app-topbar {
        gap: 8px;
        padding: 0 12px;
    }

    .app-title {
        font-size: 16px;
    }

    .app-company,
    .app-clock {
        display: none;
    }

    .app-main {
        padding: 14px;
    }
}

.btn {
    --bs-btn-font-weight: 600;
    --bs-btn-border-radius: var(--radius-sm);
    --bs-btn-padding-y: .5rem;
    --bs-btn-padding-x: 1rem;
    min-height: 40px;
}

.btn-sm {
    --bs-btn-padding-y: .25rem;
    --bs-btn-padding-x: .75rem;
    --bs-btn-font-size: .8125rem;
    min-height: 34px;
}

.btn-lg {
    --bs-btn-padding-y: .75rem;
    --bs-btn-font-size: 1rem;
    min-height: 52px;
}

.btn-icon {
    width: 40px;
    padding: 0;
}

.btn-primary {
    --bs-btn-bg: var(--blue-500);
    --bs-btn-border-color: var(--blue-500);
    --bs-btn-hover-bg: var(--blue-600);
    --bs-btn-hover-border-color: var(--blue-600);
    --bs-btn-active-bg: var(--blue-700);
    --bs-btn-active-border-color: var(--blue-700);
    --bs-btn-disabled-bg: var(--blue-500);
    --bs-btn-disabled-border-color: var(--blue-500);
    --bs-btn-focus-shadow-rgb: 1, 92, 228;
}

.btn-outline-primary {
    --bs-btn-color: var(--blue-500);
    --bs-btn-border-color: var(--blue-500);
    --bs-btn-hover-bg: var(--blue-500);
    --bs-btn-hover-border-color: var(--blue-500);
    --bs-btn-active-bg: var(--blue-600);
    --bs-btn-active-border-color: var(--blue-600);
    --bs-btn-disabled-color: var(--blue-500);
    --bs-btn-disabled-border-color: var(--blue-500);
}

.btn-outline-secondary,
.btn-default {
    --bs-btn-color: var(--text);
    --bs-btn-bg: #fff;
    --bs-btn-border-color: var(--field);
    --bs-btn-hover-color: var(--text);
    --bs-btn-hover-bg: var(--blue-50);
    --bs-btn-hover-border-color: var(--blue-500);
    --bs-btn-active-color: var(--text);
    --bs-btn-active-bg: var(--blue-100);
    --bs-btn-active-border-color: var(--blue-500);
    --bs-btn-disabled-color: var(--muted);
    --bs-btn-disabled-bg: #fff;
    --bs-btn-disabled-border-color: var(--line-strong);
}

.btn-danger {
    --bs-btn-bg: var(--danger);
    --bs-btn-border-color: var(--danger);
    --bs-btn-hover-bg: #8f1b12;
    --bs-btn-hover-border-color: #8f1b12;
    --bs-btn-active-bg: #7a1710;
    --bs-btn-active-border-color: #7a1710;
}

.btn-outline-danger {
    --bs-btn-color: var(--danger);
    --bs-btn-border-color: #d69a93;
    --bs-btn-hover-bg: var(--danger-bg);
    --bs-btn-hover-color: var(--danger);
    --bs-btn-hover-border-color: var(--danger);
}

.btn-success {
    --bs-btn-bg: var(--success);
    --bs-btn-border-color: var(--success);
    --bs-btn-hover-bg: #095f3a;
    --bs-btn-hover-border-color: #095f3a;
}

.btn-link {
    --bs-btn-color: var(--blue-500);
    --bs-btn-hover-color: var(--blue-600);
}

.form-control,
.form-select {
    min-height: 40px;
    border-color: var(--field);
    background-color: #fff;
}

.form-control::placeholder {
    color: #5f6e8c;
}

.form-control:hover:not(:disabled),
.form-select:hover:not(:disabled) {
    border-color: var(--text-2);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--blue-500);
    box-shadow: var(--focus-ring);
}

.form-control:disabled,
.form-control[readonly],
.form-select:disabled {
    border-color: var(--line-strong);
    background-color: var(--surface-2);
    color: var(--muted);
}

.form-control-sm,
.form-select-sm {
    min-height: 34px;
}

.form-control-lg {
    min-height: 52px;
    font-weight: 600;
}

.form-label,
.col-form-label,
.control-label {
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
}

.form-check-input {
    border-color: var(--field);
}

.form-check-input:checked {
    background-color: var(--blue-500);
    border-color: var(--blue-500);
}

.form-text,
.help-block {
    color: var(--muted);
    font-size: 12px;
}

.is-invalid,
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--danger);
}

.error_message_box,
#error_message_box {
    margin: 0 0 12px;
    padding: 0;
    color: var(--danger);
    font-size: 13px;
    font-weight: 500;
    list-style: none;
}

.input-group-text {
    border-color: var(--field);
    background: var(--surface-2);
    color: var(--text-2);
}

.card {
    --bs-card-border-color: var(--line);
    --bs-card-border-radius: var(--radius-md);
    --bs-card-inner-border-radius: calc(var(--radius-md) - 1px);
    --bs-card-cap-bg: #fff;
    --bs-card-cap-padding-y: .875rem;
    --bs-card-spacer-x: 1.25rem;
    --bs-card-spacer-y: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.card-header {
    font-size: 15px;
    font-weight: 700;
}

.badge {
    --bs-badge-font-size: .75rem;
    --bs-badge-font-weight: 600;
    --bs-badge-border-radius: 999px;
    --bs-badge-padding-x: .625rem;
}

.alert {
    --bs-alert-border-radius: var(--radius-md);
}

.table {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: var(--blue-50);
    --bs-table-striped-bg: var(--surface-2);
    --bs-table-border-color: var(--line);
}

.table > thead > tr > th {
    background: var(--surface-2);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.table th,
.table td {
    vertical-align: middle;
}

.fixed-table-container,
.bootstrap-table .fixed-table-container {
    border-color: var(--line);
    border-radius: var(--radius-md);
}

.bootstrap-table .fixed-table-toolbar {
    margin-bottom: 8px;
}

.bootstrap-table .fixed-table-pagination {
    padding-block: 8px;
}

.row-highlight > td {
    animation: row-flash 6s ease-out;
}

.row-removing > td {
    background-color: var(--danger-bg);
    opacity: 0;
    transition: opacity .9s linear;
}

@keyframes row-flash {
    from { background-color: var(--success-bg); }
    to { background-color: transparent; }
}

.nav-tabs {
    --bs-nav-tabs-link-active-color: var(--blue-500);
    --bs-nav-link-color: var(--text-2);
    --bs-nav-link-hover-color: var(--blue-600);
    --bs-nav-tabs-border-color: var(--line);
}

.nav-tabs .nav-link {
    min-height: 44px;
    font-weight: 600;
}

.nav-pills {
    --bs-nav-pills-link-active-bg: var(--blue-500);
}

.page-link {
    min-width: 36px;
    text-align: center;
}

.pagination {
    --bs-pagination-active-bg: var(--blue-500);
    --bs-pagination-active-border-color: var(--blue-500);
}

.dropdown-menu {
    --bs-dropdown-border-color: var(--line);
    --bs-dropdown-border-radius: var(--radius-md);
    --bs-dropdown-link-active-bg: var(--blue-500);
    --bs-dropdown-link-hover-bg: var(--blue-50);
    box-shadow: var(--shadow-md);
}

.modal-content {
    border: 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.modal-header,
.modal-footer {
    background: var(--surface-2);
}

.modal-header {
    border-bottom-color: var(--line);
}

.modal-footer {
    border-top-color: var(--line);
}

.modal-dlg .modal-footer .btn {
    min-width: 96px;
}

.app-toast {
    min-width: min(360px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    margin: 0;
}

.app-toast-in {
    animation: toast-in .2s ease-out;
}

.app-toast-out {
    animation: toast-out .2s ease-in forwards;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-8px); }
}

@keyframes toast-out {
    to { opacity: 0; transform: translateY(-8px); }
}

.bootstrap-select > .dropdown-toggle {
    min-height: 40px;
    border: 1px solid var(--field);
    background-color: #fff;
    color: var(--text);
}

.bootstrap-select > .dropdown-toggle.bs-placeholder,
.bootstrap-select > .dropdown-toggle.bs-placeholder:hover,
.bootstrap-select > .dropdown-toggle.bs-placeholder:focus,
.bootstrap-select > .dropdown-toggle.bs-placeholder:active {
    color: var(--muted);
}

.bootstrap-select.form-control-sm > .dropdown-toggle {
    min-height: 34px;
}

.bootstrap-select.form-control,
.bootstrap-select:not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) {
    width: 100%;
    padding: 0;
    border: 0;
}

.bootstrap-select .dropdown-menu {
    z-index: 2100;
}

.ui-autocomplete {
    z-index: 2100;
    max-height: 320px;
    overflow: auto;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-md);
}

.ui-menu-item .ui-menu-item-wrapper {
    display: block;
    padding: 8px 12px;
    border: 0;
    border-radius: var(--radius-sm);
    color: var(--text);
    cursor: pointer;
}

.ui-menu-item .ui-menu-item-wrapper.ui-state-active,
.ui-menu-item .ui-menu-item-wrapper:hover {
    margin: 0;
    background: var(--blue-50);
    color: var(--text);
}

.flatpickr-calendar {
    z-index: 2100 !important;
    font-family: inherit;
}

.daterangepicker {
    z-index: 2100 !important;
    font-family: inherit;
}

.home-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-sm);
    color: var(--text);
    text-decoration: none;
}

.home-tile:hover {
    border-color: var(--blue-500);
    background: var(--blue-50);
    color: var(--text);
}

.home-tile-icon {
    display: inline-grid;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--blue-50);
    color: var(--blue-500);
    font-size: 22px;
}

.home-tile-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.home-tile-title {
    font-weight: 700;
}

.home-tile-desc {
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 1099.98px) {
    .btn {
        min-height: 44px;
    }

    .btn-sm {
        min-height: 40px;
    }

    .btn-icon {
        width: 44px;
    }

    .form-control,
    .form-select,
    .bootstrap-select > .dropdown-toggle {
        min-height: 44px;
    }

    .form-control-sm,
    .form-select-sm {
        min-height: 40px;
    }

    .form-check-input {
        width: 1.25em;
        height: 1.25em;
    }
}

.toggle-button .toggle-on,
.btn-check:checked + .toggle-button .toggle-off {
    display: none;
}

.btn-check:checked + .toggle-button .toggle-on {
    display: inline;
}

.choice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    margin-inline-end: 16px;
    cursor: pointer;
}

input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--blue-500);
}

.image-upload {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.image-upload-preview {
    max-width: 200px;
    max-height: 200px;
    padding: 4px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    object-fit: contain;
}

.tags-input {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    height: auto;
    cursor: text;
}

.tags-input:focus-within {
    border-color: var(--blue-500);
    box-shadow: var(--focus-ring);
}

.tags-input .tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--blue-100);
    color: var(--blue-700);
    font-weight: 600;
    line-height: 24px;
}

.tags-input .tag .btn-close {
    --bs-btn-close-opacity: .6;
    width: .5em;
    height: .5em;
}

.tags-input-field {
    flex: 1;
    min-width: 80px;
    border: 0;
    outline: 0;
    background: transparent;
}

#title_bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-bottom: 12px;
}

#toolbar > div {
    float: none;
}

#daterangepicker {
    width: 240px;
    direction: ltr;
    text-align: center;
}

.bootstrap-table .fixed-table-toolbar .columns .btn-group > .btn,
.bootstrap-table .fixed-table-toolbar .columns > .btn {
    min-height: 34px;
}

.bootstrap-table .page-list .btn {
    min-width: 64px;
}

.bootstrap-table .fixed-table-container thead th .th-inner {
    padding: .5rem;
}

.dropdown-toggle::after {
    margin-inline-start: .5em;
}

input.datetime,
input.datepicker,
input.flatpickr-input,
.ltr-input {
    direction: ltr;
    text-align: end;
}

[dir="ltr"] input.datetime,
[dir="ltr"] input.datepicker,
[dir="ltr"] input.flatpickr-input {
    text-align: start;
}

.login-progress {
    height: 24px;
}

.bootstrap-table {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.bootstrap-table .fixed-table-container {
    border: 0;
}

.bootstrap-table .fixed-table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.bootstrap-table .fixed-table-toolbar > div {
    float: none;
    margin: 0;
}

.bootstrap-table .fixed-table-toolbar .search {
    flex: 1 1 220px;
    order: 3;
}

.bootstrap-table .fixed-table-toolbar .columns {
    margin-inline-start: auto;
}

#table td > a.modal-dlg,
#table .card-view-value > a.modal-dlg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--blue-600);
    text-decoration: none;
}

#table td > a.modal-dlg:hover {
    border-color: var(--blue-500);
    background: var(--blue-50);
}

#table td > a.modal-dlg + a.modal-dlg,
#table .card-view-value > a.modal-dlg + a.modal-dlg {
    margin-inline-start: 4px;
}

@media (pointer: coarse) {
    #table td > a.modal-dlg,
    #table .card-view-value > a.modal-dlg {
        width: 40px;
        height: 40px;
    }
}

.bootstrap-table .fixed-table-container .table tbody tr .card-views {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: .4rem;
    padding: 12px 14px;
}

.bootstrap-table .fixed-table-container .table tbody tr .card-view {
    order: 3;
    display: flex;
    flex: 0 0 100%;
    justify-content: space-between;
    gap: 12px;
    padding-block: 5px;
    border-top: 1px dashed var(--line);
    font-size: 13px;
}

.bootstrap-table .fixed-table-container .table tbody tr .card-view .card-view-title {
    min-width: 0;
    color: var(--muted);
    font-weight: 400;
    text-align: start !important;
}

.bootstrap-table .fixed-table-container .table tbody tr .card-view .card-view-value {
    width: auto !important;
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: end !important;
}

.bootstrap-table .fixed-table-container .table tbody tr .card-view:has(> .card-primary) {
    order: 1;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    font-size: 1.0625rem;
    font-weight: 700;
}

.bootstrap-table .fixed-table-container .table tbody tr .card-view:has(> .card-primary) .card-view-title {
    display: none;
}

.bootstrap-table .fixed-table-container .table tbody tr .card-view:has(> .card-primary) .card-view-value {
    text-align: start !important;
}

.bootstrap-table .fixed-table-container .table tbody tr .card-views::before {
    content: '';
    order: 2;
    flex: 0 0 100%;
    height: 6px;
}

.bootstrap-table .fixed-table-container .table tbody tr .card-view:has(> .card-view-title:empty) {
    order: 4;
    flex: 0 0 auto;
    justify-content: flex-start;
    padding-block: 8px 0;
    border: 0;
}

.bootstrap-table .fixed-table-container .table tbody tr .card-view:has(> .card-view-title:empty) .card-view-title {
    display: none;
}

.bootstrap-table .fixed-table-container .table tbody tr .card-view:has(> .card-view-title:empty) .card-view-value {
    text-align: start !important;
}

.bootstrap-table .fixed-table-container .table tbody tr .card-view.card-view-field-checkbox {
    position: absolute;
    inset-block-start: 10px;
    inset-inline-end: 12px;
    flex: none;
    padding: 0;
    border: 0;
}

@media (max-width: 639.98px) {
    #title_bar .btn {
        flex: 1 1 auto;
    }

    #toolbar > div {
        width: 100%;
    }

    #daterangepicker {
        width: 100%;
    }

    .bootstrap-table {
        padding: 8px;
    }

    .bootstrap-table .fixed-table-toolbar .search {
        order: 1;
        flex: 1 1 0;
        min-width: 0;
    }

    .bootstrap-table .fixed-table-toolbar .columns {
        order: 2;
        margin-inline-start: 0;
    }

    .bootstrap-table .fixed-table-toolbar .bs-bars {
        order: 3;
        flex: 1 0 100%;
    }
}

@media (min-width: 640px) {
    .bootstrap-table .fixed-table-container.has-card-view .table tbody {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 12px;
        padding-block: 4px;
    }
}

#table td.row-actions {
    width: 1%;
    white-space: nowrap;
}

.modal-body .app-form .field {
    min-width: 0;
    margin-bottom: 14px;
}

.modal-body .app-form .form-label,
.modal-body .app-form .col-form-label {
    margin-bottom: 4px;
    padding: 0;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
}

.modal-body .app-form label.required::after {
    content: ' *';
}

.modal-body .app-form .form-control-sm,
.modal-body .app-form .form-select-sm,
.modal-body .app-form .form-select {
    min-height: 38px;
    padding: .4rem .75rem;
    font-size: .9375rem;
}

.modal-body .app-form textarea.form-control-sm {
    height: 96px;
    min-height: 84px;
    resize: vertical;
}

.modal-body .app-form .input-group-text {
    min-width: 38px;
    justify-content: center;
}

.modal-body .app-form .field-check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-body .app-form .field-check > .form-label {
    order: 2;
    margin: 0;
}

.modal-body .app-form .field-check > .field-control {
    order: 1;
}

.modal-body .app-form .choice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-inline-end: 18px;
    font-weight: 400;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    column-gap: 20px;
}

.form-grid > .span-all {
    grid-column: 1 / -1;
}

.form-section {
    margin-bottom: 10px;
}

.form-section-title {
    margin: 6px 0 14px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
    color: var(--blue-700);
    font-size: 13px;
    font-weight: 700;
}

.modal-body .app-form .nav-tabs {
    margin-bottom: 16px;
}

.modal-body .app-form .nav-tabs:has(> .nav-item:only-child) {
    display: none;
}

@media (max-width: 575.98px) {
    .modal-body .app-form .choice {
        display: flex;
        margin-bottom: 6px;
    }

    .modal-body .app-form .nav-tabs .nav-link {
        padding: .5rem .35rem;
        font-size: 13px;
    }
}

.perm-intro {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 20px;
    margin-bottom: 14px;
}

.perm-desc {
    margin: 0;
    color: var(--text-2);
    font-size: 13px;
}

.perm-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.perm-module {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md, 10px);
    background: var(--surface);
}

.perm-module.is-off .perm-title {
    color: var(--muted);
}

.perm-head {
    margin-bottom: 0;
}

.perm-head .form-check-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.perm-title {
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.perm-note {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

.perm-subs {
    margin: 10px 0 0;
    padding: 10px 0 0;
    border-top: 1px dashed var(--line);
    list-style: none;
}

.perm-subs .form-check {
    margin-bottom: 4px;
    font-size: 13px;
}

#item_kit_items th:nth-child(1),
#item_kit_items th:nth-child(2) {
    width: 10%;
}

#item_kit_items th:nth-child(3) {
    width: 55%;
}

#item_kit_items th:nth-child(4) {
    width: 25%;
}

#item_kit_items td {
    vertical-align: middle;
}

.attributes-slot {
    display: contents;
}

#items_count_details thead tr:nth-child(2) th:nth-child(1),
#items_count_details thead tr:nth-child(2) th:nth-child(4) {
    width: 30%;
}

#items_count_details thead tr:nth-child(2) th:nth-child(2),
#items_count_details thead tr:nth-child(2) th:nth-child(3) {
    width: 20%;
}

.sms-card {
    max-width: 640px;
    margin-inline: auto;
}

.sms-card .field,
.sms-card .btn {
    margin-bottom: 14px;
}

.tax-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin-bottom: 10px;
}

.tax-row-label {
    flex: 0 0 110px;
    margin: 0;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
}

.tax-row-field {
    flex: 1 1 140px;
    min-width: 120px;
}

.tax-row-actions {
    display: flex;
    gap: 4px;
}

.settings-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.settings-nav {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
}

.settings-nav-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    font-weight: 600;
    text-align: start;
}

.settings-nav-list {
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.settings-group-title {
    margin: 12px 10px 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.settings-group-title:first-child {
    margin-top: 6px;
}

.settings-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-2);
    font-weight: 600;
    text-align: start;
}

.settings-link .bi {
    color: var(--muted);
    font-size: 17px;
}

.settings-link:hover {
    background: var(--blue-50);
    color: var(--blue-700);
}

.settings-link.active {
    background: var(--blue-50);
    color: var(--blue-700);
    box-shadow: inset 3px 0 0 var(--blue-500);
}

[dir="rtl"] .settings-link.active {
    box-shadow: inset -3px 0 0 var(--blue-500);
}

.settings-link.active .bi {
    color: var(--blue-500);
}

.settings-content > .tab-pane {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.settings-content > .tab-pane:focus-visible {
    outline: 2px solid var(--blue-500);
    outline-offset: 2px;
}

.settings-content .row {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
}

.settings-content .row.mb-3 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin-bottom: 16px !important;
}

.settings-content .row.mb-3 > .col-form-label {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    padding: 0;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
}

.settings-content .row.mb-3 > [class*="col-"]:not(.col-form-label) {
    flex: 1 1 200px;
    width: auto;
    max-width: 520px;
    min-width: 0;
    padding: 0;
}

.settings-content label.required::after {
    content: ' *';
}

.settings-content .form-control-sm,
.settings-content .form-select-sm,
.settings-content .form-select {
    min-height: 38px;
    padding: .4rem .75rem;
    font-size: .9375rem;
}

.settings-content .input-group-text {
    min-width: 38px;
    justify-content: center;
}

.settings-content textarea.form-control-sm {
    min-height: 84px;
}

.settings-content .bootstrap-select {
    width: 100% !important;
}

.settings-content fieldset {
    min-width: 0;
}

.settings-content .repeat-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
}

.settings-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.settings-content .nav-tabs {
    margin-bottom: 16px;
}

#issuetemplate {
    direction: ltr;
    text-align: left;
}

@media (min-width: 768px) {
    .settings-content .row.mb-3 > .col-form-label {
        flex: 0 0 230px;
        width: 230px;
    }
}

@media (max-width: 991.98px) {
    .settings-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .settings-nav {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .settings-nav-list {
        margin-top: 8px;
    }

    .settings-link {
        min-height: 44px;
    }

    .settings-content > .tab-pane {
        padding: 14px;
    }
}

.app-search-open {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    color: var(--text-2);
    font-weight: 600;
    white-space: nowrap;
}

.app-search-kbd {
    padding: 1px 6px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--muted);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
}

.search-dialog {
    max-width: 560px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
}

.search-box .bi {
    color: var(--muted);
    font-size: 18px;
}

.search-input {
    flex: 1;
    min-width: 0;
    padding: 6px 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 16px;
}

.search-input:focus {
    outline: 0;
}

.search-results {
    margin: 0;
    padding: 6px;
    overflow-y: auto;
    list-style: none;
}

.search-result {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
}

.search-result .bi {
    color: var(--blue-500);
    font-size: 18px;
}

.search-result.active,
.search-result:hover {
    background: var(--blue-50);
    color: var(--blue-700);
}

.search-result-label {
    flex: 1;
    min-width: 0;
    font-weight: 600;
}

.search-result-group {
    color: var(--muted);
    font-size: 12px;
}

.search-status {
    margin: 0;
    padding: 18px 16px;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 767.98px) {
    .app-search-label,
    .app-search-open .app-search-kbd {
        display: none;
    }

    .app-search-open {
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        padding: 0;
    }

    .search-dialog {
        margin-top: .5rem;
    }
}

a.none {
    text-decoration: none;
}

.tab-pane {
    padding-top: 10px;
}

#config_info {
    text-align: start;
}

#config_info .wide {
    width: 30%;
}

#integrations_header {
    margin: 10px 0;
    padding: 10px 0;
    text-align: center;
    font-size: 1.4em;
    font-weight: normal;
}

a.rollover img {
    padding: 3px;
}

#required_fields_message {
    width: 100%;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

#customer_basic_info,
#item_basic_info,
#item_number_info,
#supplier_basic_info,
#sale_basic_info,
#employee_basic_info,
#employee_login_info,
#employee_permission_info {
    padding: 5px;
}

#info_provided_by {
    display: none;
    font-weight: bold;
}

#item_kit_items,
#items_count_details,
#tax_rates {
    width: 100%;
    font-size: 80%;
}

#item_kit_items thead tr,
#items_count_details thead tr,
#tax_rates thead tr {
    background-color: var(--surface-2);
}

#item_kit_items th,
#items_count_details th,
#tax_rates th,
#item_kit_items td,
#items_count_details td,
#tax_rates td {
    text-align: center;
}

#filters.btn-group {
    vertical-align: middle;
}

.kbd:empty {
    display: none;
}

.kbd-inverse {
    border-color: rgba(255, 255, 255, .45);
    background: rgba(1, 15, 52, .35);
    color: #fff;
}

.pos {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
    align-items: start;
}

.pos-main {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.pos-side {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pos-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
}

.pos-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    padding: 12px 16px;
}

.pos-bar .pos-label {
    margin-bottom: 4px;
}

.pos-spacer {
    flex: 1;
}

.pos-scan {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pos-scan-icon {
    position: absolute;
    inset-block-start: 26px;
    inset-inline-start: 16px;
    translate: 0 -50%;
    color: var(--muted);
    font-size: 20px;
    pointer-events: none;
}

.pos-scan-input {
    flex: 1;
    min-width: 0;
    min-height: 52px;
    padding-inline-start: 46px;
    font-size: 16px;
}

.pos-scan .btn {
    min-height: 52px;
}

.pos-top {
    margin-bottom: 12px;
}

.pos-top-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 8px;
}

.pos-top-tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
    min-height: 64px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text);
    text-align: start;
    box-shadow: var(--shadow-sm);
}

.pos-top-tile:hover {
    border-color: var(--blue-500);
    background: var(--blue-50);
}

.pos-top-tile:active {
    background: var(--blue-100);
}

.pos-top-tile:focus-visible {
    outline: 2px solid var(--blue-500);
    outline-offset: 2px;
}

.pos-top-tile-name {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.pos-top-tile-price {
    color: var(--blue-700);
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 767.98px) {
    .pos-top-tiles {
        display: flex;
        overflow-x: auto;
        padding-bottom: 6px;
        scroll-snap-type: x proximity;
    }

    .pos-top-tile {
        flex: 0 0 132px;
        scroll-snap-align: start;
    }
}

.pos-cart {
    container-type: inline-size;
    container-name: cart;
}

.pos-cart-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pos-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 44px 20px;
    color: var(--muted);
    text-align: center;
}

.pos-empty-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--blue-50);
    color: var(--blue-500);
    font-size: 26px;
}

.cart-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 88px 124px 136px 84px 84px;
    align-items: center;
    gap: 8px 10px;
    margin: 0;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
}

.cart-row-receiving {
    grid-template-columns: minmax(0, 1fr) 88px 124px 108px 136px 84px 84px;
}

.giftcard-input:disabled {
    display: none;
}

.cart-head {
    padding-block: 8px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.cart-line:last-child {
    border-bottom: 0;
}

.cart-name {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.cart-title {
    font-weight: 600;
    line-height: 1.35;
}

.cart-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    color: var(--muted);
    font-size: 12px;
}

.cart-field > .num,
.cart-total > .num {
    display: block;
}

.cart-total > .num {
    font-weight: 700;
}

.cart-field::before {
    display: none;
}

.cart-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.cart-extra {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    grid-column: 1 / -1;
}

.cart-extra:empty {
    display: none;
}

.cart-extra > .form-control {
    flex: 1 1 220px;
}

.qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--field);
    border-radius: 8px;
    background: #fff;
}

.qty-b {
    display: grid;
    place-items: center;
    flex: none;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.qty-b:hover {
    background: var(--blue-50);
    color: var(--blue-500);
}

.qty-v {
    width: 44px;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-weight: 700;
    text-align: center;
}

.pos-keys {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    color: var(--muted);
    font-size: 12px;
}

.pos-key-list {
    display: contents;
}

.pos-key {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pos-customer-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.pos-customer-pick {
    display: flex;
    gap: 8px;
}

.pos-dl,
.pos-sum {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 12px;
}

.pos-dl > div,
.pos-sum > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.pos-dl dt,
.pos-sum dt {
    color: var(--text-2);
    font-weight: 400;
}

.pos-dl dd,
.pos-sum dd {
    margin: 0;
    font-weight: 600;
    text-align: end;
}

.pos-sum dd,
.pos-payments strong,
.pos-change strong,
.pos-total-text strong,
.cart-field > .num {
    direction: ltr;
    unicode-bidi: isolate;
}

.pos-sum-total {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px dashed var(--line-strong);
}

.pos-details {
    margin-bottom: 12px;
    font-size: 13px;
}

.pos-details > summary {
    margin-bottom: 8px;
    color: var(--blue-500);
    cursor: pointer;
}

.pos-sum-total:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.pos-sum-total dt {
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
}

.pos-sum-total dd {
    color: var(--blue-500);
    font-size: 26px;
    font-weight: 700;
}

.pos-sum-payments {
    margin: 12px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.pos-sum-due dt {
    color: var(--text);
    font-weight: 700;
}

.pos-sum-due dd {
    font-size: 18px;
}

.pos-methods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.pos-method {
    min-height: 46px;
    padding: 0 10px;
    border: 1px solid var(--field);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
}

.pos-method:hover {
    border-color: var(--blue-500);
}

.pos-method[aria-pressed="true"] {
    border-color: var(--blue-500);
    background: var(--blue-50);
    box-shadow: inset 0 0 0 1px var(--blue-500);
    color: var(--blue-500);
}

.pos-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.pos-change {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--success-bg);
    color: var(--success);
    font-weight: 600;
}

.pos-change strong {
    font-size: 20px;
}

.pos-kbd-inline {
    display: none;
}

.pos-payments {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.pos-payments li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--surface-2);
}

.pos-payments li > span {
    flex: 1;
}

.pos-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pos-actions-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pos-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pos-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pos-total-bar {
    display: none;
}

@media (pointer: coarse) {
    .pos .kbd,
    .pos-key-list {
        display: none;
    }
}

@media (min-width: 640px) and (max-width: 1099.98px) {
    .pos {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 16px;
    }

    .pos-scan-new-text {
        display: none;
    }
}

@container cart (max-width: 719px) {
    .cart-head {
        display: none;
    }

    .cart-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 14px 16px;
    }

    .cart-name {
        grid-column: 1;
        grid-row: 1;
    }

    .cart-actions {
        grid-column: 2;
        grid-row: 1;
        align-self: start;
    }

    .cart-field {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .cart-field::before {
        display: block;
        content: attr(data-label);
        color: var(--muted);
        font-size: 12px;
    }

    .cart-total {
        align-items: flex-end;
        text-align: end;
    }
}

@container cart (max-width: 899px) {
    .cart-row-receiving.cart-head {
        display: none;
    }

    .cart-row-receiving {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .cart-row-receiving .cart-name {
        grid-column: 1 / 4;
        grid-row: 1;
    }

    .cart-row-receiving .cart-actions {
        grid-column: 4;
        grid-row: 1;
    }

    .cart-row-receiving .cart-total {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding-top: 6px;
        border-top: 1px dashed var(--line);
    }
}

@container cart (max-width: 519px) {
    .cart-row-receiving {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cart-row-receiving .cart-name {
        grid-column: 1;
    }

    .cart-row-receiving .cart-actions {
        grid-column: 2;
    }
}

@media (max-width: 639.98px) {
    .pos {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        padding-bottom: 76px;
    }

    .pos-side {
        position: static;
    }

    .pos-key-list {
        display: none;
    }

    .pos-bar {
        align-items: stretch;
    }

    .pos-field {
        flex: 1 1 140px;
    }

    .pos-spacer {
        display: none;
    }

    .pos-scan {
        flex-wrap: wrap;
    }

    .pos-scan-input {
        flex: 1 1 100%;
    }

    .pos-scan .btn {
        flex: 1 1 0;
    }

    .pos-total-bar {
        position: fixed;
        inset-inline: 0;
        bottom: 0;
        z-index: 1030;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 12px;
        border-top: 1px solid var(--line);
        background: #fff;
        box-shadow: 0 -8px 20px rgba(2, 30, 93, .1);
    }

    .pos-total-text {
        display: flex;
        flex-direction: column;
        line-height: 1.25;
    }

    .pos-total-text > span {
        color: var(--muted);
        font-size: 12px;
    }

    .pos-total-text > strong {
        font-size: 20px;
    }
}

.document-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-bottom: 16px;
}

@media (max-width: 639.98px) {
    .document-actions .btn {
        flex: 1 1 140px;
    }
}

.report-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.report-title {
    margin: 0;
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 700;
}

.report-subtitle {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.report-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.report-kpi {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.report-kpi-label {
    color: var(--muted);
    font-size: 13px;
}

.report-kpi-value {
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 700;
    align-self: flex-start;
}

.chart-card {
    padding: 16px;
}

.chart-box {
    position: relative;
    height: clamp(300px, 52vh, 460px);
}

.chart-box[data-kind="hbar"] {
    height: calc(var(--chart-rows, 8) * 32px + 100px);
}

.chart-data {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.chart-data > summary {
    color: var(--blue-500);
    cursor: pointer;
    font-weight: 600;
}

.chart-data .table-responsive {
    margin-top: 10px;
}

.report-form {
    max-width: 720px;
}

.report-form .field {
    min-width: 0;
    margin-bottom: 14px;
}

.report-form .form-label {
    margin-bottom: 4px;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
}

.report-form label.required::after {
    content: ' *';
}

.report-form .discount_percent,
.report-form .discount_fixed {
    min-width: 0;
}

.report-form-actions {
    margin-top: 6px;
}

.report-search {
    width: min(100%, 320px);
}

.report-group {
    margin-bottom: 22px;
}

.report-group-title {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.report-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.report-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
}

.report-card-title .bi {
    color: var(--blue-500);
    font-size: 18px;
}

.report-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.report-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 4px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--blue-700);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.report-link:hover {
    border-color: var(--blue-500);
    background: var(--blue-50);
}

@media (pointer: coarse) {
    .report-link {
        min-height: 44px;
    }
}

.report-kpi.is-sensitive {
    border-style: dashed;
}

.dash-welcome {
    margin: 0 0 16px;
    font-size: 1.25rem;
    font-weight: 700;
}

.dash-kpis {
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
}

.kpi-note {
    color: var(--muted);
    font-size: 13px;
}

.kpi-delta {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    font-weight: 600;
}

.kpi-delta.is-up {
    color: var(--success);
}

.kpi-delta.is-down {
    color: var(--danger);
}

.kpi-link {
    color: inherit;
    text-decoration: none;
}

.kpi-link:hover {
    border-color: var(--blue-500);
}

.dash-panels {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

@media (max-width: 1099.98px) {
    .dash-panels {
        grid-template-columns: minmax(0, 1fr);
    }
}

.dash-trend .chart-box {
    height: clamp(240px, 36vh, 340px);
}

.dash-card-title {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
}

.dash-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.dash-card {
    padding: 16px;
}

.dash-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dash-list li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--line);
    font-size: 13px;
}

.dash-list li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.dash-list-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.dash-list-value {
    flex: none;
    color: var(--muted);
}

#receipt_wrapper {
    width: 100%;
}

@media screen {
    #receipt_wrapper {
        max-width: 760px;
        margin: 0 auto;
        padding: 24px;
        border: 1px solid var(--line);
        border-radius: var(--radius-md);
        background: #fff;
        box-shadow: var(--shadow-sm);
    }
}

#receipt_header {
    text-align: center;
}

#company_name {
    font-size: 150%;
    font-weight: bold;
}

#company_name img {
    max-width: 150px;
    max-height: 150px;
}

#company_phone {
    margin-bottom: 15px;

}

#sale_time {
    margin-bottom: 5px;
}

#receipt_items {
    position: relative;
    border-collapse: collapse;
    margin-top: 15px;
    margin-bottom: 15px;
    width: 100%;
}

#receipt_items td {
    position: relative;
    padding: 3px;
    margin-bottom: 5px;

}

#receipt_items tr {
    margin-bottom: 5px;
}

#sale_return_policy {
    width: 80%;
    margin: 0 auto;
    text-align: center;
}

#receipt_wrapper #barcode {
    margin-top: 10px;
    text-align: center;
}

.total-value {
    text-align: right;
}

.discount {
    font-weight: bold;
}

.receipt-thermal {
    color: #000;
    line-height: 1.45;
    word-break: break-word;
}

@media screen {
    #receipt_wrapper.receipt-thermal {
        width: 302px;
        max-width: 100%;
        padding: 14px 12px;
        border-radius: 0;
        box-shadow: var(--shadow-md);
    }

    #receipt_wrapper.receipt-58 {
        width: 219px;
        padding: 12px 8px;
    }
}

.rt-head {
    text-align: center;
}

.rt-logo {
    max-width: 60%;
    max-height: 64px;
    margin-bottom: 4px;
    filter: grayscale(1) contrast(1.6);
}

.rt-company {
    font-size: 130%;
    font-weight: 700;
}

.rt-title {
    margin-top: 6px;
    padding: 3px 0;
    border-block: 1px dashed #000;
    font-weight: 700;
}

.rt-info,
.rt-totals {
    margin: 8px 0 0;
}

.rt-info > div,
.rt-totals > div,
.rt-calc {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.rt-info dd,
.rt-totals dd {
    margin: 0;
    font-weight: 600;
    text-align: end;
}

.rt-items {
    margin: 8px 0;
    padding: 6px 0;
    border-block: 1px dashed #000;
}

.rt-item {
    padding: 3px 0;
}

.rt-name {
    font-weight: 700;
}

.rt-note,
.rt-discount {
    font-size: 90%;
}

.rt-grand {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid #000;
    font-size: 125%;
    font-weight: 700;
}

.rt-balance {
    font-weight: 700;
}

.rt-policy {
    margin-top: 10px;
    font-size: 85%;
    text-align: center;
}

.rt-barcode {
    margin-top: 10px;
    text-align: center;
}

.rt-barcode svg {
    max-width: 100%;
    height: 40px;
}

@page thermal80 {
    margin: 0;
}

@page thermal58 {
    margin: 0;
}

@media print {
    #receipt_wrapper.receipt-80 {
        page: thermal80;
        width: 72mm;
        margin: 0 auto;
        padding: 4mm;
    }

    #receipt_wrapper.receipt-58 {
        page: thermal58;
        width: 50mm;
        margin: 0 auto;
        padding: 4mm 3mm;
    }
}

@media screen {
    #document {
        max-width: 794px;
        margin: 0 auto;
        padding: 40px;
        overflow-x: auto;
        border: 1px solid var(--line);
        border-radius: var(--radius-md);
        background: #fff;
        box-shadow: var(--shadow-sm);
    }

    #document .doc-logo {
        display: block;
    }

    #document .doc-barcode svg {
        max-width: 100%;
    }
}

@media (max-width: 575.98px) {
    #document {
        padding: 18px 14px;
    }

    #document .doc-title {
        font-size: 18pt;
    }
}

@page doc {
    size: A4;
    margin: 12mm;
}

@media print {
    #document {
        page: doc;
        padding: 0;
        border: 0;
        box-shadow: none;
    }
}

@media print {

    body {
        background: #fff;
    }

    .no-print,
    .no-print * {
        display: none !important;
    }

    #receipt_wrapper,
    #table {
        /* background-color:#FFFFFF; */
        font-size: 75%;
    }

    .app-sidebar,
    .app-topbar,
    .app-footer,
    .app-menu-toggle,
    .app-skip {
        display: none !important;
    }

    .app-shell {
        display: block;
    }

    .app-main {
        padding: 0;
    }

    #sale_return_policy {
        width: 100%;
        text-align: center;
    }

    /* Hide links in table for printing */
    table.innertable {
        display: table;
    }

    table.innertable a {
        color: #000000;
        text-decoration: none;
    }

    table.report a.expand {
        visibility: hidden;
    }

    table.report a {
        color: #000000;
        text-decoration: none;
    }

    table.innertable thead {
        /* display:none; */
    }

    .print_show {
        display: block !important;
    }

    .print_hide {
        display: none !important;
    }

    .fixed-table-container {
        border: none;
    }

    .fixed-table-container thead th .sortable {
        padding-right: 10px;
    }
}