/* Alumia Studio Admin — layout on top of the brand variables in styles.css */
[hidden] { display: none !important; } /* ensure hidden attr beats display:flex rules */
.admin-body { background: #f5f2fa; color: var(--ink); }

/* Gate / login */
.admin-gate { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.admin-login { background: var(--a-card); border: 1px solid var(--line); border-radius: 16px; padding: 40px; width: 100%; max-width: 380px; box-shadow: 0 16px 48px rgba(90,40,130,.12); }
.admin-logo { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 500; letter-spacing: .06em; color: var(--ink); }
.admin-logo span { color: var(--gold); }
.admin-gate-msg { font-size: 13px; color: var(--mid-p); margin: 10px 0 22px; }
.admin-gate-msg.err { color: #c0392b; }
.admin-back { display: block; text-align: center; margin-top: 16px; font-size: 12px; color: var(--royal); text-decoration: none; }

/* #555 two-step login (admin-mfa.js) — login screen + Settings card */
.admin-mfa .admin-logo { margin-bottom: 14px; }
.mfa-h { font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 22px; margin: 0 0 8px; color: var(--ink); }
.mfa-p { font-size: 13px; line-height: 1.5; color: var(--mid-p); margin: 0 0 12px; }
.mfa-steps { font-size: 13px; line-height: 1.5; color: var(--ink); margin: 0 0 10px; padding-left: 18px; }
.mfa-qr { display: flex; justify-content: center; margin: 4px 0 12px; }
.mfa-qr img { width: 180px; height: 180px; background: #fff; padding: 8px; border-radius: 10px; border: 1px solid var(--line); }
.mfa-secret { display: block; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; letter-spacing: .06em; word-break: break-all; background: var(--warm); color: var(--ink); border-radius: 8px; padding: 8px 10px; margin: 0 0 14px; user-select: all; }
.admin-mfa .mem-field input[data-mfa="code"] { font-size: 20px; letter-spacing: .3em; text-align: center; }
.mfa-later { display: block; margin: 10px auto 0; }
.mfa-linkbtn { background: none; border: 0; cursor: pointer; width: 100%; font-family: inherit; }
.mfa-table { width: 100%; max-width: 640px; border-collapse: collapse; font-size: 13px; }
.mfa-table th { text-align: left; font-weight: 600; color: var(--mid-p); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.mfa-table td { padding: 8px; border-bottom: 1px solid var(--line); color: var(--ink); }
.mfa-card-enroll { max-width: 380px; margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }

/* App shell */
.admin-app { min-height: 100dvh; }
.admin-top { display: flex; align-items: center; gap: 24px; padding: 14px 28px; background: var(--a-card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.admin-tabs { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.admin-tab { border: none; background: none; padding: 9px 16px; border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 500; color: var(--mid-p); }
.admin-tab:hover { background: var(--warm); }
.admin-tab.active { background: var(--royal); color: #fff; }
.tab-count { background: var(--gold); color: #fff; border-radius: 100px; font-size: 10px; padding: 1px 7px; margin-left: 4px; }
.admin-tab.active .tab-count { background: rgba(255,255,255,.25); }
.admin-user { display: flex; align-items: center; gap: 16px; }
.admin-user a { font-size: 12px; color: var(--royal); text-decoration: none; }
.admin-logout { padding: 8px 16px; font-size: 11px; }
.admin-main { max-width: 1200px; margin: 0 auto; padding: 28px; }

/* Panels */
.panel-hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.panel-hd h2 { font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 28px; }
.admin-notice { background: #fff7e6; border: 1px solid #f0d9a8; color: #8a6d1f; padding: 12px 16px; border-radius: 10px; font-size: 13px; margin-bottom: 20px; }

/* Data table / cards */
.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; background: var(--a-card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.admin-row img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: var(--warm); }
.admin-row .r-name { font-weight: 500; font-size: 15px; }
.admin-row .r-sub { font-size: 12px; color: var(--mid-p); margin-top: 2px; }
.admin-row .r-actions { display: flex; gap: 8px; }
.pill { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; padding: 3px 9px; border-radius: 100px; }
.pill-on { background: #e8f5e9; color: #2e7d32; } .pill-off { background: #fdecea; color: #c0392b; }
.pill-live { background: #e8f5e9; color: #2e7d32; } .pill-hidden { background: #eceaf0; color: #6b6580; }
.pill-metal { background: var(--warm, #f9f5ee); color: var(--royal); }
.admin-row--hidden { opacity: .6; } .admin-row--hidden:hover { opacity: 1; }
/* #2 — first info row laid out in fixed columns so metal + flags line up
   vertically down the list instead of "terracing" behind each name. */
.r-name.r-name--cols { display: grid; grid-template-columns: 240px 160px 1fr; align-items: center; gap: 12px; }
.r-name--cols .rn-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-name--cols .rn-metal { min-width: 0; }
.r-name--cols .rn-metal .pill { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.r-name--cols .rn-flags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.badge-active:has(input:checked) { background: #e8f5e9; border-color: #8ec99a; color: #2e7d32; }
@media (max-width: 760px) { .r-name.r-name--cols { display: flex; flex-wrap: wrap; gap: 8px; } .r-name--cols .rn-title { white-space: normal; } }
.pill-feat { background: rgba(184,145,58,.15); color: var(--gold); }
.pill-new { background: #fdecea; color: #c0392b; } .pill-read { background: var(--warm); color: var(--mid-p); } .pill-responded { background: #e8f5e9; color: #2e7d32; }
.btn-sm { padding: 7px 14px; font-size: 11px; }
.link-btn { background: none; border: none; color: var(--royal); cursor: pointer; font-size: 12px; text-decoration: underline; }
.link-danger { color: #c0392b; }

/* Drawer editor */
.admin-veil { position: fixed; inset: 0; background: rgba(30,13,54,.5); z-index: 40; }
.admin-drawer { position: fixed; top: 0; right: 0; width: clamp(560px, 58vw, 1100px); height: 100dvh; background: var(--a-card); z-index: 41; display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(30,13,54,.2); }
@media (max-width: 640px) { .admin-drawer { width: 100%; } }

/* Metals grid — aligned price/qty columns, name truncates instead of wrapping */
.rv-replyline { color: #B8913A; }
.rv-replybox { grid-column: 1 / -1; margin: 8px 0 4px; }
.rv-replybox textarea { width: 100%; font: inherit; font-size: 13px; padding: 8px 10px; border: 1px solid var(--line, #E2D8F0); border-radius: 6px; resize: vertical; }
.rv-replyacts { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.rv-nothumb { width: 56px; height: 56px; border-radius: var(--r, 6px); background: var(--warm, #F2EBF8); color: #B8913A; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.metal-row { display: grid; grid-template-columns: minmax(0, 1fr) 112px 88px 150px; gap: 10px; align-items: center; margin: 6px 0; }
.metal-row textarea[data-vmaterials] { grid-column: 1 / -1; min-height: 44px; font-size: 12.5px; margin: 0 0 8px; resize: vertical; }
.metal-row textarea[data-vmaterials]:disabled { display: none; }
.metal-sku-cell input { text-transform: uppercase; }
.metal-name { min-width: 0; }
.metal-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.metal-cell { display: flex; align-items: center; gap: 5px; }
.metal-cell input { width: 100%; padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; }
.metal-cell input:disabled { background: #f5f2fa; color: #b9adcb; }
@media (max-width: 560px) { .metal-row { grid-template-columns: 1fr; gap: 4px; } }

/* Per-metal photo sections */
.photo-sec { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.photo-sec.placeholder { background: #faf8fd; border-style: dashed; }
.photo-sec-h { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--royal); margin-bottom: 8px; }
.drawer-hd { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.drawer-hd h3 { font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 24px; }
.drawer-x { border: none; background: none; font-size: 18px; cursor: pointer; color: var(--mid-p); }
.drawer-bd { padding: 24px; overflow-y: auto; flex: 1; }

/* Form fields */
.fld { margin-bottom: 16px; }
.fld label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--ink); margin-bottom: 6px; }
.fld input[type=text], .fld input[type=number], .fld input[type=email], .fld input[type=url], .fld input[type=date], .fld textarea, .fld select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 14px; background: var(--a-card); color: var(--ink); }
.fld textarea { min-height: 90px; resize: vertical; }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check { font-size: 12px; border: 1px solid var(--line); border-radius: 100px; padding: 6px 12px; cursor: pointer; display: flex; gap: 6px; align-items: center; }
.chip-check input { margin: 0; }
.thumbs-edit { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.thumb-edit { position: relative; width: 78px; cursor: grab; }
.thumb-edit.dragging { opacity: .35; }
.thumb-edit.dragover { outline: 2px dashed var(--gold); outline-offset: 2px; border-radius: 8px; }
.thumb-edit img, .thumb-edit video { width: 78px; height: 78px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.thumb-edit button[data-img], .thumb-edit button[data-wsdel] { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: none; background: #c0392b; color: #fff; cursor: pointer; font-size: 11px; line-height: 1; }
.thumb-cover { position: absolute; top: 3px; left: 3px; background: var(--gold); color: #fff; font-size: 8px; font-weight: 700; letter-spacing: .12em; padding: 2px 5px; border-radius: 5px; pointer-events: none; }
.thumb-loop { position: absolute; bottom: 28px; right: 3px; border: none; background: rgba(30,13,54,.78); color: #fff; font-size: 9px; padding: 2px 6px; border-radius: 6px; cursor: pointer; }
.thumb-hint { flex-basis: 100%; font-size: 11px; color: var(--mid-p); }
/* #566 Workshops photo strip: same 78px square tiles as Products, plus ◀ ▶ (drag is fiddly on a trackpad) */
.ws-photos { margin-bottom: 0; }
.thumb-eb { position: absolute; bottom: 30px; left: 3px; background: rgba(30,13,54,.78); color: #fff; font-size: 7.5px; font-weight: 700; letter-spacing: .08em; padding: 2px 4px; border-radius: 5px; pointer-events: none; }
.thumb-move { display: flex; gap: 4px; margin-top: 4px; }
.thumb-move button { flex: 1; height: 22px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--a-card); color: var(--royal); font-size: 10px; line-height: 1; cursor: pointer; }
.thumb-move button:hover:not(:disabled) { border-color: var(--gold); }
.thumb-move button:disabled { opacity: .35; cursor: default; }
/* drag & drop upload zone */
.photo-drop { display: block; border: 2px dashed var(--line); border-radius: 10px; padding: 13px; text-align: center; font-size: 12px; color: var(--mid-p); cursor: pointer; margin-top: 8px; transition: border-color .15s, background .15s; }
.photo-drop:hover, .photo-sec.drophot .photo-drop { border-color: var(--gold); background: rgba(184,145,58,.06); }
.photo-sec.drophot { outline: 2px dashed var(--gold); outline-offset: 3px; border-radius: 10px; }
/* ✂ Loop editor */
.loop-ed-veil { position: fixed; inset: 0; background: rgba(30,13,54,.55); z-index: 220; display: flex; align-items: center; justify-content: center; padding: 20px; }
.loop-ed { background: var(--a-card, #fff); border-radius: 14px; padding: 20px 20px 16px; max-width: 520px; width: 100%; position: relative; box-shadow: 0 24px 70px rgba(30,13,54,.4); }
.loop-ed h4 { margin: 0 0 4px; font-size: 15px; }
.loop-ed video { width: 100%; border-radius: 10px; margin: 10px 0 6px; max-height: 300px; background: #000; }
.loop-ed-row { display: flex; gap: 10px; align-items: center; margin: 8px 0; font-size: 12.5px; }
.loop-ed-row label { display: flex; gap: 6px; align-items: center; font-weight: 600; }
.loop-ed-row input { width: 84px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.loop-ed-x { position: absolute; top: 8px; right: 12px; border: none; background: none; font-size: 22px; cursor: pointer; color: var(--mid-p); line-height: 1; }
.loop-ed-actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
/* #6/#7 — per-photo stone tag + option editors (2026-07-10 rework: aligned
   grid columns under real headers — the stone name finally has room). */
.thumb-stone { width: 78px; margin-top: 4px; font-size: 10px; padding: 3px 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--a-card); }
/* Custom Works photo cells (#pf_thumbs): wider than product thumbs so each
   caption gets a full-width auto-growing box with no overlap or clipping. */
#pf_thumbs { gap: 16px; }
#pf_thumbs .thumb-edit { width: 210px; cursor: default; }
#pf_thumbs .thumb-edit img, #pf_thumbs .thumb-edit video { width: 210px; height: 158px; cursor: grab; }
.thumb-cap { display: block; box-sizing: border-box; width: 100%; margin-top: 7px; font-family: inherit; font-size: 11.5px; line-height: 1.45; font-weight: 400; color: var(--a-ink, #2b2540); padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--a-card); resize: none; overflow: hidden; min-height: 44px; }
.thumb-cap:focus { outline: 2px solid var(--gold); outline-offset: -1px; }
.thumb-kind { display: block; box-sizing: border-box; width: 100%; margin-top: 6px; font-size: 11px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--a-card); }
.opt-headers { display: grid; gap: 8px; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--mid-p); margin: 4px 0 6px; }
.opt-headers--stone, .stone-opt-row { grid-template-columns: minmax(140px,1fr) 72px 128px 56px 96px 28px; }
.sku-in { text-transform: uppercase; }
.opt-headers--size, .size-opt-row { grid-template-columns: 140px minmax(150px,1fr) 74px 66px 130px 28px; }
.opt-headers--chain, .chain-opt-row { grid-template-columns: minmax(200px,1fr) minmax(170px,1fr) 84px 90px 28px; }
.opt-headers--length, .length-opt-row { grid-template-columns: 120px 120px 160px 28px; }
.stone-opt-row, .size-opt-row, .chain-opt-row, .length-opt-row { display: grid; gap: 8px; align-items: start; margin-bottom: 8px; }
.length-opt-row .lo-del { font-size: 14px; align-self: center; }
.chain-opt-row .ch-auto { font-size: 11.5px; line-height: 1.35; align-self: center; }
.stone-opt-row input, .stone-opt-row select, .size-opt-row input, .size-opt-row select, .chain-opt-row input, .chain-opt-row select, .length-opt-row input {
  padding: 8px 8px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 12px; width: 100%; box-sizing: border-box; }
.stone-opt-row .so-del, .size-opt-row .sz-del, .chain-opt-row .ch-del { font-size: 14px; align-self: center; }
.sz-sizes-wrap { min-width: 0; }
.sz-err { font-size: 11px; color: #c0392b; margin-top: 3px; }
.ch-inc-lbl { justify-content: center; align-self: center; padding: 6px 8px; }
/* chain rows: the readout column is tall, so every cell hangs from the top line (Nick 2026-09-24) */
.chain-opt-row > * { align-self: start; }
.chain-opt-row .ch-del { margin-top: 10px; }
/* Finish option rows (like stones, dropdown name) */
.opt-headers--finish, .finish-opt-row { grid-template-columns: minmax(140px,1fr) 66px 120px 54px 88px 28px; }
.finish-opt-row { display: grid; gap: 8px; align-items: start; margin-bottom: 8px; }
.finish-opt-row input, .finish-opt-row select { padding: 8px 8px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 12px; width: 100%; box-sizing: border-box; }
.finish-opt-row .fo-del { font-size: 14px; align-self: center; }
.thumb-finish { width: 78px; margin-top: 3px; font-size: 9px; padding: 2px 3px; border: 1px solid var(--line); border-radius: 6px; background: var(--a-card); }
/* smaller stone/finish tag text so long names aren't cut off (Nick 2026-07-11).
   !important needed: '.fld select' (14px) is more specific and would win. */
.thumb-stone, .thumb-finish, .thumb-aud { font-size: 9px !important; padding: 2px 3px !important; }
.thumb-aud { width: 78px; margin-top: 3px; border: 1px solid var(--line); border-radius: 6px; background: var(--a-card); }
/* rings track stock by SIZE — hide the metal grid's qty column */
#f_metalgrid.rings-mode .metal-qty-cell { display: none; }
.sz-qty { text-align: center; }
/* Listing preview (inset full-size popup, like Find Your Inspiration) */
.lp-veil { position: fixed; inset: 0; background: rgba(30,13,54,.55); z-index: 240; display: flex; align-items: center; justify-content: center; padding: 24px; }
.lp-frame { background: #fff; border-radius: 16px; width: 100%; max-width: 1100px; height: 88vh; position: relative; box-shadow: 0 30px 90px rgba(30,13,54,.5); overflow: hidden; display: flex; flex-direction: column; }
.lp-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--warm, #f9f5ee); }
.lp-bar b { font-size: 13px; }
.lp-bar .lp-x { margin-left: auto; border: none; background: none; font-size: 24px; cursor: pointer; color: var(--mid-p); line-height: 1; }
.lp-frame iframe { flex: 1; width: 100%; border: none; }
.lp-dev { display: inline-flex; gap: 4px; }
.lp-dev button { border: 1px solid var(--line); background: #fff; border-radius: 7px; font-size: 11px; padding: 4px 9px; cursor: pointer; }
.lp-dev button.on { border-color: var(--gold); color: var(--gold2, #8a6d2f); font-weight: 600; }
.link-preview { color: var(--royal); }
.thumb-hero { position: absolute; top: 3px; right: 22px; font-size: 11px; pointer-events: none; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }

/* 🖼 Hero image picker */
.heropick-veil { position: fixed; inset: 0; background: rgba(30,13,54,.55); z-index: 230; display: flex; align-items: center; justify-content: center; padding: 20px; }
.heropick { background: var(--a-card, #fff); border-radius: 14px; padding: 20px; max-width: 560px; width: 100%; position: relative; box-shadow: 0 24px 70px rgba(30,13,54,.4); max-height: 86vh; overflow-y: auto; }
.heropick h4 { margin: 0 0 2px; font-size: 15px; }
.heropick-x { position: absolute; top: 8px; right: 12px; border: none; background: none; font-size: 22px; cursor: pointer; color: var(--mid-p); line-height: 1; }
.heropick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.heropick-cell { position: relative; border-radius: 10px; overflow: hidden; cursor: pointer; border: 2px solid transparent; }
.heropick-cell img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.heropick-check { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.85); color: transparent; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; transition: all .15s; }
.heropick-cell.sel { border-color: var(--gold); }
.heropick-cell.sel .heropick-check { background: var(--gold); color: #fff; }
/* Add-a-metal control in the product editor (#3) */
.metal-add { display: flex; gap: 8px; margin-top: 8px; }
.metal-add input { flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
/* Meanings tab (#9) — cards + the two-step piece/photo picker */
.meaning-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.ma-card { text-align: left; background: var(--a-card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; padding: 0; transition: border-color .15s, box-shadow .15s; }
.ma-card:hover:not(:disabled) { border-color: var(--gold); box-shadow: 0 6px 20px rgba(184,145,58,.14); }
.ma-card:disabled { opacity: .5; cursor: default; }
.ma-photo { position: relative; aspect-ratio: 4/3; background: var(--warm); }
.ma-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ma-photo-blank { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--mid-p); font-size: 12px; }
.ma-photo--round { aspect-ratio: 1; }
.ma-photo--round img { border-radius: 50%; width: 72%; height: 72%; margin: 14%; object-fit: cover; border: 1px solid var(--line); }
.ma-icon { position: absolute; top: 8px; left: 8px; font-size: 20px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.4)); }
.ma-body { padding: 10px 12px; }
.ma-name { font-weight: 600; font-size: 14px; color: var(--ink); }
.ma-sub { font-size: 11.5px; color: var(--mid-p); margin-top: 2px; }
.mpick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; max-height: 52vh; overflow: auto; }
.mpick-cell { border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--warm); }
.mpick-cell:hover { border-color: var(--gold); }
.mpick-cell img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.mpick-name { display: block; font-size: 11px; padding: 5px 7px; color: var(--ink); line-height: 1.3; }

/* Pre-order page controls (Products panel) */
.po-admin { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 0 0 14px; background: var(--warm, #f9f5ee); }
.po-admin-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; font-size: 14px; flex-wrap: wrap; }
.po-admin-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.po-slot { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mid-p); }
.po-slot select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 13px; }

/* master/branch catalogue rows */
.admin-row--master { cursor: pointer; background: var(--warm, #f9f5ee); border: 1px solid var(--line); }
.admin-row--master:hover { border-color: var(--gold); }
.admin-row--branch { margin-left: 34px; border-left: 3px solid var(--line); }
.master-chev { display: inline-block; font-size: 16px; font-weight: 700; color: var(--gold); transition: transform .22s ease; margin-right: 2px; }
.master-chev.open { transform: rotate(90deg); }
.pill-master { background: var(--royal, #4b2e83); color: #fff; }
.pill-photo { background: #fff3d6; color: #8a6d2f; border: 1px solid #e8d5a4; }
/* B8 — the 🔔 waiting badge is a BUTTON (it opens that piece’s waiting list),
   so it needs the browser button chrome stripped back to pill shape. Colour
   comes from pill-off / pill-photo depending on whether stock is back. */
.pill-wait { font-family: inherit; font-weight: 600; border: 0; cursor: pointer; line-height: 1.5; }
.pill-wait.pill-photo { border: 1px solid #e8d5a4; }
.pill-wait:hover { filter: brightness(.95); }
.pill-wait:focus-visible { outline: 2px solid var(--gold, #B8913A); outline-offset: 2px; }
.drawer-actions { display: flex; gap: 10px; margin-top: 20px; }
.msg { font-size: 13px; margin-top: 10px; min-height: 1em; }
.msg.ok { color: #2e7d32; } .msg.err { color: #c0392b; }
.muted { color: var(--mid-p); font-size: 13px; }

@media (max-width: 720px) {
  .admin-top { flex-wrap: wrap; }
  .fld-row { grid-template-columns: 1fr; }
  .admin-row { grid-template-columns: 44px 1fr; }
  .admin-row .r-actions { grid-column: 1 / -1; }
}

/* AD1 — products toolbar (search / sort / filter / count) */
.prod-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 14px; }
.prod-toolbar input[type="search"] { flex: 1; min-width: 160px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; font-family: inherit; }
.prod-toolbar select { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; font-family: inherit; background: var(--a-card); min-height: 40px; }
.prod-count { font-size: 12px; color: var(--mid-p); white-space: nowrap; margin-left: auto; }

/* AD2 — inline badge/featured toggles on product rows */
.r-toggles { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 7px; }
.badge-toggle { border: 1px solid var(--line); background: var(--a-card); border-radius: 14px; padding: 4px 12px; font-size: 11px; cursor: pointer; color: var(--mid-p); font-family: inherit; min-height: 28px; }
.badge-toggle.on { background: var(--royal); border-color: var(--royal); color: #fff; }
.badge-toggle.on[data-badge="New"] { background: #B8913A; border-color: #B8913A; }
.badge-toggle-lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--mid-p); cursor: pointer; border: 1px solid var(--line); border-radius: 14px; padding: 4px 12px; min-height: 28px; }
.badge-toggle-lbl:has(input:checked) { background: var(--gold-bg, rgba(184,145,58,.15)); border-color: var(--gold); color: var(--gold); }
.tg-saved { font-size: 11px; font-weight: 600; }

/* Connections deep-links grid */
.conn-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:8px}
.conn-link{display:flex;justify-content:space-between;align-items:center;gap:8px;border:1px solid var(--line);border-radius:8px;padding:11px 14px;font-size:13px;color:var(--ink);text-decoration:none;background:var(--a-card);transition:border-color .15s,background .15s}
.conn-link:hover{border-color:var(--gold);background:var(--warm)}
.conn-link span{color:var(--mid-p)}

/* inquiry workflow: formatted details + note + reply */
.inq-details{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:4px 16px;margin-top:8px;padding:10px 12px;background:#F7F3EC;border-radius:8px}
.inq-d{font-size:12px;color:var(--mid-p);display:flex;gap:6px}
.inq-d span{color:#9a8bb5;white-space:nowrap}
.inq-d span::after{content:":"}
.inq-d b{color:var(--ink);font-weight:500}
.inq-note{display:flex;gap:8px;align-items:flex-start;margin-top:10px}
.inq-note textarea{flex:1;min-height:40px;border:1px solid var(--line);border-radius:8px;padding:8px 10px;font-size:12.5px;font-family:inherit;resize:vertical}

/* Returns panel — status checkmarks */
.ret-checks { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.ret-check { font-size: 11.5px; color: var(--mid-p); display: inline-flex; align-items: center; gap: 4px; }
.ret-check.on { color: #2e7d32; font-weight: 600; }

/* Hide the count pill entirely when there is nothing to count (was showing as an empty "dot") */
.tab-count:empty{display:none}

/* ═══════════════════════════════════════════════════════════════════════════
   Owner Dashboard — Phase A: grouped sidebar shell, top bar, themes (#80)
   ═══════════════════════════════════════════════════════════════════════════ */
/* Theme tokens — a theme remaps the surface + accent set; cards use --a-card. */
:root, [data-theme="light"]  { --a-page:#f5f2fa; --a-side:#ffffff; --a-acc:#5A2882; --a-acc-soft:rgba(90,40,130,.10); --a-card:#ffffff; }
/* Dark: also flips the shared brand tokens the admin borrows (text, borders,
   warm) so every surface, not just the chrome, goes dark. */
[data-theme="dark"] {
  --a-page:#14101c; --a-side:#1b1526; --a-acc:#9b8cff; --a-acc-soft:rgba(155,140,255,.16); --a-card:#211a2e;
  --ink:#ece8f4; --mid-p:#b3a9c7; --soft-p:#8f85a5; --line:#332b44; --warm:#271f36; --cream:#211a2e; --royal:#9b8cff; --pale-p:#332b44;
}
[data-theme="dark"] .admin-notice { background:#2a2411; border-color:#4a3f18; color:#e3c766; }
[data-theme="alumia"] { --a-page:#f2ecfb; --a-side:#fbf9ff; --a-acc:#6C5FD0; --a-acc-soft:rgba(108,95,208,.12); }
[data-theme="rose"]   { --a-page:#fbeef2; --a-side:#fff8fa; --a-acc:#B24A6E; --a-acc-soft:rgba(178,74,110,.12); }
[data-theme="blush"]  { --a-page:#fdefea; --a-side:#fff8f5; --a-acc:#C2603F; --a-acc-soft:rgba(194,96,63,.12); }
[data-theme="sky"]    { --a-page:#ecf3fb; --a-side:#f7fbff; --a-acc:#2F6DB0; --a-acc-soft:rgba(47,109,176,.12); }
[data-theme="sage"]   { --a-page:#eef4ec; --a-side:#f8fcf6; --a-acc:#4E7A54; --a-acc-soft:rgba(78,122,84,.12); }
[data-theme="mint"]   { --a-page:#e9f5f0; --a-side:#f6fdfa; --a-acc:#2E8B70; --a-acc-soft:rgba(46,139,112,.12); }
[data-theme="sand"]   { --a-page:#f6f1e8; --a-side:#fdfaf3; --a-acc:#9A7B3F; --a-acc-soft:rgba(154,123,63,.12); }
[data-theme="butter"] { --a-page:#f9f4e3; --a-side:#fffdf4; --a-acc:#A9862A; --a-acc-soft:rgba(169,134,42,.12); }
[data-theme="slate"]  { --a-page:#eef1f4; --a-side:#fafbfc; --a-acc:#4B5A6B; --a-acc-soft:rgba(75,90,107,.12); }
[data-theme="lilac"]  { --a-page:#f4f0fb; --a-side:#fdfbff; --a-acc:#7E5AA8; --a-acc-soft:rgba(126,90,168,.12); }

.admin-body { background: var(--a-page); }

/* Shell */
.admin-shell { display:flex; min-height:100dvh; }
.admin-sidebar { width:236px; flex-shrink:0; background:var(--a-side); border-right:1px solid var(--line); display:flex; flex-direction:column; padding:14px 12px; position:sticky; top:0; height:100dvh; overflow-y:auto; transition:width .18s ease; }
.admin-sidebar::-webkit-scrollbar { width:0; }
.admin-content { flex:1; min-width:0; display:flex; flex-direction:column; }
.admin-topbar { display:flex; align-items:center; gap:14px; padding:12px 24px; background:var(--a-side); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:20; }
.tb-title { font-family:'Cormorant Garamond',serif; font-weight:500; font-size:23px; color:var(--ink); margin:0; }
.tb-right { margin-left:auto; display:flex; align-items:center; gap:14px; }
.tb-link { font-size:12px; color:var(--a-acc); text-decoration:none; }
.tb-icon { width:38px; height:38px; border-radius:9px; border:1px solid var(--line); background:none; cursor:pointer; color:var(--mid-p); font-size:18px; display:inline-flex; align-items:center; justify-content:center; }
.tb-icon:hover { background:var(--warm); color:var(--ink); }
#navToggle { display:none; }
.admin-main { max-width:1180px; margin:0 auto; padding:26px; width:100%; box-sizing:border-box; }

/* Brand + nav */
.nav-brand { display:flex; align-items:center; gap:10px; padding:4px 8px 16px; }
.nav-brand .gem { width:30px; height:30px; border-radius:9px; background:var(--a-acc); color:#fff; display:flex; align-items:center; justify-content:center; font-size:15px; flex-shrink:0; }
.nav-brand .txt { font-family:'Cormorant Garamond',serif; font-size:19px; font-weight:500; letter-spacing:.02em; color:var(--ink); }
.nav-item, .nav-group-hd { display:flex; align-items:center; gap:11px; padding:8px 10px; border-radius:9px; cursor:pointer; font-size:13.5px; color:var(--mid-p); border:none; background:none; width:100%; text-align:left; font-family:inherit; line-height:1.2; }
.nav-item:hover, .nav-group-hd:hover { background:var(--warm); color:var(--ink); }
.nav-item.active { background:var(--a-acc); color:#fff; font-weight:500; }
.nav-ico { width:19px; flex-shrink:0; font-size:18px; display:inline-flex; align-items:center; justify-content:center; }
.nav-chev { margin-left:auto; font-size:15px; color:var(--soft-p); transition:transform .18s ease; }
.nav-group.open > .nav-group-hd .nav-chev { transform:rotate(90deg); }
.nav-sub { display:flex; flex-direction:column; gap:1px; margin:1px 0 3px; }
.nav-group:not(.open) .nav-sub { display:none; }
.nav-sub .nav-item { padding-left:40px; font-size:13px; }
.nav-badge { margin-left:auto; background:var(--a-acc); color:#fff; font-size:10px; font-weight:600; border-radius:100px; padding:1px 7px; min-width:8px; text-align:center; }
.nav-item.active .nav-badge { background:rgba(255,255,255,.3); }
.nav-badge:empty { display:none; }
.nav-spacer { flex:1; }
.nav-bottom { border-top:1px solid var(--line); padding-top:8px; margin-top:8px; display:flex; flex-direction:column; gap:1px; }

/* Collapsed (icons only) */
.admin-shell.collapsed .admin-sidebar { width:64px; }
.admin-shell.collapsed .nav-brand .txt,
.admin-shell.collapsed .lbl,
.admin-shell.collapsed .nav-chev,
.admin-shell.collapsed .nav-badge,
.admin-shell.collapsed .nav-sub { display:none; }
.admin-shell.collapsed .nav-item, .admin-shell.collapsed .nav-group-hd { justify-content:center; padding:9px 0; }
.admin-shell.collapsed .nav-brand { justify-content:center; padding:4px 0 16px; }

/* Themes menu */
.theme-menu { position:fixed; top:60px; right:24px; z-index:60; background:var(--a-card); border:1px solid var(--line); border-radius:14px; box-shadow:0 16px 44px rgba(30,13,54,.18); padding:14px; width:250px; }
.theme-menu h4 { font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--mid-p); margin:0 0 10px; }
.theme-swatches { display:grid; grid-template-columns:repeat(5,1fr); gap:8px; }
.theme-sw { aspect-ratio:1; border-radius:9px; border:2px solid transparent; cursor:pointer; position:relative; }
.theme-sw.active { border-color:var(--ink); }
.theme-sw .dot { position:absolute; inset:0; margin:auto; width:11px; height:11px; border-radius:50%; }
.theme-veil { position:fixed; inset:0; z-index:55; }

/* Dashboard overview */
.dash-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:14px; margin-bottom:22px; }
.dash-metric { background:var(--a-card); border:1px solid var(--line); border-radius:14px; padding:16px 18px; }
.dash-metric .lbl { font-size:12.5px; color:var(--mid-p); }
.dash-metric .val { font-size:28px; font-weight:600; color:var(--ink); margin-top:4px; font-family:'Cormorant Garamond',serif; }
.dash-cols { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.dash-card { background:var(--a-card); border:1px solid var(--line); border-radius:14px; padding:18px; }
.dash-card h3 { font-size:15px; font-weight:600; margin:0 0 12px; color:var(--ink); }
.dash-need { display:flex; align-items:center; gap:11px; padding:10px 0; border-top:1px solid var(--line); cursor:pointer; font-size:13.5px; color:var(--mid-p); }
.dash-need:hover { color:var(--ink); }
.dash-need .n { margin-left:auto; font-weight:600; color:var(--ink); }
.dash-need .chev { color:var(--soft-p); }

/* Mobile: sidebar → off-canvas drawer */
@media (max-width:860px){
  #navToggle { display:inline-flex; }
  .admin-sidebar { position:fixed; left:0; top:0; height:100dvh; z-index:50; transform:translateX(-100%); transition:transform .2s ease; box-shadow:0 0 40px rgba(30,13,54,.25); width:250px; }
  .admin-shell.nav-open .admin-sidebar { transform:none; }
  .admin-shell.nav-open::after { content:''; position:fixed; inset:0; background:rgba(30,13,54,.4); z-index:45; }
  .admin-main { padding:18px 14px; }
  .dash-cols { grid-template-columns:1fr; }
  .tb-link { display:none; }
}

/* ── Communications hub (Phase D): two-pane unified inbox ──────────────────── */
.comms-hub { display:grid; grid-template-columns:320px 1fr; gap:16px; align-items:start; }
.comms-list { background:var(--a-card); border:1px solid var(--line); border-radius:14px; overflow:hidden; }
.comms-filters { padding:12px; border-bottom:1px solid var(--line); }
.comms-seg { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:8px; }
.comms-seg button { border:1px solid var(--line); background:none; border-radius:100px; padding:5px 12px; font-size:12px; cursor:pointer; color:var(--mid-p); font-family:inherit; }
.comms-seg button.active { background:var(--a-acc); color:#fff; border-color:var(--a-acc); }
.comms-filters input { width:100%; padding:8px 10px; border:1px solid var(--line); border-radius:8px; font-size:13px; box-sizing:border-box; }
.comms-threads { max-height:64vh; overflow-y:auto; }
.comms-thread { padding:12px 14px; border-bottom:1px solid var(--line); cursor:pointer; }
.comms-thread:hover { background:var(--warm); }
.comms-thread.active { background:var(--a-acc-soft); }
.comms-thread .ct-top { display:flex; align-items:center; gap:8px; }
.comms-thread .ct-name { font-weight:500; font-size:13.5px; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.comms-thread .ct-date { font-size:11px; color:var(--soft-p); }
.comms-thread .ct-sub { font-size:12px; color:var(--mid-p); margin-top:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* Inbox redesign (2026-07-11): unread bold + dot, needs-reply flag, badges */
.comms-thread.unread { background:rgba(184,145,58,.06); }
.comms-thread.unread .ct-name { font-weight:700; color:var(--ink); }
.comms-thread.unread .ct-name::before { content:'●'; color:var(--gold); font-size:9px; margin-right:6px; vertical-align:1px; }
.comms-thread.unread .ct-sub { color:var(--ink); }
.ct-flag { color:var(--gold2,#8a6d2f); font-weight:600; font-size:11px; }
.seg-badge { display:none; min-width:16px; height:16px; padding:0 4px; margin-left:5px; border-radius:9px; background:#c0392b; color:#fff; font-size:10px; font-weight:700; line-height:16px; text-align:center; vertical-align:1px; }
.comms-seg button.active .seg-badge { background:#fff; color:var(--a-acc); }
.ct-profile { font-size:12px; color:var(--mid-p); margin:0 0 14px; padding:5px 10px; background:var(--warm,#f9f5ee); border-radius:8px; display:inline-block; }
.comms-view { background:var(--a-card); border:1px solid var(--line); border-radius:14px; padding:18px; min-height:320px; }
.comms-empty { color:var(--mid-p); text-align:center; padding:70px 20px; line-height:1.7; }
.comms-msg { border:1px solid var(--line); border-radius:10px; padding:11px 13px; margin-bottom:10px; }
.comms-msg--out { border-left:3px solid var(--a-acc); }
.comms-msg--in { border-left:3px solid var(--royal); background:var(--warm); }
.comms-msg--orig { background:var(--warm); }
.comms-compose textarea { width:100%; border:1px solid var(--line); border-radius:8px; padding:10px; font-family:inherit; font-size:13px; min-height:90px; box-sizing:border-box; }
#commsPreviewFrame { width:100%; height:420px; margin-top:12px; border:1px solid var(--line); border-radius:10px; background:#fff; }
/* Inline discount builder */
.disc-box { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:10px; padding:12px; border:1px dashed var(--a-acc); border-radius:10px; background:var(--warm,#f9f5ee); }
.disc-seg { display:inline-flex; border:1px solid var(--line); border-radius:8px; overflow:hidden; background:#fff; }
.disc-seg button { border:0; background:#fff; padding:7px 12px; font-size:12px; font-weight:600; color:var(--mid-p); cursor:pointer; }
.disc-seg button.active { background:var(--a-acc); color:#fff; }
.disc-box input { width:74px; padding:7px 9px; border:1px solid var(--line); border-radius:8px; font-size:14px; box-sizing:border-box; }
.disc-live { font-size:12px; color:var(--mid-p); font-style:italic; }
@media(max-width:860px){ .comms-hub{ grid-template-columns:1fr; } .comms-view{ display:none; } .comms-hub.viewing .comms-list{ display:none; } .comms-hub.viewing .comms-view{ display:block; } }

/* ── Command palette (⌘K) + toasts (Phase E) ──────────────────────────────── */
.cmd-veil { position:fixed; inset:0; background:rgba(30,13,54,.45); z-index:80; display:flex; align-items:flex-start; justify-content:center; padding-top:13vh; }
.cmd-box { background:var(--a-card); border:1px solid var(--line); border-radius:14px; width:min(520px,92vw); box-shadow:0 24px 64px rgba(30,13,54,.35); overflow:hidden; }
.cmd-box input { width:100%; border:none; border-bottom:1px solid var(--line); padding:16px 18px; font-size:15px; font-family:inherit; background:none; color:var(--ink); outline:none; box-sizing:border-box; }
.cmd-list { max-height:320px; overflow-y:auto; padding:6px; }
.cmd-item { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:8px; font-size:14px; cursor:pointer; color:var(--ink); }
.cmd-item.sel, .cmd-item:hover { background:var(--a-acc-soft); }
.cmd-item i { color:var(--a-acc); font-size:16px; }
.toast-wrap { position:fixed; bottom:22px; left:50%; transform:translateX(-50%); z-index:90; display:flex; flex-direction:column; gap:8px; align-items:center; }
.toast { background:var(--ink); color:#fff; padding:11px 18px; border-radius:100px; font-size:13px; box-shadow:0 10px 30px rgba(30,13,54,.3); animation:toastIn .2s ease; }
.toast.err { background:#c0392b; }
@keyframes toastIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
/* P-1 · Reviews admin */
.rev-form{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;align-items:start}
.rev-form textarea,.rev-form #rv_photo,.rev-form #rv_add,.rev-form #rv_msg{grid-column:1/-1}
.rev-form input,.rev-form select,.rev-form textarea{padding:8px 10px;border:1px solid var(--line);border-radius:8px;font-size:13px;font-family:inherit;width:100%;box-sizing:border-box}
.stars-a{color:var(--gold);letter-spacing:1px}
@media(max-width:640px){.rev-form{grid-template-columns:1fr}}
.toast--undo{display:flex;align-items:center;gap:14px}
.toast-undo{background:none;border:1px solid rgba(255,255,255,.5);color:#fff;border-radius:6px;padding:3px 10px;font-size:12px;cursor:pointer}

/* ═════════ INBOX v2 (GMAIL-1) — person-centric conversations ═════════
   Namespaced ib2-*; the classic panel's styles are untouched. Uses the admin
   theme tokens so every theme (incl. dark) works. */
.ib2{display:grid;grid-template-columns:minmax(280px,340px) 1fr;gap:14px;min-height:70vh}
.ib2-listcol{display:flex;flex-direction:column;gap:8px;min-width:0}
.ib2-segs{display:flex;gap:4px;flex-wrap:wrap}
.ib2-segs button{border:1px solid var(--line);background:var(--a-card);color:var(--mid-p);border-radius:20px;padding:5px 12px;font-size:12px;cursor:pointer}
.ib2-segs button.active{background:var(--a-acc);border-color:var(--a-acc);color:#fff}
#ib2Search{padding:9px 12px;border:1px solid var(--line);border-radius:10px;font-size:13px;background:var(--a-card);color:var(--ink)}
.ib2-list{border:1px solid var(--line);border-radius:12px;background:var(--a-card);overflow-y:auto;max-height:72vh}
.ib2-row{display:flex;gap:10px;padding:11px 12px;border-bottom:1px solid var(--line);cursor:pointer;align-items:flex-start}
.ib2-row:hover{background:var(--a-acc-soft)}
.ib2-row.active{background:var(--a-acc-soft);box-shadow:inset 3px 0 0 var(--a-acc)}
.ib2-row.unread .ib2-rowtop b{font-weight:700}
.ib2-row:not(.unread) .ib2-rowtop b{font-weight:500;color:var(--mid-p)}
.ib2-av{width:34px;height:34px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:600;font-size:14px;background:hsl(var(--h,270) 42% 46%)}
.ib2-av--lg{width:44px;height:44px;font-size:18px}
.ib2-rowmain{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}
.ib2-rowtop{display:flex;justify-content:space-between;gap:8px;align-items:baseline}
.ib2-rowtop b{font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ib2-rowtop time{font-size:10.5px;color:var(--soft-p);white-space:nowrap}
.ib2-snip{font-size:12px;color:var(--mid-p);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;gap:5px}
.ib2-dot{width:7px;height:7px;border-radius:50%;background:#e08a00;flex-shrink:0}
.ib2-chips{display:flex;gap:4px;flex-wrap:wrap;margin-top:2px}
.ib2-chips i{font-style:normal;font-size:10px;border:1px solid var(--line);border-radius:10px;padding:1px 7px;color:var(--mid-p)}
.ib2-chips i.ltv{color:#2e7d4f;border-color:rgba(46,125,79,.35)}
.ib2-viewcol{border:1px solid var(--line);border-radius:12px;background:var(--a-card);padding:16px 18px;overflow-y:auto;max-height:78vh;min-width:0}
.ib2-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:40vh;color:var(--mid-p);text-align:center;gap:6px}
.ib2-empty span{font-size:12px;color:var(--soft-p)}
.ib2-vhd{display:flex;gap:12px;align-items:flex-start;border-bottom:1px solid var(--line);padding-bottom:12px;margin-bottom:12px}
.ib2-vwho{flex:1;min-width:0}
.ib2-vwho b{font-size:16px}
.ib2-vwho>span{display:block;font-size:12px;color:var(--mid-p);margin-top:1px}
.ib2-vchips{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
.ib2-recchip{border:1px solid var(--line);background:none;border-radius:14px;padding:2px 10px;font-size:11px;color:var(--mid-p);cursor:pointer}
.ib2-recchip:hover{border-color:var(--a-acc);color:var(--a-acc)}
.ib2-thread{display:flex;flex-direction:column;gap:8px}
.ib2-older{border:1px dashed var(--line);background:none;border-radius:10px;padding:7px;font-size:12px;color:var(--mid-p);cursor:pointer}
.ib2-older:hover{color:var(--a-acc);border-color:var(--a-acc)}
.ib2-msg{border:1px solid var(--line);border-radius:12px;cursor:pointer}
.ib2-msg--in{border-left:3px solid var(--a-acc)}
.ib2-msg--out{border-left:3px solid #B8913A;background:var(--a-acc-soft)}
.ib2-msg--auto{border-left:3px solid var(--soft-p);opacity:.75}
.ib2-msg--fold{display:flex;gap:8px;align-items:baseline;padding:8px 12px;font-size:12px;color:var(--mid-p);overflow:hidden}
.ib2-msg--fold b{font-size:12px;color:var(--ink);white-space:nowrap}
.ib2-msg--fold .fold-snip{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ib2-msg--fold time{font-size:10.5px;color:var(--soft-p);white-space:nowrap}
.ib2-msg--open{padding:12px 14px;cursor:default}
.ib2-msg-hd{display:flex;gap:8px;align-items:baseline;font-size:12px}
.ib2-msg-hd b{font-size:13px}
.ib2-msg-hd time{margin-left:auto;font-size:11px;color:var(--soft-p)}
.ib2-syn{font-size:10.5px;color:var(--soft-p)}
.ib2-msg-subj{font-size:12.5px;font-weight:600;margin-top:4px}
.ib2-msg-body{white-space:pre-wrap;font-size:13.5px;line-height:1.55;margin-top:6px}
.ib2-replyzone{margin-top:14px}
.ib2-composer{border:1px solid var(--a-acc);border-radius:14px;padding:14px;background:var(--a-card);box-shadow:0 6px 24px rgba(40,25,70,.10)}
.ib2-c-hd{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap;margin-bottom:10px}
.ib2-c-hd b{font-size:13.5px}.ib2-c-hd span{font-size:11.5px;color:var(--mid-p)}
.ib2-c-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.ib2-c-form{display:flex;flex-direction:column;gap:8px;min-width:0}
.ib2-c-form input[type=text]{padding:9px 11px;border:1px solid var(--line);border-radius:8px;font-size:13px;background:var(--a-card);color:var(--ink)}
.ib2-c-form textarea{min-height:170px;padding:10px 12px;border:1px solid var(--line);border-radius:8px;font-size:13.5px;line-height:1.5;resize:vertical;background:var(--a-card);color:var(--ink);font-family:inherit}
.ib2-c-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.ib2-gift{display:flex;gap:8px;align-items:center}
.ib2-gift select,.ib2-gift input{padding:7px 9px;border:1px solid var(--line);border-radius:8px;font-size:12.5px;background:var(--a-card);color:var(--ink)}
.ib2-gift input{width:80px}
.ib2-c-prev{display:flex;flex-direction:column;gap:5px;min-width:0}
.ib2-c-prev span{font-size:11px;color:var(--mid-p)}
.ib2-c-prev iframe{width:100%;flex:1;min-height:260px;border:1px solid var(--line);border-radius:10px;background:#fff}
@media(max-width:1100px){.ib2-c-grid{grid-template-columns:1fr}.ib2-c-prev iframe{min-height:220px}}
@media(max-width:860px){.ib2{grid-template-columns:1fr}.ib2-viewcol{max-height:none}}
/* clamped long messages in the thread drawer — click to expand */
.cs-msg-body.cs-clamp{display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden;cursor:pointer;position:relative}
.cs-msg-body.cs-clamp::after{content:"… show more";color:var(--a-acc);font-size:11px;display:block}

/* Inventory tab (INV-SYNC) — review queue + movement ledger */
.badge{display:inline-block;min-width:18px;padding:1px 7px;border-radius:10px;background:var(--royal,#4A2A6B);color:#fff;font-size:11px;font-weight:600;text-align:center;vertical-align:middle}
.inv-review-card{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;border:1px solid var(--line);border-radius:10px;padding:10px 14px;margin-bottom:8px;background:var(--a-card)}
.inv-rev-main{font-size:13px;line-height:1.45}
.inv-rev-act{display:flex;gap:8px;flex-shrink:0}
.inv-ledger{overflow-x:auto}
.mini-table{width:100%;border-collapse:collapse;font-size:12.5px}
.mini-table th{text-align:left;font-weight:600;color:var(--mid-p);border-bottom:1px solid var(--line);padding:6px 10px;white-space:nowrap}
.mini-table td{border-bottom:1px solid var(--line);padding:6px 10px;white-space:nowrap}

/* Shipping size settings inputs */
.ship-set{display:flex;flex-direction:column;gap:3px;font-size:11px;color:var(--mid-p)}
.ship-set input{width:92px;padding:7px 9px;border:1px solid var(--line);border-radius:8px;font-size:14px;background:var(--a-card);color:var(--ink)}

/* Calls tab */
.call-card{border:1px solid var(--line);border-radius:10px;padding:12px 14px;margin-bottom:8px;background:var(--a-card)}
.call-top{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.callf.on{background:var(--royal,#4A2A6B);color:#fff;border-color:var(--royal,#4A2A6B)}

/* Calls tab — setup diagnostics (QUO-5). Rendered in-panel rather than through
   alert(), which Chrome truncates mid-line on long output. Uses the theme
   tokens so it reads correctly in dark and every accent theme. */
.diag-box{border:1px solid var(--line);border-left:3px solid #2e7d46;border-radius:10px;padding:12px 14px;background:var(--a-card);font-size:13px;line-height:1.5}
.diag-box.diag-bad{border-left-color:#d19a2a}
.diag-hd{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:8px}
.diag-list{list-style:none;margin:0;padding:0}
.diag-list li{padding:3px 0}
.diag-tbl{width:100%;border-collapse:collapse;font-size:12.5px}
.diag-tbl td{border-bottom:1px solid var(--line);padding:6px 8px;vertical-align:top}
.diag-tbl td:first-child{width:1.6em}
.diag-tbl td:nth-child(2){white-space:nowrap}
.diag-box code{background:var(--a-acc-soft);padding:1px 5px;border-radius:4px;font-size:12px}
.msg-err{color:#b3261e;margin:0}
[data-theme="dark"] .msg-err{color:#f2b8b5}

/* ═══ WARRANTY CUSTOMER BOOK ═══════════════════════════════════════════════
   One card per customer: their plan, every covered piece, and each piece's care
   events where the work actually happens. Built for an employee who has a parcel
   in their hands and needs to know whose it is. */
.wty-pieces{margin-top:8px;display:flex;flex-direction:column;gap:6px}
.wty-piece{border-left:3px solid var(--line);padding:4px 0 4px 12px}
.wty-piece-hd{font-size:13px;color:var(--ink);display:flex;align-items:center;gap:8px;flex-wrap:wrap}
/* The operative row — same controls the old flat queue had, now sitting under
   the piece it concerns. */
.wty-evrow{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:6px;padding:8px 10px;background:var(--warm,#f9f5ee);border:1px solid var(--line);border-radius:9px}
.wty-evrow select{padding:5px 8px;font-size:12px;border:1px solid var(--line);border-radius:7px;font-family:inherit}
/* A parcel covering several pieces is ONE job. Each piece it touches gets this
   passive chip pointing at the single row, so three chips read as one parcel. */
.wty-chip{border:1px dashed var(--line);background:none;border-radius:100px;padding:3px 10px;font-size:11px;color:var(--mid-p);cursor:pointer;font-family:inherit}
.wty-chip:hover{border-color:var(--gold);color:var(--ink)}
/* The destructive sibling (2026-08-07). Ending coverage is needed a handful of
   times a year — a refunded order whose piece came back — and sits beside a
   button used far more often. So it recedes until reached for, and only then
   admits what it is: red on hover, never at rest. A control that looks urgent
   while idle gets clicked by someone skimming. */
.wty-chip--quiet{opacity:.55}
.wty-chip--quiet:hover{opacity:1;border-color:#b23;color:#b23}
.wty-chip[disabled]{opacity:.4;cursor:default}
.wty-parcels{margin-top:8px}
.wty-history summary{cursor:pointer;font-size:12px;color:var(--mid-p);margin-top:8px}
.wty-history .r-sub{padding-left:12px}

/* ═══ REGISTERING A GIFT'S COVERAGE TO ITS WEARER (2026-08-05) ══════════════
   The drawer that replaced a bare prompt(). Built on --warm/--line rather than
   reusing .inq-details, whose background is a hardcoded cream that goes
   unreadable under the dark theme — this drawer moves three years of coverage
   irreversibly, so every word on it has to survive every palette. */
.wtx-sum{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:4px 16px;
  padding:11px 13px;border-radius:9px;background:var(--warm,#F2EBF8);border:1px solid var(--line)}
.wtx-d{font-size:12px;color:var(--mid-p);display:flex;gap:6px;min-width:0}
.wtx-d span{white-space:nowrap}
.wtx-d span::after{content:":"}
.wtx-d b{color:var(--ink);font-weight:600;overflow-wrap:anywhere}
/* The re-type field's running commentary. It is the only feedback on the one
   control that stands between a typo and a stranger holding the coverage, so it
   is always present — never a message that appears only once you're wrong. */
.wtx-hint{margin:6px 0 0;font-size:11.5px;line-height:1.4;color:var(--mid-p)}
.wtx-hint.is-bad{color:#c0392b}
.wtx-check{display:flex;gap:9px;align-items:flex-start;font-size:12.5px;line-height:1.45;
  color:var(--ink);margin:0 0 4px;padding:10px 12px;border:1px solid var(--line);border-radius:9px;cursor:pointer}
.wtx-check input{margin:2px 0 0;flex-shrink:0}
/* This admin has no global disabled-button style, and an unexplained dead button
   reads as a broken screen. It stays visibly dead until the address is typed
   twice and the identity check is ticked. */
.wtx-go:disabled{opacity:.45;cursor:not-allowed}
[data-theme="dark"] .wtx-hint.is-bad{color:#f0a79c}

/* ═══ GIFT ORDERS IN THE ORDERS LIST (2026-08-04) ══════════════════════════
   Hila and future employees pack these boxes from this list. A gift is worth a
   gold line; a gift carrying warranty coverage is worth a banner, because the
   printed card has to go IN the box — forget it and the recipient can never
   claim three years of coverage, and nobody finds out until they try. */
.ord-gift{margin-top:6px;color:var(--gold2,#8a6d2f)}
.ord-gift b{color:var(--ink);letter-spacing:.03em}
/* Loudest thing in the list, on purpose. Gold on gold-wash, a fat left edge, and
   the print button sitting inside the warning rather than off in the actions
   column — the instruction and the way to obey it in the same box. */
.ord-giftwty{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:8px;padding:10px 13px;
  border:2px solid var(--gold,#B8913A);border-left-width:6px;border-radius:10px;background:rgba(184,145,58,.13)}
.ord-giftwty-s{flex:1 1 220px;min-width:0;font-size:12.5px;line-height:1.5;color:var(--ink)}
.ord-giftwty-t{display:block;font-size:12px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--gold2,#8a6d2f);margin-bottom:2px}
.ord-giftwty .btn{flex-shrink:0}
.ord-giftwty code{font-size:11.5px;background:rgba(0,0,0,.06);padding:1px 4px;border-radius:4px}
/* THE NUMBER (2026-08-05). The card is stock stationery now, so it prints with a
   ruled blank where the order number goes and someone writes it on in pen. That
   makes this the one value on the screen a packer physically transcribes — set
   big, monospaced (so 0/O and 1/I can't be misread onto a card that then points
   at nothing) and user-select:all so one click grabs it. A card packed without it
   is a blank leaflet and the recipient's only route to the coverage is gone. */
.ord-giftwty-no{flex:0 0 auto;text-align:center;padding:6px 14px;border-radius:8px;
  background:#fff;border:1px dashed var(--gold,#B8913A)}
.ord-giftwty-no span{display:block;font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted,#8a7fa3)}
.ord-giftwty-no b{display:block;font-size:19px;line-height:1.25;letter-spacing:.06em;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--ink);user-select:all}
.ord-giftwty-no--missing b{color:#b23;font-family:inherit}
/* The whole row wears the accent too, so the box needing a card is findable at a
   glance while scrolling — not only once you've read that row's small print. */
.admin-row--giftwty{box-shadow:inset 5px 0 0 var(--gold,#B8913A)}
.pill-gift{background:var(--gold,#B8913A);color:#fff;font-weight:700}
/* DONE (2026-08-04). Gold is a claim on attention, so it has to be spendable:
   once the card is printed and in the box, the banner stops shouting and becomes
   a receipt. Twenty past gift orders all wearing the alarm is the same as none of
   them wearing it — the one box that still needs a card has to stand out. */
.ord-giftwty--done{border-color:var(--line);border-left-color:#3f9c5a;background:rgba(63,156,90,.08)}
.ord-giftwty--done .ord-giftwty-t{color:#2f7a46}
/* UNKNOWN — gift_orders.sql hasn't been run, so we can't say this IS a gift.
   Dashed and neutral: a question the operator has to answer, not an instruction
   we can honestly give. */
.ord-giftwty--unknown{border-style:dashed;border-color:var(--line);border-left-width:6px;border-left-style:solid;border-left-color:var(--mid-p,#6d5a8c);background:transparent}
.ord-giftwty--unknown .ord-giftwty-t{color:var(--mid-p,#6d5a8c)}
/* ③ REGISTERED (2026-08-05) — the coverage reached the person wearing the piece,
   which is the only outcome this whole flow exists for. It is also the state
   that must be QUIETEST: a resolved row earns no colour, no fill and no
   buttons. It reads as a receipt while scrolling past, and reads as a full
   account only if you stop on it. Same argument as --done, one stage later. */
.ord-giftwty--reg{border-color:var(--line);border-left-color:#3f9c5a;background:transparent}
.ord-giftwty--reg .ord-giftwty-t{color:#2f7a46}
/* ④ WAITING / STALE — the card is packed and nobody has claimed the coverage.
   Deliberately NOT gold. Gold in this list means "a box on your bench needs a
   card now"; this needs no bench work at all, because only the recipient writing
   in can move it. Borrowing the packing alarm for it would spend the one colour
   that gets a card into a box. Two gears instead: plum at 21 days (the day
   api/warranty.js starts flagging it), red at 60, when two months of a
   three-year term have gone unclaimed and the buyer's money has bought nothing
   the wearer can use. */
.ord-giftwty--wait{border-color:var(--line);border-left-color:var(--mid-p,#6d5a8c);background:transparent}
.ord-giftwty--wait .ord-giftwty-t{color:var(--mid-p,#6d5a8c)}
.ord-giftwty--stale{border-color:#f0b8b0;border-left-color:#c0392b;background:rgba(192,57,43,.06)}
.ord-giftwty--stale .ord-giftwty-t{color:#c0392b}
/* THE LIFECYCLE TRACK (2026-08-05). Nick: "make it easy and transparent for the
   gift giver and the recipient" — and for the employee, who has to read a state
   they were never taught. Three stages on their own row under the banner:
   ordered → card packed → registered to the wearer. Typographic on purpose. It
   is a reference, not a request; the banner above it is the only element here
   allowed to ask for attention, and a second coloured panel would take it back.
   flex-basis:100% so it always breaks to its own line inside .ord-giftwty. */
.gwty-track{flex:1 1 100%;display:flex;flex-wrap:wrap;gap:8px 18px;margin:2px 0 0;padding:9px 0 0;
  list-style:none;border-top:1px solid rgba(0,0,0,.09)}
.gwty-step{flex:1 1 190px;min-width:0;display:grid;grid-template-columns:19px 1fr;gap:1px 8px;
  align-items:start;font-size:11.5px;line-height:1.35;color:var(--muted,#8a7fa3)}
.gwty-step b{grid-row:1/3;display:flex;align-items:center;justify-content:center;width:19px;height:19px;
  border-radius:50%;border:1px solid var(--line);font-size:10px;font-weight:700;color:var(--muted,#8a7fa3)}
.gwty-step span{font-weight:700;letter-spacing:.02em}
/* The detail line carries an email address and a hand-typed recipient name —
   both can be long and neither may push the row wide. */
.gwty-step i{font-style:normal;overflow-wrap:anywhere}
.gwty-step.is-done,.gwty-step.is-now{color:var(--ink)}
.gwty-step.is-done b{border-color:#3f9c5a;color:#2f7a46}
.gwty-step.is-now b{border-width:2px;border-color:var(--gold,#B8913A);color:var(--gold2,#8a6d2f)}
[data-theme="dark"] .ord-giftwty{background:rgba(184,145,58,.18)}
[data-theme="dark"] .ord-gift,[data-theme="dark"] .ord-giftwty-t{color:#e3c766}
[data-theme="dark"] .ord-giftwty--done{background:rgba(63,156,90,.16)}
[data-theme="dark"] .ord-giftwty--done .ord-giftwty-t{color:#7fd39b}
[data-theme="dark"] .ord-giftwty--unknown{background:transparent}
[data-theme="dark"] .ord-giftwty--unknown .ord-giftwty-t{color:#b9a6d8}
[data-theme="dark"] .ord-giftwty--reg{background:transparent}
[data-theme="dark"] .ord-giftwty--reg .ord-giftwty-t{color:#7fd39b}
[data-theme="dark"] .ord-giftwty--wait{background:transparent}
[data-theme="dark"] .ord-giftwty--wait .ord-giftwty-t{color:#b9a6d8}
[data-theme="dark"] .ord-giftwty--stale{background:rgba(192,57,43,.2);border-color:#8c3a30}
[data-theme="dark"] .ord-giftwty--stale .ord-giftwty-t{color:#f0a79c}
[data-theme="dark"] .gwty-track{border-top-color:rgba(255,255,255,.12)}
[data-theme="dark"] .gwty-step.is-done b{border-color:#7fd39b;color:#7fd39b}
[data-theme="dark"] .ord-giftwty code{background:rgba(255,255,255,.1)}

/* ═══ THE ORDER PREP STATION (2026-08-08) ══════════════════════════════════
   The screen Hila stands at a bench and uses, on a phone, several times a day.
   Read the long argument at the top of the prep section in assets/js/admin.js
   before changing anything here; the short version is that this is a PHONE
   surface first and a desktop panel second, which inverts every default in this
   file. Three rules follow from that, and none of them are negotiable:

     1. NOTHING IS HOVER-ONLY. A finger has no hover state. Every affordance in
        here is visible at rest — hover is decoration, never information.
     2. EVERY TAPPABLE THING IS AT LEAST 44px TALL, and the ticks are 56, because
        they are hit with a thumb while the other hand is holding a necklace.
     3. TYPE IS BIGGER THAN THE REST OF THIS ADMIN — 13.5–15px, not 12. This is
        read at arm's length under studio light, not leaned into at a desk.

   Everything is namespaced .prep-* / .ord-prep / .ord-tools so nothing in here
   can reach into the panels above. */

/* The sheet reuses #editorDrawer rather than adding a second drawer — one
   drawer, one veil, one Escape key. 680px on a desktop, because the piece cards
   want two columns of facts and no more; edge-to-edge below 760px, where a
   "panel" with 40px of veil beside it is just a smaller phone. */
.admin-drawer--prep { width: min(680px, 100vw); }
.admin-drawer--prep .drawer-bd { padding: 18px 18px calc(28px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 760px) { .admin-drawer--prep { width: 100vw; left: 0; right: 0; } }

/* A size the base .btn does not have: the shutter, the camera, the label. These
   are pressed with a thumb, sometimes with the phone held one-handed. */
.btn-lg { padding: 15px 22px; font-size: 12px; min-height: 50px; }
/* .btn is white-space:nowrap, which is right for the storefront's two-word CTAs
   and wrong for every button in here: these say whole sentences, because the
   label button has to state on its own face that pressing it emails the
   customer. On a 375px phone a nowrap sentence runs off the edge and is clipped
   by the fixed drawer — and the half that disappears is the operative half.
   Measured at 375px on 2026-08-08: the label button ran to 482px before this. */
.admin-drawer--prep .btn { white-space: normal; text-align: center; line-height: 1.45; }

/* ── Who is at the bench ─────────────────────────────────────────────────── */
.prep-gate { padding: 8px 0; }
.prep-gate h4 { font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 24px; margin: 0 0 6px; color: var(--ink); }
.prep-gate p { font-size: 14px; line-height: 1.6; color: var(--mid-p); margin: 0 0 16px; }

/* SEGMENTED, NOT A DROPDOWN — the reason is written out in the JS beside step 6
   and it is the same reason here: a closed <select> shows one name whether or
   not anybody chose it, and a name nobody chose is exactly the wrong name to
   file a box under. Every option is on screen, none is pre-selected, one tap
   answers. */
.prep-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.prep-seg button { flex: 1 1 100px; min-height: 44px; padding: 10px 16px; border: 1px solid var(--line);
  background: var(--a-card); color: var(--ink); border-radius: 10px; font-family: inherit; font-size: 14px; cursor: pointer; }
.prep-seg--lg button { min-height: 54px; font-size: 15.5px; }
.prep-seg button.active { background: var(--a-acc); border-color: var(--a-acc); color: #fff; font-weight: 600; }
.prep-seg button:disabled { opacity: .5; cursor: default; }

/* ── Header ──────────────────────────────────────────────────────────────── */
.prep-hd { border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 16px; }
/* Same argument as .ord-giftwty-no: this number is transcribed BY HAND onto a
   card, read aloud down a phone, and typed into Stripe. Monospaced so 0/O and
   1/I cannot be confused, and user-select:all so one tap grabs the whole thing
   instead of half of it. */
.prep-no { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 30px;
  line-height: 1.15; letter-spacing: .05em; color: var(--ink); user-select: all; }
.prep-cust { font-family: 'Cormorant Garamond', serif; font-size: 22px; color: var(--mid-p); margin-top: 2px; }
.prep-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.prep-started { font-size: 12.5px; color: var(--soft-p); margin-top: 9px; }
/* WHO IS SIGNING THIS, AND THE WAY TO CHANGE IT. The bench identity used to be
   asked once per device and then fixed forever — which files every box Maggie
   packs on Hila's phone under Hila's name, and a record confidently naming the
   wrong hands is worse than one naming none. So it is stated on every screen of
   the sheet, quietly, with the escape beside it. Not hidden behind a menu: the
   only moment anyone will notice it is the moment they are about to be recorded
   as somebody else, and by then a menu is too far away. The 44px rule applies —
   "not you?" is a real target, not a 10px afterthought. */
.prep-me { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--soft-p); margin-top: 6px; }
.prep-me b { color: var(--ink); font-weight: 600; }
.prep-me .link-btn { font-size: 12.5px; min-height: 44px; padding: 0 4px; }

/* ── Banners: closed, and held by someone else ───────────────────────────── */
.prep-banner { display: flex; flex-direction: column; gap: 5px; padding: 13px 15px; border-radius: 11px;
  border: 1px solid var(--line); border-left-width: 5px; margin-bottom: 16px; font-size: 13.5px; line-height: 1.55; }
.prep-banner b { font-size: 14.5px; }
.prep-banner span { color: var(--mid-p); }
.prep-banner .btn, .prep-banner .link-btn { align-self: flex-start; margin-top: 4px; }
.prep-banner--done { border-left-color: #3f9c5a; background: rgba(63,156,90,.08); }
.prep-banner--done b { color: #2f7a46; }
/* NOT an alarm. Someone else already holding this box is the system working —
   this banner explains and offers the way through, it does not scold. Plum,
   never red. */
.prep-banner--held { border-left-color: var(--royal); background: var(--a-acc-soft); }
/* A reopened record is amended, not broken, and it says so in the same plum as
   "someone else is holding this" rather than in an alarm colour. What it must
   carry is the REASON — the whole difference between an amended record and an
   edited one is that the reason is stored beside the change and shown here. */
.prep-banner--reopened { border-left-color: var(--gold, #B8913A); background: rgba(184,145,58,.09); }

/* ── A step ──────────────────────────────────────────────────────────────── */
.prep-step { border: 1px solid var(--line); border-radius: 12px; background: var(--a-card); margin-bottom: 12px; overflow: hidden; }
.prep-step.is-done { border-color: rgba(63,156,90,.45); }
/* The tick IS the step header — the whole 56px bar is the target, not a 16px
   checkbox floating beside a label. On a phone that difference is the whole
   difference between a checklist that gets used and one that gets abandoned. */
.prep-tick { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 12px;
  width: 100%; min-height: 56px; padding: 13px 15px; border: 0; background: none; cursor: pointer;
  font-family: inherit; text-align: left; color: var(--ink); }
.prep-tick--static, .prep-tick:disabled { cursor: default; }
.prep-tick-mark { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border: 2px solid var(--line); border-radius: 9px; font-style: normal; font-size: 16px; font-weight: 700; color: #2f7a46; }
.prep-step.is-done .prep-tick-mark, .prep-piece.is-done .prep-tick-mark { border-color: #3f9c5a; background: rgba(63,156,90,.12); }
.prep-tick-t { font-size: 15px; font-weight: 600; line-height: 1.35; }
.prep-opt { font-style: normal; font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--soft-p); margin-left: 6px; }
.prep-tick-at { font-style: normal; font-size: 11.5px; color: var(--soft-p); white-space: nowrap; }
.prep-step-b { padding: 0 15px 15px; font-size: 13.5px; line-height: 1.6; color: var(--mid-p); }
.prep-step-b p { margin: 0 0 9px; }
/* The gift steps borrow the gold the orders list already spends on gift+warranty
   boxes (.ord-giftwty) so a packer who has learned that gold means "this box has
   a card going into it" reads the same thing here without being taught twice. */
.prep-step--gift { border-color: var(--gold, #B8913A); border-left: 5px solid var(--gold, #B8913A); background: rgba(184,145,58,.07); }
.prep-step--gift .prep-tick-t { color: var(--gold2, #8a6d2f); }

/* ── Step 1: the pieces ──────────────────────────────────────────────────── */
/* ONE CARD PER LINE, with LABELLED facts — never the concatenated Stripe
   description. "Hamsa Pendant — Gold-Plated Silver · Necklace" read off a phone
   at arm's length is how the sterling one ends up in the box. Metal, Stone and
   Size each get their own label and their own value, because the packer is
   matching them against a drawer one at a time. */
.prep-piece { display: grid; grid-template-columns: 44px 62px 1fr; gap: 12px; align-items: start;
  padding: 12px; border: 1px solid var(--line); border-radius: 11px; margin-bottom: 9px; background: var(--a-card); }
.prep-piece.is-done { border-color: rgba(63,156,90,.45); background: rgba(63,156,90,.05); }
.prep-piece-tick { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px;
  border: 0; background: none; cursor: pointer; padding: 0; }
.prep-piece-tick:disabled { cursor: default; }
.prep-piece-thumb { width: 62px; height: 62px; border-radius: 9px; overflow: hidden; background: var(--warm, #f9f5ee);
  display: flex; align-items: center; justify-content: center; }
.prep-piece-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prep-piece-thumb span { font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--soft-p); }
.prep-piece-b { min-width: 0; }
.prep-piece-n { font-size: 14.5px; font-weight: 600; color: var(--ink); line-height: 1.3; overflow-wrap: anywhere; }
.prep-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 2px 14px; margin-top: 7px; }
.prep-fact { display: flex; gap: 6px; font-size: 12.5px; min-width: 0; }
.prep-fact span { color: var(--soft-p); white-space: nowrap; }
.prep-fact span::after { content: ':'; }
.prep-fact b { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.prep-fact--none b { color: var(--soft-p); font-weight: 400; font-style: italic; }
.prep-when { font-size: 11.5px; color: #2f7a46; margin-top: 6px; }

/* ── Step 2: which card goes in the box ──────────────────────────────────────
   Two shapes on purpose. The plain slot (piece name + its story) is the
   FALLBACK, for a piece nobody has given a card yet. The --card slot is the
   real thing: artwork first, title second, because a packer standing over a
   stack of printed stock matches a picture faster and more reliably than she
   reads a title. (2026-08-09) */
.prep-cardslot { border-left: 3px solid var(--line); padding: 3px 0 3px 11px; margin-bottom: 8px; }
.prep-cardslot b { display: block; font-size: 13.5px; color: var(--ink); }
.prep-cardslot span { display: block; font-size: 12.5px; font-style: italic; color: var(--mid-p); margin-top: 2px; }
.prep-cardslot--card { display: flex; gap: 12px; align-items: center; border-left-color: var(--gold, #B8913A); padding-top: 6px; padding-bottom: 6px; }
.prep-cardslot--card .prep-cardslot-b { min-width: 0; }
.prep-cardslot--card b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.prep-cardart { flex: 0 0 auto; width: 58px; height: 58px; border-radius: 8px; overflow: hidden; background: var(--warm, #f9f5ee);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.prep-cardart img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prep-cardart span { font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--soft-p); }

/* ── Steps 3 and 4: photographs ──────────────────────────────────────────── */
.prep-shots { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 10px; }
.prep-shot { position: relative; border: 1px solid var(--line); border-radius: 10px; padding: 0; overflow: hidden;
  background: none; cursor: pointer; width: 104px; }
.prep-shot img { display: block; width: 104px; height: 104px; object-fit: cover; }
.prep-shot span { display: block; padding: 4px 6px; font-size: 10.5px; color: var(--mid-p); background: var(--warm, #f9f5ee); }
.prep-cam { display: flex; flex-direction: column; gap: 9px; }
.prep-cam .btn { width: 100%; }
.prep-cam video { width: 100%; max-height: 56vh; border-radius: 11px; background: #000; display: block; }
.prep-cam-row { display: flex; gap: 9px; }
.prep-cam-row .btn { flex: 1; }
/* The file input is the one control that must ALWAYS be here — next to the
   shutter, never instead of it. On a phone `capture` opens the camera in one
   tap, which makes it the FAST path rather than the fallback; on a laptop with
   no webcam, a blocked permission or an exotic browser it is the only path that
   works at all. A <label> because a styled <input type=file> cannot be trusted
   to look like anything in particular. */
.prep-filebtn { cursor: pointer; }

/* ── Step 4: the number that goes on the card ────────────────────────────── */
.prep-bignum { text-align: center; padding: 12px 16px; margin: 4px 0 10px; border-radius: 10px;
  background: #fff; border: 1px dashed var(--gold, #B8913A); }
.prep-bignum span { display: block; font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted, #8a7fa3); }
.prep-bignum b { display: block; font-size: 30px; line-height: 1.2; letter-spacing: .06em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); user-select: all; }

/* The two coverage dates, on the CARE CARD only. This is a FACSIMILE of the panel
   printed on the card — two tinted boxes, side by side, "Coverage began" on the
   left — so the packer is matching a shape rather than reading two values and
   working out which line each belongs on. That is why it stays a row at every
   width instead of stacking on a phone: stacked, it stops being the card and
   becomes a list, and the transposition it exists to prevent comes back. */
.prep-dates { display: flex; gap: 8px; margin: 8px 0 0; }
.prep-dates > div { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 9px;
  background: var(--warm, #f9f5ee); border: 1px solid var(--line); }
.prep-dates span { display: block; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted, #8a7fa3); }
/* Monospace and selectable for the same reason the claim code above is: this is a
   string to be copied character for character, and a proportional font hides the
   difference between digits at this size. */
.prep-dates b { display: block; margin-top: 3px; font-size: 15px; line-height: 1.3;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); user-select: all; overflow-wrap: anywhere; }
/* The year is the ONLY thing that differs between the two boxes, so it is the only
   thing marked. Underline rather than colour: this panel is read at a bench under
   whatever light is there, and on a greyscale printout of the sheet colour is
   nothing. */
.prep-dates b u { text-decoration-thickness: 2px; text-underline-offset: 2px; }

/* ── Step 7: notes ───────────────────────────────────────────────────────── */
.prep-badge { display: inline-block; font-size: 11px; letter-spacing: .04em; padding: 4px 10px; border-radius: 100px;
  background: var(--warm, #f9f5ee); color: var(--mid-p); margin-bottom: 8px; }
#prepNotes { width: 100%; box-sizing: border-box; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: 14.5px; line-height: 1.5; background: var(--a-card); color: var(--ink); resize: vertical; }

/* ── Step 8: Complete ────────────────────────────────────────────────────── */
/* Full width and never disabled — the confirm-not-block philosophy that
   confirmShipWithoutCard argues for one screen over. A greyed-out Complete is a
   packer stranded at 9pm with a box that has to go out and no way to say so. */
.prep-complete { width: 100%; min-height: 56px; font-size: 12.5px; margin-top: 6px; }

/* ── Small print, in three voices ────────────────────────────────────────── */
.prep-fine { font-size: 12px; line-height: 1.55; color: var(--soft-p); margin: 8px 0 0; }
.prep-fine--center { text-align: center; }
.prep-fine--warn { color: #b7791f; }
.prep-warn { font-size: 13px; line-height: 1.6; padding: 10px 12px; border-radius: 9px;
  background: rgba(184,145,58,.12); border: 1px solid rgba(184,145,58,.4); color: var(--ink); }
.prep-warn code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.prep-ok { font-size: 13.5px; color: #2f7a46; }
.prep-ok a { color: var(--royal); }

/* ── The record ──────────────────────────────────────────────────────────── */
.prep-log { margin-top: 16px; }
.prep-log summary { cursor: pointer; font-size: 12.5px; color: var(--mid-p); min-height: 44px; display: flex; align-items: center; }
.prep-log ul { list-style: none; margin: 4px 0 0; padding: 0 0 0 4px; }
.prep-log li { font-size: 12.5px; line-height: 1.55; color: var(--mid-p); padding: 4px 0; border-top: 1px solid var(--line); }
.prep-log li b { color: var(--ink); }

/* ── Back on the orders row ──────────────────────────────────────────────── */
.ord-prep { display: flex; flex-direction: column; gap: 5px; margin-bottom: 4px; }
/* Narrower side padding than the base .btn: this sits in the ~160px actions
   column beside every other control, and "📦 Continue prep" must not force that
   column wider than the order details it stands next to. */
.ord-prep .prep-open { width: 100%; padding: 13px 10px; min-height: 46px; }
.prep-chip { font-size: 11px; text-align: center; padding: 3px 8px; border-radius: 100px;
  background: var(--warm, #f9f5ee); color: var(--mid-p); }
/* The name and the elapsed time carry the whole weight of this chip. What it
   prevents is the second person opening a box the first person is already
   holding, and a bare "In progress" would not do that. */
.prep-chip--live { background: var(--a-acc-soft); color: var(--royal); font-weight: 600; }
.prep-chip--done { background: rgba(63,156,90,.13); color: #2f7a46; }
/* DEMOTED, NOT REMOVED. The status dropdown, the hand-typed tracking box and
   "Buy shipping label" still work exactly as they did — a counter sale or a
   Stripe-side mess still needs them, and a half-migrated deployment must never
   strand a packer with no controls at all. They just stop competing with Prep
   for the eye. Opacity only: it does not touch pointer-events, so a first tap on
   a phone still hits the control rather than being spent waking it up. */
.ord-tools { display: flex; flex-direction: column; gap: 6px; }
.ord-tools--demoted { opacity: .66; transition: opacity .15s; }
.ord-tools--demoted:hover, .ord-tools--demoted:focus-within { opacity: 1; }

/* ── Dark theme ──────────────────────────────────────────────────────────── */
[data-theme="dark"] .prep-step--gift { background: rgba(184,145,58,.16); }
[data-theme="dark"] .prep-step--gift .prep-tick-t { color: #e3c766; }
[data-theme="dark"] .prep-banner--done b { color: #7fd39b; }
[data-theme="dark"] .prep-bignum { background: rgba(255,255,255,.05); }
[data-theme="dark"] .prep-dates > div { background: rgba(255,255,255,.05); }
[data-theme="dark"] .prep-when, [data-theme="dark"] .prep-ok { color: #7fd39b; }
[data-theme="dark"] .prep-chip--done { background: rgba(63,156,90,.2); color: #7fd39b; }
[data-theme="dark"] .prep-fine--warn { color: #e3c766; }
[data-theme="dark"] .prep-warn { background: rgba(184,145,58,.18); }
[data-theme="dark"] .prep-banner--reopened { background: rgba(184,145,58,.16); }
[data-theme="dark"] .prep-warn code { background: rgba(255,255,255,.1); }
[data-theme="dark"] .prep-piece.is-done { background: rgba(63,156,90,.12); }

/* WHICH SHIPPO IS THIS (2026-08-08). Sits beside the Buy-label button, which is
   the one control in the panel that spends money and emails a customer in the
   same press. Test mode is the safe state and stays quiet; LIVE is the one that
   has to be read before the click, because nothing in this codebase can void a
   label once it is bought. */
.ship-mode{display:inline-flex;align-items:center;font-size:10px;font-weight:700;
  letter-spacing:.08em;text-transform:uppercase;padding:3px 7px;border-radius:5px;
  border:1px solid var(--line);color:var(--muted);white-space:nowrap}
.ship-mode--test{border-color:rgba(63,122,82,.45);color:#3f7a52;background:rgba(63,122,82,.08)}
.ship-mode--live{border-color:#b23;color:#fff;background:#b23}

/* ── MEANING CARDS (Catalog) ─────────────────────────────────────────────────
   The list reuses .admin-row wholesale — it is the same object as a product
   row to the eye, which is the point: Hila should not have to learn a second
   screen. Only the two things .admin-row has no opinion about are added here:
   the artwork tile (a div, not the <img> .admin-row styles, because a card
   without art has to say so rather than show a broken image) and the group
   heading that turns forty cards into ten short lists. (2026-08-09) */
.mc-group { font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 17px; color: var(--mid-p);
  margin: 18px 0 2px; padding-bottom: 5px; border-bottom: 1px solid var(--line); }
.mc-group:first-child { margin-top: 0; }
.mc-art { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--warm, #f9f5ee);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.mc-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mc-art span { font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: var(--soft-p); }
.mc-art--lg { width: 104px; height: 104px; border-radius: 10px; }
.mc-artpick { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
/* Square-ish so ↑ and ↓ read as a pair rather than as two words. */
.mc-arrow { min-width: 34px; padding-left: 8px; padding-right: 8px; }
.mc-arrow:disabled { opacity: .35; cursor: default; }

[data-theme="dark"] .mc-art, [data-theme="dark"] .prep-cardart { background: rgba(255,255,255,.06); }

/* Catalog → Home Hero: the ordered list of 🖼 photos (2026-09-25) */
.hh-list { display: flex; flex-direction: column; gap: 6px; max-width: 720px; }
.hh-row { display: grid; grid-template-columns: 28px 64px 1fr auto; gap: 12px; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.hh-row--over { opacity: .55; }
.hh-row { cursor: grab; }
.hh-row--drag { opacity: .4; }
.hh-row--over-target { border-color: var(--gold, #c9a85e); box-shadow: 0 0 0 2px rgba(201,168,94,.35); }
.hh-n { font-size: 12px; color: #7a7290; text-align: right; }
.hh-row img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: #f3eff8; }
.hh-txt { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.hh-btns { display: flex; gap: 6px; }

/* Custom Works list reuses the Home Hero rows (drag + ▲▼), full width — 2026-10-04 */
.hh-list--wide { max-width: none; }
.pf-row .hh-btns { align-items: center; }

/* #568 — bold / italic toolbar + live preview on description fields (richtext-editor.js) */
.rich-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.rich-btn { width: 30px; height: 28px; border: 1px solid var(--line); border-radius: 6px; background: var(--a-card); color: var(--ink); font-family: Georgia, 'Times New Roman', serif; font-size: 15px; line-height: 1; cursor: pointer; padding: 0; }
.rich-btn:hover, .rich-btn:focus-visible { border-color: var(--a-acc); background: var(--a-acc-soft); }
.rich-btn b { font-weight: 700; }
.rich-btn i { font-style: italic; }
/* 🔗 Link is a word, not a single letter — let it size to its text. */
.rich-btn--link { width: auto; padding: 0 9px; font-family: inherit; font-size: 12.5px; }
.rich-hint { font-size: 11.5px; color: var(--mid-p); flex: 1 1 200px; min-width: 0; }
.rich-preview { margin-top: 6px; border: 1px dashed var(--line); border-radius: 8px; padding: 8px 12px; background: var(--a-acc-soft); }
.rich-preview[hidden] { display: none; }
.rich-preview-label { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--mid-p); margin-bottom: 4px; }
.rich-preview-body { white-space: pre-line; font-size: 13.5px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.rich-preview-body strong { font-weight: 700; }
.rich-preview-body em { font-style: italic; }

/* AI model tick box on product photos (2026-10-08) */
.thumb-ai{display:flex;align-items:center;gap:4px;margin-top:3px;font-size:9px;font-weight:600;letter-spacing:.02em;color:var(--a-mute,#7a6e8e);cursor:pointer;user-select:none}
.thumb-ai input{margin:0;width:11px;height:11px;cursor:pointer}
.thumb-ai.on{color:#8a4fd1}

/* ── Staff timecards (2026-10-08) — Admin → Timecard / Timecards ───────────── */
.tc-hd{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:16px}
.tc-hd h2{font-family:'Cormorant Garamond',serif;font-weight:500;font-size:30px;margin:0}
.tc-sub{color:var(--mid-p);font-size:13px}
.tc-pernav{display:flex;align-items:center;gap:8px}
.tc-pernav button{width:34px;height:34px;border-radius:9px;border:1px solid var(--line);background:var(--a-card);color:var(--a-acc);font-size:18px;cursor:pointer}
.tc-pernav button[disabled]{opacity:.35;cursor:default}
.tc-lbl{font-weight:600;font-size:14px;min-width:200px;text-align:center;display:flex;align-items:center;justify-content:center;gap:8px}
.tc-sel{padding:9px 12px;border:1px solid var(--line);border-radius:9px;font:inherit;font-weight:600;background:var(--a-card);color:var(--ink)}
.tc-pill{display:inline-flex;align-items:center;font-size:10.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;padding:3px 9px;border-radius:999px;white-space:nowrap}
.tc-pill--open{background:var(--a-acc-soft);color:var(--a-acc)}.tc-pill--submitted{background:#fdf2e1;color:#a5650a}.tc-pill--approved{background:#e8f4ea;color:#2e7d32}.tc-pill--returned{background:#fdeceb;color:#b3261e}.tc-pill--paid{background:#eef0f3;color:#4b5a6b}
.tcard{background:var(--a-card);border:1px solid var(--line);border-radius:14px;margin-bottom:16px;overflow:hidden}
.tc-cardh{padding:14px 16px 6px;display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.tc-cardh h4{margin:0;font-family:'Cormorant Garamond',serif;font-size:21px;font-weight:500}
.tc-eye{display:block;font-size:10.5px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--a-acc)}
.tc-todaycard{display:grid;grid-template-columns:1.2fr 1fr}
.tc-todayl{padding:18px 20px;border-right:1px solid var(--line)}
.tc-todayr{padding:18px 20px;background:var(--a-acc-soft)}
.tc-todayl h3{font-family:'Cormorant Garamond',serif;font-size:24px;font-weight:500;margin:2px 0 12px}
.tc-daypick{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 10px}
.tc-daypick button{border:1px solid var(--line);background:var(--a-card);border-radius:999px;padding:4px 11px;font:inherit;font-size:12px;cursor:pointer;color:var(--mid-p)}
.tc-daypick button.on{background:var(--a-acc);border-color:var(--a-acc);color:#fff}
.tc-trow{display:grid;grid-template-columns:1fr 112px;align-items:center;gap:10px;padding:6px 0;border-bottom:1px dashed var(--line)}
.tc-trow:last-child{border-bottom:0}
.tc-tname{display:flex;align-items:center;gap:9px;font-weight:500}
.tc-dot{width:9px;height:9px;border-radius:50%;flex:none}
.tc-leave{font-size:9.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--mid-p);border:1px solid var(--line);border-radius:999px;padding:0 6px}
select.tc-h{appearance:none;width:100%;padding:8px 28px 8px 12px;border:1px solid var(--line);border-radius:9px;background:var(--a-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235A2882' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right 10px center;font:inherit;font-weight:600;color:var(--ink);text-align:right;cursor:pointer;font-variant-numeric:tabular-nums}
select.tc-h:focus{outline:2px solid var(--a-acc-soft);border-color:var(--a-acc)}
.tc-big{font-family:'Cormorant Garamond',serif;font-size:44px;line-height:1;font-weight:500;font-variant-numeric:tabular-nums}
.tc-kv{display:flex;justify-content:space-between;gap:10px;padding:7px 0;border-bottom:1px solid var(--line);font-size:13px}
.tc-kv:last-of-type{border-bottom:0}.tc-kv b{font-weight:600}
.tc-hint{font-size:12px;color:var(--mid-p)}
p.tc-hint{margin:10px 0 0}
.tc-saved{font-size:12px;color:#2e7d32;margin-top:10px;min-height:16px}
.tc-saved.tc-err,.tc-err{color:#b3261e}
textarea.tc-err{border-color:#b3261e !important}
.tc-ot{display:inline-block;margin-left:6px;font-size:10px;font-weight:700;color:#a5650a;background:#fdf2e1;border-radius:999px;padding:1px 7px}
.tc-banner{background:#fdeceb;border:1px solid #f4c7c3;color:#7a1b15;border-radius:12px;padding:12px 14px;margin-bottom:16px;font-size:13px}
.tc-banner span{color:#9a4a44}
.tc-banner--info{background:var(--a-acc-soft);border-color:transparent;color:var(--ink)}
.tc-gwrap{overflow-x:auto}
table.tc-grid{border-collapse:separate;border-spacing:0;width:100%;min-width:960px;font-variant-numeric:tabular-nums}
.tc-grid th,.tc-grid td{padding:9px 6px;text-align:center;border-bottom:1px solid var(--line);font-size:13px}
.tc-grid thead th{font-size:11px;font-weight:600;color:var(--mid-p);background:var(--a-page)}
.tc-grid .tc-wk th{font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--a-acc);background:var(--a-card);border-bottom:0;padding-top:12px}
.tc-grid .tc-task{text-align:left;padding-left:16px;position:sticky;left:0;background:var(--a-card);z-index:1;min-width:190px}
.tc-grid thead th.tc-task{background:var(--a-page)}
.tc-d{display:block;font-size:10px;letter-spacing:.06em;text-transform:uppercase}
.tc-n{display:block;font-size:15px;font-weight:600;color:var(--ink)}
.tc-opened{font-size:9px;color:#a5650a}
.tc-wkb{border-left:2px solid var(--line)}
.tc-grid .tc-fut,.tc-grid th.tc-fut .tc-n{color:#c9c2d6}
.tc-grid th.tc-today{background:var(--a-acc);color:#fff}.tc-grid th.tc-today .tc-n{color:#fff}
.tc-grid td.tc-today{background:var(--a-acc-soft);font-weight:700}
.tc-grid td.tc-open{background:#fff8ec}.tc-grid th.tc-open{background:#fff1d8;color:#a5650a}
.tc-lk{font-size:10px;opacity:.55}
.tc-zero{color:#d3cde0}
.tc-grid tfoot td{font-weight:700;background:var(--a-page);border-bottom:0}
.tc-grid .tc-tot{background:var(--a-acc-soft);font-weight:700;border-left:1px solid var(--line)}
.tc-unl{display:block;margin:3px auto 0;font-size:9.5px;font-weight:700;color:var(--a-acc);border:1px solid var(--a-acc-soft);border-radius:6px;padding:1px 6px;background:var(--a-card);cursor:pointer}
.tc-unl[data-on="1"]{color:#a5650a;border-color:#f3d9ae}
.tc-legend{display:flex;gap:16px;flex-wrap:wrap;padding:12px 16px;font-size:12px;color:var(--mid-p);border-top:1px solid var(--line)}
.tc-legend span{display:inline-flex;align-items:center;gap:6px}
.tc-sw{width:12px;height:12px;border-radius:3px;display:inline-block}
.tc-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:14px 16px;border-top:1px solid var(--line)}
.tc-actions{display:flex;gap:8px;flex-wrap:wrap}
.tc-btn{border:0;border-radius:10px;padding:10px 18px;font:inherit;font-weight:700;cursor:pointer;font-size:13px}
.tc-btn--pri{background:var(--a-acc);color:#fff}.tc-btn--pri[disabled]{opacity:.4;cursor:not-allowed}
.tc-btn--ok{background:#2e7d32;color:#fff}.tc-btn--warn{background:#b3261e;color:#fff}
.tc-btn--ghost{background:var(--a-card);border:1px solid var(--line);color:var(--a-acc)}
.tc-sum{display:grid;grid-template-columns:1fr 1fr 1.6fr;gap:12px;padding:14px 16px;border-top:1px solid var(--line)}
.tc-sum > div{display:flex;flex-direction:column;gap:2px}
.tc-sum b{font-size:18px;font-variant-numeric:tabular-nums}
.tc-sum > .tc-forsq{background:var(--a-acc-soft);border-radius:10px;padding:10px 12px;flex-direction:row;flex-wrap:wrap;gap:6px 16px;align-items:baseline}
.tc-forsq .tc-eye{flex-basis:100%}
.tc-forsq b{font-size:16px}
.tc-list .tc-li,.tc-queue .tc-li{width:100%;display:grid;grid-template-columns:1fr auto auto;gap:14px;align-items:center;padding:12px 16px;border:0;border-top:1px solid var(--line);background:none;font:inherit;color:inherit;text-align:left;cursor:pointer}
.tc-li:hover{background:var(--a-acc-soft)}
.tc-queue{border-left:4px solid #a5650a}
.tc-queue .tc-li{grid-template-columns:1fr auto}
.tc-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.tc-kpi{padding:14px 16px}
.tc-kv2{font-family:'Cormorant Garamond',serif;font-size:30px;line-height:1.15;font-variant-numeric:tabular-nums}
.tc-kv2--sm{font-size:22px;padding-top:4px}
.tc-two{display:grid;grid-template-columns:1.3fr 1fr;gap:16px}
.tc-filters{display:flex;gap:10px;flex-wrap:wrap;align-items:center;padding:6px 16px 10px;font-size:12px;color:var(--mid-p)}
.tc-filters input,.tc-filters select{padding:7px 9px;border:1px solid var(--line);border-radius:9px;font:inherit;background:var(--a-card);color:var(--ink)}
.tc-bars{padding:4px 0 14px}
.tc-b{display:grid;grid-template-columns:150px 1fr 56px;gap:10px;align-items:center;padding:6px 16px;font-size:13px}
.tc-b b{text-align:right;font-variant-numeric:tabular-nums}
.tc-b--tot{border-top:1px solid var(--line);margin-top:4px;padding-top:10px;font-weight:700}
.tc-bar{height:10px;border-radius:5px;background:var(--a-acc-soft);position:relative;overflow:hidden}
.tc-bar i{position:absolute;inset:0 auto 0 0;border-radius:5px}
.tc-log summary{padding:14px 16px;cursor:pointer;font-weight:600}
.tc-logt{width:100%;border-collapse:collapse;font-size:12.5px}
.tc-logt th,.tc-logt td{text-align:left;padding:7px 16px;border-top:1px solid var(--line)}
.tc-logt th{font-size:11px;color:var(--mid-p);font-weight:600}
.tc-setup{background:var(--a-card);border:1px dashed var(--line);border-radius:14px;padding:22px;line-height:1.7}
.tc-veil{position:fixed;inset:0;background:rgba(20,10,35,.45);display:flex;align-items:center;justify-content:center;z-index:1000;padding:16px}
.tc-dialog{background:var(--a-card);border-radius:16px;max-width:440px;width:100%;padding:22px;box-shadow:0 20px 60px rgba(30,13,54,.3)}
.tc-dialog h3{font-family:'Cormorant Garamond',serif;font-weight:500;font-size:24px;margin:0 0 8px}
.tc-dialog p{margin:0 0 12px;color:var(--mid-p);font-size:13.5px;line-height:1.55}
.tc-dialog textarea{width:100%;box-sizing:border-box;border:1px solid var(--line);border-radius:10px;padding:10px;font:inherit;background:var(--a-card);color:var(--ink);margin-bottom:12px}
.tc-dialog-act{display:flex;justify-content:flex-end;gap:8px}
@media (max-width:760px){
  .tc-todaycard,.tc-two,.tc-kpis,.tc-sum{grid-template-columns:1fr}
  .tc-todayl{border-right:0;border-bottom:1px solid var(--line)}
  .tc-lbl{min-width:0}
}

/* timecards: cost estimate + end-of-period steps */
.tc-cost{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:8px 16px 4px}
.tc-cost > div{display:flex;flex-direction:column;gap:2px;background:var(--a-acc-soft);border-radius:10px;padding:12px}
.tc-cost b{font-family:'Cormorant Garamond',serif;font-size:28px;font-weight:500;line-height:1.1;font-variant-numeric:tabular-nums}
.tc-costedit{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;padding:12px 16px 0;font-size:12px;color:var(--mid-p)}
.tc-costedit label{display:inline-flex;align-items:center;gap:5px}
.tc-costedit input{width:74px;padding:6px 8px;border:1px solid var(--line);border-radius:8px;font:inherit;background:var(--a-card);color:var(--ink);text-align:right}
.tc-pad{padding:0 16px 14px}
.tc-steps summary{padding:14px 16px 6px;cursor:pointer;font-family:'Cormorant Garamond',serif;font-size:21px;font-weight:500;list-style-position:inside}
.tc-steps ol{margin:4px 0 0;padding:0 18px 16px 36px;font-size:13px;line-height:1.6}
.tc-steps li{margin-bottom:6px}
@media (max-width:760px){ .tc-cost{grid-template-columns:1fr} }

/* #727: Meaning Tiles — Hide / Show toggle */
.ma-wrap { display: flex; flex-direction: column; gap: 6px; }
.ma-wrap .ma-card { width: 100%; }
.ma-off .ma-card { opacity: .5; filter: grayscale(.6); }
.ma-photo { position: relative; }
.ma-hidden-tag { position: absolute; left: 8px; bottom: 8px; background: rgba(30,13,54,.85); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .04em; padding: 4px 9px; border-radius: 999px; }
.ma-vis { border: 1px solid var(--line); background: var(--a-card); border-radius: 10px; padding: 7px 10px; font: inherit; font-size: 12.5px; cursor: pointer; color: inherit; }
.ma-vis:hover { border-color: var(--gold); }
.ma-vis[aria-pressed="true"] { background: #fff3e6; border-color: #e0b97a; }
