:root {
  --bg: #f4f4f2; --card: #ffffff; --fg: #1c1c1c; --muted: #6b6b66; --line: #e2e1dc;
  --navy: #1d2b3a; --acc: #2f6f4f; --acc-soft: #e5f0ea; --err: #a3352b; --err-soft: #f8e6e3;
  --warn: #8a5a00; --warn-soft: #fbf0d9; --info-soft: #e7edf5;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 15px/1.45 "Segoe UI", system-ui, -apple-system, "Arial Hebrew", Arial, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
.top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  background: var(--navy); color: #fff; padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
}
.brand { font-weight: 700; font-size: 18px; }
.brand-sub { font-weight: 400; font-size: 15px; opacity: .8; margin-inline-start: 6px; }
main { max-width: 640px; margin: 0 auto; padding: 16px; }
h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 17px; margin: 24px 0 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.card > h2:first-child { margin-top: 0; }
.field { display: block; margin-bottom: 14px; font-size: 14px; color: var(--muted); }
.field > input, .field > select, .field > textarea {
  display: block; width: 100%; margin-top: 4px; padding: 12px; font: inherit; font-size: 16px; color: var(--fg);
  background: #fff; border: 1px solid #cfcec8; border-radius: 10px;
}
.field > textarea { resize: vertical; min-height: 96px; }
.pw { display: flex; gap: 8px; align-items: stretch; margin-top: 4px; }
.pw > input { flex: 1; min-width: 0; padding: 12px; font: inherit; font-size: 16px; color: var(--fg); background: #fff; border: 1px solid #cfcec8; border-radius: 10px; }
.eye { flex: none; padding: 0 14px; border: 1px solid #cfcec8; border-radius: 10px; background: #fff; color: var(--acc); font-size: 15px; }
.pw-warn { margin-top: 6px; font-size: 14px; color: var(--warn); background: var(--warn-soft); padding: 8px 10px; border-radius: 8px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--acc); outline-offset: 0; border-color: var(--acc); }
button, input, textarea, select { font-family: inherit; }
button { font: inherit; cursor: pointer; }
.primary, .secondary, .danger {
  display: block; width: 100%; padding: 14px; border-radius: 12px; font-size: 17px; font-weight: 600; border: 0;
}
.primary { background: var(--acc); color: #fff; }
.secondary { background: #fff; color: var(--acc); border: 1px solid var(--acc); }
.danger { background: #fff; color: var(--err); border: 1px solid var(--err); }
.primary:disabled, .secondary:disabled { opacity: .5; cursor: default; }
.big { margin: 12px 0 4px; }
.gap { margin-top: 10px; }
.link { background: none; border: 0; color: var(--acc); padding: 6px 0; font-size: 15px; }
.link.light { color: #fff; }
.back { margin-bottom: 8px; }
.muted { color: var(--muted); font-size: 14px; }
.center { text-align: center; padding: 24px 0; }
.hello { font-size: 18px; font-weight: 600; }
.msg { margin-top: 10px; font-size: 15px; white-space: pre-wrap; }
.msg:empty { display: none; }
.msg.err { color: var(--err); background: var(--err-soft); padding: 10px 12px; border-radius: 10px; }
.msg.ok { color: var(--acc); background: var(--acc-soft); padding: 10px 12px; border-radius: 10px; }
.list { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: right;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--fg);
}
.row-main { min-width: 0; }
.row-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip { flex: none; font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--info-soft); color: var(--navy); white-space: nowrap; }
.chip.done { background: var(--acc-soft); color: var(--acc); }
.chip.questions, .chip.approval { background: var(--warn-soft); color: var(--warn); }
.chip.failed, .chip.stuck { background: var(--err-soft); color: var(--err); }
.chip.removed { background: #eee; color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.qs { margin: 0 0 12px; padding-inline-start: 22px; }
.qs li { margin-bottom: 6px; }
.files { margin: 6px 0 0; padding: 0; list-style: none; font-size: 14px; }
.files li { padding: 4px 0; border-bottom: 1px dashed var(--line); overflow-wrap: anywhere; }
.model-row { display: grid; grid-template-columns: 1.4fr .7fr 1fr; gap: 8px; margin-bottom: 8px; }
.model-row select, .model-row input { width: 100%; padding: 10px; font: inherit; font-size: 16px; border: 1px solid #cfcec8; border-radius: 10px; background: #fff; }
.events { font-size: 13px; color: var(--muted); margin: 0; padding: 0; list-style: none; }
.events li { padding: 2px 0; }
.working { display: flex; align-items: center; gap: 10px; color: var(--navy); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--acc); animation: pulse 1.2s infinite ease-in-out; }
@keyframes pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }
