:root {
  --bg: #1a1816;
  --bg-2: #201e1c;
  --surface: #262421;
  --surface-hi: #2e2b28;
  --border: #3a3632;
  --accent: #d97757;
  --accent-light: #f0a27e;
  --accent-hot: #ff7a2f;
  --accent-soft: rgba(217, 119, 87, 0.14);
  --text: #f2ede6;
  --muted: #a8a29a;
  --danger: #e2645a;
  --green: #69b88a;
  --font-serif: 'Lora', Georgia, serif;
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --msg-size: 15.5px;
}

[data-theme="light"] {
  --bg: #f5f1ea;
  --bg-2: #ede8df;
  --surface: #ffffff;
  --surface-hi: #f2ece3;
  --border: #ddd5c9;
  --accent: #c96442;
  --accent-light: #a64a2c;
  --accent-hot: #e8692c;
  --accent-soft: rgba(201, 100, 66, 0.12);
  --text: #221f1c;
  --muted: #6c655c;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%; background: var(--bg); color: var(--text); font-family: var(--font-sans);
  font-size: 15px; line-height: 1.6; overflow: hidden; transition: background 0.35s var(--ease), color 0.35s;
}
.hidden { display: none !important; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

/* Custom scrollbars & controls */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
input[type="checkbox"] { accent-color: var(--accent); cursor: pointer; }

/* Subtle warm ambient & grain */
.warm-backdrop {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 55% 40% at 50% 0%, rgba(217,119,87,0.09), transparent 70%),
    radial-gradient(ellipse 40% 35% at 88% 92%, rgba(255,122,47,0.06), transparent 72%);
}
.grain-layer {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.03;
  background-image: radial-gradient(var(--text) 0.5px, transparent 0.5px);
  background-size: 4px 4px;
}

.serif-title { font-family: var(--font-serif); font-weight: 500; letter-spacing: -0.015em; }

/* SPARK EMBLEM */
.spark-emblem {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 14px;
  background: var(--accent-soft); border: 1px solid rgba(217,119,87,0.35); color: var(--accent);
}
.spark-emblem.lg { width: 60px; height: 60px; border-radius: 18px; box-shadow: 0 12px 32px rgba(217,119,87,0.22); margin-bottom: 12px; }
.spark-emblem.sm { width: 30px; height: 30px; border-radius: 9px; }

/* LOGIN */
.login-screen { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card {
  width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 22px; padding: 34px 28px; box-shadow: 0 28px 70px rgba(0,0,0,0.38);
}
.login-brand { text-align: center; margin-bottom: 24px; }
.login-brand h1 { font-family: var(--font-serif); font-size: 28px; font-weight: 600; }
.login-brand p { font-size: 13.5px; color: var(--muted); margin-top: 5px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.login-form input, .compact-form input, .compact-form select, #sysPromptInput {
  background: var(--bg); border: 1px solid var(--border); border-radius: 11px; padding: 11px 13px; outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.login-form input:focus, .compact-form input:focus, #sysPromptInput:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-error { background: rgba(226,100,90,0.14); border: 1px solid rgba(226,100,90,0.4); color: #f59c95; padding: 9px 12px; border-radius: 10px; font-size: 13px; }
.login-footer { text-align: center; font-size: 12px; color: var(--muted); margin-top: 18px; }

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-hot)); color: #fff; font-weight: 600; font-size: 14px;
  padding: 10px 18px; border-radius: 11px; box-shadow: 0 6px 20px rgba(217,119,87,0.28); transition: transform 0.15s, box-shadow 0.2s;
}
.btn-accent:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(255,122,47,0.38); }
.btn-full { width: 100%; }

/* APP SHELL */
.app-shell { position: relative; z-index: 2; display: flex; height: 100vh; height: 100dvh; width: 100%; }

/* SIDEBAR */
.sidebar {
  width: 278px; flex-shrink: 0; background: var(--bg-2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 14px 12px; gap: 11px; z-index: 30;
  transition: margin-left 0.28s var(--ease), transform 0.28s var(--ease);
}
.sidebar.collapsed { margin-left: -278px; }
.sb-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px; }
.sb-brand { display: flex; align-items: center; gap: 9px; }
.sb-title { font-family: var(--font-serif); font-weight: 600; font-size: 16.5px; }

.btn-new-chat {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 14px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hot)); color: #fff; font-weight: 600; font-size: 13.8px;
  box-shadow: 0 6px 18px rgba(217,119,87,0.25); transition: transform 0.15s, box-shadow 0.2s;
}
.btn-new-chat:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(255,122,47,0.38); }

