/* Gibril Accessories theme, layered over Filament's stock stylesheet. */
:root {
    --ga-red: #C8102E;
    --ga-red-hover: #A80D26;
    --ga-bg: #F8F7F5;
    --ga-card: #FFFFFF;
    --ga-ink: #1C1B1A;
    --ga-muted: #625E58;
    --ga-line: #E7E3DE;
    --ga-charcoal: #1E1E20;
    --ga-charcoal-2: #2B2B2E;
    --ga-out-bg: #FEE4E2;
    --ga-out-ink: #B42318;
    --ga-out-line: #FDA29B;
    --ga-low-bg: #FFEDD5;
    --ga-low-ink: #9A3412;
    --ga-low-line: #FDBA74;
    --ga-ok-bg: #EDF7EE;
    --ga-ok-ink: #1F6B34;
}

.dark {
    --ga-red: #D62844;
    --ga-red-hover: #E5546B;
    --ga-bg: #141416;
    --ga-card: #1F1F22;
    --ga-ink: #F2F0EC;
    --ga-muted: #B3AEA7;
    --ga-line: #36363A;
    --ga-out-bg: #4A1512;
    --ga-out-ink: #FECACA;
    --ga-out-line: #7F2A24;
    --ga-low-bg: #4A2A0E;
    --ga-low-ink: #FED7AA;
    --ga-low-line: #854D1B;
    --ga-ok-bg: #16321E;
    --ga-ok-ink: #BBF7D0;
}

/* No movement anywhere: this screen is watched all day. */
*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }

