/* Atelier VAULT — black and cream, after the AV monogram */
:root {
  --bg: #F1EDE7; --surface: #F8F6F2; --surface-2: #E8E3DB; --ink: #0B0B0A; --ink-2: #3D3B37; --muted: #7D7871;
  --line: #DCD6CC; --line-strong: #C3BCB0; --accent: #0B0B0A; --accent-ink: #F1EDE7; --accent-soft: #E3DED5;
  --ok: #3F6B4E; --ok-soft: #DDE8DF; --warn: #9A6A16; --warn-soft: #F2E6CC; --bad: #8E2F2B; --bad-soft: #F1DAD6;
  --info: #3D5878; --info-soft: #DCE3EC; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 28px rgba(0,0,0,.06);
  --serif: "Avenir Next", "Avenir", "Montserrat", "Helvetica Neue", Arial, sans-serif; /* display face, matches the wordmark */
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif;
  --radius: 3px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #010101; --surface: #0D0D0C; --surface-2: #1A1917; --ink: #F1EDE7; --ink-2: #CBC6BE; --muted: #8E8981;
    --line: #262523; --line-strong: #3A3835; --accent: #F1EDE7; --accent-ink: #010101; --accent-soft: #2A2926;
    --ok: #8DBB9A; --ok-soft: #1F2C23; --warn: #E0B56A; --warn-soft: #33291A; --bad: #E39A93; --bad-soft: #3A201E;
    --info: #9DB5D3; --info-soft: #1D2633; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #010101; --surface: #0D0D0C; --surface-2: #1A1917; --ink: #F1EDE7; --ink-2: #CBC6BE; --muted: #8E8981;
    --line: #262523; --line-strong: #3A3835; --accent: #F1EDE7; --accent-ink: #010101; --accent-soft: #2A2926;
    --ok: #8DBB9A; --ok-soft: #1F2C23; --warn: #E0B56A; --warn-soft: #33291A; --bad: #E39A93; --bad-soft: #3A201E;
    --info: #9DB5D3; --info-soft: #1D2633; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px rgba(0,0,0,.25);
    color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.005em; margin: 0; }
