*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #F4F5F7;
  --surface:      #FFFFFF;
  --surface2:     #F8F9FA;
  --surface3:     #EBECF0;
  --border:       #DFE1E6;
  --border2:      #B3BAC5;
  --primary:      #0052CC;
  --primary-lt:   #DEEBFF;
  --primary-hov:  #0065FF;
  --text:         #172B4D;
  --text-mid:     #5E6C84;
  --text-dim:     #97A0AF;
  --green:        #006644;
  --green-bg:     #E3FCEF;
  --green-bd:     #79F2C0;
  --yellow:       #974F0C;
  --yellow-bg:    #FFF7D6;
  --yellow-bd:    #F8E6A0;
  --red:          #AE2A19;
  --red-bg:       #FFECEB;
  --red-bd:       #FD9891;
  --shadow-sm:    0 1px 2px rgba(9,30,66,0.1), 0 0 0 1px rgba(9,30,66,0.06);
  --shadow-md:    0 2px 6px rgba(9,30,66,0.14), 0 0 0 1px rgba(9,30,66,0.06);
  --mono: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  --sans: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
}

[data-theme="dark"] {
  --bg:           #0D1117;
  --surface:      #161B22;
  --surface2:     #1C2128;
  --surface3:     #21262D;
  --border:       #21262D;
  --border2:      #30363D;
  --primary:      #388BFD;
  --primary-lt:   #1C2B3A;
  --primary-hov:  #58A6FF;
  --text:         #C9D1D9;
  --text-mid:     #8B949E;
  --text-dim:     #6E7681;
  --green:        #3FB950;
  --green-bg:     #1A2B1E;
  --green-bd:     #2EA043;
  --yellow:       #E3B341;
  --yellow-bg:    #272105;
  --yellow-bd:    #9E6A03;
  --red:          #F85149;
  --red-bg:       #2B1010;
  --red-bd:       #8B2020;
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:    0 3px 8px rgba(0,0,0,0.5);
}

html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── HEADER ── */
header {
  height: 52px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  gap: 1rem;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 300;
  flex-shrink: 0;
}

.h-left { display: flex; align-items: center; gap: 1.5rem; }

.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.logo-mark {
  width: 30px; height: 30px;
  background: var(--primary);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-mark svg { width: 17px; height: 17px; fill: none; stroke: #fff; stroke-width: 1.6; }
.logo-text { font-size: 0.88rem; font-weight: 700; color: var(--text); line-height: 1.1; }
.logo-sub { font-size: 0.63rem; color: var(--text-dim); font-weight: 400; }

nav { display: flex; align-items: center; gap: 2px; }
.nav-item {
  padding: 5px 10px; border-radius: 4px; border: none; background: none;
  font-size: 0.8rem; font-weight: 500; color: var(--text-mid);
  cursor: pointer; font-family: var(--sans); transition: all 0.1s;
}
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active { background: var(--primary-lt); color: var(--primary); }
.nav-item.dim { opacity: 0.45; cursor: default; }
.nav-item .pill {
  display: inline-block; font-size: 0.55rem; padding: 1px 4px;
  background: var(--surface3); border: 1px solid var(--border);
  color: var(--text-dim); border-radius: 3px; margin-left: 3px;
  font-family: var(--mono); vertical-align: middle;
}

.h-right { display: flex; align-items: center; gap: 8px; }

.agent-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 6px; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 20px;
  font-size: 0.77rem; font-weight: 500; color: var(--text); cursor: default;
}
.avatar {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 0.58rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex-shrink: 0; }

.icon-btn {
  width: 30px; height: 30px; border-radius: 5px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-mid); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.1s;
}
.icon-btn:hover { background: var(--surface2); color: var(--text); }
.icon-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── STATS BAR ── */
.stats-bar {
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  display: flex; align-items: stretch;
  height: 52px; padding: 0 1.25rem;
  flex-shrink: 0; overflow-x: auto; gap: 0;
}

