/* Willowlore Control (apps/control). Built from the approved mockups of 17 Nov 2026
   (/mnt/project-files/platform-panel/mock/ctl.css): paper, ink, forest band, willow gold. */
@font-face { font-family: 'Inter'; src: url('/fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('/fonts/newsreader.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
:root {
  --paper: #f0efe8; --surface: #ffffff; --raised: #f8f7f2; --hover: #ecebe3; --select: #e6ebe4;
  --ink: #1e2a24; --ink-2: #3f4c45; --muted: #5d6860; --line: #e0dfd5; --line-2: #cfcfc3; --field: #848f86;
  --band: #1f3a2e; --band-ink: #e9efe9; --band-muted: #a9bcb0; --band-on: #2c4d3e;
  --gold: #a8742a; --gold-bg: #f6ecd9;
  --ok: #2f6a4c; --ok-bg: #e3f0e6; --warn: #7a5c14; --warn-bg: #fbf3d6; --bad: #a03030; --bad-bg: #fbe9e7;
  --info: #2f5277; --info-bg: #e6eef7; --vio: #5a3a6e; --vio-bg: #efe8f4;
  --c1: #1f6b4a; --c2: #3e63b8; --c3: #b5752a; --c4: #8a4f9e;
  --r: 8px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 15px/1.5 Inter, system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }
.serif { font-family: Newsreader, Georgia, serif; font-weight: 500; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.num { font-variant-numeric: tabular-nums; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i.s { width: 15px; height: 15px; }

/* Shell */
.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--band); color: var(--band-ink); padding: 16px 12px 24px; font-size: 14.5px; display: flex; flex-direction: column; }
.sbrand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 16px; }
.sbrand b { font: 600 19px Newsreader, serif; letter-spacing: .02em; display: block; line-height: 1.1; }
.sbrand small { color: var(--band-muted); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; }
.mark { width: 30px; height: 30px; flex: none; }
.side .grp { margin: 16px 10px 6px; font: 600 12px Inter; letter-spacing: .08em; text-transform: uppercase; color: var(--band-muted); }
.side a.nav { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 6px; color: var(--band-ink); font-weight: 500; opacity: .88; }
.side a.nav.on { background: var(--band-on); opacity: 1; font-weight: 600; box-shadow: inset 3px 0 0 var(--gold); }
.side a .n { margin-left: auto; font: 600 12px Inter; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; background: rgba(255,255,255,.12); }
.side a .n.hot { background: #d9534f; color: #fff; }
.side .sfoot { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); display: grid; gap: 4px; }
.me { display: flex; gap: 10px; align-items: center; padding: 8px 10px; }
.me small { display: block; color: var(--band-muted); font-size: 12.5px; }
.top { height: 58px; display: flex; align-items: center; gap: 14px; padding: 0 28px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.cmd { flex: 1; max-width: 520px; height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid var(--field); border-radius: var(--r); color: var(--muted); }
.cmd kbd { margin-left: auto; }
kbd { font: 500 12px Inter; padding: 1px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; color: var(--muted); background: var(--raised); }
.top .right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 99px; font: 600 13px Inter; background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.bad { background: var(--bad-bg); color: var(--bad); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #3c6a55; color: #fff; display: grid; place-items: center; font: 600 13px Inter; flex: none; }
.avatar.sm { width: 26px; height: 26px; font-size: 11.5px; }
.main { padding: 26px 32px 56px; min-width: 0; max-width: 1360px; }

/* Page head */
.ph { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.ph h1 { font: 500 34px/1.1 Newsreader, serif; letter-spacing: -.01em; }
.ph p { margin-top: 4px; color: var(--muted); max-width: 660px; }
.ph .acts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { font-size: 13.5px; color: var(--muted); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-top: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 12px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.tabs a.on { color: var(--ink); border-color: var(--ink); font-weight: 600; }
.tabs .n { font: 600 12px Inter; padding: 0 6px; border-radius: 99px; background: var(--hover); }

/* Controls */
.btn { height: 38px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--field); background: var(--surface); color: var(--ink); font: 600 14px Inter; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.btn.pri { background: var(--band); border-color: var(--band); color: #fff; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13.5px; }
.btn.danger { color: var(--bad); border-color: color-mix(in oklab, var(--bad), transparent 50%); }
.field { display: grid; gap: 5px; }
.field label { font-weight: 600; font-size: 14px; }
.field .hint { font-size: 13px; color: var(--muted); }
.input { height: 40px; border: 1px solid var(--field); border-radius: var(--r); padding: 0 12px; display: flex; align-items: center; background: var(--surface); gap: 8px; min-width: 0; }
.input.ro { background: var(--raised); color: var(--ink-2); border-style: dashed; }
.input .suffix { margin-left: auto; color: var(--muted); font-size: 13.5px; }
.seg { display: inline-flex; border: 1px solid var(--field); border-radius: var(--r); overflow: hidden; }
.seg a { padding: 7px 12px; font-weight: 500; font-size: 14px; border-right: 1px solid var(--line-2); }
.seg a:last-child { border-right: 0; }
.seg a.on { background: var(--band); color: #fff; }
.switch { width: 38px; height: 22px; border-radius: 99px; background: var(--line-2); position: relative; flex: none; }
.switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.switch.on { background: var(--ok); } .switch.on::after { left: 19px; }

/* Badges, dots */
.b { display: inline-flex; align-items: center; gap: 5px; height: 23px; padding: 0 8px; border-radius: 6px; font: 600 12.5px Inter; white-space: nowrap; background: var(--hover); color: var(--ink-2); }
.b.ok { color: var(--ok); background: var(--ok-bg); } .b.warn { color: var(--warn); background: var(--warn-bg); }
.b.bad { color: var(--bad); background: var(--bad-bg); } .b.info { color: var(--info); background: var(--info-bg); }
.b.vio { color: var(--vio); background: var(--vio-bg); } .b.gold { color: #7a5218; background: var(--gold-bg); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--line-2); flex: none; }
.dot.ok { background: #3c8a62; } .dot.warn { background: #c99a2e; } .dot.bad { background: #c0423c; } .dot.off { background: #b8b8ad; }

/* Cards, grids, tables */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px rgba(30,42,36,.04); min-width: 0; }
.card .hd { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card .hd h2 { font-size: 16px; }
.card .hd .more { margin-left: auto; font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.card .bd { padding: 16px 18px; }
.grid { display: grid; gap: 16px; margin-top: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.kpi { padding: 14px 16px; display: grid; gap: 2px; }
.kpi .l { font-size: 13.5px; color: var(--muted); font-weight: 500; }
.kpi .v { font: 600 28px/1.15 Inter; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi .d { font-size: 13px; color: var(--muted); }
.kpi .d.up { color: var(--ok); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font: 600 12.5px Inter; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.sel td { background: var(--select); }
.tbl .r { text-align: right; }
.who { display: flex; gap: 10px; align-items: center; }
.who b { display: block; }
.who small { color: var(--muted); font-size: 13px; display: block; }
.crest { width: 30px; height: 34px; border-radius: 3px 3px 15px 15px; flex: none; display: grid; place-items: center; color: #fff; font: 600 13px Newsreader, serif; }
.crest.gil { background: #a51f21; } .crest.mie { background: #c9a227; color: #1e1a10; } .crest.bru { background: #3d5a8a; } .crest.new { background: var(--line-2); color: var(--ink-2); }
.row { display: flex; gap: 10px; align-items: center; }
.list { display: grid; }
.li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.li .t { flex: 1; min-width: 0; }
.li .t b { display: block; font-weight: 600; }
.li .t span { color: var(--muted); font-size: 13.5px; }
.note { padding: 12px 16px; border-radius: 10px; display: flex; gap: 12px; align-items: flex-start; font-size: 14px; }
.note.warn { background: var(--warn-bg); } .note.info { background: var(--info-bg); } .note.ok { background: var(--ok-bg); } .note.bad { background: var(--bad-bg); }
.note.gold { background: var(--gold-bg); }
.bar { height: 8px; border-radius: 99px; background: var(--hover); overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; background: var(--c1); }
.bar i.c2 { background: var(--c2); } .bar i.c3 { background: var(--c3); } .bar i.c4 { background: var(--c4); } .bar i.w { background: #c99a2e; } .bar i.free { background: transparent; }
.spark { width: 100%; height: 40px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; vertical-align: -1px; }
.ev { display: grid; grid-template-columns: 74px 14px minmax(0, 1fr); gap: 10px; padding: 10px 18px; font-size: 14px; }
.ev time { color: var(--muted); font-size: 13px; text-align: right; }
.ev .ln { position: relative; } .ev .ln::before { content: ''; position: absolute; left: 6px; top: 16px; bottom: -14px; width: 1px; background: var(--line); }
.ev .ln .dot { position: relative; top: 5px; }
.steps { display: grid; gap: 2px; }
.step { display: flex; gap: 12px; align-items: center; padding: 9px 12px; border-radius: 8px; font-weight: 500; color: var(--ink-2); }
.step .sn { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; font: 600 12.5px Inter; flex: none; background: var(--surface); }
.step.done .sn { background: var(--ok); border-color: var(--ok); color: #fff; }
.step.on { background: var(--select); color: var(--ink); font-weight: 600; }
.step.on .sn { border-color: var(--ink); }
.who-owns { font: 600 11.5px Inter; letter-spacing: .05em; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; }
.who-owns.rel { background: var(--info-bg); color: var(--info); } .who-owns.live { background: var(--ok-bg); color: var(--ok); } .who-owns.fam { background: var(--gold-bg); color: #7a5218; }
.chart { width: 100%; display: block; }
.chart text { font: 12px Inter; fill: var(--muted); }
.mx { border-collapse: separate; border-spacing: 4px; font-size: 13.5px; }
.mx td.c { width: 30px; height: 26px; border-radius: 5px; background: var(--ok-bg); text-align: center; }
.mx td.c.warn { background: #f3dfa0; } .mx td.c.bad { background: #f0b4ae; } .mx td.c.na { background: var(--hover); }
.mx th { font-weight: 500; color: var(--muted); text-align: left; padding-right: 10px; white-space: nowrap; }
.hideD { display: none; }

/* Phone */
.tabbar { display: none; }
@media (max-width: 760px) {
  .layout { display: block; }
  .side { display: none; }
  .top { padding: 0 16px; height: 56px; }
  .top .cmd { display: none; }
  .ptitle { display: flex !important; gap: 10px; align-items: center; font: 600 18px Newsreader, serif; }
  .main { padding: 18px 16px 110px; }
  .ph h1 { font-size: 28px; }
  .ph .acts { margin-left: 0; width: 100%; }
  .ph .acts .btn { flex: 1; justify-content: center; }
  .g2, .g3, .g21, .g12 { grid-template-columns: minmax(0, 1fr); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi .v { font-size: 23px; }
  .hideP { display: none !important; }
  .hideD { display: initial; }
  .tbl th, .tbl td { padding: 10px 10px; }
  .tabbar { display: grid; position: fixed; bottom: 0; left: 0; right: 0; height: 76px; background: var(--surface); border-top: 1px solid var(--line); grid-template-columns: repeat(5, 1fr); padding-bottom: 14px; z-index: 6; }
  .tabbar a { display: grid; justify-items: center; align-content: center; gap: 3px; font: 600 11.5px Inter; color: var(--muted); position: relative; }
  .tabbar a.on { color: var(--ink); }
  .tabbar a .n { position: absolute; top: 6px; left: 56%; background: #c0423c; color: #fff; font: 700 11px Inter; padding: 0 5px; border-radius: 99px; }
  .top .pill span.t { display: none; }
}
.ptitle { display: none; }
.card.bd { padding: 16px 18px; }
@media (max-width: 760px){ .card .bd .row, .card .bd.row { flex-wrap: wrap; } }
/* Production additions */
.sample { display: none; }
textarea.input { height: auto; min-height: 110px; padding: 10px 12px; font: inherit; width: 100%; resize: vertical; }
input.input, select.input { font: inherit; color: inherit; width: 100%; }
select.input { appearance: auto; }
.input:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid #2b6cb0; outline-offset: 2px; }
button.btn { cursor: pointer; }
form.inline { display: inline; }
.flash { margin-top: 16px; }
.empty { padding: 28px 18px; color: var(--muted); text-align: center; }
.kv { display: grid; grid-template-columns: 130px minmax(0,1fr); gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.signin { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--band); }
.signin .card { width: min(420px, 100%); padding: 28px; display: grid; gap: 16px; }
.code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13px; background: var(--raised); border: 1px dashed var(--line-2); border-radius: 8px; padding: 10px 12px; overflow-wrap: anywhere; }
.pager { display: flex; gap: 8px; justify-content: flex-end; padding: 10px 14px; }
.tblwrap { overflow-x: auto; }
@media (max-width: 760px) { .tabbar { position: fixed; padding-bottom: max(14px, env(safe-area-inset-bottom)); } }

.kpi .d,.kpi .v{overflow-wrap:anywhere;min-width:0}
.kpi{min-width:0}
/* Form fields without the .input class (settings and setup forms) look the same. */
.field input:not([type=checkbox]):not([type=radio]):not([type=hidden]), .field select, form.row input[name=confirm] { height: 40px; border: 1px solid var(--field); border-radius: var(--r); padding: 0 12px; background: var(--surface); font: inherit; color: inherit; width: 100%; min-width: 0; }
.field textarea { border: 1px solid var(--field); border-radius: var(--r); padding: 10px 12px; background: var(--surface); font: inherit; color: inherit; width: 100%; resize: vertical; }
.field select { appearance: auto; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid #2b6cb0; outline-offset: 2px; }
.opt { display: flex; gap: 10px; align-items: flex-start; } .opt input { margin-top: 4px; flex: none; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 72px; }
.spark i { flex: 1; background: var(--ok); border-radius: 2px 2px 0 0; min-width: 2px; opacity: .85; }
.funnel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.funnel span { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 10px; }
.up { color: var(--ok); }