h1 { font-size: 32px; line-height: 1.1; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--ink); }
.boot svg { width: 120px; opacity: .85; }
.eyebrow { font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; letter-spacing: .02em; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.stack > * + * { margin-top: 16px; }
.hidden { display: none !important; }

/* ── sign in ───────────────────────────────────────── */
.signin { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.signin-art { background: #010101; color: #F1EDE7; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; align-items: center; text-align: center; position: relative; overflow: hidden; }
.signin-art::after { content: ""; position: absolute; inset: 28px; border: 1px solid rgba(241,237,231,.22); pointer-events: none; }
.signin-art .brand-lockup { width: min(340px, 72%); color: #F1EDE7; position: relative; z-index: 1; }
.signin-art blockquote { font-family: var(--serif); font-weight: 500; font-size: 38px; line-height: 1.15; margin: 0; max-width: 12em; opacity: .75; }
.signin-art .addr { font-size: 11px; letter-spacing: .25em; text-transform: uppercase; color: #8E8981; }
.signin-form { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px 0; }
.signin-form form { margin: auto 0; }
.signin-form .legal { width: 100%; text-align: center; border-top: 0; padding: 28px 0 22px; }

/* ── copyright footer on every page ────────────────── */
.content { display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }
.content .main { flex: 1; }
.legal { font-size: 11.5px; line-height: 1.5; color: var(--muted); padding: 18px 40px 24px; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .content .legal { padding: 16px; } }
.signin-form form { width: 100%; max-width: 340px; }
.signin-form h1 { margin-bottom: 6px; }
@media (max-width: 820px) { .signin { grid-template-columns: 1fr; } .signin-art { min-height: 260px; padding: 44px 40px; gap: 28px; } .signin-art .brand-lockup { width: min(220px, 70%); } .signin-art blockquote { font-size: 27px; } }

.brand-lockup { display: block; height: auto; overflow: visible; }
.side > a:first-child { display: block; color: var(--ink); padding: 4px 0 2px; }
.side .brand-lockup { width: 100%; } /* spans the same width as the Viewing / Your box panel below */
.topbar .brand-mark { width: 38px; height: auto; color: var(--ink); display: block; }

/* ── shell ─────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 26px 18px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .house { padding: 14px; border: 1px solid var(--line); background: var(--bg); }
.side .house .name { font-family: var(--serif); font-weight: 600; font-size: 18px; line-height: 1.2; margin-top: 3px; }
.side nav { display: flex; flex-direction: column; gap: 1px; }
.side nav .group { margin: 14px 10px 6px; }
.side nav a { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; text-decoration: none; color: var(--ink-2); border-radius: var(--radius); }
.side nav a:hover { background: var(--surface-2); color: var(--ink); }
.side nav a.on { background: var(--ink); color: var(--bg); }
.side nav a .count { font-size: 11px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); display: inline-grid; place-items: center; }
.side .foot { margin-top: auto; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
.side .foot a { color: var(--muted); }
.main { padding: 34px 40px 48px; min-width: 0; }
.page-head { margin-bottom: 26px; }
.page-head h1 { margin-top: 6px; }
.page-head p { margin: 8px 0 0; color: var(--ink-2); max-width: 60ch; }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 40; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .side.open { transform: none; }
  .topbar { display: flex !important; }
  .main { padding: 20px 16px 72px; }
  h1 { font-size: 27px; }
}
.topbar { display: none; position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 16px; justify-content: space-between; align-items: center; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 35; }

/* ── controls ──────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--radius); cursor: pointer; font-size: 13px; letter-spacing: .02em; white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { background: var(--ink-2); border-color: var(--ink-2); color: var(--bg); }
.btn.gold { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.ghost { border-color: transparent; background: none; }
.btn.danger { color: var(--bad); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
label.field { display: block; }
label.field > span { display: block; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--radius); outline: none;
}
textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filters > * { flex: 1 1 150px; max-width: 220px; }
/* search: last in the row, pushed to the right, and drawn differently from the square dropdowns */
.filters > .search-field { flex: 1.6 1 240px; max-width: 380px; margin-left: auto; position: relative; display: block; }
.search-field svg { position: absolute; left: 15px; top: 50%; width: 15px; height: 15px; margin-top: -7.5px; color: var(--muted); pointer-events: none; }
.search-field input[type=search] { height: 38px; padding: 0 16px 0 40px; border-radius: 19px; border: 1px solid transparent; background: var(--surface-2); }
.search-field input[type=search]::placeholder { color: var(--muted); }
.search-field input[type=search]:hover { border-color: var(--line-strong); }
.search-field input[type=search]:focus { background: var(--surface); border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-field:focus-within svg { color: var(--ink); }
@media (max-width: 640px) { .filters > .search-field { order: -1; flex-basis: 100%; max-width: none; margin-left: 0; } }
.error { color: var(--bad); font-size: 13px; min-height: 20px; }

/* ── surfaces ──────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .cols { grid-template-columns: 1fr; } }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 22px; }
.tile { background: var(--surface); padding: 18px 20px; text-decoration: none; display: block; }
a.tile:hover { background: var(--surface-2); }
.tile .n { font-family: var(--serif); font-weight: 500; font-size: 34px; line-height: 1.1; margin-top: 6px; }
.tile.alert .n { color: var(--bad); }
.tile.warn .n { color: var(--warn); }

/* ── table ─────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 400; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--surface-2); }
td .name { font-weight: 500; }
.thumb { width: 40px; height: 40px; object-fit: cover; border: 1px solid var(--line); display: block; background: var(--surface-2); }
.thumb.blank { display: grid; place-items: center; font-family: var(--serif); color: var(--muted); font-size: 16px; }
/* no photo yet: the square takes the piece's category pastel (night variant further down) */
.thumb.blank[class*="cat-"] { background: var(--cb); color: var(--ci); border-color: color-mix(in srgb, var(--ci) 18%, transparent); font-weight: 600; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--ink-2); margin-bottom: 6px; }

/* ── pills ─────────────────────────────────────────── */
/* Status & condition: solid, saturated, squarer, bold — deliberately unlike the soft round category pastels */
:root { --s-ok: #23704A; --s-info: #1F5FB0; --s-gold: #6B3FB0; --s-warn: #A35400; --s-bad: #B3261E; --s-neutral: #57534D; --s-ink: #FFFFFF; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .02em; padding: 3px 8px;
  border-radius: 4px; background: var(--s-neutral); color: var(--s-ink); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill.ok { background: var(--s-ok); }
.pill.warn { background: var(--s-warn); }
.pill.bad { background: var(--s-bad); }
.pill.info { background: var(--s-info); }
.pill.gold { background: var(--s-gold); }
.tag { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ── item page ─────────────────────────────────────── */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px 24px; }
.facts .v { margin-top: 3px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line); cursor: zoom-in; background: var(--surface-2); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { text-decoration: none; color: var(--muted); font-size: 12.5px; }
.back:hover { color: var(--ink); }
.internal { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 12px 14px; font-size: 13px; }

/* ── timeline ──────────────────────────────────────── */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 22px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.timeline li::after { content: ""; position: absolute; left: 7px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.t-condition::before { background: var(--bad); }
.timeline li.t-low::before { background: var(--warn); }
.timeline li.t-work::before, .timeline li.t-care::before { background: var(--accent); }
.timeline li.t-custody::before, .timeline li.t-release::before { background: var(--info); }
.timeline li.t-return::before, .timeline li.t-intake::before { background: var(--ok); }

/* storage code on a box or bag, e.g. TOM FORD BOX 13 */
.code-tag { display: inline-block; font-family: var(--serif); font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 8px; border: 1px solid var(--ink); border-radius: 2px; color: var(--ink); white-space: nowrap; line-height: 1.3; }
.photo-previews { display: flex; gap: 6px; flex-wrap: wrap; }
.photo-previews:not(:empty) { margin-top: 8px; }
.photo-previews img { width: 52px; height: 52px; object-fit: cover; border: 1px solid var(--line); }
.timeline .s { font-weight: 500; }
.timeline .d { color: var(--ink-2); font-size: 13px; white-space: pre-wrap; }
.timeline .m { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ── messages ──────────────────────────────────────── */
.inbox { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 0; border: 1px solid var(--line); background: var(--surface); min-height: 560px; }
.inbox .list { border-right: 1px solid var(--line); overflow-y: auto; max-height: 72vh; }
.inbox .list a { display: block; padding: 14px 16px; border-bottom: 1px solid var(--line); text-decoration: none; }
.inbox .list a.on { background: var(--surface-2); }
.inbox .list a .p { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) { .inbox { grid-template-columns: 1fr; } .inbox .list { max-height: 200px; border-right: 0; border-bottom: 1px solid var(--line); } }
.thread { display: flex; flex-direction: column; min-height: 520px; }
.thread .msgs { flex: 1; padding: 20px; overflow-y: auto; max-height: 60vh; display: flex; flex-direction: column; gap: 14px; }
.bubble { max-width: 74%; padding: 12px 14px; background: var(--surface-2); border-radius: 2px 12px 12px 12px; word-wrap: break-word; }
.bubble.mine { align-self: flex-end; background: var(--ink); color: var(--bg); border-radius: 12px 2px 12px 12px; }
.bubble .who { font-size: 11px; letter-spacing: .06em; opacity: .7; margin-bottom: 4px; white-space: normal; }
.bubble .ref { display: block; width: fit-content; font-size: 11px; margin-bottom: 6px; text-decoration: underline; cursor: pointer; }
.composer { border-top: 1px solid var(--line); padding: 14px; display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { min-height: 46px; height: 46px; }

/* ── modal / viewer / toast ────────────────────────── */
.modal-back { position: fixed; inset: 0; background: rgba(15,12,9,.55); z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow-y: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.modal.wide { max-width: 820px; }
.modal .mh { padding: 22px 24px 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.modal .mb { padding: 18px 24px; }
.modal .mf { padding: 0 24px 22px; display: flex; justify-content: flex-end; gap: 10px; }
.x { background: none; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0; }
.viewer { position: fixed; inset: 0; z-index: 70; background: #010101; display: flex; flex-direction: column; }
.viewer .vbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; color: #F1EDE7; border-bottom: 1px solid #262523; gap: 12px; }
.viewer .vbody { flex: 1; position: relative; overflow: hidden; }
.viewer iframe, .viewer img { width: 100%; height: 100%; border: 0; object-fit: contain; background: #0D0D0C; }
.viewer .wm { position: absolute; inset: 0; pointer-events: none; overflow: hidden; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 200px; opacity: .22; }
.viewer .wm span { transform: rotate(-28deg); color: #7D7871; font-size: 13px; letter-spacing: .3em; text-transform: uppercase; display: grid; place-items: center; white-space: nowrap; }
/* ── branded dropdowns (replace the OS menu) ───────── */
.vselect { position: relative; width: 100%; }
.vselect > select { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.vselect-btn { width: 100%; height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 12px 0 13px;
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--radius); cursor: pointer; text-align: left; color: var(--ink); }
.vselect-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vselect-btn svg { flex: none; width: 10px; height: 6px; color: var(--muted); transition: transform .15s ease; }
.vselect-btn:hover { border-color: var(--ink-2); }
.vselect-btn:hover svg { color: var(--ink); }
.vselect-btn:focus-visible, .vselect-btn[aria-expanded="true"] { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-soft); }
.vselect-btn[aria-expanded="true"] svg { transform: rotate(180deg); color: var(--ink); }
.vselect-pop { position: fixed; z-index: 95; background: var(--surface); border: 1px solid var(--ink); border-radius: var(--radius);
  box-shadow: 0 14px 36px rgba(0,0,0,.16); padding: 5px 0; overflow-y: auto; animation: vselect-in .12s ease-out; }
@keyframes vselect-in { from { opacity: 0; transform: translateY(-3px); } }
.vselect-opt { position: relative; padding: 9px 18px 9px 34px; cursor: pointer; white-space: nowrap; color: var(--ink-2); }
.vselect-opt.active { background: var(--surface-2); color: var(--ink); }
.vselect-opt.on { color: var(--ink); font-weight: 600; }
.vselect-opt.on::before { content: ""; position: absolute; left: 14px; top: 50%; width: 4px; height: 8px; margin-top: -6px;
  border: solid var(--ink); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }
.side .house .vselect-btn { background: var(--surface); font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .vselect-pop { animation: none; } .vselect-btn svg { transition: none; } }

.viewer .vfoot { padding: 10px 18px; font-size: 11.5px; color: #8E8981; border-top: 1px solid #262523; text-align: center; }
.viewer .btn { background: transparent; color: #F1EDE7; border-color: #3A3835; }
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: var(--radius); opacity: 0; transition: .2s; z-index: 90; pointer-events: none; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.bad { background: var(--bad); color: #fff; }

.checklist { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); }
.checklist label { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.checklist label:last-child { border-bottom: 0; }
.checklist label:hover { background: var(--surface-2); }
.secret { font-family: ui-monospace, Menlo, monospace; background: var(--surface-2); padding: 10px 12px; border: 1px dashed var(--line-strong); user-select: all; word-break: break-all; }
.release { border-top: 1px solid var(--line); padding: 18px 22px; }
.release:first-child { border-top: 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chips a { font-size: 12px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 20px; text-decoration: none; }
.chips a:hover { border-color: var(--ink); }
.bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.catlist .r { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin-bottom: 12px; font-size: 13px; }
.catlist .r .bar { grid-column: 1 / -1; }

/* ── day / night switch ────────────────────────────── */
.theme-switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 20px; overflow: hidden; margin-top: 10px; }
.theme-switch button { border: 0; background: none; padding: 4px 11px; font-size: 11.5px; cursor: pointer; color: var(--muted); }
.theme-switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.side .foot .row { gap: 10px; margin-top: 6px; }

/* ── category colours: one pastel per category ─────── */
/* --cb = pastel fill, --ci = deeper ink of the same hue (readable on the fill) */
.cat-garment       { --cb: #F4DCE1; --ci: #7E3343; }
.cat-sample        { --cb: #F7E2D0; --ci: #7C4722; }
.cat-design        { --cb: #E7DFF4; --ci: #4E3A7A; }
.cat-pattern       { --cb: #DCE7F5; --ci: #2C4F7A; }
.cat-textile       { --cb: #DCEEE2; --ci: #2B5E40; }
.cat-trim          { --cb: #F5ECC8; --ci: #6B5614; }
.cat-thread        { --cb: #D6EEEC; --ci: #1F5E58; }
.cat-embellishment { --cb: #F2DCF1; --ci: #6D3168; }
.cat-accessory     { --cb: #E3ECD4; --ci: #4A5F22; }
.cat-other         { --cb: #E8E4DE; --ci: #57524A; }
.cat { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; line-height: 1.4; white-space: nowrap;
  background: var(--cb); color: var(--ci); }
.cat-link { color: var(--ci); text-decoration: none; }
.cat-link::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--cb);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ci) 35%, transparent); margin-right: 8px; vertical-align: 0; }
.cat-link:hover { text-decoration: underline; }
.bar > i[class^="cat-"] { background: color-mix(in srgb, var(--ci) 35%, var(--cb)); }
/* Night: deep tint of the hue with the pastel as text */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cat { background: color-mix(in srgb, var(--ci) 34%, #0D0D0C); color: var(--cb); }
  :root:not([data-theme="light"]) .cat-link { color: var(--cb); }
  :root:not([data-theme="light"]) .bar > i[class^="cat-"] { background: color-mix(in srgb, var(--cb) 70%, var(--ci)); }
}
:root[data-theme="dark"] .cat { background: color-mix(in srgb, var(--ci) 34%, #0D0D0C); color: var(--cb); }
:root[data-theme="dark"] .cat-link { color: var(--cb); }
:root[data-theme="dark"] .bar > i[class^="cat-"] { background: color-mix(in srgb, var(--cb) 70%, var(--ci)); }

/* Night: status colours a step brighter so they stay punchy on black; placeholders take the deep category tint */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --s-ok: #297C51; --s-info: #2D6FC4; --s-gold: #7C4FC4; --s-warn: #B05F00; --s-bad: #C4372E; --s-neutral: #5F5B55; }
  :root:not([data-theme="light"]) .thumb.blank[class*="cat-"] { background: color-mix(in srgb, var(--ci) 34%, #0D0D0C); color: var(--cb); }
}
:root[data-theme="dark"] { --s-ok: #297C51; --s-info: #2D6FC4; --s-gold: #7C4FC4; --s-warn: #B05F00; --s-bad: #C4372E; --s-neutral: #5F5B55; }
:root[data-theme="dark"] .thumb.blank[class*="cat-"] { background: color-mix(in srgb, var(--ci) 34%, #0D0D0C); color: var(--cb); }

/* ── condition: a grey scale, lightest = Pristine → darkest = Damaged ── */
.pill.cond-pristine   { background: #ECE9E4; color: #34312C; box-shadow: inset 0 0 0 1px #D6D1C9; }
.pill.cond-excellent  { background: #CFCAC2; color: #26231F; }
.pill.cond-good       { background: #A9A39A; color: #161411; }
.pill.cond-fair       { background: #726C63; color: #FFFFFF; }
.pill.cond-needs_care { background: #4E4A44; color: #FFFFFF; }
.pill.cond-damaged    { background: #161513; color: #FFFFFF; box-shadow: inset 0 0 0 1px #3A3733; }

/* ── Low quantity: soft red ── */
:root { --low-bg: #F8DCD8; --low-ink: #A3291F; }
.pill.low { background: var(--low-bg); color: var(--low-ink); }
.tile.low .n { color: var(--low-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --low-bg: #46201C; --low-ink: #F4B4AC; } }
:root[data-theme="dark"] { --low-bg: #46201C; --low-ink: #F4B4AC; }

/* Returned / Used: their own punchy plum, so no status reads as a condition grey */
:root { --s-done: #8E3B63; }
.pill.done { background: var(--s-done); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --s-done: #9C4670; } }
:root[data-theme="dark"] { --s-done: #9C4670; }

/* ── Status column (whereabouts): outlined only — 1px frame + text in the status colour, no fill ──
   (other labels — access, prints, counts — keep their solid fills) */
.pill.status { --pc: var(--o-neutral, var(--s-neutral)); background: transparent; color: var(--pc); border: 1px solid var(--pc); padding: 2px 10px; border-radius: 20px; line-height: 1.4; } /* same round pill shape as categories */
.pill.status.ok   { --pc: var(--o-ok, var(--s-ok)); }
.pill.status.info { --pc: var(--o-info, var(--s-info)); }
.pill.status.gold { --pc: var(--o-gold, var(--s-gold)); }
.pill.status.warn { --pc: var(--o-warn, var(--s-warn)); }
.pill.status.bad  { --pc: var(--o-bad, var(--s-bad)); }
.pill.status.done { --pc: var(--o-done, var(--s-done)); }
/* Night: lighter versions of the same colours so frame and text read on black */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --o-ok: #5FBF8A; --o-info: #6FA3EA; --o-gold: #A889E6; --o-warn: #E39A3B; --o-bad: #EE7B70; --o-done: #D57FA6; --o-neutral: #A9A39A; }
}
:root[data-theme="dark"] { --o-ok: #5FBF8A; --o-info: #6FA3EA; --o-gold: #A889E6; --o-warn: #E39A3B; --o-bad: #EE7B70; --o-done: #D57FA6; --o-neutral: #A9A39A; }

/* message text keeps the sender's line breaks; the bubble's own markup doesn't add any */
.bubble .body { white-space: pre-wrap; }

/* Condition labels: same round pill shape as categories and status */
.pill.cond { border-radius: 20px; padding: 3px 10px; }

/* Private line: colour by who wrote it — studio in pastel orange, the house in light blue (same for both sides) */
.bubble.from-staff  { background: #FBE2CB; color: #3E2611; }
.bubble.from-client { background: #DCE9F7; color: #142A40; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bubble.from-staff  { background: #4A2D16; color: #FBE2CB; }
  :root:not([data-theme="light"]) .bubble.from-client { background: #1B3049; color: #DCE9F7; }
}
:root[data-theme="dark"] .bubble.from-staff  { background: #4A2D16; color: #FBE2CB; }
:root[data-theme="dark"] .bubble.from-client { background: #1B3049; color: #DCE9F7; }

/* "YOUR VAULT · LOS ANGELES" on one line in the sidebar panel */
.side .house .eyebrow { letter-spacing: .12em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
