:root {
  --bg: #0b0e14;
  --bg-2: #11151f;
  --card: #151b28;
  --card-2: #1a2233;
  --border: #232c40;
  --text: #e7ecf5;
  --muted: #8a94ab;
  --accent: #4f8cff;
  --accent-soft: rgba(79, 140, 255, 0.14);
  --hot: #ff5d5d;
  --warm: #ffb02e;
  --cold: #5c6785;
  --green: #3ecf8e;
  --radius: 12px;
  --font: "Inter", -apple-system, sans-serif;
  --mono: "JetBrains Mono", monospace;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

.app { display: flex; min-height: 100vh; }

/* ---------- sidebar ---------- */
.sidebar {
  width: 270px;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 22px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, #4f8cff, #8b5cf6);
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px; color: #fff;
}
.brand-name { font-weight: 700; font-size: 16px; }
.brand-sub { color: var(--muted); font-size: 12px; }

.agent-nav { display: flex; flex-direction: column; gap: 8px; flex: 1; }

.agent-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: var(--radius);
  cursor: pointer; border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
  background: none; color: inherit; font-family: inherit;
  font-size: inherit; text-align: left; width: 100%;
}
.agent-item:hover { background: var(--card); }
.agent-item.active { background: var(--card); border-color: var(--agent-color, var(--accent)); }

.agent-avatar {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px; color: #fff;
  background: var(--agent-color, var(--accent));
}
.agent-item-name { font-weight: 600; font-size: 13.5px; }
.agent-item-product { color: var(--muted); font-size: 11.5px; margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.agent-item-leads { margin-left: auto; color: var(--muted); font-size: 11px; font-family: var(--mono); }

.sidebar-footer { padding-top: 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.gmail-sidebar-btn { width: 100%; justify-content: center; text-align: center; }
.health { display: flex; gap: 14px; flex-wrap: wrap; }
.health-item.clickable { cursor: pointer; }
.health-item.clickable:hover { color: var(--text); }

/* ---------- gmail connect ---------- */
.gmail-card { border-color: rgba(255, 176, 46, 0.35); background: linear-gradient(180deg, var(--card), rgba(255, 176, 46, 0.05)); }
.gmail-card.connected { border-color: rgba(62, 207, 142, 0.35); background: linear-gradient(180deg, var(--card), rgba(62, 207, 142, 0.05)); }
.gmail-card.pending { border-color: rgba(255, 176, 46, 0.35); background: linear-gradient(180deg, var(--card), rgba(255, 176, 46, 0.05)); }
.gmail-connect-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.gmail-connected-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.gmail-connect-desc { color: var(--muted); font-size: 12.5px; margin-top: 4px; line-height: 1.5; }
.gmail-connect-meta { margin-top: 10px; font-size: 12px; color: var(--muted); }
.gmail-connect-meta code { font-family: var(--mono); font-size: 11px; }
.gmail-connect-actions { flex-shrink: 0; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.gmail-status-badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 99px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--green); background: rgba(62, 207, 142, 0.12);
  border: 1px solid rgba(62, 207, 142, 0.35);
}
.gmail-status-badge.pending {
  color: var(--warm); background: rgba(255, 176, 46, 0.12);
  border-color: rgba(255, 176, 46, 0.35);
}
.gmail-header-status.pending {
  background: rgba(255, 176, 46, 0.08); border-color: rgba(255, 176, 46, 0.25);
}
.gmail-sidebar-status.pending {
  background: rgba(255, 176, 46, 0.08); border-color: rgba(255, 176, 46, 0.25);
}
.gmail-sidebar-status.pending .gmail-status-label { color: var(--warm); }
.gmail-status-email { font-family: var(--mono); font-size: 12.5px; color: var(--text); word-break: break-all; }
.gmail-header-status {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 99px;
  background: rgba(62, 207, 142, 0.08); border: 1px solid rgba(62, 207, 142, 0.25);
}
.gmail-header-status .gmail-status-email { font-size: 12px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gmail-sidebar-status {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius);
  background: rgba(62, 207, 142, 0.08); border: 1px solid rgba(62, 207, 142, 0.25);
}
.gmail-sidebar-status-text { min-width: 0; }
.gmail-status-label { font-size: 11px; font-weight: 600; color: var(--green); text-transform: uppercase; letter-spacing: 0.04em; }
.gmail-sidebar-status .gmail-status-email { font-size: 11.5px; margin-top: 2px; }
.gmail-toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 200;
  background: var(--card-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 16px; font-size: 13px; box-shadow: 0 8px 30px rgba(0,0,0,0.35);
}
.gmail-toast.ok { border-color: var(--green); }
.gmail-toast.bad { border-color: var(--hot); }
.health-item { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #555; }
.dot.ok { background: var(--green); box-shadow: 0 0 6px rgba(62, 207, 142, 0.6); }
.dot.bad { background: var(--hot); }

.demo-toggle { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; cursor: pointer; }
.demo-toggle input { accent-color: var(--accent); }

/* ---------- main ---------- */
.main { flex: 1; padding: 28px 34px; max-width: 1200px; }

.header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.header h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.tagline { color: var(--muted); margin-top: 4px; font-size: 13.5px; }

.icp-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
  background: var(--card); border: 1px solid var(--border);
  padding: 5px 11px; border-radius: 99px;
  font-size: 12px; color: var(--muted);
}
.chip b { color: var(--text); font-weight: 600; }
.chip.accent { border-color: var(--agent-color, var(--accent)); color: var(--text); }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
}
.stat-value { font-size: 26px; font-weight: 800; font-family: var(--mono); letter-spacing: -0.03em; }
.stat-sub { font-size: 12px; color: var(--green); font-weight: 600; }
.stat-label { color: var(--muted); font-size: 12px; margin-top: 4px; }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 20px;
}

