/* ==========================================================================
   JM's POS — interface styles
   ========================================================================== */

:root {
  --bg: #f4f6f9;
  --bg-deep: #eaeef4;
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --surface-3: #eef2f7;
  --border: #e4e9f0;
  --border-strong: #cfd8e3;
  --text: #101828;
  --text-dim: #5b6b80;
  --text-faint: #94a3b8;

  --brand: #0ea394;
  --brand-dark: #0b7f74;
  --brand-deep: #075e57;
  --brand-light: #d6f5f0;
  --brand-glow: rgba(14, 163, 148, .28);
  --accent: #6366f1;

  --ok: #16a34a;
  --ok-light: #dcfce7;
  --warn: #d97706;
  --warn-light: #fef3c7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --info: #0284c7;
  --info-light: #e0f2fe;

  --sidebar: #101a2b;
  --sidebar-2: #16233a;
  --sidebar-hover: #1e2d47;

  --r-sm: 8px;
  --r: 11px;
  --r-lg: 14px;
  --r-xl: 18px;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .07), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, .08), 0 2px 4px rgba(16, 24, 40, .04);
  --shadow-lg: 0 16px 40px rgba(16, 24, 40, .16), 0 4px 10px rgba(16, 24, 40, .07);

  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Noto Sans", sans-serif;
  --mono: "Cascadia Mono", "Consolas", "Courier New", monospace;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Unsized inline SVG icons otherwise balloon to their intrinsic size and
   push real controls off-screen. This cap is load-bearing. */
svg { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.16em; }
button svg, .nav-item svg { pointer-events: none; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong); border-radius: 7px;
  border: 3px solid transparent; background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); background-clip: content-box; }

::selection { background: var(--brand-glow); }

/* --- Login ---------------------------------------------------------------- */
#login {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: linear-gradient(140deg, #0b7f74 0%, #101a2b 58%, #07423d 100%);
}
/* An author-level `display` beats the UA's [hidden] rule, so hiding needs saying
   explicitly — without this the login overlay stays on top after signing in. */
