:root {
  --bg: #0a0a0a;
  --bg-2: #111;
  --bg-3: #1a1a1a;
  --fg: #d4d4d4;
  --fg-dim: #888;
  --accent: #ffb000;
  --accent-2: #ff3b3b;
  --ok: #4ade80;
  --border: #2a2a2a;
  --code-bg: #0f0f0f;
  --shadow: 0 0 18px rgba(255, 176, 0, .12);
  --radius: 8px;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace;
}

body[data-theme='cyan'] { --accent: #22d3ee; --shadow: 0 0 18px rgba(34,211,238,.15); }
body[data-theme='red']  { --accent: #ff4d4d; --shadow: 0 0 18px rgba(255,77,77,.15); }
body[data-theme='matrix'] { --accent: #39ff14; --shadow: 0 0 18px rgba(57,255,20,.15); }
body[data-theme='minimal'] { --accent: #ffffff; --shadow: 0 0 12px rgba(255,255,255,.06); }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--font); font-size: 15px; line-height: 1.5;
  overflow: hidden;
}

#matrix-bg { position: fixed; inset: 0; z-index: 0; opacity: .06; pointer-events: none; }
body[data-theme='minimal'] #matrix-bg { opacity: 0; }

.view { position: relative; z-index: 1; height: 100dvh; display: flex; }
.hidden { display: none !important; }

/* ============ AUTH ============ */
#auth-view { align-items: center; justify-content: center; padding: 16px; }
.auth-card {
  width: 100%; max-width: 420px;
  background: rgba(10,10,10,.85); backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 28px; box-shadow: var(--shadow);
}
.boot-log {
  font-family: var(--mono); font-size: 12px; color: var(--fg-dim);
  margin-bottom: 18px; line-height: 1.7;
}
.boot-log .ok { color: var(--ok); }
.boot-log .blink { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.brand { margin: 0; font-family: var(--mono); font-size: 28px; font-weight: 700; letter-spacing: -.5px; }
.brand-accent { color: var(--accent); }
.brand-sub { margin: 4px 0 24px; color: var(--fg-dim); font-size: 13px; font-family: var(--mono); }

.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tab {
  flex: 1; background: none; border: 0; padding: 10px;
  color: var(--fg-dim); cursor: pointer; font-family: var(--mono);
  font-size: 14px; text-transform: lowercase;
  border-bottom: 2px solid transparent; transition: all .15s;
}
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab:hover { color: var(--fg); }

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label {
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--mono); font-size: 12px; color: var(--fg-dim); text-transform: lowercase;
}
.auth-form input {
  background: var(--bg-2); border: 1px solid var(--border);
  color: var(--fg); padding: 10px 12px; border-radius: 6px;
  font-family: var(--font); font-size: 14px; outline: none;
  transition: border-color .15s;
}
.auth-form input:focus { border-color: var(--accent); }

.auth-error {
  color: var(--accent-2); font-family: var(--mono); font-size: 12px;
  background: rgba(255,59,59,.08); border: 1px solid rgba(255,59,59,.3);
  padding: 8px 10px; border-radius: 6px;
}

.btn-primary {
  background: var(--accent); color: #000; border: 0;
  padding: 12px; border-radius: 6px; font-family: var(--mono);
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: transform .1s, box-shadow .15s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary:disabled { opacity: .5; cursor: wait; }

/* ============ CHAT LAYOUT ============ */
#chat-view { flex-direction: row; }

#sidebar {
  width: 280px; min-width: 220px;
  background: var(--bg-2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 14px; gap: 14px;
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; }
.brand-mini { font-family: var(--mono); font-size: 14px; font-weight: 700; }
.user-badge {
  font-family: var(--mono); font-size: 11px; color: var(--fg-dim);
  background: var(--bg-3); padding: 3px 8px; border-radius: 4px;
  border: 1px solid var(--border);
}

.btn-new {
  background: transparent; border: 1px dashed var(--border);
  color: var(--accent); font-family: var(--mono); font-size: 13px;
  padding: 10px; border-radius: 6px; cursor: pointer; transition: all .15s;
}
.btn-new:hover { border-color: var(--accent); background: rgba(255,176,0,.06); }

.session-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.session-item {
  padding: 10px 12px; border-radius: 6px; cursor: pointer;
  font-size: 13px; color: var(--fg-dim);
  display: flex; flex-direction: column; gap: 2px;
  border: 1px solid transparent; transition: all .1s; position: relative;
}
.session-item:hover { background: var(--bg-3); color: var(--fg); }
.session-item.active { background: rgba(255,176,0,.08); border-color: rgba(255,176,0,.3); color: var(--fg); }
.session-item .title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 16px; }
.session-item .meta { font-family: var(--mono); font-size: 10px; color: var(--fg-dim); }
.session-item .del {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  opacity: 0; background: none; border: 0; color: var(--accent-2);
  font-family: var(--mono); font-size: 14px; cursor: pointer;
}
.session-item:hover .del { opacity: .7; }

.sidebar-foot { display: flex; flex-direction: column; gap: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.model-picker, .theme-picker { display: flex; flex-direction: column; gap: 4px; }
.model-picker label, .theme-picker label {
  font-family: var(--mono); font-size: 10px; color: var(--fg-dim); text-transform: lowercase;
}
.model-picker select, .theme-picker select {
  background: var(--bg-3); color: var(--fg); border: 1px solid var(--border);
  padding: 6px 8px; border-radius: 4px; font-family: var(--mono); font-size: 11px;
  cursor: pointer; outline: none;
}

.btn-ghost {
  background: transparent; border: 1px solid var(--border);
  color: var(--fg-dim); font-family: var(--mono); font-size: 12px;
  padding: 8px; border-radius: 6px; cursor: pointer; transition: all .15s;
}
.btn-ghost:hover { color: var(--fg); border-color: var(--fg-dim); }

/* main */
#main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
#chat-header {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px; border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.btn-menu {
  display: none; background: none; border: 1px solid var(--border);
  color: var(--fg); width: 36px; height: 36px; border-radius: 6px; cursor: pointer;
  font-size: 18px;
}
.session-title { font-family: var(--mono); font-size: 14px; font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-status { font-family: var(--mono); font-size: 11px; color: var(--fg-dim); text-transform: lowercase; }
.chat-status.streaming { color: var(--accent); }

.messages { flex: 1; overflow-y: auto; padding: 24px 0; }
.messages-inner { max-width: 880px; margin: 0 auto; padding: 0 20px; display: flex; flex-direction: column; gap: 18px; }

.empty-state { display: flex; align-items: center; justify-content: center; height: 100%; }
.empty-art { font-family: var(--mono); font-size: 12px; color: var(--fg-dim); text-align: center; line-height: 1.4; }

.msg { display: flex; gap: 14px; }
.msg .avatar {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  border: 1px solid var(--border);
}
.msg.user .avatar { background: var(--bg-3); color: var(--fg); }
.msg.assistant .avatar { background: var(--accent); color: #000; }
.msg .body { flex: 1; min-width: 0; }
.msg .role { font-family: var(--mono); font-size: 11px; color: var(--fg-dim); margin-bottom: 4px; text-transform: lowercase; }
.msg .role .model-tag { color: var(--accent); margin-left: 8px; }
.msg .content {
  font-size: 14px; line-height: 1.6; color: var(--fg);
  white-space: pre-wrap; word-wrap: break-word;
}
.msg .content p { margin: 0 0 10px; }
.msg .content p:last-child { margin-bottom: 0; }
.msg .content pre {
  background: var(--code-bg); border: 1px solid var(--border);
  border-radius: 6px; padding: 12px; overflow-x: auto;
  font-family: var(--mono); font-size: 13px; margin: 10px 0;
}
.msg .content code {
  font-family: var(--mono); font-size: 13px;
  background: var(--bg-3); padding: 1px 5px; border-radius: 3px;
}
.msg .content pre code { background: none; padding: 0; }
.msg .content strong { color: #fff; font-weight: 600; }
.msg .content em { color: var(--accent); }
.msg .content ul, .msg .content ol { margin: 8px 0; padding-left: 22px; }
.msg .content a { color: var(--accent); text-decoration: underline; }
.streaming-cursor::after { content: '▌'; color: var(--accent); animation: blink .8s steps(2) infinite; margin-left: 2px; }

/* composer */
#composer { border-top: 1px solid var(--border); padding: 14px 20px; background: var(--bg); }
.composer-inner { max-width: 880px; margin: 0 auto; display: flex; gap: 10px; align-items: flex-end; }
#composer textarea {
  flex: 1; background: var(--bg-2); border: 1px solid var(--border);
  color: var(--fg); padding: 12px 14px; border-radius: 8px;
  font-family: var(--font); font-size: 14px; resize: none;
  max-height: 200px; outline: none; transition: border-color .15s; line-height: 1.5;
}
#composer textarea:focus { border-color: var(--accent); }
.composer-actions { display: flex; gap: 8px; flex-shrink: 0; }
.composer-wrap { max-width: 880px; margin: 0 auto; }
#composer textarea { min-width: 0; min-height: 46px; }
.btn-attach {
  flex-shrink: 0; height: 46px; width: 46px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-2); color: var(--fg-dim);
  font-size: 18px; transition: all .15s;
}
.btn-attach:hover { border-color: var(--accent); color: var(--accent); }
.btn-send, .btn-stop { height: 46px; }

.attach-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.attach-chip {
  position: relative; display: flex; align-items: center;
  border: 1px solid var(--border); background: var(--bg-2); border-radius: 8px;
  padding: 6px 28px 6px 10px; font-family: var(--mono); font-size: 12px; max-width: 260px;
}
.attach-chip.img { padding: 0; width: 64px; height: 64px; overflow: hidden; }
.attach-chip.img img { width: 100%; height: 100%; object-fit: cover; }
.attach-chip .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-x {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%;
  border: none; background: rgba(0,0,0,.7); color: #fff; font-size: 10px; cursor: pointer; line-height: 20px; padding: 0;
}
.attach-x:hover { background: var(--accent-2); }

.msg-images { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.msg-images img {
  max-width: 240px; max-height: 240px; border-radius: 8px; border: 1px solid var(--border);
  cursor: zoom-in; object-fit: cover;
}

.drop-overlay {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.6); border: 2px dashed var(--accent); color: var(--accent);
  font-family: var(--mono); font-size: 20px; pointer-events: none;
}
.lightbox {
  position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.85);
  display: flex; align-items: center; justify-content: center; cursor: zoom-out;
}
.lightbox img { max-width: 94vw; max-height: 94vh; border-radius: 6px; }
.lightbox.hidden, .drop-overlay.hidden { display: none; }

.btn-send, .btn-stop {
  border: 1px solid var(--border); background: var(--bg-2);
  color: var(--fg); font-family: var(--mono); font-size: 13px;
  padding: 10px 16px; border-radius: 8px; cursor: pointer; transition: all .15s;
}
.btn-send:hover { border-color: var(--accent); color: var(--accent); }
.btn-send:disabled { opacity: .4; cursor: wait; }
.btn-stop { border-color: rgba(255,59,59,.4); color: var(--accent-2); }
.btn-stop:hover { background: rgba(255,59,59,.1); }

/* toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--bg-3); border: 1px solid var(--border);
  padding: 10px 18px; border-radius: 8px; font-family: var(--mono);
  font-size: 13px; z-index: 100; box-shadow: var(--shadow);
}

/* scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--fg-dim); }

/* mobile */
@media (max-width: 760px) {
  #sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 10;
    transform: translateX(-100%); transition: transform .2s; width: 260px;
  }
  #sidebar.open { transform: translateX(0); }
  .btn-menu { display: block; }
  .messages { padding: 14px 0; }
  .messages-inner { padding: 0 12px; }
  #composer { padding: 10px 12px; }
  .msg .avatar { width: 24px; height: 24px; font-size: 11px; }
}

#sidebar-overlay {
  display: none; position: fixed; inset: 0; z-index: 9; background: rgba(0,0,0,.5);
}
#sidebar-overlay.visible { display: block; }

/* loader */
#loader {
  position: fixed; inset: 0; z-index: 999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .4s ease;
}
#loader.hide { opacity: 0; pointer-events: none; }
.loader-box { text-align: center; width: 260px; }
.loader-brand {
  font-family: var(--mono); font-size: 22px; font-weight: 700;
  margin-bottom: 18px; letter-spacing: -.5px;
}
.loader-bar {
  height: 3px; background: var(--bg-3); border-radius: 2px;
  overflow: hidden; margin-bottom: 12px;
}
.loader-bar-fill {
  height: 100%; width: 30%;
  background: var(--accent);
  border-radius: 2px;
  animation: loader-slide 1.4s ease-in-out infinite;
  box-shadow: 0 0 12px var(--accent);
}
@keyframes loader-slide {
  0%   { transform: translateX(-100%); width: 30%; }
  50%  { width: 70%; }
  100% { transform: translateX(230%); width: 30%; }
}
.loader-msg {
  font-family: var(--mono); font-size: 11px; color: var(--fg-dim);
}

