:root {
  --bg: #f4f5f2; --card: #ffffff; --ink: #1b1f1a; --muted: #687064; --line: #e2e5de;
  --accent: #1f7a4d; --accent-ink: #ffffff; --accent-soft: #e3f1e9;
  --warn: #a8670a; --warn-soft: #fbf0dc; --err: #b3261e; --err-soft: #fbe5e3;
  --ok: #1f7a4d; --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111411; --card: #1a1e1a; --ink: #e8ebe6; --muted: #9aa396; --line: #2b312b;
    --accent: #4cc285; --accent-ink: #0d1a12; --accent-soft: #1b3326;
    --warn: #e6a94a; --warn-soft: #33280f; --err: #f2867d; --err-soft: #3a1b18; --ok: #4cc285;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
.wrap { max-width: 760px; margin: 0 auto; padding: 16px 16px 64px; }
header.top { display: flex; align-items: center; gap: 12px; padding: 8px 0 20px; }
header.top h1 { font-size: 20px; margin: 0; letter-spacing: -0.01em; flex: 1; }
header.top h1 span { color: var(--accent); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--line); }
.who { font-size: 13px; color: var(--muted); text-align: right; line-height: 1.2; }
.who a { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 16px; }
.card h2 { font-size: 16px; margin: 0 0 4px; }
.card .sub { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=date], select, textarea {
  width: 100%; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; font-size: 16px; }
textarea { font-family: var(--mono); font-size: 12px; min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1 1 160px; }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; font: inherit; font-weight: 600; border-radius: 10px; border: 1px solid transparent;
  background: var(--accent); color: var(--accent-ink); cursor: pointer; text-decoration: none;
  touch-action: manipulation; transition: transform .08s ease, opacity .15s; }
button:active, .btn:active { transform: scale(0.97); }
button:disabled { opacity: .5; cursor: default; }
button.ghost, .btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
button.danger { background: transparent; color: var(--err); border-color: var(--line); }
button.small { padding: 6px 10px; font-size: 13px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tabs { display: flex; gap: 4px; background: var(--bg); padding: 4px; border-radius: 10px; margin-bottom: 8px; }
.tabs button { flex: 1; background: transparent; color: var(--muted); font-weight: 500; padding: 8px; }
.tabs button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--ink); font-weight: 500; min-width: 62px; }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.chip .n { position: absolute; top: -6px; right: -4px; background: var(--accent); color: var(--accent-ink);
  font-size: 11px; border-radius: 999px; min-width: 18px; height: 18px; line-height: 18px; padding: 0 4px; }
.chip.free::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px;
  margin-left: -2px; border-radius: 50%; background: var(--ok); }
.note { font-size: 13px; padding: 10px 12px; border-radius: 10px; background: var(--bg); color: var(--muted); margin-top: 10px; }
.note.ok { background: var(--accent-soft); color: var(--ink); }
.note.warn { background: var(--warn-soft); color: var(--ink); }
.note.err { background: var(--err-soft); color: var(--ink); }
.linked { display: flex; align-items: center; gap: 12px; }
.linked .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); flex: none; }
.linked .grow { flex: 1; min-width: 0; }
.linked b { display: block; }
.linked small { color: var(--muted); word-break: break-all; }
.job { border: 1px solid var(--line); border-radius: 12px; margin-top: 10px; overflow: hidden; }
.job-head { display: flex; align-items: center; gap: 10px; padding: 12px; cursor: pointer; }
.job-head .grow { flex: 1; min-width: 0; }
.job-head small { color: var(--muted); display: block; }
.badge { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.badge.running { background: var(--warn-soft); color: var(--warn); }
.badge.booked { background: var(--accent-soft); color: var(--ok); }
.badge.failed { background: var(--err-soft); color: var(--err); }
.log { font-family: var(--mono); font-size: 12px; background: var(--bg); border-top: 1px solid var(--line);
  max-height: 280px; overflow: auto; padding: 8px 12px; }
.log div { white-space: pre-wrap; word-break: break-word; }
.log .t { color: var(--muted); margin-right: 6px; }
.log .ok { color: var(--ok); } .log .warn { color: var(--warn); } .log .error { color: var(--err); }
.job-foot { display: flex; gap: 8px; padding: 0 12px 12px; }
.code { font-family: var(--mono); font-weight: 700; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t td { padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: top; word-break: break-word; }
table.t td:first-child { color: var(--muted); width: 40%; }
.ticket { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-top: 10px; }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }
.bm { display: inline-block; padding: 8px 12px; border: 1px dashed var(--accent); border-radius: 10px;
  color: var(--accent); font-weight: 600; text-decoration: none; }
ol.steps { padding-left: 20px; margin: 8px 0; font-size: 14px; }
ol.steps li { margin: 4px 0; }
.login-box { max-width: 380px; margin: 12vh auto 0; text-align: center; }
.login-box h1 { font-size: 26px; margin: 0 0 6px; }
.login-box p { color: var(--muted); }
.gbtn { background: var(--card); color: var(--ink); border: 1px solid var(--line); padding: 12px 18px; width: 100%; }
.gbtn svg { width: 18px; height: 18px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
