/* Brand: purple and white, DIN (files in ./fonts, same ones as the inventory app). */
@font-face { font-family: 'DIN'; src: url('https://brwdgbitxisadwbuwbdi.supabase.co/storage/v1/object/public/fonts/DIN-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'DIN'; src: url('https://brwdgbitxisadwbuwbdi.supabase.co/storage/v1/object/public/fonts/DIN-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'DIN'; src: url('https://brwdgbitxisadwbuwbdi.supabase.co/storage/v1/object/public/fonts/DIN-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
:root {
  --p900: #3a0a2e;  /* darkest, nudged toward red */
  --p700: #5b1348;
  --p500: #86306f;
  --p300: #c79bbd;
  --p100: #f1e4ee;
  --p50: #faf5f9;
  --ink: #26121f;
  --muted: #7a6674;
  --line: #e3d3df;
  --ok: #1d7a4d;
  --bad: #b3261e;
  --font: 'DIN', 'DIN Alternate', 'Barlow', 'Segoe UI', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: #fff; font-size: 16px; line-height: 1.45; }
.top { background: var(--p900); color: #fff; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; gap: 12px; }
.brand { font-weight: 700; letter-spacing: .02em; font-size: 18px; }
.brand span { color: var(--p300); font-weight: 400; }
#who { font-size: 13px; color: var(--p100); text-align: right; }
#who button { margin-left: 8px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 8px 16px 0; background: var(--p100); border-bottom: 2px solid var(--p700); }
.tabs button { background: transparent; border: 0; color: var(--p700); padding: 10px 14px; font: inherit; font-weight: 700; cursor: pointer; border-radius: 8px 8px 0 0; white-space: nowrap; }
.tabs button.on { background: var(--p700); color: #fff; }
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 16px; }
.subtabs button { background: var(--p100); color: var(--p700); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 14px; cursor: pointer; }
.subtabs button.on { background: var(--p500); color: #fff; border-color: var(--p500); }
.wrap { max-width: 980px; margin: 0 auto; padding: 16px; }
h1, h2, h3 { color: var(--p900); margin: 0 0 8px; }
h2 { font-size: 20px; } h3 { font-size: 16px; margin-top: 20px; }
.muted { color: var(--muted); font-size: 14px; }
.card { background: var(--p50); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 0 0 14px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
label { display: block; font-size: 13px; color: var(--muted); margin: 8px 0 2px; }
input, select, textarea { font: inherit; padding: 9px 10px; border: 1px solid var(--p300); border-radius: 8px; background: #fff; color: var(--ink); max-width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--p500); outline-offset: 1px; }
textarea { width: 100%; min-height: 90px; }
.grow { flex: 1 1 200px; }
button.btn, button.ghost, button.danger { font: inherit; font-weight: 700; padding: 9px 14px; border-radius: 8px; border: 1px solid var(--p700); cursor: pointer; }
button.btn { background: var(--p700); color: #fff; }
button.btn:hover { background: var(--p900); }
button.ghost { background: #fff; color: var(--p700); }
button.danger { background: #fff; color: var(--bad); border-color: var(--bad); }
button:disabled { opacity: .5; cursor: default; }
.who-btn { background: transparent; border: 1px solid var(--p300); color: #fff; border-radius: 6px; padding: 3px 8px; font: inherit; font-size: 12px; cursor: pointer; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--p100); color: var(--p900); position: sticky; top: 0; }
td.num, th.num { text-align: right; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: var(--p100); color: var(--p700); }
.pill.ok { background: #dff2e7; color: var(--ok); }
.pill.bad { background: #f9dedc; color: var(--bad); }
.pick { border: 1px solid var(--line); border-radius: 8px; margin-top: 4px; background: #fff; }
.pick button { display: block; width: 100%; text-align: left; background: #fff; border: 0; border-bottom: 1px solid var(--line); padding: 8px 10px; font: inherit; cursor: pointer; }
.pick button:hover { background: var(--p100); }
.total { font-size: 28px; font-weight: 700; color: var(--p700); }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--p900); color: #fff; padding: 10px 16px; border-radius: 10px; max-width: 90vw; z-index: 9; }
.toast.err { background: var(--bad); }
pre.out { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px; white-space: pre-wrap; font-size: 13px; max-height: 260px; overflow: auto; }
.login { max-width: 380px; margin: 40px auto; }
@media (max-width: 600px) { th, td { padding: 6px 6px; font-size: 13px; } }

/* Group pages editor */
.two { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; } @media (max-width: 700px) { .two { grid-template-columns: 1fr; } }
.imgprev { display: grid; place-items: center; min-height: 120px; background: #fff; border: 1px dashed var(--p300); border-radius: 10px; margin: 8px 0; overflow: hidden; }
.imgprev img { display: block; max-width: 100%; max-height: 220px; }
.imgprev.round { width: 140px; height: 140px; border-radius: 50%; } .imgprev.round img { width: 100%; height: 100%; object-fit: cover; max-height: none; }
.toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; align-items: center; } .toolbar.dim button:not(:last-child) { opacity: .4; pointer-events: none; }
.toolbar .sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
button.sm { padding: 5px 10px; font-size: 14px; border-radius: 8px; border: 1px solid var(--p700); font: inherit; font-size: 14px; font-weight: 700; background: #fff; color: var(--p700); cursor: pointer; }
textarea.md { font-family: ui-monospace, Menlo, monospace; font-size: 14px; min-height: 280px; }
.md-preview { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px; max-width: 68ch; }
.prose img { max-width: 100%; border-radius: 10px; } .prose a { color: var(--p700); }
.blk-callout { background: var(--p100); border-radius: 12px; padding: 4px 16px; margin: 14px 0; }
.blk-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 14px 0; } .blk-photos p { display: contents; } .blk-photos img { width: 100%; height: 180px; object-fit: cover; }
.blk-quote { margin: 16px 0; font-size: 20px; font-weight: 700; color: var(--p700); } .blk-quote p:last-child { font-size: 14px; font-weight: 400; color: var(--muted); }
a.blk-button { display: inline-block; background: var(--p700); color: #fff !important; padding: 10px 18px; border-radius: 999px; text-decoration: none; font-weight: 700; }

label.check { display: flex; gap: 8px; align-items: center; font-size: 15px; color: var(--ink); margin: 10px 0; cursor: pointer; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.swatch.auto { background: #fff; color: var(--p900); font-size: 11px; font-weight: 700; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--p900); }
.colorchip { display: inline-block; padding: 6px 14px; border-radius: 999px; color: #fff; font-size: 13px; font-weight: 700; }