/* ---------- Filament shell ---------- */
.fi-body, .fi-layout, .fi-main-ctn { background: var(--ga-bg) !important; }
.fi-sidebar, .fi-sidebar-header, .fi-sidebar-nav { background: var(--ga-charcoal) !important; }
.fi-sidebar-header { box-shadow: none !important; --tw-ring-color: transparent !important; }
.fi-topbar nav { background: var(--ga-charcoal) !important; --tw-ring-color: transparent !important; }
.fi-topbar .fi-icon-btn, .fi-topbar .fi-icon-btn svg { color: #E8E6E3 !important; }
.fi-topbar .fi-icon-btn:hover { background: var(--ga-charcoal-2) !important; }
.fi-sidebar-group-label { color: #A8A39C !important; }
.fi-sidebar-group-collapse-button, .fi-sidebar-group-collapse-button svg { color: #A8A39C !important; }
.fi-sidebar-item-button { min-height: 44px; }
.fi-sidebar-item-label { color: #E8E6E3 !important; font-size: 15px !important; }
.fi-sidebar-item-icon { color: #A8A39C !important; }
.fi-sidebar-item-button:hover, .fi-sidebar-item-button:focus-visible { background: var(--ga-charcoal-2) !important; }
.fi-sidebar-item.fi-active .fi-sidebar-item-button { background: #C8102E !important; }
.fi-sidebar-item.fi-active .fi-sidebar-item-label, .fi-sidebar-item.fi-active .fi-sidebar-item-icon { color: #FFFFFF !important; }

.fi-btn, .fi-ac-btn-action { min-height: 44px; }
.fi-icon-btn { min-width: 44px; min-height: 44px; }
.fi-input { font-size: 16px !important; min-height: 44px; }
.fi-select-input { font-size: 16px !important; min-height: 44px; }
.fi-tabs-item { min-height: 44px; }
.fi-ta-text-item-label, .fi-ta-cell { font-size: 15px; }
.fi-section, .fi-ta-ctn { background: var(--ga-card) !important; }

.ga-row-out > td { background: var(--ga-out-bg) !important; }
.ga-row-low > td { background: var(--ga-low-bg) !important; }
.ga-row-out > td:first-child { box-shadow: inset 4px 0 0 var(--ga-out-ink); }
.ga-row-low > td:first-child { box-shadow: inset 4px 0 0 var(--ga-low-ink); }
.ga-row-voided > td { opacity: .6; text-decoration: line-through; }

.ga-brand { display: inline-flex; align-items: center; gap: 10px; }
.ga-brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 7px; background: #C8102E; color: #fff; font-weight: 800; font-size: 19px; }
.ga-brand-text { font-weight: 700; font-size: 18px; color: var(--ga-ink); white-space: nowrap; }
.ga-brand-sub { font-weight: 400; }
.fi-sidebar-header .ga-brand-text, .fi-topbar .ga-brand-text { color: #FFFFFF; }
.ga-login-notice { background: var(--ga-out-bg); color: var(--ga-out-ink); border-radius: 8px; padding: 12px; font-size: 15px; margin-bottom: 12px; }

/* ---------- Shared pieces ---------- */
.ga-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid transparent; font-size: 16px; font-weight: 600; cursor: pointer; text-decoration: none; }
.ga-btn:disabled { opacity: .45; cursor: not-allowed; }
.ga-btn-primary { background: var(--ga-red); color: #fff; }
.ga-btn-primary:hover:not(:disabled) { background: var(--ga-red-hover); }
.ga-btn-quiet { background: var(--ga-card); border-color: var(--ga-line); color: var(--ga-ink); }
.ga-btn-quiet:hover:not(:disabled) { border-color: var(--ga-muted); }
.ga-link { color: var(--ga-ink); text-decoration: underline; background: none; border: 0; cursor: pointer; font-size: 15px; padding: 10px 0; }
.ga-icon { width: 22px; height: 22px; }
.ga-empty { color: var(--ga-muted); padding: 16px 0; font-size: 16px; }
.ga-notice { background: var(--ga-low-bg); color: var(--ga-low-ink); border-radius: 8px; padding: 12px 16px; font-size: 16px; }
.ga-num { text-align: right; font-variant-numeric: tabular-nums; }

.ga-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.ga-badge-icon { width: 16px; height: 16px; flex: none; }
.ga-badge-out { background: var(--ga-out-bg); color: var(--ga-out-ink); border-color: var(--ga-out-line); }
.ga-badge-low { background: var(--ga-low-bg); color: var(--ga-low-ink); border-color: var(--ga-low-line); }
.ga-badge-ok { background: var(--ga-ok-bg); color: var(--ga-ok-ink); }

.ga-select { min-height: 44px; border-radius: 8px; border: 1px solid var(--ga-line); background-color: var(--ga-card); color: var(--ga-ink); font-size: 16px; padding: 0 36px 0 12px; background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; }
input.ga-select { padding-right: 12px; }

.ga-stats { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ga-stat { background: var(--ga-card); border: 1px solid var(--ga-line); border-radius: 12px; padding: 16px; }
.ga-stat-label { color: var(--ga-muted); font-size: 14px; font-weight: 600; }
.ga-stat-value { color: var(--ga-ink); font-size: 26px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.ga-stat-value.ga-key { color: var(--ga-red); }
.ga-stat-text { color: var(--ga-ink); font-size: 18px; font-weight: 600; margin-top: 4px; }
.ga-stat-sub { color: var(--ga-muted); font-size: 14px; margin-top: 2px; }
@media (min-width: 1024px) { .ga-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } .ga-stats-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.ga-panels { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .ga-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ga-panel-wide { grid-column: 1 / -1; } }
.ga-panel { background: var(--ga-card); border: 1px solid var(--ga-line); border-radius: 12px; padding: 16px; color: var(--ga-ink); }
.ga-panel h2 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.ga-panel-head { display: flex; justify-content: space-between; align-items: center; }
.ga-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--ga-line); font-size: 15px; }
.ga-row small { color: var(--ga-muted); font-size: 13px; margin-left: 6px; white-space: nowrap; }
.ga-issue-type { margin-right: 6px; }

.ga-table-wrap { overflow-x: auto; padding: 0; }
.ga-table { width: 100%; border-collapse: collapse; font-size: 15px; color: var(--ga-ink); }
.ga-table th { text-align: left; padding: 12px 16px; color: var(--ga-muted); font-size: 14px; border-bottom: 1px solid var(--ga-line); white-space: nowrap; }
.ga-table th.ga-num { text-align: right; }
.ga-table td { padding: 12px 16px; border-bottom: 1px solid var(--ga-line); }
.ga-table tfoot td { border-bottom: 0; padding-top: 8px; padding-bottom: 8px; }
.ga-strong td { font-weight: 700; font-size: 17px; }

.ga-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.ga-tab { min-height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--ga-line); background: var(--ga-card); color: var(--ga-ink); font-size: 16px; font-weight: 600; cursor: pointer; }
.ga-tab.is-selected { border-color: var(--ga-red); box-shadow: inset 0 0 0 1px var(--ga-red); color: var(--ga-red); }
.ga-report-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.ga-field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--ga-muted); }
.ga-report-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Modal ---------- */
.ga-modal-backdrop { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .55); }
.ga-modal { background: var(--ga-card); color: var(--ga-ink); border-radius: 14px; padding: 24px; width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 12px; }
.ga-modal h2 { font-size: 22px; font-weight: 700; }
.ga-modal p { font-size: 16px; color: var(--ga-muted); }
.ga-modal-badge { align-self: flex-start; }
.ga-modal-list { max-width: 520px; max-height: 85vh; }
.ga-alert-list { overflow-y: auto; }
.ga-alert-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--ga-line); font-size: 15px; }

/* ---------- POS ---------- */
/* The order takes the large side. The scan box and products sit in the narrow side. */
.fi-main:has(.ga-pos) .fi-page > section { padding-top: 12px; padding-bottom: 12px; }
.ga-pos { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); padding-bottom: 76px; color: var(--ga-ink); }

.ga-pos-catalog { container-type: inline-size; min-width: 0; }
.ga-pos-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ga-search { position: relative; flex: 1 1 100%; }
.ga-search-icon { position: absolute; left: 12px; top: 50%; margin-top: -10px; width: 20px; height: 20px; color: var(--ga-muted); }
.ga-search input { width: 100%; min-height: 48px; padding: 0 12px 0 40px; font-size: 16px; border-radius: 10px; border: 1px solid var(--ga-line); background: var(--ga-card); color: var(--ga-ink); }
.ga-search input:focus, .ga-select:focus { outline: 2px solid var(--ga-red); outline-offset: 0; border-color: transparent; box-shadow: none; }
.ga-pos-toolbar .ga-select { flex: 1 1 100px; min-width: 0; font-size: 15px; }
.ga-theme { padding: 0; width: 44px; flex: none; }

.ga-grid { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 2px; }
@container (min-width: 480px) { .ga-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (min-width: 760px) { .ga-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ga-product { display: flex; flex-direction: column; text-align: left; gap: 1px; min-height: 92px; padding: 10px 12px; border-radius: 10px; background: var(--ga-card); border: 1px solid var(--ga-line); color: var(--ga-ink); cursor: pointer; }
.ga-product:hover { border-color: var(--ga-muted); }
.ga-product:focus-visible { outline: 2px solid var(--ga-red); }
.ga-product-brand { color: var(--ga-muted); font-size: 12px; font-weight: 600; }
.ga-product-model { font-size: 15px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.ga-product-foot { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: space-between; }
.ga-product-price { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ga-product .ga-badge { font-size: 12px; padding: 2px 7px; }
.ga-product .ga-badge-icon { width: 14px; height: 14px; }
.ga-product-out { opacity: .78; }
.ga-more { width: 100%; margin-top: 8px; flex: none; }

.ga-cart { container-type: inline-size; background: var(--ga-card); border: 1px solid var(--ga-line); border-radius: 14px; display: flex; flex-direction: column; min-width: 0; scroll-margin-top: 80px; }
.ga-cart-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--ga-line); flex: none; }
.ga-cart-head h2 { font-size: 18px; font-weight: 700; }
.ga-cart-count { font-size: 13px; background: var(--ga-bg); border-radius: 999px; padding: 2px 9px; margin-left: 4px; }
.ga-cart-cols { display: none; }
.ga-cart-lines { padding: 0 16px; flex: 1 1 auto; overflow-y: auto; min-height: 60px; }
.ga-line { padding: 8px 0; border-bottom: 1px solid var(--ga-line); }
.ga-line:last-child { border-bottom: 0; }
.ga-line-top { display: flex; justify-content: space-between; gap: 8px; }
.ga-line-name { font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.ga-line-price { font-size: 13px; color: var(--ga-muted); }
.ga-icon-btn { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; background: none; border: 0; color: var(--ga-muted); cursor: pointer; border-radius: 8px; }
.ga-line-controls { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: flex-end; margin-top: 4px; }
.ga-qty { display: flex; align-items: center; flex: none; }
.ga-qty button { width: 44px; height: 44px; font-size: 20px; font-weight: 700; border: 1px solid var(--ga-line); background: var(--ga-bg); color: var(--ga-ink); cursor: pointer; }
.ga-qty button:first-child { border-radius: 8px 0 0 8px; }
.ga-qty button:last-child { border-radius: 0 8px 8px 0; }
.ga-qty input { width: 52px; height: 44px; padding: 0; text-align: center; font-size: 16px; font-weight: 700; border: 1px solid var(--ga-line); border-width: 1px 0; background: var(--ga-card); color: var(--ga-ink); -moz-appearance: textfield; appearance: textfield; }
.ga-qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.ga-discount { display: flex; flex-direction: column; font-size: 12px; color: var(--ga-muted); flex: none; }
.ga-discount input { width: 84px; height: 44px; padding: 0 8px; font-size: 15px; border-radius: 8px; border: 1px solid var(--ga-line); background: var(--ga-card); color: var(--ga-ink); }
.ga-line-total { margin-left: auto; font-size: 16px; font-weight: 700; line-height: 44px; font-variant-numeric: tabular-nums; }

.ga-cart-foot { padding: 10px 16px; border-top: 1px solid var(--ga-line); display: flex; flex-direction: column; gap: 8px; flex: none; }
.ga-sums div { display: flex; justify-content: space-between; font-size: 15px; color: var(--ga-muted); padding: 1px 0; }
.ga-total { display: flex; justify-content: space-between; align-items: baseline; }
.ga-total span { font-size: 16px; font-weight: 600; }
.ga-total strong { font-size: 30px; font-weight: 800; color: var(--ga-red); font-variant-numeric: tabular-nums; line-height: 1.1; }
.ga-complete { min-height: 48px; font-size: 19px; font-weight: 800; }
.ga-last { text-align: center; padding: 2px 0; font-size: 14px; }
.ga-shortcuts { display: none; text-align: center; font-size: 12px; color: var(--ga-muted); }
.ga-shortcuts kbd { border: 1px solid var(--ga-line); border-radius: 4px; padding: 0 5px; font-family: inherit; }

/* Wide cart: one row per item, so many more items fit without scrolling. */
@container (min-width: 520px) {
    .ga-cart-cols { display: flex; gap: 12px; padding: 6px 16px; font-size: 12px; font-weight: 600; color: var(--ga-muted); border-bottom: 1px solid var(--ga-line); flex: none; }
    .ga-col-item { flex: 1 1 0; }
    .ga-col-qty { width: 140px; text-align: center; }
    .ga-col-discount { width: 84px; }
    .ga-col-total { width: 88px; text-align: right; }
    .ga-col-remove { width: 44px; }
    .ga-line { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
    .ga-line-top, .ga-line-controls { display: contents; }
    .ga-line-top > div:first-child { flex: 1 1 0; min-width: 0; order: 1; }
    .ga-qty { order: 2; }
    .ga-discount { order: 3; }
    .ga-discount span { display: none; }
    .ga-line-total { order: 4; width: 88px; margin-left: 0; text-align: right; }
    .ga-icon-btn { order: 5; }
}

/* Wide cart: totals and payment share a short strip instead of a tall stack. */
@container (min-width: 400px) {
    .ga-cart-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 20px; align-items: center; }
    .ga-sums { grid-column: 1; grid-row: 1; }
    .ga-total { grid-column: 2; grid-row: 1; }
    .ga-complete { grid-column: 1 / -1; grid-row: 2; }
    .ga-last { grid-column: 1; grid-row: 3; text-align: left; }
    .ga-shortcuts { grid-column: 2; grid-row: 3; text-align: right; }
}

.ga-pos-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px; background: var(--ga-card); border-top: 1px solid var(--ga-line); }
.ga-pos-bar span { display: block; font-size: 12px; color: var(--ga-muted); }
.ga-pos-bar strong { font-size: 22px; font-weight: 800; color: var(--ga-red); font-variant-numeric: tabular-nums; }

@media (min-width: 768px) {
    .ga-pos { grid-template-columns: minmax(0, 1fr) minmax(290px, 36%); padding-bottom: 0; align-items: start; }
    .ga-cart, .ga-pos-catalog { position: sticky; top: 76px; height: calc(100vh - 88px); }
    .ga-cart { grid-column: 1; grid-row: 1; }
    .ga-pos-catalog { grid-column: 2; grid-row: 1; overflow-y: auto; }
    .ga-pos-toolbar { position: sticky; top: 0; z-index: 1; margin-bottom: 0; padding: 2px 2px 8px; background: var(--ga-bg); }
    .ga-pos-bar { display: none; }
}
@media (min-width: 1280px) {
    .ga-shortcuts { display: block; }
}

/* ---------- OTP pages ---------- */
.ga-auth-body { margin: 0; min-height: 100vh; background: var(--ga-bg); color: var(--ga-ink); font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; display: flex; align-items: flex-start; justify-content: center; padding: 16px; box-sizing: border-box; }
.ga-auth-card { background: var(--ga-card); border: 1px solid var(--ga-line); border-radius: 14px; padding: 24px; width: 100%; max-width: 440px; box-sizing: border-box; margin-top: 4vh; }
.ga-auth-brand { margin-bottom: 16px; }
.ga-auth-title { font-size: 22px; font-weight: 700; margin: 0 0 8px; }
.ga-auth-text { font-size: 16px; color: var(--ga-muted); margin: 0 0 12px; line-height: 1.45; }
.ga-auth-form { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.ga-auth-logout { text-align: center; margin-top: 8px; }
.ga-label { font-size: 15px; font-weight: 600; }
.ga-input { min-height: 48px; border-radius: 8px; border: 1px solid var(--ga-line); background: var(--ga-card); color: var(--ga-ink); font-size: 18px; padding: 0 12px; box-sizing: border-box; width: 100%; }
.ga-input-code { font-size: 24px; letter-spacing: 3px; text-align: center; }
.ga-input:focus { outline: 2px solid var(--ga-red); border-color: transparent; }
.ga-error { color: var(--ga-out-ink); font-size: 15px; margin: 0; }
.ga-qr { display: flex; justify-content: center; background: #fff; padding: 8px; border-radius: 8px; margin-bottom: 12px; }
.ga-qr svg { width: 220px; height: 220px; max-width: 100%; }
.ga-secret { display: block; text-align: center; font-size: 15px; padding: 10px; background: var(--ga-bg); border-radius: 8px; overflow-wrap: anywhere; }
.ga-codes { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ga-codes code { display: block; text-align: center; padding: 8px 4px; background: var(--ga-bg); border-radius: 6px; font-size: 15px; }
.ga-auth-card .ga-btn { width: 100%; box-sizing: border-box; }

/* ---------- Receipt ---------- */
.ga-receipt-body { margin: 0; background: var(--ga-bg); font-family: ui-monospace, Consolas, Menlo, monospace; color: #1C1B1A; padding: 16px; }
.ga-receipt { background: #fff; max-width: 340px; margin: 0 auto; padding: 20px; border-radius: 8px; font-size: 14px; }
.ga-receipt h1 { font-size: 20px; text-align: center; margin: 0 0 10px; }
.ga-receipt p { margin: 2px 0; }
.ga-receipt table { width: 100%; border-collapse: collapse; margin-top: 12px; border-top: 1px dashed #888; }
.ga-receipt td { padding: 3px 0; }
.ga-receipt tfoot tr:first-child td { border-top: 1px dashed #888; padding-top: 8px; }
.ga-receipt-sub { color: #444; }
.ga-receipt-total td { font-size: 18px; font-weight: 700; }
.ga-receipt-void { text-align: center; font-weight: 700; font-size: 18px; border: 2px solid #1C1B1A; }
.ga-receipt-thanks { text-align: center; margin-top: 14px !important; }
.ga-receipt .ga-btn { width: 100%; margin-top: 14px; }
@media print {
    .ga-no-print { display: none !important; }
    .ga-receipt-body { background: #fff; padding: 0; }
    .ga-receipt { max-width: 80mm; padding: 0; border-radius: 0; }
}
