* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #f5f7f8;
    color: #172026;
    font-family: Arial, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.login-page {
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-box {
    width: min(420px, 100%);
    background: white;
    border: 1px solid #dfe5e8;
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 16px 40px rgba(23, 32, 38, .08);
}

.login-box h1,
.sidebar h1 {
    margin: 0 0 6px;
    font-size: 24px;
}

.login-box p {
    margin: 0 0 24px;
    color: #667782;
}

.login-company-address {
    line-height: 1.45;
}

.login-company-address span {
    display: block;
}

.login-company-address .login-app-name {
    margin-top: 4px;
    color: #385160;
    font-size: 14px;
    font-weight: 800;
}

.login-company-address .login-address-text {
    margin-top: 6px;
    color: #667782;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.55;
}

.login-powered {
    margin-top: 30px;
    color: #7a8b96;
    font-size: 12px;
    text-align: center;
}

label {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 14px;
    color: #465760;
}

input,
select,
textarea,
button {
    width: 100%;
    border: 1px solid #cfd9de;
    border-radius: 6px;
    padding: 11px 12px;
    font: inherit;
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 9px 10px;
    border: 1px solid #d8e1ef;
    border-radius: 8px;
    color: #24364f;
    background: #f8fbff;
    font-weight: 700;
}

.checkbox-line input {
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 0;
    accent-color: #0f62b6;
}

button {
    border-color: #176b55;
    background: #176b55;
    color: white;
    cursor: pointer;
    font-weight: 700;
}

textarea {
    resize: vertical;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid #176b55;
    border-radius: 6px;
    padding: 9px 12px;
    background: #176b55;
    color: white;
    font-weight: 700;
}

.button.secondary {
    border-color: #cfd9de;
    background: white;
    color: #465760;
}

.button.small,
button.small {
    width: auto;
    min-height: 34px;
    padding: 7px 10px;
    font-size: 13px;
}

button.danger {
    border-color: #b93232;
    background: #b93232;
}

.notice {
    margin-bottom: 14px;
    border-radius: 6px;
    padding: 11px 12px;
}

.notice.success {
    background: #eaf7f0;
    color: #176b55;
}

.notice.error {
    background: #fff0f0;
    color: #a12828;
}

.alert {
    margin-bottom: 14px;
    border-radius: 6px;
    padding: 10px;
    background: #fff0f0;
    color: #a12828;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 240px;
    background: #14231f;
    color: white;
    padding: 22px;
}

.sidebar nav {
    display: grid;
    gap: 8px;
    margin-top: 24px;
}

.sidebar a {
    border-radius: 6px;
    padding: 10px 12px;
    color: #dce7e3;
}

.sidebar a:hover {
    background: rgba(255, 255, 255, .08);
}

.nav-section {
    display: block;
    margin: 14px 0 4px;
    padding: 0 12px;
    color: #8fa39b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.sidebar-nav {
    overflow-y: auto;
    max-height: calc(100vh - 104px);
    padding-right: 4px;
}

.nav-item,
.nav-group-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    padding: 10px 12px;
    background: transparent;
    color: #dce7e3;
    text-align: left;
    font-size: 14px;
    font-weight: 700;
}

.nav-group-toggle {
    justify-content: space-between;
    cursor: pointer;
}

.nav-group-toggle > span:first-child,
.nav-item {
    min-width: 0;
}

.nav-icon {
    display: none;
}

.nav-chevron {
    transition: transform .18s ease;
}

.nav-group.open .nav-chevron {
    transform: rotate(90deg);
}

.nav-submenu {
    display: none;
    margin: 4px 0 8px 12px;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, .12);
}

.checkbox-row {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 10px;
}

.checkbox-row input {
    width: auto;
}

.inline-confirm-form {
    display: grid;
    min-width: 180px;
    gap: 8px;
}

.inline-confirm-form input,
.inline-confirm-form textarea {
    padding: 8px;
    font-size: 13px;
}

.line-items {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}

.line-item-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px auto;
    gap: 10px;
    align-items: end;
    border: 1px solid #edf1f3;
    border-radius: 8px;
    padding: 10px;
    background: #fbfcfc;
}

.line-item-row label {
    margin-bottom: 0;
}

.mutation-line {
    grid-template-columns: minmax(0, 1fr) 82px 58px;
    align-items: end;
    gap: 8px;
    padding: 8px;
}

.mutation-line label:first-child,
.mutation-line .mutation-product {
    min-width: 0;
    width: 100%;
}

.mutation-line label:nth-child(2) {
    min-width: 0;
}

.mutation-line label:nth-child(2) input {
    width: 100%;
}

.mutation-line .remove-line {
    min-width: 58px;
    min-height: 42px;
    padding-inline: 6px;
}
.sale-line-row {
    grid-template-columns: minmax(82px, .72fr) minmax(116px, 1fr) auto;
    gap: 8px;
    align-items: end;
}

.sale-product-field,
.sale-qty-field,
.sale-price-field {
    min-width: 0;
}

.sale-product-field select,
.sale-qty-field input,
.sale-price-field input {
    width: 100%;
    min-width: 0;
}

.sale-product-field {
    grid-column: 1 / -1;
}

.sale-remove-field {
    width: auto;
    min-width: 64px;
    min-height: 42px;
    padding-inline: 10px;
}

@media (max-width: 1180px) {
    .sale-line-row {
        grid-template-columns: minmax(82px, .72fr) minmax(116px, 1fr) auto;
    }
}

.stock-in-header-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 12px;
    margin-bottom: 12px;
}

.stock-in-header-grid label {
    min-width: 0;
    margin-bottom: 0;
}

.stock-in-header-grid input,
.stock-in-header-grid select {
    min-height: 38px;
}

.stock-in-line {
    grid-template-columns: minmax(220px, 1.08fr) minmax(92px, .32fr) minmax(90px, .28fr) minmax(96px, .32fr) minmax(76px, .22fr) minmax(92px, .28fr) minmax(240px, .86fr) minmax(130px, .36fr) minmax(118px, .34fr) 72px;
    align-items: start;
}

.stock-in-line.has-ati {
    grid-template-columns: minmax(205px, 1.02fr) minmax(86px, .28fr) minmax(82px, .25fr) minmax(104px, .34fr) minmax(72px, .2fr) minmax(84px, .24fr) minmax(104px, .32fr) minmax(100px, .3fr) minmax(190px, .62fr) minmax(112px, .34fr) 72px;
}

.stock-in-line .stock-product-field,
.stock-in-line .stock-ati-pcs-field,
.stock-in-line .stock-ati-hpp-pcs-field,
.stock-in-line .stock-warehouse-field,
.stock-in-line .stock-item-total-field,
.stock-in-line .stock-weight-percent-field,
.stock-in-line .stock-selling-field {
    min-width: 0;
}

.stock-in-line .stock-product-field {
    position: relative;
}

.stock-in-line .stock-ati-pcs-field[hidden] {
    display: none !important;
}

.stock-in-line .stock-ati-hpp-pcs-field[hidden] {
    display: none !important;
}

.stock-in-line .stock-product-field input,
.stock-in-line .stock-product-field select,
.stock-in-line .stock-ati-pcs-field input,
.stock-in-line .stock-ati-hpp-pcs-field input,
.stock-in-line .stock-warehouse-field input,
.stock-in-line .stock-warehouse-field select,
.stock-in-line .stock-item-total-field input,
.stock-in-line .stock-weight-percent-field input,
.stock-in-line .stock-selling-field input {
    width: 100%;
}

.stock-in-line .stock-remove-field {
    align-self: end;
    width: 72px;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
}

.allocation-hpp-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

.allocation-hpp-fields input {
    min-width: 0;
}

@media (max-width: 1280px) {
    .stock-in-header-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stock-in-line {
        grid-template-columns: minmax(230px, 1fr) minmax(105px, .45fr) minmax(125px, .5fr) minmax(95px, .38fr) minmax(95px, .38fr) minmax(125px, .5fr) auto;
    }

    .stock-hpp-field {
        grid-column: 1 / -1;
    }
}

.stock-in-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    margin: 0 0 12px;
    border: 1px solid #d9e8f7;
    border-radius: 8px;
    background: #f4f9ff;
    color: #334155;
}

.stock-in-summary strong {
    display: block;
    color: #0f5fa8;
    font-size: 16px;
}

.trade-line-wide {
    grid-template-columns: minmax(240px, 1.8fr) minmax(130px, .8fr) minmax(100px, .6fr) minmax(130px, .8fr) auto;
}

.trade-product-field,
.trade-number-field {
    min-width: 0;
}

.trade-product-field select,
.trade-number-field input {
    width: 100%;
}

.trade-entry-layout {
    display: grid;
    gap: 16px;
}

.trade-entry-layout form {
    display: grid;
    gap: 16px;
}

.trade-header-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 12px;
    align-items: end;
}

.trade-header-grid label {
    margin-bottom: 0;
}

.trade-note-field {
    grid-column: 1 / -1;
}

.trade-items-head,
.trade-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.trade-items-head {
    margin-bottom: 14px;
}

.trade-footer {
    margin-top: 14px;
}

.trade-footer .summary-row {
    min-width: 260px;
    margin: 0;
}

.stock-confirm-form {
    display: grid;
    min-width: 260px;
    gap: 10px;
}

.stock-confirm-form label {
    gap: 5px;
    margin-bottom: 0;
}

.stock-confirm-form small {
    color: #667782;
}

.checker-stock-table th,
.checker-stock-table td {
    vertical-align: top;
}

.checker-stock-table th {
    white-space: nowrap;
}

.checker-action-cell {
    min-width: 320px;
}

.checker-action-cell .stock-confirm-form {
    min-width: 0;
    padding: 10px;
    border: 1px solid #d9e8f7;
    border-radius: 8px;
    background: #f8fbff;
}

.checker-action-cell .stock-confirm-form label {
    padding-bottom: 8px;
    border-bottom: 1px solid #e8eef5;
}

