@charset "UTF-8";
/* ==========================================================================
   GT POS WEB - UI COMPLETIONS + RESPONSIVE LAYER
   Loaded after gt.css and before print.css (so print.css still wins in print).

   Two jobs:
   1. COMPLETIONS - gt.css never defined ~140 class names the views rely on
      (.gt-page-block in 202 files, .gt-toolbar, .gt-detail-*, dashboards,
      auth cards, document/print wrappers, chat, QR, labels...). Those screens
      currently render as unstyled blocks; the rules below give them the layout
      the markup was written for, using the existing design tokens only.
   2. RESPONSIVE - every screen from 320px phones to 4K: fluid type, one-column
      fallbacks, table scrolling, safe-area insets, landscape phones, touch
      targets and an iOS input-zoom guard. Print paper styles are scoped to
      `@media screen` so print.css stays in charge of paper.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. PAGE COMPOSITION
   -------------------------------------------------------------------------- */
.gt-page-block { display: block; min-width: 0; }
.gt-page-block > :last-child { margin-bottom: 0; }
.gt-narrow { width: 100%; max-width: 780px; margin-inline: auto; min-width: 0; }

.gt-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--gt-space-2);
    margin-bottom: var(--gt-space-4);
}
.gt-toolbar > form { margin: 0; }
.gt-toolbar-spacer { flex: 1 1 auto; }

.gt-mono,
.gt-col-mono,
.gt-code {
    font-family: var(--gt-font-mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.01em;
}
.gt-col-mono, .gt-col-check { white-space: nowrap; }
.gt-code {
    display: inline-block;
    padding: 1px var(--gt-space-1);
    background: var(--gt-surface-2);
    border: 1px solid var(--gt-border);
    border-radius: var(--gt-radius-sm);
    font-size: .92em;
    word-break: break-word;
}

.gt-link { color: var(--gt-primary); font-weight: 600; text-decoration: none; }
.gt-link:hover { text-decoration: underline; }
.gt-label-strong { font-weight: 650; color: var(--gt-text); }
.form-control-color { width: 52px; height: 36px; padding: 2px; flex: 0 0 auto; }

/* --------------------------------------------------------------------------
   2. FORMS
   -------------------------------------------------------------------------- */
.gt-form { display: block; min-width: 0; }
.gt-form-label,
.gt-form .gt-form-label {
    display: block;
    margin-bottom: var(--gt-space-1);
    font-weight: 600;
    font-size: var(--gt-font-size-sm);
    color: var(--gt-text);
}
.gt-form-hint {
    margin: var(--gt-space-1) 0 0;
    font-size: var(--gt-font-size-sm);
    color: var(--gt-text-muted);
}
.gt-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--gt-space-2);
}
.gt-form-actions > form { margin: 0; }

.gt-checkbox,
.gt-radio {
    display: inline-flex;
    align-items: center;
    gap: var(--gt-space-2);
    min-height: 34px;
    cursor: pointer;
    font-weight: 500;
    min-width: 0;
}
.gt-checkbox input,
.gt-radio input { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; accent-color: var(--gt-primary); }
.gt-checkbox span, .gt-radio span { min-width: 0; }

.gt-fieldset {
    min-width: 0;
    margin: 0 0 var(--gt-space-4);
    padding: var(--gt-space-4);
    border: 1px solid var(--gt-border);
    border-radius: var(--gt-radius);
    background: var(--gt-surface);
}
.gt-fieldset > legend {
    padding: 0 var(--gt-space-2);
    font-size: var(--gt-font-size-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--gt-text-muted);
}

.gt-input-group { display: flex; align-items: stretch; min-width: 0; }
.gt-input-group > .form-control { border-start-end-radius: 0; border-end-end-radius: 0; min-width: 0; }
.gt-input-group > .btn {
    margin: 0;
    border-start-start-radius: 0;
    border-end-start-radius: 0;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   4. LISTS, GRIDS, TILES
   -------------------------------------------------------------------------- */
.gt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gt-space-2); }
.gt-list-tight { gap: var(--gt-space-1); }
.gt-list > li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--gt-space-2);
    min-width: 0;
}
.gt-list > li > span:first-child { color: var(--gt-text-muted); }
.gt-list > li > span:last-child { font-weight: 600; overflow-wrap: anywhere; }

.gt-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--gt-space-4);
    min-width: 0;
}
.gt-card-compact { margin-bottom: 0; }

.gt-chip-row { display: flex; flex-wrap: wrap; gap: var(--gt-space-2); list-style: none; margin: 0; padding: 0; }
.gt-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--gt-space-1);
    padding: 3px var(--gt-space-3);
    border: 1px solid var(--gt-border);
    border-radius: var(--gt-radius-pill);
    background: var(--gt-surface-2);
    font-size: var(--gt-font-size-sm);
    font-weight: 600;
    color: var(--gt-text-muted);
}
.gt-chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    padding: 0 6px;
    border-radius: var(--gt-radius-pill);
    background: var(--gt-primary);
    color: var(--gt-primary-contrast);
    font-size: 11px;
    font-weight: 700;
}

