/* =====================================================================
   Gold POS — Modern Theme  (Phase 1)
   Loads AFTER assets/css/app.css and bootstrap. Legacy print / invoice /
   memo rules are left untouched: every visual override below lives inside
   @media screen, so printed invoices & memos look exactly as before.
   ===================================================================== */

:root {
  --gs-ink: #1b1b3a;
  --gs-ink-2: #3b3f66;
  --gs-muted: #7a7fa3;
  --gs-line: #e6e8f5;
  --gs-bg: #f3f4fb;
  --gs-surface: #ffffff;
  --gs-primary: #5b4bdb;
  --gs-primary-2: #7c5cff;
  --gs-gold: #ffb020;
  --gs-gold-2: #ff8a00;
  --gs-radius: 20px;
  --gs-shadow: 0 1px 2px rgba(27,27,58,.04), 0 12px 32px -14px rgba(66,56,160,.18);
  --gs-shadow-lg: 0 24px 60px -20px rgba(43,27,122,.35);
  --sidebar-width: 286px;
  --mobile-nav-h: 92px;
  --gs-font: 'Plus Jakarta Sans', 'Noto Sans Bengali','Hind Siliguri', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* colour chips: every .gs-c-* sets a gradient pair + rgb triplet */
.gs-c-gold    { --c1:#ffc233; --c2:#ff8a00; --cr:255,176,32; }
.gs-c-violet  { --c1:#9b8cff; --c2:#5b4bdb; --cr:139,124,255; }
.gs-c-emerald { --c1:#34d399; --c2:#059669; --cr:52,211,153; }
.gs-c-sky     { --c1:#38bdf8; --c2:#2563eb; --cr:56,189,248; }
.gs-c-rose    { --c1:#fb7185; --c2:#e11d48; --cr:251,113,133; }
.gs-c-fuchsia { --c1:#f0abfc; --c2:#c026d3; --cr:232,121,249; }
.gs-c-teal    { --c1:#2dd4bf; --c2:#0d9488; --cr:45,212,191; }
.gs-c-orange  { --c1:#fdba74; --c2:#ea580c; --cr:253,186,116; }
.gs-c-slate   { --c1:#cbd5e1; --c2:#64748b; --cr:203,213,225; }

@keyframes gs-rise   { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:none; } }
@keyframes gs-float  { 0%,100% { transform:translateY(0) rotate(-8deg); } 50% { transform:translateY(-10px) rotate(-4deg); } }
@keyframes gs-pulse  { 0%,100% { opacity:.55; transform:scale(1); } 50% { opacity:.9; transform:scale(1.08); } }

/* =====================================================================
   SCREEN ONLY
   ===================================================================== */
@media screen {

:root {
  --bs-body-font-family: var(--gs-font);
  --bs-body-color: var(--gs-ink);
  --bs-body-bg: var(--gs-bg);
  --bs-primary-rgb: 91,75,219;
  --bs-success-rgb: 14,159,110;
  --bs-danger-rgb: 225,29,72;
  --bs-warning-rgb: 245,158,11;
  --bs-info-rgb: 14,154,167;
  --bs-border-color: var(--gs-line);
  --bs-link-color-rgb: 91,75,219;
  --bs-link-hover-color-rgb: 67,56,202;
}

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--gs-font);
  font-size: .96rem;
  color: var(--gs-ink);
  background:
    radial-gradient(900px 380px at 100% -8%, rgba(124,92,255,.13), transparent 70%),
    radial-gradient(700px 320px at -5% 0%, rgba(255,176,32,.14), transparent 70%),
    var(--gs-bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(124,92,255,.25); }
h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6 { font-weight: 700; letter-spacing: -.01em; color: var(--gs-ink); }
a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.text-muted { color: var(--gs-muted) !important; }
.fw-semibold { font-weight: 650 !important; }
hr { border-color: var(--gs-line); opacity: 1; }
* { scrollbar-width: thin; scrollbar-color: #cfd2ec transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #cfd2ec; border-radius: 8px; }

/* ---------- page entrance ---------- */
.page-body > * { animation: gs-rise .5s cubic-bezier(.22,1,.36,1) both; }
.page-body > *:nth-child(2) { animation-delay: .05s; }
.page-body > *:nth-child(3) { animation-delay: .1s; }
.page-body > *:nth-child(4) { animation-delay: .15s; }
.page-body > *:nth-child(n+5) { animation-delay: .2s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* =====================================================================
   SHELL — sidebar
   ===================================================================== */
.gs-sidebar {
  height: 100vh; max-height: 100vh; min-height: 0 !important;
  padding: 0; color: #fff;
  background:
    radial-gradient(420px 260px at 0% 0%, rgba(255,176,32,.22), transparent 70%),
    radial-gradient(380px 300px at 100% 100%, rgba(139,92,246,.28), transparent 70%),
    linear-gradient(180deg, #1e1b4b 0%, #2a1f6b 55%, #36207a 100%);
  border-right: 1px solid rgba(255,255,255,.06);
  transition: width .25s ease, min-width .25s ease, max-width .25s ease, flex-basis .25s ease;
}
.gs-brand { display:flex; align-items:center; gap:.8rem; padding: 1.35rem 1.25rem 1rem; text-decoration:none; color:#fff; }
.gs-brand-logo {
  width: 46px; height: 46px; flex: 0 0 46px; border-radius: 15px; display:grid; place-items:center; font-size:1.35rem; color:#3a2300;
  background: linear-gradient(135deg, #ffe08a, #ffb020 55%, #ff8a00);
  box-shadow: 0 10px 24px -6px rgba(255,176,32,.65), inset 0 1px 0 rgba(255,255,255,.6);
}
.gs-brand-text { min-width:0; line-height:1.2; }
.gs-brand-text strong { display:block; font-size:1.05rem; font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:#fff; }
.gs-brand-text small { color: rgba(255,255,255,.55); font-size:.76rem; letter-spacing:.04em; }

.gs-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: .25rem .85rem 1rem; }
.gs-nav::-webkit-scrollbar { width: 5px; }
.gs-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); }
.gs-group-title { margin: 1.1rem .65rem .45rem; font-size:.68rem; letter-spacing:.14em; text-transform:uppercase; color: rgba(255,255,255,.4); font-weight:700; white-space:nowrap; }
.gs-nav ul { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:3px; }
.gs-link {
  position: relative; display:flex; align-items:center; gap:.8rem; padding:.5rem .65rem; border-radius:14px;
  color: rgba(255,255,255,.78); text-decoration:none; font-weight:550; font-size:.93rem; transition: background .18s, color .18s, transform .18s;
}
.gs-link:hover { background: rgba(255,255,255,.08); color:#fff; }
.gs-link .gs-ico {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 11px; display:grid; place-items:center; font-size:1.02rem;
  background: rgba(var(--cr), .16); color: var(--c1); transition: background .2s, color .2s, box-shadow .2s;
}
.gs-link:hover .gs-ico { background: rgba(var(--cr), .26); }
.gs-link .gs-nav-label { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.gs-link.is-active { background: linear-gradient(90deg, rgba(255,255,255,.17), rgba(255,255,255,.05)); color:#fff; font-weight:700; }
.gs-link.is-active::before { content:""; position:absolute; left:-.85rem; top:22%; bottom:22%; width:4px; border-radius:0 6px 6px 0; background: linear-gradient(180deg,#ffd978,#ff9d00); box-shadow: 0 0 14px rgba(255,176,32,.8); }
.gs-link.is-active .gs-ico { background: linear-gradient(135deg, var(--c1), var(--c2)); color:#fff; box-shadow: 0 8px 18px -6px rgba(var(--cr), .9); }

.gs-side-foot { padding: .85rem; border-top:1px solid rgba(255,255,255,.08); background: rgba(10,8,40,.28); }
.gs-usercard { display:flex; align-items:center; gap:.7rem; padding:.45rem; border-radius:16px; background: rgba(255,255,255,.07); }
.gs-avatar { width:40px; height:40px; flex:0 0 40px; border-radius:13px; display:grid; place-items:center; font-weight:800; color:#fff; background: linear-gradient(135deg, var(--c1,#9b8cff), var(--c2,#5b4bdb)); box-shadow: 0 6px 14px -4px rgba(var(--cr,139,124,255), .8); }
.gs-user-meta { min-width:0; flex:1; line-height:1.2; }
.gs-user-meta strong { display:block; font-size:.88rem; color:#fff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.gs-user-meta small { color: rgba(255,255,255,.55); font-size:.74rem; }
.gs-logout { display:flex; align-items:center; justify-content:center; gap:.55rem; width:100%; height:42px; margin-top:.6rem; border-radius:13px; font-weight:700; font-size:.9rem; color:#fff; background: linear-gradient(135deg,#fb7185,#e11d48); text-decoration:none; transition: transform .18s, box-shadow .18s; box-shadow: 0 10px 20px -8px rgba(225,29,72,.75); }
.gs-logout:hover { color:#fff; transform: translateY(-2px); }
.gs-credit { margin-top:.7rem; padding:0 .3rem; font-size:.7rem; color: rgba(255,255,255,.4); line-height:1.5; }

/* collapsed desktop sidebar */
body.gs-collapsed { --sidebar-width: 92px; }
body.gs-collapsed .gs-brand { justify-content:center; padding-inline:.5rem; }
body.gs-collapsed .gs-brand-text,
body.gs-collapsed .gs-nav-label,
body.gs-collapsed .gs-group-title,
body.gs-collapsed .gs-user-meta,
body.gs-collapsed .gs-credit { display:none; }
body.gs-collapsed .gs-link { justify-content:center; padding-inline:.4rem; }
body.gs-collapsed .gs-link.is-active::before { left:-.85rem; }
body.gs-collapsed .gs-usercard { flex-direction:column; padding:.5rem .25rem; }
body.gs-collapsed .gs-nav { padding-inline:.6rem; }

/* =====================================================================
   SHELL — top bars
   ===================================================================== */
.main-content { background: transparent; }
.gs-topbar {
  z-index: 1030; padding: .85rem 1.5rem !important; min-height: 74px;
  background: rgba(255,255,255,.78) !important; backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--gs-line) !important; transition: box-shadow .25s;
}
.gs-topbar.is-scrolled { box-shadow: 0 10px 30px -18px rgba(43,27,122,.35); }
.gs-topbar .gs-top-left { display:flex; align-items:center; gap:1rem; min-width:0; }
.gs-iconbtn { width:42px; height:42px; border-radius:13px; display:grid; place-items:center; border:1px solid var(--gs-line); background:#fff; color: var(--gs-primary); font-size:1.15rem; cursor:pointer; transition: all .18s; padding:0; }
.gs-iconbtn:hover { background: var(--gs-primary); color:#fff; border-color: var(--gs-primary); transform: translateY(-1px); }
.gs-page-title { margin:0; font-size:1.25rem; font-weight:800; line-height:1.15; }
.gs-page-sub { color: var(--gs-muted); font-size:.8rem; }
.gs-top-right { display:flex; align-items:center; gap:.7rem; }
.gs-chip { display:inline-flex; align-items:center; gap:.45rem; padding:.45rem .8rem; border-radius:999px; font-size:.82rem; font-weight:600; background:#fff; border:1px solid var(--gs-line); color: var(--gs-ink-2); }
.gs-chip i { color: var(--gs-primary); }
.gs-chip.gs-chip-gold { background: linear-gradient(135deg,#fff3d1,#ffe29a); border-color:#ffd978; color:#7a4a00; }
.gs-chip.gs-chip-gold i { color:#d97706; }
.gs-chip-user { padding:.3rem .85rem .3rem .3rem; }
.gs-chip-user .gs-avatar { width:32px; height:32px; flex-basis:32px; border-radius:50%; font-size:.85rem; }

.gs-mobilebar { z-index:1030; background: linear-gradient(135deg,#231a6b,#4b33c9 60%,#6d4dff) !important; color:#fff; border-radius: 0 0 26px 26px; border:0 !important; box-shadow: 0 16px 34px -16px rgba(43,27,122,.7); position:sticky; top:0; }
.gs-mobilebar .gs-mrow { display:grid; grid-template-columns:44px minmax(0,1fr) auto; gap:.8rem; align-items:center; padding:.8rem 1rem .95rem; }
.gs-mobilebar .gs-mmenu { width:44px; height:44px; border-radius:14px; border:0; background: rgba(255,255,255,.16); color:#fff; font-size:1.4rem; display:grid; place-items:center; padding:0; }
.gs-mobilebar .gs-mtitle { font-weight:800; font-size:1.12rem; line-height:1.15; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:#fff; }
.gs-mobilebar .gs-msub { font-size:.74rem; color: rgba(255,255,255,.7); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.gs-mobilebar .gs-avatar { width:42px; height:42px; border-radius:14px; background: linear-gradient(135deg,#ffd978,#ff9d00); color:#3a2300; box-shadow:none; }

/* mobile off-canvas menu */
.mobile-sidebar.gs-offcanvas {
  --bs-offcanvas-width: min(86vw, 332px); border:0;
  background: radial-gradient(360px 240px at 0% 0%, rgba(255,176,32,.22), transparent 70%), linear-gradient(180deg,#1e1b4b,#2a1f6b 60%,#36207a);
  color:#fff; border-radius: 0 28px 28px 0;
}
.gs-offcanvas .offcanvas-header { border-bottom:1px solid rgba(255,255,255,.08); }
.gs-offcanvas .gs-nav { padding-top:0; }
.gs-offcanvas .offcanvas-body { overflow:hidden; display:flex; flex-direction:column; }
.gs-offcanvas .btn-close-white { filter: invert(1) grayscale(1) brightness(2); opacity:.8; margin-right:1rem; }
.gs-offcanvas .gs-brand { padding: 1.2rem 1rem .8rem; }

/* =====================================================================
   SHELL — bottom tab bar (mobile app feel)
   ===================================================================== */
.gs-tabbar {
  position: fixed; z-index: 1045; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom));
  height: 66px; display:grid; grid-template-columns: repeat(5, 1fr); align-items:center;
  background: rgba(255,255,255,.94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(124,92,255,.14); border-radius: 24px; box-shadow: 0 18px 44px -12px rgba(43,27,122,.45);
  transition: transform .3s ease, opacity .3s ease;
}
body.menu-open .gs-tabbar { transform: translateY(150%); opacity:0; pointer-events:none; }
.gs-tab { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; height:100%; text-decoration:none; color: var(--gs-muted); font-size:.68rem; font-weight:650; position:relative; -webkit-tap-highlight-color: transparent; }
.gs-tab i { font-size:1.28rem; line-height:1; transition: transform .2s; }
.gs-tab.is-active { color: var(--gs-primary); }
.gs-tab.is-active i { transform: translateY(-2px); }
.gs-tab.is-active::after { content:""; position:absolute; bottom:7px; width:5px; height:5px; border-radius:50%; background: var(--gs-primary); }
.gs-tab:active i { transform: scale(.85); }
.gs-tab-fab { justify-content:flex-end; padding-bottom:7px; }
.gs-tab-fab .gs-fab {
  width:58px; height:58px; border-radius:50%; margin-top:-30px; display:grid; place-items:center; font-size:1.5rem; color:#3a2300;
  background: linear-gradient(135deg,#ffe08a,#ffb020 55%,#ff8a00); border:5px solid #f3f4fb;
  box-shadow: 0 14px 28px -6px rgba(255,138,0,.7);
}
.gs-tab-fab.is-active::after { display:none; }
.gs-tab-fab.is-active .gs-fab { transform: none; box-shadow: 0 0 0 5px rgba(255,176,32,.25), 0 14px 28px -6px rgba(255,138,0,.8); }
.gs-tab-fab { color: #b45309; }

@media (max-width: 991.98px) {
  body { padding-bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom)) !important; }
  .page-body { padding-top: 1.1rem !important; }
}

/* =====================================================================
   COMPONENTS — buttons
   ===================================================================== */
.btn {
  --bs-btn-border-radius: 12px; --bs-btn-padding-x: 1.05rem; --bs-btn-padding-y: .55rem;
  font-weight: 650; letter-spacing: .005em; border-width: 1px;
  transition: transform .18s ease, box-shadow .22s ease, filter .22s ease, background-color .2s, color .2s;
}
.btn:focus-visible { box-shadow: 0 0 0 4px rgba(124,92,255,.25) !important; }
.btn-sm { --bs-btn-padding-x: .75rem; --bs-btn-padding-y: .34rem; --bs-btn-font-size: .82rem; --bs-btn-border-radius: 10px; }
.btn-lg { --bs-btn-padding-x: 1.6rem; --bs-btn-padding-y: .8rem; --bs-btn-border-radius: 14px; --bs-btn-font-size: 1.02rem; }
.btn:active { transform: translateY(1px) scale(.985); }

.btn-dark, .btn-primary {
  --bs-btn-color:#fff; --bs-btn-hover-color:#fff; --bs-btn-active-color:#fff; --bs-btn-border-color: transparent; --bs-btn-hover-border-color: transparent; --bs-btn-active-border-color: transparent;
  background: linear-gradient(135deg, var(--gs-primary-2), var(--gs-primary)); border: 0; color:#fff;
  box-shadow: 0 10px 22px -8px rgba(91,75,219,.65);
}
.btn-dark:hover, .btn-primary:hover { filter: brightness(1.07); transform: translateY(-1px); box-shadow: 0 14px 28px -8px rgba(91,75,219,.7); }
.btn-dark:active, .btn-primary:active { background: linear-gradient(135deg,#6d4dff,#4338ca); color:#fff; }
.btn-success { --bs-btn-color:#fff; --bs-btn-hover-color:#fff; background: linear-gradient(135deg,#34d399,#059669); border:0; box-shadow: 0 10px 22px -8px rgba(5,150,105,.6); }
.btn-danger  { --bs-btn-color:#fff; --bs-btn-hover-color:#fff; background: linear-gradient(135deg,#fb7185,#e11d48); border:0; box-shadow: 0 10px 22px -8px rgba(225,29,72,.55); }
.btn-warning { --bs-btn-color:#3a2300; --bs-btn-hover-color:#3a2300; background: linear-gradient(135deg,#ffd35a,#ffa11a); border:0; color:#3a2300; box-shadow: 0 10px 22px -8px rgba(255,138,0,.55); }
.btn-info    { --bs-btn-color:#fff; --bs-btn-hover-color:#fff; background: linear-gradient(135deg,#38bdf8,#2563eb); border:0; color:#fff; }
.btn-success:hover,.btn-danger:hover,.btn-warning:hover,.btn-info:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-light { --bs-btn-bg:#fff; --bs-btn-border-color: var(--gs-line); --bs-btn-hover-bg:#f6f5ff; --bs-btn-hover-border-color:#d9d6ff; --bs-btn-color: var(--gs-ink-2); }
.btn-secondary { --bs-btn-bg:#eef0fa; --bs-btn-border-color:#e1e4f4; --bs-btn-color:#4b5073; --bs-btn-hover-bg:#e3e6f6; --bs-btn-hover-color:#2e3157; --bs-btn-hover-border-color:#d3d7ee; }

/* outline buttons become soft tinted pills */
.btn-outline-dark      { --bs-btn-color:#4338ca; --bs-btn-bg:#f1efff; --bs-btn-border-color:#dcd8ff; --bs-btn-hover-color:#fff; --bs-btn-hover-bg:#5b4bdb; --bs-btn-hover-border-color:#5b4bdb; --bs-btn-active-bg:#4338ca; --bs-btn-active-color:#fff; --bs-btn-active-border-color:#4338ca; }
.btn-outline-primary   { --bs-btn-color:#1d5fd8; --bs-btn-bg:#eaf2ff; --bs-btn-border-color:#cfe0ff; --bs-btn-hover-color:#fff; --bs-btn-hover-bg:#2563eb; --bs-btn-hover-border-color:#2563eb; --bs-btn-active-bg:#1d4ed8; --bs-btn-active-color:#fff; --bs-btn-active-border-color:#1d4ed8; }
.btn-outline-info      { --bs-btn-color:#0b7f8c; --bs-btn-bg:#e3f7f9; --bs-btn-border-color:#bfeaef; --bs-btn-hover-color:#fff; --bs-btn-hover-bg:#0e9aa7; --bs-btn-hover-border-color:#0e9aa7; --bs-btn-active-bg:#0b7f8c; --bs-btn-active-color:#fff; --bs-btn-active-border-color:#0b7f8c; }
.btn-outline-secondary { --bs-btn-color:#4b5073; --bs-btn-bg:#f1f2fa; --bs-btn-border-color:#e0e3f3; --bs-btn-hover-color:#fff; --bs-btn-hover-bg:#5f6591; --bs-btn-hover-border-color:#5f6591; --bs-btn-active-bg:#4b5073; --bs-btn-active-color:#fff; --bs-btn-active-border-color:#4b5073; }
.btn-outline-danger    { --bs-btn-color:#d1163f; --bs-btn-bg:#fff0f3; --bs-btn-border-color:#ffd4dc; --bs-btn-hover-color:#fff; --bs-btn-hover-bg:#e11d48; --bs-btn-hover-border-color:#e11d48; --bs-btn-active-bg:#be123c; --bs-btn-active-color:#fff; --bs-btn-active-border-color:#be123c; }
.btn-outline-success   { --bs-btn-color:#0b7a4b; --bs-btn-bg:#e6f8ef; --bs-btn-border-color:#c3efd9; --bs-btn-hover-color:#fff; --bs-btn-hover-bg:#0e9f6e; --bs-btn-hover-border-color:#0e9f6e; --bs-btn-active-bg:#0b7a4b; --bs-btn-active-color:#fff; --bs-btn-active-border-color:#0b7a4b; }
.btn-outline-warning   { --bs-btn-color:#9a5b00; --bs-btn-bg:#fff6df; --bs-btn-border-color:#ffe3a3; --bs-btn-hover-color:#3a2300; --bs-btn-hover-bg:#ffb020; --bs-btn-hover-border-color:#ffb020; --bs-btn-active-bg:#ff9d00; --bs-btn-active-color:#3a2300; --bs-btn-active-border-color:#ff9d00; }
.btn-close:focus { box-shadow: 0 0 0 4px rgba(124,92,255,.2); }

/* =====================================================================
   COMPONENTS — cards
   ===================================================================== */
.card {
  --bs-card-border-radius: var(--gs-radius); --bs-card-inner-border-radius: calc(var(--gs-radius) - 1px);
  --bs-card-border-color: var(--gs-line); --bs-card-cap-padding-y: 1rem; --bs-card-cap-padding-x: 1.35rem;
  background: var(--gs-surface); border: 1px solid var(--gs-line);
}
.card.border-0 { border: 1px solid var(--gs-line) !important; }
.card.shadow-sm, .card.shadow, .card.shadow-lg, .card { box-shadow: var(--gs-shadow) !important; }
.card-body { padding: 1.35rem; }
.card-header { background: transparent !important; border-bottom: 1px solid var(--gs-line); font-size: 1rem; }
.card-header > strong, .card-header > h5, .card-header > h6 { display:inline-flex; align-items:center; gap:.6rem; font-weight:800; }
.card-header > strong::before { content:""; width:5px; height:18px; border-radius:6px; background: linear-gradient(180deg,#ffc233,#ff8a00); }
.card-footer { background: transparent; border-top:1px solid var(--gs-line); }
.card h5.mb-1, .card h5.mb-0 { font-weight:800; }

/* generic colourful stat card — also colours Reports page automatically */
.card.card-stat {
  --c1:#ffc233; --c2:#ff8a00; --cr:255,176,32;
  position:relative; overflow:hidden; border:0 !important; color:#fff;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 18px 36px -16px rgba(var(--cr), .85) !important;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card.card-stat::after { content:""; position:absolute; right:-34px; top:-34px; width:130px; height:130px; border-radius:50%; background: rgba(255,255,255,.17); }
.card.card-stat::before { content:""; position:absolute; right:30px; bottom:-48px; width:100px; height:100px; border-radius:50%; background: rgba(255,255,255,.1); }
.card.card-stat:hover { transform: translateY(-4px); }
.card.card-stat .card-body { position:relative; z-index:1; }
.row > [class*="col"] > .card.card-stat { height:100%; }
.card.card-stat .h3, .card.card-stat .h4 { white-space:nowrap; font-size:clamp(1.05rem, .9rem + .55vw, 1.4rem); }
.card.card-stat .text-muted, .card.card-stat .small { color: rgba(255,255,255,.85) !important; font-weight:600; }
.card.card-stat .h3, .card.card-stat .h4 { color:#fff; font-weight:800; }
.card.card-stat .bi { color: rgba(255,255,255,.9) !important; }
.row > [class*="col"]:nth-child(6n+2) > .card-stat { --c1:#9b8cff; --c2:#5b4bdb; --cr:139,124,255; }
.row > [class*="col"]:nth-child(6n+3) > .card-stat { --c1:#34d399; --c2:#059669; --cr:52,211,153; }
.row > [class*="col"]:nth-child(6n+4) > .card-stat { --c1:#38bdf8; --c2:#2563eb; --cr:56,189,248; }
.row > [class*="col"]:nth-child(6n+5) > .card-stat { --c1:#fb7185; --c2:#e11d48; --cr:251,113,133; }
.row > [class*="col"]:nth-child(6n+6) > .card-stat { --c1:#f0abfc; --c2:#c026d3; --cr:232,121,249; }

/* =====================================================================
   COMPONENTS — tables
   ===================================================================== */
.table {
  --bs-table-color: var(--gs-ink); --bs-table-border-color: var(--gs-line); --bs-table-bg: transparent;
  font-variant-numeric: tabular-nums; margin-bottom: 0;
}
.table > :not(caption) > * > * { padding: .7rem .75rem; vertical-align: middle; }
.table > thead > tr > th, .table-light, .table-light > th, .table > thead.table-light > tr > th {
  --bs-table-bg: #f6f5ff; --bs-table-color:#5b5f85; --bs-table-border-color: var(--gs-line);
  background-color: #f6f5ff; color:#5b5f85; font-size:.74rem; letter-spacing:.05em; text-transform:uppercase; font-weight:800;
  border-bottom: 1px solid var(--gs-line);
}
.table > tbody > tr:hover > * { --bs-table-bg-state: #f8f7ff; }
.table-bordered { --bs-table-border-color: var(--gs-line); }
.table-bordered > :not(caption) > * { border-color: var(--gs-line); }
.table-bordered > :not(caption) > * > * { border-color: var(--gs-line); }
.table-responsive { border-radius: 14px; }
.table tbody a:not(.btn) { font-weight:650; text-decoration:none; color: var(--gs-primary); }
.table tbody a:not(.btn):hover { text-decoration: underline; }
.pawn-clickable-row { cursor: pointer; }

/* =====================================================================
   COMPONENTS — badges, alerts
   ===================================================================== */
.badge { font-weight: 750; border-radius: 999px; padding: .42em .8em; font-size: .72rem; letter-spacing:.01em; display:inline-flex; align-items:center; gap:.4em; }
.badge::before { content:""; width:6px; height:6px; border-radius:50%; background: currentColor; opacity:.9; }
.badge.text-bg-warning   { background:#fff3d6 !important; color:#9a5b00 !important; }
.badge.text-bg-success   { background:#dcf7ea !important; color:#0b7a4b !important; }
.badge.text-bg-danger    { background:#ffe3e8 !important; color:#be123c !important; }
.badge.text-bg-primary   { background:#e6e3ff !important; color:#4338ca !important; }
.badge.text-bg-info      { background:#dbf3f8 !important; color:#0b7285 !important; }
.badge.text-bg-secondary { background:#eceef8 !important; color:#4b5073 !important; }
.badge.text-bg-dark      { background:#e4e5f2 !important; color:#1b1b3a !important; }
.badge.text-bg-light     { background:#f4f5fb !important; color:#4b5073 !important; }
.badge.bg-warning   { background:#fff3d6 !important; color:#9a5b00 !important; }
.badge.bg-success   { background:#dcf7ea !important; color:#0b7a4b !important; }
.badge.bg-danger    { background:#ffe3e8 !important; color:#be123c !important; }
.badge.bg-secondary { background:#eceef8 !important; color:#4b5073 !important; }
.badge.bg-primary   { background:#e6e3ff !important; color:#4338ca !important; }
.badge.bg-info      { background:#dbf3f8 !important; color:#0b7285 !important; }
.badge.bg-dark      { background:#e4e5f2 !important; color:#1b1b3a !important; }

.alert { border:0; border-left:5px solid; border-radius:16px; padding:.9rem 1.15rem; font-weight:550; box-shadow: var(--gs-shadow); display:flex; align-items:center; gap:.75rem; }
.alert .gs-alert-ico { font-size:1.25rem; }
.alert-success { background:#e6f8ef; color:#0b6b45; border-color:#10b981; }
.alert-danger  { background:#ffeaee; color:#a3123a; border-color:#f43f5e; }
.alert-warning { background:#fff5dc; color:#8a5200; border-color:#ffb020; }
.alert-info    { background:#e2f5f9; color:#0b6574; border-color:#22b8cf; }
.alert.gs-leaving { opacity:0; transform: translateY(-8px); transition: all .4s ease; }

/* =====================================================================
   COMPONENTS — forms  (beats legacy "neon" rules via body prefix)
   ===================================================================== */
.form-label, body .page-body form .form-label { font-weight: 650; font-size: .85rem; color: var(--gs-ink-2); margin-bottom: .4rem; letter-spacing: 0; }
body .form-control, body .form-select,
body .page-body form .form-control, body .page-body form .form-select, body .page-body form textarea,
body .page-body form input[type="date"], body .page-body form input[type="number"], body .page-body form input[type="text"],
body .page-body form input[type="email"], body .page-body form input[type="tel"], body .page-body form input[type="password"] {
  background: #fff; border: 1.5px solid #dcdff3; border-radius: 13px; color: var(--gs-ink);
  box-shadow: none; transform: none; min-height: 46px; padding: .6rem .9rem;
  transition: border-color .18s, box-shadow .18s, background-color .18s;
}
body .page-body form .form-control:hover, body .page-body form .form-select:hover, body .page-body form textarea:hover,
body .page-body form input[type="date"]:hover, body .page-body form input[type="number"]:hover, body .page-body form input[type="text"]:hover,
body .page-body form input[type="email"]:hover, body .page-body form input[type="tel"]:hover, body .page-body form input[type="password"]:hover {
  border-color: #b9b4f5; box-shadow: none; background:#fff;
}
body .form-control:focus, body .form-select:focus,
body .page-body form .form-control:focus, body .page-body form .form-select:focus, body .page-body form textarea:focus,
body .page-body form input[type="date"]:focus, body .page-body form input[type="number"]:focus, body .page-body form input[type="text"]:focus,
body .page-body form input[type="email"]:focus, body .page-body form input[type="tel"]:focus, body .page-body form input[type="password"]:focus {
  border-color: #7c5cff; background:#fff; transform:none;
  box-shadow: 0 0 0 4px rgba(124,92,255,.16);
}
body .form-control::placeholder, body .page-body form .form-control::placeholder { color:#a2a6c6; }
body .form-control:disabled, body .form-control[readonly], body .form-select:disabled { background:#f4f5fb; color: var(--gs-muted); }
textarea.form-control { min-height: 96px; }
.form-check-input { width:1.15em; height:1.15em; border:1.5px solid #c4c8e6; }
.form-check-input:checked { background-color: var(--gs-primary); border-color: var(--gs-primary); }
.form-check-input:focus { box-shadow: 0 0 0 4px rgba(124,92,255,.18); border-color:#7c5cff; }
.input-group-text { background:#f4f5fb; border:1.5px solid #dcdff3; color: var(--gs-muted); border-radius:13px; }
.form-select { background-position: right .9rem center; }
.page-body form .btn:hover, .page-body form .btn:focus { box-shadow: none; }
.page-body form .btn-dark:hover, .page-body form .btn-primary:hover { box-shadow: 0 14px 28px -8px rgba(91,75,219,.7); }

/* =====================================================================
   COMPONENTS — confirm dialog (existing markup)
   ===================================================================== */
.sp-confirm-backdrop { background: rgba(20,14,70,.5); backdrop-filter: blur(8px); }
.sp-confirm-dialog { border-radius: 28px; border: 1px solid rgba(124,92,255,.15); background:#fff; box-shadow: var(--gs-shadow-lg); padding: 1.6rem 1.4rem 1.3rem; }
.sp-confirm-icon { width:64px; height:64px; border-radius:22px; background: linear-gradient(135deg,#fb7185,#e11d48); color:#fff; box-shadow: 0 16px 30px -8px rgba(225,29,72,.6); }
.sp-confirm-dialog h3 { color: var(--gs-ink); }
.sp-confirm-dialog p { color: var(--gs-muted); }
.sp-confirm-actions .btn { border-radius: 14px; padding:.7rem 1rem; }
.sp-confirm-actions .btn-light { background:#f1f2fa; border-color:#e1e4f4; }

/* misc legacy widgets */
.walkin-card { border-radius: 18px; border:1.5px dashed #cfc9ff; background: linear-gradient(180deg,#faf9ff,#fff); }
.pos-summary { border-radius: var(--gs-radius); }

/* =====================================================================
   DASHBOARD
   ===================================================================== */
.gs-hero {
  position:relative; overflow:hidden; border-radius: 28px; padding: 1.9rem 2rem; color:#fff; margin-bottom: 1.5rem;
  background:
    radial-gradient(380px 220px at 90% 10%, rgba(255,176,32,.45), transparent 70%),
    radial-gradient(420px 260px at 0% 120%, rgba(244,114,182,.35), transparent 70%),
    linear-gradient(120deg,#26177a 0%,#4b33c9 48%,#7c4dff 100%);
  box-shadow: var(--gs-shadow-lg);
}
.gs-hero::before { content:""; position:absolute; inset:0; background-image: radial-gradient(rgba(255,255,255,.14) 1.2px, transparent 1.4px); background-size: 22px 22px; mask-image: linear-gradient(90deg, transparent 20%, #000); -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000); }
.gs-hero-gem { position:absolute; right:3.2rem; top:50%; margin-top:-70px; font-size:9rem; line-height:1; color: rgba(255,255,255,.2); animation: gs-float 6s ease-in-out infinite; filter: drop-shadow(0 20px 40px rgba(0,0,0,.25)); }
.gs-hero-orb { position:absolute; border-radius:50%; background: radial-gradient(circle at 30% 30%, #fff3c4, #ffb020); opacity:.9; animation: gs-pulse 5s ease-in-out infinite; }
.gs-hero-orb.o1 { width:18px; height:18px; right:19rem; top:22%; }
.gs-hero-orb.o2 { width:10px; height:10px; right:9rem; bottom:20%; animation-delay:1.4s; }
.gs-hero-inner { position:relative; z-index:2; max-width: 620px; }
.gs-hero small.gs-hero-date { display:inline-flex; align-items:center; gap:.4rem; padding:.3rem .75rem; border-radius:999px; background: rgba(255,255,255,.16); font-weight:600; font-size:.78rem; backdrop-filter: blur(6px); }
.gs-hero h2 { color:#fff; font-size: clamp(1.45rem, 1.1rem + 1.2vw, 2.1rem); font-weight:800; margin:.85rem 0 .3rem; }
.gs-hero p { color: rgba(255,255,255,.8); margin:0 0 1.2rem; }
.gs-hero .btn-gold { background: linear-gradient(135deg,#ffe08a,#ffb020 60%,#ff8a00); color:#3a2300; border:0; box-shadow: 0 14px 28px -8px rgba(255,138,0,.7); }
.gs-hero .btn-glass { background: rgba(255,255,255,.16); color:#fff; border:1px solid rgba(255,255,255,.28); backdrop-filter: blur(6px); }
.gs-hero .btn-glass:hover { background: rgba(255,255,255,.28); color:#fff; }

.gs-stats { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.1rem; margin-bottom: 1.5rem; }
.gs-stat {
  position:relative; overflow:hidden; border-radius: 22px; padding: 1.25rem 1.3rem; color:#fff; text-decoration:none; display:block;
  background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 20px 38px -18px rgba(var(--cr), .95);
  transition: transform .28s cubic-bezier(.22,1,.36,1), box-shadow .28s; animation: gs-rise .55s cubic-bezier(.22,1,.36,1) both;
}
.gs-stat:nth-child(2){animation-delay:.05s}.gs-stat:nth-child(3){animation-delay:.1s}.gs-stat:nth-child(4){animation-delay:.15s}.gs-stat:nth-child(5){animation-delay:.2s}.gs-stat:nth-child(6){animation-delay:.25s}
.gs-stat::after { content:""; position:absolute; right:-40px; top:-40px; width:150px; height:150px; border-radius:50%; background: rgba(255,255,255,.16); }
.gs-stat::before { content:""; position:absolute; right:34px; bottom:-56px; width:110px; height:110px; border-radius:50%; background: rgba(255,255,255,.1); }
.gs-stat:hover { transform: translateY(-5px); color:#fff; box-shadow: 0 26px 44px -16px rgba(var(--cr), 1); }
.gs-stat-ico { position:relative; z-index:1; width:48px; height:48px; border-radius:16px; display:grid; place-items:center; font-size:1.35rem; background: rgba(255,255,255,.22); backdrop-filter: blur(4px); margin-bottom:1rem; }
.gs-stat-label { position:relative; z-index:1; font-size:.84rem; font-weight:650; color: rgba(255,255,255,.88); }
.gs-stat-value { position:relative; z-index:1; font-size: clamp(1.3rem, 1.05rem + .9vw, 1.85rem); font-weight:800; letter-spacing:-.02em; line-height:1.2; margin-top:.2rem; word-break: break-word; font-variant-numeric: tabular-nums; }

.gs-grid-2 { display:grid; grid-template-columns: minmax(0,5fr) minmax(0,7fr); gap:1.25rem; margin-bottom:1.25rem; }
.gs-grid-eq { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:1.25rem; }
.gs-panel { background:#fff; border:1px solid var(--gs-line); border-radius: var(--gs-radius); box-shadow: var(--gs-shadow); overflow:hidden; display:flex; flex-direction:column; }
.gs-panel-head { display:flex; align-items:center; justify-content:space-between; gap:.75rem; padding: 1.05rem 1.3rem; border-bottom:1px solid var(--gs-line); }
.gs-panel-title { display:inline-flex; align-items:center; gap:.6rem; font-weight:800; font-size:1rem; margin:0; }
.gs-panel-title::before { content:""; width:5px; height:18px; border-radius:6px; background: linear-gradient(180deg,#ffc233,#ff8a00); }
.gs-panel-link { font-size:.8rem; font-weight:700; color: var(--gs-primary); text-decoration:none; padding:.3rem .7rem; border-radius:999px; background:#f1efff; }
.gs-panel-link:hover { background: var(--gs-primary); color:#fff; }
.gs-panel-body { padding: 1.1rem 1.3rem 1.3rem; flex:1; display:flex; flex-direction:column; }
.gs-panel-body .gs-tiles { flex:1; grid-auto-rows:1fr; }

/* gold-rate list */
.gs-rates { display:flex; flex-direction:column; gap:.6rem; }
.gs-rate { display:flex; align-items:center; gap:.85rem; padding:.7rem .85rem; border-radius:16px; background: linear-gradient(90deg, rgba(var(--cr), .13), rgba(var(--cr), .03)); border:1px solid rgba(var(--cr), .22); }
.gs-rate-k { width:48px; height:38px; flex:0 0 48px; border-radius:12px; display:grid; place-items:center; font-weight:800; font-size:.85rem; color:#fff; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 8px 16px -6px rgba(var(--cr), .9); }
.gs-rate-name { font-size:.8rem; color: var(--gs-muted); font-weight:600; flex:1; }
.gs-rate-val { font-weight:800; font-size:1.05rem; font-variant-numeric: tabular-nums; }
.gs-rate-date { display:inline-flex; align-items:center; gap:.4rem; margin-top:.9rem; font-size:.8rem; color: var(--gs-muted); font-weight:600; }

/* quick links */
.gs-tiles { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:.85rem; }
.gs-tile { display:flex; flex-direction:column; align-items:flex-start; justify-content:space-between; gap:.8rem; padding:1.1rem; border-radius:18px; text-decoration:none; color: var(--gs-ink); font-weight:700; font-size:.9rem; line-height:1.25;
  background: linear-gradient(160deg, rgba(var(--cr), .12), #fff 70%); border:1px solid rgba(var(--cr), .28); transition: transform .22s, box-shadow .22s, border-color .22s; }
.gs-tile:hover { transform: translateY(-4px); box-shadow: 0 18px 30px -16px rgba(var(--cr), .95); border-color: rgba(var(--cr), .7); color: var(--gs-ink); }
.gs-tile i { width:50px; height:50px; border-radius:16px; display:grid; place-items:center; font-size:1.4rem; color:#fff; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 10px 18px -6px rgba(var(--cr), .9); }

/* ledger list */
.gs-list { list-style:none; margin:0; padding:0; }
.gs-li { display:flex; align-items:center; gap:.85rem; padding:.8rem 1.3rem; border-bottom:1px dashed var(--gs-line); transition: background .15s; }
.gs-li:last-child { border-bottom:0; }
.gs-li:hover { background:#faf9ff; }
.gs-li .gs-avatar { width:42px; height:42px; flex-basis:42px; border-radius:14px; }
.gs-li-main { flex:1; min-width:0; line-height:1.3; }
.gs-li-main strong { display:block; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.gs-li-main small { color: var(--gs-muted); font-size:.78rem; }
.gs-li-main small a { color: var(--gs-primary); font-weight:700; text-decoration:none; }
.gs-li-amt { text-align:right; font-weight:800; font-variant-numeric: tabular-nums; white-space:nowrap; line-height:1.3; }
.gs-li-amt small { display:block; font-weight:600; color: var(--gs-muted); font-size:.74rem; }
.gs-empty { padding:2.2rem 1rem; text-align:center; color: var(--gs-muted); }
.gs-empty i { display:block; font-size:2rem; margin-bottom:.4rem; opacity:.5; }

@media (max-width: 1199.98px) {
  .gs-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .gs-grid-2, .gs-grid-eq { grid-template-columns: 1fr; }
  .gs-hero-gem { right:1.2rem; font-size:7rem; }
}
@media (max-width: 575.98px) {
  .gs-hero { padding:1.35rem 1.25rem; border-radius:24px; margin-bottom:1.1rem; }
  .gs-hero-gem { font-size:5.5rem; right:.6rem; margin-top:-30px; top:30%; }
  .gs-hero-orb.o1 { right: 9rem; }
  .gs-hero-inner { max-width: 100%; }
  .gs-stats { gap:.75rem; margin-bottom:1.1rem; }
  .gs-stat { padding:1rem; border-radius:20px; }
  .gs-stat-ico { width:40px; height:40px; font-size:1.1rem; margin-bottom:.7rem; border-radius:13px; }
  .gs-stat-label { font-size:.76rem; }
  .gs-stat-value { font-size:1.12rem; }
  .gs-tiles { grid-template-columns: repeat(2, minmax(0,1fr)); gap:.7rem; }
  .gs-li { padding:.75rem 1rem; }
  .gs-panel-head { padding:.95rem 1rem; }
  .gs-panel-body { padding:1rem; }
}

/* =====================================================================
   LOGIN
   ===================================================================== */
body.gs-login { min-height:100vh; padding:0; display:block; background: #f3f4fb; }
.gs-login-wrap { min-height:100vh; display:grid; grid-template-columns: minmax(0,1.05fr) minmax(0,1fr); }
.gs-login-hero {
  position:relative; overflow:hidden; color:#fff; padding: 3rem 3.2rem; display:flex; flex-direction:column; justify-content:space-between;
  background:
    radial-gradient(520px 340px at 85% 8%, rgba(255,176,32,.5), transparent 70%),
    radial-gradient(520px 380px at 0% 105%, rgba(244,114,182,.4), transparent 70%),
    linear-gradient(140deg,#1e1b4b 0%,#3a27a8 50%,#6d44f5 100%);
}
.gs-login-hero::before { content:""; position:absolute; inset:0; background-image: radial-gradient(rgba(255,255,255,.14) 1.2px, transparent 1.4px); background-size: 24px 24px; mask-image: linear-gradient(180deg, #000, transparent 85%); -webkit-mask-image: linear-gradient(180deg,#000,transparent 85%); }
.gs-login-hero > * { position:relative; z-index:1; }
.gs-login-gem { position:absolute !important; right:-30px; bottom:60px; font-size:17rem; line-height:1; color: rgba(255,255,255,.12); animation: gs-float 7s ease-in-out infinite; z-index:0 !important; }
.gs-login-hero .gs-brand { padding:0; }
.gs-login-hero h1 { color:#fff; font-size: clamp(1.9rem, 1.2rem + 2vw, 3rem); font-weight:800; line-height:1.18; max-width: 520px; margin: 0 0 1rem; }
.gs-login-hero p { color: rgba(255,255,255,.78); max-width: 440px; margin:0; }
.gs-features { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:.75rem; max-width: 460px; }
.gs-feature { display:flex; align-items:center; gap:.7rem; padding:.7rem .85rem; border-radius:16px; background: rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.18); backdrop-filter: blur(8px); font-weight:650; font-size:.88rem; }
.gs-feature i { width:34px; height:34px; border-radius:11px; display:grid; place-items:center; background: linear-gradient(135deg, var(--c1), var(--c2)); color:#fff; flex:0 0 34px; }
.gs-login-side { display:grid; place-items:center; padding: 2rem 1.25rem; }
.gs-login-card { width:min(440px,100%); background:#fff; border:1px solid var(--gs-line); border-radius:30px; padding: 2.4rem 2.1rem; box-shadow: var(--gs-shadow-lg); animation: gs-rise .6s cubic-bezier(.22,1,.36,1) both; }
.gs-login-logo { width:62px; height:62px; border-radius:20px; display:grid; place-items:center; font-size:1.8rem; color:#3a2300; margin-bottom:1.2rem; background: linear-gradient(135deg,#ffe08a,#ffb020 55%,#ff8a00); box-shadow: 0 16px 30px -8px rgba(255,176,32,.7); }
.gs-login-card h2 { font-size:1.6rem; font-weight:800; margin:0 0 .2rem; }
.gs-login-card .sub { color: var(--gs-muted); margin-bottom:1.6rem; }
.gs-field { margin-bottom:1.1rem; }
.gs-field label { display:block; }
.gs-inputwrap { position:relative; }
.gs-inputwrap > i.lead { position:absolute; left:1rem; top:50%; transform:translateY(-50%); color:#9a9fc4; font-size:1.05rem; pointer-events:none; z-index:2; }
.gs-inputwrap .form-control { padding-left: 2.8rem; min-height:52px; }
.gs-inputwrap:focus-within > i.lead { color: var(--gs-primary); }
.gs-field .gs-eye { position:absolute; right:.5rem; top:50%; transform:translateY(-50%); border:0; background:transparent; color:#9a9fc4; width:40px; height:40px; border-radius:12px; z-index:2; }
.gs-field .gs-eye:hover { color: var(--gs-primary); background:#f1efff; }
.gs-login-card .btn-dark { width:100%; min-height:52px; font-size:1.02rem; margin-top:.4rem; }
.gs-login-hint { margin-top:1.4rem; padding:.7rem .9rem; border-radius:14px; background:#f6f5ff; border:1px dashed #cfc9ff; font-size:.82rem; color: var(--gs-muted); text-align:center; }
.gs-login-hint strong { color: var(--gs-primary); }

@media (max-width: 991.98px) {
  .gs-login-wrap { grid-template-columns: 1fr; }
  .gs-login-hero { padding: 2rem 1.5rem 4.5rem; min-height: 0; gap:1.4rem; }
  .gs-login-hero .gs-features, .gs-login-hero p, .gs-login-gem { display:none; }
  .gs-login-hero h1 { font-size:1.55rem; margin:0; }
  .gs-login-side { margin-top:-3.2rem; padding-bottom:2rem; align-items:start; }
  .gs-login-card { padding:1.8rem 1.4rem; border-radius:26px; }
  .gs-login-logo { display:none; }
}

} /* end @media screen */

/* =====================================================================
   PRINT SAFETY — hide new shell pieces (legacy rules still apply)
   ===================================================================== */
@media print {
  .gs-sidebar, .gs-topbar, .gs-mobilebar, .gs-tabbar, .gs-offcanvas, .gs-hero { display:none !important; }
  body { background:#fff !important; padding-bottom:0 !important; }
  .page-body > * { animation: none !important; }
}

@media screen {
  .gs-li-amt.gs-due { color:#e11d48; }
  .nw { white-space:nowrap; }
  .gs-li-amt.gs-due small { color: var(--gs-muted); }
}

/* =====================================================================
   PHASE 2 — page header, toolbar, list tables, forms, POS, invoice polish
   ===================================================================== */
@media screen {

/* ---------- page header ---------- */
.gs-pagehead { display:flex; align-items:center; gap:1rem; flex-wrap:wrap; margin-bottom:1.15rem; }
.gs-pagehead-ico { width:54px; height:54px; flex:0 0 54px; border-radius:18px; display:grid; place-items:center; font-size:1.5rem; color:#fff; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 14px 26px -10px rgba(var(--cr), .95); }
.gs-pagehead-txt { min-width:0; }
.gs-pagehead-txt h2 { margin:0; font-size:1.3rem; font-weight:800; }
.gs-pagehead-txt p { margin:.1rem 0 0; color: var(--gs-muted); font-size:.86rem; }
.gs-pagehead-actions { margin-left:auto; display:flex; flex-wrap:wrap; gap:.6rem; }

/* ---------- list panels ---------- */
.gs-toolbar { display:flex; flex-wrap:wrap; gap:.75rem; align-items:center; justify-content:space-between; padding:1rem 1.25rem; border-bottom:1px solid var(--gs-line); }
.gs-toolbar-title { font-weight:800; font-size:1rem; display:flex; align-items:center; gap:.6rem; }
.gs-toolbar-title::before { content:""; width:5px; height:18px; border-radius:6px; background: linear-gradient(180deg,#ffc233,#ff8a00); }
.gs-search { position:relative; flex:1 1 280px; max-width:480px; display:flex; gap:.5rem; margin:0; }
.gs-search > i { position:absolute; left:1rem; top:50%; transform:translateY(-50%); color:#9a9fc4; z-index:2; pointer-events:none; }
.gs-search .form-control { padding-left:2.6rem; min-height:44px; }
.gs-count { display:inline-flex; align-items:center; gap:.4rem; padding:.35rem .8rem; border-radius:999px; background:#f1efff; color:#4338ca; font-weight:700; font-size:.8rem; }
.gs-panel .table-responsive { border-radius:0; }
.gs-panel > .table-responsive > .table > thead > tr > th:first-child, .gs-panel .table > tbody > tr > td:first-child { padding-left:1.25rem; }
.gs-panel .table > thead > tr > th:last-child, .gs-panel .table > tbody > tr > td:last-child { padding-right:1.25rem; }
.gs-panel .table > tbody > tr:last-child > td { border-bottom:0; }
.gs-namecell { display:flex; align-items:center; gap:.7rem; min-width:0; }
.gs-namecell strong { font-weight:700; }
.gs-namecell small { display:block; color: var(--gs-muted); }
.gs-avatar-sm { width:38px; height:38px; flex:0 0 38px; border-radius:13px; font-size:.85rem; }
.gs-actions { white-space:nowrap; }
.gs-actions .btn { margin:2px 2px 2px 0; }
.gs-mono { font-variant-numeric: tabular-nums; font-weight:700; }
.gs-due-pos { color:#e11d48; font-weight:800; }
.gs-due-zero { color:#0e9f6e; font-weight:800; }
.gs-empty-row td { text-align:center !important; color: var(--gs-muted); padding:2.2rem 1rem !important; }

/* ---------- forms ---------- */
.gs-section { display:flex; align-items:center; gap:.65rem; font-weight:800; font-size:.98rem; margin-top:.5rem; }
.gs-section i { width:32px; height:32px; border-radius:11px; display:grid; place-items:center; font-size:.95rem; color:#fff; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 8px 16px -6px rgba(var(--cr), .9); }
.gs-formbar { display:flex; flex-wrap:wrap; gap:.6rem; margin-top:1.5rem; padding-top:1.25rem; border-top:1px dashed var(--gs-line); }
.gs-formcard .card-body { padding: 1.6rem; }
.gs-rate-input { position:relative; }
.gs-rate-input .gs-rate-k { position:absolute; left:.55rem; top:50%; transform:translateY(-50%); width:44px; height:32px; font-size:.78rem; border-radius:10px; z-index:2; }
.gs-rate-input .form-control { padding-left:4rem !important; font-weight:700; }
.gs-ratetiles { display:grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap:.8rem; margin-bottom:1.25rem; }
.gs-ratetile { border-radius:18px; padding:.9rem 1rem; color:#fff; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 16px 28px -16px rgba(var(--cr), .95); position:relative; overflow:hidden; }
.gs-ratetile::after { content:""; position:absolute; right:-24px; top:-24px; width:80px; height:80px; border-radius:50%; background: rgba(255,255,255,.17); }
.gs-ratetile small { display:block; font-weight:700; opacity:.9; }
.gs-ratetile strong { font-size:1.15rem; font-weight:800; font-variant-numeric: tabular-nums; position:relative; z-index:1; }

/* ---------- mini stat tiles ---------- */
.gs-minis { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:.7rem; }
.gs-mini { padding:.75rem .9rem; border-radius:16px; background: rgba(var(--cr), .1); border:1px solid rgba(var(--cr), .28); min-width:0; }
.gs-mini small { display:block; color: var(--gs-muted); font-weight:600; font-size:.75rem; }
.gs-mini strong { display:block; font-weight:800; font-variant-numeric: tabular-nums; word-break:break-word; }
.gs-infobox { border:1px solid var(--gs-line); border-radius:18px; padding:1rem; background: linear-gradient(180deg,#faf9ff,#fff); margin-bottom:1rem; }
.gs-infoline { display:flex; justify-content:space-between; gap:1rem; padding:.3rem 0; font-size:.88rem; color: var(--gs-muted); }
.gs-infoline strong { color: var(--gs-ink); text-align:right; }

/* ---------- POS / sale edit ---------- */
.gs-pos { display:grid; grid-template-columns: minmax(0,1fr) 370px; gap:1.25rem; align-items:start; }
.gs-pos-main { display:flex; flex-direction:column; gap:1.25rem; min-width:0; }
.gs-pos-sum { position:sticky; top:96px; border-radius:26px; color:#fff; padding:1.5rem; overflow:hidden;
  background: radial-gradient(260px 160px at 100% 0%, rgba(255,176,32,.38), transparent 70%), linear-gradient(150deg,#24176f 0%,#4b33c9 60%,#6d4dff 100%);
  box-shadow: var(--gs-shadow-lg); }
.gs-pos-sum h3 { color:#fff; font-size:1rem; font-weight:700; opacity:.85; margin:0 0 .2rem; }
.gs-grand { font-size:2.1rem; font-weight:800; letter-spacing:-.02em; line-height:1.15; font-variant-numeric: tabular-nums; margin-bottom:1rem; word-break:break-word; }
.gs-sumrow { display:flex; justify-content:space-between; align-items:center; gap:1rem; padding:.55rem 0; border-bottom:1px dashed rgba(255,255,255,.2); font-size:.92rem; }
.gs-sumrow span { color: rgba(255,255,255,.75); }
.gs-sumrow strong { font-variant-numeric: tabular-nums; }
.gs-sumrow.is-due { border-bottom:0; margin-top:.3rem; padding:.7rem .85rem; border-radius:14px; background: rgba(255,255,255,.14); }
.gs-sumrow.is-due strong { color:#ffd978; font-size:1.1rem; }
.gs-ratechips { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:.4rem; margin-bottom:1.1rem; }
.gs-ratechip { text-align:center; padding:.45rem .2rem; border-radius:12px; background: rgba(255,255,255,.12); font-size:.68rem; line-height:1.25; }
.gs-ratechip b { display:block; font-size:.74rem; color:#ffd978; }
.gs-pos-sum .btn-gold { width:100%; margin-top:1.1rem; min-height:54px; font-size:1.05rem; background: linear-gradient(135deg,#ffe08a,#ffb020 60%,#ff8a00); color:#3a2300; border:0; box-shadow: 0 16px 30px -10px rgba(255,138,0,.8); }
.gs-pos-sum .gs-linkback { display:block; text-align:center; margin-top:.8rem; color: rgba(255,255,255,.8); font-size:.85rem; text-decoration:none; }
.gs-pos-sum .gs-linkback:hover { color:#fff; }
.gs-pos .walkin-card { padding:1rem; }
.gs-pos .walkin-card-head { font-weight:700; margin-bottom:.8rem; display:flex; flex-direction:column; }
.gs-pos-table td { vertical-align:middle; }
.gs-pos-table .product-select { min-width:240px; }
.gs-pos-table td.gs-first { font-size:inherit; }
.gs-pos-table td.purity, .gs-pos-table td.net, .gs-pos-table td.making, .gs-pos-table td.stone { color: var(--gs-ink-2); font-variant-numeric: tabular-nums; }
.gs-pos-table td.price { font-weight:800; font-variant-numeric: tabular-nums; }
.removeRow { width:36px; height:36px; padding:0 !important; border-radius:11px !important; font-size:1.1rem; line-height:1; }
.walkin-card.is-hidden { display:none; }

/* ---------- invoice screen polish (print rules are untouched) ---------- */
.invoice-card { border-radius: 28px; overflow:hidden; }
.invoice-meta-card { border-radius:20px; background: linear-gradient(160deg,#faf9ff,#fff); border:1px solid #e1ddff; }
.invoice-kicker { color:#7c5cff; }
.invoice-shop-name { color: var(--gs-ink); }
.invoice-block { border-radius:20px; border:1px solid var(--gs-line); background: linear-gradient(180deg,#fcfbff,#fff); }
.invoice-block-title { color: var(--gs-primary); font-weight:800; }
.invoice-contact-item { border-radius:14px; border:1px solid var(--gs-line); background:#fff; }
.invoice-table-wrap { border-radius:18px; border:1px solid var(--gs-line); }
.invoice-table thead th { background:#f6f5ff; color:#5b5f85; }
.invoice-total-card { border-radius:22px; background: radial-gradient(240px 140px at 100% 0%, rgba(255,176,32,.3), transparent 70%), linear-gradient(150deg,#24176f,#4b33c9 70%,#6d4dff) !important; color:#fff; box-shadow: var(--gs-shadow-lg); }
.invoice-total-card th, .invoice-total-card td { color:#fff !important; }
.invoice-grand-total th, .invoice-grand-total td { color:#ffd978 !important; }
.invoice-type-badge.is-walkin { background:#fff3d6; color:#9a5b00; }
.invoice-type-badge.is-registered { background:#dcf7ea; color:#0b7a4b; }

/* ---------- table -> cards on phones ---------- */
@media (max-width: 767.98px) {
  .gs-pagehead-txt p { display:none; }
  .gs-pagehead { margin-bottom:.9rem; }
  .gs-pagehead-ico { width:46px; height:46px; flex-basis:46px; font-size:1.3rem; border-radius:15px; }
  .gs-pagehead-actions { width:100%; margin-left:0; }
  .gs-pagehead-actions .btn { flex:1 1 auto; }
  .gs-toolbar { padding:.9rem 1rem; }
  .gs-search { max-width:none; flex-basis:100%; }

  .gs-panel .table-responsive { overflow:visible; padding:.35rem .85rem .85rem; }
  .page-body .table.gs-cards, .page-body .table-responsive .table.gs-cards { min-width:0 !important; width:100%; }
  .table.gs-cards thead { display:none; }
  .table.gs-cards, .table.gs-cards tbody, .table.gs-cards tr, .table.gs-cards td { display:block; width:100%; }
  .table.gs-cards tbody tr { border:1px solid var(--gs-line); border-radius:20px; margin-top:.8rem; padding:.45rem 1rem; background:#fff; box-shadow: var(--gs-shadow); }
  .table.gs-cards tbody tr:hover > * { --bs-table-bg-state: transparent; }
  .table.gs-cards td, .page-body .table.gs-cards td { display:flex; justify-content:space-between; align-items:center; gap:1rem; text-align:right; padding:.6rem 0 !important; border:0 !important; border-bottom:1px dashed var(--gs-line) !important; white-space:normal !important; background:transparent; }
  .table.gs-cards td:last-child { border-bottom:0 !important; }
  .table.gs-cards td::before { content: attr(data-label); flex:0 0 auto; max-width:45%; text-align:left; font-weight:700; font-size:.76rem; color: var(--gs-muted); }
  .table.gs-cards td[data-label=""]::before { display:none; }
  .table.gs-cards td.gs-cell-full { display:block; text-align:center; }
  .table.gs-cards td.gs-cell-full::before { display:none; }
  .table.gs-cards td.gs-actions { justify-content:flex-start; flex-wrap:wrap; padding-top:.8rem !important; white-space:normal; }
  .table.gs-cards td.gs-actions::before { display:none; }
  .table.gs-cards td.gs-actions .btn, .table.gs-cards td .d-flex .btn { flex:1 1 auto; }
  .table.gs-cards td.gs-first { font-weight:800; font-size:1.02rem; justify-content:flex-start; text-align:left; }
  .table.gs-cards td .gs-namecell { text-align:left; }

  .gs-pos { display:flex; flex-direction:column; align-items:stretch; }
  .gs-pos-sum { position:static; }
  .gs-pos-table .product-select { min-width:0; width:100%; }
  .gs-pos-table td:has(.product-select) { display:block; text-align:left; }
  .gs-pos-table td:has(.product-select)::before { display:block; margin-bottom:.3rem; max-width:none; }
  .gs-pos-table td.gs-rm { justify-content:flex-end; }
  .gs-minis { grid-template-columns: 1fr; }
  .gs-ratetiles { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .gs-formcard .card-body { padding:1.2rem; }
}
@media (max-width: 1199.98px) and (min-width: 768px) { .gs-pos { grid-template-columns: 1fr; } .gs-pos-sum { position:static; } .gs-ratetiles { grid-template-columns: repeat(3, minmax(0,1fr)); } }

} /* end phase 2 screen */

@media screen {
.gs-tag { display:inline-flex; align-items:center; padding:.18rem .6rem; border-radius:999px; background:#f1efff; color:#4338ca; font-weight:700; font-size:.78rem; }
.gs-pos-table td.gs-first { font-weight:inherit; }
}

@media screen {
.gs-mono, .gs-due-pos, .gs-due-zero { white-space:nowrap; }
.gs-panel .table td.gs-actions { white-space:normal; min-width:210px; }
.gs-panel .table td.gs-actions .btn { padding:.28rem .6rem; font-size:.78rem; }
}

@media screen {
body .page-body .gs-search .form-control { padding-left:2.6rem !important; }
.gs-section { margin-bottom:.9rem; }
.gs-form .form-label { line-height:1.5; }
.gs-form label.form-label.d-flex a { line-height:1.5; }
.gs-mini { padding:.65rem .7rem; }
.gs-mini strong { white-space:nowrap; font-size:.88rem; }
table.gs-compact > :not(caption) > * > * { padding:.7rem .5rem; font-size:.86rem; }
table.gs-compact td.nw { white-space:nowrap; }
}

@media screen {
.gs-stats-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.gs-stat-value { white-space:nowrap; }
@media (max-width: 1199.98px) { .gs-stats-5 { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 767.98px) {
  .gs-stats-5 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .gs-stats-5 .gs-stat:last-child { grid-column: 1 / -1; }
}
.gs-settings .gs-section { margin-top:.9rem; padding-top:.2rem; }
.gs-settings .gs-section:first-child { margin-top:0; }
}

@media screen {
.gs-inputwrap .gs-eye { position:absolute; right:.5rem; top:50%; transform:translateY(-50%); border:0; background:transparent; color:#9a9fc4; width:40px; height:40px; border-radius:12px; z-index:2; }
.gs-inputwrap .gs-eye:hover { color: var(--gs-primary); background:#f1efff; }
body .page-body .gs-inputwrap .form-control { padding-left:2.8rem !important; padding-right:3rem; }
}

@media screen {
.gs-stats-5 .gs-stat-value { font-size: clamp(1rem, .6rem + .6vw, 1.3rem); }
#pawnForm { scroll-margin-top: 90px; }
}

/* =====================================================================
   PHASE 3 — traditional weight field (ভরি / আনা / রতি / পয়েন্ট)
   Markup and data-* hooks are untouched; only appearance changes.
   ===================================================================== */
@media screen {
body .page-body .traditional-weight-field {
  position:relative; padding:1rem 1rem .85rem; border-radius:20px; border:1px solid var(--gs-line);
  background: linear-gradient(180deg,#fcfbff,#fff); box-shadow: none; transition: box-shadow .2s, border-color .2s;
}
body .page-body .traditional-weight-field:hover { border-color:#d7d2ff; }
body .page-body .traditional-weight-field:focus-within { border-color:#7c5cff; box-shadow: 0 0 0 4px rgba(124,92,255,.14); }
body .page-body .traditional-weight-head { display:flex; align-items:center; justify-content:space-between; gap:.6rem; margin-bottom:.75rem; }
body .page-body .traditional-weight-head .form-label { margin:0; font-weight:800; color: var(--gs-ink); }
body .page-body .traditional-weight-grams {
  display:inline-flex; align-items:center; padding:.22rem .7rem; border-radius:999px; font-weight:800; font-size:.8rem; white-space:nowrap;
  color:#7a4a00; background: linear-gradient(135deg,#fff0c2,#ffd978); border:0; font-variant-numeric: tabular-nums;
}
body .page-body .traditional-weight-grid-inputs { display:grid !important; grid-template-columns: repeat(4, minmax(0,1fr)) !important; gap:.5rem !important; }
body .page-body .traditional-weight-part { display:flex; flex-direction:column; align-items:stretch; gap:.35rem; min-width:0; }
body .page-body .traditional-weight-label {
  display:block; text-align:center; font-size:.72rem; font-weight:800; line-height:1; padding:.32rem .2rem; border-radius:9px; letter-spacing:.01em;
}
body .page-body .traditional-weight-part:nth-child(1) .traditional-weight-label { background:#fff0c2; color:#8a5200; }
body .page-body .traditional-weight-part:nth-child(2) .traditional-weight-label { background:#e8e3ff; color:#4338ca; }
body .page-body .traditional-weight-part:nth-child(3) .traditional-weight-label { background:#ffdfe6; color:#be123c; }
body .page-body .traditional-weight-part:nth-child(4) .traditional-weight-label { background:#d4f5ea; color:#047857; }
body .page-body .traditional-weight-field .form-control {
  text-align:center; padding:.55rem .25rem !important; min-height:46px; font-weight:800; font-size:1.02rem; font-variant-numeric: tabular-nums;
}
body .page-body .traditional-weight-help { margin-top:.65rem; font-size:.74rem !important; color: var(--gs-muted) !important; line-height:1.4; }
body .page-body .pawn-weight-row .traditional-weight-grid-inputs { grid-template-columns: repeat(4, minmax(0,1fr)) !important; }
body .page-body .pawn-weight-row .traditional-weight-field { min-height:0; }
@media (max-width: 575.98px) {
  body .page-body .traditional-weight-field { padding:.85rem .75rem .75rem; }
  body .page-body .traditional-weight-grid-inputs { gap:.4rem !important; }
  body .page-body .traditional-weight-field .form-control { font-size:.95rem; min-height:44px; }
}
}

/* =====================================================================
   PHASE 3 — dark mode  (html[data-theme="dark"], toggled from the top bar)
   Screen only. Printing always uses the normal light layout.
   ===================================================================== */
@media screen {
.gs-iconbtn[data-gs-theme-toggle] { color:#f59e0b; }
.gs-mobilebar .gs-mtheme { margin-left:auto; margin-right:.5rem; width:40px; height:40px; font-size:1.15rem; color:#ffd978; }

html[data-theme="dark"] {
  color-scheme: dark;
  --gs-ink: #ecebff;
  --gs-ink-2: #c9cbee;
  --gs-muted: #9a9fc9;
  --gs-line: #2b2e57;
  --gs-bg: #0e0f21;
  --gs-surface: #171935;
  --gs-shadow: 0 1px 2px rgba(0,0,0,.3), 0 14px 34px -16px rgba(0,0,0,.6);
  --gs-shadow-lg: 0 24px 60px -20px rgba(0,0,0,.7);
  --bs-body-bg: #0e0f21;
  --bs-body-color: #ecebff;
  --bs-border-color: #2b2e57;
  --bs-secondary-bg: #1d1f40;
  --bs-tertiary-bg: #1d1f40;
}
html[data-theme="dark"] body {
  background:
    radial-gradient(900px 380px at 100% -8%, rgba(124,92,255,.18), transparent 70%),
    radial-gradient(700px 320px at -5% 0%, rgba(255,176,32,.07), transparent 70%),
    var(--gs-bg);
}
html[data-theme="dark"] .text-dark, html[data-theme="dark"] a.text-dark { color: var(--gs-ink) !important; }
html[data-theme="dark"] * { scrollbar-color: #3a3e70 transparent; }

/* surfaces */
html[data-theme="dark"] .card,
html[data-theme="dark"] .gs-topbar,
html[data-theme="dark"] .gs-panel,
html[data-theme="dark"] .gs-formcard,
html[data-theme="dark"] .gs-li,
html[data-theme="dark"] .gs-tile,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .sp-confirm-dialog { background: var(--gs-surface); border-color: var(--gs-line); color: var(--gs-ink); }
html[data-theme="dark"] .gs-topbar { background: rgba(23,25,53,.86); }
html[data-theme="dark"] .gs-chip { background:#1f2147; border-color: var(--gs-line); color: var(--gs-ink-2); }
html[data-theme="dark"] .gs-chip-gold { background:#3a2b0a; color:#ffd978; border-color:#5a4210; }
html[data-theme="dark"] .gs-iconbtn { background:#1f2147; border-color: var(--gs-line); color: var(--gs-ink-2); }
html[data-theme="dark"] .gs-iconbtn[data-gs-theme-toggle] { color:#ffd978; }
html[data-theme="dark"] .gs-tabbar { background: rgba(23,25,53,.92); border-color: var(--gs-line); }
html[data-theme="dark"] .gs-tab { color: var(--gs-muted); }
html[data-theme="dark"] .gs-tab.is-active { color:#b9acff; }

/* tables */
html[data-theme="dark"] .table { --bs-table-color: var(--gs-ink); --bs-table-bg: transparent; --bs-table-border-color: var(--gs-line); --bs-table-striped-bg: rgba(255,255,255,.03); --bs-table-hover-bg: rgba(124,92,255,.1); color: var(--gs-ink); }
html[data-theme="dark"] .table > thead > tr > th, html[data-theme="dark"] .table thead th { background:#1d1f40; color: var(--gs-muted); border-color: var(--gs-line); }
html[data-theme="dark"] .table > :not(caption) > * > * { border-color: var(--gs-line); }
html[data-theme="dark"] .table-light { --bs-table-bg:#1d1f40; --bs-table-color: var(--gs-muted); }

/* forms */
html[data-theme="dark"] .form-control, html[data-theme="dark"] .form-select, html[data-theme="dark"] textarea.form-control,
html[data-theme="dark"] body .page-body form .form-control, html[data-theme="dark"] body .page-body form .form-select {
  background-color:#12142b; border-color:#34386a; color: var(--gs-ink);
}
html[data-theme="dark"] .form-control::placeholder { color:#6d72a0; }
html[data-theme="dark"] .form-control:focus, html[data-theme="dark"] .form-select:focus { background-color:#161835; border-color:#7c5cff; color: var(--gs-ink); box-shadow:0 0 0 4px rgba(124,92,255,.22); }
html[data-theme="dark"] .form-control:disabled, html[data-theme="dark"] .form-select:disabled { background-color:#1a1c3b; color:#7e83b0; }
html[data-theme="dark"] .form-label, html[data-theme="dark"] label { color: var(--gs-ink-2); }
html[data-theme="dark"] .form-text { color: var(--gs-muted); }
html[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.8); }
html[data-theme="dark"] .gs-search .form-control { background-color:#12142b; }
html[data-theme="dark"] .walkin-card { background:#1b1d3d; border-color:#3b3f78; }

/* buttons (soft outlines) */
html[data-theme="dark"] .btn-outline-dark { background: rgba(255,255,255,.05); color: var(--gs-ink); border-color:#3a3e70; }
html[data-theme="dark"] .btn-outline-dark:hover { background: rgba(255,255,255,.12); color:#fff; }
html[data-theme="dark"] .btn-outline-secondary { background: rgba(255,255,255,.05); color:#c9cbee; border-color:#3a3e70; }
html[data-theme="dark"] .btn-outline-primary { background: rgba(124,92,255,.14); color:#b9acff; border-color:#4a4690; }
html[data-theme="dark"] .btn-outline-info { background: rgba(34,211,238,.1); color:#67e8f9; border-color:#1f6a78; }
html[data-theme="dark"] .btn-outline-danger { background: rgba(251,113,133,.12); color:#fda4af; border-color:#7b2a41; }
html[data-theme="dark"] .btn-light { background:#1f2147; color: var(--gs-ink); border-color: var(--gs-line); }

/* badges & tags & counters */
html[data-theme="dark"] .gs-tag, html[data-theme="dark"] .gs-count { background: rgba(124,92,255,.2); color:#c4b9ff; }
html[data-theme="dark"] .badge.text-bg-warning { background: rgba(245,158,11,.18) !important; color:#fcd34d !important; }
html[data-theme="dark"] .badge.text-bg-success { background: rgba(16,185,129,.18) !important; color:#6ee7b7 !important; }
html[data-theme="dark"] .badge.text-bg-danger { background: rgba(244,63,94,.18) !important; color:#fda4af !important; }
html[data-theme="dark"] .badge.text-bg-secondary { background: rgba(148,163,184,.18) !important; color:#cbd5e1 !important; }
html[data-theme="dark"] .alert-success { background:#0f2e26; color:#86efac; border-color:#1d5a48; }
html[data-theme="dark"] .alert-danger { background:#34121d; color:#fda4af; border-color:#6e2438; }

/* info blocks */
html[data-theme="dark"] .gs-infobox, html[data-theme="dark"] .invoice-preview-mini { background: linear-gradient(180deg,#1b1d3d,#171935); border-color: var(--gs-line); }
html[data-theme="dark"] .gs-infoline strong { color: var(--gs-ink); }
html[data-theme="dark"] .gs-mini { background: rgba(var(--cr), .12); border-color: rgba(var(--cr), .3); }
html[data-theme="dark"] .gs-toolbar { border-color: var(--gs-line); }
html[data-theme="dark"] .gs-empty-row td { color: var(--gs-muted); }
html[data-theme="dark"] .gs-due-zero { color:#6ee7b7; }
html[data-theme="dark"] .gs-due-pos { color:#fda4af; }

/* weight field */
html[data-theme="dark"] body .page-body .traditional-weight-field { background: linear-gradient(180deg,#1b1d3d,#171935); border-color: var(--gs-line); }
html[data-theme="dark"] body .page-body .traditional-weight-part:nth-child(1) .traditional-weight-label { background:rgba(255,194,51,.18); color:#fcd34d; }
html[data-theme="dark"] body .page-body .traditional-weight-part:nth-child(2) .traditional-weight-label { background:rgba(139,124,255,.22); color:#c4b9ff; }
html[data-theme="dark"] body .page-body .traditional-weight-part:nth-child(3) .traditional-weight-label { background:rgba(251,113,133,.2); color:#fda4af; }
html[data-theme="dark"] body .page-body .traditional-weight-part:nth-child(4) .traditional-weight-label { background:rgba(52,211,153,.2); color:#6ee7b7; }

/* invoices on screen */
html[data-theme="dark"] .invoice-card { background: var(--gs-surface); }
html[data-theme="dark"] .invoice-meta-card { background: linear-gradient(160deg,#1b1d3d,#171935); border-color: var(--gs-line); }
html[data-theme="dark"] .invoice-block { background: linear-gradient(180deg,#1b1d3d,#171935); border-color: var(--gs-line); }
html[data-theme="dark"] .invoice-contact-item { background:#12142b; border-color: var(--gs-line); }
html[data-theme="dark"] .invoice-contact-item strong, html[data-theme="dark"] .invoice-meta-row strong, html[data-theme="dark"] .invoice-shop-name { color: var(--gs-ink); }
html[data-theme="dark"] .invoice-table-wrap { border-color: var(--gs-line); background: transparent; }
html[data-theme="dark"] .invoice-table thead th { background:#1d1f40; color: var(--gs-muted); }
html[data-theme="dark"] .invoice-table td, html[data-theme="dark"] .invoice-table th { color: var(--gs-ink); border-color: var(--gs-line); }

/* confirm dialog + offcanvas */
html[data-theme="dark"] .sp-confirm-dialog h3 { color: var(--gs-ink); }
html[data-theme="dark"] .sp-confirm-dialog p { color: var(--gs-muted); }
html[data-theme="dark"] .gs-login { background: var(--gs-bg); }
html[data-theme="dark"] .gs-login-side { background: var(--gs-bg); }
html[data-theme="dark"] .gs-login-card { background: var(--gs-surface); border-color: var(--gs-line); }
html[data-theme="dark"] .gs-login-card h2 { color: var(--gs-ink); }
html[data-theme="dark"] .gs-login-hint { background:#1d1f40; color: var(--gs-muted); border-color: var(--gs-line); }
}

@media screen {
html[data-theme="dark"] .gs-topbar, html[data-theme="dark"] .desktop-topbar { background: rgba(23,25,53,.88) !important; border-color: var(--gs-line) !important; backdrop-filter: blur(14px); }
html[data-theme="dark"] .gs-page-title { color: var(--gs-ink) !important; }
html[data-theme="dark"] .gs-page-sub { color: var(--gs-muted) !important; }
html[data-theme="dark"] .invoice-head, html[data-theme="dark"] .invoice-note, html[data-theme="dark"] .invoice-footer { border-color: var(--gs-line) !important; }
}

@media screen {
.gs-mobilebar .gs-mrow { display:flex; align-items:center; gap:.75rem; }
.gs-mobilebar .gs-mrow > div:not(.gs-avatar) { flex:1 1 auto; min-width:0; }
.gs-mobilebar .gs-mtheme { margin-left:0; margin-right:0; flex:0 0 40px; }
body .page-body .traditional-weight-head { flex-direction:row !important; align-items:center !important; text-align:left !important; }
}
