:root {
  --bg: #f4f5f7; --panel: #fff; --line: #e4e7ec; --text: #1b2130; --muted: #6a7284; --soft: #f7f8fa;
  --accent: #ff7a59; --accent-ink: #fff; --accent-soft: #fff1ec;
  --red: #e5484d; --red-soft: #fdecec; --blue: #2f6fde; --blue-soft: #eaf1ff;
  --green: #1f9d55; --green-soft: #e5f6ec; --grey-soft: #eef0f3;
  --radius: 14px; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif; font-size: 15px; color: var(--text);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, textarea { font: inherit; color: var(--text); }

/* header */
.top { display: flex; align-items: center; gap: 20px; padding: 10px 20px; background: var(--panel); border-bottom: 1px solid var(--line); flex-shrink: 0; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 650; }
.logo { background: var(--accent); color: var(--accent-ink); border-radius: 8px; padding: 4px 7px; font-size: 12px; font-weight: 700; }
.tabs { display: flex; gap: 2px; margin-left: auto; }
.tab { position: relative; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.tab.active { background: var(--soft); color: var(--text); font-weight: 650; }
[hidden] { display: none !important; }
.badge { background: var(--red); color: #fff; border-radius: 10px; min-width: 20px; height: 20px; padding: 0 6px; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.page { width: 100%; max-width: 980px; margin: 0 auto; padding: 24px 20px 40px; overflow: auto; }
.scroll { overflow: auto; flex: 1; }

/* buttons */
.btn { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 9px 14px; font-weight: 550; white-space: nowrap; color: var(--text); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.big { padding: 12px 18px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { border: 0; background: none; font-size: 18px; color: var(--muted); padding: 6px 8px; border-radius: 8px; }
.icon-btn:hover { background: var(--soft); }

/* home */
.home-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.home-head h1 { margin: 0; font-size: 24px; }
.alert { display: flex; align-items: center; gap: 12px; background: var(--red-soft); border: 1px solid #f6c7c8; color: #9b1c20; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 20px; font-weight: 600; }
.alert .dot-big { width: 28px; height: 28px; border-radius: 50%; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.search { width: 100%; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 10px 14px; margin-bottom: 20px; }
.section { margin-bottom: 28px; }
.section-head { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.count { background: var(--grey-soft); color: var(--muted); border-radius: 10px; padding: 1px 8px; font-size: 12px; }
.section.waiting .count { background: var(--red); color: #fff; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column; gap: 8px; text-align: left; color: var(--text); border-left-width: 4px; transition: transform .08s ease, box-shadow .08s ease; }
.card:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,24,40,.08); }
.card.waiting { border-left-color: var(--red); }
.card.working { border-left-color: var(--blue); }
.card.done { border-left-color: var(--green); }
.card.rejected, .card.error { border-left-color: #b9bfca; }
.card .title { font-weight: 650; font-size: 15px; line-height: 1.3; }
.card .headline { font-size: 14px; color: var(--text); }
.card.waiting .headline { color: #9b1c20; font-weight: 600; }
.card .foot { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; margin-top: auto; }
.pill { font-size: 12px; border-radius: 10px; padding: 2px 9px; font-weight: 650; white-space: nowrap; }
.pill.waiting { background: var(--red-soft); color: var(--red); }
.pill.working { background: var(--blue-soft); color: var(--blue); }
.pill.done { background: var(--green-soft); color: var(--green); }
.pill.rejected, .pill.error { background: var(--grey-soft); color: var(--muted); }
.empty-state { text-align: center; color: var(--muted); padding: 60px 20px; }
.empty-state h2 { color: var(--text); margin: 0 0 8px; }

/* thread */
.chat { flex: 1; min-height: 0; display: flex; flex-direction: column; width: 100%; max-width: 760px; margin: 0 auto; background: var(--panel); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--panel); }
.chat-head .t { flex: 1; min-width: 0; }
.chat-head .t b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-head .t span { font-size: 12px; color: var(--muted); }
.messages { flex: 1; overflow: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 10px; background: var(--soft); }
.day { align-self: center; font-size: 12px; color: var(--muted); background: var(--grey-soft); border-radius: 10px; padding: 2px 10px; margin: 6px 0; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 18px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; box-shadow: var(--shadow); }
.msg.in { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.msg.out { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.out.question { border-color: #f6c7c8; }
.msg.out.error, .msg.out.rejection { border-color: #d6d9df; color: var(--muted); }
.msg .time { display: block; font-size: 11px; opacity: .7; margin-top: 4px; text-align: right; }
.done-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--green); background: var(--green-soft); border-radius: 12px; padding: 4px 10px; border: 0; }
.typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; border-bottom-left-radius: 6px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #b5bccb; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
.typing-label { align-self: flex-start; font-size: 12px; color: var(--muted); margin-top: -4px; }
@keyframes blink { 0%, 80%, 100% { opacity: .3 } 40% { opacity: 1 } }

.composer { border-top: 1px solid var(--line); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--panel); display: flex; flex-direction: column; gap: 8px; }
.ask { background: var(--red-soft); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.ask .ask-title { font-weight: 700; color: #9b1c20; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.ask .ask-title::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.sugs { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.sugs div span { color: var(--muted); }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 18px; padding: 7px 14px; font-weight: 550; }
.chip.go { background: var(--green); border-color: var(--green); color: #fff; }
.input-row { display: flex; gap: 8px; align-items: flex-end; }
.input-row textarea { flex: 1; border: 1px solid var(--line); border-radius: 20px; padding: 10px 14px; resize: none; max-height: 160px; min-height: 42px; line-height: 1.4; background: var(--soft); }
.send { border: 0; background: var(--accent); color: #fff; }
.send:disabled { opacity: .4; }

/* compose */
.compose { display: flex; flex-direction: column; gap: 10px; max-width: 640px; margin: 0 auto; width: 100%; }
.compose h1 { margin: 0 0 4px; font-size: 22px; }
.compose label { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 6px; }
.compose input, .compose textarea { border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; background: var(--panel); width: 100%; }
.compose textarea { min-height: 200px; resize: vertical; line-height: 1.45; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip.on { border-color: var(--accent); background: var(--accent-soft); color: #b4421f; }
.examples { display: flex; flex-direction: column; gap: 6px; }
.example { text-align: left; border: 1px dashed var(--line); background: var(--panel); border-radius: 10px; padding: 9px 12px; color: var(--muted); font-size: 14px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px; }
.hint { color: var(--muted); font-size: 13px; }

/* drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(16,24,40,.35); z-index: 10; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--panel); z-index: 11; transform: translateX(100%); transition: transform .2s ease; display: flex; flex-direction: column; box-shadow: -8px 0 24px rgba(16,24,40,.12); }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 16px; }
.drawer-body { overflow: auto; padding: 8px 16px 24px; }
.rec { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.rec .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--soft); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.rec .main { flex: 1; min-width: 0; }
.rec .main b { display: block; }
.rec .main span { font-size: 13px; color: var(--muted); }
.rec .tag { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--green); }
.rec .tag.update { color: var(--blue); } .rec .tag.fail { color: var(--red); }
.links-note { font-size: 13px; color: var(--muted); padding-top: 12px; }

/* panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.panel h2 { margin: 0 0 10px; font-size: 17px; }
.status-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.status-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.status-card .t { font-weight: 650; display: flex; justify-content: space-between; align-items: center; }
.status-card .d { color: var(--muted); font-size: 13px; margin-top: 4px; word-break: break-word; }
.senders { list-style: none; padding: 0; margin: 8px 0; }
.senders li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sender-form { display: grid; grid-template-columns: 1fr 1.5fr auto; gap: 8px; margin-top: 10px; }
.sender-form input { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.log-list .rec { padding: 10px 0; }

@media (max-width: 640px) {
  .top { padding: 8px 12px; gap: 8px; }
  .brand-name { display: none; }
  .tab { padding: 7px 9px; font-size: 14px; }
  .page { padding: 16px 12px 32px; }
  .home-head h1 { font-size: 20px; }
  .grid { grid-template-columns: 1fr; }
  .chat { border: 0; }
  .msg { max-width: 90%; }
  .sender-form { grid-template-columns: 1fr; }
}

/* formatted worker messages */
.msg strong { font-weight: 700; }
.msg.in strong { color: #fff; }
.done-list { list-style: none; margin: 10px 0 2px; padding: 10px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; white-space: normal; }
.done-list li { display: flex; gap: 8px; align-items: baseline; font-size: 14px; }
.done-list .ok { color: var(--green); font-weight: 700; }
.done-list .ko { color: var(--red); font-weight: 700; }
.done-list a { font-weight: 600; }
.legacy { margin-top: 8px; font-size: 14px; white-space: normal; }

/* open points as cards */
.qstack { align-self: flex-start; width: min(82%, 520px); display: flex; flex-direction: column; gap: 8px; }
.qstack.live .qcard:not(.done) { border-color: #f6c7c8; box-shadow: 0 2px 10px rgba(229,72,77,.12); animation: pop .25s ease; }
.qcard { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.qcard .qtext { line-height: 1.4; }
.qcard.done { flex-direction: row; align-items: center; gap: 10px; padding: 8px 12px; background: var(--green-soft); border-color: transparent; color: #135c33; font-size: 14px; }
.qcard.done.no { background: var(--grey-soft); color: var(--muted); }
.qstack:not(.live) .qcard.done { background: var(--soft); color: var(--muted); }
.qcard .mark { font-weight: 800; }
.qcard .qans { font-weight: 700; margin-top: 2px; }
.qcard .undo { margin-left: auto; border: 0; background: none; color: var(--muted); font-size: 12px; text-decoration: underline; }
.qinput { display: flex; gap: 8px; align-items: center; }
.qinput input { flex: 1; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; background: var(--soft); font-weight: 600; }
.qprogress { height: 6px; border-radius: 3px; background: var(--grey-soft); overflow: hidden; }
.qprogress span { display: block; height: 100%; background: var(--green); transition: width .3s ease; }
.qcount { font-size: 12px; color: var(--muted); margin-top: -4px; }
@keyframes pop { from { transform: scale(.96); opacity: 0 } to { transform: none; opacity: 1 } }
@media (max-width: 640px) { .qstack { width: 92%; } }

/* question block v2 */
.qblock { align-self: stretch; background: var(--panel); border-radius: 16px; border: 1px solid var(--line); overflow: visible; display: flex; flex-direction: column; }
.qblock.live { border: 2px solid var(--red); box-shadow: 0 6px 20px rgba(229,72,77,.15); }
.qhead { display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-weight: 700; border-bottom: 1px solid var(--line); }
.qblock.live .qhead { background: var(--red-soft); color: #9b1c20; border-radius: 14px 14px 0 0; }
.qblock.past .qhead { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .02em; padding: 10px 16px; }
.qdot { width: 26px; height: 26px; border-radius: 50%; background: var(--red); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.qrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.qblock.past .qrow { padding: 10px 16px; }
.qrow:last-of-type { border-bottom: 0; }
.qrow .qtext { display: flex; gap: 10px; align-items: baseline; line-height: 1.4; }
.qn { width: 22px; height: 22px; border-radius: 50%; background: var(--grey-soft); color: var(--muted); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.qrow.ok .qn { background: var(--green); color: #fff; }
.qresult { font-weight: 700; color: var(--green); justify-self: end; text-align: right; }
.qresult.neg { color: var(--muted); }
.qbtns { display: inline-flex; gap: 0; justify-content: flex-end; justify-self: end; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.pick { border: 0; background: #fff; padding: 9px 18px; font-weight: 650; font-size: 14px; color: var(--muted); min-width: 92px; transition: background .12s ease, color .12s ease; }
.pick + .pick { border-left: 2px solid var(--line); }
.pick:hover { background: var(--soft); color: var(--text); }
.pick.yes.on { background: var(--green); color: #fff; }
.pick.no.on { background: var(--red); color: #fff; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.opt { border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 12px; font-weight: 600; color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
.opt em, .dd-opt em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 8px; padding: 1px 6px; }
.opt.on { border-color: var(--green); background: var(--green-soft); color: #135c33; }
.opt.on em { background: #fff; }
.qrow .qinput input { width: 100%; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; font-weight: 600; }
.qrow .qinput input:focus { outline: none; border-color: var(--accent); }
.qrow.ok .qinput input { border-color: var(--green); }
.dd { position: relative; }
.dd-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 12px; font-weight: 600; color: var(--muted); }
.dd-btn.on { color: var(--text); border-color: var(--green); }
.dd-pop { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 28px rgba(16,24,40,.15); padding: 8px; }
.dd-search { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; }
.dd-list { max-height: 220px; overflow: auto; display: flex; flex-direction: column; }
.dd-opt { text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; font-weight: 500; }
.dd-opt:hover { background: var(--soft); }
.dd-opt.on { background: var(--green-soft); font-weight: 700; }
.qsend { margin: 12px 16px 14px; align-self: flex-end; }
@media (max-width: 640px) {
  .qrow { grid-template-columns: 1fr; gap: 10px; }
  .qbtns, .opts { justify-content: flex-start; justify-self: start; }
  .qresult { justify-self: start; text-align: left; padding-left: 32px; }
  .qsend { align-self: stretch; }
}
.qsub { display: block; font-weight: 500; font-size: 13px; margin-top: 2px; }

/* thread layout with sidebar */
.thread-layout { flex: 1; min-height: 0; display: flex; justify-content: center; gap: 0; width: 100%; }
.side { display: none; }
@media (min-width: 1100px) {
  .side { display: flex; flex-direction: column; gap: 4px; width: 300px; flex-shrink: 0; padding: 16px 12px; overflow: auto; border-right: 1px solid var(--line); background: var(--bg); }
  .chat { margin: 0; flex: 1; max-width: 820px; }
}
.side-new { text-align: center; margin-bottom: 12px; }
.side-head, .side-done summary { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); padding: 8px 8px 4px; display: flex; align-items: center; gap: 6px; }
.side-done summary { cursor: pointer; list-style: none; margin-top: 10px; }
.side-done summary::before { content: "▸"; font-size: 11px; }
.side-done[open] summary::before { content: "▾"; }
.side-done summary::-webkit-details-marker { display: none; }
.side-item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 10px; color: var(--text); }
.side-item:hover { background: var(--panel); }
.side-item.active { background: var(--panel); box-shadow: var(--shadow); }
.sdot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; background: #b9bfca; }
.side-item.waiting .sdot { background: var(--red); }
.side-item.working .sdot { background: var(--blue); }
.side-item.done .sdot { background: var(--green); }
.stext { min-width: 0; display: flex; flex-direction: column; }
.stext b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stext span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-item.waiting .stext span { color: #9b1c20; font-weight: 600; }
.side-empty { padding: 6px 8px; }
.btn.resolve { border-color: var(--green); color: var(--green); }
@media (max-width: 640px) { .btn.resolve { font-size: 13px; padding: 7px 10px; } }

/* new request chat */
.starter { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; max-width: 82%; }
.starter-chip { border: 1px solid var(--line); background: var(--panel); border-radius: 18px; padding: 8px 14px; font-weight: 600; color: var(--text); box-shadow: var(--shadow); }
.starter-chip:hover { border-color: var(--accent); color: #b4421f; }
.from-row { display: flex; align-items: center; gap: 8px; }
.mic, .send { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.mic { border: 1px solid var(--line); background: var(--panel); color: var(--muted); }
.mic:hover { color: var(--text); border-color: #cfd4dc; }
.mic.rec { width: auto; padding: 0 6px 0 12px; gap: 8px; border-radius: 21px; border-color: #f3b9bb; background: var(--red-soft); color: #9b1c20; font-weight: 650; font-size: 14px; font-variant-numeric: tabular-nums; }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: blink 1.2s infinite; }
.rec-stop { background: #fff; border: 1px solid #f3b9bb; border-radius: 14px; padding: 4px 10px; font-size: 13px; }
.input-row textarea { overflow-y: hidden; }
.qchoice { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.opt.other { border-style: dashed; color: var(--muted); }
.opt.other.on { border-style: solid; border-color: var(--accent); background: var(--accent-soft); color: #b4421f; }
.dd-opt.other { color: var(--muted); border-top: 1px solid var(--line); border-radius: 0; margin-top: 4px; }
.other-in { width: 100%; border: 2px solid var(--accent); border-radius: 12px; padding: 10px 12px; font-weight: 600; background: #fff; }
.other-in:focus { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.status-card .big { font-size: 22px; font-weight: 750; margin: 4px 0; font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: 3px; background: var(--grey-soft); overflow: hidden; margin: 6px 0 4px; }
.bar span { display: block; height: 100%; background: var(--green); }
.bar span.warn { background: var(--red); }

/* preferences */
.pref-group { border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px; margin: 10px 0; }
.pref-who { font-weight: 700; padding: 8px 0 4px; }
.pref-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.pref-form { border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.pref-form label { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 6px; }
.pf-input, .picker-search { width: 100%; max-width: 420px; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; font-weight: 600; background: #fff; }
.picker { position: relative; max-width: 420px; }
.picker-list { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 28px rgba(16,24,40,.15); padding: 6px; max-height: 260px; overflow: auto; display: flex; flex-direction: column; }

/* Prüffall */
.btn.report { border-color: #f3b9bb; color: #9b1c20; }
.btn.report:hover { background: var(--red-soft); }
@media (max-width: 640px) { .btn.report .lbl { display: none; } .btn.report { padding: 7px 11px; } }
.report-note { align-self: flex-end; max-width: 82%; background: var(--red-soft); border: 1px solid #f3b9bb; border-radius: 14px; padding: 10px 14px; color: #5c1013; font-size: 14px; }
.report-note b { color: #9b1c20; }
.report-note div { margin-top: 4px; color: var(--text); white-space: pre-wrap; }
.report-form { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; }
.report-form label { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 6px; }
.report-form textarea { width: 100%; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; resize: vertical; background: #fff; }
.report-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.report-form .btn { margin-top: 8px; align-self: flex-start; }
.report-list { display: flex; flex-direction: column; gap: 8px; }
.report-row { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid #f3b9bb; border-left: 4px solid var(--red); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); }
.report-row a { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: var(--text); text-decoration: none; }
.report-row a span { font-size: 12px; color: var(--muted); }
.report-row q { font-size: 14px; color: #5c1013; quotes: "„" "“"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .report-row { flex-direction: column; align-items: stretch; } .report-row q { white-space: normal; } }

/* login */
.login-body { justify-content: center; }
.login-wrap { align-items: center; justify-content: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 24px; }
.login-card h1 { font-size: 22px; margin: 22px 0 6px; }
.login-card .hint { font-size: 14px; line-height: 1.45; }
.login-form { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.login-form input { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 16px; background: var(--soft); }
.login-form input:focus { outline: 2px solid var(--accent); outline-offset: -1px; background: var(--panel); }
#code { text-align: center; }
#code:not(:placeholder-shown) { letter-spacing: 6px; font-size: 20px; }
.btn.wide { width: 100%; margin-top: 16px; }
.link-btn { border: 0; background: none; color: var(--blue); padding: 12px 0 0; font-size: 14px; }
.login-msg { margin-top: 14px; background: var(--red-soft); color: #9b1c20; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.who { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