/* ================= v2 additions ================= */
.msg .content { white-space: normal; }
.msg .content table { border-collapse: collapse; margin: 10px 0; font-size: 13px; }
.msg .content th, .msg .content td { border: 1px solid var(--border); padding: 5px 9px; }
.msg .content blockquote { border-left: 3px solid var(--accent); margin: 8px 0; padding: 2px 12px; color: var(--fg-dim); }
.dim { color: var(--fg-dim); }
.err { color: var(--accent-2); }

/* sidebar extras */
.session-search {
  background: var(--bg-3); border: 1px solid var(--border); color: var(--fg);
  padding: 7px 10px; border-radius: 6px; font-family: var(--mono); font-size: 12px; outline: none;
}
.session-search:focus { border-color: var(--accent); }
.foot-buttons { display: flex; gap: 6px; }
.foot-buttons > * {
  flex: 1; text-align: center; text-decoration: none; white-space: nowrap;
  padding: 8px 4px; font-size: 11px; display: flex; align-items: center; justify-content: center;
}
.usage-mini { font-family: var(--mono); font-size: 10px; color: var(--fg-dim); display: flex; flex-direction: column; gap: 4px; }
.usage-mini > span { display: inline; margin-right: 8px; }
.usage-line { display: flex; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.usage-bar { height: 4px; background: var(--bg-3); border-radius: 2px; overflow: hidden; margin: 3px 0 8px; }
.usage-bar > div { height: 100%; background: var(--accent); }
.session-title { cursor: pointer; }
.session-title:hover { color: var(--accent); }

/* message actions */
.msg-actions { display: flex; gap: 4px; margin-top: 6px; opacity: 0; transition: opacity .15s; align-items: center; flex-wrap: wrap; }
.msg:hover .msg-actions, .msg:last-child .msg-actions { opacity: 1; }
.msg-actions .act {
  background: none; border: 1px solid transparent; color: var(--fg-dim); cursor: pointer;
  font-family: var(--mono); font-size: 11px; padding: 2px 7px; border-radius: 4px;
}
.msg-actions .act:hover { color: var(--accent); border-color: var(--border); }
.msg-actions .cost { font-family: var(--mono); font-size: 10px; color: var(--fg-dim); margin-left: 6px; }
.edit-area {
  width: 100%; min-height: 80px; background: var(--bg-2); color: var(--fg); border: 1px solid var(--accent);
  border-radius: 8px; padding: 10px 12px; font-family: var(--font); font-size: 14px; resize: vertical; outline: none;
}
.edit-row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }
.btn-primary.small { padding: 7px 12px; font-size: 12px; }

