:root {
  --bg: #08090d;
  --bg-elev: #0e1014;
  --panel: #14161d;
  --panel-2: #1a1d26;
  --panel-3: #20242f;
  --border: #262a36;
  --border-soft: #1c2029;
  --border-strong: #353b4a;

  --fg: #ecedf1;
  --fg-dim: #b4bac6;
  --fg-mute: #828a9a;

  --accent: #818cf8;
  --accent-strong: #6366f1;
  --accent-soft: #4f46e5;
  --accent-glow: rgba(129, 140, 248, 0.35);

  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.15);
  --yellow: #fbbf24;
  --yellow-soft: rgba(251, 191, 36, 0.15);
  --red: #f87171;
  --red-soft: rgba(248, 113, 113, 0.15);
  --blue: #60a5fa;
  --blue-soft: rgba(96, 165, 250, 0.15);
  --pink: #f472b6;
  --pink-soft: rgba(244, 114, 182, 0.15);
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.15);

  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);

  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 14px; letter-spacing: -0.005em; -webkit-font-smoothing: antialiased; }
body { background: radial-gradient(ellipse at top left, rgba(99, 102, 241, 0.06), transparent 50%), radial-gradient(ellipse at bottom right, rgba(244, 114, 182, 0.04), transparent 50%), var(--bg); }
a { color: var(--fg); text-decoration: none; }
a:hover { text-decoration: none; color: var(--accent); }
button { font-family: inherit; font-size: 14px; cursor: pointer; transition: var(--transition); }
input, textarea, select { font-family: inherit; font-size: 14px; }

/* layout */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
  border-right: 1px solid var(--border-soft);
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-elev) 100%);
  padding: 22px 14px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar h1 { margin: 0 0 24px 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.4px; color: var(--fg); display: flex; align-items: center; gap: 8px; }
.sidebar h1 .dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
  animation: heartbeat 2s ease-in-out infinite;
}
@keyframes heartbeat {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
}

.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--fg-dim); font-size: 13px; font-weight: 500;
  transition: var(--transition);
  position: relative;
}
.nav a:hover { background: rgba(255,255,255,0.03); color: var(--fg); }
.nav a.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.12), transparent);
  color: var(--fg);
}
.nav a.active::before {
  content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px;
  background: var(--accent); border-radius: 2px;
}

.sidebar .footer { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-soft); font-size: 11px; color: var(--fg-mute); }
.sidebar .footer button { background: transparent; border: 1px solid var(--border); color: var(--fg-dim); padding: 6px 10px; border-radius: var(--radius-sm); width: 100%; margin-top: 6px; font-size: 12px; }
.sidebar .footer button:hover { color: var(--fg); border-color: var(--border-strong); background: var(--panel-2); }

.main { padding: 28px 32px; overflow-y: auto; max-width: 1600px; }
.page-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; gap: 16px; }
.page-head h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.page-head .actions { display: flex; gap: 8px; align-items: center; }

/* ========== HERO METRICS (dashboard) ========== */
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.metric-card {
  position: relative;
  background: linear-gradient(135deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  overflow: hidden;
  transition: var(--transition);
}
.metric-card:hover { border-color: var(--border-strong); transform: translateY(-1px); box-shadow: var(--shadow); }
.metric-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--metric-color, var(--accent)), transparent);
  opacity: 0.6;
}
.metric-card .label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--fg-mute); margin-bottom: 10px; font-weight: 600; }
.metric-card .value {
  font-size: 32px; font-weight: 700; letter-spacing: -0.03em;
  font-family: var(--mono);
  line-height: 1;
  color: var(--metric-color, var(--fg));
}
.metric-card .sub { font-size: 11px; color: var(--fg-dim); margin-top: 6px; }
.metric-card.live::after {
  content: ''; position: absolute; top: 14px; right: 14px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: heartbeat 2s ease-in-out infinite;
}

/* ========== PIPELINE VISUAL ========== */
.pipeline-wrap {
  background: linear-gradient(135deg, var(--panel) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 28px 24px 24px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}
.pipeline-wrap::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.08), transparent 50%);
  pointer-events: none;
}
.pipeline-title {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; position: relative;
}
.pipeline-title h3 { margin: 0; font-size: 13px; font-weight: 600; color: var(--fg-dim); letter-spacing: 0.4px; text-transform: uppercase; }
.pipeline-title .pulse-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-family: var(--mono); color: var(--fg-mute);
}
.pipeline-title .pulse-badge .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--fg-mute);
}
.pipeline-title .pulse-badge.live .dot {
  background: var(--green); box-shadow: 0 0 6px var(--green);
  animation: heartbeat 1.5s ease-in-out infinite;
}
.pipeline-title .pulse-badge.live { color: var(--green); }

.pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  align-items: center;
  position: relative;
}
.pipeline-node {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 14px 6px;
  position: relative;
  transition: var(--transition);
}
.pipeline-node .icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 10px;
  position: relative;
  transition: var(--transition);
  z-index: 2;
}
.pipeline-node .label {
  font-size: 12px; font-weight: 600; color: var(--fg-dim);
  margin-bottom: 2px;
}
.pipeline-node .status {
  font-size: 10px; color: var(--fg-mute); font-family: var(--mono);
  letter-spacing: 0.3px;
}

/* Active state — node está em uso AGORA */
.pipeline-node.active .icon {
  border-color: var(--node-color, var(--accent));
  background: linear-gradient(135deg, var(--panel-2), var(--panel));
  box-shadow:
    0 0 0 4px rgba(99, 102, 241, 0.12),
    0 0 24px var(--node-color, var(--accent-glow));
  animation: nodepulse 1.6s ease-in-out infinite;
}
.pipeline-node.active .label { color: var(--node-color, var(--fg)); }
.pipeline-node.active .status { color: var(--node-color, var(--accent)); }
@keyframes nodepulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.10), 0 0 16px var(--node-color, var(--accent-glow)); }
  50% { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.18), 0 0 32px var(--node-color, var(--accent-glow)); }
}

/* Recent — usado há pouco mas não está rodando agora */
.pipeline-node.recent .icon {
  border-color: var(--node-color, var(--accent));
  opacity: 0.85;
}
.pipeline-node.recent .label { color: var(--fg); }

/* Idle */
.pipeline-node.idle .icon { opacity: 0.5; }
.pipeline-node.idle .label { color: var(--fg-mute); }

/* Conexões — desenhadas como linhas absolutas entre nodes */
.pipeline-arrow {
  position: absolute; top: 36px;
  height: 2px; background: var(--border);
  transition: var(--transition);
  z-index: 1;
}
.pipeline-arrow.active {
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  background-size: 200% 100%;
  animation: flow 1.5s linear infinite;
}
@keyframes flow {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.pipeline-codex-info {
  margin-top: 18px; padding: 12px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-size: 12px;
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
}
.pipeline-codex-info .prompt { color: var(--fg-dim); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pipeline-codex-info .elapsed { font-family: var(--mono); color: var(--accent); font-weight: 600; }

/* ========== HELPERS GRID ========== */
.section-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--fg-mute); font-weight: 600;
  margin: 28px 0 12px;
  display: flex; align-items: center; gap: 8px;
}
.section-title::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--border-soft), transparent);
}

.helpers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.helper-card {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.helper-card .name {
  font-size: 12px; font-weight: 600; color: var(--fg);
  font-family: var(--mono);
  margin-bottom: 4px;
}
.helper-card .last {
  font-size: 11px; color: var(--fg-mute);
}
.helper-card.never { opacity: 0.5; }
.helper-card.never .last { color: var(--fg-mute); }
.helper-card.recent {
  border-color: var(--green-soft);
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.04), var(--panel));
}
.helper-card.recent .last { color: var(--green); }
.helper-card.hot {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), var(--panel));
  box-shadow: 0 0 0 1px var(--accent), 0 0 16px rgba(99, 102, 241, 0.2);
  animation: cardpulse 2s ease-in-out infinite;
}
@keyframes cardpulse {
  0%, 100% { box-shadow: 0 0 0 1px var(--accent), 0 0 16px rgba(99, 102, 241, 0.2); }
  50% { box-shadow: 0 0 0 1px var(--accent), 0 0 28px rgba(99, 102, 241, 0.4); }
}
.helper-card.hot .last { color: var(--accent); }
.helper-card .err-dot {
  position: absolute; top: 10px; right: 10px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 6px var(--red);
}