.checker-action-cell .stock-confirm-form label:last-of-type {
    border-bottom: 0;
}

.detail-list {
    display: grid;
    gap: 4px;
    color: #465760;
    font-size: 13px;
}

.stock-history-list {
    display: grid;
    gap: 14px;
}

.stock-history-card {
    border: 1px solid #d9e8f7;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.stock-history-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #e8eef5;
    background: #f5f9ff;
}

.stock-history-head strong,
.stock-history-head span,
.stock-history-status small {
    display: block;
}

.stock-history-head strong {
    color: #10233f;
    font-size: 16px;
}

.stock-history-head span,
.stock-history-status small {
    color: #5f7288;
    font-size: 13px;
}

.stock-history-status {
    text-align: right;
}

.stock-history-status span {
    color: #0f5fa8;
    font-weight: 700;
    text-transform: capitalize;
}

.stock-history-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 12px 14px;
}

.stock-history-meta span {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #edf3f8;
    border-radius: 8px;
    background: #fbfdff;
    color: #26384d;
    font-weight: 600;
}

.stock-history-meta small {
    display: block;
    margin-bottom: 3px;
    color: #71839a;
    font-weight: 500;
}

.stock-history-items {
    padding: 0 14px 12px;
    overflow: auto;
}

.stock-history-items table {
    margin: 0;
}

.stock-history-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 14px 14px;
}

.stock-history-actions form {
    margin: 0;
}