/* thinking */
.thinking { margin: 2px 0 8px; border-left: 2px solid var(--border); padding-left: 10px; }
.thinking summary { cursor: pointer; font-family: var(--mono); font-size: 11px; color: var(--fg-dim); user-select: none; }
.thinking summary:hover { color: var(--accent); }
.thinking-body { white-space: pre-wrap; font-size: 12.5px; color: var(--fg-dim); margin-top: 6px; max-height: 360px; overflow-y: auto; }

/* code blocks */
.code-block { margin: 10px 0; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: var(--code-bg); }
.code-block pre { margin: 0 !important; border: 0 !important; border-radius: 0 !important; }
.code-block pre code.hljs { background: transparent; padding: 0; }
.code-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 4px 6px 4px 12px; background: var(--bg-3); border-bottom: 1px solid var(--border);
  font-family: var(--mono); font-size: 11px; color: var(--fg-dim);
}
.code-btns { display: flex; gap: 2px; }
.code-btns button {
  background: none; border: 0; color: var(--fg-dim); cursor: pointer; font-family: var(--mono); font-size: 11px;
  padding: 3px 7px; border-radius: 4px;
}
.code-btns button:hover { color: var(--accent); background: rgba(255,255,255,.04); }

/* modals */
.modal {
  position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.65);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-card {
  width: 100%; max-width: 560px; max-height: 90dvh; overflow-y: auto;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-weight: 700; margin-bottom: 10px; }
