/* Inventory site: the inventory page from the clinic prototype, standing on its own (2026-10-15). style.css is the prototype's
   stylesheet unchanged; this file only adds the sign-in page and a few things the standalone shell needs. */
html, body { height: 100%; }
body.site-on { background: var(--bg); }
#app, .stage2 { min-height: 100%; }
.s2-main { width: 100%; }
.inv-signin { display: flex; justify-content: center; padding-top: 10vh; }
.inv-signin-card { width: min(420px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 28px 26px 24px; }
.inv-signin-card .brand { display: flex; align-items: center; gap: 10px; }
.inv-signin-card .brand .mark { width: 34px; height: 34px; display: inline-flex; color: var(--accent); }
.inv-signin-card .brand .mark svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; }
.inv-signin-card .brand b { display: block; font-size: 16px; } .inv-signin-card .brand small { color: var(--muted); }
.inv-signin-card h1 { font-size: 24px; margin: 4px 0 0; }
.inv-signin-card .field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13px; color: var(--muted); }
.inv-signin-card .field input { font: 16px/1.3 var(--font); padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--fg); }
.inv-signin-card button.primary { padding: 12px; font-size: 16px; border-radius: 10px; }
.inv-autherr { color: var(--bad); font-weight: 600; margin: 0; }
.inv-offline { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); background: var(--warn); color: #fff; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 13px; z-index: 50; width: max-content; }
@media (max-width: 560px) { .s2-top { padding: 10px 12px; } .s2-main { padding-left: 12px; padding-right: 12px; } }
/* People (owner): who can sign in */
.people-tbl { width: 100%; margin-bottom: 18px; }
.people-tbl td { vertical-align: middle; }
.people-tbl tr.off td { color: var(--muted); }
.people-tbl input.people-name { font: inherit; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; background: transparent; color: inherit; width: 180px; }
.people-tbl input.people-name:hover, .people-tbl input.people-name:focus { border-color: var(--line); background: var(--panel); outline: none; }
.people-tbl select, .people-add select, .people-add input, .people-tbl form input { font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--fg); }
.people-add { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.people-add h3 { margin: 0; font-size: 15px; }
.people-add .field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.people-add .field input { width: 200px; }
/* How we order it (Draft 2, 2026-10-28): frequency first, amounts derived */
.inv-freq { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; background: var(--panel); }
.inv-freq-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px 14px; }
.inv-freq-row .field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.inv-freq-row select, .inv-freq-row input { font: 16px/1.3 var(--font); padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--fg); }
.inv-freq p { margin: 0; }
.inv-freq-txt { margin: 0; font-size: 14px; }
.inv-freq .chk-field { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.inv-kv-sup dd .chip { margin-left: 4px; }
@media (max-width: 560px) { .inv-freq-row { grid-template-columns: 1fr 1fr; } .inv-freq-row .field:first-child { grid-column: 1 / -1; } }
/* Cards tab: tick to print, NEW tag, made-date filter (Draft 2) */
.inv-card { position: relative; }
.inv-card.picked { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.inv-pick { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 6px; cursor: pointer; }
.inv-pick:hover { background: #eef4f5; }
.inv-pick input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.inv-card b { padding-right: 32px; }
.inv-newtag { position: absolute; top: -9px; left: 10px; background: #c8102e; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .08em; padding: 2px 8px; border-radius: 999px; }
.inv-card.isnew { border-color: #c8102e; }
.inv-made { color: #8a9a9d !important; font-size: 11px !important; }
.inv-cardbar { margin: 8px 0 12px; } .inv-chips.sm { align-items: center; gap: 6px; } .inv-chips.sm .chip { font-size: 12px; padding: 3px 10px; }
/* Cart row choice: colour / flavour drop-down (Draft 2) */
.cart-opt { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.cart-opt select { font: 14px/1.2 var(--font); padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--fg); }
.cart-opt b { color: var(--fg); }
.inv-freq-row .field { min-width: 0; } .inv-freq-row select, .inv-freq-row input { width: 100%; min-width: 0; box-sizing: border-box; }
.inv-sku { margin: 4px 0 0; font-size: 13px; color: var(--muted); } .inv-sku b { color: var(--fg); font-weight: 600; }
.inv-namein { font: 700 22px/1.2 var(--font); color: var(--fg); border: 1px solid transparent; border-radius: 8px; padding: 2px 6px; margin: 0 0 0 -7px; background: transparent; width: 100%; max-width: 420px; }
.inv-namein:hover { border-color: var(--line); } .inv-namein:focus { border-color: var(--accent); outline: none; background: #fff; }
/* On hand counter (Draft 5) */
.inv-onhand { display: grid; grid-template-columns: auto 1fr; gap: 10px 22px; align-items: start; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.inv-oh-ctl { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; }
.inv-oh-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 22px; line-height: 1; color: var(--fg); cursor: pointer; }
.inv-oh-btn:hover { border-color: var(--accent); color: var(--accent); }
.inv-oh-num { width: 86px; height: 40px; text-align: center; font: 700 26px/1 var(--font); border: 1px solid var(--line); border-radius: 10px; color: var(--fg); background: #fff; -moz-appearance: textfield; }
.inv-oh-num::-webkit-outer-spin-button, .inv-oh-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.inv-oh-num:focus { outline: none; border-color: var(--accent); }
.inv-oh-unit { font-size: 13px; color: var(--muted); margin-left: 2px; }
.inv-oh-when { margin: 6px 0 0; }
.inv-oh-right { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.inv-oh-move { display: inline-flex; gap: 6px; align-items: center; } .inv-oh-move input { width: 70px; font: 16px/1.3 var(--font); padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.inv-sku + .row, .inv-onhand + details { margin-top: 2px; }
.mhead .row.gap button.sm { white-space: nowrap; }
@media (max-width: 560px) { .inv-onhand { grid-template-columns: 1fr; } .inv-oh-right { align-items: flex-start; } }
.inv-oh-move span[hidden] { display: none; } .inv-oh-move input { width: 70px; }
.inv-oh-left { display: flex; flex-direction: column; } .inv-oh-left .ccard-h { display: block; }
.inv-hist { margin-bottom: 10px; } .inv-hist .ccard-h { display: block; margin-bottom: 6px; } .inv-hist-old td { color: var(--muted); }
.inv-cardtxt { width: 100%; font: 13px/1.4 var(--font); padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; resize: vertical; box-sizing: border-box; display: block; margin-bottom: 4px; }
.inv-desc { margin-top: 4px; } .inv-desc summary { cursor: pointer; font-size: 13px; color: var(--accent); font-weight: 600; list-style: none; }
.inv-desc summary::-webkit-details-marker { display: none; } .inv-desc .when-open { display: none; } .inv-desc[open] .when-open { display: inline; } .inv-desc[open] .when-closed { display: none; } .inv-desc p { margin: 2px 0 0; }
/* Count stock + running on hand (Draft 12) */
.inv-cnt { width: 70px; font: 16px/1.2 var(--font); padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; text-align: center; }
.inv-onhand.oh-low { border-color: var(--warn); background: #fff8ee; }
/* Cards tab header (redrawn Draft 13) + delivery left-count */
.inv-cards-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.inv-cards-title { margin: 2px 0 0; font-size: 20px; } .inv-ticked { color: var(--accent); }
.inv-cards-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); margin-bottom: 14px; }
.inv-cards-bar .inv-chips { margin: 0; }
.inv-made-sel { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.inv-made-sel select { font: 14px/1.2 var(--font); padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--fg); }
.inv-left { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.inv-left input { font: 18px/1.3 var(--font); padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; width: 140px; }
.inv-addcart { white-space: nowrap; } .inv-addcart .ic { width: 15px; height: 15px; vertical-align: -3px; margin-right: 2px; }
/* Count tab (Draft 15) */
.count-alert { color: #c8102e; font-weight: 600; font-size: 13px; } .count-alert .linkbtn { all: unset; cursor: pointer; text-decoration: underline; color: #c8102e; font-weight: 700; }
.count-alertbox:empty { display: none; } .inv-onhand .count-alertbox { margin-top: 6px; }
.inv-lowq { color: #c8102e; }
/* Inventory report for the accountant (Draft 19) */
.rep-tbl td small { display: block; color: #555; } .rep-cat td { background: #eef2f3; font-weight: 700; text-transform: uppercase; font-size: 8.5pt; letter-spacing: .06em; padding: 5px 6px; }
.rep-tot { font-size: 11pt; margin-top: 10px; border-top: 2px solid #111; padding-top: 6px; }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; } th.sortable:hover { color: var(--accent); } th.sortable.on { color: var(--accent); } .sort-ic { font-size: 10px; opacity: .6; }

/* editable name: must stay editable inside the draggable header on Safari / iPad (user-select: none above it) */
.inv-namewrap { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
.inv-namein, .inv-cardtxt, .inv-oh-num, .inv-cnt { user-select: text; -webkit-user-select: text; touch-action: auto; }
.inv-pen { all: unset; cursor: pointer; display: inline-flex; padding: 4px; border-radius: 6px; color: var(--muted); } .inv-pen:hover { color: var(--accent); background: var(--accent-soft); } .inv-pen .ic { width: 16px; height: 16px; }

/* Delete card (Draft 27) */
.inv-del { color: var(--bad, #b42318); border-color: transparent; } .inv-del:hover { background: #fdecea; }