.hidden-autofill {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.nav-group.open .nav-submenu {
    display: grid;
    gap: 4px;
}

.nav-submenu a {
    padding: 8px 10px;
    color: #b9cbc5;
    font-size: 13px;
}

.nav-group-toggle:hover,
.nav-item:hover,
.nav-submenu a:hover,
.nav-submenu a.active,
.nav-item.active {
    background: rgba(255, 255, 255, .09);
    color: #ffffff;
}

.logout-link {
    margin-top: 8px;
}

.content {
    margin-left: 240px;
    padding: 24px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.topbar span {
    display: block;
    margin-top: 4px;
    color: #667782;
    font-size: 13px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.cards article,
.panel {
    background: white;
    border: 1px solid #dfe5e8;
    border-radius: 8px;
    padding: 18px;
}

.cards span {
    display: block;
    color: #667782;
    font-size: 13px;
    margin-bottom: 10px;
}

.cards strong {
    display: block;
    font-size: 24px;
}

.cards small {
    display: block;
    margin-top: 6px;
    color: #176b9f;
    font-size: 13px;
    font-weight: 700;
}

.dashboard-rank-table th:first-child,
.dashboard-rank-table td:first-child {
    width: 42px;
    text-align: center;
}

.dashboard-rank-table th.text-right,
.dashboard-rank-table td.text-right {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.rank-number {
    color: #537088;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.panel h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

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

.mutation-page.master-layout {
    grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
    gap: 12px;
}

.mutation-form {
    min-width: 0;
    padding: 14px;
}

.mutation-history {
    min-width: 0;
    padding: 14px;
}

.mutation-history table {
    min-width: 920px;
    font-size: 12px;
}

.mutation-history th,
.mutation-history td {
    padding: 8px 7px;
    vertical-align: top;
}

.mutation-history .detail-list {
    max-width: 180px;
    gap: 4px;
    font-size: 11px;
}

.mutation-history .table-actions {
    gap: 5px;
}

.mutation-history .table-actions .button,
.mutation-history .table-actions button {
    padding: 7px 8px;
    font-size: 11px;
}

.product-master-layout {
    grid-template-columns: 260px minmax(0, 1fr);
}

.product-master-form {
    max-width: 260px;
}

.product-field-grid label {
    margin-bottom: 10px;
}

.product-field-grid input,
.product-field-grid select,
.product-field-grid textarea {
    min-height: 38px;
    width: 100%;
}

.product-field-grid .form-image-preview {
    max-height: 84px;
}

.master-list-page,
.master-list-form-page {
    display: grid;
    gap: 16px;
}

.master-list-form-page .master-form,
.master-list-form-page .product-master-form {
    position: static;
    max-width: none;
}

.master-list-form-page .product-field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px 12px;
}

.master-list-form-page .master-form > label,
.master-list-form-page .master-form textarea,
.master-list-form-page .master-form input,
.master-list-form-page .master-form select {
    max-width: none;
}

.inline-edit-cell input,
.inline-edit-cell select,
.inline-edit-cell textarea {
    width: 100%;
    min-width: 110px;
    min-height: 34px;
    padding: 7px 8px;
    font-size: 12px;
}

.inline-edit-cell textarea {
    min-width: 180px;
    resize: vertical;
}

.inline-image-edit {
    display: grid;
    gap: 6px;
    min-width: 130px;
}

.inline-checkbox {
    margin: 0;
    min-width: 70px;
}

.row-number {
    width: 52px;
    text-align: center;
    color: #52616b;
    font-weight: 700;
}

.hidden-zero-opname {
    display: none;
}

.receivable-mode-tabs {
    margin: 0;
}

@media (max-width: 1280px) {
    .product-master-layout {
        grid-template-columns: 250px minmax(0, 1fr);
    }

    .product-master-form {
        max-width: 250px;
    }
}

@media (max-width: 720px) {
    .product-master-layout {
        grid-template-columns: 1fr;
    }

    .product-master-form {
        max-width: none;
    }

    .mutation-line {
        grid-template-columns: 1fr;
    }

    .mutation-line .remove-line {
        width: 100%;
    }
}

.stock-in-layout {
    grid-template-columns: 1fr;
}

.stock-in-layout .master-form {
    position: static;
}

.master-form {
    position: sticky;
    top: 24px;
}

.form-stack {
    display: grid;
    gap: 16px;
    align-self: start;
}

.form-stack .master-form {
    position: static;
}

.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.section-heading h2 {
    margin: 0;
}

.button.disabled,
.button[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: .55;
    filter: grayscale(.25);
    pointer-events: none;
}

.transfer-reference-field {
    grid-column: 1 / -1;
}

.pending-pos-box {
    display: grid;
    grid-template-columns: minmax(120px, auto) minmax(0, 1fr) auto auto;
    gap: 8px;
    grid-column: 1 / -1;
    align-items: center;
}

.pending-pos-box select {
    min-width: 0;
}

.receipt-copy-gap {
    height: 18px;
    border-top: 1px dashed #999;
    margin: 12px 0;
}

.master-table {
    overflow: auto;
}

body.expenses-page .master-layout {
    grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
    gap: 16px;
    margin-top: 18px;
}

body.expenses-page .form-stack,
body.expenses-page .master-form,
body.expenses-page .master-table {
    min-width: 0;
}

body.expenses-page .master-form {
    width: 100%;
}

body.expenses-page .form-stack .master-form,
body.expenses-page .form-stack .panel {
    overflow-x: auto;
}

body.expenses-page .master-table {
    max-width: 100%;
    overflow-x: auto;
}

body.expenses-page .master-table table {
    min-width: 780px;
}

body.expenses-page .form-stack table {
    min-width: 360px;
}

@media (max-width: 1220px) {
    body.expenses-page .master-layout {
        grid-template-columns: 1fr;
    }

    body.expenses-page .master-form {
        position: static;
    }
}

.master-table-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.master-table-head h2 {
    margin: 0 0 4px;
}

.master-table-head span {
    color: #667782;
    font-size: 13px;
}

.table-head-actions {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.inline-search {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin: 0;
}

.inline-search input {
    width: 260px;
    min-width: 220px;
    min-height: 36px;
}

.inline-search .button,
.inline-search button,
.table-head-actions .report-tabs a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.receivable-payable-head-actions {
    display: grid;
    grid-template-columns: minmax(260px, 360px) auto;
    align-items: center;
    justify-content: end;
    gap: 10px;
}

.receivable-payable-head-actions .inline-search {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto auto;
    align-items: center;
    gap: 8px;
}

.receivable-payable-head-actions .inline-search input {
    width: 100%;
    min-width: 0;
    height: 38px;
}

.receivable-payable-head-actions .inline-search button,
.receivable-payable-head-actions .inline-search .button,
.receivable-payable-head-actions .report-tabs a {
    height: 38px;
    min-height: 38px;
    padding: 0 14px;
    white-space: nowrap;
}

.receivable-payable-head-actions .report-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0;
}

@media (max-width: 980px) {
    .receivable-payable-head-actions {
        grid-template-columns: 1fr;
        justify-content: stretch;
        width: 100%;
    }

    .receivable-payable-head-actions .report-tabs {
        flex-wrap: wrap;
    }
}

.master-table-tools {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.master-search-bar {
    display: grid;
    grid-template-columns: minmax(220px, 340px) auto;
    gap: 8px;
    align-items: end;
}

.master-search-bar label {
    margin-bottom: 0;
}

.master-search-bar button,
.master-search-bar .button {
    min-height: 42px;
    white-space: nowrap;
}

.master-table-tools > .button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    min-width: 210px;
}

.table-actions form {
    margin: 0;
}

.table-password-input {
    width: 112px;
    min-height: 34px;
    padding: 7px 9px;
    border: 1px solid #cbd7e3;
    border-radius: 6px;
    font-size: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    border-bottom: 1px solid #edf1f3;
    padding: 10px;
    text-align: left;
    font-size: 14px;
}

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

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

.report-table th.text-right,
.report-table td.text-right {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

table th.text-right,
table td.text-right {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.master-table tr:target {
    outline: 2px solid #38bdf8;
    outline-offset: -2px;
    background: #e0f2fe;
}

.table-money-input {
    width: 150px;
    max-width: 100%;
    text-align: right;
}

.app-footer {
    position: fixed;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    z-index: 20;
    width: max-content;
    max-width: calc(100% - 32px);
    text-align: center;
    color: #60758a;
    font-size: 12px;
    font-weight: 600;
    pointer-events: none;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.clearable-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 6px;
    align-items: center;
}

.field-clear-button {
    height: 38px;
    min-width: 34px;
    padding: 0;
    border-radius: 6px;
    background: #e9f1f8;
    color: #38566f;
    font-size: 16px;
    line-height: 1;
}

.opname-qty-input {
    width: 92px;
    max-width: 100%;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.stock-opname-print-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 14px;
}

.stock-opname-print-meta span {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #d7e5f1;
    border-radius: 8px;
    background: #f6fbff;
}

.stock-opname-print-meta small {
    color: #60758a;
    font-size: 12px;
}

.stock-opname-print-meta strong {
    color: #10233f;
    font-size: 14px;
}

.stock-opname-print-sheet tfoot th {
    border-top: 2px solid #bfd4e6;
    background: #eef7ff;
    color: #10233f;
}

.stock-do-list-panel {
    width: 100%;
}

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

.stock-do-list-table td:first-child {
    color: #10233f;
    white-space: nowrap;
}

.stock-do-list-table .table-actions {
    min-width: 250px;
    align-items: center;
    flex-wrap: wrap;
}

.pos-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 18px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.product-grid button {
    min-height: 86px;
    background: white;
    color: #172026;
    border-color: #dfe5e8;
    text-align: left;
}

.product-grid span {
    display: block;
    margin-top: 8px;
    color: #176b55;
}

.cart {
    position: sticky;
    top: 24px;
}

.cart-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    border-bottom: 1px solid #edf1f3;
    padding: 10px 0;
}

.total {
    display: flex;
    justify-content: space-between;
    margin: 18px 0;
    font-size: 18px;
}

.pos-shell {
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(210, 222, 230, .98), rgba(226, 234, 238, .98) 52%, rgba(207, 220, 230, .98)),
        #dce6ec;
}

.pos-header {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 14px;
    align-items: center;
    padding: 10px 18px 10px 66px;
    background: rgba(234, 240, 244, .94);
    border-bottom: 1px solid #c7d4dd;
    box-shadow: 0 12px 28px rgba(31, 95, 142, .08);
    backdrop-filter: blur(10px);
}

.pos-brand a {
    display: block;
    color: #0d4f81;
    font-size: 20px;
    font-weight: 800;
}

.pos-brand span {
    display: block;
    margin-top: 4px;
    color: #667782;
    font-size: 13px;
}

.pos-transaction {
    display: grid;
    grid-template-columns: 145px minmax(150px, 190px) minmax(105px, 125px) minmax(170px, 1fr) minmax(140px, 180px) minmax(135px, 170px);
    gap: 8px;
    align-items: end;
}

.pos-transaction label,
.pos-search,
.pos-category-filter,
.discount-field {
    margin-bottom: 0;
    min-width: 0;
}

.pos-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 430px;
    gap: 16px;
    height: calc(100vh - 65px);
    padding: 16px;
}

.pre-order-workspace {
    height: min(760px, calc(100vh - 112px));
}

.pre-order-history {
    margin: 0 16px 24px;
    overflow: auto;
}

.pre-order-history h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.stock-adjustment-layout {
    grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
}

.stock-adjustment-current {
    display: grid;
    gap: 4px;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid #d9e8f7;
    border-radius: 8px;
    background: #f4f9ff;
}

.stock-adjustment-current span,
.stock-adjustment-current small {
    color: #536577;
    font-size: 12px;
}

.stock-adjustment-current strong {
    color: #0f5fa8;
    font-size: 22px;
}

.stock-adjustment-current.difference {
    background: #fbfcff;
}

.pos-products,
.pos-cart {
    min-height: 0;
    min-width: 0;
    background: rgba(231, 238, 243, .94);
    border: 1px solid #c2d0da;
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(21, 91, 136, .1);
    backdrop-filter: blur(8px);
}

.pos-products {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    align-content: stretch;
    overflow: hidden;
}

.pos-tools {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 12px;
    align-items: end;
    padding: 14px;
    border-bottom: 1px solid #cbd9e2;
    background: rgba(224, 232, 238, .86);
}

.category-tabs,
.payment-tabs {
    display: flex;
    gap: 8px;
}

.category-tabs {
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
}

.pos-header-categories {
    align-self: end;
    min-width: 0;
}

.pos-category-filter select {
    width: 100%;
}

.category-tabs button,
.payment-tabs button,
.ghost-button {
    width: auto;
    border-color: #c4d0d9;
    background: #edf2f5;
    color: #465760;
    white-space: nowrap;
}

.pos-header-categories button {
    min-height: 40px;
    padding: 8px 12px;
}

.category-tabs button.active,
.payment-tabs button.active {
    border-color: #1f78c8;
    background: #e7f3ff;
    color: #0f5fa8;
}

.pos-shell .product-grid {
    align-content: start;
    overflow: auto;
    padding: 8px;
    gap: 7px;
    border-bottom: 1px solid #cbd9e2;
    background: #dde7ed;
    grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
    grid-auto-rows: auto;
}

.pos-shell .product-grid button {
    display: grid;
    grid-template-rows: minmax(54px, 1fr) 22px 12px 15px;
    align-content: stretch;
    min-height: 0;
    height: auto;
    aspect-ratio: 1 / 1;
    gap: 2px;
    padding: 6px 6px 4px;
    overflow: hidden;
    border-color: #c5d3dc;
    background: linear-gradient(180deg, #f1f5f7, #e7eef2);
    box-shadow: 0 10px 20px rgba(29, 95, 140, .06);
}

.pos-shell .product-grid button:hover {
    border-color: #1f78c8;
}

.pos-shell .product-code {
    display: none !important;
}

.pos-shell .product-grid span {
    margin-top: 0;
}

.product-photo {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 58px;
    aspect-ratio: auto;
    object-fit: contain;
    border-radius: 7px;
    background: #ffffff;
}

.product-photo-empty {
    display: grid;
    place-items: center;
    color: #176b55;
    font-size: 34px;
    font-weight: 800;
}

.pos-shell .product-grid strong {
    display: -webkit-box;
    align-self: end;
    margin: 0;
    overflow: hidden;
    color: #10233f;
    font-size: 12px;
    line-height: 1.05;
    text-align: left;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.product-price {
    display: block;
    color: #0f5fa8;
    overflow: hidden;
    margin: 0;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
    white-space: nowrap;
}

.pos-shell .product-category {
    display: none !important;
}

.product-stock {
    display: block;
    overflow: hidden;
    margin: 0;
    color: #4d6678;
    font-size: 10px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-grid button.out-of-stock {
    opacity: 1;
}

.pos-shell .product-grid button.stock-normal {
    border-color: #a9d8c5;
    background: linear-gradient(180deg, #eef6f2, #dceee6);
}

.pos-shell .product-grid button.stock-normal .product-stock {
    color: #168457;
}

.pos-shell .product-grid button.stock-minimum {
    border-color: #ecd778;
    background: linear-gradient(180deg, #f5f1df, #f4e9b5);
}

.pos-shell .product-grid button.stock-minimum .product-stock {
    color: #a06b00;
}

.pos-shell .product-grid button.stock-empty {
    border-color: #f0a6a6;
    background: linear-gradient(180deg, #f4e7e7, #efd1d1);
}

.pos-shell .product-grid button.stock-empty strong,
.pos-shell .product-grid button.stock-empty .product-price {
    color: #9f1d1d;
}

.pos-shell .product-grid button.stock-empty .product-stock {
    color: #c62828;
}

body.pos-focus-mode .pos-shell {
    margin-left: 0;
}

body.pos-focus-mode .pos-header {
    grid-template-columns: 180px 1fr;
    padding-top: 8px;
    padding-bottom: 8px;
}

body.pos-focus-mode .pos-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 410px);
    gap: 12px;
    height: calc(100vh - 59px);
    padding: 12px;
}

body.pos-focus-mode .pos-products,
body.pos-focus-mode .pos-cart {
    border-radius: 7px;
}

body.pos-focus-mode .pos-shell .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 6px;
    padding: 7px;
}

body.pos-focus-mode .pos-shell .product-grid button {
    grid-template-rows: minmax(50px, 1fr) 22px 12px 15px;
    gap: 1px;
    padding: 5px;
    border-radius: 7px;
}

body.pos-focus-mode .product-photo {
    min-height: 50px;
    border-radius: 6px;
}

body.pos-focus-mode .product-photo-empty {
    font-size: 30px;
}

body.pos-focus-mode .pos-shell .product-grid strong {
    font-size: 11px;
    line-height: 1.05;
}

body.pos-focus-mode .product-stock {
    font-size: 9.5px;
}

body.pos-focus-mode .product-price {
    font-size: 11.5px;
}

body.pos-focus-mode .payment-box {
    gap: 8px;
}

body.pos-focus-mode .cart-items {
    max-height: calc(100vh - 265px);
}

@media (min-height: 900px) and (min-width: 1100px) {
    .pos-products {
        --pos-product-grid-height: 426px;
    }
}

@media (min-height: 1080px) and (min-width: 1280px) {
    .pos-products {
        --pos-product-grid-height: 436px;
    }
}

@media (min-height: 1260px) and (min-width: 1440px) {
    .pos-products {
        --pos-product-grid-height: 456px;
    }
}

@media (max-height: 820px) and (min-width: 900px) {
    .pos-products {
        --pos-product-grid-height: 330px;
    }

    .pos-header {
        padding: 8px 14px 8px 66px;
    }
}

@media (max-width: 1320px) and (min-width: 861px) {
    .pos-workspace {
        grid-template-columns: minmax(0, 1fr) 390px;
    }

    .payment-box {
        grid-template-columns: minmax(86px, .72fr) minmax(86px, .72fr) minmax(150px, 1fr);
    }

    .split-payment-box,
    .qris-preview {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1180px) and (min-width: 861px) {
    body.pos-focus-mode .pos-workspace {
        grid-template-columns: minmax(0, 1fr) minmax(330px, 370px);
    }

    body.pos-focus-mode .pos-shell .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    }
}

@media (orientation: landscape) and (min-width: 700px) and (max-height: 860px) {
    body.pos-focus-mode .pos-header {
        grid-template-columns: 170px 1fr;
        gap: 10px;
        padding-top: 7px;
        padding-bottom: 7px;
    }

    body.pos-focus-mode .pos-workspace {
        grid-template-columns: minmax(0, 1fr) minmax(340px, 390px);
        gap: 10px;
        height: calc(100vh - 55px);
        padding: 10px;
    }

    body.pos-focus-mode .pos-transaction {
        gap: 6px;
    }

    body.pos-focus-mode .pos-shell .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
        gap: 7px;
        padding: 7px;
    }

    body.pos-focus-mode .pos-shell .product-grid button {
        grid-template-rows: minmax(58px, 1fr) 28px 13px 17px;
        padding: 6px;
    }

    body.pos-focus-mode .product-photo {
        min-height: 58px;
    }

    body.pos-focus-mode .pos-shell .product-grid strong {
        font-size: 12px;
        line-height: 1.08;
        -webkit-line-clamp: 2;
    }

    body.pos-focus-mode .product-stock {
        font-size: 10px;
        line-height: 1.25;
    }

    body.pos-focus-mode .product-price {
        font-size: 12px;
        line-height: 1.25;
    }

    body.pos-focus-mode .cart-items {
        max-height: calc(100vh - 250px);
    }
}

body.android-pos-lite .pos-shell {
    background: #dfe8ee;
}

body.android-pos-lite .pos-products,
body.android-pos-lite .pos-cart,
body.android-pos-lite .payment-box {
    box-shadow: none;
}

body.android-pos-lite .pos-shell .product-grid {
    background: #dbe5eb;
    overscroll-behavior: contain;
}

body.android-pos-lite .pos-shell .product-grid button {
    contain: layout paint style;
    background: #edf4f7;
    box-shadow: none;
    transition: none;
}

body.android-pos-lite .pos-shell .product-grid button.stock-normal {
    background: #e5f2ec;
}

body.android-pos-lite .pos-shell .product-grid button.stock-minimum {
    background: #f3edc7;
}

body.android-pos-lite .pos-shell .product-grid button.stock-empty {
    background: #efdada;
}

body.android-pos-lite .product-photo {
    background: #fff;
    transform: translateZ(0);
}

body.android-pos-lite *,
body.android-pos-lite *::before,
body.android-pos-lite *::after {
    transition-duration: 0s !important;
    animation-duration: 0s !important;
}

.table-thumb {
    width: 54px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #dfe5e8;
    background: #f6f8f9;
}

.table-thumb.empty {
    display: grid;
    place-items: center;
    color: #738690;
}

.form-image-preview {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #dfe5e8;
}

.stock-hint {
    margin: -6px 0 14px;
    border-radius: 6px;
    padding: 10px 12px;
    background: #eef2f4;
    color: #465760;
    font-size: 13px;
}

.mutation-line .line-stock-hint {
    grid-column: 1 / -1;
    margin: 0;
}

.pos-cart {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}

.pos-cart-list {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-width: 0;
    min-height: 0;
    height: 100%;
    background: rgba(255, 255, 255, .92);
    overflow: hidden;
}

.cart-column-head {
    display: grid;
    grid-template-columns: minmax(118px, 1.1fr) minmax(88px, .72fr) minmax(98px, .9fr) 30px;
    gap: 0 9px;
    align-items: center;
    padding: 8px 23px 7px;
    border-bottom: 1px solid #d9e5ed;
    background: #f4f8fa;
    color: #536577;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.cart-column-head span:nth-child(3) {
    text-align: right;
}

.cart-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid #edf1f3;
    background: #ffffff;
}

.cart-head-payment {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #d3e0e8;
    border-radius: 8px;
    background: #edf3f6;
}

.cart-head span {
    display: block;
    color: #667782;
    font-size: 13px;
}

.cart-items {
    overflow: auto;
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 10px 14px 12px;
    min-height: 0;
    height: 100%;
    max-height: none;
}

.pos-shell .empty-cart {
    min-height: 72px;
}

.pos-shell .cart-row {
    display: grid;
    grid-template-columns: minmax(118px, 1.1fr) minmax(88px, .72fr) minmax(98px, .9fr) 30px;
    align-items: end;
    gap: 5px 9px;
    min-width: 0;
    padding: 7px 9px;
    border: 1px solid #dfe8ef;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 68, 112, .06);
}

.cart-product-name {
    grid-column: 1 / -1;
    min-width: 0;
    padding-bottom: 4px;
    border-bottom: 1px solid #edf2f5;
}

.cart-product-name strong {
    overflow-wrap: anywhere;
}

.cart-warehouse-name {
    margin-top: 2px;
    color: #0f5fa8;
    font-size: 10px;
    font-weight: 800;
}

.cart-note-input {
    width: 100%;
    min-height: 28px;
    margin-top: 5px;
    padding: 5px 7px;
    border: 1px solid #dbe7ee;
    border-radius: 6px;
    background: #f8fbfd;
    color: #172026;
    font-size: 11px;
    font-weight: 700;
}

.cart-note-input::placeholder {
    color: #8a9aa5;
    font-weight: 600;
}

.cart-row strong,
.cart-row small {
    display: block;
}

.cart-row small {
    margin-top: 3px;
    color: #667782;
}

.cart-price-field,
.cart-qty-field,
.cart-subtotal-field {
    margin: 0;
    font-size: 11px;
    color: #667782;
}

.cart-price-field input {
    min-height: 29px;
    padding: 5px 7px;
    font-weight: 800;
}

.cart-line-subtotal {
    text-align: right;
    color: #176b55;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.qty-control {
    display: grid;
    grid-template-columns: minmax(54px, 1fr);
    align-items: center;
    border: 1px solid #d7e0e4;
    border-radius: 6px;
    overflow: hidden;
}

.qty-control button,
.remove-item {
    width: 100%;
    min-height: 30px;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: #f6f8f9;
    color: #172026;
}

.qty-control span {
    text-align: center;
    font-weight: 700;
    font-size: 12px;
    color: #536577;
}

.cart-qty-input {
    min-height: 29px;
    border: 0;
    border-radius: 0;
    padding: 4px 8px;
    text-align: center;
    font-weight: 800;
}

.remove-item {
    border-radius: 6px;
    color: #a12828;
}

.payment-box {
    display: grid;
    grid-template-columns: minmax(92px, .72fr) minmax(92px, .72fr) minmax(172px, 1fr);
    grid-template-areas:
        "methods methods total"
        "methods methods discount"
        "methods methods shipping"
        "methods methods paid"
        "methods methods quick"
        "pay pay change"
        "shift shift shift"
        "split split split"
        "qris qris qris";
    gap: 7px 9px;
    align-items: stretch;
    min-width: 0;
    padding: 10px;
    border-top: 1px solid #cbd9e2;
    background: linear-gradient(180deg, #fbfcfc, #eef5f8);
}

.payment-box > * {
    min-width: 0;
}

.payment-box [hidden] {
    display: none !important;
}

.payment-box .subtotal-row {
    display: none;
}

.payment-box label {
    display: grid;
    gap: 4px;
    align-content: end;
    min-height: 36px;
    color: #465760;
    font-size: 12px;
    font-weight: 800;
}

.payment-box input {
    min-height: 32px;
    padding: 6px 8px;
    font-weight: 800;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    min-height: 36px;
    padding: 8px 10px;
    border: 1px solid #dbe7ee;
    border-radius: 7px;
    background: #ffffff;
    color: #465760;
}

.payment-box > .summary-row,
.payment-box > label,
.payment-box > .payment-tabs,
.payment-box > .split-payment-box,
.payment-box > .qris-preview,
.payment-box > .pay-button,
.payment-box > .pos-shift-close {
    margin: 0;
}

.summary-row.total {
    grid-area: total;
    margin: 0;
    color: #172026;
    font-size: 17px;
    font-weight: 800;
}

.summary-row.total strong {
    color: #176b55;
}

.payment-tabs {
    grid-area: methods;
    margin-bottom: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 48px;
    gap: 6px;
}

.payment-tabs button {
    flex: 1;
    min-height: 0;
    padding: 6px 7px;
    overflow: hidden;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-overflow: ellipsis;
}

@media (min-width: 861px) {
    .payment-box .payment-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .payment-box .payment-tabs button {
        min-height: 34px;
        padding: 5px 6px;
        font-size: 12px;
    }
}

.payment-tabs button[data-payment="cash"] {
    order: 1;
}

.payment-tabs button[data-payment="qris"] {
    order: 2;
}

.payment-tabs button[data-payment="transfer"] {
    order: 3;
}

.payment-tabs button[data-payment="hutang"] {
    order: 4;
}

.payment-tabs button[data-payment="split"] {
    grid-column: 1 / -1;
    order: 5;
}

.pre-order-status-tabs button[data-payment="hutang"] {
    order: 1;
}

.pre-order-status-tabs button[data-payment="cash"] {
    order: 2;
}

.pre-order-status-tabs button[data-payment="transfer"] {
    order: 3;
}

.pre-order-status-tabs button[data-payment="qris"] {
    order: 4;
}

.payment-box .discount-field {
    grid-area: discount;
}

.payment-box .shipping-field {
    grid-area: shipping;
}

.payment-box #cashPaidField {
    grid-area: paid;
}

.quick-paid-options {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    grid-area: quick;
    align-items: center;
    min-height: 32px;
}

.quick-paid-options[hidden] {
    display: none !important;
}

.quick-paid-options button {
    min-width: 0;
    min-height: 28px;
    padding: 4px 5px;
    border-color: #bfd7e8;
    background: #ffffff;
    color: #17456d;
    box-shadow: none;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.quick-paid-options button.active,
.quick-paid-options button:hover {
    border-color: #0f5fa8;
    background: #e5f3ff;
    color: #0b4c88;
}

.payment-box .change-row {
    grid-area: change;
}

.payment-box .pay-button {
    grid-area: pay;
}

.pos-shift-close {
    grid-area: shift;
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 8px;
    border: 1px solid #e1d4d4;
    border-radius: 8px;
    background: #fff7f7;
}

.pos-shift-close-info {
    display: grid;
    gap: 2px;
}

.pos-shift-close-info strong {
    color: #8f1f1f;
    font-size: 12px;
}

.pos-shift-close-info span {
    color: #6c5960;
    font-size: 11px;
    line-height: 1.25;
}

.pos-shift-close input {
    min-height: 32px;
}

.pos-shift-close button {
    min-height: 32px;
    padding: 6px 10px;
    white-space: nowrap;
}

.pos-shift-close .button {
    min-height: 32px;
    padding: 7px 10px;
    white-space: nowrap;
}

.split-payment-box {
    display: grid;
    gap: 8px;
    grid-area: split;
    margin: 0;
    padding: 9px;
    border: 1px solid #d7e5f1;
    border-radius: 8px;
    background: #f4f9ff;
}

.split-payment-box[hidden] {
    display: none;
}

.split-title {
    color: #173d66;
    font-size: 12px;
    font-weight: 800;
}

.split-options {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 5px;
}

.split-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    margin: 0;
    min-height: 28px;
    padding: 5px 8px;
    border: 1px solid #cfe1ef;
    border-radius: 6px;
    background: #ffffff;
    font-size: 11px;
}

.split-options input {
    width: auto;
    min-height: 0;
    height: auto;
    padding: 0;
}

.split-payment-fields {
    display: grid;
    gap: 8px;
}

.split-payment-field {
    margin: 0;
}

.split-payment-field > span {
    font-weight: 800;
}

.split-transfer-name {
    margin-top: 6px;
}

.qris-preview {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
    align-items: center;
    grid-area: qris;
    margin: 0;
    padding: 10px;
    border: 1px dashed #9eb3bb;
    border-radius: 8px;
    background: #ffffff;
    color: #465760;
    font-size: 13px;
}

.qris-preview[hidden] {
    display: none;
}

.qris-box {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    border: 2px solid #172026;
    color: #172026;
    font-size: 13px;
    font-weight: 800;
}

.pre-order-note {
    display: grid;
    gap: 4px;
    grid-column: 1 / -1;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #b9d5ef;
    border-radius: 8px;
    background: #eef7ff;
    color: #173d66;
}

.pre-order-note strong {
    font-size: 13px;
}

.pre-order-note span {
    color: #536577;
    font-size: 12px;
    line-height: 1.4;
}

.pay-button {
    min-height: 48px;
    margin-top: 0;
    font-size: 16px;
}

.receipt-print-area {
    display: none;
}

.receipt-paper {
    color: #000;
    font-family: "Courier New", monospace;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
}

.receipt-paper table {
    width: 100%;
    border-collapse: collapse;
}

.receipt-paper td {
    padding: 1px 0;
    vertical-align: top;
    font-weight: 800;
}

.receipt-paper span {
    display: block;
}

.receipt-paper em {
    display: block;
    margin-top: 1px;
    font-style: normal;
    font-size: 11px;
    font-weight: 800;
}

.receipt-brand-row {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 6px;
    align-items: start;
    text-align: left;
}

.receipt-brand-row.no-logo {
    grid-template-columns: 1fr;
    text-align: center;
}

.receipt-brand-row img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.receipt-brand-row strong {
    display: block;
    font-size: 13px;
    font-weight: 900;
}

.receipt-center {
    text-align: center;
}

.receipt-reprint {
    margin: 4px 0;
    padding: 3px 0;
    border-top: 1px dashed #000;
    border-bottom: 1px dashed #000;
    font-size: 14px;
    font-weight: 900;
    text-align: center;
}

.receipt-line {
    margin: 6px 0;
    border-top: 1px dashed #000;
}

.receipt-paper .right {
    text-align: right;
    font-weight: 900;
}

.receipt-paper .receipt-money {
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
}

.receipt-paper .receipt-total-row td {
    padding-top: 3px;
    font-size: 14px;
    font-weight: 900;
}

.receipt-qris,
.receipt-debt {
    margin-top: 8px;
    font-weight: 800;
}

.empty-cart,
.empty-state {
    display: grid;
    place-items: center;
    min-height: 140px;
    color: #738690;
    text-align: center;
}

@media (max-width: 1100px) {
    .mutation-page.master-layout {
        grid-template-columns: 1fr;
    }

    .mutation-form {
        position: static;
    }

    .trade-header-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media print {
    @page cashier-report {
        margin: 0;
    }

    @page {
        margin: 0;
    }

    body.printing-receipt *,
    body:has(#receiptPrintArea) * {
        visibility: hidden !important;
    }

    body.printing-receipt #receiptPrintArea,
    body.printing-receipt #receiptPrintArea *,
    #receiptPrintArea,
    #receiptPrintArea * {
        visibility: visible !important;
    }

    body.printing-receipt #receiptPrintArea,
    #receiptPrintArea {
        display: block !important;
        position: absolute;
        inset: 0 auto auto 0;
        box-sizing: border-box;
        width: 76mm;
        max-width: 100%;
        padding: 1.5mm 2mm;
        background: #fff;
        overflow: hidden;
    }

    #receiptPrintArea.receipt-58 {
        width: 54mm;
        padding: 1.5mm;
    }

    #receiptPrintArea.receipt-58 .receipt-paper {
        font-size: 11px;
    }

    #receiptPrintArea.receipt-58 .receipt-paper .receipt-money {
        font-size: 12px;
    }

    #receiptPrintArea.receipt-58 .receipt-paper .receipt-total-row td {
        font-size: 13px;
    }

    #receiptPrintArea.receipt-80 {
        width: 76mm;
        padding: 1.5mm 2mm;
    }

    #receiptPrintArea .receipt-copy-gap {
        display: none !important;
    }
}