.stat {
  display: flex; align-items: center; gap: 9px;
  padding: 0 1.25rem; border-right: 1px solid var(--border);
  white-space: nowrap; flex-shrink: 0;
}
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: none; margin-left: auto; padding-right: 0; }

.stat-dot {
  width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0;
}
.stat-dot.blue { background: #0052CC; }
.stat-dot.red { background: #E34935; }
.stat-dot.yellow { background: #F59E0B; }
.stat-dot.green { background: #00875A; }
.stat-dot.purple { background: #6554C0; }

.stat-val {
  font-family: var(--mono); font-size: 1rem; font-weight: 500;
  color: var(--text); line-height: 1;
  display: flex; align-items: baseline; gap: 5px;
}
.stat-tag {
  font-size: 0.6rem; font-family: var(--sans); font-weight: 600;
  padding: 1px 5px; border-radius: 3px;
}
.stat-tag.up { background: var(--green-bg); color: var(--green); }
.stat-tag.warn { background: var(--yellow-bg); color: var(--yellow); }
.stat-lbl { font-size: 0.65rem; color: var(--text-dim); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }

/* ── LAYOUT ── */
.layout {
  display: grid;
  grid-template-columns: 355px 1fr;
  flex: 1;
  overflow: hidden;
}

/* ── LEFT PANEL ── */
aside {
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  height: calc(100vh - 104px);
  position: sticky;
  top: 104px;
}

.aside-section {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
}

.aside-label {
  font-size: 0.63rem; font-weight: 700; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.09em; margin-bottom: 0.6rem;
}

/* Category grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.cat-btn {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 7px 3px 6px; border-radius: 5px;
  border: 1px solid var(--border); background: var(--surface2);
  cursor: pointer; font-size: 0.68rem; font-weight: 500; color: var(--text-mid);
  transition: all 0.1s; font-family: var(--sans);
}
.cat-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-lt); }
.cat-btn.active { border-color: var(--primary); color: var(--primary); background: var(--primary-lt); font-weight: 600; }
.cat-icon { font-size: 0.95rem; }

/* Priority */
.pri-row { display: flex; gap: 4px; }
.pri-btn {
  flex: 1; padding: 6px 5px; border-radius: 4px;
  border: 1px solid var(--border); background: var(--surface2);
  font-size: 0.69rem; font-weight: 600; color: var(--text-mid);
  cursor: pointer; font-family: var(--sans); text-align: center; transition: all 0.1s;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.pri-btn::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.pri-btn:hover { border-color: var(--border2); color: var(--text); }
.pri-btn.a-low    { border-color: var(--green-bd); color: var(--green); background: var(--green-bg); }
.pri-btn.a-medium { border-color: var(--yellow-bd); color: var(--yellow); background: var(--yellow-bg); }
.pri-btn.a-urgent { border-color: var(--red-bd); color: var(--red); background: var(--red-bg); }

/* Fields */
.field-row { display: flex; gap: 6px; margin-bottom: 7px; }
.field-group { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.field-label { font-size: 0.68rem; font-weight: 600; color: var(--text-mid); }

input[type="text"], textarea, select {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 4px; color: var(--text); font-family: var(--sans);
  font-size: 0.8rem; padding: 5px 8px; outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
input[type="text"]:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0,82,204,0.14);
}
textarea { resize: none; height: 84px; line-height: 1.55; }
.char-hint { font-size: 0.6rem; color: var(--text-dim); text-align: right; font-family: var(--mono); margin-top: 2px; }

/* Submit button */
.submit-btn {
  width: 100%; padding: 8px 14px; background: var(--primary);
  color: #fff; border: none; border-radius: 5px;
  font-family: var(--sans); font-size: 0.83rem; font-weight: 600;
  cursor: pointer; transition: all 0.12s;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.submit-btn:hover:not(:disabled) { background: var(--primary-hov); }
.submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.spin {
  width: 12px; height: 12px; border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%;
  animation: spin 0.6s linear infinite; display: none;
}
.submit-btn.loading .spin { display: block; }
.submit-btn.loading .btn-txt { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Examples */
.examples { display: flex; flex-direction: column; gap: 3px; }
.ex-chip {
  padding: 5px 8px; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 4px;
  font-size: 0.72rem; color: var(--text-mid); cursor: pointer;
  text-align: left; font-family: var(--sans); transition: all 0.1s;
  display: flex; align-items: center; gap: 6px;
}
.ex-chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-lt); }

/* ── RIGHT PANEL ── */
main {
  display: flex; flex-direction: column;
  height: calc(100vh - 104px);
  overflow-y: auto; background: var(--bg);
}

/* Empty state */
.empty {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 3rem 2rem; text-align: center;
}
.empty-icon {
  width: 52px; height: 52px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 0.9rem; box-shadow: var(--shadow-sm);
}
.empty h2 { font-size: 0.98rem; font-weight: 600; margin-bottom: 0.35rem; }
.empty p { font-size: 0.78rem; color: var(--text-mid); max-width: 260px; }
.empty-cards {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 7px; margin-top: 1.25rem; max-width: 380px;
}
.empty-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 7px; padding: 9px 11px; text-align: left; box-shadow: var(--shadow-sm);
}
.empty-card-ttl { font-size: 0.72rem; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.empty-card p { font-size: 0.68rem; color: var(--text-dim); }

/* Loading */
.loading {
  flex: 0 0 auto;
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 3rem; gap: 1rem;
}
.loading.on { display: flex; }
.ring {
  width: 32px; height: 32px;
  border: 3px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
.loading-steps { display: flex; flex-direction: column; gap: 4px; }
.lstep {
  font-size: 0.73rem; color: var(--text-dim);
  display: flex; align-items: center; gap: 6px;
  opacity: 0; animation: fi 0.3s ease forwards;
}
.lstep:nth-child(1) { animation-delay: 0.1s; }
.lstep:nth-child(2) { animation-delay: 0.6s; }
.lstep:nth-child(3) { animation-delay: 1.1s; }
.lstep:nth-child(4) { animation-delay: 1.7s; }
.lstep::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--primary); }
@keyframes fi { to { opacity: 1; } }

/* Error */
.error-bar {
  display: none; margin: 1rem 1.25rem;
  background: var(--red-bg); border: 1px solid var(--red-bd);
  border-radius: 7px; padding: 0.9rem 1rem;
  font-size: 0.8rem; color: var(--red);
}
.error-bar.on { display: block; }

/* Result */
.result { display: none; flex-direction: column; padding: 1.1rem 1.25rem; gap: 0.8rem; flex: 0 0 auto; }
.result.on { display: flex; }

/* Ticket summary card */
.ticket-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 7px;
  padding: 0.9rem 1.1rem;
  box-shadow: var(--shadow-sm);
}
.ticket-card.pri-urgent { border-left-color: var(--red); }
.ticket-card.pri-medium { border-left-color: var(--yellow); }
.ticket-card.pri-low { border-left-color: var(--green); }

.tc-top {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 1rem; margin-bottom: 0.45rem;
}
.tc-id { font-family: var(--mono); font-size: 0.62rem; color: var(--text-dim); margin-bottom: 2px; }
.tc-title { font-size: 0.92rem; font-weight: 600; color: var(--text); }
.tc-badges { display: flex; gap: 5px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.badge {
  padding: 2px 7px; border-radius: 3px;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
}
.b-cat    { background: #DEEBFF; color: #0052CC; }
.b-low    { background: var(--green-bg); color: var(--green); }
.b-medium { background: var(--yellow-bg); color: var(--yellow); }
.b-urgent { background: var(--red-bg); color: var(--red); }
.b-new    { background: var(--surface3); color: var(--text-mid); border: 1px solid var(--border); }

.tc-footer {
  display: flex; gap: 1rem; padding-top: 0.45rem;
  border-top: 1px solid var(--border); flex-wrap: wrap;
}
.tc-meta { font-size: 0.68rem; color: var(--text-dim); }
.tc-meta strong { color: var(--text-mid); font-weight: 600; }

/* Tabs */
.tabs-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 7px; overflow: hidden; box-shadow: var(--shadow-sm);
}
.tab-bar {
  display: flex; border-bottom: 1px solid var(--border);
  background: var(--surface2); overflow-x: auto;
}
.tab-btn {
  padding: 7px 14px; font-size: 0.76rem; font-weight: 500;
  color: var(--text-mid); cursor: pointer; border: none; background: none;
  border-bottom: 2px solid transparent;
  transition: all 0.1s; white-space: nowrap; font-family: var(--sans);
}
.tab-btn:hover { color: var(--text); background: var(--surface); }
.tab-btn.on { color: var(--primary); border-bottom-color: var(--primary); background: var(--surface); font-weight: 600; }
.tab-pane { display: none; padding: 1rem 1.1rem; }
.tab-pane.on { display: block; }

/* Analysis content */
.sec { margin-bottom: 0.9rem; }
.sec:last-child { margin-bottom: 0; }
.sec-hdr {
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-dim); margin-bottom: 0.45rem;
  display: flex; align-items: center; gap: 6px;
}
.sec-hdr::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.diag { font-size: 0.81rem; line-height: 1.72; color: var(--text); }

/* Steps */
.steps-list { display: flex; flex-direction: column; gap: 5px; }
.step-row {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 7px 9px; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 4px;
}
.step-num {
  width: 19px; height: 19px; border-radius: 50%;
  background: var(--primary-lt); border: 1px solid #4C9AFF;
  color: var(--primary); font-family: var(--mono); font-size: 0.6rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px;
}
.step-txt { font-size: 0.79rem; line-height: 1.6; color: var(--text); }

/* Checklist */
.checklist { display: flex; flex-direction: column; gap: 4px; }
.chk-row {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.79rem; color: var(--text); cursor: pointer;
  padding: 4px 0; user-select: none;
}
.chk-box {
  width: 14px; height: 14px; border: 1.5px solid var(--border2);
  border-radius: 3px; flex-shrink: 0; background: var(--surface);
  display: flex; align-items: center; justify-content: center; transition: all 0.12s;
}
.chk-row.done .chk-box { background: var(--green); border-color: var(--green); }
.chk-row.done .chk-box::after { content: '✓'; color: #fff; font-size: 0.58rem; font-weight: 700; }
.chk-row.done .chk-lbl { text-decoration: line-through; color: var(--text-dim); }

/* Escalation */
.esc-box {
  background: var(--yellow-bg); border: 1px solid var(--yellow-bd);
  border-radius: 5px; padding: 9px 11px;
  font-size: 0.79rem; color: var(--text); line-height: 1.65;
  display: flex; gap: 8px; align-items: flex-start;
}

/* Reply/Note */
.reply-box {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 5px; padding: 10px 12px;
  font-size: 0.81rem; line-height: 1.75; color: var(--text);
  white-space: pre-wrap; min-height: 90px;
}
.copy-sm {
  margin-top: 7px; padding: 4px 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 3px; font-size: 0.69rem; font-weight: 500;
  color: var(--text-mid); cursor: pointer; font-family: var(--sans); transition: all 0.1s;
}
.copy-sm:hover { border-color: var(--primary); color: var(--primary); }

/* Actions tab */
.act-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 0.9rem; }
.act-card { background: var(--surface2); border: 1px solid var(--border); border-radius: 5px; padding: 9px 11px; }
.act-card-lbl { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-dim); margin-bottom: 3px; }
.act-card-val { font-size: 0.81rem; font-weight: 600; color: var(--text); }
.act-card-val.blue { color: var(--primary); }
.act-card-val.green { color: var(--green); }

.act-btns { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 0.5rem; }
.act-btn {
  padding: 5px 11px; border-radius: 4px;
  font-size: 0.73rem; font-weight: 500; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-mid); font-family: var(--sans); transition: all 0.1s;
  display: flex; align-items: center; gap: 5px;
}
.act-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-lt); }
.act-btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.act-btn.primary:hover { background: var(--primary-hov); }
.act-btn.success { background: var(--green-bg); color: var(--green); border-color: var(--green-bd); }