.gt-quick-menu { display: block; margin-bottom: var(--gt-space-4); }
.gt-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--gt-space-3);
}
.gt-quick-card {
    display: flex;
    align-items: center;
    gap: var(--gt-space-3);
    padding: var(--gt-space-3) var(--gt-space-4);
    text-decoration: none;
    color: inherit;
    min-width: 0;
}
.gt-quick-card:hover { border-color: var(--gt-primary); text-decoration: none; }
.gt-quick-icon { font-size: 22px; color: var(--gt-primary); flex: 0 0 auto; }
.gt-quick-label { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }

/* --------------------------------------------------------------------------
   7. AUTH SCREENS
   -------------------------------------------------------------------------- */

/* The staff sign-in screen must not read as the member area: drop the shop
   chrome (search + catalogue/cart/member links) and mark the card. */
body[data-path="/auth/login"] .gt-public-search,
body[data-path="/auth/login"] .gt-public-nav { display: none; }
body[data-path="/auth/login"] .gt-auth-card { border-top: 4px solid var(--gt-primary); }
body[data-path="/auth/login"] .gt-public-header-inner { justify-content: space-between; }

.gt-auth-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--gt-space-4);
    min-height: 70vh;
    padding: calc(var(--gt-space-5) + env(safe-area-inset-top, 0)) var(--gt-space-4)
             calc(var(--gt-space-5) + env(safe-area-inset-bottom, 0));
}
.gt-auth-card {
    width: 100%;
    max-width: 460px;
    padding: var(--gt-space-6);
    background: var(--gt-surface);
    border: 1px solid var(--gt-border);
    border-radius: var(--gt-radius-lg);
    box-shadow: var(--gt-shadow);
    min-width: 0;
}
.gt-auth-brand, .gt-auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--gt-space-2);
    margin-bottom: var(--gt-space-4);
}
.gt-auth-logo img, .gt-auth-brand img { max-height: 56px; width: auto; }
.gt-auth-header { margin-bottom: var(--gt-space-4); text-align: center; }
.gt-auth-title { margin: 0 0 var(--gt-space-1); font-size: 1.35rem; }
.gt-auth-subtitle { margin: 0; color: var(--gt-text-muted); font-size: var(--gt-font-size-sm); }
.gt-auth-form { display: block; min-width: 0; }
.gt-auth-footer {
    margin-top: var(--gt-space-4);
    padding-top: var(--gt-space-4);
    border-top: 1px solid var(--gt-border);
    text-align: center;
    font-size: var(--gt-font-size-sm);
    color: var(--gt-text-muted);
}

/* --------------------------------------------------------------------------
   10. CHAT
   -------------------------------------------------------------------------- */
.gt-chat-layout { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: var(--gt-space-4); align-items: start; min-width: 0; }
.gt-chat-list { display: grid; gap: var(--gt-space-2); min-width: 0; }
.gt-chat-customer { font-weight: 650; overflow-wrap: anywhere; }
.gt-chat-subject { font-size: var(--gt-font-size-sm); color: var(--gt-text-muted); overflow-wrap: anywhere; }
.gt-chat-meta { display: flex; flex-wrap: wrap; gap: var(--gt-space-2); font-size: var(--gt-font-size-sm); color: var(--gt-text-muted); }
.gt-chat-messages { display: grid; gap: var(--gt-space-3); max-height: 60vh; overflow-y: auto; min-width: 0; }
.gt-chat-time { font-size: 11px; color: var(--gt-text-muted); white-space: nowrap; }
.gt-chat-reply { display: block; margin-top: var(--gt-space-3); min-width: 0; }

/* --------------------------------------------------------------------------
   12. RESPONSIVE - SHELL
   -------------------------------------------------------------------------- */

/* large desktops: keep line lengths readable and align the navbar with the content */
@media (min-width: 1600px) {
    .gt-content { width: 100%; max-width: 1520px; margin-inline: auto; }
    .gt-navbar-inner { max-width: 1520px; margin-inline: auto; }
}

@media (max-width: 1200px) {
    .gt-dashboard-main { grid-template-columns: minmax(0, 1fr); }
    .gt-detail-grid { grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); }
    .gt-chat-layout { grid-template-columns: minmax(0, 280px) minmax(0, 1fr); }
}

