/* Pharmacy N7 — web UI. No framework; tokens first, then layout, then components. */
:root {
  --bg: #f6f5f4;
  --surface: #ffffff;
  --surface-2: #faf9f8;
  --border: #e7e4e1;
  --border-strong: #d4cfca;
  --text: #1a1a1a;
  --text-2: #555049;
  --muted: #857e76;
  /* brand orange from the Pharmacie N7 logo; --primary is a deeper shade so white text on buttons stays readable */
  --brand: #ea6a1c;
  --brand-ring: rgba(234, 106, 28, .2);
  --primary: #c2530f;
  --primary-hover: #a54508;
  --primary-soft: #fdefe6;
  --sidebar: #ffffff;
  --sidebar-text: #555049;
  --sidebar-active: #fdefe6;
  --danger: #b42318;   --danger-soft: #fdecea;
  --warning: #9a5b00;  --warning-soft: #fff3dc;
  --success: #1c7a3a;  --success-soft: #e5f4ea;
  --info: #1d5fa6;     --info-soft: #e7eff9;
  --neutral-soft: #eef1f4;
  --series-1: #ea6a1c;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .18);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --sidebar-w: 248px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* components set display; hidden must still win */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14.5px/1.5 var(--font); }
h1, h2, h3 { line-height: 1.25; margin: 0; }
a { color: var(--primary); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; flex: none; vertical-align: middle; }
.icon-xl { width: 40px; height: 40px; color: var(--muted); }
.muted { color: var(--text-2); margin: 4px 0 0; }
.link { color: var(--primary); font-weight: 600; text-decoration: none; font-size: 13.5px; }
.link:hover { text-decoration: underline; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* -- shell ---------------------------------------------------------------------------------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: var(--sidebar); color: var(--sidebar-text); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; flex: none; z-index: 30; border-right: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 18px 14px; color: var(--text); text-decoration: none; }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-text { display: flex; flex-direction: column; font-weight: 700; font-size: 16px; line-height: 1.2; }
.brand-text small { font-weight: 400; font-size: 11.5px; color: var(--muted); }
.nav { list-style: none; margin: 6px 0 0; padding: 0 10px; overflow-y: auto; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 9px 12px; margin: 2px 0; border-radius: 8px; color: var(--sidebar-text);
  text-decoration: none; font-weight: 500; }
.nav-link:hover { background: var(--neutral-soft); color: var(--text); }
.nav-link.active { background: var(--sidebar-active); color: var(--primary); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }
.sidebar-foot { margin-top: auto; padding: 14px 20px; font-size: 11.5px; color: var(--muted); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 12px 28px;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--border); }
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-user { display: flex; align-items: center; gap: 12px; }
.user-chip { display: flex; align-items: center; gap: 9px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.user-meta { display: flex; flex-direction: column; line-height: 1.2; font-size: 13px; }
.user-meta .badge { align-self: flex-start; margin-top: 2px; }
.icon-btn.menu-btn { display: none; }
.content { padding: 24px 28px 48px; max-width: 1440px; width: 100%; }
.sidebar-backdrop { position: fixed; inset: 0; background: rgba(10, 20, 25, .45); z-index: 25; }

/* -- page structure --------------------------------------------------------------------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-title { font-size: 22px; }
.eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.eyebrow a { color: inherit; }
.actions, .quick-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); margin: 22px 0 10px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
section.card { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-title { font-size: 15px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-3 > .card { margin-top: 18px; }

/* -- stat tiles -------------------------------------------------------------------------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.stat { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 15px 16px 14px; min-height: 96px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; }
a.stat:hover { border-color: var(--border-strong); box-shadow: 0 2px 8px rgba(16, 24, 40, .08); }
.stat-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat-sub { font-size: 12.5px; color: var(--muted); }
.stat.tone-danger { border-left: 4px solid var(--danger); }
.stat.tone-warning { border-left: 4px solid #d68a00; }
.stat.tone-success { border-left: 4px solid var(--success); }
.stat.tone-info { border-left: 4px solid var(--info); }
.stat .stat-label .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.tone-text-danger { color: var(--danger); } .tone-text-warning { color: var(--warning); }
.tone-text-success { color: var(--success); } .tone-text-info { color: var(--info); }

/* -- buttons ------------------------------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 600 14px/1 var(--font); cursor: pointer;
  text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--surface-2); border-color: #b8c1cb; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #971c13; }
.btn-ghost { background: var(--surface); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; }
.btn-block { width: 100%; }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5);
  border-top-color: #fff; animation: spin .7s linear infinite; }
.btn-ghost.is-busy::after { border-color: var(--border-strong); border-top-color: var(--primary); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; border: 1px solid transparent; background: transparent;
  color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--neutral-soft); color: var(--text); }
.quick-actions .btn { height: 36px; }

/* -- badges ------------------------------------------------------------------------------------ */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.5;
  white-space: nowrap; background: var(--neutral-soft); color: var(--text-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-muted { background: var(--neutral-soft); color: var(--text-2); }

/* -- forms -------------------------------------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.span-2 { grid-column: span 2; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
input, select, textarea { font: 14px/1.4 var(--font); color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 8px 10px; min-height: 38px; width: 100%; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--brand-ring); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--danger); }
.filters { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.filters .field { width: 170px; }
.filters .field.grow { flex: 1 1 240px; width: auto; }
.filters .btn { height: 38px; }
.filter-actions { display: flex; gap: 8px; margin-left: auto; }

/* -- alerts, notes ----------------------------------------------------------------------------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13.5px; border: 1px solid transparent; }
.alert .icon { margin-top: 1px; }
.alert-danger { background: var(--danger-soft); color: #7a1a12; border-color: #f5c6c1; }
.alert-info { background: var(--info-soft); color: #173f6d; border-color: #c9dbf1; margin-bottom: 4px; }
.alert-warning { background: var(--warning-soft); color: #6b4000; border-color: #f2d9a6; }
.note { font-size: 12.5px; color: var(--text-2); margin: 0 0 10px; display: flex; gap: 7px; }
.note .icon { width: 15px; height: 15px; margin-top: 2px; color: var(--muted); }

/* -- tables -------------------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th { position: sticky; top: 0; background: var(--surface-2); text-align: left; font-size: 12px; font-weight: 700; color: var(--text-2);
  text-transform: uppercase; letter-spacing: .03em; padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: #fafbfc; }
table.data tr.clickable { cursor: pointer; }
table.data tfoot td { background: var(--surface-2); font-weight: 700; border-top: 2px solid var(--border-strong); border-bottom: none; }
table.data td.wrap { min-width: 220px; max-width: 460px; }
table.data .sub { display: block; color: var(--muted); font-size: 12px; }
.row-voided td { color: var(--muted); }
.row-voided td:not(:has(.badge)) { text-decoration: line-through; text-decoration-color: rgba(123, 135, 149, .5); }
.cell-actions { display: flex; gap: 6px; justify-content: flex-end; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: var(--text-2); }
.pager-controls { display: flex; align-items: center; gap: 6px; }
.pager select { width: auto; min-height: 32px; padding: 4px 8px; }
.summary-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.summary-item { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; min-width: 130px; }
.summary-item span { display: block; font-size: 12px; color: var(--text-2); font-weight: 600; }
.summary-item strong { font-size: 17px; font-variant-numeric: tabular-nums; }

/* -- empty / loading / error states ------------------------------------------------------------ */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-2); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-state h2, .empty-state h3 { color: var(--text); font-size: 17px; }
.empty-state p { max-width: 520px; margin: 0 0 8px; }
.state { padding: 34px 16px; text-align: center; color: var(--text-2); font-size: 14px; }
.state strong { display: block; color: var(--text); margin-bottom: 4px; }
.state-error { color: var(--danger); }
.skeleton { background: linear-gradient(90deg, #eef1f4 0%, #f7f9fa 50%, #eef1f4 100%); background-size: 200% 100%; animation: shimmer 1.3s ease-in-out infinite;
  border-radius: var(--radius); border-color: transparent; }
.skeleton.line { height: 38px; margin-bottom: 8px; border-radius: var(--radius-sm); }
.chart-skeleton { height: 220px; }
.spinner { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--primary);
  animation: spin .7s linear infinite; vertical-align: middle; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* -- feeds (recent lists) ------------------------------------------------------------------------ */
.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.feed-item:last-child { border-bottom: none; }
.feed-main { min-width: 0; }
.feed-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.feed-main span { color: var(--muted); font-size: 12.5px; }
.feed-side { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.feed-side span { display: block; color: var(--muted); font-size: 12px; }
.feed-empty { color: var(--muted); font-size: 13.5px; padding: 16px 0; }

/* -- chart ---------------------------------------------------------------------------------------- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: 240px; overflow: visible; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis-label { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .bar { fill: var(--series-1); }
.chart .bar-hit { fill: transparent; cursor: default; }
.chart .bar-group:hover .bar, .chart .bar-group:focus .bar { fill: var(--primary-hover); }
.chart .bar-group:focus { outline: none; }
.chart-tip { position: absolute; pointer-events: none; background: #17212b; color: #fff; font-size: 12.5px; padding: 6px 9px; border-radius: 6px;
  white-space: nowrap; transform: translate(-50%, -100%); box-shadow: var(--shadow-lg); }
.chart-tip strong { display: block; font-variant-numeric: tabular-nums; }
.chart-foot { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-2); margin-top: 6px; }

/* -- reports ---------------------------------------------------------------------------------------- */
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.report-tile { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.report-tile:hover { border-color: var(--primary); box-shadow: 0 4px 14px rgba(234, 106, 28, .12); }
.report-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; background: var(--primary-soft); color: var(--primary); }
.report-text { display: flex; flex-direction: column; gap: 3px; }
.report-text strong { font-size: 15.5px; }
.report-text span { color: var(--text-2); font-size: 13.5px; }
.report-tags { display: flex; gap: 6px; margin-top: auto; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 24px; margin: 0; }
.kv div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; font-weight: 600; text-align: right; }

/* -- dialogs ------------------------------------------------------------------------------------------ */
.modal { border: none; border-radius: 12px; padding: 0; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: var(--shadow-lg); color: var(--text); }
.modal-sm { width: min(430px, calc(100vw - 24px)); }
.modal-lg { width: min(980px, calc(100vw - 24px)); }
.modal::backdrop { background: rgba(10, 20, 25, .5); }
.modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.modal-title { font-size: 18px; }
.modal-text { margin: 0; color: var(--text-2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; flex-wrap: wrap; }

/* -- picker (search + choose) ------------------------------------------------------------------------ */
.picker { position: relative; }
.picker-results { list-style: none; margin: 0; padding: 4px; position: absolute; left: 0; right: 0; top: 100%; margin-top: 2px; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); max-height: 260px; overflow-y: auto; z-index: 5; }
.picker-results li { padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 13.5px; }
.picker-results li[aria-selected="true"], .picker-results li:hover { background: var(--primary-soft); }
.picker-results li .sub { display: block; color: var(--muted); font-size: 12px; }
.picker-results li.picker-empty { cursor: default; color: var(--muted); }
.picker-chosen:empty { display: none; }
.picker-chosen { margin: 2px 0 0; font-size: 13px; }

/* -- toasts --------------------------------------------------------------------------------------- */
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 100; max-width: min(420px, calc(100vw - 36px)); }
.toast { background: #17212b; color: #fff; padding: 11px 14px; border-radius: 8px; box-shadow: var(--shadow-lg); font-size: 13.5px; display: flex; gap: 9px;
  align-items: flex-start; border-left: 4px solid var(--brand); animation: toast-in .18s ease-out; }
.toast-danger { border-left-color: #f47066; }
.toast-warning { border-left-color: #f5b83d; }
@keyframes toast-in { from { transform: translateY(6px); opacity: 0; } }

/* -- login ---------------------------------------------------------------------------------------- */
.login-body { background: var(--bg); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px 16px; }
.login-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--brand); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 28px 26px; }
.login-brand { display: flex; justify-content: center; margin-bottom: 22px; }
.login-logo { width: 170px; height: auto; }
.login-foot { margin: 16px 0 0; color: var(--muted); font-size: 12.5px; text-align: center; }

/* -- responsive ------------------------------------------------------------------------------------ */
@media (max-width: 1180px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 960px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .icon-btn.menu-btn { display: inline-grid; }
  .content { padding: 18px 16px 40px; }
  .topbar { padding: 10px 16px; }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .user-meta, #logout-btn span { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .filters .field { width: calc(50% - 6px); }
  .filters .field.grow { flex-basis: 100%; }
  .stat-value { font-size: 22px; }
  .page-title { font-size: 19px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { min-height: 88px; padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  .sidebar, .topbar, .actions, .filters, .pager, .toasts, .quick-actions { display: none !important; }
  .content { padding: 0; }
  body { background: #fff; }
  .card, .stat { box-shadow: none; }
}

/* -- point of sale ------------------------------------------------------------------------------------ */
.pos { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, 1fr); gap: 18px; align-items: start; }
.pos > .card { margin-top: 0; }
.pos-cart { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 12px; }
.search-box { position: relative; display: flex; align-items: center; }
.search-box .icon { position: absolute; left: 12px; color: var(--muted); }
.search-box input { height: 48px; padding-left: 40px; padding-right: 48px; font-size: 16px; }
.search-box kbd { position: absolute; right: 10px; }
kbd { display: inline-block; font: 600 11px/1 var(--mono); padding: 3px 6px; border-radius: 5px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text-2); }
.btn kbd { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .35); color: inherit; }
.keys { font-size: 12.5px; margin: 6px 0 10px; }
.pos-results { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); max-height: 340px; overflow-y: auto; }
.pos-result { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.pos-result:last-child { border-bottom: none; }
.pos-result[aria-selected="true"] { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.pos-result:hover { background: #fff7f1; }
.pos-result.unavailable { color: var(--muted); }
.pr-main, .pr-side { display: flex; flex-direction: column; min-width: 0; }
.pr-main span, .pr-side span { font-size: 12.5px; color: var(--muted); }
.pr-side { text-align: right; align-items: flex-end; white-space: nowrap; }
.pos-empty { padding: 14px 12px; color: var(--muted); font-size: 13.5px; }
.pos-product { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.pos-product-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.pos-product-head h3 { font-size: 18px; }
.pos-product-head .muted { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pp-price { text-align: right; }
.pp-price span { display: block; font-size: 12px; color: var(--text-2); font-weight: 600; }
.pp-price strong { font-size: 24px; font-variant-numeric: tabular-nums; }
.pp-batches { max-height: 190px; overflow-y: auto; }
table.data.compact th, table.data.compact td { padding: 6px 10px; }
.row-muted td { color: var(--muted); }
.pp-add { display: flex; gap: 10px; align-items: flex-end; }
.pp-add .field { width: 130px; }
.pp-add input { height: 44px; font-size: 16px; }
.pp-add .btn { height: 44px; flex: 1; }
.cart-lines { display: flex; flex-direction: column; max-height: 42vh; overflow-y: auto; }
.cart-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 10px; color: var(--muted); text-align: center; }
.cart-empty strong { color: var(--text); }
.cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.cl-main { display: flex; flex-direction: column; min-width: 0; }
.cl-main strong { overflow: hidden; text-overflow: ellipsis; }
.cl-batch { font-size: 12px; color: var(--muted); }
.cl-warn { font-size: 12px; color: var(--warning); display: flex; gap: 4px; align-items: center; }
.cl-warn .icon { width: 14px; height: 14px; }
.cl-qty { display: flex; align-items: center; gap: 2px; }
.cl-qty .icon-btn { width: 30px; height: 30px; font-size: 18px; border: 1px solid var(--border-strong); }
.qty-input { width: 58px; min-height: 32px; padding: 4px 6px; text-align: center; }
.cl-sub { min-width: 82px; }
.pos-totals { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border); padding-top: 12px; }
.pos-totals .row { display: flex; justify-content: space-between; align-items: baseline; font-variant-numeric: tabular-nums; }
.pos-totals .total strong { font-size: 30px; letter-spacing: -.01em; }
.pos-totals .change strong { font-size: 20px; color: var(--success); }
.cash-field input { height: 46px; font-size: 20px; text-align: right; font-variant-numeric: tabular-nums; }
.cash-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-checkout { height: 54px; font-size: 17px; gap: 10px; }
.receipt-ok { display: flex; align-items: center; gap: 10px; color: var(--success); }
.receipt-ok .icon { width: 26px; height: 26px; }
.rc-head { display: flex; flex-direction: column; margin: 0 0 8px; }
.rc-head span { color: var(--text-2); font-size: 13px; }
.rc-totals { margin: 10px 0 0; }
.rc-totals div { display: flex; justify-content: space-between; padding: 3px 0; font-variant-numeric: tabular-nums; }
.rc-totals dd { margin: 0; font-weight: 600; }
.rc-totals .grand { font-size: 18px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
@media (max-width: 1100px) { .pos { grid-template-columns: 1fr; } .pos-cart { position: static; } }
@media (max-width: 640px) {
  .cart-line { grid-template-columns: minmax(0, 1fr) auto auto; row-gap: 6px; }
  .cl-main { grid-column: 1 / -1; }
  .cl-qty { grid-column: 1; }
  .pos-product-head { flex-direction: column; }
  .pp-price { text-align: left; }
}

/* -- attendance & payroll (Phase 10) ------------------------------------------------------------------ */
.subnav { display: flex; gap: 4px; flex-wrap: wrap; margin: -6px 0 16px; border-bottom: 1px solid var(--border); }
.subnav a { padding: 9px 14px; color: var(--text-2); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subnav a:hover { color: var(--text); }
.subnav a.active { color: var(--primary); border-bottom-color: var(--primary); }
.att-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-head { font-size: 12px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; text-align: center; padding: 4px 0; }
.cal-day { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 92px; padding: 8px; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; font: inherit; color: inherit; }
.cal-day:hover:not(:disabled) { border-color: var(--primary); box-shadow: 0 0 0 3px var(--brand-ring); }
.cal-day:disabled { cursor: not-allowed; background: var(--surface-2); }
.cal-day.today { border-color: var(--primary); }
.cal-num { font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-hol { font-size: 11.5px; color: #6b4000; background: var(--warning-soft); border-radius: 5px; padding: 1px 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-empty { color: var(--muted); }
.cal-note { font-size: 11.5px; color: var(--text-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-choice { border: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.status-choice label { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer; }
.status-choice label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.status-choice input { width: auto; min-height: 0; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.check input { width: auto; min-height: 0; }
@media (max-width: 640px) {
  .calendar { gap: 3px; }
  .cal-day { min-height: 64px; padding: 5px; }
  .cal-day .badge { font-size: 10px; padding: 1px 5px; }
  .cal-day .badge::before, .cal-hol, .cal-note { display: none; }
}