.sb-search {
  display: flex; align-items: center; gap: 8px; padding: 0 11px; height: 36px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--border); color: var(--muted);
}
.sb-search input { flex: 1; background: none; border: none; outline: none; font-size: 13px; color: var(--text); }
.sb-search:focus-within { border-color: var(--accent); }

.chat-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; }
.chat-group-lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 10px 8px 4px; opacity: 0.8; }
.chat-item {
  display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px; cursor: pointer;
  color: var(--muted); font-size: 13.5px; transition: background 0.14s, color 0.14s;
}
.chat-item:hover { background: var(--surface); color: var(--text); }
.chat-item.active { background: var(--surface-hi); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.chat-item-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item-acts { display: none; gap: 2px; }
.chat-item:hover .chat-item-acts, .chat-item.active .chat-item-acts { display: flex; }
.ci-btn { width: 24px; height: 24px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.ci-btn:hover { background: var(--bg); color: var(--text); }
.ci-btn.pinned { color: var(--accent); }
.ci-btn.del:hover { color: var(--danger); }

.sb-bottom { border-top: 1px solid var(--border); padding-top: 11px; display: flex; flex-direction: column; gap: 8px; }
.usage-card { background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 9px 11px; }
.usage-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.usage-name { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-light); }
.usage-meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.sb-actions { display: flex; align-items: center; gap: 6px; }
.sb-btn {
  flex: 1; height: 34px; border-radius: 9px; border: 1px solid rgba(217,119,87,0.4); background: var(--accent-soft);
  color: var(--accent-light); font-size: 12.5px; font-weight: 600; transition: all 0.15s;
}
.sb-btn:hover { background: var(--accent); color: #fff; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); transition: all 0.15s; font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.icon-btn:hover { background: var(--surface-hi); color: var(--text); }
.icon-btn.danger:hover { color: var(--danger); }
.icon-btn.recording { color: var(--accent-hot); background: var(--accent-soft); }

/* CENTER WORKSPACE */
.center-col { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.topbar {
  height: 58px; flex-shrink: 0; padding: 0 14px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--bg);
}
.tb-left, .tb-right { display: flex; align-items: center; gap: 6px; min-width: 0; flex-shrink: 0; }
.tb-left { flex-shrink: 1; }
.model-select {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 7px 10px; font-size: 13px; font-weight: 600; max-width: 195px; outline: none; cursor: pointer;
}
.model-select:focus { border-color: var(--accent); }
.quota-pill {
  display: flex; flex-direction: column; gap: 3px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 4px 9px; min-width: 150px;
}
.quota-top { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); }
.mult-tag { color: var(--accent-light); font-weight: 700; }
.quota-bar { height: 4px; background: var(--border); border-radius: 99px; overflow: hidden; }
.quota-fill { height: 100%; background: linear-gradient(90deg, var(--green), var(--accent)); transition: width 0.3s; }
.quota-fill.low { background: var(--danger); }

.mode-switch { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 2px; }
.mode-btn { padding: 5px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--muted); transition: all 0.16s; }
.mode-btn.active { background: var(--accent-soft); color: var(--accent-light); }
.tb-pill {
  padding: 6px 11px; border-radius: 9px; font-size: 12.5px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted); transition: all 0.15s;
}
.tb-pill:hover { color: var(--text); border-color: var(--accent); }

/* MESSAGES PANE */
.messages-pane { flex: 1; overflow-y: auto; padding: 26px 18px 20px; display: flex; flex-direction: column; }