@media (max-width: 992px) {
    /* drawer open on a phone/tablet: freeze the page behind it */
    html[data-sidebar="open"] { overflow: hidden; }
    .gt-sidebar, .gt-sidebar-nav { overscroll-behavior: contain; }
    .gt-detail-grid { grid-template-columns: minmax(0, 1fr); gap: var(--gt-space-4); }
    .gt-chat-layout { grid-template-columns: minmax(0, 1fr); }
    .gt-content {
        padding-left: max(var(--gt-space-3), env(safe-area-inset-left, 0));
        padding-right: max(var(--gt-space-3), env(safe-area-inset-right, 0));
    }
    .gt-navbar-inner {
        padding-left: max(var(--gt-space-3), env(safe-area-inset-left, 0));
        padding-right: max(var(--gt-space-3), env(safe-area-inset-right, 0));
    }
    .gt-mobile-nav {
        padding-left: env(safe-area-inset-left, 0);
        padding-right: env(safe-area-inset-right, 0);
    }
    .gt-auth-wrap { justify-content: flex-start; padding-top: calc(var(--gt-space-5) + env(safe-area-inset-top, 0)); }
    .gt-preview-frame, .gt-preview-iframe { min-height: 60vh; }
}

@media (max-width: 768px) {
    /* iOS Safari zooms the page when a focused control is under 16px. */
    .gt-app input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
    .gt-app select,
    .gt-app textarea,
    .gt-form input:not([type="checkbox"]):not([type="radio"]),
    .gt-form select,
    .gt-form textarea,
    .form-control { font-size: 16px; }
    .gt-app .gt-table, .gt-app .gt-print-table { font-size: var(--gt-font-size-sm); }

    .gt-toolbar { gap: var(--gt-space-2); }
    .gt-toolbar > .btn,
    .gt-toolbar > form,
    .gt-toolbar > .gt-form-actions { flex: 1 1 auto; }
    .gt-quick-actions { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .gt-card-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
    .gt-pending-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
    .gt-kpi-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
    .gt-auth-card { padding: var(--gt-space-5); }
    .gt-print-doc, .gt-report-print, .gt-shipping-label { padding: var(--gt-space-4); }
    .gt-label-sheet { grid-template-columns: repeat(auto-fill, minmax(60mm, 1fr)); }
}

@media (max-width: 576px) {
    .gt-narrow { max-width: none; }
    .gt-detail-row { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: var(--gt-space-3) 0; }
    .gt-detail-row dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; }
    .gt-detail-actions .btn { flex: 1 1 auto; }
    .gt-detail-actions > form { flex: 1 1 auto; }
    .gt-card-grid, .gt-quick-actions, .gt-pending-grid, .gt-kpi-grid, .gt-plan-grid { grid-template-columns: minmax(0, 1fr); }
    .gt-image-grid, .gt-product-grid, .gt-qr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gt-top-list-item { grid-template-columns: 24px minmax(0, 1fr); }
    .gt-top-list-value { grid-column: 2; justify-self: start; }
    .gt-chat-messages { max-height: 46vh; }
    .gt-print-doc-head, .gt-report-print-head { flex-direction: column; }
    .gt-print-sign { gap: var(--gt-space-5); }
    .gt-print-sign-line { flex-basis: 100%; }
    .gt-auth-wrap { padding-left: var(--gt-space-3); padding-right: var(--gt-space-3); }
    .gt-auth-card { padding: var(--gt-space-4); border-radius: var(--gt-radius); }
    .gt-auth-title { font-size: 1.2rem; }
    .gt-settings-nav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
    .gt-settings-nav > * { flex: 0 0 auto; }
    .gt-barcode-preview { overflow-x: auto; }
    .gt-error-trace { max-height: 32vh; font-size: 11px; }
}

/* small phones (iPhone SE / Android 360dp and below) */
@media (max-width: 430px) {
    .gt-app .gt-card-body { padding: var(--gt-space-3); }
    .gt-app .gt-card-header { padding: var(--gt-space-3); }
    .gt-page-header { gap: var(--gt-space-2); }
    .gt-quick-card { padding: var(--gt-space-2) var(--gt-space-3); }
    .gt-pending-count { font-size: 1.35rem; }
    .gt-chip { padding: 3px var(--gt-space-2); }
    .gt-label-sheet { grid-template-columns: minmax(0, 1fr); }
    .gt-export-buttons { display: flex; flex-wrap: wrap; gap: var(--gt-space-1); width: 100%; }
    .gt-export-buttons .btn { flex: 1 1 46%; }
}

@media (max-width: 360px) {
    .gt-image-grid, .gt-product-grid, .gt-qr-grid { grid-template-columns: minmax(0, 1fr); }
    .gt-auth-card { padding: var(--gt-space-3); }
    .gt-detail-row dt { font-size: 11px; }
}