@media (max-width: 860px) {
    .sidebar {
        position: static;
        width: auto;
    }

    .content {
        margin-left: 0;
    }

    .cards,
    .pos-layout,
    .master-layout {
        grid-template-columns: 1fr;
    }

    .master-form {
        position: static;
    }

    .pos-header,
    .pos-transaction,
    .pos-workspace,
    .pos-tools {
        grid-template-columns: 1fr;
    }

    .pos-workspace {
        height: auto;
    }

    .pos-shell .cart-row {
        grid-template-columns: minmax(92px, 1fr) minmax(64px, .7fr) minmax(82px, .9fr) 28px;
        align-items: stretch;
    }

    .cart-column-head {
        grid-template-columns: minmax(92px, 1fr) minmax(64px, .7fr) minmax(82px, .9fr) 28px;
        padding-left: 23px;
        padding-right: 23px;
    }

    .cart-line-subtotal {
        text-align: right;
    }

    .remove-item {
        justify-self: stretch;
        min-height: 36px;
    }

    .trade-line-wide {
        grid-template-columns: 1fr;
    }

    .stock-in-line,
    .stock-in-summary,
    .stock-in-header-grid {
        grid-template-columns: 1fr;
    }

    .stock-history-head,
    .stock-history-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .stock-history-status {
        text-align: left;
    }

    .stock-history-meta {
        grid-template-columns: 1fr;
    }

    .trade-header-grid,
    .trade-items-head,
    .trade-footer {
        display: grid;
        grid-template-columns: 1fr;
    }

    .trade-footer .summary-row {
        min-width: 0;
    }

    .master-table-head,
    .master-search-bar {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
    }
}