/* ========== CRONS LIST ========== */
.crons-list {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.cron-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
  align-items: center;
  transition: var(--transition);
}
.cron-row:last-child { border-bottom: none; }
.cron-row:hover { background: var(--panel-2); }
.cron-row .name { font-weight: 500; }
.cron-row .badge-time {
  font-family: var(--mono); font-size: 11px;
  padding: 3px 8px; border-radius: 4px;
  background: var(--panel-2); color: var(--fg-dim);
}
.cron-row .badge-time.soon { background: var(--yellow-soft); color: var(--yellow); }
.cron-row .badge-time.imminent { background: var(--accent-glow); color: var(--accent); animation: heartbeat 2s infinite; }

/* ========== Runtime Flags Cards ========== */
.flags-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.flag-card {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: var(--transition);
}
.flag-card:hover { border-color: var(--border-strong); }
.flag-card .flag-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 8px;
}
.flag-card .flag-name { font-weight: 600; font-size: 13px; }
.flag-card .flag-desc { font-size: 11px; color: var(--fg-dim); line-height: 1.5; }
.flag-card .flag-controls { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }

/* ========== Generic cards/tables (mantém legacy mas atualizado) ========== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 24px; }
.card { background: var(--panel); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 16px 18px; transition: var(--transition); }
.card:hover { border-color: var(--border); }
.card .label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--fg-mute); margin-bottom: 8px; font-weight: 600; }
.card .value { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; font-family: var(--mono); line-height: 1; }
.card .sub { font-size: 11px; color: var(--fg-dim); margin-top: 6px; }

/* table */
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--panel); border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.table th { background: var(--bg-elev); color: var(--fg-mute); font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background var(--transition); }
.table tbody tr:hover { background: var(--panel-2); cursor: pointer; }
.table td.mono { font-family: var(--mono); font-size: 12px; color: var(--fg-dim); }

/* badge */
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 500; letter-spacing: 0.2px; }
.badge.active { background: var(--blue-soft); color: var(--blue); }
.badge.awaiting_approval { background: var(--yellow-soft); color: var(--yellow); }
.badge.done { background: var(--green-soft); color: var(--green); }
.badge.proposed { background: var(--cyan-soft); color: var(--cyan); }
.badge.approved { background: var(--green-soft); color: var(--green); }
.badge.executing { background: var(--accent-glow); color: var(--accent); }
.badge.failed, .badge.rejected { background: var(--red-soft); color: var(--red); }
.badge.cancelled, .badge.abandoned { background: rgba(107, 114, 128, 0.2); color: var(--fg-mute); }
.badge.urgent { background: var(--red-soft); color: var(--red); }
.badge.normal { background: var(--accent-glow); color: var(--accent); }
.badge.low { background: rgba(107, 114, 128, 0.2); color: var(--fg-mute); }
.badge.outbound { background: var(--accent-glow); color: var(--accent); }
.badge.inbound { background: var(--green-soft); color: var(--green); }
.badge.system { background: rgba(107, 114, 128, 0.15); color: var(--fg-mute); }
.badge.blocked { background: var(--red-soft); color: var(--red); }
.badge.ok { background: var(--green-soft); color: var(--green); }
.badge.err { background: var(--red-soft); color: var(--red); }

/* filters */
.filters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.filters input, .filters select { background: var(--panel); border: 1px solid var(--border); color: var(--fg); padding: 7px 12px; border-radius: var(--radius-sm); transition: var(--transition); }
.filters input:focus, .filters select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

/* buttons */
.btn {
  background: var(--panel); border: 1px solid var(--border); color: var(--fg);
  padding: 7px 14px; border-radius: var(--radius-sm);
  font-weight: 500;
  transition: var(--transition);
}
.btn:hover { border-color: var(--border-strong); background: var(--panel-2); }
.btn.primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  border-color: var(--accent-strong); color: white;
  box-shadow: 0 1px 0 rgba(255,255,255,0.1) inset, 0 1px 2px rgba(0,0,0,0.3);
}
.btn.primary:hover { background: linear-gradient(180deg, var(--accent-strong), var(--accent-soft)); }
.btn.danger { background: transparent; border-color: var(--red); color: var(--red); }
.btn.danger:hover { background: var(--red-soft); }
.btn.small { padding: 5px 11px; font-size: 12px; }

/* drawer */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 100; animation: fadeIn 0.2s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: 760px; max-width: 92vw;
  background: var(--bg-elev); border-left: 1px solid var(--border);
  z-index: 101; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-head { padding: 20px 26px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg-elev); z-index: 1; }