/* phone in landscape: vertical space is the scarce resource */
@media (max-height: 520px) and (orientation: landscape) {
    :root { --gt-mobile-nav-h: 50px; }
    .gt-app .gt-content { padding-top: var(--gt-space-2); }
    .gt-auth-wrap { min-height: 0; justify-content: flex-start; padding-top: var(--gt-space-4); }
    .gt-auth-card { max-width: 560px; padding: var(--gt-space-4); }
    .gt-chat-messages { max-height: 40vh; }
    .gt-preview-frame, .gt-preview-iframe { min-height: 50vh; }
    .gt-scan-frame { max-width: 200px; }
    .gt-modal-body, .gt-drawer-body { max-height: 66vh; overflow-y: auto; }
}

/* touch devices: comfortable targets, no hover-only affordances */
@media (pointer: coarse) {
    .gt-app .btn,
    .gt-app .form-control,
    .gt-app select,
    .gt-app .gt-tab { min-height: 42px; }
    .gt-app .btn-sm { min-height: 36px; }
    .gt-app .gt-menu-item > a,
    .gt-mobile-nav-item,
    .gt-mobile-nav-link { min-height: 44px; }
    .gt-checkbox, .gt-radio { min-height: 44px; }
    .gt-table-actions .btn { min-height: 34px; }
}

/* wide data tables: keep them scrollable and give a visual hint */
.gt-table-wrap {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    background:
        linear-gradient(to right, var(--gt-surface) 30%, rgba(255, 255, 255, 0)) left center / 24px 100% no-repeat,
        linear-gradient(to left, var(--gt-surface) 30%, rgba(255, 255, 255, 0)) right center / 24px 100% no-repeat,
        radial-gradient(farthest-side at 0 50%, rgba(19, 30, 48, .12), rgba(19, 30, 48, 0)) left center / 12px 100% no-repeat,
        radial-gradient(farthest-side at 100% 50%, rgba(19, 30, 48, .12), rgba(19, 30, 48, 0)) right center / 12px 100% no-repeat;
    background-attachment: local, local, scroll, scroll;
}
[data-theme="dark"] .gt-table-wrap {
    background:
        linear-gradient(to right, var(--gt-surface) 30%, rgba(255, 255, 255, 0)) left center / 24px 100% no-repeat,
        linear-gradient(to left, var(--gt-surface) 30%, rgba(255, 255, 255, 0)) right center / 24px 100% no-repeat,
        radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0)) left center / 12px 100% no-repeat,
        radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0)) right center / 12px 100% no-repeat;
    background-attachment: local, local, scroll, scroll;
}
@media (max-width: 768px) {
    .gt-table th, .gt-table td { padding: 8px var(--gt-space-2); }
    .gt-table thead th { font-size: 11px; }
    .gt-table td { overflow-wrap: anywhere; }
    .gt-table td.text-right, .gt-table td.gt-col-mono, .gt-table th.text-right { white-space: nowrap; overflow-wrap: normal; }
    .gt-table { min-width: 560px; }
    .gt-table-compact { min-width: 0; }
}
@media (max-width: 430px) {
    .gt-table { min-width: 500px; }
    .gt-table th, .gt-table td { padding: 7px 8px; }
}

/* never let a stray wide element break the phone layout */
.gt-app img, .gt-app svg, .gt-app canvas, .gt-app video { max-width: 100%; }
.gt-app pre, .gt-app code { overflow-wrap: anywhere; }

/* product image manager: show the WHOLE uploaded image (no cropping) */
.gt-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: var(--gt-space-3, 12px);
    align-items: start;
}
.gt-image-card { overflow: hidden; margin: 0; }
.gt-image-card img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: contain;
    background: var(--gt-surface-2, #f5f6f8);
}
.gt-image-card figcaption { padding: var(--gt-space-2, 8px) var(--gt-space-3, 12px); }
@media (max-width: 576px) {
    .gt-image-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .gt-image-card img { max-height: 45vh; }
}

/* ==========================================================================
 * W191 - product gallery on the ADMIN product detail page
 *
 * Scoped to .gt-detail-side on purpose: the storefront detail page reuses the
 * .gt-product-gallery / .gt-product-gallery-main class names (gt-storefront.css)
 * and must keep its own 2-column layout.
 *
 * One big image plus a thumbnail row of EVERY uploaded image. Thumbnails are
 * 68px (64px on phones) and the primary one is ringed with the brand colour and
 * carries the "Utama" badge.
 * ========================================================================== */
