/* =====================================================================
   Soko — app stylesheet (Bootstrap 5 + these styles)
   Brand colours come from Settings (--brand-dark / --brand-gold).
   ===================================================================== */
@font-face { font-family: "Jost"; font-weight: 400; font-display: swap; src: url("../vendor/fonts/jost-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 500; font-display: swap; src: url("../vendor/fonts/jost-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 600; font-display: swap; src: url("../vendor/fonts/jost-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 700; font-display: swap; src: url("../vendor/fonts/jost-latin-700-normal.woff2") format("woff2"); }

:root {
  --brand-dark: #1a222f;
  --brand-gold: #c5a059;
  --brand-orange: #e67e22;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e8ebf0;
  --bg: #f4f6f8;
  --card: #fff;
  --green: #16a34a;
  --red: #dc2626;
  --amber: #d97706;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 18px rgba(16, 24, 40, .05);
  --sidebar-w: 256px;
  --bs-body-font-family: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
}

body.app { background: var(--bg); color: var(--ink); font-family: var(--bs-body-font-family); font-size: 15px; min-height: 100vh; }
a { color: var(--brand-dark); }
a:hover { color: var(--brand-orange); }
h1, h2, h3, h4, h5 { color: var(--brand-dark); font-weight: 600; letter-spacing: -.01em; }
.text-gold { color: var(--brand-gold) !important; }
.small-muted { color: var(--muted); font-size: .85rem; }
:focus-visible { outline: 3px solid rgba(197, 160, 89, .55); outline-offset: 2px; }

/* ---------- Sidebar ---------- */
.sidebar { position: fixed; inset: 0 auto var(--demo-h, 0px) 0; width: var(--sidebar-w); background: var(--brand-dark); color: #cbd5e1; display: flex; flex-direction: column; z-index: 1040; transition: transform .3s cubic-bezier(.4, 0, .2, 1); }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 18px 16px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand img { width: 42px; height: 42px; object-fit: contain; border-radius: 10px; background: #fff; padding: 3px; }
.brand-mark { width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--brand-gold); color: var(--brand-dark); display: grid; place-items: center; font-size: 1.15rem; }
.brand-text { min-width: 0; }
.brand-text strong { display: block; color: #fff; font-size: 1rem; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.brand-text small { display: block; color: var(--brand-gold); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-close { display: none; background: rgba(255, 255, 255, .08); border: 0; color: #fff; width: 36px; height: 36px; border-radius: 10px; }
.sidebar-menu { flex: 1; overflow-y: auto; padding: 8px 12px 16px; scrollbar-width: thin; scrollbar-color: rgba(197, 160, 89, .3) transparent; }
.menu-group { display: block; font-size: .66rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #64748b; padding: 16px 12px 6px; }
.menu-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #cbd5e1; text-decoration: none; font-weight: 500; font-size: .93rem; transition: background .2s, color .2s; position: relative; }
.menu-link i { width: 20px; text-align: center; opacity: .85; }
.menu-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.menu-link.active { background: rgba(197, 160, 89, .16); color: #fff; }
.menu-link.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand-gold); }
.menu-link.active i { color: var(--brand-gold); opacity: 1; }
.menu-count { margin-left: auto; font-style: normal; font-size: .7rem; font-weight: 700; background: var(--brand-gold); color: var(--brand-dark); padding: 1px 8px; border-radius: 99px; }
.menu-count.warn { background: #ef4444; color: #fff; }
.sidebar-foot { display: flex; align-items: center; gap: 8px; padding: 14px 12px; border-top: 1px solid rgba(255, 255, 255, .06); background: rgba(0, 0, 0, .12); }
.sidebar-foot form { margin: 0; }
.me { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 6px; border-radius: 10px; }
.me:hover, .me.active { background: rgba(255, 255, 255, .06); }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--brand-gold); color: var(--brand-dark); display: grid; place-items: center; font-weight: 700; }
.me-text { min-width: 0; }
.me-text strong { display: block; color: #fff; font-size: .88rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text small { color: var(--brand-gold); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.logout { width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(239, 68, 68, .5); background: transparent; color: #f87171; }
.logout:hover { background: #ef4444; color: #fff; }
.sidebar-overlay { display: none; }

/* ---------- Main ---------- */
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 1020; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 12px 28px; min-height: 68px; }
.menu-btn { display: none; width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--bg); color: var(--brand-dark); }
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 1.25rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title small { color: var(--muted); font-size: .8rem; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.content { flex: 1; padding: 24px 28px 32px; width: 100%; max-width: 1500px; }
.app-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 28px; color: var(--muted); font-size: .8rem; border-top: 1px solid var(--line); }
.app-foot a { color: inherit; }

/* ---------- Buttons ---------- */
.btn { font-weight: 500; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-gold { background: var(--brand-gold); border-color: var(--brand-gold); color: var(--brand-dark); }
.btn-gold:hover, .btn-gold:focus { background: color-mix(in srgb, var(--brand-gold) 85%, #000); border-color: color-mix(in srgb, var(--brand-gold) 85%, #000); color: var(--brand-dark); }
.btn-ink { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-ink:hover, .btn-ink:focus { background: color-mix(in srgb, var(--brand-dark) 85%, #fff); color: #fff; }
.btn-soft { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.btn-soft:hover { border-color: var(--brand-dark); color: var(--brand-dark); }
.btn-icon { width: 34px; height: 34px; padding: 0; }
.btn-danger-soft { background: #fff; border: 1px solid #fecaca; color: var(--red); }
.btn-danger-soft:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- Cards ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.panel-head h2 { font-size: 1.02rem; margin: 0; display: flex; align-items: center; gap: 8px; }
.panel-head h2 i { color: var(--brand-gold); }
.panel-head h2 small { font-weight: 400; color: var(--muted); font-size: .8rem; }
.panel.flush { padding: 0; }
.panel.flush .panel-head { padding: 18px 20px 0; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: flex; gap: 14px; align-items: center; min-width: 0; }
.stat-icon { width: 46px; height: 46px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 1.1rem; }
.stat-icon.gold { background: rgba(197, 160, 89, .15); color: #9a7a35; }
.stat-icon.ink { background: rgba(26, 34, 47, .08); color: var(--brand-dark); }
.stat-icon.green { background: #dcfce7; color: var(--green); }
.stat-icon.red { background: #fee2e2; color: var(--red); }
.stat-icon.orange { background: #ffedd5; color: #c2410c; }
.stat-icon.blue { background: #dbeafe; color: #1d4ed8; }
.stat p { margin: 0; color: var(--muted); font-size: .8rem; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }
.stat strong { display: block; font-size: 1.35rem; font-weight: 700; color: var(--brand-dark); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat small { color: var(--muted); font-size: .78rem; }
.stat small.up { color: var(--green); }
.stat small.down { color: var(--red); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-app { width: 100%; margin: 0; border-collapse: collapse; font-size: .9rem; }
.table-app th { text-align: left; font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 11px 14px; background: #f9fafb; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table-app td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table-app tbody tr:hover { background: #fafbfc; }
.table-app tbody tr:last-child td { border-bottom: 0; }
.table-app .num { text-align: right; white-space: nowrap; }
.table-app small { color: var(--muted); }
.row-link { cursor: pointer; }
.actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }
.actions form { margin: 0; }
.item-cell { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.item-cell strong { display: block; font-weight: 600; color: var(--brand-dark); }

.thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; border: 1px solid var(--line); background: #fff; }
.tile { display: grid; place-items: center; color: #fff; border: 0; background: linear-gradient(135deg, color-mix(in srgb, var(--tint) 88%, #fff), color-mix(in srgb, var(--tint) 75%, #000)); }
.tile i { font-size: 1.05em; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.thumb.tile { font-size: 1.05rem; }

.badge-soft { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: .74rem; font-weight: 600; white-space: nowrap; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-secondary { background: #eef0f3; color: #475569; }
.badge-info { background: #e0f2fe; color: #075985; }
.badge-gold { background: rgba(197, 160, 89, .18); color: #7c5f22; }
.stock-bar { width: 70px; height: 5px; border-radius: 99px; background: #eef0f3; overflow: hidden; margin-top: 4px; }
.stock-bar i { display: block; height: 100%; background: var(--green); }
.stock-bar i.low { background: var(--red); }

/* ---------- Forms ---------- */
.form-label { font-weight: 600; font-size: .82rem; color: var(--brand-dark); margin-bottom: 5px; }
.form-control, .form-select { border-radius: 10px; border-color: #dfe3e8; padding: .55rem .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--brand-gold); box-shadow: 0 0 0 .2rem rgba(197, 160, 89, .2); }
.form-text { font-size: .78rem; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 18px; }
.filters .form-control, .filters .form-select { width: auto; min-width: 140px; flex: 1 1 150px; }
.filters .grow { flex: 3 1 220px; }
.seg { display: inline-flex; background: #eef0f3; padding: 4px; border-radius: 12px; gap: 2px; flex-wrap: wrap; }
.seg a, .seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 9px; font-weight: 500; font-size: .86rem; color: var(--muted); text-decoration: none; }
.seg .on { background: #fff; color: var(--brand-dark); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

.alert { border-radius: 12px; border: 0; font-size: .92rem; }
.alert-success { background: #ecfdf3; color: #067647; }
.alert-error { background: #fef3f2; color: #b42318; }
.alert-info { background: #eff8ff; color: #175cd3; }
.alert-warning { background: #fffaeb; color: #b54708; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.empty i { font-size: 2rem; color: #d1d5db; display: block; margin-bottom: 10px; }

.pager { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; padding: 16px; }
.pager a, .pager span { min-width: 36px; height: 36px; padding: 0 10px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-weight: 500; }
.pager .current { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .grow strong { display: block; font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .grow small { color: var(--muted); }
.chart-box { position: relative; height: 290px; }
.chart-box.sm { height: 240px; }
.bar-list .bar-row { margin-bottom: 12px; }
.bar-list .bar-row div:first-child { display: flex; justify-content: space-between; font-size: .88rem; margin-bottom: 4px; }
.bar-list .track { height: 8px; border-radius: 99px; background: #eef0f3; overflow: hidden; }
.bar-list .track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand-gold), var(--brand-orange)); }

/* ---------- Bulk add rows ---------- */
.add-row { border: 1px solid var(--line); border-left: 4px solid var(--brand-gold); border-radius: 12px; padding: 14px; margin-bottom: 12px; background: #fff; position: relative; }
.add-row .remove-row { position: absolute; top: 6px; right: 8px; border: 0; background: none; color: var(--red); }

/* ---------- POS ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
.pos-search { position: sticky; top: 68px; z-index: 5; background: var(--bg); padding-bottom: 12px; }
.pos-search .search-box { position: relative; }
.pos-search .search-box i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.pos-search input { padding: .8rem 1rem .8rem 44px; font-size: 1rem; border-radius: 12px; }
.pos-cats { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.pos-cats button { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 14px; font-size: .86rem; font-weight: 500; color: var(--ink); }
.pos-cats button.on { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 0; text-align: left; overflow: hidden; transition: transform .15s, box-shadow .15s, border-color .15s; display: flex; flex-direction: column; cursor: pointer; }
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--brand-gold); }
.pcard:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.pcard .pimg { width: 100%; aspect-ratio: 4 / 3; height: auto; border-radius: 0; border: 0; font-size: 2rem; object-fit: cover; }
.pcard .pbody { padding: 10px 12px 12px; }
.pcard .pname { font-weight: 600; font-size: .88rem; line-height: 1.25; color: var(--brand-dark); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.2em; }
.pcard .pvar { font-size: .76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .pfoot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; gap: 6px; }
.pcard .pprice { font-weight: 700; color: var(--brand-dark); font-size: .92rem; white-space: nowrap; }
.pcard .pstock { font-size: .72rem; color: var(--muted); white-space: nowrap; }
.pcard .pstock.low { color: var(--red); font-weight: 600; }

.cart { position: sticky; top: 84px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; max-height: calc(100vh - 104px); }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.cart-head h2 { font-size: 1.05rem; margin: 0; }
.cart-items { flex: 1; overflow-y: auto; padding: 6px 18px; min-height: 120px; }
.cart-empty { text-align: center; color: var(--muted); padding: 34px 0; font-size: .9rem; }
.cart-empty i { font-size: 2rem; display: block; color: #d1d5db; margin-bottom: 8px; }
.citem { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.citem:last-child { border-bottom: 0; }
.citem .cname { font-weight: 600; font-size: .9rem; color: var(--brand-dark); line-height: 1.25; }
.citem .cvar { font-size: .76rem; color: var(--muted); }
.citem .cline { font-weight: 700; text-align: right; white-space: nowrap; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.qty button { width: 30px; height: 30px; border: 0; background: #f8fafc; color: var(--brand-dark); }
.qty input { width: 44px; height: 30px; border: 0; text-align: center; font-weight: 600; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.citem .cremove { border: 0; background: none; color: #9ca3af; font-size: .82rem; }
.citem .cremove:hover { color: var(--red); }
.cart-foot { border-top: 1px solid var(--line); padding: 14px 18px 18px; background: #fbfbfc; border-radius: 0 0 16px 16px; }
.totals .kv { padding: 5px 0; border: 0; }
.totals .grand { font-size: 1.35rem; font-weight: 700; color: var(--brand-dark); border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.totals .grand span { color: var(--brand-dark); }
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.pay-methods input { position: absolute; opacity: 0; }
.pay-methods label { border: 1px solid var(--line); border-radius: 10px; padding: 9px 6px; text-align: center; font-weight: 600; font-size: .85rem; cursor: pointer; background: #fff; display: flex; flex-direction: column; gap: 3px; align-items: center; }
.pay-methods label i { font-size: 1rem; color: var(--muted); }
.pay-methods input:checked + label { border-color: var(--brand-dark); background: var(--brand-dark); color: #fff; }
.pay-methods input:checked + label i { color: var(--brand-gold); }
.pay-methods input:focus-visible + label { outline: 3px solid rgba(197, 160, 89, .55); }
.pay-box { display: none; }
.pay-box.on { display: block; }
.quick-cash { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.quick-cash button { border: 1px solid var(--line); background: #fff; border-radius: 8px; font-size: .78rem; padding: 3px 9px; }
.change-line { font-size: .9rem; margin-top: 6px; }
.btn-charge { width: 100%; padding: 14px; font-size: 1.05rem; font-weight: 700; border-radius: 12px; margin-top: 12px; }
.pos-mobile-bar { display: none; }
.wait-box { text-align: center; padding: 30px 10px; }
.spinner-gold { width: 54px; height: 54px; border-radius: 50%; border: 4px solid rgba(197, 160, 89, .25); border-top-color: var(--brand-gold); animation: spin .9s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
.done-mark { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; font-size: 1.7rem; background: #dcfce7; color: var(--green); }
.done-mark.bad { background: #fee2e2; color: var(--red); }

/* ---------- Receipt ---------- */
.receipt-wrap { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 24px; align-items: start; }
.receipt { background: #fff; width: 100%; max-width: 380px; margin: 0 auto; padding: 22px 20px; font-family: "Courier New", ui-monospace, monospace; font-size: 13px; color: #111; box-shadow: var(--shadow); border-radius: 6px; position: relative; }
.receipt::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px; background: radial-gradient(circle at 6px -2px, transparent 6px, #fff 6.5px) repeat-x; background-size: 12px 8px; }
.receipt .c { text-align: center; }
.receipt h2 { font-family: inherit; font-size: 17px; margin: 0 0 2px; color: #111; text-transform: uppercase; letter-spacing: .04em; }
.receipt .rlogo { max-width: 120px; max-height: 60px; margin: 0 auto 8px; display: block; }
.receipt hr { border: 0; border-top: 1px dashed #555; margin: 10px 0; opacity: 1; }
.receipt table { width: 100%; border-collapse: collapse; }
.receipt td { padding: 2px 0; vertical-align: top; }
.receipt td.r { text-align: right; white-space: nowrap; padding-left: 8px; }
.receipt .big td { font-size: 15px; font-weight: 700; }
.receipt .void-stamp { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-18deg); border: 3px solid #dc2626; color: #dc2626; font-size: 30px; font-weight: 700; padding: 4px 16px; letter-spacing: .1em; opacity: .85; }

/* ---------- Login ---------- */
.login-body { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: #fff; font-family: var(--bs-body-font-family); }
.login-art { background: var(--brand-dark); color: #e2e8f0; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; right: -180px; top: -160px; background: radial-gradient(circle, rgba(197, 160, 89, .25), transparent 65%); }
.login-art::after { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; left: -140px; bottom: -140px; background: radial-gradient(circle, rgba(230, 126, 34, .18), transparent 65%); }
.login-art > * { position: relative; z-index: 1; }
.login-art h1 { color: #fff; font-size: 2.4rem; line-height: 1.15; max-width: 460px; margin: 0 0 16px; }
.login-art h1 span { color: var(--brand-gold); }
.login-art p { color: #94a3b8; max-width: 440px; }
.login-feats { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.login-feats li { display: flex; gap: 12px; align-items: center; color: #cbd5e1; }
.login-feats i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(197, 160, 89, .15); color: var(--brand-gold); }
.login-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.login-card { width: min(400px, 100%); }
.login-card h2 { font-size: 1.7rem; margin-bottom: 4px; }
.pass-wrap { position: relative; }
.pass-wrap .form-control { padding-right: 46px; }
.pass-wrap button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); width: 36px; height: 36px; }

/* ---------- Settings tabs ---------- */
.set-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
.set-tabs { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; }
.set-tabs a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: .92rem; }
.set-tabs a i { width: 18px; text-align: center; color: var(--muted); }
.set-tabs a.on { background: rgba(197, 160, 89, .14); color: var(--brand-dark); }
.set-tabs a.on i { color: var(--brand-gold); }
.icon-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.icon-pick input { position: absolute; opacity: 0; }
.icon-pick span { height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; color: var(--brand-dark); }
.icon-pick input:checked + span { background: var(--brand-dark); color: var(--brand-gold); border-color: var(--brand-dark); }
.code-box { display: flex; gap: 8px; align-items: center; }
.code-box code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; padding: 8px 10px; background: #f3f4f6; border-radius: 8px; font-size: .8rem; color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos { grid-template-columns: minmax(0, 1fr) 360px; }
}
@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .35); }
  .sidebar-close { display: grid; place-items: center; }
  .sidebar-overlay { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .55); z-index: 1035; opacity: 0; pointer-events: none; transition: opacity .3s; }
  .sidebar-overlay.show { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }
  .menu-btn { display: grid; place-items: center; }
  .topbar { padding: 10px 16px; }
  .content { padding: 18px 16px 90px; }
  .app-foot { padding: 14px 16px; }
  .set-layout, .receipt-wrap { grid-template-columns: minmax(0, 1fr); }
  .set-tabs { position: static; flex-direction: row; overflow-x: auto; }
  .set-tabs a { white-space: nowrap; }
  .pos { grid-template-columns: minmax(0, 1fr); }
  .cart { position: fixed; inset: auto 0 var(--demo-h, 0px) 0; max-height: 88vh; border-radius: 18px 18px 0 0; z-index: 1030; transform: translateY(105%); transition: transform .3s ease; }
  .cart.open { transform: none; box-shadow: 0 -10px 40px rgba(0, 0, 0, .25); }
  .pos-mobile-bar { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--demo-h, 0px)); z-index: 1025; background: var(--brand-dark); color: #fff; border: 0; border-radius: 14px; padding: 14px 18px; justify-content: space-between; align-items: center; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
  .pos-mobile-bar b { color: var(--brand-gold); }
  .pos-search { top: 60px; }
}
@media (max-width: 640px) {
  body.app { font-size: 14px; }
  .stats { gap: 10px; }
  .stat { padding: 14px; gap: 10px; flex-direction: column; align-items: flex-start; }
  .stat-icon { width: 38px; height: 38px; font-size: .95rem; }
  .stat strong { font-size: 1.1rem; }
  .panel { padding: 16px; }
  .pos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .login-body { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .topbar-title h1 { font-size: 1.05rem; }
  .filters .form-control, .filters .form-select { min-width: 0; }
}

/* ---------- Print (receipts and reports) ---------- */
@media print {
  @page { margin: 8mm; }
  body.app { background: #fff; }
  .sidebar, .sidebar-overlay, .topbar, .app-foot, .no-print, .pos-mobile-bar, #ub-demo-bar { display: none !important; }
  .main { margin: 0; }
  .content { padding: 0; max-width: none; }
  .panel { box-shadow: none; border-color: #ddd; break-inside: avoid; }
  .receipt-wrap { display: block; }
  .receipt { box-shadow: none; padding: 0; max-width: none; width: 100%; }
  .receipt::after { display: none; }
  body.print-receipt .receipt-side { display: none !important; }
}