/* ---------- notifications ---------- */
.header-actions { display: flex; gap: 8px; align-items: center; }
.bell { position: relative; font-size: 15px; padding: 8px 12px; }
.bell-count {
  position: absolute; top: -5px; right: -5px;
  background: var(--hot); color: #fff;
  border-radius: 99px; font-size: 10px; font-weight: 700;
  min-width: 17px; height: 17px; display: grid; place-items: center;
  padding: 0 4px; font-family: var(--mono);
}
.notif-panel { padding: 16px 20px; }
.notif-list { display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow-y: auto; }
.notif-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border-radius: 8px;
}
.notif-item.unread { background: var(--card-2); }
.notif-item:hover { background: var(--card-2); }
.notif-dot { width: 7px; height: 7px; border-radius: 50%; background: transparent; margin-top: 6px; flex-shrink: 0; }
.notif-item.unread .notif-dot { background: var(--accent); }
.notif-msg { font-size: 13px; line-height: 1.45; }
.notif-time { color: var(--muted); font-size: 11.5px; margin-top: 2px; }

/* ---------- automation ---------- */
.automation-card { padding: 16px 20px; }
.actions-card { padding: 16px 20px; }
.actions-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.actions-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.job-panel {
  margin-top: 14px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card-2);
}
.job-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 8px;
}
.job-head-actions { display: flex; align-items: center; gap: 10px; }
.job-title { font-size: 13px; font-weight: 600; }
.job-status { font-size: 12px; color: var(--muted); }
.job-status.running { color: var(--accent); }
.job-status.done { color: var(--green); }
.job-status.error { color: var(--hot); }
.job-status.cancelled { color: var(--warm); }
.job-log {
  margin: 0; max-height: 180px; overflow: auto;
  font-family: "JetBrains Mono", monospace; font-size: 11px;
  line-height: 1.5; color: var(--muted); white-space: pre-wrap;
}
.automation-row { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.automation-desc { color: var(--muted); font-size: 12.5px; line-height: 1.55; margin: 6px 0 10px; max-width: 640px; }
.automation-desc code, .automation-meta code, .empty code, .email-state code {
  font-family: var(--mono); font-size: 11.5px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 5px; padding: 1px 6px;
}
.automation-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.automation-actions { display: flex; gap: 8px; }

/* ---------- email actions ---------- */
.email-state { color: var(--muted); font-size: 12.5px; line-height: 1.5; margin-bottom: 10px; }
.email-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.danger { border-color: rgba(255, 93, 93, 0.4); }
.btn.danger:not(:disabled):hover { background: rgba(255, 93, 93, 0.15); color: var(--hot); }
.btn.disabled, .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; cursor: not-allowed; }

