:root {
  --bg: #0f0f10;
  --panel: #141415;
  --hover: #1a1a1c;
  --sel: #1c1c28;
  --line: #232326;
  --text: #e4e4e7;
  --dim: #8a8a93;
  --mute: #52525b;
  --acc: #5e6ad2;
  --acc-bg: rgba(94, 106, 210, 0.12);
  --green: #4cb782;
  --yellow: #f2c94c;
  --orange: #f2994a;
  --red: #eb5757;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SF Mono", monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body, #root { height: 100%; }
body {
  font: 12.5px/1.35 var(--font);
  background: var(--bg);
  color: var(--text);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
.shell { height: 100%; display: flex; flex-direction: column; }
.top {
  height: 34px; flex-shrink: 0; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px; padding: 0 8px; background: var(--panel);
}
.logo { font-weight: 600; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.logo i {
  width: 13px; height: 13px; border-radius: 3px;
  background: linear-gradient(135deg, #5e6ad2, #7c6cf0); display: block;
}
.identity {
  font-size: 11px; color: var(--dim); padding: 2px 8px;
  border: 1px solid var(--line); border-radius: 4px; background: var(--bg);
}
.view-as {
  display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--mute);
}
.view-as select {
  background: var(--bg); border: 1px solid var(--line); border-radius: 3px;
  padding: 2px 6px; color: var(--text); max-width: 220px;
}
.demo { font-size: 10px; color: var(--mute); }
.top-r { margin-left: auto; display: flex; gap: 6px; align-items: center; color: var(--mute); font-size: 11px; }
.btn {
  border: 1px solid var(--line); background: var(--hover); border-radius: 4px;
  padding: 2px 7px; font-size: 11.5px; color: var(--text);
}
.btn:hover { background: #222; }
.btn.p { background: var(--acc); border-color: transparent; color: #fff; }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn.danger { border-color: rgba(235, 87, 87, 0.4); color: #f0a0a0; }
.body { flex: 1; min-height: 0; display: grid; grid-template-columns: 148px 1fr; }
.side {
  border-right: 1px solid var(--line); background: var(--panel);
  padding: 6px 5px; overflow-y: auto;
}
.sl {
  font-size: 9px; color: var(--mute); padding: 7px 5px 2px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.ni {
  display: flex; width: 100%; text-align: left; padding: 3px 5px;
  border-radius: 3px; color: var(--dim); font-size: 12px;
}
.ni:hover { background: var(--hover); color: var(--text); }
.ni.on { background: var(--acc-bg); color: var(--text); }
.ni .c { margin-left: auto; font-size: 10.5px; color: var(--mute); }
.proj-sel {
  width: 100%; margin: 2px 0 6px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 3px; padding: 3px 5px; color: var(--text); font-size: 11.5px;
}
.login-gate {
  position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.72);
  display: flex; align-items: center; justify-content: center;
}
.login-card {
  width: min(360px, 92vw); background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 16px;
}
.login-card h2 { font-size: 14px; margin-bottom: 8px; }
.login-card input {
  width: 100%; margin: 8px 0; background: var(--bg); border: 1px solid var(--line);
  border-radius: 4px; padding: 8px; color: var(--text);
}
.login-card .btn { width: 100%; margin-top: 4px; padding: 6px; }
.hint {
  margin: 8px 5px; padding: 6px 7px; border-radius: 4px; background: var(--bg);
  border: 1px solid var(--line); font-size: 10.5px; color: var(--mute); line-height: 1.4;
}
.main { min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.lh {
  height: 32px; flex-shrink: 0; padding: 0 10px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 6px;
}
.lh h1 { font-size: 12.5px; font-weight: 600; }
.pill { padding: 1px 6px; border-radius: 9px; color: var(--dim); font-size: 10.5px; }
.pill.on { background: var(--acc-bg); color: #b8bdf0; }
.meta { margin-left: auto; color: var(--mute); font-size: 10.5px; }
.ff {
  min-height: 26px; flex-shrink: 0; padding: 3px 10px; border-bottom: 1px solid var(--line);
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.seg { display: flex; gap: 2px; }
.seg button { padding: 1px 6px; border-radius: 3px; color: var(--mute); font-size: 10.5px; }
.seg button.on { background: var(--hover); color: var(--text); }
.leg { font-size: 10px; color: var(--mute); margin-left: auto; }
.leg i {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  margin: 0 2px 0 6px; vertical-align: middle;
}
.leg i.r { background: var(--red); }
.leg i.o { background: var(--orange); }
.leg i.g { background: var(--green); }
.list { flex: 1; overflow-y: auto; }
.bulk {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  padding: 4px 10px; border-bottom: 1px solid var(--line); background: #121218;
}
.row-wrap {
  display: flex; align-items: center; gap: 4px;
  box-shadow: inset 0 1px 0 var(--line);
}
.row-wrap:first-child { box-shadow: none; }
.bulk-ck { margin-left: 6px; flex-shrink: 0; accent-color: var(--acc); }
.row {
  display: grid;
  grid-template-columns: 7px 54px minmax(0, 1fr) auto auto;
  gap: 6px; align-items: center; width: 100%; text-align: left;
  padding: 4px 10px 4px 4px; color: inherit; min-height: 26px;
}
.row:hover { background: var(--hover); }
.surf { width: 7px; height: 7px; border-radius: 50%; background: var(--mute); }
.surf.red { background: var(--red); }
.surf.orange { background: var(--orange); }
.surf.green { background: var(--green); }
.surf.none { background: transparent; border: 1px solid var(--line); }
.key { font-family: var(--mono); font-size: 10.5px; color: var(--mute); }
.ttl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.trk { font-size: 9px; text-transform: uppercase; color: var(--mute); }
.trk.code { color: #7ec8e3; }
.trk.legal { color: #b9a0e8; }
.st { color: var(--dim); font-size: 11px; }
.dp {
  flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 210px; overflow: hidden;
}
.dm { overflow-y: auto; padding: 12px 14px 28px; max-width: 560px; }
.ds {
  border-left: 1px solid var(--line); background: var(--panel);
  padding: 10px; overflow-y: auto; font-size: 11.5px;
}
.dk { font-family: var(--mono); font-size: 10.5px; color: var(--mute); margin-bottom: 6px; }
.dt {
  width: 100%; font-size: 15px; font-weight: 600; background: transparent;
  border: 1px solid var(--line); border-radius: 3px; padding: 4px 6px; margin-bottom: 10px; color: var(--text);
}
.block { margin-bottom: 12px; }
.block h3 {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--mute); font-weight: 500; margin-bottom: 4px;
}
.desc, .evurl, .cf textarea {
  width: 100%; background: transparent; border: 1px solid var(--line);
  border-radius: 3px; padding: 6px; color: var(--dim);
}
.evurl { font-family: var(--mono); font-size: 12px; color: var(--text); }
.desc { min-height: 56px; resize: vertical; }
.prop { margin-bottom: 7px; }
.prop label {
  display: block; font-size: 9.5px; color: var(--mute); margin-bottom: 2px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.prop select, .prop .v {
  width: 100%; background: var(--bg); border: 1px solid var(--line);
  border-radius: 3px; padding: 3px 5px; font-size: 11.5px;
}
.acts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.gate {
  margin-top: 8px; padding: 6px 7px; border-radius: 4px;
  border: 1px solid var(--line); font-size: 10.5px; color: var(--mute); line-height: 1.35;
}
.gate.warn { border-color: rgba(242, 153, 74, 0.4); color: var(--orange); }
.gate.ok { border-color: rgba(76, 183, 130, 0.35); color: var(--green); }
.cm { padding: 5px 0; border-top: 1px solid var(--line); }
.cm.st-retracted, .cm.st-superseded { opacity: 0.55; }
.cm .w { font-weight: 500; font-size: 11.5px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.cm .w span { font-weight: 400; color: var(--mute); margin-left: 4px; font-size: 10.5px; }
.cm .b { color: var(--dim); margin-top: 1px; }
.cm .b.md p { margin: 2px 0; }
.cm .b.md h3, .cm .b.md h4 { font-size: 12px; margin: 4px 0 2px; color: var(--text); }
.cm .b.md .md-li { margin-left: 4px; }
.cviews { display: flex; gap: 4px; margin-bottom: 6px; }
.cviews button {
  padding: 1px 7px; border-radius: 3px; border: 1px solid var(--line);
  color: var(--mute); font-size: 10.5px;
}
.cviews button.on { background: var(--acc-bg); color: var(--text); }
.clist { max-height: 280px; overflow-y: auto; margin-bottom: 6px; }
.cf select {
  background: var(--bg); border: 1px solid var(--line); border-radius: 3px; padding: 2px 4px;
}
.cf { margin-top: 5px; display: flex; gap: 5px; }
.cf textarea { flex: 1; min-height: 32px; }
.err { color: var(--red); padding: 12px; font-size: 12px; }
.empty { padding: 16px; text-align: center; color: var(--mute); }
.toast {
  position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%);
  background: var(--panel); border: 1px solid var(--line); padding: 4px 10px;
  border-radius: 5px; font-size: 11px; color: var(--dim); z-index: 50;
}
.modal-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center; z-index: 40;
}
.modal {
  width: min(360px, 92vw); background: var(--panel); border: 1px solid var(--line);
  border-radius: 7px; padding: 12px;
}
.modal h2 { font-size: 12.5px; margin-bottom: 8px; }
.modal label { display: block; font-size: 10.5px; color: var(--mute); margin: 6px 0 2px; }
.modal input, .modal select, .modal textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line);
  border-radius: 3px; padding: 4px 7px;
}
.modal .ar { display: flex; gap: 5px; justify-content: flex-end; margin-top: 10px; }
.modal-actions { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.session-modal { width: min(420px, 94vw); }
.session-modal .fld { display: block; margin-top: 8px; }
.session-modal .fld span {
  display: block; font-size: 10.5px; color: var(--mute); margin-bottom: 2px;
}
.hint-inline { font-size: 11px; color: var(--mute); line-height: 1.4; margin-bottom: 4px; }
.acc label { display: flex; gap: 6px; align-items: flex-start; padding: 2px 0; color: var(--dim); font-size: 12px; }
.subs button {
  display: block; width: 100%; text-align: left; padding: 3px 2px; color: var(--dim);
}
.subs button:hover { background: var(--hover); color: var(--text); }
.audit { margin-top: 8px; font-size: 10.5px; color: var(--mute); }
.audit div { padding: 2px 0; border-top: 1px solid var(--line); }
.tag {
  font-size: 10px; padding: 1px 6px; border-radius: 4px;
  background: #1e1e25; color: var(--dim); white-space: nowrap;
  border: 1px solid var(--line);
}
.tag.v1 { color: #a8b0ff; border-color: rgba(94,106,210,.4); }
