/* =====================================================================
   General Store POS — Premium Design System (v1.13.0)
   One file: CSS variables + reusable components on top of Bootstrap 5.
   Themes only change the --brand-* / --side-* variables (see theme_style()).
   ===================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../vendor/inter/InterVariable.woff2") format("woff2");
}

:root {
  /* Brand (Emerald default — overridden per theme) */
  --brand-900: #073b30;
  --brand-800: #0a5040;
  --brand-700: #0d6b57;
  --brand-600: #12846c;
  --brand-100: #dcf1eb;
  --brand-50:  #eef8f5;
  --accent:    #e5a531;
  --accent-100:#fbefd6;

  /* Neutrals — cool, crisp, international */
  --ink-900: #0f1720;
  --ink-700: #344054;
  --ink-500: #667085;
  --ink-400: #98a2b3;
  --line:    #e5e8ec;
  --line-2:  #f0f2f5;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --canvas:  #f4f6f8;

  /* Status */
  --ok:      #12805c;
  --warn:    #b7791f;
  --danger:  #d03b3b;
  --info:    #2563a6;

  /* Sidebar */
  --side-bg:      #0e1f1b;
  --side-bg-2:    #13302a;
  --side-text:    #b9c9c3;
  --side-muted:   #6f8a82;
  --side-active:  #ffffff;
  --side-width:   264px;
  --side-mini:    76px;

  /* Shape, depth, rhythm */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 20px;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow:    0 4px 12px -2px rgba(16, 24, 40, .08), 0 2px 4px -2px rgba(16, 24, 40, .05);
  --shadow-lg: 0 24px 48px -12px rgba(16, 24, 40, .22);
  --ring:      0 0 0 4px rgba(var(--bs-primary-rgb), .14);
  --topbar-h:  64px;
  --ease:      cubic-bezier(.2, .7, .2, 1);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Bootstrap overrides */
  --bs-body-font-family: var(--font);
  --bs-body-color: var(--ink-900);
  --bs-body-bg: var(--canvas);
  --bs-border-color: var(--line);
  --bs-primary: var(--brand-700);
  --bs-primary-rgb: 13, 107, 87;
  --bs-link-color: var(--brand-700);
  --bs-link-hover-color: var(--brand-800);
  --bs-link-color-rgb: 13, 107, 87;
  --bs-border-radius: var(--radius-sm);
  --bs-secondary-color: var(--ink-500);
  --bs-emphasis-color: var(--ink-900);
}

html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body { font-feature-settings: "cv11", "ss01", "ss03"; text-rendering: optimizeLegibility; }
body.app-body { background: var(--canvas); color: var(--ink-900); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, h3, h4, h5 { font-weight: 650; letter-spacing: -.018em; color: var(--ink-900); }
.text-muted { color: var(--ink-500) !important; }
.tabular, td.text-end, .table td.tabular { font-variant-numeric: tabular-nums; }
::selection { background: rgba(var(--bs-primary-rgb), .18); }
a { text-underline-offset: 3px; }
:focus-visible { outline: 2px solid rgba(var(--bs-primary-rgb), .55); outline-offset: 2px; }

/* thin, quiet scrollbars */
* { scrollbar-width: thin; scrollbar-color: #cdd3da transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #cfd5dc; border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background-color: #b3bcc6; }

/* ---------- Buttons ---------- */
.btn { --bs-btn-font-weight: 600; border-radius: var(--radius-sm); padding: .52rem .95rem; letter-spacing: -.005em;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), color .15s, transform .08s; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn-sm { padding: .32rem .7rem; border-radius: 8px; }
.btn-lg { padding: .72rem 1.25rem; border-radius: 12px; }
.btn-primary { --bs-btn-bg: var(--brand-700); --bs-btn-border-color: var(--brand-700);
  --bs-btn-hover-bg: var(--brand-800); --bs-btn-hover-border-color: var(--brand-800);
  --bs-btn-active-bg: var(--brand-900); --bs-btn-active-border-color: var(--brand-900);
  --bs-btn-disabled-bg: var(--brand-600); --bs-btn-disabled-border-color: var(--brand-600);
  background-image: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,0));
  box-shadow: 0 1px 2px rgba(16,24,40,.12), inset 0 1px 0 rgba(255,255,255,.14); }
.btn-outline-primary { --bs-btn-color: var(--brand-700); --bs-btn-border-color: rgba(var(--bs-primary-rgb), .45);
  --bs-btn-hover-bg: var(--brand-700); --bs-btn-hover-border-color: var(--brand-700);
  --bs-btn-active-bg: var(--brand-800); }
