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

:root {
  --bg: #f5f5f7;
  --bg-white: #ffffff;
  --sidebar-bg: #fafafa;
  --border: #e8e8ec;
  --border-light: #f0f0f3;
  --text: #1a1a1f;
  --text-muted: #8a8a96;
  --text-label: #b0b0bc;
  --accent: #3b6ef5;
  --accent-light: #eef2ff;
  --radius: 10px;
  --radius-sm: 6px;
  --sidebar-w: 230px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.layout { display: flex; height: 100vh; overflow: hidden; }

/* ── Sidebar ────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 20px 18px 16px;
}

.logo-dot {
  width: 9px; height: 9px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

.logo-text { font-weight: 700; font-size: 15px; letter-spacing: -.2px; }

.sidebar-nav {
  flex: 1;
  padding: 4px 10px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-label);
  letter-spacing: .06em;
  padding: 10px 8px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  transition: background .12s, color .12s;
  cursor: pointer;
}
.nav-item:hover { background: var(--border-light); color: var(--text); }
.nav-item.active { background: var(--bg-white); color: var(--text); box-shadow: var(--shadow); font-weight: 500; }
.nav-item.active .nav-icon { color: var(--accent); }

.nav-icon { width: 15px; height: 15px; flex-shrink: 0; }

/* Sidebar footer — OpenRouter usage */
.sidebar-footer {
  padding: 14px 18px 16px;
  border-top: 1px solid var(--border);
}

.usage-label {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 7px;
}

.usage-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 5px;
}

.usage-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width .4s ease;
}

.usage-sub { font-size: 11px; color: var(--text-label); }

/* ── Main ────────────────────────────────────────────── */
.main {
  flex: 1;
  overflow-y: auto;
  padding: 32px 40px;
  background: var(--bg);
}

.page { display: none; }
.page.active { display: block; }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.page-header h1 { font-size: 19px; font-weight: 600; letter-spacing: -.3px; }

.model-badge {
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 500;
  box-shadow: var(--shadow);
}

/* ── Analyze card ───────────────────────────────────── */
.analyze-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}

.field-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-label);
  letter-spacing: .06em;
  margin-bottom: 10px;
}

.input-row { display: flex; gap: 10px; margin-bottom: 12px; }
.input-row .input { flex: 1; }

.mode-row { display: flex; gap: 8px; align-items: center; }

.btn-mode {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text-muted); font-size: 12.5px; font-weight: 500;
  cursor: pointer; transition: all .15s;
}
.btn-mode:hover { border-color: var(--accent); color: var(--accent); }
.btn-mode.active { background: var(--accent-light); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.mode-hint { font-size: 11px; opacity: .7; font-weight: 400; }

.input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 9px 13px;
  font-size: 13.5px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,110,245,.1); }
.input::placeholder { color: var(--text-label); }