/* Modern application shell */
body {
    background: #f3f6f8;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

input,
select,
textarea {
    background: #ffffff;
    border-color: #d8e1e6;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #176b55;
    box-shadow: 0 0 0 3px rgba(23, 107, 85, .12);
    outline: 0;
}

.login-page {
    background:
        radial-gradient(circle at top left, rgba(23, 107, 85, .16), transparent 28rem),
        linear-gradient(135deg, #f6faf9, #e8eef2);
}

.login-box {
    border-color: #dde6eb;
    padding: 30px;
    box-shadow: 0 24px 60px rgba(23, 32, 38, .12);
}

.sidebar {
    width: 264px;
    background: #10231f;
    padding: 20px 16px;
    box-shadow: 10px 0 30px rgba(16, 35, 31, .12);
    transition: transform .22s ease;
    z-index: 40;
}

.sidebar nav {
    gap: 6px;
    margin-top: 22px;
}

.sidebar a {
    font-size: 14px;
    font-weight: 650;
}

.sidebar a.active {
    background: rgba(255, 255, 255, .1);
    color: #ffffff;
}

.content {
    margin-left: 264px;
    padding: 26px;
    transition: margin-left .22s ease;
}

.pos-shell {
    margin-left: 264px;
    transition: margin-left .22s ease;
}

.sidebar-toggle {
    position: fixed;
    top: 16px;
    left: 280px;
    right: auto;
    z-index: 60;
    display: inline-grid;
    gap: 4px;
    width: 42px;
    height: 42px;
    border: 1px solid #dce4e8;
    border-radius: 8px;
    padding: 10px;
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(23, 32, 38, .12);
    transition: right .22s ease, left .22s ease;
}

.sidebar-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 99px;
    background: #172026;
}

.sidebar-backdrop {
    display: none;
}

body.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
}

body.sidebar-collapsed .content,
body.sidebar-collapsed .pos-shell {
    margin-left: 0;
}

body.sidebar-collapsed .sidebar-toggle {
    left: 16px;
    right: auto;
}

.topbar {
    border-bottom: 1px solid #dde6eb;
    padding-bottom: 18px;
}

