:root {
  --bg: #f6f7fb; --panel: #ffffff; --ink: #1d2433; --muted: #5d6578; --line: #e2e5ee;
  --brand: #6a4de0; --brand-bg: #efebfd; --good: #1f8a4c; --good-bg: #e6f5ec; --bad: #c4362c; --bad-bg: #fdecea;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #12141b; --panel: #1b1e28; --ink: #e8eaf1; --muted: #a2a8b8; --line: #2c3040;
          --brand: #9b85ff; --brand-bg: #261f45; --good: #4cc07e; --good-bg: #16301f; --bad: #ff7a70; --bad-bg: #3a1c1a; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); }
a { color: var(--brand); }
.top { display: flex; align-items: center; gap: 16px; padding: 12px 16px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.top .logo { font-weight: 800; text-decoration: none; color: var(--ink); display: flex; gap: 8px; align-items: center; }
.top .mark { background: var(--brand); color: #fff; border-radius: 8px; padding: 2px 7px; font-size: 14px; }
.top nav { display: flex; gap: 14px; margin-left: auto; align-items: center; }
.top nav form { margin: 0; }
.wrap { max-width: 880px; margin: 24px auto; padding: 0 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; }
h1 { font-size: 24px; margin: 0 0 12px; }
.clocks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.clock { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: center; }
.clock .t { font-size: 26px; font-weight: 800; }
.clock .z { color: var(--muted); font-size: 14px; }
.row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); gap: 12px; }
.row:last-child { border-bottom: 0; }
.muted { color: var(--muted); }
.btn, button { background: var(--brand); color: #fff; border: 0; border-radius: 10px; padding: 9px 16px; font-weight: 700; font-size: 15px; cursor: pointer; }
.btn.ghost, button.ghost { background: transparent; color: var(--brand); padding: 0; }
.msg { background: var(--good-bg); color: var(--good); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-weight: 600; }
.err, .errorlist { color: var(--bad); }
.errorlist { margin: 4px 0; padding-left: 18px; }
form p { margin: 0 0 14px; }
label { font-weight: 600; display: block; margin-bottom: 4px; }
input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%; max-width: 420px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--bg); color: var(--ink); font: inherit;
}
input[type=checkbox] { width: 18px; height: 18px; vertical-align: -3px; }
.helptext { display: block; color: var(--muted); font-size: 14px; }
/* Work Board */
details.menu { position: relative; }
details.menu summary { cursor: pointer; color: var(--brand); list-style: none; }
details.menu summary::-webkit-details-marker { display: none; }
details.menu .drop { position: absolute; right: 0; top: 28px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 6px; min-width: 190px; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 10; }
details.menu .drop a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); }
details.menu .drop a:hover { background: var(--brand-bg); }
.wrap.wide { max-width: 1120px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.kpi .v { font-size: 28px; font-weight: 800; }
.kpi .l { color: var(--muted); font-size: 14px; }
table.tb { width: 100%; border-collapse: collapse; font-size: 15px; }
table.tb th, table.tb td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tb th { font-size: 13px; color: var(--muted); }
table.tb td:first-child { white-space: nowrap; }
.tblwrap { overflow-x: auto; }
.pill { display: inline-block; border: 1px solid var(--line); border-radius: 99px; padding: 1px 9px; font-size: 13px; white-space: nowrap; }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.steps li:last-child { border-bottom: 0; }
.qbox { border: 2px solid var(--brand); border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.qbox form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0 0; }
.qbox form p { margin: 0; }
.story { font-size: 14px; }
.story .when { color: var(--muted); white-space: nowrap; }
.sec4 h3 { margin: 12px 0 4px; font-size: 16px; }
.sec4 p { margin: 0; white-space: pre-line; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 14px; }
.tabs a { border: 1px solid var(--line); border-radius: 99px; padding: 3px 11px; text-decoration: none; font-size: 14px; }
.tabs a.on { border-color: var(--brand); font-weight: 700; }
.foot { color: var(--muted); font-size: 13px; text-align: center; margin: 28px 0; }
@media (max-width: 560px) { .clocks { grid-template-columns: 1fr; } }