.modal-x { background: none; border: 0; color: var(--fg-dim); cursor: pointer; font-size: 16px; }
.modal-x:hover { color: var(--accent-2); }
.runner-card { max-width: 1000px; height: 80dvh; display: flex; flex-direction: column; padding: 12px 14px; }
.runner-host { flex: 1; min-height: 0; }
.runner-frame { width: 100%; height: 100%; border: 1px solid var(--border); border-radius: 6px; background: #fff; }

.field { display: flex; flex-direction: column; gap: 6px; font-family: var(--mono); font-size: 12px; color: var(--fg-dim); margin-bottom: 14px; }
.field.check { flex-direction: row; align-items: center; gap: 8px; }
.field textarea, .field input[type=number], .field input[type=text], .field select, .field-group input, .inline-form input {
  background: var(--bg); border: 1px solid var(--border); color: var(--fg); padding: 9px 11px; border-radius: 6px;
  font-family: var(--font); font-size: 13px; outline: none; resize: vertical;
}
.field textarea:focus, .field input:focus, .field-group input:focus, .inline-form input:focus { border-color: var(--accent); }
.field input[type=range] { accent-color: var(--accent); }
.field-row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.field-row .field { flex: 1; min-width: 160px; }
.hint { font-size: 11px; color: var(--fg-dim); font-weight: 400; }
.field-group { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; border-top: 1px solid var(--border); }
.group-title { font-family: var(--mono); font-size: 11px; color: var(--accent); text-transform: lowercase; margin-bottom: 4px; }
.usage-box { font-family: var(--mono); font-size: 12px; padding-bottom: 12px; }
.btn-row { display: flex; gap: 8px; }
.btn-ghost.danger, button.danger { color: var(--accent-2) !important; }

/* ================= admin ================= */
body.admin-page { overflow: auto; }
.admin-wrap { max-width: 1200px; margin: 0 auto; padding: 18px; position: relative; z-index: 1; }
.admin-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; flex-wrap: wrap; }
.admin-nav { display: flex; flex: 1; border-bottom: 1px solid var(--border); }
.admin-nav .tab { flex: 0 0 auto; padding: 10px 16px; }
.admin-head .btn-ghost { text-decoration: none; }
.panel { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.card { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.card-v { font-family: var(--mono); font-size: 24px; font-weight: 700; color: var(--accent); }
.card-k { font-family: var(--mono); font-size: 11px; color: var(--fg-dim); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding-top: 8px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.bar > div { width: 100%; min-height: 1px; background: var(--accent); border-radius: 2px 2px 0 0; opacity: .85; }
.bar:hover > div { opacity: 1; }
.bar span { font-family: var(--mono); font-size: 9px; color: var(--fg-dim); }
.tbl-scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-family: var(--mono); font-size: 11px; color: var(--fg-dim); font-weight: 500; padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl input.lim { width: 80px; background: var(--bg); border: 1px solid var(--border); color: var(--fg); padding: 5px 7px; border-radius: 5px; font-family: var(--mono); }
.tbl .actions { white-space: nowrap; }
.tbl .actions button {
  background: none; border: 1px solid var(--border); color: var(--fg-dim); cursor: pointer;
  font-family: var(--mono); font-size: 11px; padding: 3px 8px; border-radius: 4px; margin-right: 3px;
}
.tbl .actions button:hover { color: var(--fg); border-color: var(--fg-dim); }
.row-disabled td { opacity: .5; }
.pill { font-family: var(--mono); font-size: 10px; padding: 1px 6px; border-radius: 10px; border: 1px solid var(--border); color: var(--fg-dim); }
.pill.red { color: var(--accent-2); border-color: rgba(255,59,59,.4); }
.pill.green { color: var(--ok); border-color: rgba(74,222,128,.4); }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-family: var(--mono); font-size: 12px; color: var(--fg-dim); }
.inline-form label { display: flex; align-items: center; gap: 6px; }
.inline-form input[type=number] { width: 80px; }
.inline-form #inv-note { flex: 1; min-width: 180px; }
.inv-code { font-family: var(--mono); color: var(--accent); }
.inv-code.big { font-size: 18px; }
.inv-new { margin-top: 12px; padding: 10px 12px; border: 1px dashed var(--accent); border-radius: 8px; font-family: var(--mono); display: flex; align-items: center; gap: 10px; }
.model-checks { display: flex; flex-direction: column; gap: 4px; font-family: var(--mono); font-size: 12px; color: var(--fg); }
.model-checks .check { display: flex; gap: 8px; align-items: center; }