/* Result footer bar */
.result-bar {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 7px; padding: 0.65rem 1.1rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; box-shadow: var(--shadow-sm); flex-wrap: wrap;
}
.rb-left { font-size: 0.69rem; color: var(--text-dim); }
.rb-left strong { color: var(--green); font-weight: 600; }
.rb-btns { display: flex; gap: 5px; }

/* ── QUEUE ── */
.queue-wrap { padding: 1.1rem 1.25rem; flex: 1; }
.queue-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.65rem;
}
.queue-ttl {
  font-size: 0.78rem; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 6px;
}
.q-count {
  background: var(--primary-lt); color: var(--primary);
  font-family: var(--mono); font-size: 0.62rem; font-weight: 700;
  padding: 1px 6px; border-radius: 10px;
}
.q-filters { display: flex; gap: 3px; }
.q-filter {
  padding: 3px 8px; border-radius: 3px; border: 1px solid var(--border);
  background: none; font-size: 0.66rem; font-weight: 500;
  color: var(--text-dim); cursor: pointer; font-family: var(--sans); transition: all 0.1s;
}
.q-filter:hover { border-color: var(--border2); color: var(--text); }
.q-filter.on { background: var(--surface); border-color: var(--border2); color: var(--text); }

.q-table { width: 100%; border-collapse: collapse; font-size: 0.76rem; }
.q-table thead th {
  background: var(--surface2); color: var(--text-dim);
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; padding: 6px 9px; text-align: left;
  border: 1px solid var(--border); white-space: nowrap;
}
.q-table thead th:first-child { border-radius: 5px 0 0 0; }
.q-table thead th:last-child { border-radius: 0 5px 0 0; }
.q-table td {
  padding: 7px 9px; border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border); background: var(--surface);
  vertical-align: middle; color: var(--text);
}
.q-table td:last-child { border-right: 1px solid var(--border); }
.q-table tbody tr:hover td { background: var(--surface2); }
.q-table tbody tr:last-child td:first-child { border-radius: 0 0 0 5px; }
.q-table tbody tr:last-child td:last-child { border-radius: 0 0 5px 0; }