.topbar strong {
    font-size: 24px;
}

.cards article,
.panel {
    border-color: #dde6eb;
    box-shadow: 0 12px 28px rgba(23, 32, 38, .04);
}

th {
    color: #667782;
    font-size: 12px;
    letter-spacing: .02em;
}

.brand-block {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 12px;
    align-items: center;
}

.brand-block img,
.brand-initial {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #eaf5f1;
    color: #176b55;
    object-fit: cover;
    font-size: 20px;
    font-weight: 800;
}

.brand-block strong {
    display: block;
    color: #ffffff;
    font-size: 17px;
    line-height: 1.2;
}

.brand-block small {
    display: block;
    margin-top: 3px;
    color: #9fb2ab;
    font-size: 12px;
    line-height: 1.25;
}

.login-box .brand-block {
    margin-bottom: 16px;
    align-items: start;
}

.login-box .brand-block img,
.login-box .brand-block .brand-initial {
    margin-top: -3px;
}

.login-box .brand-block strong {
    color: #172026;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.12;
}

.login-box .brand-block small {
    color: #667782;
    font-size: 13px;
}

.settings-layout {
    display: grid;
    grid-template-columns: minmax(320px, 520px) minmax(260px, 1fr);
    gap: 18px;
    align-items: start;
}

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

.form-hint {
    margin: -4px 0 14px;
    color: #667782;
    font-size: 13px;
    line-height: 1.45;
}

.stock-status-preview {
    display: grid;
    gap: 10px;
}

.stock-status-demo {
    display: block;
    padding: 12px 14px;
    border: 1px solid;
    border-radius: 8px;
    font-weight: 800;
}

.stock-status-demo.stock-normal {
    border-color: #a9d8c5;
    background: #eefaf5;
    color: #168457;
}

.stock-status-demo.stock-minimum {
    border-color: #ecd778;
    background: #fff7cf;
    color: #a06b00;
}

.stock-status-demo.stock-empty {
    border-color: #f0a6a6;
    background: #ffecec;
    color: #c62828;
}

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

.dashboard-grid-wide-left {
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr);
    margin-bottom: 18px;
}

.dashboard-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 18px;
}

.panel-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.panel-title-row h2 {
    margin: 0;
}

.dashboard-stock-filter {
    min-width: 190px;
}

.dashboard-stock-filter select {
    min-height: 38px;
}

.report-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    margin-bottom: 14px;
}

.report-filter label {
    flex: 0 1 190px;
    margin-bottom: 0;
}

.report-filter label:nth-of-type(1),
.report-filter label:nth-of-type(2) {
    flex-basis: 150px;
}

.report-filter label:nth-of-type(3) {
    flex-basis: 220px;
}

.report-filter label:has(select[name="profit_mode"]) {
    flex-basis: 240px;
}

.report-filter label:has(input[name="product_id"]) {
    flex-basis: 280px;
}

.report-filter button,
.report-filter .button {
    width: auto;
    flex: 0 0 auto;
    min-height: 36px;
    padding: 8px 12px;
    white-space: nowrap;
    font-size: 13px;
}

.table-subtitle {
    margin: -4px 0 12px;
    color: #647887;
    font-size: 13px;
    font-weight: 700;
}

.report-print-button {
    width: auto;
    min-height: 36px;
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
}

.report-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.report-tabs a {
    border: 1px solid #d8e1e6;
    border-radius: 8px;
    padding: 10px 12px;
    background: #ffffff;
    color: #465760;
    font-size: 13px;
    font-weight: 700;
}

.report-tabs a.active,
.report-tabs a:hover {
    border-color: #176b55;
    background: #eaf5f1;
    color: #176b55;
}

.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 10px;
    margin: 0 0 14px;
}

.report-summary-grid article {
    border: 1px solid #dbe6ec;
    border-radius: 8px;
    padding: 12px;
    background: #f6fafc;
}

.report-summary-grid span {
    display: block;
    margin-bottom: 6px;
    color: #607383;
    font-size: 12px;
    font-weight: 700;
}

.report-summary-grid strong {
    color: #12304a;
    font-size: 17px;
}

.receivable-summary {
    margin-top: 12px;
    margin-bottom: 18px;
}

.receivable-summary article {
    min-height: 82px;
    padding: 14px 16px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
    border-color: #d6e8f7;
}

.receivable-summary span {
    margin-bottom: 10px;
    line-height: 1.25;
}

.receivable-summary strong {
    display: block;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0;
    word-break: keep-all;
}

.report-detail-panel {
    margin-top: 18px;
}

.report-section-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.report-section-title h3 {
    margin: 0 0 4px;
}

.compact-summary {
    grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.inline-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: wrap;
}

.nav-separator {
    display: block;
    height: 1px;
    margin: 8px 10px;
    background: rgba(226, 238, 249, .2);
}

.qty-short-input {
    max-width: 110px;
}

.cashier-shift-panel {
    margin-bottom: 18px;
}

.cashier-shift-form,
.cashier-shift-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: 12px;
    align-items: end;
}

.cashier-shift-form label {
    margin: 0;
}

.cashier-shift-bar {
    grid-template-columns: minmax(240px, 1fr) auto;
    margin-bottom: 12px;
}

.cashier-shift-bar div {
    display: grid;
    gap: 4px;
}

.cashier-shift-bar span {
    color: #607383;
    font-size: 13px;
}

.cashier-shift-bar form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.panel h3 {
    margin: 18px 0 8px;
    font-size: 15px;
}

details pre {
    max-width: 420px;
    max-height: 180px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    background: #f6f8f9;
    border: 1px solid #dfe5e8;
    border-radius: 6px;
    padding: 10px;
}

.company-preview .brand-block {
    margin-bottom: 18px;
    border-radius: 8px;
    padding: 16px;
    background: #10231f;
}

.company-detail {
    display: grid;
    gap: 8px;
    color: #465760;
}

.company-detail strong {
    color: #172026;
    font-size: 20px;
}