/* ---------- linkedin ---------- */
.li-link {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 5px;
  background: #0a66c2; color: #fff;
  font-size: 11px; font-weight: 800; text-decoration: none;
  font-family: var(--font);
}
.li-link:hover { filter: brightness(1.2); }

/* ---------- pipeline funnel ---------- */
.funnel-card { padding: 16px 20px; }
.funnel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.funnel-bar {
  display: flex; height: 14px; border-radius: 99px; overflow: hidden;
  background: var(--bg); border: 1px solid var(--border);
}
.funnel-seg { height: 100%; min-width: 3px; transition: width 0.4s ease; }
.funnel-empty { color: var(--muted); font-size: 12px; padding: 0 12px; line-height: 14px; }
.funnel-legend { display: flex; flex-wrap: wrap; gap: 12px; }
.legend-item { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11.5px; }
.legend-item b { color: var(--text); font-family: var(--mono); font-weight: 600; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ---------- actions ---------- */
.actions-title { font-weight: 700; font-size: 14px; margin-bottom: 14px; }
.actions-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.action {
  background: var(--card-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.action.wide { grid-column: 1 / -1; }
.action-name { font-weight: 600; font-size: 13px; }
.action-desc { color: var(--muted); font-size: 12px; flex: 1; }
.action-row { display: flex; gap: 8px; align-items: center; }
.action-row input[type="text"] { flex: 1; }
.warn { color: var(--warm); }
.ok-text { color: var(--green); }

select, input[type="text"] {
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; font-family: var(--font); font-size: 13px;
  outline: none;
}
input[type="text"]:focus, select:focus { border-color: var(--accent); }

.btn {
  background: var(--card-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 16px; font-weight: 600; font-size: 13px;
  cursor: pointer; font-family: var(--font);
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
  transition: filter 0.15s, background 0.15s;
}
.btn:hover { filter: brightness(1.15); }
.btn.primary { background: var(--agent-color, var(--accent)); border-color: transparent; color: #fff; }
.btn.ghost { background: transparent; }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- activity log ---------- */
.activity-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.activity-title { font-weight: 700; display: flex; align-items: center; gap: 10px; }
.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--agent-color, var(--accent));
  animation: spin 0.8s linear infinite; display: inline-block;
}
.spinner.done { animation: none; border-color: var(--green); }
.spinner.failed { animation: none; border-color: var(--hot); }
@keyframes spin { to { transform: rotate(360deg); } }

.log {
  font-family: var(--mono); font-size: 12px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 14px; max-height: 220px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 5px;
}
.log-line { color: var(--muted); }
.log-line:last-child { color: var(--text); }
.log-time { color: #4a5468; margin-right: 8px; }

/* ---------- leads table ---------- */
.leads-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.leads-filters { display: flex; gap: 8px; }
.leads-filters input[type="text"] { width: 240px; }
td.date { white-space: nowrap; font-size: 12px; }
.leads-title { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.count-badge {
  background: var(--accent-soft); color: var(--accent);
  border-radius: 99px; padding: 2px 9px; font-size: 12px; font-family: var(--mono);
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; color: var(--muted); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 8px 10px; border-bottom: 1px solid var(--border);
}
td { padding: 11px 10px; border-bottom: 1px solid var(--border); font-size: 13px; }
tbody tr { cursor: pointer; transition: background 0.1s; }
tbody tr:hover { background: var(--card-2); }
td.company { font-weight: 600; }
td.muted { color: var(--muted); }

.score-cell { display: flex; align-items: center; gap: 8px; min-width: 90px; }
.score-num { font-family: var(--mono); font-size: 12.5px; width: 26px; }
.score-bar { flex: 1; height: 5px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.score-fill { height: 100%; border-radius: 99px; }

.badge {
  display: inline-block; padding: 3px 9px; border-radius: 99px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
}
.badge.hot { background: rgba(255, 93, 93, 0.15); color: var(--hot); }
.badge.warm { background: rgba(255, 176, 46, 0.15); color: var(--warm); }
.badge.cold { background: rgba(138, 148, 171, 0.15); color: var(--muted); }
.badge.status { background: var(--card-2); color: var(--muted); font-weight: 600; }
.badge.status.discovered { background: rgba(92, 103, 133, 0.15); color: #9aa3b8; }
.badge.status.imported { background: rgba(79, 140, 255, 0.15); color: var(--accent); }
.badge.status.qualified { background: rgba(255, 176, 46, 0.15); color: var(--warm); }
.badge.status.drafted { background: rgba(62, 207, 142, 0.15); color: var(--green); }
.badge.status.emailed { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.badge.status.replied { background: rgba(45, 212, 191, 0.15); color: #2dd4bf; }
.badge.status.skipped { background: rgba(58, 66, 87, 0.2); color: #6b7289; }

.status-banner {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
}
.status-banner-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 99px;
  font-size: 12px; border: 1px solid var(--border);
  background: var(--card);
}
.status-banner-item.ok { border-color: rgba(62, 207, 142, 0.35); background: rgba(62, 207, 142, 0.08); }
.status-banner-item.warn { border-color: rgba(255, 176, 46, 0.35); background: rgba(255, 176, 46, 0.08); }
.status-banner-item.bad { border-color: rgba(255, 93, 93, 0.35); background: rgba(255, 93, 93, 0.08); }
.status-banner-item .dot { flex-shrink: 0; }

.prompts-toolbar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-bottom: 12px; flex-wrap: wrap;
}
.prompts-path-hint { font-size: 12px; color: var(--muted); }
.prompts-toolbar-actions { display: flex; gap: 8px; }
.prompts-body { margin-top: 4px; }

.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 200;
  background: var(--card-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 16px; font-size: 13px; box-shadow: 0 8px 30px rgba(0,0,0,0.35);
  max-width: 360px;
}
.toast.ok { border-color: var(--green); }
.toast.bad { border-color: var(--hot); }
.contact-badge {
  display: inline-block; padding: 3px 9px; border-radius: 99px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
}
.contact-badge.email { background: rgba(62, 207, 142, 0.12); color: var(--green); }
.contact-badge.linkedin { background: rgba(79, 140, 255, 0.12); color: var(--accent); }
.contact-badge.incomplete { background: rgba(255, 176, 46, 0.12); color: var(--warm); }
.contact-badge.company { background: rgba(92, 103, 133, 0.15); color: #9aa3b8; }

.contact-channel-banner {
  margin-bottom: 16px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card-2);
  font-size: 13px; line-height: 1.5;
}
.contact-channel-banner.email { border-color: rgba(62, 207, 142, 0.35); }
.contact-channel-banner.linkedin { border-color: rgba(79, 140, 255, 0.35); }
.contact-channel-banner.incomplete,
.contact-channel-banner.company_only { border-color: rgba(255, 176, 46, 0.35); }
.contact-channel-banner strong { display: block; margin-bottom: 4px; }
.contact-channel-actions {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px;
}

.empty { color: var(--muted); text-align: center; padding: 36px 0; }
.hidden { display: none !important; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(4, 6, 10, 0.7);
  display: grid; place-items: center; z-index: 50; backdrop-filter: blur(3px);
}
.modal {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; width: min(680px, 92vw);
  max-height: 86vh; overflow-y: auto; padding: 24px;
}
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.modal-company { font-size: 19px; font-weight: 800; }
.modal-sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.modal-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.modal-section { margin-bottom: 18px; }
.outreach-gmail-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border);
}
.outreach-gmail-hint { font-size: 12.5px; color: var(--muted); line-height: 1.5; flex: 1; min-width: 200px; }
.modal-text { font-size: 13.5px; line-height: 1.55; }
.modal-list { margin: 0 0 0 18px; padding: 0; font-size: 13.5px; line-height: 1.6; }
.modal-list li { margin-bottom: 4px; }
.modal-recommendation {
  margin-top: 10px; padding: 10px 14px; border-radius: 8px;
  background: var(--accent-soft); border: 1px solid var(--border);
  font-size: 13px; line-height: 1.5;
  border-left: 3px solid var(--agent-color, var(--accent));
}
.outreach-pre {
  font-family: var(--font); white-space: pre-wrap;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px; font-size: 13.5px; line-height: 1.6;
}
.status-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.status-buttons .btn.active { background: var(--agent-color, var(--accent)); border-color: transparent; color: #fff; }

/* ---------- prompts ---------- */
.prompts-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.prompts-desc { color: var(--muted); font-size: 12.5px; margin-top: 4px; line-height: 1.5; }
.prompts-actions { display: flex; gap: 8px; flex-shrink: 0; }
.prompts-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.prompts-tab {
  background: var(--bg); border: 1px solid var(--border); color: var(--muted);
  padding: 8px 14px; border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 13px;
}
.prompts-tab.active { color: var(--text); border-color: var(--agent-color, var(--accent)); background: var(--accent-soft); }
.prompts-panel { display: none; }
.prompts-panel.active { display: block; }
.prompt-label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.prompt-hint { color: var(--muted); font-weight: 400; }
.prompt-input {
  width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 12px 14px; font-family: var(--mono); font-size: 12.5px; line-height: 1.5;
  resize: vertical; margin-bottom: 14px;
}
.prompt-input:focus { outline: none; border-color: var(--agent-color, var(--accent)); }
.prompt-template {
  font-family: var(--mono); font-size: 11.5px; line-height: 1.55; white-space: pre-wrap;
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; color: var(--muted); max-height: 280px; overflow: auto;
}
.prompts-status { margin-top: 12px; font-size: 12.5px; color: var(--green); }
.prompts-status.error { color: var(--hot); }

/* ---------- auth ---------- */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-shell { width: 100%; max-width: 420px; }
.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.auth-tab {
  flex: 1; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--muted); font-family: inherit; font-size: 13px;
  font-weight: 600; cursor: pointer;
}
.auth-tab.active { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.auth-form { display: flex; flex-direction: column; gap: 6px; }
.auth-label { font-size: 12px; font-weight: 600; margin-top: 8px; }
.auth-input {
  width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 12px 14px; font-family: inherit; font-size: 14px;
}
.auth-input:focus { outline: none; border-color: var(--accent); }
.auth-submit { margin-top: 16px; width: 100%; justify-content: center; }
.auth-hint { color: var(--muted); font-size: 12.5px; line-height: 1.5; margin-bottom: 8px; }
.auth-error {
  margin-top: 16px; padding: 12px 14px; border-radius: 10px;
  background: rgba(255, 93, 93, 0.12); border: 1px solid rgba(255, 93, 93, 0.35);
  color: #ffb4b4; font-size: 13px;
}
.user-menu { display: flex; align-items: center; gap: 10px; }
.user-email { color: var(--muted); font-size: 12px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 980px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .actions-grid { grid-template-columns: 1fr; }
  .sidebar { width: 220px; }
}