.drawer-head h3 { margin: 0 0 8px 0; font-size: 17px; letter-spacing: -0.01em; }
.drawer-head .meta { font-size: 12px; color: var(--fg-dim); display: flex; gap: 12px; flex-wrap: wrap; }
.drawer-head .close { position: absolute; right: 20px; top: 20px; background: transparent; border: 1px solid var(--border); color: var(--fg-dim); padding: 5px 12px; border-radius: var(--radius-sm); }
.drawer-head .close:hover { color: var(--fg); border-color: var(--border-strong); }
.drawer-body { padding: 22px 26px; }
.drawer-body h4 { font-size: 11px; text-transform: uppercase; color: var(--fg-mute); letter-spacing: 0.6px; margin: 22px 0 12px; font-weight: 600; }
.drawer-body h4:first-child { margin-top: 0; }

/* chat */
.chat { display: flex; flex-direction: column; gap: 10px; }
.msg { padding: 10px 14px; border-radius: 14px; max-width: 75%; word-wrap: break-word; white-space: pre-wrap; font-size: 13px; line-height: 1.5; }
.msg.inbound { background: var(--panel-2); align-self: flex-start; border: 1px solid var(--border-soft); }
.msg.outbound { background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(99, 102, 241, 0.12)); align-self: flex-end; border: 1px solid rgba(99, 102, 241, 0.3); }
.msg.system { background: transparent; border: 1px dashed var(--border); color: var(--fg-mute); align-self: center; font-size: 11px; font-style: italic; max-width: 90%; text-align: center; }
.msg .ts { display: block; font-size: 10px; color: var(--fg-mute); margin-top: 4px; font-family: var(--mono); }

.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; font-size: 13px; }
.kv .k { color: var(--fg-mute); }
.kv .v { color: var(--fg); word-break: break-all; }

.empty { color: var(--fg-mute); padding: 36px; text-align: center; font-size: 13px; }

/* login */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.1), transparent 60%); }
.login-box { background: var(--panel); border: 1px solid var(--border); padding: 32px 34px; border-radius: var(--radius-lg); width: 360px; box-shadow: var(--shadow-lg); }
.login-box h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.02em; }
.login-box p { margin: 0 0 22px; color: var(--fg-dim); font-size: 13px; }
.login-box input { width: 100%; padding: 10px 14px; background: var(--bg); border: 1px solid var(--border); color: var(--fg); border-radius: var(--radius-sm); margin-bottom: 14px; transition: var(--transition); }
.login-box input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.login-box .err { color: var(--red); font-size: 12px; margin-top: -6px; margin-bottom: 12px; min-height: 16px; }
.login-box button {
  width: 100%; padding: 11px 14px;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: white; border: none; border-radius: var(--radius-sm);
  font-weight: 600;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.login-box button:hover { background: linear-gradient(180deg, var(--accent-strong), var(--accent-soft)); }

/* modals */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 200; display: flex; align-items: center; justify-content: center; }
.modal { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px 30px; width: 440px; max-width: 92vw; box-shadow: var(--shadow-lg); animation: slideIn 0.2s; }
.modal h3 { margin: 0 0 20px; font-size: 17px; }
.modal label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--fg-mute); margin-bottom: 6px; font-weight: 600; }
.modal input, .modal select, .modal textarea { width: 100%; padding: 9px 12px; background: var(--bg); border: 1px solid var(--border); color: var(--fg); border-radius: var(--radius-sm); margin-bottom: 14px; transition: var(--transition); }
.modal input:focus, .modal select:focus, .modal textarea:focus { outline: none; border-color: var(--accent); }
.modal textarea { min-height: 80px; resize: vertical; font-family: inherit; }
.modal .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 10px; }

.thread-row { display: grid; grid-template-columns: 1fr auto; gap: 4px; align-items: center; }
.thread-row .last { color: var(--fg-dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 400px; }
.thread-row .time { color: var(--fg-mute); font-size: 11px; font-family: var(--mono); }

pre.json { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 11px; line-height: 1.6; overflow-x: auto; color: var(--fg-dim); white-space: pre-wrap; font-family: var(--mono); }

/* utility classes */
.fade-in { animation: fadeIn 0.3s ease-out; }
.mono { font-family: var(--mono); }
.dim { color: var(--fg-dim); }
.mute { color: var(--fg-mute); }