#login[hidden] { display: none; }
#activation {
  position: fixed; inset: 0; z-index: 101;
  display: grid; place-items: center;
  background: linear-gradient(140deg, #1e293b 0%, #101a2b 58%, #0b3b52 100%);
}
#activation[hidden] { display: none; }
#activation .login-brand { background: linear-gradient(165deg, #334155 0%, #1e293b 50%, #0f172a 100%); color: #cbd5e1; }
#activation .lb-tag, #activation .lb-foot { color: #94a3b8; }
#activation .lb-credit { color: #64748b; }
#activation .lb-features i { color: #94a3b8; }
#login::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 16% 20%, rgba(45, 212, 191, .26), transparent 44%),
    radial-gradient(circle at 84% 80%, rgba(99, 102, 241, .20), transparent 48%);
}
.login-card {
  position: relative; width: 396px; padding: 40px 36px 32px;
  background: var(--surface); border-radius: 20px;
  box-shadow: 0 24px 64px rgba(4, 20, 30, .38);
  animation: cardIn .38s var(--ease);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.login-logo {
  width: 68px; height: 68px; margin: 0 auto 18px; border-radius: 20px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, #2dd4bf, var(--brand-dark));
  box-shadow: 0 10px 24px var(--brand-glow);
}
.login-logo svg { width: 34px; height: 34px; }
.login-card h1 { margin: 0 0 5px; font-size: 23px; text-align: center; letter-spacing: -.025em; }
.login-card .sub { margin: 0 0 26px; text-align: center; color: var(--text-dim); font-size: 13px; }
.login-hint {
  margin-top: 18px; padding: 11px 13px; border-radius: var(--r);
  background: var(--info-light); color: #075985; font-size: 12px; text-align: center;
}

/* --- App shell ------------------------------------------------------------ */
#shell { display: grid; grid-template-columns: 238px minmax(0, 1fr); height: 100vh; }
#shell[hidden] { display: none; }

.sidebar {
  background: linear-gradient(180deg, var(--sidebar-2), var(--sidebar));
  color: #c3cede;
  display: flex; flex-direction: column; min-height: 0;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 18px; border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(140deg, #2dd4bf, var(--brand-dark)); color: #fff; flex: none;
  box-shadow: 0 4px 12px rgba(14, 163, 148, .35);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-text { min-width: 0; }
.brand-text strong {
  display: block; color: #fff; font-size: 14.5px; line-height: 1.25;
  letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-text span { font-size: 11px; color: #6b7f9a; }

.nav { flex: 1; overflow-y: auto; padding: 12px 11px 18px; min-height: 0; }
.nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); background-clip: content-box; }
.nav-group { margin-top: 16px; }
.nav-group:first-child { margin-top: 4px; }
.nav-group-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: .11em;
  color: #56698a; padding: 0 11px 7px; font-weight: 700;
}
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; margin-bottom: 3px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: #c3cede; font: inherit; font-size: 13.5px;
  cursor: pointer; text-align: left;
  transition: background .14s var(--ease), color .14s var(--ease);
}
.nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-item.active {
  background: linear-gradient(100deg, var(--brand), var(--brand-dark));
  color: #fff; font-weight: 600;
  box-shadow: 0 4px 14px rgba(14, 163, 148, .34);
}
.nav-item.active::before {
  content: ''; position: absolute; left: -11px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: #5eead4;
}
.nav-item .badge {
  margin-left: auto; background: var(--danger); color: #fff; font-size: 10px;
  font-weight: 700; padding: 2px 6px; border-radius: 20px; min-width: 18px; text-align: center;
  box-shadow: 0 2px 6px rgba(220, 38, 38, .4);
}
.nav-item.active .badge { background: rgba(255, 255, 255, .26); box-shadow: none; }

/* Short windows (a laptop at 125–150% Windows scaling): every menu entry still
   fits without scrolling the sidebar. */
@media (max-height: 760px) {
  .brand { padding: 12px 16px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
  .nav { padding: 6px 10px 8px; }
  .nav-group { margin-top: 8px; }
  .nav-group:first-child { margin-top: 2px; }
  .nav-group-label { padding: 0 11px 3px; font-size: 9.5px; }
  .nav-item { padding: 6px 12px; margin-bottom: 1px; font-size: 13px; }
  .powered { padding-top: 4px; }
  .sidebar-foot { padding: 8px 12px; }
}

.sidebar-foot { padding: 12px; border-top: 1px solid rgba(255, 255, 255, .07); }
.user-chip {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border-radius: var(--r-sm); background: rgba(255, 255, 255, .055);
}
.avatar {
  width: 33px; height: 33px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(140deg, #2dd4bf, var(--brand-dark));
  color: #fff; font-weight: 700; font-size: 13px; flex: none;
}
.user-chip .meta { min-width: 0; flex: 1; }
.user-chip .meta b {
  display: block; color: #fff; font-size: 12.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-chip .meta span { font-size: 10.5px; color: #6b7f9a; text-transform: capitalize; }
.icon-btn {
  background: transparent; border: 0; color: #94a3b8; cursor: pointer;
  padding: 6px; border-radius: 7px; display: grid; place-items: center;
  transition: background .13s var(--ease), color .13s var(--ease);
}
.icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.modal .icon-btn:hover, .cart-row .icon-btn:hover { background: var(--surface-3); color: var(--text); }

/* --- Main pane ------------------------------------------------------------ */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 0 24px; height: 62px; flex: none;
  background: var(--surface); border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}
.topbar h2 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.02em; }
.topbar .spacer { flex: 1; }
.clock { font-size: 12.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }

.view { flex: 1; overflow-y: auto; padding: 24px; min-height: 0; }
.view.flush { padding: 0; overflow: hidden; }
.view > * { animation: viewIn .26s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* --- Cards ---------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.card-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 15px 18px; border-bottom: 1px solid var(--border);
}
.card-head h3 { margin: 0; font-size: 14.5px; font-weight: 650; letter-spacing: -.01em; }
.card-head .spacer { flex: 1; }
.card-body { padding: 18px; }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 15px; border-radius: var(--r-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px;
  font-weight: 550; cursor: pointer; white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: background .14s var(--ease), border-color .14s var(--ease),
              box-shadow .14s var(--ease), transform .08s var(--ease);
}
.btn:hover { background: var(--surface-2); border-color: var(--text-faint); box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); box-shadow: var(--shadow-xs); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

.btn-primary {
  background: linear-gradient(160deg, var(--brand), var(--brand-dark));
  border-color: var(--brand-dark); color: #fff;
  box-shadow: 0 2px 8px var(--brand-glow);
}
.btn-primary:hover {
  background: linear-gradient(160deg, var(--brand-dark), var(--brand-deep));
  border-color: var(--brand-deep); box-shadow: 0 4px 14px var(--brand-glow);
}
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 7px; }
.btn-lg { padding: 13px 22px; font-size: 15px; border-radius: var(--r); }
.btn-block { width: 100%; }

/* --- Forms ---------------------------------------------------------------- */
label.field { display: block; margin-bottom: 14px; }
label.field > span {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-dim); margin-bottom: 6px;
}
input, select, textarea {
  width: 100%; padding: 10px 12px; font: inherit; font-size: 13.5px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-sm); outline: none;
  transition: border-color .14s var(--ease), box-shadow .14s var(--ease), background .14s var(--ease);
}
input:hover:not(:disabled), select:hover, textarea:hover { border-color: var(--text-faint); }
input:focus, select:focus, textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3.5px var(--brand-glow);
}
input[readonly] { background: var(--surface-2); color: var(--text-dim); }
textarea { resize: vertical; min-height: 68px; }
input[type="checkbox"] { width: auto; margin-right: 7px; vertical-align: -2px; accent-color: var(--brand); }
.check-line {
  display: flex; align-items: center; font-size: 13.5px;
  margin-bottom: 11px; cursor: pointer; user-select: none;
}
.check-line input { margin-right: 9px; }