/* ── Buttons ────────────────────────────────────────── */
.btn {
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background .15s, opacity .15s;
  white-space: nowrap;
}
.btn-dark { background: #1a1a1f; color: #fff; }
.btn-dark:hover { background: #2d2d35; }
.btn-dark:disabled { opacity: .45; cursor: not-allowed; }

.btn-pdf { background: #3b6ef5; color: #fff; }
.btn-pdf:hover { background: #2d5ed4; }

.btn-build {
  background: linear-gradient(135deg, #059669, #047857);
  color: #fff;
}
.btn-build:hover { background: linear-gradient(135deg, #047857, #065f46); }
.btn-build:disabled { opacity: .45; cursor: not-allowed; }

.btn-preview {
  padding: 9px 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-white);
  color: var(--text-muted); font-size: 13px; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: border-color .15s, color .15s;
}
.btn-preview:hover { border-color: var(--accent); color: var(--accent); }

/* ── Section title ──────────────────────────────────── */
.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
  letter-spacing: -.1px;
}

/* ── Client cards ───────────────────────────────────── */
.client-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  transition: box-shadow .15s, border-color .15s;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.client-card:hover { box-shadow: var(--shadow-md); border-color: #d8d8e4; }

.client-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}

.client-info { flex: 1; min-width: 0; }
.client-name { font-weight: 500; font-size: 13.5px; color: var(--text); }
.client-url { font-size: 12px; color: var(--text-muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.client-actions { display: flex; align-items: center; gap: 8px; }

.status-badge {
  font-size: 11px; padding: 3px 9px;
  border-radius: 20px; font-weight: 500; white-space: nowrap;
}
.status-lead         { background: #f3f4f6; color: #6b7280; }
.status-negotiation  { background: #eff6ff; color: #3b82f6; }
.status-active       { background: #f0fdf4; color: #16a34a; }
.status-subscription { background: #eef2ff; color: var(--accent); }
.status-inactive     { background: #fef2f2; color: #dc2626; }

.btn-analyze-client {
  font-size: 11px; padding: 4px 10px;
  border-radius: 5px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text-muted);
  cursor: pointer; transition: all .12s;
}
.btn-analyze-client:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Avatar colors */
.av-blue   { background: #3b82f6; }
.av-green  { background: #10b981; }
.av-orange { background: #f59e0b; }
.av-purple { background: #8b5cf6; }
.av-red    { background: #ef4444; }
.av-teal   { background: #14b8a6; }

/* ── Error banner ───────────────────────────────────── */
.error-banner {
  display: flex; align-items: center; gap: 10px;
  background: #fef2f2; border: 1px solid #fecaca;
  border-radius: var(--radius-sm); padding: 12px 16px;
  font-size: 13px; color: #b91c1c; margin-bottom: 16px;
}
.error-icon { font-size: 15px; flex-shrink: 0; }
.error-close {
  margin-left: auto; background: none; border: none;
  color: #b91c1c; cursor: pointer; font-size: 14px; padding: 0 4px;
  flex-shrink: 0;
}
.error-close:hover { opacity: .7; }

/* ── Loader ─────────────────────────────────────────── */
.loader {
  display: flex; align-items: center; gap: 11px;
  padding: 18px 0; color: var(--text-muted); font-size: 13px;
}
.loader-spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Result ─────────────────────────────────────────── */
.result-header {
  display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px;
}
.result-meta { font-size: 11.5px; color: var(--text-muted); }

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.result-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.result-card h3 {
  font-size: 10.5px; font-weight: 700;
  color: var(--text-label); text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 10px;
}
.result-card p { font-size: 13px; color: var(--text); line-height: 1.6; }
.result-card ul { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.result-card li { font-size: 13px; color: var(--text); padding-left: 14px; position: relative; line-height: 1.5; }
.result-card li::before { content: "·"; position: absolute; left: 3px; color: var(--accent); font-weight: 700; }
.result-card + .result-card { }

.result-summary { margin-top: 0; }
.result-summary p { font-size: 13.5px; line-height: 1.7; }

/* RICE таблица */
.rice-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 8px; }
.rice-table th { background: var(--bg); color: var(--text-muted); padding: 7px 10px; text-align: left; font-size: 10.5px; font-weight: 600; letter-spacing: .05em; border-bottom: 1px solid var(--border); }
.rice-table td { padding: 8px 10px; border-bottom: 1px solid var(--border-light); vertical-align: top; }
.rice-table tr:last-child td { border-bottom: none; }
.rice-score { font-weight: 700; color: var(--accent); }
.rice-table td.center { text-align: center; }

/* Дорожная карта */
.roadmap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.rm-col { background: var(--bg); border-radius: 6px; padding: 12px; }
.rm-col-title { font-size: 10.5px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.rm-col ul { list-style: none; }
.rm-col li { font-size: 12px; padding: 4px 0 4px 12px; position: relative; border-bottom: 1px solid var(--border-light); }
.rm-col li:last-child { border-bottom: none; }
.rm-col li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-size: 10px; }

/* ── Site cards ─────────────────────────────────────── */
.site-card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 8px; box-shadow: var(--shadow);
  transition: box-shadow .15s, border-color .15s;
}
.site-card:hover { box-shadow: var(--shadow-md); border-color: #d8d8e4; }
.site-icon {
  width: 38px; height: 38px; border-radius: 8px;
  background: linear-gradient(135deg, #059669, #047857);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; flex-shrink: 0;
}
.site-info { flex: 1; min-width: 0; }
.site-name { font-weight: 600; font-size: 13.5px; }
.site-domain { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.site-pages { font-size: 11px; color: var(--text-label); margin-top: 2px; }
.site-actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn-site-action {
  font-size: 11.5px; padding: 5px 12px;
  border-radius: 5px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text-muted);
  cursor: pointer; transition: all .12s; text-decoration: none;
  display: inline-flex; align-items: center;
}
.btn-site-action:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-site-dl:hover { background: #059669; border-color: #059669; color: #fff; }

/* ── Build progress ──────────────────────────────────── */
.build-progress {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px;
  margin-top: 12px; display: none;
}
.build-progress.active { display: block; }
.build-steps { list-style: none; margin-top: 10px; }
.build-steps li {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 0; font-size: 13px; color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
}
.build-steps li:last-child { border-bottom: none; }
.build-steps li.done { color: #059669; }
.build-steps li.active { color: var(--accent); font-weight: 500; }
.step-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border); flex-shrink: 0;
}
.build-steps li.done .step-dot { background: #059669; }
.build-steps li.active .step-dot { background: var(--accent); animation: pulse .8s ease infinite alternate; }
@keyframes pulse { to { opacity: .3; } }

/* ── Settings ───────────────────────────────────────── */
.settings-steps { display: flex; flex-direction: column; gap: 10px; }
.settings-step {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 13px; color: var(--text); line-height: 1.6;
}
.step-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.settings-step code {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 6px;
  font-size: 12px; font-family: monospace;
}
.bot-status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; padding: 5px 12px;
  border-radius: 20px; font-weight: 500;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text-muted);
}
.bot-status-badge.online { background: #f0fdf4; border-color: #86efac; color: #16a34a; }
.bot-status-badge.offline { background: #fef2f2; border-color: #fca5a5; color: #dc2626; }

/* ── Nav badge (счётчик задач) ──────────────────────── */
.nav-badge {
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; font-size: 10px; font-weight: 600;
  background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: auto;
}

/* ── Promote tasks ──────────────────────────────────── */
.promote-task {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-white);
  margin-bottom: 8px; transition: background .15s;
}
.promote-task.done { background: #f0fdf4; border-color: #bbf7d0; opacity: .8; }
.promote-task.skipped { opacity: .45; }
.promote-task.error { border-color: #fca5a5; background: #fef2f2; }
.promote-task.in_progress { border-color: var(--accent); background: var(--accent-light); }
.task-icon { font-size: 16px; line-height: 1; margin-top: 2px; flex-shrink: 0; }
.task-info { flex: 1; min-width: 0; }
.task-title { font-weight: 500; font-size: 13px; margin-bottom: 3px; }
.task-meta { font-size: 11.5px; color: var(--text-muted); }
.task-error { font-size: 11.5px; color: #dc2626; margin-top: 4px; }
.task-result { font-size: 11.5px; color: #16a34a; margin-top: 4px; }
.btn-task-skip {
  flex-shrink: 0; font-size: 11px; padding: 4px 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text-muted); cursor: pointer;
}
.btn-task-skip:hover { border-color: #fca5a5; color: #dc2626; }

/* ── Client detail panel ────────────────────────────── */
.client-panel-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.25); z-index: 100;
}
.client-panel-overlay.open { display: block; }

.client-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 420px; max-width: 100vw;
  background: var(--bg-white); border-left: 1px solid var(--border);
  box-shadow: -4px 0 24px rgba(0,0,0,.1);
  z-index: 101; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .22s ease;
  overflow: hidden;
}
.client-panel.open { transform: translateX(0); }

.client-panel-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 20px 20px 16px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.cp-name { font-size: 16px; font-weight: 600; margin-bottom: 3px; }
.cp-url  { font-size: 12px; color: var(--text-muted); }
.cp-close {
  background: none; border: none; cursor: pointer; font-size: 16px;
  color: var(--text-muted); padding: 2px 6px; border-radius: 4px; line-height: 1;
}
.cp-close:hover { background: var(--bg); color: var(--text); }

.client-panel-body { flex: 1; overflow-y: auto; padding: 4px 0 20px; }

.cp-section { padding: 14px 20px 0; }
.cp-section-title {
  font-size: 10.5px; font-weight: 600; letter-spacing: .06em;
  color: var(--text-label); margin-bottom: 8px;
}
.cp-status-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cp-badge {
  font-size: 11.5px; font-weight: 500; padding: 3px 10px;
  border-radius: 20px; border: 1px solid transparent;
}
.cp-contact { font-size: 12px; color: var(--text-muted); }
.cp-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-btn { height: 32px; font-size: 12px; padding: 0 12px; }
.cp-empty { font-size: 12.5px; color: var(--text-muted); display: flex; align-items: center; }

.cp-analysis-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border-light);
  gap: 8px;
}
.cp-analysis-row:last-child { border-bottom: none; }
.cp-mode-badge {
  font-size: 10.5px; font-weight: 600; padding: 2px 7px;
  border-radius: 4px; margin-right: 6px;
}
.cp-mode-badge.express { background: #fef9c3; color: #854d0e; }
.cp-mode-badge.full    { background: #ede9fe; color: #5b21b6; }
.cp-tag {
  font-size: 10.5px; background: var(--bg); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 4px; color: var(--text-muted); margin-left: 4px;
}
.cp-link {
  font-size: 11.5px; color: var(--accent); text-decoration: none;
  padding: 3px 8px; border: 1px solid var(--border); border-radius: 4px;
}
.cp-link:hover { background: var(--accent-light); border-color: var(--accent); }
.cp-site-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-wrap: wrap;
}
.cp-promo-active {
  font-size: 12.5px; color: #16a34a; display: flex; flex-wrap: wrap;
  gap: 4px; align-items: center;
}

/* ── Strategy cards ─────────────────────────────────── */
.strat-card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
  margin-bottom: 12px; transition: box-shadow .15s;
}
.strat-card:hover { box-shadow: var(--shadow-md); }
.strat-header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.strat-name { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.strat-city { font-size: 12px; font-weight: 400; color: var(--text-muted); }
.strat-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.strat-url  { font-size: 12px; color: var(--accent); text-decoration: none; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strat-url:hover { text-decoration: underline; }
.strat-usp  { font-size: 12.5px; color: var(--text); background: var(--accent-light); border-radius: 6px; padding: 8px 12px; margin-bottom: 10px; line-height: 1.5; }
.strat-section { margin-top: 12px; }
.strat-section-title { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; color: var(--text-label); margin-bottom: 6px; }
.strat-keywords { font-size: 12.5px; color: var(--text-muted); }
.strat-win  { font-size: 12.5px; color: var(--text); padding: 2px 0; }
.strat-detail { margin-top: 12px; border-top: 1px solid var(--border-light); padding-top: 12px; }
.strat-roadmap { display: flex; gap: 12px; flex-wrap: wrap; }
.strat-rm-col  { flex: 1; min-width: 140px; }
.strat-rm-title { font-size: 11px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.strat-rm-item  { font-size: 11.5px; color: var(--text); padding: 2px 0; }

/* ── Agents page ─────────────────────────────────────── */
.agent-job {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 7px 0; border-bottom: 1px solid var(--border-light);
}
.agent-job:last-child { border-bottom: none; }
.agent-job-name { font-weight: 500; font-size: 13px; }
.agent-job-next { font-size: 12px; color: var(--text-muted); }

.agent-counter {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 20px; min-width: 110px; text-align: center;
}
.agent-counter-val   { font-size: 26px; font-weight: 700; line-height: 1; margin-bottom: 4px; }
.agent-counter-label { font-size: 11.5px; color: var(--text-muted); }

.agent-task-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--border-light); font-size: 12.5px;
}
.agent-task-row:last-child { border-bottom: none; }

/* ── Prompts editor ──────────────────────────────────── */
.prompts-filter-btn {
  padding: 5px 14px; border-radius: 20px; font-size: 12px;
  border: 1px solid var(--border); background: var(--bg-white);
  color: var(--text-muted); cursor: pointer; transition: all .12s;
}
.prompts-filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.prompts-filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.prompt-card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px;
  margin-bottom: 10px; transition: box-shadow .15s;
}
.prompt-card:hover { box-shadow: var(--shadow); }
.prompt-header {
  display: flex; justify-content: space-between; gap: 12px;
  align-items: flex-start; margin-bottom: 8px; flex-wrap: wrap;
}
.prompt-label {
  font-weight: 500; font-size: 13px; display: flex; align-items: center; gap: 8px;
}
.prompt-custom-badge {
  font-size: 10px; font-weight: 600; padding: 2px 7px;
  border-radius: 4px; background: #fef9c3; color: #854d0e;
  border: 1px solid #fde68a;
}
.prompt-desc {
  font-size: 11.5px; color: var(--text-muted); margin-top: 3px; line-height: 1.5;
}
.prompt-preview {
  font-size: 11.5px; color: var(--text-muted); font-family: monospace;
  white-space: pre-wrap; line-height: 1.5; padding: 8px 10px;
  background: var(--bg); border-radius: 6px;
}
.prompt-editor { margin-top: 8px; }
.prompt-textarea {
  width: 100%; font-family: monospace; font-size: 12px; line-height: 1.6;
  padding: 10px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg); color: var(--text); resize: vertical;
  outline: none; transition: border-color .12s;
}
.prompt-textarea:focus { border-color: var(--accent); }
.prompt-editor-actions {
  display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap;
}
.prompt-save-status { font-size: 12px; margin-left: 4px; }

/* ── Empty state ────────────────────────────────────── */
.empty-state {
  color: var(--text-muted); text-align: center;
  padding: 70px 0; font-size: 13.5px;
}