.gt-detail-side .gt-product-gallery { display: grid; gap: var(--gt-space-3, 12px); min-width: 0; }
.gt-detail-side .gt-product-gallery-main {
    display: block;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--gt-border, #e5e7eb);
    border-radius: var(--gt-radius-sm, 8px);
    background: var(--gt-surface-2, #f5f6f8);
}
.gt-detail-side .gt-product-gallery-main img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 62vh;
    object-fit: contain;
}
.gt-detail-side .gt-product-thumbs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--gt-space-2, 8px);
}
.gt-detail-side .gt-product-thumb {
    position: relative;
    display: block;
    width: 68px;
    height: 68px;
    overflow: hidden;
    border: 2px solid var(--gt-border, #e5e7eb);
    border-radius: var(--gt-radius-sm, 8px);
    background: var(--gt-surface-2, #f5f6f8);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.gt-detail-side .gt-product-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gt-detail-side .gt-product-thumb:hover { border-color: var(--gt-primary, #2563eb); }
.gt-detail-side .gt-product-thumb.is-active {
    border-color: var(--gt-primary, #2563eb);
    box-shadow: 0 0 0 2px var(--gt-primary-soft, rgba(37, 99, 235, .2));
}
.gt-detail-side .gt-thumb-badge {
    position: absolute;
    left: 2px;
    bottom: 2px;
    padding: 0 4px;
    border-radius: 4px;
    background: rgba(19, 30, 48, .78);
    color: #fff;
    font-size: 9.5px;
    line-height: 1.55;
    letter-spacing: .02em;
    pointer-events: none;
}
@media (max-width: 576px) {
    .gt-detail-side .gt-product-gallery-main img { max-height: 48vh; }
    .gt-detail-side .gt-product-thumb { width: 64px; height: 64px; }
}

/* ==========================================================================
 * W191 - selected-file preview strip next to the create/edit "images[]" input
 * (built in JS with FileReader; hidden until at least one file is chosen)
 * ========================================================================== */
.gt-image-preview {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--gt-space-2, 8px);
    margin-top: var(--gt-space-2, 8px);
}
.gt-image-preview[hidden] { display: none; }
.gt-image-preview-item {
    margin: 0;
    width: 96px;
    overflow: hidden;
    border: 1px solid var(--gt-border, #e5e7eb);
    border-radius: var(--gt-radius-sm, 8px);
    background: var(--gt-surface-2, #f5f6f8);
}
.gt-image-preview-item img { display: block; width: 100%; height: 72px; object-fit: cover; }
.gt-image-preview-item figcaption {
    display: grid;
    gap: 1px;
    padding: 3px 5px;
    font-size: 10.5px;
    line-height: 1.3;
}
.gt-image-preview-name {
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gt-image-preview-meta { color: var(--gt-text-muted, #6b7280); }
.gt-image-preview-more {
    align-self: center;
    margin: 0;
    padding: var(--gt-space-2, 8px);
    font-size: 12px;
    font-weight: 600;
    color: var(--gt-text-muted, #6b7280);
}

/* product discount: original price struck through next to the promo price */
.gt-price-strike { text-decoration: line-through; opacity: .6; margin-right: .25rem; }
.gt-input-group { display: block; }

/* ==========================================================================
 * W25 - full-page POS payment (/pos/payment)
 *
 * Deliberately plain document flow: no fixed overlay, no body overflow lock,
 * no 100vh/100dvh dialog, no autofocus. The confirm button is a normal
 * in-flow element, so it can always be reached by scrolling.
 * ========================================================================== */
body.gt-pay-body { overflow-y: auto; }
body.gt-pay-body .gt-layout { min-height: 0; }
body.gt-pay-body .gt-sidebar { height: auto; }
body.gt-pay-body.gt-modal-open { overflow-y: auto; }

.gt-pay-page {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 0 0 calc(var(--gt-mobile-nav-h, 0px) + var(--gt-space-6, 24px));
    display: flex;
    flex-direction: column;
    gap: var(--gt-space-4, 16px);
    min-width: 0;
}

.gt-pay-error {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    padding: 10px 12px;
    border: 1px solid var(--gt-border, #d7dce3);
    border-left: 4px solid var(--gt-border-strong, #9aa4b2);
    border-radius: var(--gt-radius-sm, 8px);
    background: var(--gt-surface-2, #f5f6f8);
    color: var(--gt-text-muted, #5b6472);
    font-size: 12.5px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
.gt-pay-error[data-state="error"] {
    border-left-color: var(--gt-danger, #dc2626);
    background: var(--gt-danger-soft, #fee2e2);
    color: var(--gt-danger-text, #991b1b);
    font-weight: 600;
}
.gt-pay-error-title { flex: 0 0 auto; }
.gt-pay-error-text { flex: 1 1 240px; }

.gt-pay-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--gt-space-3, 12px);
}
.gt-pay-eyebrow {
    margin: 0;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--gt-primary, #1f6feb);
}
.gt-pay-title { margin: 2px 0 4px; font-size: 1.35rem; line-height: 1.25; }
.gt-pay-sub { margin: 0; color: var(--gt-text-muted, #5b6472); font-size: .9rem; }
.gt-pay-back { flex: 0 0 auto; min-height: 44px; }

.gt-pay-card { box-shadow: var(--gt-shadow-sm, 0 1px 2px rgba(9, 15, 26, .08)); }
.gt-pay-total-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--gt-space-3, 12px);
}
.gt-pay-total-label { display: block; font-size: .85rem; color: var(--gt-text-muted, #5b6472); }
.gt-pay-total-items { display: block; margin-top: 2px; font-size: .8rem; color: var(--gt-text-muted, #5b6472); }
.gt-pay-total-value { font-size: 1.7rem; line-height: 1.1; font-weight: 800; }

.gt-pay-items { margin-top: var(--gt-space-3, 12px); border-top: 1px dashed var(--gt-border, #d7dce3); }
.gt-pay-items summary {
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: .9rem;
}
.gt-pay-items ul { list-style: none; margin: 0; padding: 0 0 4px; }
.gt-pay-items li {
    display: flex;
    justify-content: space-between;
    gap: var(--gt-space-3, 12px);
    padding: 6px 0;
    border-bottom: 1px solid var(--gt-border, #d7dce3);
    font-size: .88rem;
}
.gt-pay-items li:last-child { border-bottom: 0; }

.gt-pay-methods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gt-space-3, 12px);
}
.gt-pay-method {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-height: 96px;
    padding: 12px 14px;
    border: 2px solid var(--gt-border-strong, #9aa4b2);
    border-radius: var(--gt-radius, 12px);
    background: var(--gt-surface, #fff);
    color: var(--gt-text, #111827);
    text-decoration: none;
    touch-action: manipulation;
}
.gt-pay-method:hover, .gt-pay-method:focus-visible {
    border-color: var(--gt-primary, #1f6feb);
    color: var(--gt-primary, #1f6feb);
    text-decoration: none;
}
.gt-pay-method.is-active {
    border-color: var(--gt-primary, #1f6feb);
    background: var(--gt-primary-soft, #e8f0fe);
    color: var(--gt-primary, #1f6feb);
}
.gt-pay-method-icon { font-size: 22px; line-height: 1; }
.gt-pay-method-label { font-weight: 750; font-size: 1rem; }
.gt-pay-method-hint { font-size: .78rem; color: var(--gt-text-muted, #5b6472); }
.gt-pay-method.is-active .gt-pay-method-hint { color: inherit; opacity: .8; }

.gt-pay-form-card .gt-card-body { padding-bottom: var(--gt-space-4, 16px); }
.gt-pay-page .gt-pos-payment-form { display: block; }
/* Neutralise the old modal rule (sticky confirm inside the dialog body): on a
   full page the button must stay in normal flow. */
.gt-pay-page .gt-pos-payment-form > button[type="submit"] {
    position: static;
    width: 100%;
    min-height: 56px;
    margin-top: var(--gt-space-4, 16px);
    box-shadow: none;
}
.gt-pay-page .gt-pos-totals-row.is-total { font-size: 1.3rem; }
.gt-pay-page .gt-pos-keypad button { min-height: 52px; }
.gt-pay-page input, .gt-pay-page select, .gt-pay-page textarea { font-size: 16px; }
.gt-pay-hint {
    margin: var(--gt-space-3, 12px) 0 0;
    font-size: .8rem;
    color: var(--gt-text-muted, #5b6472);
}

@media (max-width: 576px) {
    .gt-pay-methods { grid-template-columns: minmax(0, 1fr); }
    .gt-pay-method { min-height: 82px; }
    .gt-pay-title { font-size: 1.18rem; }
    .gt-pay-total-value { font-size: 1.45rem; }
    .gt-pay-back { width: 100%; justify-content: center; }
}

/* ==========================================================================
 * W25 - Admin Web editors (landing / header / preview) on a phone
 *
 * Plain scrolling document, single-column form rows, large controls. Nothing
 * here uses a fixed overlay or a modal; the editor never needs one to save.
 * ========================================================================== */
body.gt-editor-body .gt-layout { min-height: 0; }
body.gt-editor-body .gt-content { overflow: visible; }
body.gt-editor-body .gt-page-block { min-width: 0; }
body.gt-editor-body .gt-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--gt-space-3, 12px);
    padding: var(--gt-space-4, 16px) 0;
}
body.gt-editor-body .gt-form-actions .btn { min-height: 46px; }

.gt-editor-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 12px 14px;
    margin-bottom: var(--gt-space-4, 16px);
    border: 1px solid var(--gt-border, #d7dce3);
    border-left: 4px solid var(--gt-info, #2563eb);
    border-radius: var(--gt-radius-sm, 8px);
    background: var(--gt-surface-2, #f5f6f8);
    font-size: .9rem;
}
.gt-editor-status.is-live { border-left-color: var(--gt-success, #16a34a); background: var(--gt-success-soft, #dcfce7); }
.gt-editor-status.is-pending { border-left-color: var(--gt-warning, #d97706); background: var(--gt-warning-soft, #fef3c7); }
.gt-editor-status.is-rejected { border-left-color: var(--gt-danger, #dc2626); background: var(--gt-danger-soft, #fee2e2); }
.gt-editor-status strong { font-weight: 750; }
.gt-editor-status-meta { color: var(--gt-text-muted, #5b6472); font-size: .82rem; }

.gt-preview-mobile-note {
    display: none;
    margin: 8px 0 0;
    padding: 10px 12px;
    border: 1px solid var(--gt-border, #d7dce3);
    border-radius: var(--gt-radius-sm, 8px);
    background: var(--gt-surface-2, #f5f6f8);
    font-size: .82rem;
    color: var(--gt-text-muted, #5b6472);
}

@media (max-width: 768px) {
    body.gt-editor-body .form-row,
    body.gt-editor-body .form-row-2,
    body.gt-editor-body .form-row-3 { grid-template-columns: minmax(0, 1fr); }
    body.gt-editor-body .form-control,
    body.gt-editor-body select,
    body.gt-editor-body textarea { min-height: 48px; font-size: 16px; }
    body.gt-editor-body .gt-form-actions {
        position: static;
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
    body.gt-editor-body .gt-form-actions .btn { width: 100%; min-height: 50px; }
    body.gt-editor-body .gt-card { margin-bottom: var(--gt-space-4, 16px); }
    body.gt-editor-body .gt-checkbox { min-height: 48px; }

    /* The iframe is tall and captures touch on phones. Stop it from trapping
       the page scroll; the "open preview" link remains the full interactive
       preview. */
    .gt-preview-frame-wrap { position: relative; }
    .gt-preview-frame { min-height: 0; height: 52vh; pointer-events: none; }
    .gt-preview-mobile-note { display: block; }
}

/* ==========================================================================
   W125 - KELOLA PENYIMPANAN BISNIS (GESTTECH storage dashboard)
   Category checkbox grid + backup toolbar + collapsible file preview.
   ========================================================================== */
.gt-storage-categories {
    border: 0;
    margin: 0 0 var(--gt-space-4, 16px);
    padding: 0;
}
.gt-storage-categories legend {
    font-weight: 600;
    margin-bottom: var(--gt-space-2, 8px);
    padding: 0;
}
.gt-storage-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--gt-space-2, 8px);
}
.gt-storage-category {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    border: 1px solid var(--gt-border, #e2e8f0);
    border-radius: var(--gt-radius, 8px);
    padding: 8px 10px;
    background: #fff;
}
.gt-storage-category input {
    margin: 0;
}
.gt-storage-category-label {
    font-weight: 600;
}
.gt-storage-category-folders {
    flex-basis: 100%;
    font-size: var(--gt-font-size-sm, 12px);
    color: #64748b;
    word-break: break-all;
}
.gt-storage-backup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gt-space-2, 8px);
    margin-top: var(--gt-space-3, 12px);
}
.gt-storage-backup-actions .inline-form {
    display: inline-flex;
}
.gt-storage-preview {
    margin-top: var(--gt-space-4, 16px);
}
.gt-storage-preview > summary {
    cursor: pointer;
    font-weight: 600;
    margin-bottom: var(--gt-space-2, 8px);
}

/* ==========================================================================
   W128 - NOTIFICATION POP-UPS
   A fixed toast stack (bottom-right desktop / bottom-centre phones) plus the
   one-time consent bar. The stack is pointer-events:none so it can never block
   a cashier's POS buttons; only the cards/links catch taps. z-index 400 keeps
   it above the POS UI (drawer 210, modal 200, toasts 300).
   ========================================================================== */
.gt-notif-popups-wrap {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 400;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(360px, calc(100vw - 24px));
    pointer-events: none;
}
.gt-notif-popups-wrap[hidden] { display: none !important; }
.gt-notif-popups {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    pointer-events: none;
}
.gt-notif-popup {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 10px 12px 10px 10px;
    background: var(--gt-surface, #fff);
    color: var(--gt-text, #0f172a);
    border: 1px solid var(--gt-border, #e2e8f0);
    border-left: 4px solid var(--gt-primary, #2563eb);
    border-radius: var(--gt-radius, 12px);
    box-shadow: var(--gt-shadow-lg, 0 10px 30px rgba(15, 23, 42, .22));
    pointer-events: auto;
    animation: gt-notif-pop-in .18s ease-out;
}
.gt-notif-popup[data-cat="store"] { border-left-color: #0d9488; }
.gt-notif-popup[data-cat="chat_member"] { border-left-color: #7c3aed; }
.gt-notif-popup[data-cat="chat_gesttech"] { border-left-color: #0891b2; }
.gt-notif-popup[data-cat="chat_owner"] { border-left-color: #0891b2; }
.gt-notif-popup[data-cat="subs_payment"] { border-left-color: #b45309; }
.gt-notif-popup[data-cat="subs_expiry"] { border-left-color: #dc2626; }
.gt-notif-popup-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--gt-primary-soft, rgba(37, 99, 235, .12));
    font-size: 18px;
    line-height: 1;
}
.gt-notif-popup-main { flex: 1 1 auto; min-width: 0; }
.gt-notif-popup-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.gt-notif-popup-cat {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--gt-primary, #2563eb);
}
.gt-notif-popup-close {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    margin: -4px -4px 0 0;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--gt-text-muted, #64748b);
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
}
.gt-notif-popup-close:hover { background: var(--gt-surface-2, #f1f5f9); color: var(--gt-text, #0f172a); }
.gt-notif-popup-title {
    margin: 2px 0 0;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.28;
    overflow-wrap: anywhere;
}
.gt-notif-popup-text {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--gt-text-muted, #64748b);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gt-notif-popup-meta {
    margin: 4px 0 0;
    font-size: 11px;
    color: var(--gt-text-muted, #64748b);
    overflow-wrap: anywhere;
}
.gt-notif-popup-actions { margin-top: 8px; display: flex; }
/* .gt-app .btn-sm pins min-height:36px, so scope one level deeper to keep the
   pop-up CTA a comfortable tap target (38 desktop / 44 phone). */
.gt-notif-popup .gt-notif-popup-open {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.gt-notif-popup-all {
    pointer-events: auto;
    display: block;
    text-align: center;
    padding: 9px 12px;
    border-radius: 999px;
    background: var(--gt-surface, #fff);
    border: 1px solid var(--gt-border, #e2e8f0);
    box-shadow: var(--gt-shadow, 0 2px 8px rgba(15, 23, 42, .12));
    font-size: 12px;
    font-weight: 700;
    color: var(--gt-primary, #2563eb);
    text-decoration: none;
}
.gt-notif-popup-all:hover { text-decoration: underline; }

/* One-time consent bar (under the navbar, dismissible, never blocks content). */
.gt-notif-consent {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin: 10px var(--gt-space-4, 16px) 0;
    padding: 9px 12px;
    background: var(--gt-primary-soft, rgba(37, 99, 235, .08));
    border: 1px solid var(--gt-primary, #2563eb);
    border-radius: var(--gt-radius, 12px);
    color: var(--gt-text, #0f172a);
    box-shadow: var(--gt-shadow, 0 2px 8px rgba(15, 23, 42, .08));
}
.gt-notif-consent[hidden] { display: none !important; }
.gt-notif-consent-icon { flex: 0 0 auto; font-size: 18px; line-height: 1; }
.gt-notif-consent-text {
    flex: 1 1 220px;
    margin: 0;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.35;
}
.gt-notif-consent-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.gt-notif-consent-actions .btn { min-height: 38px; }
.gt-notif-consent-close { min-width: 38px; min-height: 38px; font-size: 19px; }

/* Navbar pop-up controls: compact icon buttons on phones so the header never
   overflows; the full "Tes Pop-up" label stays in the /notifications toolbar. */
.gt-notification-popup.is-off { opacity: .55; }
.gt-notification-popup [data-notif-popup-icon] { font-size: 16px; line-height: 1; }
.gt-notification-test { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.gt-notification-test-short { display: none; font-size: 9.5px; font-weight: 800; letter-spacing: .06em; }
@media (max-width: 720px) {
    .gt-notif-popups-wrap {
        left: 8px;
        right: 8px;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
        width: auto;
    }
    .gt-notif-popup { padding: 12px; }
    .gt-notif-popup-title { font-size: 14px; }
    .gt-notif-popup-text { font-size: 12.5px; }
    .gt-notif-popup-actions { margin-top: 10px; }
    .gt-notif-popup .gt-notif-popup-open { flex: 1 1 auto; min-height: 44px; font-size: 14px; }
    .gt-notif-popup-all { min-height: 44px; display: flex; align-items: center; justify-content: center; }
    .gt-notif-popup-close { width: 36px; height: 36px; }
    .gt-notif-consent { margin: 8px 12px 0; }
    .gt-notif-consent-actions { width: 100%; margin-left: 0; }
    .gt-notif-consent-actions .btn { flex: 1 1 0; }
    .gt-notif-consent-close { flex: 0 0 44px !important; }
    .gt-notification-test {
        width: 36px;
        height: 36px;
        padding: 0;
        justify-content: center;
    }
    .gt-notification-test-label { display: none; }
    .gt-notification-test-short { display: inline; }
    /* Free the header width for the two new notification controls. */
    .gt-navbar-right { flex-wrap: wrap; justify-content: flex-end; row-gap: 4px; }
    .gt-navbar .gt-db-status { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .gt-notif-popup { animation: none; }
}
@media print {
    .gt-notif-popups-wrap,
    .gt-notif-consent { display: none !important; }
}
@keyframes gt-notif-pop-in {
    from { opacity: 0; transform: translateY(10px) scale(.985); }
    to { opacity: 1; transform: none; }
}