/* Small explanatory line under a field — used for pack/unit maths. */
.field-hint {
  font-size: 11.5px; color: var(--text-dim); margin-top: 6px; line-height: 1.45;
}

/* Collapsible "More options" block inside forms. */
details.more {
  margin: 4px 0 6px; border: 1px solid var(--border);
  border-radius: var(--r-sm); background: var(--surface-2);
}
details.more > summary {
  cursor: pointer; padding: 10px 14px; font-size: 13px; font-weight: 600;
  color: var(--text-dim); list-style: none; user-select: none;
  display: flex; align-items: center; gap: 7px;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before {
  content: '▸'; font-size: 11px; transition: transform .16s var(--ease); display: inline-block;
}
details.more[open] > summary::before { transform: rotate(90deg); }
details.more > summary:hover { color: var(--text); }
.more-body { padding: 4px 14px 8px; border-top: 1px solid var(--border); }

/* --- Layout helpers ------------------------------------------------------- */
.grid { display: grid; gap: 15px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1180px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.small { font-size: 12px; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; text-align: right; }

/* --- Tables --------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-dim); font-weight: 700; padding: 11px 14px;
  border-bottom: 1px solid var(--border); background: var(--surface-2);
  position: sticky; top: 0; z-index: 1; white-space: nowrap;
}
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tbody tr { transition: background .12s var(--ease); }
table.data tbody tr:hover { background: var(--surface-2); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr.clickable { cursor: pointer; }
table.data tfoot td { background: var(--surface-2); border-top: 1px solid var(--border-strong); }
table.data .actions { display: flex; gap: 5px; justify-content: flex-end; }

/* Expired stock rows read as urgent at a glance. */
tr.row-danger { background: rgba(220, 38, 38, .045); }
tr.row-danger:hover { background: rgba(220, 38, 38, .085); }
tr.row-danger td:first-child { box-shadow: inset 3px 0 0 var(--danger); }

.empty { padding: 52px 20px; text-align: center; color: var(--text-faint); }
.empty svg { width: 40px; height: 40px; margin-bottom: 12px; opacity: .4; }
.empty p { margin: 0 0 5px; font-size: 14.5px; color: var(--text-dim); font-weight: 550; }

/* --- Pills ---------------------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px;
  border-radius: 20px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.pill-ok { background: var(--ok-light); color: #15803d; }
.pill-warn { background: var(--warn-light); color: #b45309; }
.pill-danger { background: var(--danger-light); color: #b91c1c; }
.pill-info { background: var(--info-light); color: #0369a1; }
.pill-muted { background: var(--surface-3); color: var(--text-dim); }

/* --- Stat cards ----------------------------------------------------------- */
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 17px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: box-shadow .16s var(--ease), transform .16s var(--ease);
}
.stat:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat .label {
  font-size: 11px; color: var(--text-dim); font-weight: 650;
  text-transform: uppercase; letter-spacing: .06em;
}
.stat .value { font-size: 26px; font-weight: 700; margin: 8px 0 3px; letter-spacing: -.03em; }
.stat .sub { font-size: 12px; color: var(--text-faint); }
.stat .ico {
  position: absolute; top: 16px; right: 17px; width: 35px; height: 35px;
  border-radius: 10px; display: grid; place-items: center;
}
.stat .ico svg { width: 17px; height: 17px; }
.ico-brand { background: var(--brand-light); color: var(--brand-dark); }
.ico-ok { background: var(--ok-light); color: #15803d; }
.ico-warn { background: var(--warn-light); color: #b45309; }
.ico-danger { background: var(--danger-light); color: #b91c1c; }
.ico-info { background: var(--info-light); color: #0369a1; }

/* --- Scanner affordances -------------------------------------------------- */
.scan-chip {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; color: var(--ok);
  background: var(--ok-light); padding: 3px 9px; border-radius: 20px;
  pointer-events: none;
}
.scan-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.scan-input { font-family: var(--mono); letter-spacing: .04em; }
.scan-flash { animation: scanFlash .7s var(--ease); }
@keyframes scanFlash {
  0% { background: var(--ok-light); border-color: var(--ok); box-shadow: 0 0 0 4px rgba(22, 163, 74, .22); }
  100% { background: var(--surface); }
}

/* --- POS ------------------------------------------------------------------ */
.pos {
  display: grid; grid-template-columns: minmax(0, 1fr) 424px;
  height: 100%; min-height: 0; overflow: hidden;
}
.pos-left { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 18px; gap: 14px; }
.pos-search { position: relative; flex: none; }
.pos-search input {
  padding: 14px 150px 14px 44px; font-size: 15px; border-radius: var(--r);
  border-width: 2px; background: var(--surface); box-shadow: var(--shadow-xs);
}
.pos-search .s-ico {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  color: var(--text-faint); pointer-events: none;
}
.pos-search .scan-hint {
  position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
  font-size: 11px; font-weight: 600; color: var(--ok);
  background: var(--ok-light); padding: 4px 10px; border-radius: 20px;
  pointer-events: none; display: flex; align-items: center; gap: 6px;
}

.results { flex: 1; overflow-y: auto; min-height: 0; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(206px, 1fr)); gap: 11px; }
.med-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  padding: 13px; cursor: pointer; min-width: 0; text-align: left; font: inherit;
  color: inherit; position: relative; box-shadow: var(--shadow-xs);
  transition: border-color .14s var(--ease), box-shadow .14s var(--ease), transform .1s var(--ease);
}
.med-card:hover {
  border-color: var(--brand); box-shadow: 0 6px 16px var(--brand-glow); transform: translateY(-2px);
}
.med-card:active { transform: translateY(0); }
.med-card.out { opacity: .5; }
.med-card.out:hover { border-color: var(--border-strong); box-shadow: var(--shadow-xs); transform: none; }
.med-card .nm { font-weight: 650; font-size: 13.5px; line-height: 1.32; margin-bottom: 3px; padding-right: 30px; }
.med-card .gn { font-size: 11.5px; color: var(--text-dim); margin-bottom: 8px; min-height: 15px; }
.med-card .pr { font-weight: 700; color: var(--brand-dark); font-size: 15.5px; letter-spacing: -.01em; }
.med-card .st { font-size: 11px; color: var(--text-faint); margin-top: 3px; }
.med-card .tag { position: absolute; top: 10px; right: 10px; }

.pos-right {
  background: var(--surface); border-left: 1px solid var(--border);
  display: flex; flex-direction: column; min-width: 0; min-height: 0;
  box-shadow: -4px 0 16px rgba(16, 24, 40, .04);
}
.cart-head {
  padding: 15px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px; flex: none;
}
.cart-head h3 { margin: 0; font-size: 15px; letter-spacing: -.01em; }
.cart-items { flex: 1; overflow-y: auto; min-height: 120px; padding: 8px; }
.cart-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px;
  padding: 9px 10px; border-radius: var(--r-sm); border: 1px solid var(--border);
  margin-bottom: 6px; background: var(--surface);
  animation: rowIn .2s var(--ease);
}
@keyframes rowIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.cart-row:hover { border-color: var(--border-strong); background: var(--surface-2); }
.cart-row > div:first-child { min-width: 0; }
.cart-row .nm { font-weight: 600; font-size: 13px; line-height: 1.3; }
.cart-row .meta { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.cart-row .line-total { font-weight: 700; font-size: 14.5px; white-space: nowrap; }

.qty-box { display: flex; align-items: center; gap: 5px; margin-top: 6px; flex-wrap: wrap; row-gap: 5px; }
/* Direct children only — the pack/unit toggle nests its own buttons in here
   and must not inherit the 26px square stepper sizing. */
.qty-box > button {
  width: 27px; height: 27px; border-radius: 7px; border: 1px solid var(--border-strong);
  background: var(--surface); cursor: pointer; display: grid; place-items: center;
  font-size: 15px; line-height: 1; color: var(--text); padding: 0;
  transition: background .12s var(--ease), border-color .12s var(--ease);
}
.qty-box > button:hover { background: var(--brand-light); border-color: var(--brand); color: var(--brand-dark); }
.qty-box input { width: 58px; text-align: center; padding: 4px 6px; font-size: 13px; }

.unit-toggle {
  display: inline-flex; border: 1px solid var(--border-strong);
  border-radius: 7px; overflow: hidden; flex: 0 0 auto;
}
.unit-toggle button {
  border: 0; background: var(--surface); padding: 5px 9px; font-size: 11.5px;
  cursor: pointer; color: var(--text-dim); font-weight: 600; width: auto; height: auto;
  transition: background .12s var(--ease), color .12s var(--ease);
}
.unit-toggle button:hover { background: var(--surface-3); }
.unit-toggle button.on { background: var(--brand); color: #fff; }

.cart-foot { flex: none; border-top: 1px solid var(--border); padding: 11px 14px; background: var(--surface-2); }
.sum-line { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 5px; }
.sum-line.total {
  font-size: 20px; font-weight: 700; padding-top: 8px; margin-top: 3px;
  border-top: 2px solid var(--border-strong); color: var(--brand-dark); letter-spacing: -.02em;
}
.sum-line input { width: 112px; text-align: right; padding: 5px 9px; font-size: 13px; }
.pay-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 8px 0; }
.pay-grid button {
  padding: 7px 4px; border-radius: var(--r-sm); border: 1px solid var(--border-strong);
  background: var(--surface); font-size: 12px; font-weight: 600; cursor: pointer;
  color: var(--text-dim); transition: all .13s var(--ease);
}
.pay-grid button:hover { border-color: var(--brand); color: var(--brand-dark); }
.pay-grid button.on {
  background: linear-gradient(160deg, var(--brand), var(--brand-dark));
  border-color: var(--brand-dark); color: #fff; box-shadow: 0 2px 8px var(--brand-glow);
}

/* --- Modal ---------------------------------------------------------------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(16, 24, 40, .52); z-index: 200;
  display: grid; place-items: center; padding: 26px; backdrop-filter: blur(3px);
  animation: fadeIn .16s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  width: 580px; max-width: 100%; max-height: 90vh; display: flex; flex-direction: column;
  animation: modalIn .22s var(--ease);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal.wide { width: 920px; }
.modal.narrow { width: 430px; }
.modal-head {
  padding: 18px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; flex: none;
}
.modal-head h3 { margin: 0; font-size: 16.5px; font-weight: 650; letter-spacing: -.015em; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; min-height: 0; }
.modal-foot {
  padding: 15px 20px; border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end; flex: none; background: var(--surface-2);
  border-radius: 0 0 var(--r-xl) var(--r-xl);
}

/* --- Toast ---------------------------------------------------------------- */
#toasts {
  position: fixed; top: 18px; right: 18px; z-index: 300;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--brand);
  border-radius: var(--r-sm); box-shadow: var(--shadow-lg); padding: 13px 17px;
  min-width: 272px; max-width: 400px; font-size: 13.5px;
  animation: slideIn .22s var(--ease); pointer-events: auto;
}
.toast.err { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warn); }
.toast.ok { border-left-color: var(--ok); }
.toast b { display: block; margin-bottom: 3px; font-size: 13px; }
@keyframes slideIn { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }

/* --- Tabs ----------------------------------------------------------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; flex-wrap: wrap; }
.tab {
  padding: 10px 16px; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 13.5px; color: var(--text-dim); font-weight: 550;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .13s var(--ease), border-color .13s var(--ease);
}
.tab:hover { color: var(--text); }
.tab.on { color: var(--brand-dark); border-bottom-color: var(--brand); font-weight: 650; }

/* --- Toolbar -------------------------------------------------------------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .search { position: relative; flex: 1; min-width: 300px; max-width: 520px; }
.toolbar .search input { padding-left: 38px; padding-right: 124px; }
/* The chip would otherwise sit on top of what is being typed. */
.toolbar .search input:focus ~ .scan-chip,
.toolbar .search input:not(:placeholder-shown) ~ .scan-chip { opacity: 0; }
.scan-chip { transition: opacity .15s var(--ease); }
.toolbar .search > svg,
.toolbar .search > span:first-child {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--text-faint); pointer-events: none;
}
/* Inputs default to width:100%, which makes them fight for space inside the
   flex toolbars. Inside a toolbar they should size to their content instead. */
.toolbar select,
.toolbar input[type="date"],
.toolbar input[type="number"] { width: auto; flex: 0 0 auto; min-width: 145px; }
.toolbar .check-line { flex: 0 0 auto; margin-bottom: 0; }