@media (max-width: 860px) {
    .content {
        margin-left: 0;
    }

    .sidebar {
        position: fixed;
        width: min(286px, 88vw);
        transform: translateX(0);
    }

    .pos-shell {
        margin-left: 0;
    }

    .sidebar-toggle {
        left: 16px;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 35;
        background: rgba(16, 35, 31, .36);
    }

    body:not(.sidebar-collapsed) .sidebar-backdrop {
        display: block;
    }

    body.sidebar-collapsed .sidebar {
        transform: translateX(-100%);
    }

    .settings-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid-wide-left,
    .dashboard-grid-three {
        grid-template-columns: 1fr;
    }

    .panel-title-row {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-stock-filter {
        min-width: 0;
    }

    .report-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .report-filter label,
    .report-filter label:nth-of-type(1),
    .report-filter label:nth-of-type(2),
    .report-filter label:nth-of-type(3),
    .report-filter label:has(select[name="profit_mode"]),
    .report-filter label:has(input[name="product_id"]) {
        flex-basis: auto;
        width: 100%;
    }

    .report-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quick-paid-options {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .cashier-shift-form,
    .cashier-shift-bar,
    .cashier-shift-bar form {
        grid-template-columns: 1fr;
        display: grid;
        width: 100%;
    }

    .pos-shift-close {
        grid-template-columns: 1fr;
    }

    .pending-pos-box {
        grid-template-columns: 1fr 1fr;
    }

    .pending-pos-box select {
        grid-column: 1 / -1;
    }
}

/* Modern blue theme */
body {
    background: linear-gradient(135deg, #eef7ff 0%, #f7fbff 42%, #eef3f8 100%);
    color: #10233f;
}

button,
.button {
    border-color: #0f5fa8;
    background: #0f5fa8;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 95, 168, .14);
}

button:hover,
.button:hover {
    border-color: #0b4c88;
    background: #0b4c88;
}

button.danger,
button.danger:hover {
    border-color: #b93232;
    background: #b93232;
}

.button.secondary,
.category-tabs button,
.payment-tabs button,
.ghost-button {
    border-color: #c8d8e8;
    background: #ffffff;
    color: #1d3557;
    box-shadow: none;
}

input,
select,
textarea {
    border-color: #c8d8e8;
    color: #10233f;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #1f78c8;
    box-shadow: 0 0 0 3px rgba(31, 120, 200, .14);
}

.login-page {
    background: linear-gradient(135deg, #dff1ff 0%, #f7fbff 48%, #e8eef7 100%);
    align-items: start;
    padding-top: clamp(34px, 8vh, 72px);
}

.login-box,
.cards article,
.panel {
    border-color: #d7e5f1;
    box-shadow: 0 16px 34px rgba(16, 35, 63, .07);
}

.sidebar {
    background: linear-gradient(180deg, #082f57 0%, #061f3f 100%);
    box-shadow: 10px 0 30px rgba(6, 31, 63, .16);
}

.sidebar a,
.nav-item,
.nav-group-toggle {
    color: #d8ebff;
}

.nav-section,
.brand-block small {
    color: #8bb7df;
}

.sidebar a:hover,
.nav-group-toggle:hover,
.nav-item:hover,
.nav-submenu a:hover,
.nav-submenu a.active,
.nav-item.active,
.sidebar a.active {
    background: rgba(125, 189, 248, .18);
    color: #ffffff;
}

.nav-submenu {
    border-left-color: rgba(177, 214, 247, .22);
}

.nav-submenu a {
    color: #b7d5f2;
}

.brand-initial,
.brand-block img {
    background: #dff1ff;
    color: #0f5fa8;
}

.content,
.pos-shell {
    transition: margin-left .22s ease;
}

.sidebar-toggle {
    top: 18px;
    border-color: #b9d5ef;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(8, 47, 87, .16);
}

.sidebar-toggle:hover {
    border-color: #87bde9;
    background: #eef7ff;
}

.sidebar-toggle span {
    background: #082f57;
}

.topbar {
    min-height: 58px;
    padding-left: 62px;
    border-bottom-color: #cfe0ef;
}

.topbar strong {
    color: #082f57;
}

.topbar span,
.cards span,
label {
    color: #5f7288;
}

.pos-brand a {
    color: #082f57;
}

.pos-links a,
.product-photo-empty,
.product-price {
    color: #0f5fa8;
}

.cards strong,
.company-detail strong,
.summary-row.total strong,
.product-grid span {
    color: #0f5fa8;
}

.report-tabs a {
    border-color: #c8d8e8;
    color: #1d3557;
}

.report-tabs a.active,
.report-tabs a:hover,
.category-tabs button.active,
.payment-tabs button.active {
    border-color: #1f78c8;
    background: #e6f3ff;
    color: #0f5fa8;
}

.pos-shell .product-grid button:hover,
.product-grid button:hover {
    border-color: #1f78c8;
    background: #f4faff;
}

table {
    border-collapse: separate;
    border-spacing: 0;
}

thead th {
    background: #e8f2fb;
    color: #15395f;
    letter-spacing: 0;
    border-bottom: 1px solid #cfe0ef;
}

tbody tr:nth-child(odd) {
    background: #ffffff;
}

tbody tr:nth-child(even) {
    background: #f2f4f7;
}

tbody tr:hover {
    background: #e8f3ff;
}

th,
td {
    border-bottom-color: #dbe6ee;
}

.notice.success {
    background: #e6f3ff;
    color: #0f5fa8;
}

details pre {
    background: #f4f7fb;
    border-color: #d7e5f1;
}

.activity-log-table table {
    min-width: 1060px;
}

.activity-log-table .ip-column {
    min-width: 138px;
    white-space: nowrap;
    font-family: Consolas, "Courier New", monospace;
    color: #0f5fa8;
}

.activity-log-table .log-note {
    min-width: 240px;
    max-width: 420px;
    white-space: normal;
    word-break: break-word;
}

.activity-log-table details {
    min-width: 120px;
}

.activity-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid #d8e2ea;
    background: #eef4f8;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    text-transform: capitalize;
    white-space: nowrap;
}

.activity-badge-info {
    border-color: #bae6fd;
    background: #e0f2fe;
    color: #075985;
}

.activity-badge-create {
    border-color: #bbf7d0;
    background: #dcfce7;
    color: #166534;
}

.activity-badge-delete {
    border-color: #fecaca;
    background: #fee2e2;
    color: #991b1b;
}

.activity-badge-warning {
    border-color: #fed7aa;
    background: #ffedd5;
    color: #9a3412;
}

.company-preview .brand-block {
    background: #082f57;
}

.cashier-report-filter {
    display: grid;
    grid-template-columns: minmax(170px, 220px) minmax(130px, 150px) minmax(170px, 230px) minmax(160px, 185px) minmax(160px, 185px);
    gap: 12px;
    align-items: end;
    margin-bottom: 18px;
}

.cashier-report-filter .form-actions {
    grid-column: 1 / -1;
    margin: 0;
}

.cashier-report-header {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.cashier-report-brand {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.cashier-report-brand img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.cashier-report-brand strong {
    display: block;
    color: #0f4f88;
    font-size: 20px;
}

.cashier-report-brand span {
    display: block;
    color: #536577;
    line-height: 1.45;
}

.cashier-report-header h1 {
    margin: 0;
    color: #173d66;
    font-size: 24px;
}

.cashier-report-meta td {
    padding: 5px 0;
    border-bottom: 0;
}

.cashier-report-meta td:first-child {
    width: 92px;
    color: #667782;
}

.cashier-report-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.cashier-report-cards article {
    padding: 12px;
    border: 1px solid #d7e5ef;
    border-radius: 8px;
    background: #f5faff;
}

.cashier-report-cards span,
.cashier-report-cards small {
    display: block;
    color: #607282;
    font-size: 12px;
}

.cashier-report-cards strong {
    display: block;
    margin: 4px 0;
    color: #0f5fa8;
    font-size: 18px;
}

.cashier-report-summary {
    max-width: 620px;
    margin-bottom: 18px;
}

.cashier-report-summary td {
    padding: 7px 8px;
}

.cashier-report-shift-summary {
    border-collapse: collapse;
}

.cashier-report-shift-summary .shift-start-row td {
    padding-top: 10px;
    padding-bottom: 12px;
    color: #172026;
    font-weight: 800;
}

.cashier-report-shift-summary .cashier-report-section th {
    padding: 12px 8px 5px;
    border-bottom: 0;
    color: #4d5f6a;
    font-size: 12px;
    font-weight: 900;
    text-align: left;
    text-transform: uppercase;
}

.cashier-report-shift-summary tr:not(.cashier-report-section) td:first-child {
    padding-left: 22px;
    color: #536577;
}

.cashier-report-shift-summary tr:not(.cashier-report-section):not(.shift-start-row) td {
    border-bottom: 1px solid #edf2f5;
}

.cashier-report-detail small {
    display: block;
    color: #728491;
    font-size: 11px;
}

.print-page {
    background: #e8eef4;
}

.print-shell {
    min-height: 100vh;
    padding: 14px;
}

.cashier-report-paper {
    margin: 0 auto;
    background: #fff;
    color: #111;
    box-shadow: 0 14px 34px rgba(15, 50, 90, .14);
}

.cashier-report-paper.paper-58 {
    box-sizing: border-box;
    width: 58mm;
    padding: 2mm;
    font-size: 8px;
}

.cashier-report-paper.paper-80 {
    box-sizing: border-box;
    width: 80mm;
    padding: 2.5mm;
    font-size: 8.5px;
}

.cashier-report-paper.paper-a4 {
    box-sizing: border-box;
    width: 210mm;
    min-height: 297mm;
    padding: 7mm;
    font-size: 8.5px;
}

.cashier-report-paper.paper-f4 {
    box-sizing: border-box;
    width: 210mm;
    min-height: 330mm;
    padding: 7mm;
    font-size: 8.5px;
}

.cashier-report-print-mode .cashier-report-brand {
    gap: 6px;
}

.cashier-report-print-mode .cashier-report-brand img {
    width: 26px;
    height: 26px;
}

.cashier-report-print-mode .cashier-report-brand strong {
    font-size: 11px;
    line-height: 1.1;
}

.cashier-report-print-mode .cashier-report-brand span {
    font-size: 8px;
    line-height: 1.08;
}

.cashier-report-print-mode .cashier-report-header {
    gap: 3px;
    margin-bottom: 4px;
}

.cashier-report-global-mode .cashier-report-header {
    gap: 3px;
    margin-bottom: 4px;
}

.cashier-report-global-mode .cashier-report-brand {
    align-items: center;
}

.cashier-report-global-mode .cashier-report-brand img {
    width: 25px;
    height: 25px;
}

.cashier-report-global-mode .cashier-report-brand strong {
    font-size: 11px;
    line-height: 1.15;
}

.cashier-report-global-mode .cashier-report-brand span {
    font-size: 8px;
    line-height: 1.1;
}

.cashier-report-print-mode .cashier-report-header h1 {
    border-top: 1px dashed #999;
    border-bottom: 1px dashed #999;
    padding: 2px 0;
    text-align: center;
    font-size: 11px;
    line-height: 1.1;
}

.cashier-report-global-mode .cashier-report-header h1 {
    padding: 3px 0;
    font-size: 11px;
    line-height: 1.1;
}

.cashier-report-print-mode .cashier-report-meta,
.cashier-report-print-mode .cashier-report-summary,
.cashier-report-print-mode .cashier-report-detail {
    font-size: inherit;
}

.cashier-report-print-mode .cashier-report-meta td,
.cashier-report-print-mode .cashier-report-summary td,
.cashier-report-print-mode .cashier-report-summary th,
.cashier-report-print-mode .cashier-report-detail th,
.cashier-report-print-mode .cashier-report-detail td {
    padding: .5px 1px;
    line-height: 1;
}

.cashier-report-global-mode .cashier-report-meta {
    line-height: 1.1;
}

.cashier-report-global-mode .cashier-report-meta td,
.cashier-report-global-mode .cashier-report-summary td,
.cashier-report-global-mode .cashier-report-summary th {
    padding: .5px 1px;
}

.cashier-report-global-mode .cashier-report-meta td:first-child {
    width: 42px;
}

.cashier-report-global-mode .cashier-report-print-time {
    display: none;
}

.cashier-report-print-mode .cashier-report-shift-summary .cashier-report-section th {
    padding-top: 3px;
    padding-bottom: 0;
    font-size: inherit;
    line-height: 1.05;
}

.cashier-report-global-mode .cashier-report-shift-summary .cashier-report-section th {
    padding-top: 3px;
    padding-bottom: 0;
    line-height: 1.05;
}

.cashier-report-global-mode .cashier-report-shift-summary .shift-start-row td {
    padding-top: 2px;
    padding-bottom: 3px;
}

.cashier-report-global-mode .cashier-report-summary {
    margin-bottom: 4px;
    line-height: 1.1;
}

.cashier-report-print-mode .cashier-report-shift-summary tr:not(.cashier-report-section) td:first-child {
    padding-left: 10px;
}

.cashier-report-print-mode .cashier-report-cards {
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.cashier-report-detail-mode .cashier-report-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.cashier-report-summary .right,
.cashier-report-detail .right,
.cashier-report-summary th.right,
.cashier-report-detail th.right,
.cashier-report-summary td.right,
.cashier-report-detail td.right {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.cashier-report-print-mode .cashier-report-cards article {
    border-radius: 0;
    padding: 5px;
    background: #fff;
}

.cashier-report-print-mode .cashier-report-cards strong {
    font-size: 11px;
}

.cashier-report-print-mode h2 {
    margin: 4px 0 2px;
    font-size: 11px;
    line-height: 1.1;
}

.cashier-report-detail-mode h2 {
    margin-top: 5px;
    font-size: 11px;
    color: #173d66;
}

.cashier-report-detail-mode .cashier-report-detail th,
.cashier-report-detail-mode .cashier-report-detail td {
    padding: .5px 2px;
    font-size: 8px;
    line-height: 1;
}

.cashier-report-detail-mode .cashier-report-summary {
    max-width: 100%;
    margin-bottom: 4px;
}

.cashier-report-print-mode .print-toolbar {
    position: fixed;
    right: 12px;
    bottom: 12px;
    display: flex;
    gap: 8px;
}

.cashier-report-print-mode .print-toolbar a,
.cashier-report-print-mode .print-toolbar button {
    border: 0;
    border-radius: 6px;
    padding: 8px 10px;
    background: #0f4f88;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

@media print {
    @page {
        margin: 0;
    }

    body.print-page {
        background: #fff;
    }

    .print-shell {
        padding: 0;
    }

    .cashier-report-paper {
        box-shadow: none;
    }

    .cashier-report-print-mode .print-toolbar {
        display: none;
    }

    body.print-page * {
        visibility: visible !important;
    }

    body.print-page .cashier-report-paper,
    body.print-page .cashier-report-paper * {
        visibility: visible !important;
    }

    body.print-page .cashier-report-paper {
        display: block !important;
        position: static !important;
        page: cashier-report;
        margin: 0 !important;
        min-height: 0 !important;
        background: #fff !important;
    }
}

@media (max-width: 860px) {
    .cashier-report-filter {
        grid-template-columns: 1fr;
    }

    .cashier-report-filter .form-actions {
        justify-content: flex-start;
    }

    .cashier-report-cards {
        grid-template-columns: 1fr 1fr;
    }

    .topbar {
        padding-left: 62px;
    }

    body:not(.sidebar-collapsed) .sidebar-toggle {
        left: 16px;
        right: auto;
    }

    body.sidebar-collapsed .sidebar-toggle {
        left: 16px;
        right: auto;
    }

    .sidebar-backdrop {
        background: rgba(8, 47, 87, .38);
    }
}

@media (max-width: 640px) {
    .pos-shell {
        margin-left: 0;
    }

    .pos-header {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px 12px 12px 66px;
    }

    .pos-brand a {
        font-size: 18px;
        line-height: 1.15;
    }

    .pos-transaction {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        align-items: end;
    }

    .pos-transaction label,
    .pos-search,
    .pos-category-filter {
        min-width: 0;
    }

    .pos-transaction input,
    .pos-transaction select {
        min-height: 38px;
        padding: 8px 10px;
        font-size: 13px;
    }

    .pos-category-filter {
        grid-column: 1 / -1;
    }

    .pos-header-categories {
        grid-column: 1 / -1;
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .pos-header-categories button {
        min-height: 36px;
        padding: 7px 10px;
        font-size: 13px;
    }

    .pos-workspace {
        grid-template-columns: 1fr;
        gap: 12px;
        height: auto;
        padding: 10px;
    }

    .pos-products {
        grid-template-rows: minmax(260px, 54vh) auto;
        overflow: hidden;
    }

    .pos-shell .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 8px 8px 5px;
        max-height: 54vh;
        overflow: auto;
    }

    .pos-shell .product-grid button {
        aspect-ratio: auto;
        height: 168px;
        grid-template-rows: minmax(72px, 1fr) 32px 14px 18px;
        gap: 2px;
        padding: 8px;
    }

    .product-photo {
        height: 100%;
        min-height: 72px;
    }

    .product-photo-empty {
        font-size: 30px;
    }

    .pos-shell .product-grid strong {
        font-size: 12px;
        line-height: 1.08;
        -webkit-line-clamp: 2;
    }

    .product-stock {
        font-size: 10px;
        line-height: 1.25;
    }

    .product-price {
        font-size: 12px;
        line-height: 1.25;
    }

.cart-items {
    max-height: 46vh;
}

    .pos-cart {
        overflow: hidden;
    }

    .payment-box {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        position: static;
    }

    .split-payment-box,
    .qris-preview {
        grid-column: auto;
    }

    body.pos-focus-mode .pos-header {
        padding: 10px 10px 10px 58px;
    }

    body.pos-focus-mode .pos-workspace {
        gap: 10px;
        padding: 8px;
    }

    body.pos-focus-mode .pos-products {
        grid-template-rows: minmax(220px, 48vh) auto;
    }

    body.pos-focus-mode .pos-shell .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: 48vh;
        gap: 7px;
        padding: 7px;
    }

    body.pos-focus-mode .pos-shell .product-grid button {
        height: 148px;
        grid-template-rows: minmax(62px, 1fr) 29px 13px 17px;
        padding: 7px;
    }

    body.pos-focus-mode .product-photo {
        min-height: 62px;
    }

    body.pos-focus-mode .pos-cart {
        min-height: 360px;
    }

    body.pos-focus-mode .cart-items {
        max-height: 42vh;
    }

    body.pos-focus-mode .payment-box {
        gap: 8px;
    }
}

.permission-box {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    background: #f8fafc;
    display: grid;
    gap: 12px;
}

.permission-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.permission-box-header h3 {
    margin: 0;
    font-size: 14px;
    color: var(--text);
}

.permission-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 12px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.permission-group strong {
    grid-column: 1 / -1;
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
}

@media (max-width: 720px) {
    .permission-group {
        grid-template-columns: 1fr;
    }
}

/* POS and Pre Order product cards must stay readable on every viewport. */
.pos-shell .product-grid {
    align-items: stretch !important;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    grid-auto-rows: auto !important;
    overflow-y: auto !important;
}

.pos-shell .product-grid button {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    aspect-ratio: auto !important;
    height: auto !important;
    min-height: 144px;
    gap: 3px;
    overflow: visible;
}

.pos-shell .product-grid button[hidden] {
    display: none !important;
}

.pos-shell .product-grid .product-photo {
    flex: 0 0 72px;
    width: 100%;
    height: 72px !important;
    min-height: 72px;
    max-height: 72px;
    object-fit: contain;
}

.pos-shell .product-grid .product-photo-empty {
    display: grid;
    place-items: center;
}

.pos-shell .product-grid strong {
    align-self: stretch;
    min-height: 27px;
    overflow: hidden;
    line-height: 1.12;
}

.pos-shell .product-grid .product-stock,
.pos-shell .product-grid .product-price {
    flex: 0 0 auto;
    min-height: 13px;
    overflow: hidden;
    line-height: 1.18;
}

body.pos-focus-mode .pos-shell .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)) !important;
}

body.pos-focus-mode .pos-shell .product-grid button {
    min-height: 140px;
}

body.pos-focus-mode .pos-shell .product-grid .product-photo {
    flex-basis: 68px;
    height: 68px !important;
    min-height: 68px;
    max-height: 68px;
}

@media (max-width: 1180px) and (min-width: 861px) {
    body.pos-focus-mode .pos-shell .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)) !important;
    }
}

@media (orientation: landscape) and (min-width: 700px) and (max-height: 860px) {
    body.pos-focus-mode .pos-shell .product-grid button {
        min-height: 142px;
    }
}

@media (max-width: 640px) {
    .pos-shell .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)) !important;
    }

    .pos-shell .product-grid button,
    body.pos-focus-mode .pos-shell .product-grid button {
        min-height: 148px;
    }

    .pos-shell .product-grid .product-photo,
    body.pos-focus-mode .pos-shell .product-grid .product-photo {
        flex-basis: 74px;
        height: 74px !important;
        min-height: 74px;
        max-height: 74px;
    }
}