.q-id { font-family: var(--mono); font-size: 0.69rem; color: var(--primary); font-weight: 500; }
.q-issue { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.q-time { font-family: var(--mono); font-size: 0.65rem; color: var(--text-dim); }
.q-agent { font-size: 0.73rem; color: var(--text-mid); }

.s-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 6px; border-radius: 3px;
  font-size: 0.59rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}
.s-new  { background: #DEEBFF; color: #0052CC; }
.s-open { background: var(--yellow-bg); color: var(--yellow); }
.s-ip   { background: var(--primary-lt); color: var(--primary); }
.s-res  { background: var(--green-bg); color: var(--green); }

.q-btn {
  padding: 3px 7px; border: 1px solid var(--border);
  background: var(--surface); border-radius: 3px;
  font-size: 0.62rem; font-weight: 500; color: var(--text-mid);
  cursor: pointer; font-family: var(--sans); transition: all 0.1s;
}
.q-btn:hover { border-color: var(--primary); color: var(--primary); }

/* Divider in aside */
.aside-divider { height: 1px; background: var(--border); margin: 0 1.1rem; }

/* Responsive */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  aside { height: auto; position: static; }
  main { height: auto; }
  .stats-bar { padding: 0 0.8rem; }
  .stat { padding: 0 0.8rem; }
}