.btn-light { --bs-btn-bg: #fff; --bs-btn-color: var(--ink-700); --bs-btn-border-color: var(--line); --bs-btn-hover-bg: var(--surface-2);
  --bs-btn-hover-border-color: #d5dae0; --bs-btn-hover-color: var(--ink-900); --bs-btn-active-bg: var(--line-2); box-shadow: var(--shadow-xs); }
.btn-outline-secondary { --bs-btn-color: var(--ink-700); --bs-btn-border-color: var(--line); --bs-btn-hover-bg: var(--line-2); --bs-btn-hover-color: var(--ink-900); --bs-btn-hover-border-color: #d5dae0; }
.btn-link { --bs-btn-font-weight: 600; text-decoration: none; }
.btn-link:hover { text-decoration: underline; }
.btn-icon { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border-radius: 10px; font-size: 1.15rem; color: var(--ink-700); border: 1px solid transparent; }
.btn-icon:hover { background: var(--line-2); color: var(--ink-900); }
.btn:focus-visible, .form-control:focus, .form-select:focus, .form-check-input:focus { box-shadow: var(--ring); border-color: var(--brand-600); }

/* ---------- Forms ---------- */
.form-label { font-weight: 600; font-size: .85rem; color: var(--ink-700); margin-bottom: .35rem; }
.form-control, .form-select { border-radius: var(--radius-sm); border-color: #dde1e6; padding: .55rem .8rem; min-height: 42px; background-color: #fff;
  box-shadow: var(--shadow-xs); transition: border-color .15s, box-shadow .15s; }
.form-control:hover, .form-select:hover { border-color: #c9cfd6; }
.form-control:focus, .form-select:focus { background-color: #fff; }
.form-control-sm, .form-select-sm { min-height: 34px; border-radius: 8px; }
.form-control-lg { border-radius: 12px; }
.form-control:disabled, .form-select:disabled, .form-control[readonly] { background-color: var(--line-2); box-shadow: none; }
.form-control::placeholder { color: var(--ink-400); }
.form-text { color: var(--ink-500); font-size: .8rem; }
.form-check-input { border-color: #c9cfd6; }
.form-check-input:checked { background-color: var(--brand-700); border-color: var(--brand-700); }
.form-switch .form-check-input:focus { --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2398a2b3'/%3e%3c/svg%3e"); }
.required::after { content: " *"; color: var(--danger); }
.input-group-text { background: var(--surface-2); border-color: #dde1e6; color: var(--ink-500); }
.input-group > .form-control, .input-group > .form-select { box-shadow: none; }
.input-group { border-radius: var(--radius-sm); box-shadow: var(--shadow-xs); }
.input-group:focus-within { box-shadow: var(--ring); border-radius: var(--radius-sm); }
.input-group:focus-within .form-control:focus { box-shadow: none; }

/* ---------- App shell ---------- */
.app-shell { display: flex; min-height: 100vh; min-height: 100dvh; }
.app-sidebar {
  width: var(--side-width); flex: 0 0 var(--side-width);
  background:
    radial-gradient(420px 260px at -10% -5%, rgba(var(--bs-primary-rgb), .38), transparent 70%),
    linear-gradient(180deg, var(--side-bg) 0%, var(--side-bg-2) 100%);
  color: var(--side-text); position: sticky; top: 0; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; z-index: 1040; border-right: 1px solid rgba(255,255,255,.04);
  transition: width .22s var(--ease), flex-basis .22s var(--ease), transform .25s var(--ease);
}
.sidebar-brand { display: flex; align-items: center; gap: .75rem; padding: 1.1rem 1.1rem 1rem; min-height: 72px; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; color: #fff; display: grid; place-items: center; font-size: 1.15rem; flex-shrink: 0;
  background: linear-gradient(145deg, var(--brand-600), var(--brand-800));
  box-shadow: 0 6px 16px -4px rgba(var(--bs-primary-rgb), .55), inset 0 1px 0 rgba(255,255,255,.22); }
.brand-text { min-width: 0; }
.brand-name { color: #fff; font-weight: 700; font-size: .98rem; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: .68rem; color: var(--side-muted); letter-spacing: .12em; text-transform: uppercase; font-weight: 600; margin-top: 1px; }
.side-collapse { margin-left: auto; width: 30px; height: 30px; border-radius: 8px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.04);
  color: var(--side-text); display: inline-grid; place-items: center; font-size: .85rem; flex-shrink: 0; }
.side-collapse:hover { background: rgba(255,255,255,.1); color: #fff; }

.side-search { margin: 0 .85rem .4rem; display: flex; align-items: center; gap: .55rem; width: calc(100% - 1.7rem); padding: .5rem .7rem; border-radius: 10px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); color: var(--side-muted); font-size: .85rem; text-align: left; }
.side-search:hover { background: rgba(255,255,255,.09); color: var(--side-text); }
.side-search kbd { margin-left: auto; background: rgba(255,255,255,.08); color: var(--side-text); font-size: .68rem; padding: .1rem .35rem; border-radius: 5px; box-shadow: none; }

.sidebar-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: .3rem .7rem 1rem; scrollbar-color: rgba(255,255,255,.14) transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); }
.nav-group-label { font-size: .66rem; text-transform: uppercase; letter-spacing: .12em; color: var(--side-muted); padding: 1rem .75rem .4rem; font-weight: 700; white-space: nowrap; }
.nav-item { position: relative; display: flex; align-items: center; gap: .75rem; padding: .55rem .75rem; border-radius: 10px;
  color: var(--side-text); text-decoration: none; font-size: .9rem; font-weight: 500; margin-bottom: 2px; min-height: 40px; white-space: nowrap;
  transition: background-color .15s var(--ease), color .15s; }
.nav-item i { font-size: 1.05rem; width: 1.25rem; text-align: center; opacity: .85; flex-shrink: 0; }
.nav-item > span { overflow: hidden; text-overflow: ellipsis; }
a.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
a.nav-item:hover i { opacity: 1; }
.nav-item.active { color: var(--side-active); font-weight: 600;
  background: linear-gradient(90deg, rgba(var(--bs-primary-rgb), .55), rgba(var(--bs-primary-rgb), .22));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07), 0 6px 18px -8px rgba(var(--bs-primary-rgb), .8); }
.nav-item.active::before { content: ""; position: absolute; left: -.7rem; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav-item.active i { opacity: 1; }
.nav-item.is-soon { opacity: .45; cursor: default; }
.nav-item.is-soon em { margin-left: auto; font-style: normal; font-size: .65rem; border: 1px solid rgba(255,255,255,.25); border-radius: 6px; padding: 0 .35rem; }
.sidebar-foot { display: flex; align-items: center; gap: .5rem; padding: .8rem 1.1rem; font-size: .72rem; color: var(--side-muted); border-top: 1px solid rgba(255,255,255,.06); white-space: nowrap; }
.sidebar-foot .sf-dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52,211,153,.15); }
.sidebar-backdrop { display: none; }

/* Desktop: collapsed icon rail (remembered in a cookie, applied by the server: no flash) */
@media (min-width: 992px) {
  .side-mini .app-sidebar { width: var(--side-mini); flex-basis: var(--side-mini); }
  .side-mini .brand-text, .side-mini .nav-item > span, .side-mini .nav-item .nav-badge, .side-mini .nav-item em,
  .side-mini .side-search span, .side-mini .side-search kbd, .side-mini .sidebar-foot span:not(.sf-dot) { display: none; }
  .side-mini .sidebar-brand { flex-direction: column; padding: 1rem .5rem .75rem; gap: .6rem; }
  .side-mini .side-collapse { margin-left: 0; transform: rotate(180deg); }
  .side-mini .side-search { margin: 0 auto .4rem; width: 44px; justify-content: center; padding: .55rem; }
  .side-mini .sidebar-nav { padding-left: .55rem; padding-right: .55rem; }
  .side-mini .nav-group-label { font-size: 0; padding: .55rem 0 .35rem; }
  .side-mini .nav-group-label::after { content: ""; display: block; height: 1px; margin: 0 .6rem; background: rgba(255,255,255,.08); }
  .side-mini .nav-item { justify-content: center; padding: .6rem 0; }
  .side-mini .nav-item.active::before { left: -.55rem; }
  .side-mini .sidebar-foot { justify-content: center; padding-left: 0; padding-right: 0; }
}

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar { height: var(--topbar-h); background: rgba(255,255,255,.82); -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(16,24,40,.06); display: flex; align-items: center; gap: .75rem;
  padding: 0 1.5rem; position: sticky; top: 0; z-index: 1030; }
.topbar-heading { min-width: 0; line-height: 1.15; }
.topbar-crumb { font-size: .72rem; color: var(--ink-400); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.topbar-title { font-weight: 700; font-size: 1.05rem; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-search { display: flex; align-items: center; gap: .55rem; margin-left: 1.25rem; min-width: 260px; padding: .45rem .7rem; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-400); font-size: .87rem; box-shadow: var(--shadow-xs); }
.topbar-search:hover { border-color: #cfd5dc; color: var(--ink-500); }
.topbar-search kbd { margin-left: auto; font-size: .68rem; background: var(--line-2); color: var(--ink-500); border: 1px solid var(--line); box-shadow: none; padding: .05rem .35rem; border-radius: 5px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .32rem .7rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-700); font-size: .8rem; font-weight: 600; white-space: nowrap; }
.chip i { color: var(--ink-400); }
.user-btn { display: flex; align-items: center; gap: .6rem; background: none; border: 1px solid transparent; border-radius: 12px; padding: .25rem .5rem .25rem .3rem; }
.user-btn:hover { background: var(--surface); border-color: var(--line); }
.avatar { width: 36px; height: 36px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .8rem; letter-spacing: .02em;
  background: linear-gradient(145deg, var(--brand-600), var(--brand-900)); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--brand-100); }
.user-name { display: block; font-weight: 650; font-size: .86rem; }
.user-role { display: block; font-size: .73rem; color: var(--ink-500); }
.app-content { padding: 1.75rem 1.75rem 2.5rem; max-width: 1480px; width: 100%; margin: 0 auto; }
.app-content > * { animation: pageIn .28s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .app-content > * { animation: none; } * { scroll-behavior: auto !important; } }

/* Phones & tablets: slide-in drawer + bottom tab bar */
.bottom-nav { display: none; }
@media (max-width: 991.98px) {
  .app-sidebar { position: fixed; left: 0; top: 0; transform: translateX(-102%); box-shadow: var(--shadow-lg); width: min(var(--side-width), 86vw); }
  .app-shell.sidebar-open .app-sidebar { transform: none; }
  .app-shell.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(10, 15, 25, .5); z-index: 1035;
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); animation: fadeIn .2s ease; }
  .side-collapse { display: none; }
  .app-topbar { padding: 0 .75rem; gap: .5rem; height: 58px; }
  .app-content { padding: 1rem .85rem calc(84px + env(safe-area-inset-bottom)); }
  .topbar-search { display: none; }
  .bottom-nav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1032;
    background: rgba(255,255,255,.92); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid rgba(16,24,40,.08); padding: .35rem .35rem calc(.35rem + env(safe-area-inset-bottom)); }
  .bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; border: 0; background: none;
    color: var(--ink-500); text-decoration: none; font-size: .68rem; font-weight: 600; border-radius: 12px; }
  .bottom-nav i { font-size: 1.25rem; line-height: 1; }
  .bottom-nav .active { color: var(--brand-700); }
  .bottom-nav .active i { transform: translateY(-1px); }
  .bottom-nav .bn-pos { color: #fff; }
  .bottom-nav .bn-pos i { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; margin-top: -20px; font-size: 1.3rem;
    background: linear-gradient(145deg, var(--brand-600), var(--brand-800)); box-shadow: 0 10px 20px -6px rgba(var(--bs-primary-rgb), .7), 0 0 0 4px #fff; }
  .bottom-nav .bn-pos span { color: var(--ink-700); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Command palette (Ctrl + K) ---------- */
.cmdk { position: fixed; inset: 0; z-index: 2600; display: none; align-items: flex-start; justify-content: center; padding: 12vh 1rem 1rem;
  background: rgba(10, 15, 25, .42); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.cmdk.show { display: flex; animation: fadeIn .12s ease; }
.cmdk-box { width: 100%; max-width: 580px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(16,24,40,.06); overflow: hidden;
  animation: popIn .16s var(--ease); }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.985); } to { opacity: 1; transform: none; } }
.cmdk-in { display: flex; align-items: center; gap: .7rem; padding: .95rem 1.1rem; border-bottom: 1px solid var(--line-2); }
.cmdk-in i { font-size: 1.1rem; color: var(--ink-400); }
.cmdk-in input { border: 0; outline: 0; flex: 1; font-size: 1.05rem; background: none; color: var(--ink-900); min-width: 0; }
.cmdk-in kbd { font-size: .68rem; background: var(--line-2); color: var(--ink-500); box-shadow: none; border: 1px solid var(--line); }
.cmdk-list { max-height: 50vh; overflow: auto; padding: .4rem; }
.cmdk-group { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-400); padding: .6rem .7rem .3rem; }
.cmdk-item { display: flex; align-items: center; gap: .75rem; padding: .6rem .7rem; border-radius: 10px; color: var(--ink-700); text-decoration: none; font-weight: 500; }
.cmdk-item i { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--line-2); color: var(--ink-500); font-size: 1rem; flex-shrink: 0; }
.cmdk-item.sel { background: var(--brand-50); color: var(--ink-900); }
.cmdk-item.sel i { background: var(--brand-700); color: #fff; }
.cmdk-item .ck-go { margin-left: auto; font-size: .75rem; color: var(--ink-400); opacity: 0; }
.cmdk-item.sel .ck-go { opacity: 1; }
.cmdk-empty { padding: 1.5rem; text-align: center; color: var(--ink-500); font-size: .9rem; }
.cmdk-foot { display: flex; gap: 1rem; padding: .55rem 1rem; border-top: 1px solid var(--line-2); background: var(--surface-2); font-size: .72rem; color: var(--ink-500); }
.cmdk-foot kbd { font-size: .66rem; background: #fff; color: var(--ink-700); border: 1px solid var(--line); box-shadow: 0 1px 0 var(--line); }

/* ---------- Page header ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .9rem; margin-bottom: 1.4rem; }
.page-head h1 { font-size: 1.6rem; margin: 0; font-weight: 700; letter-spacing: -.025em; }
.page-head .sub { color: var(--ink-500); margin: .3rem 0 0; font-size: .9rem; }
.page-head > .d-flex { flex-wrap: wrap; }
@media (max-width: 575.98px) {
  .page-head { align-items: stretch; }
  .page-head h1 { font-size: 1.35rem; }
  .page-head > .d-flex, .page-head > div:last-child:not(:first-child) { width: 100%; }
  .page-head > .d-flex > .btn { flex: 1 1 auto; }
}

/* ---------- Cards / panels ---------- */
.panel { background: var(--surface); border: 1px solid rgba(16,24,40,.07); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line-2); }
.panel-head h2, .panel-head h3 { font-size: 1rem; margin: 0; font-weight: 650; letter-spacing: -.01em; }
.panel-body { padding: 1.2rem; }
.panel-foot { padding: .9rem 1.2rem; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.card { border-color: rgba(16,24,40,.07); border-radius: var(--radius); box-shadow: var(--shadow-sm); }

.stat { background: var(--surface); border: 1px solid rgba(16,24,40,.07); border-radius: var(--radius); padding: 1.05rem 1.15rem; height: 100%;
  display: flex; gap: .9rem; align-items: flex-start; box-shadow: var(--shadow-sm); transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
a.stat:hover, a .stat:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.stat-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; flex-shrink: 0;
  background: var(--brand-50); color: var(--brand-700); box-shadow: inset 0 0 0 1px rgba(var(--bs-primary-rgb), .08); }
.stat-icon.amber { background: var(--accent-100); color: #9a6a12; }
.stat-icon.blue  { background: #e8f0fb; color: var(--info); }
.stat-icon.red   { background: #fdecec; color: var(--danger); }
.stat-label { font-size: .8rem; color: var(--ink-500); font-weight: 600; }
.stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-note { font-size: .75rem; color: var(--ink-400); margin-top: .15rem; }

/* ---------- Tables ---------- */
.table { --bs-table-color: var(--ink-900); --bs-table-bg: transparent; margin-bottom: 0; }
.table > thead th { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-500); font-weight: 650;
  background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; padding: .7rem .9rem; }
.table > tbody td, .table > tbody th { padding: .75rem .9rem; border-color: var(--line-2); vertical-align: middle; }
.table > tbody > tr:last-child > * { border-bottom-width: 0; }
.table > tfoot > tr > * { padding: .7rem .9rem; }
.table-hover > tbody > tr { transition: background-color .12s; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: #f7f9fb; }
.table-sm > :not(caption) > * > * { padding: .45rem .6rem; }
.panel > .table-responsive:last-child .table, .panel > .table-responsive:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.table-responsive { -webkit-overflow-scrolling: touch; }
.cell-main { font-weight: 600; color: var(--ink-900); }
.cell-sub { font-size: .78rem; color: var(--ink-500); }
.filter-bar { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; padding: .9rem 1.2rem; border-bottom: 1px solid var(--line-2); }
.filter-bar .form-control, .filter-bar .form-select { min-height: 38px; padding-top: .4rem; padding-bottom: .4rem; }
.filter-bar .search { flex: 1 1 240px; max-width: 380px; }
.filter-bar .form-select.w-auto { min-width: 150px; padding-right: 2.2rem; }
@media (max-width: 575.98px) {
  .filter-bar { padding: .75rem; }
  .filter-bar .search { max-width: none; flex-basis: 100%; }
  .filter-bar .form-select.w-auto, .filter-bar .form-control[type="date"] { flex: 1 1 140px; min-width: 0; width: auto !important; }
  .table > thead th, .table > tbody td { padding-left: .65rem; padding-right: .65rem; }
}

/* ---------- Pagination, tabs, list groups ---------- */
.pagination { --bs-pagination-color: var(--ink-700); --bs-pagination-border-color: var(--line); --bs-pagination-hover-bg: var(--line-2); --bs-pagination-hover-color: var(--ink-900);
  --bs-pagination-active-bg: var(--brand-700); --bs-pagination-active-border-color: var(--brand-700); --bs-pagination-focus-box-shadow: var(--ring); gap: 4px; }
.pagination .page-link { border-radius: 8px !important; min-width: 34px; text-align: center; font-weight: 600; }
.nav-tabs { --bs-nav-tabs-border-color: var(--line); gap: .25rem; }
.nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; color: var(--ink-500); font-weight: 600; padding: .6rem .9rem; border-radius: 0; }
.nav-tabs .nav-link:hover { color: var(--ink-900); border-bottom-color: var(--line); }
.nav-tabs .nav-link.active { color: var(--brand-700); background: none; border-bottom-color: var(--brand-700); }
.nav-pills { --bs-nav-pills-link-active-bg: var(--brand-700); }
.nav-pills .nav-link { font-weight: 600; border-radius: 9px; color: var(--ink-500); }
.list-group { --bs-list-group-border-color: var(--line); --bs-list-group-border-radius: var(--radius-sm); --bs-list-group-action-hover-bg: var(--surface-2);
  --bs-list-group-active-bg: var(--brand-700); --bs-list-group-active-border-color: var(--brand-700); }
.progress { --bs-progress-bg: var(--line-2); --bs-progress-bar-bg: var(--brand-700); border-radius: 999px; }
kbd { border-radius: 5px; }

/* ---------- Badges ---------- */
.badge { font-weight: 650; border-radius: 6px; }
.badge-soft { display: inline-flex; align-items: center; gap: .35rem; font-size: .73rem; font-weight: 650; padding: .24rem .6rem; border-radius: 999px; white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); }
.badge-soft.ok      { background: #e7f6ee; color: #0f6b48; }
.badge-soft.muted   { background: var(--line-2); color: var(--ink-500); }
.badge-soft.warn    { background: #fdf3dd; color: #8a5a07; }
.badge-soft.danger  { background: #fdecec; color: #a72727; }
.badge-soft.brand   { background: var(--brand-50); color: var(--brand-800); }
.badge-soft.info    { background: #e8f0fb; color: #1f4f86; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--ink-500); }
.empty-state .empty-icon { width: 64px; height: 64px; margin: 0 auto .9rem; border-radius: 18px; display: grid; place-items: center; font-size: 1.7rem;
  color: var(--brand-700); background: linear-gradient(145deg, var(--brand-50), #fff); box-shadow: inset 0 0 0 1px rgba(var(--bs-primary-rgb), .12), var(--shadow-sm); }
.empty-state h2, .empty-state h3 { font-size: 1.1rem; color: var(--ink-900); }

/* ---------- Alerts ---------- */
.alert { border-radius: var(--radius-sm); border-width: 1px; font-size: .92rem; padding: .85rem 1rem; }
.alert-success { background: #eef9f3; border-color: #cdebdb; color: #0f5c3c; }
.alert-danger  { background: #fef2f2; border-color: #f7d4d4; color: #8f2020; }
.alert-warning { background: #fef8ea; border-color: #f4e3bb; color: #7a5208; }
.alert-info    { background: #eff5fc; border-color: #d4e3f4; color: #1d4a7c; }
.alert-light   { background: var(--surface); border-color: var(--line) !important; color: var(--ink-700); box-shadow: var(--shadow-xs); }
.alert .btn-close { padding: 1.05rem 1rem; }

/* ---------- Permission matrix ---------- */
.perm-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; }
.perm-matrix-wrap { border: 1px solid var(--line); border-radius: var(--radius-sm); }
.perm-matrix th, .perm-matrix td { font-size: .85rem; }
.perm-matrix thead th { font-size: .66rem; text-align: center; vertical-align: bottom; white-space: normal; min-width: 58px; padding-left: .3rem; padding-right: .3rem; }
.perm-matrix .perm-module-col { min-width: 175px; text-align: left; font-weight: 600; position: sticky; left: 0; background: #fff; z-index: 1; }
.perm-matrix thead .perm-module-col { background: #fafbfa; }
.perm-box { position: relative; display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; padding: .2rem; }
.perm-box .form-check-input { width: 1.2rem; height: 1.2rem; margin: 0; cursor: pointer; }
.perm-box .form-check-input:disabled { cursor: not-allowed; }
.perm-box.with-label { display: flex; font-size: .82rem; padding: .15rem 0; }
.perm-lock { font-size: .6rem; color: var(--warn); position: absolute; top: -2px; right: -6px; }
.perm-box.with-label .perm-lock { position: static; }
.perm-na { color: var(--line); }
.perm-special { min-width: 240px; }
.perm-box.with-label span { white-space: normal; line-height: 1.3; }
.perm-matrix thead th:last-child { text-align: left; }
.perm-row-toggle { font-size: .72rem; text-decoration: none; }


/* ---------- Auth pages (login / installer) ---------- */
.auth-page { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); background: var(--canvas); }
.auth-aside { position: relative; overflow: hidden; color: #d5e4df; padding: 2.75rem 3.25rem; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  background:
    radial-gradient(700px 420px at 0% 0%, rgba(var(--bs-primary-rgb), .75), transparent 65%),
    radial-gradient(520px 380px at 100% 100%, rgba(229, 165, 49, .22), transparent 70%),
    linear-gradient(160deg, var(--side-bg), var(--brand-900)); }
.auth-aside::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px; -webkit-mask-image: radial-gradient(ellipse at 30% 30%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at 30% 30%, #000 20%, transparent 75%); }
.auth-aside > * { position: relative; }
.auth-brand { display: flex; align-items: center; gap: .8rem; }
.auth-brand .brand-mark { width: 44px; height: 44px; }
.auth-brand b { display: block; color: #fff; font-size: 1.05rem; letter-spacing: -.01em; }
.auth-brand small { display: block; color: rgba(255,255,255,.55); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.auth-eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .75rem; font-weight: 600; letter-spacing: .04em; color: #fff;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; padding: .3rem .8rem; margin-bottom: 1.2rem; }
.auth-eyebrow .live-dot { background: #5ee0b0; }
.auth-aside h1 { color: #fff; font-size: clamp(1.9rem, 3vw, 2.6rem); max-width: 520px; line-height: 1.12; font-weight: 700; letter-spacing: -.035em; margin-bottom: 1rem; }
.auth-aside h1 em { font-style: normal; background: linear-gradient(90deg, #ffd27a, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-aside p { color: rgba(225, 236, 232, .72); max-width: 470px; font-size: 1rem; line-height: 1.6; }
.auth-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; max-width: 540px; margin-top: 1.75rem; }
.auth-feature { display: flex; gap: .7rem; align-items: flex-start; padding: .85rem .9rem; border-radius: 14px; color: #e3eeea; font-size: .86rem; line-height: 1.35;
  background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.09); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.auth-feature i { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; color: #2b1d02; background: linear-gradient(145deg, #ffd27a, var(--accent)); }
.auth-feature b { display: block; color: #fff; font-weight: 650; margin-bottom: 1px; }
.auth-feature span { color: rgba(225,236,232,.65); font-size: .78rem; }
.auth-foot { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; font-size: .78rem; color: rgba(225,236,232,.55); }
.auth-foot i { margin-right: .3rem; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; position: relative;
  background: radial-gradient(600px 400px at 100% 0%, var(--brand-50), transparent 70%), var(--canvas); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: 22px; padding: 2.25rem 2rem 1.75rem;
  border: 1px solid rgba(16,24,40,.06); box-shadow: 0 30px 60px -20px rgba(16,24,40,.18), 0 2px 6px rgba(16,24,40,.04); }
.auth-card .brand-mark { width: 48px; height: 48px; font-size: 1.35rem; margin-bottom: 1.1rem; }
.auth-card h2 { font-size: 1.6rem; margin-bottom: .3rem; font-weight: 700; letter-spacing: -.03em; }
.auth-card .form-control { min-height: 48px; }
.auth-card .input-group-text { min-width: 46px; justify-content: center; }
.auth-card .btn-lg { min-height: 50px; font-size: 1rem; }
.auth-help { display: flex; gap: .55rem; align-items: flex-start; margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px solid var(--line-2); font-size: .8rem; color: var(--ink-500); }
.auth-copy { position: absolute; bottom: 1rem; left: 0; right: 0; text-align: center; font-size: .74rem; color: var(--ink-400); }
.auth-mobile-brand { display: none; }
@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-main { align-items: stretch; justify-content: flex-start; padding: 0 0 2rem; flex-direction: column;
    background: linear-gradient(180deg, transparent 0 230px, var(--canvas) 230px), radial-gradient(500px 300px at 0% 0%, rgba(var(--bs-primary-rgb), .8), transparent 70%), linear-gradient(160deg, var(--side-bg), var(--brand-900)); }
  .auth-mobile-brand { display: flex; align-items: center; gap: .75rem; padding: 2.2rem 1.5rem 1.6rem; color: #fff; width: 100%; }
  .auth-mobile-brand b { display: block; font-size: 1.15rem; letter-spacing: -.01em; }
  .auth-mobile-brand small { display: block; color: rgba(255,255,255,.6); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
  .auth-card { margin: 0 auto; width: calc(100% - 2rem); padding: 1.75rem 1.35rem 1.4rem; }
  .auth-card > .brand-mark { display: none; }
  .auth-copy { position: static; margin-top: 1.25rem; width: 100%; }
  .auth-mobile-brand { padding-top: 3rem; padding-bottom: 2.2rem; }
}

/* ---------- Install checklist ---------- */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; gap: .75rem; padding: .75rem 0; border-bottom: 1px solid var(--line-2); align-items: flex-start; }
.check-list li:last-child { border-bottom: 0; }
.check-list .ci { font-size: 1.1rem; line-height: 1.3; }
.check-list .ci.ok { color: var(--ok); } .check-list .ci.bad { color: var(--danger); } .check-list .ci.warn { color: var(--warn); }
.check-list .ct { font-weight: 600; }
.check-list .cd { font-size: .84rem; color: var(--ink-500); }

/* ---------- Misc ---------- */
.kv { display: grid; grid-template-columns: 150px 1fr; gap: .45rem 1rem; font-size: .9rem; }
.kv dt { color: var(--ink-500); font-weight: 500; }
.kv dd { margin: 0; }
@media (max-width: 575.98px) { .kv { grid-template-columns: 1fr; gap: .1rem; } .kv dd { margin-bottom: .45rem; } }
.json-box { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 8px; padding: .5rem .7rem; font-size: .76rem;
  white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.section-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-500); font-weight: 700; margin: 0 0 .8rem; }
.logo-preview { max-height: 64px; max-width: 200px; border: 1px solid var(--line); border-radius: 10px; padding: 4px; background: #fff; }
.modal { --bs-modal-border-radius: 18px; --bs-modal-inner-border-radius: 18px; }
.modal-backdrop { --bs-backdrop-bg: #0a0f19; --bs-backdrop-opacity: .45; }
.modal-content { border-radius: 18px; border: 0; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(16,24,40,.05); }
.modal-header { border-bottom-color: var(--line-2); padding: 1rem 1.25rem; }
.modal-title { font-weight: 700; letter-spacing: -.015em; font-size: 1.08rem; }
.modal-body { padding: 1.15rem 1.25rem; }
.modal-footer { border-top-color: var(--line-2); padding: .8rem 1.25rem; background: var(--surface-2); border-radius: 0 0 18px 18px; }
.modal.fade .modal-dialog { transform: translateY(8px) scale(.985); transition: transform .2s var(--ease); }
.modal.show .modal-dialog { transform: none; }
@media (max-width: 575.98px) {
  .modal-dialog { margin: .6rem; }
  .modal-dialog-centered { min-height: calc(100% - 1.2rem); }
}
.dropdown-menu { border: 1px solid rgba(16,24,40,.08); border-radius: 12px; font-size: .9rem; padding: .35rem; box-shadow: var(--shadow-lg);
  --bs-dropdown-link-active-bg: var(--brand-700); }
.dropdown-item { border-radius: 8px; padding: .5rem .7rem; font-weight: 500; }
.dropdown-item:hover { background: var(--line-2); }
.dropdown-divider { margin: .3rem 0; border-color: var(--line-2); }
.flash { box-shadow: var(--shadow-sm); }
.tooltip { --bs-tooltip-bg: var(--ink-900); --bs-tooltip-border-radius: 8px; }

/* Touch-friendly sizes on tablets / phones */
@media (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn-sm { min-height: 38px; }
  .form-control, .form-select { min-height: 46px; font-size: 16px; }   /* 16px: no zoom on iPhone */
  .form-control-sm, .form-select-sm { min-height: 38px; }
  .nav-item { min-height: 46px; }
}

/* ---------- Print ---------- */
@media print {
  .app-sidebar, .app-topbar, .bottom-nav, .cmdk, .btn, .filter-bar, .pagination, .no-print, .alert { display: none !important; }
  .app-content { padding: 0; max-width: none; }
  .app-content > * { animation: none !important; }
  body.app-body { background: #fff; }
  .panel { border: 0; box-shadow: none; }
}

/* ---------- Phase 2: catalogue ---------- */
.thumb { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); background: #fff; flex-shrink: 0; }
.thumb-lg { width: 72px; height: 72px; }
.thumb-empty { display: inline-grid; place-items: center; color: var(--ink-400); background: var(--line-2); }
.icon-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-picker input { position: absolute; opacity: 0; pointer-events: none; }
.icon-picker span { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: 1.05rem; color: var(--ink-700); background: #fff; }
.icon-picker input:checked + span { border-color: var(--brand-700); background: var(--brand-50); color: var(--brand-800); box-shadow: 0 0 0 2px rgba(var(--bs-primary-rgb), .15); }
.icon-picker input:focus-visible + span { outline: 2px solid var(--brand-600); }
a.cat-card:hover { border-color: var(--brand-600); box-shadow: var(--shadow); }
.variant-generator { background: var(--brand-50); border: 1px dashed var(--brand-600); border-radius: var(--radius-sm); padding: .9rem 1rem; margin-bottom: 1rem; }
.variant-table .form-control-sm, .variant-table .form-select-sm { min-height: 34px; }
.variant-table td { padding: .35rem .3rem; }
.min-w-0 { min-width: 0; }
.qty-pos { color: var(--ok); font-weight: 600; }
.qty-neg { color: var(--danger); font-weight: 600; }
.search-results { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
                  box-shadow: var(--shadow); max-height: 320px; overflow: auto; margin-top: 4px; }
.search-results button { display: flex; width: 100%; text-align: left; gap: .75rem; align-items: center; justify-content: space-between; border: 0; background: none; padding: .55rem .8rem; border-bottom: 1px solid var(--line-2); }
.search-results button:hover, .search-results button.active { background: var(--brand-50); }

/* ---------- Phase 3: dashboard mini stats ---------- */
.mini-stat { background: #f7f9f8; border: 1px solid var(--line-2); border-radius: 10px; padding: .7rem .85rem; height: 100%; }
.mini-stat .stat-label { font-size: .75rem; }
.mini-stat .fs-5 { white-space: nowrap; font-size: 1.1rem !important; }

/* ---------- Phase 6: reports ---------- */
.report-table tfoot th { border-top: 2px solid var(--line); background: #f7f9f8; }
.pl-table td { padding: .5rem .25rem; }
@media print { .panel { box-shadow: none !important; border: 1px solid #ddd; } .report-table { font-size: 11px; } }

/* ---------- Screen lock (1.6.0) ---------- */
.lock-overlay { position: fixed; inset: 0; z-index: 3000; display: none; align-items: center; justify-content: center; padding: 16px;
  background: radial-gradient(1200px 600px at 20% 10%, rgba(var(--bs-primary-rgb),.6), transparent 60%), var(--side-bg);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.lock-overlay.show { display: flex; }
html.is-locked body > *:not(.lock-overlay) { visibility: hidden; }
html.is-locked, html.is-locked body { overflow: hidden; }
.lock-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: radial-gradient(1200px 600px at 20% 10%, var(--brand-600), transparent 60%), var(--brand-900); }
.lock-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 20px; padding: 32px 28px 22px; text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.lock-card h2 { font-size: 1.35rem; font-weight: 700; margin: 4px 0 2px; color: var(--ink-900); }
.lock-avatar { width: 76px; height: 76px; border-radius: 50%; margin: -70px auto 12px; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--brand-600), var(--brand-900)); border: 5px solid var(--surface); }
.lock-icon { display: inline-flex; gap: 6px; align-items: center; font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--brand-700); background: var(--brand-50); border-radius: 999px; padding: 3px 12px; }
.lock-time { margin-top: 10px; font-size: .8rem; color: var(--ink-400); font-variant-numeric: tabular-nums; }

/* ---------- Demand / orders (1.6.0) ---------- */
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
a.mini-stat { display: flex; justify-content: space-between; align-items: center; text-decoration: none; color: var(--ink-700); font-size: .85rem; }
a.mini-stat b { font-size: 1.15rem; color: var(--ink-900); }
a.mini-stat:hover, a.mini-stat.active { border-color: var(--brand-600); background: var(--brand-50); }
.sug-wrap { max-height: 460px; overflow: auto; }
.sug-wrap thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; box-shadow: inset 0 -1px 0 var(--line); }
#sugTable tr.is-added td { background: #f3faf7; }
.sticky-actions { position: sticky; bottom: 0; padding: .75rem 0; background: linear-gradient(to top, var(--canvas) 70%, transparent); z-index: 5; }

/* ---------- Duplicate check on product form (1.6.0) ---------- */
.name-check .nc { margin-top: .4rem; font-size: .84rem; border-radius: 8px; padding: .45rem .65rem; }
.name-check .nc ul { margin: .25rem 0 0; padding-left: 1.1rem; }
.name-check .nc-bad { background: #fbe7e5; color: #8a2116; }
.name-check .nc-warn { background: var(--accent-100); color: #6d4806; }
.name-check .nc-ok { color: var(--ok); padding-left: 0; }
.exp-row.is-expired td { background: #fff5f4; }
.exp-row.is-week td { background: #fffaf0; }
.expiry-stat.active { border-color: var(--brand-600); box-shadow: 0 0 0 2px var(--brand-100); }
.stat-sub { font-size: .78rem; color: var(--ink-500); }
.dup-group { border-top: 3px solid var(--line); } .dup-group tr:first-child td { padding-top: .9rem; }

/* ---------- Dashboard (1.6.0) — no chart library: server-drawn SVG + CSS ---------- */
.dash-hero { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: space-between;
  padding: 1.4rem 1.5rem; margin-bottom: 1rem; border-radius: var(--radius-lg); color: #fff;
  background: radial-gradient(900px 300px at 85% -40%, rgba(229,165,49,.35), transparent 60%), linear-gradient(120deg, var(--brand-900), var(--brand-700) 70%, var(--brand-600)); }
.dash-hero::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; border: 40px solid rgba(255,255,255,.05); pointer-events: none; }
.dash-hero h1 { color: #fff; font-size: 1.6rem; margin: .25rem 0 .2rem; font-weight: 700; letter-spacing: -.01em; }
.dash-hero p { margin: 0; color: rgba(255,255,255,.78); font-size: .92rem; }
.dash-eyebrow { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.7); display: flex; align-items: center; gap: .45rem; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #5ee0b0; box-shadow: 0 0 0 0 rgba(94,224,176,.6); animation: livePulse 2s infinite; }
@keyframes livePulse { 70% { box-shadow: 0 0 0 8px rgba(94,224,176,0); } 100% { box-shadow: 0 0 0 0 rgba(94,224,176,0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.dash-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; position: relative; z-index: 1; }
.btn-accent { background: var(--accent); color: #2b1d02; border: 0; }
.btn-accent:hover { background: #f0b445; color: #2b1d02; }
.btn-glass { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.22); }
.btn-glass:hover { background: rgba(255,255,255,.2); color: #fff; }
.dash-date .form-control { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.22); min-height: 38px; color-scheme: dark; }

.kpi-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: .75rem; }
.kpi { overflow: hidden; }
@media (max-width: 1199px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .kpi-grid { grid-template-columns: 1fr; } }
.kpi { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow-sm); }
.kpi-icon { position: absolute; right: 1rem; top: 1rem; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-700); }
.kpi-label { font-size: .8rem; color: var(--ink-500); font-weight: 600; }
.kpi-value { font-size: 1.55rem; font-weight: 700; letter-spacing: -.01em; margin-top: .2rem; white-space: nowrap; }
.kpi-foot { font-size: .76rem; color: var(--ink-400); margin-top: .25rem; }
.kpi-hero { background: linear-gradient(160deg, #fff, var(--brand-50)); border-color: var(--brand-100); }
.kpi-hero .kpi-value { font-size: 2rem; color: var(--brand-800); }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; font-size: .74rem; padding: .1rem .45rem; border-radius: 999px; }
.delta.up { background: #e3f4ea; color: #146c43; }
.delta.down { background: #fbe7e5; color: #a5281b; }

svg.trend { width: 100%; height: auto; display: block; }
svg.trend .grid { stroke: var(--line-2); stroke-width: 1; }
svg.trend .ax { font-size: 10px; fill: var(--ink-400); font-family: inherit; }
svg.trend .bar path { fill: var(--brand-600); opacity: .78; transition: opacity .15s; }
svg.trend .bar.sel path { fill: var(--accent); opacity: 1; }
svg.trend .bar .hit { fill: transparent; }
svg.trend .bar:hover path { opacity: 1; }
svg.trend .bar:hover .hit { fill: rgba(var(--bs-primary-rgb), .05); }

.alert-list { display: flex; flex-direction: column; }
.alert-item { display: flex; align-items: center; gap: .7rem; padding: .7rem 1.1rem; border-bottom: 1px solid var(--line-2); text-decoration: none; color: var(--ink-700); font-size: .88rem; }
.alert-item:last-child { border-bottom: 0; }
.alert-item:hover { background: var(--canvas); }
.ai-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.ai-icon.danger { background: #fbe7e5; color: #a5281b; } .ai-icon.warn { background: var(--accent-100); color: #8a5a07; } .ai-icon.info { background: #e6eef8; color: #1f4f86; }
.ai-text { flex: 1; } .ai-n { font-variant-numeric: tabular-nums; color: var(--ink-900); }

.mix-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; gap: 2px; background: var(--line-2); }
.mix-bar span { display: block; height: 100%; }
.mix-bar .m1, .mix-legend .m1 { background: #2a78d6; }
.mix-bar .m2, .mix-legend .m2 { background: #eb6834; }
.mix-bar .m3, .mix-legend .m3 { background: #1baf7a; }
.mix-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin-top: .6rem; font-size: .83rem; color: var(--ink-700); }
.mix-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.rank-row { display: flex; gap: .6rem; align-items: center; padding: .45rem 0; }
.rank-n { width: 22px; height: 22px; border-radius: 50%; background: var(--brand-50); color: var(--brand-800); font-size: .72rem; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.hbar { height: 5px; border-radius: 999px; background: var(--line-2); margin-top: .3rem; overflow: hidden; }
.hbar span { display: block; height: 100%; border-radius: 999px; background: #2a78d6; }
.min-w-0 { min-width: 0; }
.sys-strip i { margin-left: .2rem; }

/* sidebar badges */
.nav-item .nav-badge { margin-left: auto; font-size: .68rem; font-weight: 700; padding: .05rem .45rem; border-radius: 999px; background: #fbe7e5; color: #a5281b; font-style: normal; }
.nav-item .nav-badge.warn { background: var(--accent-100); color: #8a5a07; }
.rep-kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; }

/* ---------- HR (1.8.0) ---------- */
details > summary { list-style: none; } details > summary::-webkit-details-marker { display: none; }
.rev-pop { position: absolute; right: 0; z-index: 20; width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .5rem; box-shadow: var(--shadow); }
details { position: relative; }
.pay-grid input.form-control { min-width: 78px; padding: .3rem .45rem; min-height: 34px; font-size: .85rem; }
.pay-grid td, .pay-grid th { white-space: nowrap; vertical-align: middle; }
.pay-grid tr.is-off td { opacity: .45; }
.pay-grid .input-group { width: 118px; flex-wrap: nowrap; }
.pay-grid input.form-control { min-width: 0; width: 68px; }
.pay-grid .input-group input.form-control { width: 46px; }
.pay-grid td, .pay-grid th { padding-left: .35rem; padding-right: .35rem; }

/* ---------- Add product: "Already in the system?" (1.9.2) ---------- */
.exist-check { border-color: var(--brand-100); background: linear-gradient(180deg, var(--brand-50), var(--surface)); }
.exist-list { margin-top: .4rem; display: flex; flex-direction: column; gap: .35rem; }
.exist-item { display: flex; gap: .75rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .45rem .6rem; color: var(--ink-900); }
.exist-check .nc { margin-top: 0; font-size: .88rem; border-radius: 8px; padding: .55rem .7rem; }
.exist-check .nc-bad { background: #fbe7e5; color: #8a2116; } .exist-check .nc-warn { background: var(--accent-100); color: #6d4806; } .exist-check .nc-ok { background: #e3f4ea; color: #146c43; }
input.flash-ok { box-shadow: 0 0 0 3px rgba(25,135,84,.35); border-color: var(--ok); }

/* ---------- IMEI / serial pad (1.10.0) ---------- */
.sp-list { list-style: none; padding-left: 0; max-height: 46vh; overflow: auto; margin-bottom: 0; }
.sp-list li { display: flex; align-items: center; padding: .3rem .25rem; border-bottom: 1px solid var(--line); }
.sp-list .sp-n { width: 2.2rem; color: var(--ink-500); font-size: .8rem; flex-shrink: 0; }
.sp-list li.sp-bad { background: #fbe7e5; }
.sp-choices { display: flex; flex-wrap: wrap; gap: .35rem; max-height: 22vh; overflow: auto; }
.imei-codes { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .15rem; }
.imei-codes span { font-size: .75rem; font-variant-numeric: tabular-nums; background: var(--brand-50); color: var(--brand-800); border-radius: 4px; padding: 0 .35rem; }
.ret-pieces { display: flex; flex-direction: column; gap: .1rem; margin-top: .25rem; max-height: 160px; overflow: auto; }
.timeline { list-style: none; padding-left: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: .1rem 0 .7rem 1rem; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: .45rem; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-600, #0d6b57); }
.imei-help { background: var(--brand-50); border: 1px solid var(--brand-100); color: var(--ink-900); border-radius: 10px; padding: .75rem 1rem; margin-bottom: 1rem; }
.imei-help ul { padding-left: 1.1rem; margin-top: .25rem; }
.imei-help .bi { color: var(--brand-700); }

/* ---------- Smart pricing calculator (1.10.2) ---------- */
.price-calc { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 1rem; background: var(--surface); }
.pc-toggle { all: unset; box-sizing: border-box; display: flex; align-items: center; width: 100%; padding: .7rem 1rem; cursor: pointer; color: var(--ink-900); }
.pc-toggle:focus-visible { outline: 2px solid var(--brand-600, #0d6b57); border-radius: 12px; }
.pc-tag { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; background: var(--line-2); color: var(--ink-500); border-radius: 4px; padding: .1rem .4rem; margin-left: .5rem; }
.pc-body { padding: 0 1rem 1rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.pc-out { margin-top: 1rem; background: #1e2a3a; color: #e8edf3; border-radius: 10px; padding: .8rem 1rem; }
.pc-line { display: flex; flex-wrap: wrap; gap: .4rem 2rem; align-items: baseline; padding: .35rem 0; }
.pc-line + .pc-line { border-top: 1px dashed rgba(255,255,255,.18); }
.pc-h { width: 100%; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: #9fb0c3; }
.pc-c { color: #ff9b9b; font-weight: 600; } .pc-w { color: #ffd166; font-weight: 600; } .pc-r { color: #7ee0a6; font-weight: 600; }
.pc-m { font-size: .8rem; color: #7ee0a6; } .pc-m.bad { color: #ff9b9b; }
.pc-warn { color: #ffd166; font-size: .85rem; margin-top: .35rem; }


/* ---------- Dashboard charts (1.11.0) — chart colours are fixed validated slots, the same in every theme ---------- */
.dash-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-bottom: .9rem; }
.seg-control { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; box-shadow: var(--shadow-sm); }
.seg-control a { padding: .35rem .8rem; border-radius: 7px; font-size: .84rem; font-weight: 600; color: var(--ink-500); text-decoration: none; white-space: nowrap; }
.seg-control a:hover { background: var(--line-2); color: var(--ink-900); }
.seg-control a.active { background: var(--brand-700); color: #fff; }
.kpi .spark { display: block; width: 100%; height: 30px; margin-top: .55rem; }
.kpi .spark polyline { fill: none; stroke: #b9b8b1; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.kpi .spark circle { fill: #2a78d6; }
.kpi-hero .spark polyline { stroke: #86b6ef; }
.viz { width: 100%; }
.viz[data-chart="trend"] { min-height: 260px; } .viz[data-chart="hours"] { min-height: 220px; }
.viz-svg { display: block; overflow: visible; font-family: var(--font); }
.viz-svg .grid { stroke: #e9ebea; stroke-width: 1; }
.viz-svg .axis { stroke: #c3c2b7; stroke-width: 1; }
.viz-svg .tick { fill: #898781; font-size: 11px; font-variant-numeric: tabular-nums; }
.viz-svg .val { fill: var(--ink-700); font-size: 11px; font-weight: 700; }
.viz-svg .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-svg .dot { stroke: var(--surface); stroke-width: 2; }
.viz-svg .cross { stroke: #898781; stroke-width: 1; }
.viz-svg .bar:hover path, .viz-svg .bar:focus path { filter: brightness(1.12); }
.viz-svg .bar:focus, .viz-svg rect:focus { outline: none; }
.viz-svg [tabindex]:focus-visible { outline: 2px solid var(--brand-600); }
.viz-legend { display: flex; gap: 1.1rem; font-size: .8rem; color: var(--ink-700); margin-bottom: .25rem; }
.viz-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.lk { display: inline-block; width: 16px; height: 2px; border-radius: 2px; }
.lk-box { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.lk.s1, .lk-box.s1 { background: #2a78d6; } .lk.s2, .lk-box.s2 { background: #eb6834; } .lk.s3, .lk-box.s3 { background: #1baf7a; }
.viz-table { margin-top: .4rem; font-size: .82rem; }
.viz-table summary { cursor: pointer; color: var(--ink-500); font-size: .78rem; width: max-content; }
.viz-table .table-responsive { max-height: 260px; overflow: auto; }
.viz-tip { position: absolute; z-index: 2000; pointer-events: none; background: #fff; border: 1px solid rgba(11,11,11,.1); border-radius: 8px; box-shadow: 0 6px 20px rgba(16,24,40,.14);
  padding: .5rem .65rem; font-size: .8rem; min-width: 150px; opacity: 0; transition: opacity .08s; }
.viz-tip.show { opacity: 1; }
.viz-tip .vt-h { color: var(--ink-500); font-size: .74rem; margin-bottom: .25rem; }
.viz-tip .vt-r { display: flex; align-items: center; gap: .45rem; line-height: 1.5; }
.viz-tip .vt-r i { width: 12px; height: 2px; border-radius: 2px; display: inline-block; }
.viz-tip .vt-r b { color: var(--ink-900); font-variant-numeric: tabular-nums; }
.viz-tip .vt-r span { color: var(--ink-500); }
.tall-bar { display: flex; gap: 2px; height: 28px; margin: .25rem 0 .9rem; }
.tall-bar span { display: flex; align-items: center; padding-left: .45rem; color: #fff; font-size: .76rem; font-weight: 700; border-radius: 4px; min-width: 2px; cursor: default; }
.tall-bar span:focus-visible { outline: 2px solid var(--ink-900); outline-offset: 1px; }
.pay-list { list-style: none; padding: 0; margin: 0; }
.pay-list li { display: flex; align-items: center; gap: .55rem; padding: .35rem 0; font-size: .86rem; border-bottom: 1px solid var(--line-2); }
.pay-list li span:first-of-type { flex-grow: 1; }
.pay-list li b { font-variant-numeric: tabular-nums; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: 1rem; }
.mini-stats div { background: var(--canvas); border-radius: 8px; padding: .5rem .6rem; }
.mini-stats span { display: block; font-size: .72rem; color: var(--ink-500); }
.mini-stats b { font-size: .92rem; }
.today-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .75rem; }
.today-grid span { display: block; font-size: .76rem; color: var(--ink-500); font-weight: 600; }
.today-grid b { font-size: 1.1rem; }
.today-grid .today-big { font-size: 1.25rem; color: var(--brand-800); white-space: nowrap; }
.today-grid b { white-space: nowrap; }
.dash-filters label { white-space: nowrap; }
.seg-bar { display: flex; gap: 2px; height: 28px; }
.seg-bar span { display: flex; align-items: center; padding-left: .45rem; font-size: .76rem; font-weight: 700; border-radius: 4px; min-width: 2px; color: #fff; }
.seg-bar .ok { background: #0ca30c; } .seg-bar .warn { background: #fab219; color: #0b0b0b; } .seg-bar .crit { background: #d03b3b; }
.st-ok { color: #0ca30c; } .st-warn { color: #d99400; } .st-crit { color: #d03b3b; } .st-info { color: var(--info); }
.stat-mini { display: flex; gap: .55rem; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: .55rem .65rem; height: 100%; }
.stat-mini:hover { background: var(--line-2); }
.stat-mini .bi { font-size: 1.15rem; }
.stat-mini b { font-size: 1.05rem; }
.exp-rows { display: flex; flex-direction: column; gap: .4rem; }
.exp-row { display: flex; align-items: center; gap: .65rem; border: 1px solid var(--line); border-radius: 10px; padding: .6rem .75rem; font-size: .88rem; }
.exp-row:hover { background: var(--line-2); }
.exp-row .bi { font-size: 1.1rem; }
@media (max-width: 575px) { .mini-stats { grid-template-columns: 1fr 1fr; } .seg-control a { padding: .3rem .55rem; } }

/* =====================================================================
   v1.13.0 — Premium polish for module components (dashboard, lock, etc.)
   Kept at the end so it refines the older sections above without
   changing any class name the PHP views or JS files use.
   ===================================================================== */

/* Dashboard hero: deep ink card with brand glow */
.dash-hero { border-radius: var(--radius-lg); padding: 1.6rem 1.75rem; margin-bottom: 1.1rem; align-items: center;
  background:
    radial-gradient(600px 260px at 0% 0%, rgba(var(--bs-primary-rgb), .85), transparent 70%),
    radial-gradient(520px 260px at 100% 120%, rgba(229,165,49,.28), transparent 70%),
    linear-gradient(135deg, var(--side-bg), var(--brand-900));
  box-shadow: 0 18px 40px -18px rgba(var(--bs-primary-rgb), .55); }
.dash-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 36px 36px; -webkit-mask-image: linear-gradient(90deg, #000, transparent 70%); mask-image: linear-gradient(90deg, #000, transparent 70%); }
.dash-hero::after { border-color: rgba(255,255,255,.04); }
.dash-hero > * { position: relative; z-index: 1; }
.dash-hero h1 { font-size: 1.85rem; letter-spacing: -.03em; }
.dash-eyebrow { font-weight: 600; letter-spacing: .08em; }
.btn-accent { background: linear-gradient(180deg, #f3bb4e, var(--accent)); color: #2b1d02; font-weight: 700; box-shadow: 0 8px 20px -8px rgba(229,165,49,.8), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-accent:hover { background: linear-gradient(180deg, #f7c460, #eaab37); color: #2b1d02; }
.btn-glass { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@media (max-width: 575.98px) {
  .dash-hero { padding: 1.25rem; }
  .dash-hero h1 { font-size: 1.45rem; }
  .dash-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .dash-actions .btn { padding-left: .5rem; padding-right: .5rem; font-size: .85rem; }
  .dash-actions .btn-accent { grid-column: 1 / -1; min-height: 48px; }
  .dash-actions > .btn:last-child:nth-child(even) { grid-column: 1 / -1; }
}

.seg-control { border-color: rgba(16,24,40,.08); border-radius: 12px; padding: 4px; }
.seg-control a { border-radius: 8px; padding: .38rem .85rem; transition: background-color .15s, color .15s; }
.seg-control a.active { background: var(--brand-700); box-shadow: 0 4px 10px -4px rgba(var(--bs-primary-rgb), .7); }

.kpi { border-color: rgba(16,24,40,.07); border-radius: var(--radius); padding: 1.1rem 1.2rem; transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.kpi:hover { box-shadow: var(--shadow); }
.kpi-label { font-size: .78rem; letter-spacing: .01em; }
.kpi-value { font-size: 1.6rem; letter-spacing: -.03em; }
.kpi-hero { background: radial-gradient(300px 160px at 100% 0%, var(--brand-100), transparent 70%), linear-gradient(160deg, #fff, var(--brand-50)); border-color: rgba(var(--bs-primary-rgb), .16); }
.kpi-hero .kpi-value { font-size: 2.1rem; }
.kpi-icon { border-radius: 11px; }
.delta { padding: .12rem .5rem; }
.delta.up { background: #e7f6ee; color: #0f6b48; }
.delta.down { background: #fdecec; color: #a72727; }
.mini-stats div, .mini-stat { border-radius: 10px; }
.alert-item { padding: .75rem 1.2rem; transition: background-color .12s; }
.ai-icon { border-radius: 10px; width: 34px; height: 34px; }
.stat-mini, .exp-row { border-color: var(--line); border-radius: 12px; transition: background-color .12s, border-color .12s; }
.stat-mini:hover, .exp-row:hover { background: var(--surface-2); border-color: #d5dae0; }
.rank-n { background: var(--line-2); color: var(--ink-700); }
.rank-row:first-child .rank-n { background: var(--brand-700); color: #fff; }
.viz-tip { border-radius: 10px; box-shadow: var(--shadow-lg); }
a.cat-card { transition: box-shadow .2s var(--ease), border-color .2s, transform .2s var(--ease); }
a.cat-card:hover { transform: translateY(-2px); }

/* Screen lock */
.lock-overlay { background: radial-gradient(900px 520px at 15% 0%, rgba(var(--bs-primary-rgb), .65), transparent 65%),
  radial-gradient(600px 400px at 100% 100%, rgba(229,165,49,.18), transparent 70%), var(--side-bg); }
.lock-page { min-height: 100vh; min-height: 100dvh; background: radial-gradient(900px 520px at 15% 0%, rgba(var(--bs-primary-rgb), .75), transparent 65%),
  radial-gradient(600px 400px at 100% 100%, rgba(229,165,49,.2), transparent 70%), linear-gradient(160deg, var(--side-bg), var(--brand-900)); }
.lock-card { border-radius: 24px; padding: 36px 30px 24px; box-shadow: 0 40px 80px -20px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.06); }
.lock-avatar { box-shadow: 0 12px 30px -8px rgba(var(--bs-primary-rgb), .8); }
.lock-time { font-size: .85rem; font-weight: 600; letter-spacing: .02em; }
.lock-big-time { color: #fff; text-align: center; margin-bottom: 70px; }
.lock-big-time b { display: block; font-size: clamp(3rem, 9vw, 4.5rem); font-weight: 200; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.lock-big-time span { color: rgba(255,255,255,.65); font-size: .95rem; }
.lock-wrap { display: flex; flex-direction: column; align-items: center; width: 100%; }

/* Product form helpers */
.price-calc, .variant-generator, .imei-help, .exist-check { border-radius: var(--radius); }
.pc-out { background: linear-gradient(160deg, #111b2b, #1e2a3a); border-radius: 12px; }

/* Small screens: let any wide table scroll inside its card, never the whole page */
@media (max-width: 767.98px) {
  .panel { border-radius: 12px; }
  .panel-head { padding: .85rem 1rem; }
  .panel-body { padding: 1rem; }
  .app-content .row { --bs-gutter-x: .85rem; }
  .kpi-value { font-size: 1.4rem; }
  .kpi-hero .kpi-value { font-size: 1.75rem; }
  .table-responsive > .table { min-width: 620px; }
  .table-responsive > .table td.text-end, .table-responsive > .table td.tabular { white-space: nowrap; }
  .table-responsive > .table .cell-main { min-width: 150px; }
  .dash-filters { gap: .6rem; }
  .seg-control { width: 100%; overflow-x: auto; }
  .seg-control a { flex: 1; text-align: center; }
}

/* =====================================================================
   v1.14.0 — LIGHT menu style (Settings → Store details → Menu & top bar style)
   White side menu, floating top bar card, page title + breadcrumb row,
   colourful KPI tiles. body.menu-light is set by the server (no flash).
   The colour theme (emerald, medical blue…) still drives every accent.
   ===================================================================== */
.menu-light { --canvas: #f1f4f9; --side-text: #3b4352; --side-muted: #8a93a3; }
body.menu-light.app-body { background: var(--canvas); }

/* side menu */
.menu-light .app-sidebar { background: #fff; color: var(--side-text); border-right: 0; box-shadow: 1px 0 0 rgba(16,24,40,.05), 6px 0 24px -12px rgba(16,24,40,.12); }
.menu-light .sidebar-brand { border-bottom: 0; }
.menu-light .brand-name { color: var(--ink-900); font-size: 1.08rem; }
.menu-light .brand-sub { color: var(--ink-400); }
.menu-light .side-collapse { display: none; }
.menu-light.side-mini .side-collapse { display: inline-grid; }
.menu-light.side-mini .side-collapse { background: var(--surface-2); border-color: var(--line); color: var(--ink-500); }
.menu-light .side-collapse:hover { background: var(--brand-50); color: var(--brand-700); border-color: rgba(var(--bs-primary-rgb), .25); }
.menu-light .side-search { background: var(--canvas); border-color: var(--line); color: var(--ink-400); }
.menu-light .side-search:hover { background: #fff; border-color: #cfd5dc; color: var(--ink-700); }
.menu-light .side-search kbd { background: #fff; color: var(--ink-500); border: 1px solid var(--line); }
.menu-light .sidebar-nav { scrollbar-color: #d6dbe1 transparent; }
.menu-light .sidebar-nav::-webkit-scrollbar-thumb { background: #d6dbe1; }
.menu-light .nav-group-label { color: var(--ink-700); font-size: .68rem; letter-spacing: .1em; padding-top: 1.15rem; }
.menu-light .nav-item { color: var(--side-text); font-weight: 500; }
.menu-light .nav-item i { color: var(--ink-700); opacity: 1; }
.menu-light a.nav-item:hover { background: var(--canvas); color: var(--brand-700); }
.menu-light a.nav-item:hover i { color: var(--brand-700); }
.menu-light .nav-item.active { background: var(--brand-50); color: var(--brand-800); font-weight: 650; box-shadow: inset 0 0 0 1px rgba(var(--bs-primary-rgb), .1); }
.menu-light .nav-item.active i { color: var(--brand-700); }
.menu-light .nav-item.active::before { background: var(--brand-700); }
.menu-light .nav-item.is-soon em { border-color: var(--line); }
.menu-light .nav-item .nav-badge { background: #ef4444; color: #fff; }
.menu-light .nav-item .nav-badge.warn { background: #f97316; color: #fff; }
.menu-light .sidebar-foot { border-top-color: var(--line-2); color: var(--ink-400); }
@media (min-width: 992px) { .menu-light.side-mini .nav-group-label { font-size: 0; padding: .55rem 0 .35rem; } .menu-light.side-mini .nav-group-label::after { background: var(--line); } }

/* floating top bar card */
@media (min-width: 992px) {
  .menu-light .app-topbar { margin: 1rem 1.75rem 0; border-radius: 12px; background: rgba(255,255,255,.96); border: 0; top: 1rem; height: 62px;
    box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px -14px rgba(16,24,40,.18); }
  .menu-light .app-topbar::before { content: ""; position: absolute; left: -1.75rem; right: -1.75rem; top: -1rem; height: 1rem; background: var(--canvas); }
  .menu-light .topbar-heading { display: none; }
  .menu-light .topbar-search { margin-left: .25rem; background: var(--canvas); border-color: transparent; box-shadow: none; min-width: 300px; }
  .menu-light .topbar-search:hover { background: #fff; border-color: var(--line); }
  .menu-light .app-content { padding-top: 1.4rem; }
}
.menu-light .app-topbar .chip { background: var(--canvas); border-color: transparent; }
.menu-light .app-topbar .btn-icon { color: var(--ink-700); }
.menu-light .app-topbar .btn-icon:hover { background: var(--canvas); color: var(--brand-700); }
.menu-light .avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(var(--bs-primary-rgb), .35); }

/* page title + breadcrumb row */
.app-crumbs { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1.15rem; min-height: 32px; }
.app-crumbs.only-trail { justify-content: flex-start; margin-bottom: .3rem; min-height: 0; }
.crumbs-title { font-size: 1.4rem; font-weight: 650; letter-spacing: -.02em; margin: 0; color: var(--ink-900); }
.crumbs-trail { display: flex; align-items: center; gap: .45rem; font-size: .85rem; color: var(--ink-500); }
.crumbs-trail a { color: var(--ink-700); font-size: 1.05rem; line-height: 1; }
.crumbs-trail a:hover { color: var(--brand-700); }
.crumbs-trail > .bi-chevron-right { font-size: .65rem; color: var(--ink-400); }
.crumbs-trail b { color: var(--brand-700); font-weight: 600; }
@media (max-width: 575.98px) { .app-crumbs { display: none; } }

/* cards: borderless, soft shadow */
.menu-light .panel, .menu-light .stat, .menu-light .kpi, .menu-light .card { border-color: transparent; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 6px 20px -12px rgba(16,24,40,.16); }
.menu-light .panel-head h2, .menu-light .panel-head h3 { font-size: 1.04rem; font-weight: 600; color: var(--ink-700); }
.menu-light .table > thead th { background: #f6f8fb; }

/* colourful KPI tiles (dashboard) */
.menu-light .kpi { --k1: #7c3aed; --k2: #3b82f6; --kv: #0ea5e9; padding-top: 1.25rem; }
.menu-light .kpi-grid > .kpi:nth-child(2) { --k1: #f97316; --k2: #fbbf24; --kv: #16a34a; }
.menu-light .kpi-grid > .kpi:nth-child(3) { --k1: #06b6d4; --k2: #67e8f9; --kv: #e11d48; }
.menu-light .kpi-grid > .kpi:nth-child(4) { --k1: #f43f5e; --k2: #fb7185; --kv: #475569; }
.menu-light .kpi::before { content: ""; position: absolute; left: 1.15rem; right: 1.15rem; top: 0; height: 4px; border-radius: 0 0 6px 6px; background: linear-gradient(90deg, var(--k1), var(--k2)); }
.menu-light .kpi-value { color: var(--kv); }
.menu-light .kpi-hero { background: #fff; }
.menu-light .kpi-hero .kpi-value { color: var(--kv); }
.menu-light .kpi .spark polyline { stroke: var(--k1); opacity: .55; }
.menu-light .kpi .spark circle { fill: var(--k1); }
.menu-light .kpi-icon { background: color-mix(in srgb, var(--k1) 12%, #fff); color: var(--k1); }
.menu-light .stat:nth-child(n) .stat-icon { box-shadow: none; }

/* dashboard hero: lighter, brand-coloured */
.menu-light .dash-hero { background:
    radial-gradient(520px 240px at 100% 0%, rgba(255,255,255,.18), transparent 70%),
    radial-gradient(500px 260px at 0% 120%, rgba(229,165,49,.25), transparent 70%),
    linear-gradient(120deg, var(--brand-800), var(--brand-700) 55%, var(--brand-600)); }

/* mobile top bar in light mode */
@media (max-width: 991.98px) {
  .menu-light .app-topbar { background: rgba(255,255,255,.95); box-shadow: 0 1px 0 rgba(16,24,40,.06); }
  .menu-light .app-sidebar { box-shadow: var(--shadow-lg); }
}

/* POS header in light mode */
.menu-light .pos-top { background: #fff; color: var(--ink-900); box-shadow: 0 1px 0 rgba(16,24,40,.06), 0 6px 20px -12px rgba(16,24,40,.18); }
.menu-light .pos-store { color: var(--ink-900); }
.menu-light .pos-sub { color: var(--ink-500); }
.menu-light .pos-top .chip { background: var(--canvas); color: var(--ink-700); border-color: transparent; }
.menu-light .pos-top .conn-ok { color: #0f6b48 !important; background: #e7f6ee; }
.menu-light .pos-top .conn-ok i { color: #12805c !important; }
.menu-light .pos-top .btn-light { --bs-btn-bg: var(--canvas); --bs-btn-border-color: transparent; --bs-btn-color: var(--ink-700); --bs-btn-hover-bg: var(--brand-50);
  --bs-btn-hover-color: var(--brand-800); --bs-btn-hover-border-color: rgba(var(--bs-primary-rgb), .2); --bs-btn-active-bg: var(--brand-100); --bs-btn-active-color: var(--brand-900); }
.menu-light .pos-totals { background: radial-gradient(260px 140px at 100% 0%, rgba(255,255,255,.18), transparent 70%), linear-gradient(135deg, var(--brand-700), var(--brand-900)); }

/* =====================================================================
   v1.15.0 — WINDOWS 11 style (Settings → Menu & top bar style → Windows 11)
   No side menu: a centred taskbar + Start menu with app tiles, and the
   dashboard shows every screen as an app tile. body.menu-win (+ menu-light).
   ===================================================================== */
.menu-win {
  --font: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", "Inter", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --bs-body-font-family: var(--font);
  --canvas: #eef2f8;
  --taskbar-h: 52px;
}
body.menu-win { font-family: var(--font); }
body.menu-win.app-body {
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(var(--bs-primary-rgb), .16), transparent 60%),
    radial-gradient(700px 520px at -5% 30%, rgba(0, 120, 212, .10), transparent 60%),
    radial-gradient(800px 600px at 60% 115%, rgba(135, 100, 184, .12), transparent 60%),
    var(--canvas);
  background-attachment: fixed;
}
.menu-win .app-sidebar, .menu-win .sidebar-backdrop, .menu-win .bottom-nav, .menu-win [data-side-toggle], .menu-win #sidebarToggle { display: none !important; }
.menu-win .app-content { max-width: 1520px; padding-bottom: calc(var(--taskbar-h) + 2rem); }
.menu-win .panel, .menu-win .stat, .menu-win .kpi, .menu-win .card { background: rgba(255,255,255,.86); border-radius: 10px; }
.menu-win .btn, .menu-win .form-control, .menu-win .form-select { border-radius: 6px; }
.menu-win .btn-lg { border-radius: 8px; }

/* title bar (top) */
.win-brand { display: none; }
.menu-win .win-brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink-900); min-width: 0; margin-right: .5rem; }
.menu-win .win-brand .brand-mark { width: 34px; height: 34px; border-radius: 9px; font-size: 1rem; }
.menu-win .win-brand b { display: block; font-size: .95rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30vw; }
.menu-win .win-brand small { display: block; font-size: .72rem; color: var(--ink-500); }
.menu-win .topbar-heading { display: none !important; }
@media (min-width: 992px) {
  .menu-win .app-topbar { background: rgba(255,255,255,.78); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-radius: 10px; }
  .menu-win .app-topbar::before { background: transparent; }
  .menu-win .topbar-search { margin-left: auto; margin-right: auto; min-width: 380px; border-radius: 999px; background: rgba(255,255,255,.9); border-color: var(--line); }
  .menu-win .topbar-right { margin-left: 0; }
}

/* app tile (Start menu + dashboard) */
.win-tile { --t1: #4cc2ff; --t2: #0078d4; display: flex; flex-direction: column; align-items: center; gap: .45rem; padding: .8rem .35rem .65rem; border-radius: 8px;
  text-decoration: none; color: var(--ink-900); text-align: center; transition: background-color .12s, transform .12s; position: relative; }
.win-tile:hover { background: rgba(255,255,255,.75); box-shadow: 0 0 0 1px rgba(0,0,0,.05), 0 2px 6px rgba(0,0,0,.05); color: var(--ink-900); }
.win-tile:active { transform: scale(.97); }
.win-tile.is-active { background: rgba(255,255,255,.7); }
.wt-ico { position: relative; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: 1.35rem;
  background: linear-gradient(135deg, var(--t1), var(--t2)); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 4px 10px -4px var(--t2); }
.wt-ico em { position: absolute; top: -6px; right: -8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #e81123; color: #fff;
  font-style: normal; font-size: .66rem; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.wt-name { font-size: .8rem; font-weight: 500; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tone-blue   { --t1: #4cc2ff; --t2: #0067c0; }
.tone-orange { --t1: #ffb454; --t2: #e8590c; }
.tone-teal   { --t1: #5ce1e6; --t2: #00838f; }
.tone-purple { --t1: #c29bff; --t2: #6b46c1; }
.tone-green  { --t1: #6ee7a8; --t2: #107c41; }
.tone-pink   { --t1: #ff8ac8; --t2: #c2187a; }
.tone-gray   { --t1: #a9b4c2; --t2: #4b5563; }

/* dashboard "Apps" panel */
.win-apps { background: rgba(255,255,255,.72); border-radius: 12px; padding: 1rem 1.1rem 1.1rem; margin-bottom: 1.1rem;
  box-shadow: 0 0 0 1px rgba(255,255,255,.6) inset, 0 1px 2px rgba(16,24,40,.04), 0 8px 24px -14px rgba(16,24,40,.18);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.win-apps-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .35rem; }
.win-apps-head h2 { font-size: 1rem; font-weight: 650; margin: 0; }
.win-apps-head h2 i { color: var(--brand-700); margin-right: .3rem; }
.win-apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .25rem; }
.win-apps .wt-ico { width: 52px; height: 52px; font-size: 1.5rem; border-radius: 14px; }
@media (max-width: 575.98px) { .win-apps-grid { grid-template-columns: repeat(4, 1fr); } .win-apps .wt-ico { width: 46px; height: 46px; font-size: 1.3rem; } .wt-name { font-size: .72rem; } }

/* taskbar */
.win-taskbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1045; height: calc(var(--taskbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: flex; align-items: center; justify-content: center;
  background: rgba(243, 245, 249, .82); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  border-top: 1px solid rgba(0,0,0,.07); box-shadow: 0 -1px 0 rgba(255,255,255,.6) inset; }
.wt-center { display: flex; align-items: center; gap: 4px; }
.wt-btn { --t2: var(--ink-700); position: relative; width: 44px; height: 42px; border: 0; border-radius: 6px; background: transparent; display: inline-grid; place-items: center;
  color: var(--t2); font-size: 1.3rem; text-decoration: none; transition: background-color .1s, transform .1s; }
.wt-btn:hover { background: rgba(255,255,255,.75); color: var(--t2); box-shadow: 0 0 0 1px rgba(0,0,0,.04); }
.wt-btn:active { transform: scale(.94); }
.wt-btn.active { background: rgba(255,255,255,.7); box-shadow: 0 0 0 1px rgba(0,0,0,.04); }
.wt-btn.active::after { content: ""; position: absolute; bottom: 2px; left: 50%; width: 16px; height: 3px; margin-left: -8px; border-radius: 3px; background: var(--brand-700); }
.wt-start svg rect { fill: url(#none); fill: var(--brand-600); }
.wt-start svg rect:nth-child(2) { fill: var(--brand-700); } .wt-start svg rect:nth-child(3) { fill: var(--brand-700); } .wt-start svg rect:nth-child(4) { fill: var(--brand-800); }
.win-start-open .wt-start { background: rgba(255,255,255,.8); }
.wt-btn[data-cmdk] { color: var(--ink-700); }
.wt-tray { position: absolute; right: .6rem; top: 0; height: var(--taskbar-h); display: flex; align-items: center; gap: .35rem; }
.wt-tray-ico { width: 34px; height: 34px; border-radius: 6px; display: grid; place-items: center; color: var(--ink-700); }
.wt-clock { text-align: right; line-height: 1.15; padding: .2rem .55rem; border-radius: 6px; font-size: .74rem; color: var(--ink-900); }
.wt-clock b { display: block; font-weight: 500; }
.wt-clock small { color: var(--ink-700); font-size: .72rem; }
.wt-clock:hover { background: rgba(255,255,255,.7); }

/* Start menu */
.win-start { position: fixed; inset: 0 0 calc(var(--taskbar-h) + env(safe-area-inset-bottom)) 0; z-index: 1044; display: none; align-items: flex-end; justify-content: center; padding: 0 .75rem .75rem; }
.win-start.show { display: flex; }
.ws-panel { width: 100%; max-width: 680px; max-height: min(720px, calc(100vh - var(--taskbar-h) - 2rem)); display: flex; flex-direction: column;
  background: rgba(246, 248, 252, .9); -webkit-backdrop-filter: saturate(180%) blur(32px); backdrop-filter: saturate(180%) blur(32px);
  border-radius: 10px; border: 1px solid rgba(255,255,255,.7); box-shadow: 0 32px 64px -16px rgba(0,0,0,.35), 0 0 0 1px rgba(0,0,0,.06);
  animation: wsUp .22s cubic-bezier(.1, .9, .2, 1); overflow: hidden; }
@keyframes wsUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ws-panel { animation: none; } }
.ws-search { margin: 1.4rem 1.6rem .6rem; display: flex; align-items: center; gap: .6rem; padding: 0 .9rem; height: 40px; border-radius: 999px; background: #fff;
  border: 1px solid rgba(0,0,0,.08); border-bottom: 2px solid var(--brand-700); }
.ws-search i { color: var(--ink-500); }
.ws-search input { border: 0; outline: 0; flex: 1; background: none; font-size: .92rem; min-width: 0; }
.ws-head { display: flex; align-items: center; justify-content: space-between; padding: .5rem 2rem .25rem; font-size: .9rem; }
.ws-head kbd { font-size: .65rem; background: #fff; color: var(--ink-500); border: 1px solid var(--line); box-shadow: none; }
.ws-grid { flex: 1; overflow: auto; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; padding: .25rem 1.4rem 1rem; align-content: start; }
.ws-group { grid-column: 1 / -1; font-size: .72rem; font-weight: 600; color: var(--ink-500); padding: .7rem .5rem .2rem; text-transform: uppercase; letter-spacing: .06em; }
.ws-none { grid-column: 1 / -1; text-align: center; padding: 2rem; color: var(--ink-500); }
.ws-foot { display: flex; align-items: center; justify-content: space-between; padding: .7rem 2rem; background: rgba(236, 240, 246, .9); border-top: 1px solid rgba(0,0,0,.06); }
.ws-user { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink-900); padding: .3rem .5rem; border-radius: 6px; }
.ws-user:hover { background: rgba(255,255,255,.7); color: var(--ink-900); }
.ws-user b { display: block; font-size: .86rem; font-weight: 600; }
.ws-user small { display: block; font-size: .72rem; color: var(--ink-500); }
.ws-user .avatar { width: 34px; height: 34px; }
.ws-foot .wt-btn { width: 38px; height: 38px; font-size: 1.1rem; }

@media (max-width: 767.98px) {
  .wt-hide-sm { display: none !important; }
  .wt-tray { display: none; }
  .win-start { padding: 0; }
  .ws-panel { max-width: none; border-radius: 16px 16px 0 0; max-height: calc(100dvh - var(--taskbar-h) - 3rem); }
  .ws-search { margin: 1rem 1rem .4rem; }
  .ws-head { padding: .4rem 1.25rem .2rem; }
  .ws-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: .2rem .6rem .8rem; }
  .ws-foot { padding: .6rem 1rem; }
  .menu-win .app-topbar { gap: .35rem; }
  .menu-win .app-topbar .chip { display: none !important; }
}
@media print { .win-taskbar, .win-start, .win-apps { display: none !important; } }

/* POS in Windows style: Segoe font and soft background */
body.menu-win.pos-body { background: radial-gradient(800px 500px at 90% -10%, rgba(var(--bs-primary-rgb), .12), transparent 60%), var(--canvas); }
.menu-win.app-body #liveClock { display: none !important; }              /* the taskbar shows the clock */
@media (max-width: 767.98px) { .ws-head .text-muted { display: none; } }

/* =====================================================================
   v1.16.0 — Glass Start menu & app tiles (Windows-designer look)
   Frosted panel tinted by the colour theme, user pill + quick icons +
   power button on top, Pinned / All views, glass square tiles with
   colourful icons, pill search at the bottom.
   ===================================================================== */
.ws-panel { max-width: 580px; padding: 0; border-radius: 14px; overflow: hidden;
  background:
    radial-gradient(420px 260px at 0% 0%, rgba(255,255,255,.55), transparent 70%),
    linear-gradient(165deg, color-mix(in srgb, var(--brand-100) 88%, transparent), color-mix(in srgb, var(--brand-600) 42%, transparent));
  -webkit-backdrop-filter: saturate(170%) blur(36px); backdrop-filter: saturate(170%) blur(36px);
  border: 1px solid rgba(255,255,255,.55); box-shadow: 0 40px 80px -20px rgba(0, 40, 50, .45), inset 0 1px 0 rgba(255,255,255,.6); }
.ws-top { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.1rem .6rem; }
.ws-me { display: flex; align-items: center; gap: .55rem; min-width: 0; max-width: 190px; padding: .3rem .85rem .3rem .3rem; border-radius: 999px; text-decoration: none; color: var(--ink-900);
  background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.7); box-shadow: 0 2px 8px -4px rgba(0,0,0,.15); }
.ws-me:hover { background: rgba(255,255,255,.8); color: var(--ink-900); }
.ws-me .avatar { width: 30px; height: 30px; font-size: .72rem; box-shadow: none; }
.ws-me b { display: block; font-size: .8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-me small { display: block; font-size: .66rem; color: var(--ink-500); line-height: 1.1; }
.ws-quick { display: flex; align-items: center; gap: 2px; margin: 0 auto; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.45); border: 1px solid rgba(255,255,255,.65); }
.ws-quick a, .ws-quick button { width: 34px; height: 32px; border: 0; border-radius: 999px; background: transparent; display: inline-grid; place-items: center; color: var(--ink-700); font-size: .98rem; text-decoration: none; }
.ws-quick a:hover, .ws-quick button:hover { background: rgba(255,255,255,.85); color: var(--brand-800); }
.ws-power { width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.7); background: rgba(255,255,255,.55); color: var(--brand-800);
  display: grid; place-items: center; font-size: 1.15rem; box-shadow: 0 2px 8px -4px rgba(0,0,0,.2); transition: background-color .12s, color .12s; }
.ws-power:hover { background: #c42b1c; border-color: #c42b1c; color: #fff; }

.ws-body { margin: .2rem .8rem 0; padding: .9rem .9rem .6rem; border-radius: 12px; background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.45); flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ws-head { display: flex; align-items: center; justify-content: space-between; padding: 0 .35rem .7rem; font-size: .9rem; }
.ws-head b { font-weight: 600; color: var(--ink-900); }
.ws-tabs { display: flex; gap: .4rem; }
.ws-tabs button { border: 1px solid rgba(255,255,255,.7); background: rgba(255,255,255,.5); color: var(--ink-700); font-size: .72rem; font-weight: 600; border-radius: 6px;
  padding: .2rem .55rem; display: inline-flex; align-items: center; gap: .3rem; }
.ws-tabs button i { font-size: .6rem; }
.ws-tabs button:hover { background: rgba(255,255,255,.85); }
.ws-tabs button.active { background: #fff; color: var(--brand-800); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.ws-grid { padding: 0 .1rem .2rem; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; max-height: min(52vh, 440px); }
.ws-group { padding: .6rem .2rem .1rem; color: var(--ink-700); font-size: .68rem; }
.ws-grid.is-pinned .ws-group, .ws-grid.is-pinned .ws-tile:not(.is-pin) { display: none; }

/* glass tile with a colourful icon (Start menu + dashboard) */
.ws-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
  aspect-ratio: 1.4; min-height: 0; padding: .5rem .35rem; border-radius: 6px; text-decoration: none; text-align: center; color: var(--ink-900);
  background: rgba(255,255,255,.38); border: 1px solid rgba(255,255,255,.6); box-shadow: 0 1px 2px rgba(0,0,0,.04);
  transition: background-color .12s, transform .12s, box-shadow .12s; }
.ws-tile:hover { background: rgba(255,255,255,.72); color: var(--ink-900); box-shadow: 0 6px 16px -8px rgba(0,0,0,.25); transform: translateY(-1px); }
.ws-tile:active { transform: scale(.97); }
.ws-tile.is-active { background: rgba(255,255,255,.8); box-shadow: inset 0 -2px 0 var(--brand-700); }
.ws-tile > i { font-size: 1.85rem; line-height: 1; background: linear-gradient(140deg, var(--t1), var(--t2)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 3px color-mix(in srgb, var(--t2) 35%, transparent)); }
.ws-tile > span { font-size: .74rem; font-weight: 500; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ws-tile > em { position: absolute; top: 6px; right: 6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: #e81123; color: #fff;
  font-style: normal; font-size: .64rem; font-weight: 700; display: grid; place-items: center; }

.ws-panel .ws-search { order: 9; margin: .8rem 1.1rem 1rem; height: 40px; border-radius: 999px; background: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.85);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.05); }
.ws-panel .ws-search:focus-within { background: #fff; box-shadow: 0 0 0 2px rgba(var(--bs-primary-rgb), .35); }
.ws-panel .ws-search i { color: var(--brand-700); }
.ws-foot { display: none; }

/* dashboard: the same glass tiles on a tinted glass panel */
.win-apps { padding: 1rem 1.1rem 1.1rem; border-radius: 14px; border: 1px solid rgba(255,255,255,.6);
  background:
    radial-gradient(500px 240px at 0% 0%, rgba(255,255,255,.6), transparent 70%),
    linear-gradient(160deg, color-mix(in srgb, var(--brand-100) 80%, #fff), color-mix(in srgb, var(--brand-600) 28%, var(--brand-50)));
  -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 12px 30px -16px color-mix(in srgb, var(--brand-700) 45%, transparent); }
.win-apps-head { margin-bottom: .75rem; padding: 0 .1rem; }
.win-apps-head h2 { font-size: .98rem; font-weight: 600; }
.win-apps-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.win-apps .ws-tile { aspect-ratio: 1.45; }
.win-apps .ws-tile > i { font-size: 2rem; }
.win-apps .ws-tile > span { font-size: .8rem; }

@media (max-width: 767.98px) {
  .ws-panel { border-radius: 18px 18px 0 0; }
  .ws-top { padding: .85rem .8rem .5rem; gap: .4rem; }
  .ws-me { max-width: none; padding-right: .3rem; }
  .ws-me > span:last-child { display: none; }
  .ws-quick a, .ws-quick button { width: 32px; }
  .ws-body { margin: .1rem .5rem 0; padding: .7rem .55rem .4rem; }
  .ws-grid { max-height: 52vh; gap: 5px; }
  .ws-tile { aspect-ratio: auto; padding: .65rem .2rem .55rem; gap: .4rem; }
  .ws-tile > i { font-size: 1.6rem; }
  .ws-tile > span { font-size: .68rem; }
  .ws-panel .ws-search { margin: .6rem .7rem .8rem; }
  .win-apps-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .win-apps .ws-tile { aspect-ratio: auto; padding: .65rem .2rem .55rem; }
  .win-apps .ws-tile > i { font-size: 1.55rem; }
  .win-apps .ws-tile > span { font-size: .68rem; }
}

/* =====================================================================
   v1.17.0 — Appearance picker (Settings + "Change look" window)
   ===================================================================== */
.look-styles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.look-card { position: relative; display: flex; flex-direction: column; gap: .6rem; padding: .6rem .6rem .75rem; border-radius: 14px; cursor: pointer; text-align: left;
  background: #fff; border: 2px solid var(--line); box-shadow: var(--shadow-xs); transition: border-color .15s, box-shadow .15s, transform .15s; width: 100%; }
.look-card:hover { border-color: rgba(var(--bs-primary-rgb), .45); transform: translateY(-1px); box-shadow: var(--shadow); }
.look-card.is-on { border-color: var(--brand-700); box-shadow: var(--ring); }
.look-card input { position: absolute; opacity: 0; pointer-events: none; }
.look-card:has(input:focus-visible) { outline: 2px solid var(--brand-600); outline-offset: 2px; }
.look-name b { display: block; font-size: .9rem; color: var(--ink-900); }
.look-name small { display: block; font-size: .76rem; color: var(--ink-500); }
.look-check { position: absolute; top: .9rem; right: .9rem; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem;
  background: var(--brand-700); color: #fff; opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s; box-shadow: 0 0 0 3px #fff; }
.look-card.is-on .look-check { opacity: 1; transform: none; }

/* mini drawings of each style */
.look-mock { position: relative; display: block; height: 104px; border-radius: 10px; overflow: hidden; background: #eef2f8; border: 1px solid var(--line-2); }
.look-mock i { position: absolute; display: block; border-radius: 4px; }
.look-mock .lm-side { left: 0; top: 0; bottom: 0; width: 24%; border-radius: 0; }
.look-mock .lm-top { left: 28%; right: 5%; top: 7%; height: 13%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.look-mock .lm-a, .look-mock .lm-b, .look-mock .lm-c { top: 28%; height: 30%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.look-mock .lm-a { left: 28%; width: 20%; } .look-mock .lm-b { left: 51%; width: 20%; } .look-mock .lm-c { left: 74%; width: 21%; }
.look-mock .lm-bar { left: 28%; right: 5%; top: 64%; height: 26%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.look-light .lm-side { background: #fff; box-shadow: 1px 0 0 rgba(0,0,0,.06); }
.look-light .lm-side::before, .look-dark .lm-side::before { content: ""; position: absolute; left: 14%; right: 14%; top: 22%; height: 7%; border-radius: 3px; background: var(--brand-100); }
.look-dark .lm-side { background: linear-gradient(180deg, var(--side-bg), var(--side-bg-2)); }
.look-dark .lm-side::before { background: rgba(var(--bs-primary-rgb), .7); }
.look-light .lm-a, .look-dark .lm-a { box-shadow: inset 0 3px 0 #7c3aed, 0 1px 3px rgba(0,0,0,.06); }
/* Windows 11: no side menu, app tiles + taskbar */
.look-windows { background: radial-gradient(120px 80px at 90% 0%, rgba(var(--bs-primary-rgb), .25), transparent 70%), radial-gradient(120px 90px at 0% 100%, rgba(135,100,184,.22), transparent 70%), #eef2f8; }
.look-windows .lm-side { display: none; }
.look-windows .lm-top { left: 5%; }
.look-windows .lm-a, .look-windows .lm-b, .look-windows .lm-c { top: 30%; height: 34%; width: 26%; background: rgba(255,255,255,.75); }
.look-windows .lm-a { left: 6%; } .look-windows .lm-b { left: 37%; } .look-windows .lm-c { left: 68%; }
.look-windows .lm-a::after, .look-windows .lm-b::after, .look-windows .lm-c::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px; border-radius: 4px; }
.look-windows .lm-a::after { background: linear-gradient(135deg, #4cc2ff, #0067c0); }
.look-windows .lm-b::after { background: linear-gradient(135deg, #ffb454, #e8590c); }
.look-windows .lm-c::after { background: linear-gradient(135deg, #ff8ac8, #c2187a); }
.look-windows .lm-bar { left: 0; right: 0; top: auto; bottom: 0; height: 15%; border-radius: 0; background: rgba(255,255,255,.9);
  background-image: radial-gradient(circle, var(--brand-700) 3px, transparent 3.5px), radial-gradient(circle, #94a3b8 3px, transparent 3.5px), radial-gradient(circle, #94a3b8 3px, transparent 3.5px);
  background-size: 12px 12px; background-repeat: no-repeat; background-position: calc(50% - 14px) 50%, 50% 50%, calc(50% + 14px) 50%; }

/* colour swatches */
.look-swatches { display: flex; flex-wrap: wrap; gap: .6rem; }
.look-swatch { position: relative; display: flex; align-items: center; gap: .55rem; padding: .4rem .85rem .4rem .4rem; border-radius: 999px; cursor: pointer;
  background: #fff; border: 2px solid var(--line); font-size: .84rem; font-weight: 600; color: var(--ink-700); transition: border-color .15s, box-shadow .15s; }
.look-swatch:hover { border-color: #c9cfd6; }
.look-swatch.is-on { border-color: var(--ink-900); box-shadow: 0 2px 8px -3px rgba(0,0,0,.25); color: var(--ink-900); }
.look-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.ls-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: transparent; font-size: .85rem; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.look-swatch.is-on .ls-dot { color: #fff; }
@media (max-width: 767.98px) {
  .look-styles { grid-template-columns: 1fr; }
  .look-card { flex-direction: row; align-items: center; }
  .look-mock { width: 120px; height: 78px; flex-shrink: 0; }
  .look-check { top: 50%; margin-top: -12px; }
  .look-name { padding-right: 1.9rem; min-width: 0; }
}

/* =====================================================================
   v1.18.0 — Login page: aurora background, lock-screen clock, glass card
   ===================================================================== */
.lx { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr); overflow: hidden;
  color: #fff; background: linear-gradient(150deg, var(--side-bg) 0%, var(--brand-900) 55%, #0b1424 100%);
  font-family: "Segoe UI Variable Text", "Segoe UI", var(--font); }
.lx-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.lx-bg::after { content: ""; position: absolute; inset: 0; opacity: .35;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 10%, transparent 70%); mask-image: radial-gradient(ellipse at 30% 40%, #000 10%, transparent 70%); }
.lx-bg i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .75; will-change: transform; }
.lx-bg .b1 { width: 560px; height: 560px; left: -140px; top: -160px; background: var(--brand-600); animation: lxFloat 18s ease-in-out infinite; }
.lx-bg .b2 { width: 460px; height: 460px; left: 32%; bottom: -200px; background: #e5a531; opacity: .38; animation: lxFloat 22s ease-in-out infinite reverse; }
.lx-bg .b3 { width: 420px; height: 420px; right: -120px; top: 10%; background: #6d5bd0; opacity: .45; animation: lxFloat 26s ease-in-out infinite; }
@keyframes lxFloat { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(40px, 30px) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .lx-bg i { animation: none; } }

.lx-hero { position: relative; z-index: 1; display: flex; flex-direction: column; padding: 2.5rem 3.5rem; gap: 2rem; }
.lx-brand { display: flex; align-items: center; gap: .85rem; }
.lx-mark { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; color: #fff; overflow: hidden; flex-shrink: 0;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lx-mark img, .lx-avatar img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.lx-brand b { display: block; font-size: 1.15rem; font-weight: 650; letter-spacing: -.01em; }
.lx-brand small { display: block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.6); font-weight: 600; }
.lx-time { margin-top: auto; }
.lx-time b { display: block; font-size: clamp(4.5rem, 9vw, 7.5rem); font-weight: 200; letter-spacing: -.05em; line-height: .95; font-variant-numeric: tabular-nums;
  text-shadow: 0 10px 40px rgba(0,0,0,.25); }
.lx-time span { display: block; margin-top: .5rem; font-size: 1.2rem; color: rgba(255,255,255,.8); font-weight: 400; }
.lx-copy { margin-bottom: auto; max-width: 560px; }
.lx-copy h1 { color: #fff; font-size: clamp(1.6rem, 2.4vw, 2.2rem); font-weight: 650; letter-spacing: -.03em; line-height: 1.15; margin: 0 0 .7rem; }
.lx-copy h1 em { font-style: normal; background: linear-gradient(90deg, #ffe08a, #e5a531); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lx-copy p { color: rgba(255,255,255,.72); font-size: 1rem; line-height: 1.6; margin: 0 0 1.25rem; }
.lx-pills { display: flex; flex-wrap: wrap; gap: .55rem; }
.lx-pills span { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .85rem; border-radius: 999px; font-size: .82rem; font-weight: 600;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lx-pills i { color: #ffd27a; }
.lx-foot { font-size: .78rem; color: rgba(255,255,255,.55); }
.lx-foot i { margin-right: .35rem; }

.lx-side { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 2.5rem; }
.lx-card { position: relative; width: 100%; max-width: 410px; padding: 3.2rem 2.2rem 1.6rem; border-radius: 24px; color: var(--ink-900); text-align: center;
  background: rgba(255,255,255,.9); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid rgba(255,255,255,.7); box-shadow: 0 40px 90px -30px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08); animation: lxIn .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes lxIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lx-card { animation: none; } }
.lx-avatar { position: absolute; left: 50%; top: -44px; width: 88px; height: 88px; margin-left: -44px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  font-size: 2.3rem; color: #fff; background: linear-gradient(145deg, var(--brand-600), var(--brand-900)); border: 5px solid #fff; box-shadow: 0 14px 30px -10px rgba(0,0,0,.45); }
.lx-card h2 { font-size: 1.65rem; font-weight: 700; letter-spacing: -.03em; margin: .2rem 0 .2rem; color: var(--ink-900); }
.lx-sub { color: var(--ink-500); margin-bottom: 1.4rem; font-size: .92rem; }
.lx-sub b { color: var(--ink-900); font-weight: 600; }
.lx-card .alert { text-align: left; font-size: .86rem; }
.lx-field { position: relative; display: block; margin-bottom: .9rem; text-align: left; }
.lx-field > i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--ink-400); font-size: 1.1rem; pointer-events: none; transition: color .15s; }
.lx-field input { width: 100%; height: 56px; padding: 1.25rem 3rem .35rem 2.85rem; border-radius: 14px; border: 1.5px solid #dfe3e8; background: #fff; font-size: 1rem;
  color: var(--ink-900); outline: 0; transition: border-color .15s, box-shadow .15s; }
.lx-field input:focus { border-color: var(--brand-600); box-shadow: 0 0 0 4px rgba(var(--bs-primary-rgb), .14); }
.lx-field input:focus ~ i, .lx-field:focus-within > i { color: var(--brand-700); }
.lx-field > span { position: absolute; left: 2.85rem; top: 50%; transform: translateY(-50%); color: var(--ink-500); font-size: .95rem; pointer-events: none;
  transition: top .15s, font-size .15s, color .15s; }
.lx-field input:focus + span, .lx-field input:not(:placeholder-shown) + span { top: 15px; font-size: .7rem; font-weight: 600; letter-spacing: .02em; color: var(--brand-700); }
.lx-eye { position: absolute; right: .55rem; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-500); font-size: 1.1rem; }
.lx-eye:hover { background: var(--line-2); color: var(--ink-900); }
.lx-caps { display: flex; align-items: center; gap: .4rem; margin: -.35rem 0 .7rem; font-size: .8rem; font-weight: 600; color: #a16207; text-align: left; }
.lx-btn { width: 100%; height: 54px; margin-top: .3rem; border: 0; border-radius: 14px; color: #fff; font-size: 1.05rem; font-weight: 650; letter-spacing: -.01em;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-800)); box-shadow: 0 14px 28px -12px rgba(var(--bs-primary-rgb), .9), inset 0 1px 0 rgba(255,255,255,.2);
  transition: transform .12s, box-shadow .15s, filter .15s; }
.lx-btn:hover { filter: brightness(1.07); box-shadow: 0 18px 32px -12px rgba(var(--bs-primary-rgb), .95), inset 0 1px 0 rgba(255,255,255,.2); }
.lx-btn:active { transform: translateY(1px); }
.lx-btn:disabled { opacity: .75; }
.lx-btn i { transition: transform .15s; }
.lx-btn:hover i { transform: translateX(3px); }
.lx-help { display: flex; gap: .5rem; align-items: flex-start; justify-content: center; margin-top: 1.3rem; padding-top: 1rem; border-top: 1px solid var(--line-2);
  font-size: .78rem; color: var(--ink-500); }
.lx-copyright { margin-top: 1.25rem; font-size: .74rem; color: rgba(255,255,255,.55); }

@media (max-width: 991.98px) {
  .lx { grid-template-columns: 1fr; }
  .lx-hero { padding: 1.6rem 1.4rem .5rem; gap: 1.2rem; }
  .lx-copy, .lx-foot { display: none; }
  .lx-time { margin-top: .5rem; text-align: center; }
  .lx-time b { font-size: 4.2rem; }
  .lx-time span { font-size: .95rem; }
  .lx-side { justify-content: flex-start; padding: 3.5rem 1rem 1.5rem; }
  .lx-card { padding: 3rem 1.3rem 1.3rem; border-radius: 22px; }
  .lx-field input { font-size: 16px; }
}

/* =====================================================================
   v1.19.0 — Settings page: section menu + one panel per section
   ===================================================================== */
.set-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.set-nav { position: sticky; top: calc(var(--topbar-h) + 1.5rem); padding: .6rem; max-height: calc(100vh - var(--topbar-h) - 3rem); overflow: auto; }
.set-find { display: flex; align-items: center; gap: .5rem; padding: .45rem .7rem; margin-bottom: .4rem; border-radius: 10px; background: var(--canvas); border: 1px solid var(--line); }
.set-find i { color: var(--ink-400); }
.set-find input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; font-size: .88rem; }
.set-link { display: flex; align-items: center; gap: .75rem; padding: .62rem .8rem; border-radius: 10px; color: var(--ink-700); text-decoration: none; font-weight: 500; font-size: .92rem; margin-bottom: 2px; }
.set-link > i:first-child { width: 1.25rem; text-align: center; color: var(--ink-500); font-size: 1.05rem; }
.set-link:hover { background: var(--canvas); color: var(--ink-900); }
.set-link.active { background: var(--brand-50); color: var(--brand-800); font-weight: 650; box-shadow: inset 3px 0 0 var(--brand-700); }
.set-link.active > i:first-child { color: var(--brand-700); }
.set-link.set-none { opacity: .4; }
.set-hits { margin-left: auto; font-style: normal; font-size: .68rem; font-weight: 700; background: var(--brand-700); color: #fff; border-radius: 999px; padding: 0 .45rem; }
.set-out { border-top: 1px solid var(--line-2); margin-top: .4rem; padding-top: .8rem; border-radius: 0 0 10px 10px; }
.set-panel { display: none; }
.set-panel.show { display: block; animation: pageIn .2s var(--ease) both; }
.set-head { display: flex; align-items: flex-start; gap: .9rem; padding: 1.15rem 1.35rem; border-bottom: 1px solid var(--line-2); }
.set-head h2 { font-size: 1.15rem; font-weight: 700; margin: 0 0 .15rem; letter-spacing: -.015em; }
.set-head p { margin: 0; color: var(--ink-500); font-size: .86rem; }
.set-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; font-size: 1.15rem; color: var(--brand-700); background: var(--brand-50); box-shadow: inset 0 0 0 1px rgba(var(--bs-primary-rgb), .1); }
.set-body { padding: 1.3rem 1.35rem 1.4rem; }
.set-row .form-label { font-weight: 600; }
.set-switch { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.set-switch .form-switch .form-check-input { width: 2.9em; height: 1.55em; cursor: pointer; }
.set-switch .set-text { min-width: 0; }
.set-dim { opacity: .25; }
.set-foot { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .85rem 1.35rem;
  border-top: 1px solid var(--line-2); background: rgba(250,251,252,.96); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-radius: 0 0 var(--radius) var(--radius); }
.set-logo { display: flex; gap: 1.1rem; align-items: flex-start; margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px dashed var(--line); }
.set-logo-box { width: 120px; height: 120px; border-radius: 14px; border: 1px dashed #cfd5dc; display: grid; place-items: center; background: #fff; overflow: hidden; flex-shrink: 0; color: var(--ink-400); font-size: 2rem; }
.set-logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; padding: 6px; }
.set-note { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem 1rem; margin-bottom: 1.2rem; border-radius: 12px; background: #eff5fc; border: 1px solid #d4e3f4; color: #1d4a7c; font-size: .86rem; }
.set-note > i { font-size: 1.1rem; margin-top: 1px; }
.set-test { margin: 0 1.35rem 1.35rem; padding: 1rem; border-radius: 12px; border: 1px dashed var(--line); background: var(--surface-2); }
.menu-win .set-panel { background: rgba(255,255,255,.92); }
@media (max-width: 991.98px) {
  .set-layout { grid-template-columns: 1fr; gap: .8rem; }
  .set-nav { position: static; max-height: none; display: block; padding: .5rem; }
  .set-nav nav { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .set-nav nav::-webkit-scrollbar { display: none; }
  .set-link { flex-shrink: 0; margin: 0; padding: .5rem .8rem; white-space: nowrap; border: 1px solid var(--line); }
  .set-link.active { box-shadow: none; border-color: rgba(var(--bs-primary-rgb), .35); }
  .set-out { border-top: 1px solid var(--line); margin-top: 0; padding-top: .5rem; border-radius: 10px; }
  .set-head, .set-body, .set-foot { padding-left: 1rem; padding-right: 1rem; }
  .set-logo { flex-direction: column; }
  .set-foot .btn { width: 100%; }
}

/* v1.19.0 WhatsApp button */
.btn-wa { color: #128c4a; }
.btn-wa:hover, .btn-wa:focus { background: #e7f8ee; color: #0b6e38; border-color: #bfe8cf; }
.btn-wa .bi { color: #25d366; }

/* v1.19.1 Install as desktop app */
.lx-install { display: inline-flex; align-self: flex-start; width: auto; align-items: center; gap: 8px; margin-top: 18px; padding: 9px 16px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.14); color: #fff; font-weight: 600; font-size: 14px;
  backdrop-filter: blur(8px); cursor: pointer; transition: background .15s; }
.lx-install:hover { background: rgba(255,255,255,.24); }
.lx-install[hidden] { display: none; }