/* WELCOME */
.welcome { margin: auto; max-width: 680px; text-align: center; padding: 16px; animation: fadeUp 0.45s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.welcome-spark {
  width: 66px; height: 66px; margin: 0 auto 18px; border-radius: 20px; display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); border: 1px solid rgba(217,119,87,0.32); color: var(--accent);
  box-shadow: 0 0 38px rgba(217,119,87,0.22);
}
.welcome-spark svg { animation: sparkSpin 16s linear infinite; }
@keyframes sparkSpin { to { transform: rotate(360deg); } }
.welcome h1 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 10px; }
.welcome-sub { color: var(--muted); font-size: 15px; margin-bottom: 28px; }
.prompt-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; text-align: left; }
.pcard {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 15px;
  background: var(--surface); border: 1px solid var(--border); transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s;
}
.pcard svg { color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.pcard strong { display: block; font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.pcard span { font-size: 12.5px; color: var(--muted); }
.pcard:hover { transform: translateY(-2px); border-color: rgba(217,119,87,0.55); box-shadow: 0 10px 26px rgba(0,0,0,0.18); }

/* MESSAGES STREAM (CLAUDE EDITORIAL STYLE) */
.messages-list { width: 100%; max-width: 750px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.msg { display: flex; flex-direction: column; gap: 8px; animation: fadeUp 0.22s var(--ease); }
.msg.user { align-items: flex-end; }
.msg.user .msg-bubble {
  max-width: 82%; background: var(--surface-hi); border: 1px solid var(--border);
  border-radius: 20px; border-bottom-right-radius: 6px; padding: 12px 16px; font-size: var(--msg-size);
}
.msg.assistant { align-items: flex-start; }
.msg.assistant .msg-bubble { width: 100%; padding: 2px 4px; font-size: var(--msg-size); line-height: 1.72; }
.msg-asst-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.mini-spark { color: var(--accent); display: inline-flex; }
.mini-spark.thinking svg { animation: sparkSpin 1.8s linear infinite; }

.msg-atts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.msg-att-img { max-width: 240px; max-height: 200px; border-radius: 11px; border: 1px solid var(--border); object-fit: cover; }
.msg-att-file { font-size: 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px; color: var(--accent-light); }

.reasoning-box { margin-bottom: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.reasoning-box summary { padding: 8px 13px; font-size: 12.5px; color: var(--muted); cursor: pointer; font-weight: 600; }
.reasoning-body { padding: 10px 13px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); white-space: pre-wrap; max-height: 260px; overflow-y: auto; }

/* MARKDOWN & TABLES */
.md-body p { margin-bottom: 12px; }
.md-body p:last-child { margin-bottom: 0; }
.md-body h1, .md-body h2, .md-body h3 { font-family: var(--font-serif); margin: 18px 0 8px; font-weight: 600; line-height: 1.3; }
.md-body h1 { font-size: 22px; } .md-body h2 { font-size: 18.5px; } .md-body h3 { font-size: 16px; }
.md-body ul, .md-body ol { margin: 8px 0 12px 22px; }
.md-body li { margin-bottom: 4px; }
.md-body blockquote { border-left: 3px solid var(--accent); padding: 6px 14px; color: var(--muted); margin: 10px 0; background: var(--accent-soft); border-radius: 0 10px 10px 0; }
.md-body code.inline-code { background: var(--surface-hi); color: var(--accent-light); padding: 2px 6px; border-radius: 6px; font-family: var(--font-mono); font-size: 0.88em; }
.md-body table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13.5px; }
.md-body th, .md-body td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }
.md-body th { background: var(--surface); font-weight: 600; }

.code-block { margin: 12px 0; border-radius: 13px; overflow: hidden; border: 1px solid var(--border); background: #141210; }
.code-head {
  display: flex; align-items: center; justify-content: space-between; padding: 7px 12px;
  background: #1d1a17; border-bottom: 1px solid #2e2a26; font-size: 12px; color: #a8a29a; font-family: var(--font-mono);
}
.code-head-acts { display: flex; gap: 6px; }
.btn-code-act {
  background: #2b2723; color: #e8e2d9; border-radius: 7px; padding: 3px 9px; font-size: 11.5px; font-family: var(--font-sans); transition: background 0.15s;
}
.btn-code-act:hover { background: var(--accent); color: #fff; }
.code-block pre { padding: 13px 15px; overflow-x: auto; font-family: var(--font-mono); font-size: 13px; line-height: 1.55; color: #f0ebe2; }

/* MESSAGE ACTIONS */
.msg-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; opacity: 0.72; transition: opacity 0.2s; }
.msg:hover .msg-actions { opacity: 1; }
.ma-btn {
  padding: 4px 9px; border-radius: 8px; font-size: 12px; color: var(--muted);
  display: inline-flex; align-items: center; gap: 5px; transition: all 0.15s;
}
.ma-btn:hover { background: var(--surface); color: var(--text); }
.ma-btn.on { color: var(--accent); background: var(--accent-soft); }

.scroll-down {
  position: absolute; left: 50%; bottom: 118px; transform: translateX(-50%); z-index: 15;
  width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}
.scroll-down:hover { border-color: var(--accent); color: var(--accent); }

/* COMPOSER */
.composer-wrap { padding: 8px 18px 16px; width: 100%; max-width: 786px; margin: 0 auto; flex-shrink: 0; }
.attachments-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.att-chip { display: inline-flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 5px 9px; font-size: 12.5px; }
.att-chip img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.composer {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 12px 14px 10px;
  box-shadow: 0 10px 34px rgba(0,0,0,0.18); transition: border-color 0.2s, box-shadow 0.2s;
}
.composer:focus-within { border-color: rgba(217,119,87,0.75); box-shadow: 0 0 0 3px var(--accent-soft), 0 12px 36px rgba(0,0,0,0.22); }
.composer textarea {
  width: 100%; background: transparent; border: none; outline: none; resize: none;
  max-height: 180px; font-size: 15px; line-height: 1.5; color: var(--text);
}
.composer-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 10px; }
.composer-tools, .composer-send-wrap { display: flex; align-items: center; gap: 6px; }
.stream-status, .tok-counter { font-size: 11.5px; color: var(--muted); }
.btn-send, .btn-stop {
  width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; transition: transform 0.15s, box-shadow 0.2s;
}
.btn-send { background: linear-gradient(135deg, var(--accent), var(--accent-hot)); color: #fff; box-shadow: 0 4px 14px rgba(217,119,87,0.4); }
.btn-send:hover { transform: scale(1.06); box-shadow: 0 6px 20px rgba(255,122,47,0.52); }
.btn-send:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-stop { background: rgba(226,100,90,0.2); color: var(--danger); border: 1px solid rgba(226,100,90,0.45); }

/* ARTIFACTS PANEL */
.artifact-pane {
  width: min(46%, 620px); flex-shrink: 0; background: var(--bg-2); border-left: 1px solid var(--border);
  display: flex; flex-direction: column; animation: slideIn 0.25s var(--ease);
}
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.art-head { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.art-kicker { font-size: 10px; font-weight: 800; letter-spacing: 0.14em; color: var(--accent); }
.art-title { font-size: 14px; font-weight: 700; }
.art-tabs { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 2px; }
.art-tab { padding: 4px 11px; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--muted); }
.art-tab.active { background: var(--accent-soft); color: var(--accent-light); }
.art-acts { display: flex; align-items: center; gap: 6px; }
.art-code { flex: 1; overflow: auto; background: #141210; padding: 16px; font-family: var(--font-mono); font-size: 13px; color: #f0ebe2; line-height: 1.55; }
.art-preview { flex: 1; width: 100%; border: none; background: #fff; }

/* MODALS */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.62); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 80; }
.modal-card { width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 22px; }
.modal-wide { max-width: 920px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.preset-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.preset-btn { background: var(--bg); border: 1px solid var(--border); border-radius: 9px; padding: 6px 11px; font-size: 12.5px; color: var(--muted); }
.preset-btn:hover { border-color: var(--accent); color: var(--text); }
#sysPromptInput { width: 100%; resize: vertical; }

/* ADMIN */
.admin-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.kpi-card { background: var(--bg); border: 1px solid var(--border); border-radius: 13px; padding: 12px; }
.kpi-val { font-size: 20px; font-weight: 700; color: var(--accent-light); }
.kpi-lbl { font-size: 12px; color: var(--muted); }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.admin-panel { background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.admin-panel h4 { margin-bottom: 10px; font-size: 14px; }
.compact-form { display: flex; flex-direction: column; gap: 8px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.check-inline { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.perm-box { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.perm-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.perm-checks { display: flex; flex-wrap: wrap; gap: 7px; }
.perm-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px; cursor: pointer; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); }
.admin-table th { color: var(--muted); font-size: 12px; }
.tbl-btn { background: var(--surface); border: 1px solid var(--border); border-radius: 7px; padding: 4px 8px; font-size: 11.5px; margin-right: 4px; }
.tbl-btn:hover { border-color: var(--accent); }
.tbl-btn.danger:hover { border-color: var(--danger); color: var(--danger); }

/* TOAST */
.toast-box { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 120; }
.toast { background: var(--surface); border: 1px solid var(--accent); padding: 10px 15px; border-radius: 12px; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,0.35); }

.sidebar-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 25; }
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); margin-left: 0 !important; }
  .sidebar.open { transform: none; }
  .quota-pill, .mode-switch { display: none; }
  .prompt-cards, .admin-grid { grid-template-columns: 1fr; }
  .admin-kpis { grid-template-columns: repeat(2, 1fr); }
  .artifact-pane { position: fixed; inset: 0; width: 100%; z-index: 60; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