/* --- Misc ----------------------------------------------------------------- */
.chart-box { position: relative; height: 268px; }
.chart-box canvas { max-height: 268px; }

.expiry-near { color: var(--warn); font-weight: 600; }
.expiry-gone { color: var(--danger); font-weight: 700; }

.kbd {
  display: inline-block; padding: 1px 6px; border-radius: 5px; font-size: 11px;
  font-family: var(--mono); background: var(--surface-2);
  border: 1px solid var(--border-strong); border-bottom-width: 2px; color: var(--text-dim);
}

.split-list { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .split-list { grid-template-columns: minmax(0, 1fr); } }

.list-pick {
  max-height: 460px; overflow-y: auto; border: 1px solid var(--border);
  border-radius: var(--r-sm); background: var(--surface);
}
.list-pick button {
  display: block; width: 100%; text-align: left; padding: 11px 14px; border: 0;
  border-bottom: 1px solid var(--border); background: transparent; cursor: pointer;
  font: inherit; font-size: 13px; transition: background .12s var(--ease);
}
.list-pick button:last-child { border-bottom: 0; }
.list-pick button:hover { background: var(--surface-2); }
.list-pick button.on { background: var(--brand-light); box-shadow: inset 3px 0 0 var(--brand); font-weight: 600; }
.list-pick button b { display: block; }
.list-pick button span { font-size: 11.5px; color: var(--text-dim); }

.print-only { display: none; }
@media print { .print-only { display: block; } .no-print { display: none !important; } }

