:root {
  --bg: #000000;
  --surf: #0a101c;
  --surf-2: #111a2c;
  --line: #1c2740;
  --ink: #eaf0ff;
  --mute: #8794b0;
  --blue: #2f6bff;
  --blue-soft: #9db9ff;
  --lime: #c8ff3e;
  --red: #ff6177;
  --font: "Sora", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--bg); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0 auto;
  max-width: 560px;
  min-height: 100dvh;
  padding: 0 16px 56px;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

h1, h2 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

label, .pick-label {
  display: block;
  margin: 18px 0 8px;
  color: var(--mute);
  font-size: 14px;
}

input[type="text"], input[type="password"] {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  background: #000;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  font-size: 18px;
  font-weight: 500;
}
input::placeholder { color: #4a5673; font-weight: 400; }
input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(47, 107, 255, .22); }

.primary {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  font-size: 17px;
  transition: transform .08s ease, background .15s ease;
}
.primary:active { transform: scale(.985); }
.primary:disabled { background: var(--surf-2); color: #55617d; cursor: not-allowed; }
.primary.big { margin-top: 20px; min-height: 60px; font-size: 18px; }

.ghost {
  min-height: 40px;
  padding: 0 14px;
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  color: var(--blue-soft);
  font-size: 14px;
  font-weight: 500;
}
.ghost:active { background: var(--surf-2); }
.ghost.danger { color: var(--red); }
.ghost.go { color: #0b1400; background: var(--lime); border-color: var(--lime); font-weight: 600; }

.err { color: var(--red); font-size: 15px; margin-top: 12px; }

/* three stacked profile discs */
.mark { display: flex; }
.mark span { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--bg); }
.mark span:nth-child(1) { background: var(--blue); }
.mark span:nth-child(2) { background: var(--lime); margin-left: -11px; }
.mark span:nth-child(3) { background: var(--ink); margin-left: -11px; }
.mark.small span { width: 18px; height: 18px; border-width: 2px; }
.mark.small span + span { margin-left: -7px; }

.demo-note {
  margin: 0 -16px;
  padding: 10px 16px;
  background: var(--lime);
  color: #0b1400;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

/* ---------- login ---------- */
.login { min-height: 88dvh; display: grid; align-items: center; }
.login-card { padding: 8px 4px; }
.login-card h1 { margin-top: 22px; font-size: 34px; font-weight: 700; letter-spacing: -0.03em; }
.lede { margin-top: 6px; color: var(--mute); }
.login-card label { margin-top: 34px; }
.pw-row { display: flex; gap: 8px; align-items: center; }
.pw-row input { flex: 1; min-width: 0; }
.pw-row .ghost { min-height: 54px; border-radius: var(--r-md); flex: none; }
.login-card .primary { margin-top: 20px; }

/* ---------- top ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 0 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.brand strong { font-weight: 600; white-space: nowrap; }
.top-right { display: flex; align-items: center; gap: 12px; }
.count { color: var(--mute); font-size: 14px; white-space: nowrap; }

.bar-warn {
  margin-bottom: 12px; padding: 12px 14px;
  border: 1.5px solid var(--red); border-radius: var(--r-md);
  color: var(--red); font-size: 15px;
}

/* ---------- pending ---------- */
.pending { display: grid; gap: 10px; margin-bottom: 14px; }
.pend {
  padding: 14px 16px;
  border: 1.5px dashed var(--lime);
  border-radius: var(--r-md);
}
.pend b { font-weight: 600; }
.pend small { display: block; color: var(--mute); font-size: 13.5px; }
.pend .acts { display: flex; gap: 8px; margin-top: 12px; }

/* ---------- composer (the one loud surface) ---------- */
.composer {
  position: relative;
  padding: 22px 18px 20px;
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(47, 107, 255, .26), transparent 60%),
    var(--surf);
  border: 1.5px solid rgba(47, 107, 255, .55);
}
.composer h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.composer label { margin-top: 16px; }

.pc-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pc-pick .none { grid-column: 1 / -1; color: var(--mute); font-size: 15px; padding: 6px 0; }
.tile {
  display: flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 8px 14px;
  background: #000;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  text-align: left;
  min-width: 0;
}
.tile .t-name { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .t-sub { display: block; color: var(--mute); font-size: 12.5px; font-weight: 400; }
.tile > span:last-child { min-width: 0; }
.tile[aria-checked="true"] { background: var(--blue); border-color: var(--blue); }
.tile[aria-checked="true"] .t-sub { color: #dbe6ff; }
.tile:disabled { opacity: .45; cursor: not-allowed; }

.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #3a4560; }
.dot.on { background: var(--lime); box-shadow: 0 0 0 4px rgba(200, 255, 62, .16); }

.job-line {
  margin-top: 16px; padding: 14px 16px;
  border-radius: var(--r-md);
  background: #000; border: 1.5px solid var(--line);
  font-size: 15.5px;
}
.job-line.ok { border-color: var(--lime); color: var(--lime); }
.job-line.bad { border-color: var(--red); color: var(--red); }
.job-line .track {
  height: 3px; margin-top: 10px; border-radius: 3px; overflow: hidden; background: var(--surf-2);
}
.job-line .track i {
  display: block; height: 100%; width: 38%; border-radius: 3px; background: var(--blue);
  animation: slide 1.1s ease-in-out infinite;
}
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(265%); } }

/* ---------- PC list: rows, not cards ---------- */
.sec-h { margin: 34px 0 6px; font-size: 18px; }
.pc-list { border-top: 1px solid var(--line); }
.empty { padding: 18px 0; color: var(--mute); border-bottom: 1px solid var(--line); }
.pc { border-bottom: 1px solid var(--line); }
.pc-head {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 68px; padding: 10px 0;
  background: none; border: 0; text-align: left;
}
.pc-head .who { flex: 1; min-width: 0; }
.pc-head .nm { display: block; font-weight: 600; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-head .sub { display: block; color: var(--mute); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-head .n { color: var(--mute); font-size: 14px; white-space: nowrap; }
.pc-head .chev { flex: none; width: 10px; height: 10px; border-right: 2px solid var(--mute); border-bottom: 2px solid var(--mute); transform: rotate(45deg); transition: transform .15s ease; margin: 0 4px 4px; }
.pc.open .chev { transform: rotate(-135deg); margin-bottom: -4px; }

.pc-body { padding: 2px 0 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  max-width: 100%; padding: 5px 12px 5px 5px;
  background: var(--surf); border: 1px solid var(--line); border-radius: 999px;
  font-size: 14.5px;
}
.chip .av {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700; color: #000;
}
.chip .cn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.mine { border-color: rgba(47, 107, 255, .7); }
.hint { margin-top: 10px; color: var(--mute); font-size: 13.5px; }
.hint .key { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--blue); vertical-align: -1px; margin-right: 4px; }
.pc-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.rename-row { display: flex; gap: 8px; margin-top: 16px; }
.rename-row input { flex: 1; min-width: 0; min-height: 44px; font-size: 16px; }
.rename-row .ghost { min-height: 44px; border-radius: var(--r-sm); flex: none; }
.confirm { margin-top: 16px; padding: 14px; border: 1.5px solid var(--red); border-radius: var(--r-md); font-size: 15px; }
.confirm .pc-acts { margin-top: 12px; }
.row-err { margin-top: 10px; color: var(--red); font-size: 14.5px; }

/* ---------- activity ---------- */
.log { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.log li { display: grid; grid-template-columns: 58px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.log time { color: var(--mute); font-size: 13.5px; padding-top: 1px; font-variant-numeric: tabular-nums; }
.log .what b { font-weight: 600; }
.log .res { display: block; font-size: 13.5px; color: var(--mute); }
.log .res.ok { color: var(--lime); }
.log .res.bad { color: var(--red); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .job-line .track i { width: 100%; opacity: .5; }
}