@media print {
    body.report-page {
        background: #fff;
    }

    body.report-paper-a4 {
        width: 210mm;
    }

    body.report-paper-f4 {
        width: 215mm;
    }

    body.report-paper-a4 {
        --report-page-size: A4;
    }

    body.report-page .sidebar,
    body.report-page .sidebar-toggle,
    body.report-page .sidebar-backdrop,
    .app-footer,
    body.report-page .report-filter,
    body.report-page .report-tabs,
    body.report-page .report-print-button {
        display: none !important;
    }

    body.report-page .content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    body.report-page .topbar {
        box-shadow: none;
        border: 0;
        padding: 0 0 10px;
        margin: 0;
    }

    body.report-page .panel {
        box-shadow: none;
        border: 0;
        padding: 0;
        margin: 0;
    }

    body.report-page table {
        font-size: 11px;
    }

    body.report-page .stock-opname-print-meta {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        margin-bottom: 10px;
    }

    body.report-page .stock-opname-print-meta span {
        border-color: #999;
        border-radius: 0;
        padding: 5px 6px;
        background: #fff;
    }

    body.report-page .stock-opname-print-meta small {
        color: #333;
        font-size: 10px;
    }

    body.report-page .stock-opname-print-meta strong {
        color: #111;
        font-size: 11px;
    }

    body.report-page .stock-opname-print-sheet tfoot th {
        background: #fff;
        border-top: 1px solid #333;
    }

    body.report-page .print-toolbar {
        display: none !important;
    }
}

@page {
    margin: 10mm;
}

.reset-stock-panel {
    border-color: #f2a6a6;
    background: #fff7f7;
}

.reset-stock-warning {
    display: grid;
    gap: 7px;
    padding: 12px;
    border: 1px solid #ef9a9a;
    border-left: 5px solid #c62828;
    border-radius: 8px;
    background: #ffebee;
    color: #7f1d1d;
}

.reset-stock-warning strong {
    color: #b71c1c;
    font-size: 15px;
}

.reset-stock-preview {
    border-color: #f4b7b7;
}
.login-password-wrap {
    position: relative;
    display: block;
}

.login-password-wrap input {
    width: 100%;
    padding-right: 48px;
}

.login-password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #475569;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.login-password-toggle:hover,
.login-password-toggle:focus-visible {
    background: #e2e8f0;
}
.receivable-overall-hint,
.receivable-export-hint {
    margin-top: 18px;
}