/* --- Receipt settings ----------------------------------------------------- */
.settings-group { align-self: start; }
.toggle-grid { display: flex; flex-direction: column; gap: 2px; }
.toggle-row {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  padding: 7px 8px; border-radius: var(--r-sm); user-select: none;
  transition: background .12s var(--ease);
}
.toggle-row:hover { background: var(--surface-2); }
.toggle-row input { margin: 1px 0 0; flex: none; }
.toggle-row span { min-width: 0; }
.toggle-row b { display: block; font-size: 13px; font-weight: 550; }
.toggle-row i {
  display: block; font-size: 11.5px; color: var(--text-faint);
  font-style: normal; margin-top: 1px; line-height: 1.4;
}
.toggle-row input:not(:checked) ~ span b { color: var(--text-faint); font-weight: 400; }

.qr-preview {
  width: 150px; height: 150px; border: 1px dashed var(--border-strong);
  border-radius: var(--r-sm); display: grid; place-items: center;
  background: var(--surface-2); overflow: hidden; padding: 8px;
}
.qr-preview img { width: 100%; height: 100%; object-fit: contain; }
.qr-empty { text-align: center; padding: 8px; line-height: 1.5; }

/* --- Login screen (two-pane: shop branding + sign-in) --------------------- */
.login-shell {
  position: relative;
  display: grid; grid-template-columns: 400px 420px;
  width: 820px; max-width: calc(100vw - 48px); max-height: calc(100vh - 48px);
  background: var(--surface); border-radius: 22px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(4, 20, 30, .45);
  animation: cardIn .4s var(--ease);
}
/* Tighten the brand pane before giving up on it. */
@media (max-height: 700px) {
  .login-brand { padding: 24px 26px 20px; gap: 16px; }
  .login-brand .login-logo { width: 46px; height: 46px; margin-bottom: 12px; border-radius: 13px; }
  .login-brand .login-logo svg { width: 25px; height: 25px; }
  .login-brand h1 { font-size: 21px; }
  .lb-features { gap: 11px; }
  .lb-ico { width: 26px; height: 26px; border-radius: 8px; }
  .lb-features i { display: none; }
  .lb-foot { padding-top: 11px; }
  .login-form { padding: 24px 30px 20px; }
  .lf-head { margin-bottom: 16px; }
}
/* Only genuinely small windows fall back to the single-column form. */
@media (max-width: 880px), (max-height: 520px) {
  .login-shell { grid-template-columns: minmax(0, 1fr); width: 430px; }
  .login-brand { display: none; }
}

/* Brand pane */
.login-brand {
  position: relative; padding: 34px 30px 26px; color: #d7f5f0; overflow: hidden;
  background: linear-gradient(165deg, #0ea394 0%, #0b7f74 45%, #08403c 100%);
  display: flex; flex-direction: column; gap: 22px;
}
.login-brand::before {
  content: ''; position: absolute; inset: 0; opacity: .5;
  background:
    radial-gradient(circle at 80% 8%, rgba(94, 234, 212, .35), transparent 45%),
    radial-gradient(circle at 5% 95%, rgba(4, 40, 38, .55), transparent 55%);
}
.login-brand > * { position: relative; }
.lb-top { text-align: left; }
.login-brand .login-logo {
  width: 56px; height: 56px; margin: 0 0 16px; border-radius: 16px;
  background: rgba(255, 255, 255, .16); color: #fff;
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}
.login-brand .login-logo svg { width: 30px; height: 30px; }
.login-brand h1 {
  margin: 0 0 4px; font-size: 25px; line-height: 1.15; color: #fff;
  letter-spacing: -.03em; text-align: left;
}
.lb-tag { margin: 0; font-size: 13px; color: #a9e6dd; }

.lb-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 15px; flex: 1; }
.lb-features li { display: flex; gap: 12px; align-items: flex-start; }
.lb-ico {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: rgba(255, 255, 255, .14); color: #fff;
  display: grid; place-items: center;
}
.lb-ico svg { width: 15px; height: 15px; }
.lb-features b { display: block; font-size: 13px; font-weight: 600; color: #fff; }
.lb-features i {
  display: block; font-style: normal; font-size: 11.5px;
  color: #93ddd2; margin-top: 1px; line-height: 1.45;
}

.lb-foot { font-size: 11px; color: #7fcabf; line-height: 1.6; border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 14px; }
.lb-credit { margin-top: 8px; color: #57a99e; font-size: 10.5px; }

/* Form pane */
.login-form { padding: 34px 34px 26px; display: flex; flex-direction: column; overflow-y: auto; }
.lf-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.lf-greet { font-size: 20px; font-weight: 680; letter-spacing: -.02em; }
.lf-date { font-size: 12.5px; color: var(--text-dim); margin-top: 2px; }
.lf-lock {
  width: 36px; height: 36px; border-radius: 11px; flex: none;
  background: var(--brand-light); color: var(--brand-dark);
  display: grid; place-items: center;
}

.user-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.user-chips[hidden] { display: none; }
/* Scoped to the sign-in screen: the sidebar's own .user-chip (signed-in user)
   was being repainted as a white login chip, hiding the user's name. */
.user-chips .user-chip {
  display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px;
  border: 1px solid var(--border-strong); border-radius: 30px;
  background: var(--surface); cursor: pointer; font: inherit; font-size: 12.5px;
  color: var(--text-dim); transition: all .13s var(--ease);
}
.user-chips .user-chip:hover { border-color: var(--brand); color: var(--text); }
.user-chips .user-chip.on {
  border-color: var(--brand); background: var(--brand-light);
  color: var(--brand-deep); font-weight: 600;
}
.uc-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: linear-gradient(140deg, #2dd4bf, var(--brand-dark));
  color: #fff; font-weight: 700; font-size: 11.5px;
  display: grid; place-items: center;
}
.uc-name { max-width: 108px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.input-icon { position: relative; }
.input-icon input { padding-left: 40px; padding-right: 42px; }
.ii-ico {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--text-faint); pointer-events: none; display: grid; place-items: center;
}
.ii-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--text-faint);
  cursor: pointer; padding: 7px; border-radius: 7px; display: grid; place-items: center;
}
.ii-btn:hover { background: var(--surface-3); color: var(--text); }

.caps-warn, .login-error {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; line-height: 1.4; margin-bottom: 12px;
}
.caps-warn { color: var(--warn); }
.caps-warn[hidden] { display: none; }
.login-error { color: var(--danger); font-weight: 550; min-height: 0; }
.login-error:empty { display: none; }
.login-error svg, .caps-warn svg { flex: none; }
.shake { animation: shake .34s var(--ease); }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

.login-form .btn-lg { margin-top: 4px; }
.login-form .login-hint { margin-top: 16px; }
.lf-version { margin-top: auto; padding-top: 16px; text-align: center; font-size: 11px; color: var(--text-faint); }

/* A hint that stands on its own between two field rows needs its own breathing
   room; the in-label variant only has a top margin. */
.modal-body > .field-hint { margin: -4px 0 15px; }


/* --- JM's POS platform: activation, licence state ------------------------- */
.act-title { font-size: 20px; font-weight: 680; letter-spacing: -.02em; margin: 0 0 4px; }
.act-sub { font-size: 13px; color: var(--text-dim); margin: 0 0 18px; line-height: 1.5; }
.act-machine {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin: 0 0 16px;
  border: 1px dashed var(--border-strong); border-radius: var(--r); background: var(--surface-2);
}
.act-machine .mono { font-size: 14px; font-weight: 650; letter-spacing: .04em; flex: 1; }
.act-preview { border: 1px solid var(--border); border-radius: var(--r); padding: 14px; margin: 0 0 14px; }
.act-preview h3 { margin: 0 0 2px; font-size: 16px; }
.act-kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 4px 10px; font-size: 12.5px; margin-top: 10px; }
.act-kv span:nth-child(odd) { color: var(--text-dim); }
.act-legacy {
  border: 1px solid #fcd34d; background: var(--warn-light); border-radius: var(--r);
  padding: 12px 14px; margin: 0 0 14px; font-size: 12.5px; line-height: 1.5;
}
.act-legacy label { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; font-weight: 600; cursor: pointer; }
.act-legacy input { margin-top: 2px; }
.act-error {
  color: #b91c1c; background: var(--danger-light); border-radius: var(--r);
  padding: 10px 12px; font-size: 12.5px; margin: 0 0 14px; line-height: 1.5;
}
.act-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 14px; }
.act-actions .btn { flex: 1; justify-content: center; }

/* The activation panel scrolls, but its buttons never leave the screen: on a
   laptop at 150% scaling the window is only ~630px tall. */
#act-panel { padding: 28px 30px 0; }
#act-panel .act-actions {
  position: sticky; bottom: 0; z-index: 2;
  margin: auto -30px 0; padding: 12px 30px 18px;
  background: var(--surface);
  box-shadow: 0 -12px 16px -14px rgba(15, 23, 42, .35);
}
#act-panel .act-sub { margin-bottom: 14px; }
@media (max-height: 700px) {
  #act-panel { padding: 20px 26px 0; }
  #act-panel .act-actions { margin: auto -26px 0; padding: 10px 26px 14px; }
  #act-panel .act-title { font-size: 18px; }
  #act-panel .act-sub { margin-bottom: 10px; }
}

