/* P&V Shoppers — warm premium: ivory, ink, antique gold, serif headings. */
:root {
  --bg: #f7f3ea; --bg2: #efe8d8; --panel: #fffdf8; --line: #e4dcc8;
  --text: #1e1b16; --muted: #6a6254; --gold: #8a6212; --gold-soft: #c99a2e; --ink: #1e1b16;
  --ok: #3e6b4f; --warn: #8a6212; --bad: #a13a2e;
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --shadow: none;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16140f; --bg2: #1e1b14; --panel: #1c1913; --line: rgba(247, 243, 234, 0.12);
    --text: #f3eee2; --muted: #a89f8c; --gold: #d9b25a; --gold-soft: #d9b25a; --ink: #f3eee2;
    --ok: #7fb596; --warn: #e0b45a; --bad: #e58b7e;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: var(--bg); }
a { color: var(--gold); }
.hq { max-width: 1180px; margin: 0 auto; padding: clamp(18px, 4vw, 40px) clamp(14px, 4vw, 32px) 140px; display: flex; flex-direction: column; gap: 22px; min-height: 100vh; }

/* header */
.hq-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.eyebrow { margin: 0 0 4px; font-size: 15px; color: var(--gold); font-weight: 600; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; }
h1 { margin: 0; font-size: clamp(30px, 5vw, 42px); line-height: 1.1; }
.online { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.online i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { font: inherit; font-size: 16px; font-weight: 600; min-height: 46px; color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: 10px; padding: 9px 20px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; transition: background .15s, border-color .15s; }
.btn:hover { border-color: var(--gold-soft); }
.btn:focus-visible, .star-btn:focus-visible, .p-nav button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 2px; }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { background: #2c2820; border-color: var(--gold-soft); }
@media (prefers-color-scheme: dark) { .btn.primary { background: var(--gold-soft); color: #1e1b16; border-color: var(--gold-soft); } .btn.primary:hover { background: #e6c374; } }
.btn.ghost { border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); border-color: var(--line); }
.btn.small { padding: 6px 14px; font-size: 13px; }
.btn.big { font-size: 17px; min-height: 54px; padding: 14px 28px; }

/* tabs */
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); padding-bottom: 0; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .seg button { font: inherit; font-size: 15px; font-weight: 500; background: transparent; color: var(--muted); border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected='true'] { color: var(--text); border-bottom-color: var(--gold-soft); font-weight: 600; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.seg button { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 13px; }
.seg button[aria-selected='true'] { color: var(--text); border-color: var(--gold-soft); background: rgba(242, 183, 5, 0.12); }

/* sections + cards */
.sec { display: flex; flex-direction: column; gap: 18px; }
.sub { font-family: var(--serif); font-size: 24px; font-weight: 500; margin: 10px 0 -4px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(16px, 2.5vw, 22px); box-shadow: var(--shadow); min-width: 0; }
.card h3 { margin: 0 0 12px; font-family: var(--serif); font-size: 20px; font-weight: 500; }
.signin { text-align: center; padding: 56px 20px; max-width: 520px; margin: 40px auto; }
.signin h2 { font-family: var(--serif); font-size: 26px; margin: 0 0 8px; }
.signin p { color: var(--muted); margin: 0 0 22px; }

/* numbers */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 14px; }
.kpi .label { color: var(--muted); font-size: 13px; }
.kpi .value { font-family: var(--serif); font-size: clamp(26px, 3.4vw, 32px); font-weight: 500; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .subv { color: var(--muted); font-size: 13px; margin-top: 2px; }
.big-kpi .value { font-size: clamp(32px, 6vw, 44px); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 18px; }

/* tables */
.wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 13px; }
td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; overflow-wrap: normal; }
tr.unread td { font-weight: 600; }
.empty td { color: var(--muted); font-style: italic; }
.note { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.pill { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; background: rgba(127, 127, 127, 0.10); white-space: nowrap; }
.good { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.alerts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.alerts li { border-left: 3px solid var(--bad); padding-left: 12px; }
.alerts li.ok { border-color: var(--ok); }

/* charts */
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(80px, 38%) 1fr auto; align-items: center; gap: 10px; font-size: 14px; }
.bar-row .lbl { color: var(--muted); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .trk { height: 10px; border-radius: 999px; background: rgba(127, 127, 127, 0.12); overflow: hidden; }
.bar-row .fill { height: 100%; background: var(--gold-soft); border-radius: 999px; }
.bar-row .fill.amber { background: #8a6d3b; }
.bar-row .v { font-variant-numeric: tabular-nums; }
.months { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: 10px; }
.month { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; font-size: 11px; color: var(--muted); }
.month .pair { display: flex; gap: 2px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.month .b { width: 40%; min-height: 1px; border-radius: 4px 4px 0 0; }
.month .b.in { background: var(--gold-soft); }
.month .b.out { background: #8a6d3b; }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* clients */
.ccards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.ccard { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--panel); display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.ccard h4 { margin: 0; font-family: var(--serif); font-size: 17px; }
.ccard .row { display: flex; justify-content: space-between; gap: 8px; }
.ccard .row span:first-child { color: var(--muted); }
.prog { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--ok); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filters input, .filters select { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; flex: 1 1 160px; min-width: 0; }
ul.roster { columns: 2 240px; font-size: 14px; margin: 0; padding-left: 1.1em; }
ul.roster li { margin-bottom: 6px; break-inside: avoid; }
.err { color: var(--bad); font-size: 13px; }

/* talk bar */
.voicebar { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(560px, calc(100% - 24px)); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 10px 40px rgba(31, 27, 22, 0.16); backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3); padding: 10px 14px; z-index: 20; }
.voice-row { display: flex; align-items: center; gap: 14px; }
.voice-note { position: absolute; bottom: calc(100% + 10px); left: 0; right: 0; margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 14px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.talk { position: relative; width: 54px; height: 54px; flex: 0 0 54px; border-radius: 50%; border: 0; cursor: pointer; background: var(--gold-soft); color: #1e1b16; display: grid; place-items: center; transition: transform .15s; }
.talk:hover { transform: scale(1.04); }
.talk svg { width: 24px; height: 24px; fill: currentColor; position: relative; }
.talk .ring { position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--gold-soft); opacity: 0; }
.talk-label { font-weight: 500; flex: 1; }
.voicebar[data-state='connecting'] .ring { opacity: .6; animation: spin 1.2s linear infinite; border-right-color: transparent; }
.voicebar[data-state='listening'] .ring { opacity: 1; animation: breathe 1.8s ease-in-out infinite; }
.voicebar[data-state='speaking'] .ring { opacity: 1; animation: wave .9s ease-in-out infinite; }
.voicebar[data-state='listening'] .talk, .voicebar[data-state='speaking'] .talk { background: #1e1b16; color: #f7f3ea; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.12); opacity: .45; } }
@keyframes wave { 50% { transform: scale(1.22); opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .voicebar .ring { animation: none !important; } }
@media (max-width: 560px) {
  .hq-head { align-items: flex-start; }
  .actions { width: 100%; }
  .actions .btn { flex: 1; text-align: center; padding: 9px 10px; }
}


/* ===== brand + welcome ===== */
.brand-mark { width: 44px; height: 44px; border-radius: 10px; display: block; }
.hq-head { align-items: center; }
.mode-welcome .hq, .mode-client .hq-head { }
.mode-welcome .hq-head, .mode-client .hq-head { display: none; }
.hq.mode-welcome { max-width: none; padding: 0; gap: 0; }
.welcome { display: grid; min-height: 100vh; grid-template-rows: auto 1fr; }
.w-brand { background: #1e1b16; color: #f3eee2; padding: 28px clamp(24px, 6vw, 56px) 32px; display: flex; flex-direction: column; gap: 14px; justify-content: flex-end; }
.w-brand .brand-mark { width: 56px; height: 56px; }
.w-name { margin: 0; font-family: var(--serif); font-size: 22px; letter-spacing: .01em; color: #d9b25a; }
.w-tag { margin: 0; font-family: var(--serif); font-size: clamp(28px, 6vw, 44px); line-height: 1.12; max-width: 14em; font-weight: 400; }
.w-panel { position: relative; padding: clamp(28px, 6vw, 56px); display: flex; flex-direction: column; justify-content: flex-start; max-width: 520px; width: 100%; margin: 0 auto; }
.w-panel .lang { position: absolute; top: 14px; right: clamp(16px, 4vw, 40px); }
.w-panel h1, .w-panel .stack h2 { font-size: clamp(28px, 5vw, 36px); margin: 0 0 8px; text-align: left; }
.w-panel .lead { color: var(--muted); margin: 0 0 24px; }
.choices { display: flex; flex-direction: column; gap: 12px; }
.choices .btn.big { width: 100%; }
.stack { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.stack label { font-weight: 600; font-size: 16px; }
.stack input { font: inherit; font-size: 19px; min-height: 54px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); width: 100%; }
.stack input.code { letter-spacing: .5em; text-align: center; font-size: 28px; font-weight: 600; font-family: var(--serif); }
.stack .btn.big { width: 100%; }
.msg { margin: 0; font-size: 15px; color: var(--muted); }
.msg:empty { display: none; }
@media (min-width: 900px) {
  .welcome { grid-template-columns: minmax(380px, 1fr) minmax(460px, 1fr); grid-template-rows: none; }
  .w-brand { padding: 56px; justify-content: space-between; }
  .w-brand .brand-mark { order: -1; }
  .w-panel { justify-content: center; margin: 0 auto; }
}

/* ===== client portal ===== */
.hq.mode-client { max-width: 680px; padding-bottom: 120px; gap: 0; }
.portal { display: flex; flex-direction: column; }
.p-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.p-brand { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-size: 21px; }
.p-brand .brand-mark { width: 38px; height: 38px; border-radius: 9px; }
.p-hello { margin: 26px 0 4px; font-size: clamp(32px, 8vw, 46px); }
.p-sub { margin: 0 0 8px; color: var(--muted); }
.p-sec { padding: 24px 0; border-bottom: 1px solid var(--line); }
.p-sec:last-child { border-bottom: 0; }
.p-sec h2, .ptab > h2 { margin: 0 0 6px; font-size: 26px; }
.p-sec h2.proj-title { font-size: 30px; }
.p-sec .progress, .ptab .help { margin: 0 0 14px; color: var(--muted); font-size: 16px; }
.timeline { list-style: none; margin: 4px 0 0; padding: 0; }
.tl { position: relative; padding: 0 0 20px 38px; font-size: 18px; min-height: 28px; }
.tl:last-child { padding-bottom: 0; }
.tl::before { content: ''; position: absolute; left: 11px; top: 26px; bottom: -2px; width: 2px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl.done::before { background: var(--gold-soft); }
.tl .node { position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); background: var(--bg); display: grid; place-items: center; color: var(--bg); }
.tl.done .node { background: var(--gold-soft); border-color: var(--gold-soft); color: #1e1b16; }
.tl.doing .node { border-color: var(--gold-soft); box-shadow: 0 0 0 4px rgba(201, 154, 46, .2); }
.tl.doing .node::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--gold-soft); }
.tl.todo { color: var(--muted); }
.tl .node svg { width: 14px; height: 14px; }
.tl.doing { font-weight: 600; }
.needs { display: block; }
.need { display: flex; flex-direction: column; gap: 10px; padding: 16px 0; border-top: 1px solid var(--line); }
.need:first-child { border-top: 0; padding-top: 4px; }
.need-text strong { display: block; font-size: 19px; font-weight: 600; }
.need-text .due { display: block; color: var(--muted); font-size: 16px; margin-top: 2px; }
.need .btn { width: 100%; min-height: 52px; }
.need.is-done .need-text strong { color: var(--muted); font-weight: 500; }
.need .doneline { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ok); font-weight: 600; }
.need .doneline svg { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; }
.install { background: var(--bg2); border: 0; border-radius: var(--radius); padding: 18px 20px; margin: 22px 0 6px; }
.install h3 { margin: 0 0 6px; font-family: var(--serif); font-size: 20px; font-weight: 500; }
.install p { margin: 0 0 6px; font-size: 16px; color: var(--muted); }
.contact { margin: 18px 0 0; font-size: 16px; color: var(--muted); }
.contact + .contact { margin-top: 6px; }
#svc-list { display: block; margin-top: 8px; }
.svc { padding: 22px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.svc:first-child { border-top: 0; }
.svc-head { display: flex; gap: 14px; align-items: flex-start; }
.svc-icon { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 10px; background: #1e1b16; color: #d9b25a; display: grid; place-items: center; }
.svc-icon svg { width: 22px; height: 22px; }
.svc-mid { flex: 1; min-width: 0; }
.svc-mid h3 { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 500; line-height: 1.2; }
.svc-sum { margin: 4px 0 0; color: var(--muted); font-size: 16px; }
.badge { display: inline-flex; align-items: center; gap: 7px; margin-top: 8px; font-size: 15px; font-weight: 600; }
.badge::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.badge.done { color: var(--ok); } .badge.done::before { background: var(--ok); }
.badge.doing { color: var(--warn); } .badge.doing::before { background: var(--gold-soft); }
.badge.todo { color: var(--muted); }
.svc-details { margin: 0; padding-left: 20px; font-size: 16px; }
.review { background: var(--bg2); border-radius: var(--radius); padding: 16px 18px; }
.review h4 { margin: 0 0 2px; font-family: var(--serif); font-size: 20px; font-weight: 500; }
.review .help { margin: 0; font-size: 15px; color: var(--muted); }
.stars { display: flex; gap: 2px; margin: 8px 0 4px -6px; }
.star-btn { width: 52px; height: 52px; border: 0; background: transparent; color: #cdc5b0; cursor: pointer; padding: 0; display: grid; place-items: center; }
.star-btn svg { width: 34px; height: 34px; fill: currentColor; }
.star-btn.on { color: var(--gold-soft); }
.review label { display: block; font-weight: 600; font-size: 15px; margin: 8px 0 4px; }
.review textarea { width: 100%; font: inherit; font-size: 17px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); resize: vertical; }
.review .btn.primary { width: 100%; margin-top: 10px; min-height: 52px; }
.review-done .thanks { font-family: var(--serif); font-size: 20px; margin: 0; }
.review-done .mine { color: var(--gold-soft); font-size: 22px; letter-spacing: 3px; margin: 2px 0; }
.review-done .mine-comment { margin: 4px 0 8px; font-size: 16px; }
.p-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; padding: 0 8px env(safe-area-inset-bottom); background: var(--panel); border-top: 1px solid var(--line); }
.p-nav button { flex: 1; max-width: 220px; min-height: 62px; border: 0; border-top: 3px solid transparent; background: transparent; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; }
.p-nav button svg { width: 24px; height: 24px; }
.p-nav button[aria-selected="true"] { color: var(--text); border-top-color: var(--gold-soft); }
.ico { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 900px) { .p-nav { position: sticky; bottom: 0; } .hq.mode-client { padding-bottom: 0; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
#proj-next { white-space: pre-line; margin: 0; font-size: 19px; }
.review-done .mine .ico { width: 22px; height: 22px; stroke: none; fill: #cdc5b0; }
.review-done .mine .ico.on { fill: var(--gold-soft); }
.review-done .mine { display: flex; gap: 2px; letter-spacing: 0; }
.stars .ico { stroke: none; }
.need .doneline span { display: inline-flex; align-items: center; gap: 6px; }
.need .doneline svg { margin-right: 0; }
.svc > .btn { align-self: flex-start; padding-left: 0; }
.ptab > h2 { margin-top: 22px; }
.chat { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 18px; }
.bubble { max-width: 86%; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.bubble .who { display: block; font-size: 13px; font-weight: 600; color: var(--gold); margin-bottom: 2px; }
.bubble .btext { margin: 0; font-size: 17px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble .when { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.bubble.theirs { align-self: flex-start; border-left: 3px solid var(--gold-soft); }
.bubble.mine { align-self: flex-end; background: var(--ink); border-color: var(--ink); color: var(--panel); }
.bubble.mine .who, .bubble.mine .when { color: inherit; opacity: .75; }
.composer { display: flex; flex-direction: column; gap: 8px; }
.composer label { font-weight: 600; font-size: 15px; }
.composer textarea { width: 100%; box-sizing: border-box; }
.navico { position: relative; display: inline-flex; }
.dot { position: absolute; top: -6px; right: -10px; min-width: 18px; height: 18px; padding: 0 4px; box-sizing: border-box; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.threads { display: flex; flex-direction: column; gap: 8px; }
.thread { display: grid; gap: 2px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font: inherit; color: var(--text); cursor: pointer; }
.thread.unread { border-left: 4px solid var(--gold-soft); }
.thread .snip { color: var(--muted); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread .when { color: var(--muted); font-size: 12px; }
#thread textarea { width: 100%; box-sizing: border-box; margin-top: 10px; }
.doc-sec { margin: 0 0 22px; }
.doc-sec h3 { margin: 0 0 8px; font-size: 20px; }
.doc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.doc-mid { display: grid; gap: 2px; min-width: 0; }
.doc-mid strong { overflow-wrap: anywhere; }
.doc-row .btn { white-space: nowrap; text-decoration: none; }
.badge.late { color: var(--bad); }
.erow { display: grid; gap: 8px; padding: 12px; margin: 8px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); }
.efield { display: grid; gap: 4px; margin: 10px 0; font-weight: 600; font-size: 15px; }
.efield input[type="text"], .efield select, .efield textarea, .erow input, .erow select, .erow textarea { width: 100%; box-sizing: border-box; font: inherit; font-weight: 400; }
.sec > h3 { margin: 14px 0 6px; font-size: 24px; }
.sec h4 { margin: 14px 0 6px; font-size: 17px; }