/* Compact licence summary for the activation screen. */
.act-preview.compact { padding: 12px 14px; margin-bottom: 12px; }
.act-preview.compact h3 { font-size: 15.5px; }
.act-meta { font-size: 12px; color: var(--text-dim); margin-top: 1px; }
.act-meta .mono { font-size: 11.5px; }
.act-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.act-chips span {
  font-size: 11.5px; padding: 3px 8px; border-radius: 20px;
  background: var(--surface-3); color: var(--text-dim); white-space: nowrap;
}
.act-chips span.ok { background: var(--ok-light); color: #15803d; }
.act-legacy.compact { padding: 10px 12px; margin-bottom: 12px; line-height: 1.45; }
.act-legacy .path {
  display: block; font-size: 11px; color: #92400e; opacity: .85; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 400;
}
.act-legacy .row-note { font-size: 11.5px; margin-top: 6px; }
.act-legacy .linkish {
  background: none; border: 0; padding: 0; margin-top: 6px; font: inherit; font-size: 12px;
  color: #92400e; text-decoration: underline; cursor: pointer;
}

.licence-note { font-size: 12px; border-radius: var(--r); padding: 9px 11px; margin-top: 10px; line-height: 1.45; }
.licence-note.warn { background: var(--warn-light); color: #92400e; }
.licence-note.danger { background: var(--danger-light); color: #991b1b; }

.licence-banner {
  display: flex; align-items: center; gap: 10px; padding: 9px 22px; font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.licence-banner[hidden] { display: none; }
.licence-banner.warn { background: var(--warn-light); color: #92400e; }
.licence-banner.danger { background: var(--danger-light); color: #991b1b; }
.licence-banner b { font-weight: 650; }

.feature-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 18px; }
.feature-item { display: flex; gap: 9px; align-items: flex-start; padding: 7px 4px; font-size: 13px; }
.feature-item .fi-mark { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; flex: none; margin-top: 1px; }
.feature-item.on .fi-mark { background: var(--ok-light); color: var(--ok); }
.feature-item.off .fi-mark { background: var(--surface-3); color: var(--text-faint); }
.feature-item.off b { color: var(--text-faint); font-weight: 450; }
.feature-item i { display: block; font-style: normal; font-size: 11.5px; color: var(--text-faint); margin-top: 1px; }
.feature-group-label {
  grid-column: 1 / -1; font-size: 11px; font-weight: 650; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-faint); margin: 12px 0 2px;
}
.powered { font-size: 10.5px; color: #5d7088; padding: 8px 14px 0; }

/* --- JM's POS Cloud: the two ways to activate, and the connection chip ------ */
.act-tabs { display: flex; gap: 4px; padding: 3px; margin: 10px 0 16px; border-radius: 11px; background: var(--surface-3); }
.act-tab {
  flex: 1; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-dim);
}
.act-tab.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.act-code-input { font-size: 17px !important; letter-spacing: .12em; text-transform: uppercase; }
@media (max-height: 700px) { .act-tabs { margin: 6px 0 12px; } }

.cloud-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 20px; cursor: pointer;
  font-size: 12px; font-weight: 600; color: var(--text-dim); background: var(--surface-2); border: 1px solid var(--border);
}
.cloud-chip[hidden] { display: none; }
.cloud-chip .cc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); }
.cloud-chip.ok .cc-dot { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
.cloud-chip.busy .cc-dot { background: var(--warn); }
.cloud-chip.off .cc-dot { background: #cbd5e1; }
.cloud-chip.bad { color: #b91c1c; background: var(--danger-light); border-color: transparent; }
.cloud-chip.bad .cc-dot { background: var(--danger); }
.cloud-kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 6px 12px; font-size: 13px; margin-bottom: 14px; }
.cloud-kv > span:nth-child(odd) { color: var(--text-dim); }

/* --- Mart + Pharmacy: medicine or general item ------------------------------ */
.kind-field { margin-bottom: 14px; }
.kind-field > span { display: block; font-size: 12px; font-weight: 600; color: var(--text-dim); margin-bottom: 6px; }
.kind-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.kind-switch button {
  padding: 8px 12px; border-radius: var(--r-sm); border: 1px solid var(--border-strong); background: var(--surface);
  font: inherit; font-size: 13px; font-weight: 600; color: var(--text-dim); text-align: left; cursor: pointer;
  transition: border-color .13s var(--ease), background .13s var(--ease), color .13s var(--ease);
}
.kind-switch button small { display: block; font-size: 11.5px; font-weight: 450; color: var(--text-faint); margin-top: 1px; }
.kind-switch button:hover { border-color: var(--brand); color: var(--brand-dark); }
.kind-switch button.on { border-color: var(--brand); background: var(--brand-light); color: var(--brand-deep); box-shadow: inset 0 0 0 1px var(--brand); }
.kind-switch button.on small { color: var(--brand-dark); }
.kind-switch button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* The tag on a general item in lists where medicines and general goods mix. */
.pill-general { background: #ede9fe; color: #6d28d9; }
.kind-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kind-split .ks { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); }
.kind-split .ks b { display: block; font-size: 18px; font-weight: 700; margin: 2px 0; }
.kind-split .ks span { font-size: 12px; color: var(--text-dim); }
.kind-bar { height: 7px; border-radius: 4px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.kind-bar > i { display: block; height: 100%; background: var(--brand); }
.kind-split .ks.general .kind-bar > i { background: #8b5cf6; }
/* A date the shop still has to fill in (a medicine's expiry on a purchase). */
input.missing { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-light); }
