/* FB Auto-Poster — modern minimal style */

:root {
  --bg: #f6f7f9;
  --bg-card: #ffffff;
  --border: #e6e8eb;
  --border-strong: #d3d7dc;
  --text: #0f172a;
  --text-muted: #64748b;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.04);
  --radius: 12px;
  --radius-sm: 8px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.muted { color: var(--text-muted); }
.landing-body, .login-body { background: #f8fafc; }
.landing { max-width: 980px; min-height: 100vh; margin: 0 auto; padding: 30px 24px; display: flex; flex-direction: column; }
.landing-brand { color: var(--text); font-size: 18px; font-weight: 750; letter-spacing: -.03em; text-decoration: none; }
.landing-hero { max-width: 660px; margin: auto 0; padding: 90px 0; }
.landing-eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.landing-hero h1 { margin: 12px 0; font-size: clamp(34px, 7vw, 64px); line-height: 1.03; letter-spacing: -.055em; }
.landing-hero > p:not(.landing-eyebrow) { max-width: 560px; color: var(--text-muted); font-size: 18px; }
.landing-cta { display: inline-flex; margin-top: 18px; text-decoration: none; }
.landing footer { color: var(--text-muted); font-size: 13px; }
.login-body { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.login-card { width: min(100%, 390px); padding: 30px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); box-shadow: var(--shadow); }
.login-card h1 { margin: 28px 0 4px; font-size: 25px; }
.login-card form { display: grid; gap: 14px; margin-top: 24px; }
.login-card label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.login-card input { width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font: inherit; }
.login-card button { justify-content: center; margin-top: 4px; }
.login-error { padding: 10px 12px; border-radius: var(--radius-sm); color: #b91c1c; background: #fef2f2; }
.center { text-align: center; }
.mono { font-family: var(--mono); font-size: 12px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.strong { font-weight: 600; }
.sep { color: var(--text-muted); margin: 0 4px; }

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.brand .logo {
  display: inline-flex;
  width: 26px; height: 26px;
  align-items: center; justify-content: center;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
}
.brand .title { font-size: 15px; letter-spacing: -0.01em; }
.status { display: flex; align-items: center; gap: 8px; flex: 1; }
.status .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #cbd5e1;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.status .dot.on {
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.15);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.15); }
  50%      { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0.05); }
}
.actions { display: flex; gap: 8px; }
.dashboard-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.dashboard-main {
  min-width: 0;
}
.action-sidebar {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100vh - 108px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-gutter: stable;
}
.sidebar-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-block h3 {
  margin: 0 0 2px;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.sidebar-btn {
  width: 100%;
  justify-content: center;
}
.sidebar-toggle {
  padding-left: 0;
}
.risk-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.scheduler-controls {
  display: flex;
  align-items: end;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafbfc;
}
.scheduler-controls .compact-field { gap: 3px; }
.scheduler-controls .compact-field > span {
  font-size: 10px;
  line-height: 1;
}
.scheduler-controls .compact-field input {
  width: 78px;
  height: 30px;
  padding: 4px 7px;
  font-size: 12px;
}

/* independent Google Maps scraper controls */
.google-control-card .card-head > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.google-run-status { display: flex; align-items: center; gap: 8px; }
.google-run-status .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #cbd5e1;
}
.google-run-status .dot.on {
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, .15);
}
.google-controls {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) 130px auto auto;
  gap: 14px;
  align-items: end;
  padding: 18px;
}
.google-headless { height: 38px; align-self: end; }
.google-actions { display: flex; gap: 8px; align-items: end; }

/* Whole-country lead campaign */
.campaign-control-card { margin-top: 20px; }
.campaign-progress { color: var(--accent); font-variant-numeric: tabular-nums; }
.campaign-controls {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) 130px auto auto;
  gap: 14px;
  align-items: end;
  padding: 18px 18px 10px;
}
.campaign-headless { height: 38px; align-self: end; }
.campaign-actions { display: flex; gap: 8px; }
.city-picker { margin: 0 18px 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.city-picker legend { padding: 0 5px; color: var(--text-muted); font-size: 12px; }
.city-actions { display: flex; gap: 6px; margin-bottom: 10px; }
.city-list { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.city-list label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.city-list input { accent-color: var(--accent); }

@media (max-width: 1000px) {
  .topbar { flex-wrap: wrap; }
  .scheduler-controls { order: 10; flex-wrap: wrap; }
  .google-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .google-actions { grid-column: 1 / -1; }
  .campaign-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .campaign-actions { grid-column: 1 / -1; }
  .dashboard-shell { grid-template-columns: 1fr; }
  .action-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .google-controls { grid-template-columns: 1fr; }
  .google-actions { grid-column: auto; flex-wrap: wrap; }
  .campaign-controls { grid-template-columns: 1fr; }
  .campaign-actions { grid-column: auto; flex-wrap: wrap; }
  .action-sidebar { grid-template-columns: 1fr; }
}

/* headless toggle in topbar */
.headless-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.headless-toggle:hover { background: #f1f3f5; color: var(--text); }
.headless-toggle input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.05s ease;
}
.btn:hover { border-color: #b6bcc4; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: transparent; }
.btn.small { height: 28px; padding: 0 10px; font-size: 12px; }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: #fef2f2; border-color: #fecaca; }
.group-type-select {
  min-width: 94px;
  padding: 5px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}

/* ---------- page layout ---------- */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---------- counter card ---------- */
.counter-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 24px 28px;
  text-align: center;
}
.counter-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}
.counter-value {
  font-size: 96px;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin: 6px 0 10px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.counter-sub {
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}
.counter-sub strong { color: var(--text); font-weight: 600; }

/* ---------- free marketing funnel ---------- */
.marketing-card .card-head > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(105px, 1fr));
  border-bottom: 1px solid var(--border);
}
.metric {
  padding: 18px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.metric:last-child { border-right: 0; }
.metric span {
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
}
.metric strong { font-size: 24px; letter-spacing: -.03em; }
.metric.success strong { color: var(--ok); }
.analytics-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 28px;
  padding: 18px;
}
.analytics-grid h3, .dialog-body h3 {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.funnel-bars { display: grid; gap: 8px; }
.funnel-row {
  display: grid;
  grid-template-columns: 105px 1fr 32px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.funnel-row > div {
  height: 8px;
  background: #eef2f7;
  border-radius: 999px;
  overflow: hidden;
}
.funnel-row i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}
.funnel-row strong { text-align: right; font-variant-numeric: tabular-nums; }
.breakdown { display: grid; gap: 7px; font-size: 12px; }
.marketing-toolbar { align-items: center; }
.toolbar-controls { display: flex; align-items: center; gap: 8px; }
.compact-input {
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 12px;
}
.score {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.score-high { background: #dcfce7; color: #14532d; }
.score-mid { background: #fef3c7; color: #78350f; }
.score-low { background: #f1f5f9; color: #64748b; }
.lead-actions { white-space: nowrap; }
.unread-badge {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  margin-left: 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  vertical-align: 1px;
}
.reply-preview { max-width: 420px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reply-unread td { background: #fff7ed; }
.conversation-panel { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.conversation-panel .card-head { padding: 10px 12px; }
.conversation-messages { max-height: 210px; overflow: auto; padding: 10px 12px; display: grid; gap: 8px; }
.conversation-message { padding: 8px 10px; border-radius: 7px; background: #f8fafc; color: var(--text); }
.conversation-message.unread { background: #fff7ed; border-left: 3px solid #f59e0b; }
.conversation-message-meta { margin-top: 4px; font-size: 11px; color: var(--muted); }
.lead-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
}
.lead-dialog::backdrop { background: rgba(15, 23, 42, .45); }
.dialog-shell { margin: 0; }
.dialog-body { padding: 18px; display: grid; gap: 16px; }
.dialog-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dialog-body hr { border: 0; border-top: 1px solid var(--border); width: 100%; margin: 2px 0; }
.website-audit-panel { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.compact-card-head { padding: 10px 12px; align-items: center; }
.compact-card-head h3 { margin: 0; font-size: 13px; }
.website-audit-result { padding: 12px; display: grid; gap: 10px; }
.audit-opportunity { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.audit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.audit-grid > span { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 7px 8px; border-radius: 6px; background: var(--bg); font-size: 12px; }
.audit-grid b { font-weight: 600; text-transform: capitalize; }

@media (max-width: 1050px) {
  .metric-grid { grid-template-columns: repeat(4, 1fr); }
  .metric:nth-child(4) { border-right: 0; }
}
@media (max-width: 700px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(even) { border-right: 0; }
  .analytics-grid, .dialog-row, .audit-grid { grid-template-columns: 1fr; }
  .marketing-toolbar { align-items: stretch; flex-direction: column; gap: 10px; }
  .toolbar-controls { flex-wrap: wrap; }
}

/* ---------- cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.card-head h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.card-head .muted { font-size: 12px; }
.health-card { margin-top: 20px; margin-bottom: 20px; }
.health-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
}
.health-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 14px 16px;
  background: #fff;
}
.health-wide { grid-column: span 6; }
.health-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.health-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.health-ok { color: #14532d; }
.health-warn { color: #78350f; }
.health-bad { color: #7f1d1d; }
.health-error-text { font-family: var(--mono); font-size: 12px; }
.group-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.group-actions #groups-count { margin-right: 4px; }

/* ---------- grid ---------- */
.grid { display: grid; gap: 20px; }
.two-col { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
@media (max-width: 1100px) {
  .health-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .health-wide { grid-column: span 3; }
}
@media (max-width: 700px) {
  .health-grid { grid-template-columns: 1fr; }
  .health-wide { grid-column: auto; }
}

/* ---------- log ---------- */
.log {
  margin: 0;
  padding: 12px 18px;
  height: 465px;
  overflow: auto;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  background: #fafbfc;
  white-space: pre-wrap;
  word-break: break-word;
}
.log:empty::before {
  content: "Уште нема логови. Стартувај Auto за да почнеш.";
  color: var(--text-muted);
  font-style: italic;
}
.log-line { display: block; }
.log-line.ok  { color: #14532d; }
.log-line.bad { color: #7f1d1d; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
.groups-scroll {
  max-height: 465px;
  overflow: auto;
  scrollbar-gutter: stable;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th, .table td {
  text-align: left;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
}
.table th {
  font-weight: 600;
  color: var(--text-muted);
  background: #fafbfc;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  user-select: none;
}
.groups-scroll .table th {
  position: sticky;
  top: 0;
  z-index: 2;
}
.table th[data-sort] { cursor: pointer; }
.table th[data-sort]:hover { color: var(--text); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #fafbfc; }

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.pill.ok   { background: #dcfce7; color: #14532d; }
.pill.warn { background: #fef3c7; color: #78350f; }
.pill.muted-pill { background: #f1f3f5; color: var(--text-muted); }

/* posts table */
.post-label { font-weight: 500; }
.post-preview {
  font-size: 12px;
  margin-top: 2px;
  max-width: 480px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table tr.row-active td { background: #f0fdf4; }
.table tr.row-active:hover td { background: #ecfdf5; }
.pad-left  { padding-left: 18px; }
.pad-right { padding-right: 18px; }

/* token card */
.token-pad { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.token-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fafbfc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}
.token {
  flex: 1;
  font-family: var(--mono);
  font-size: 12px;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  word-break: break-all;
  user-select: all;
  cursor: text;
}
.code-sample {
  margin: 0;
  padding: 8px 10px;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 11.5px;
  white-space: pre-wrap;
  word-break: break-all;
}
.code-sample code { color: #93c5fd; }

.token-test-result { min-height: 18px; font-weight: 500; }
.token-test-result.ok  { color: #14532d; }
.token-test-result.bad { color: #7f1d1d; }

@media (max-width: 700px) { .hide-sm { display: none; } }

/* ---------- compose form ---------- */
.compose {
  padding: 18px;
  display: grid;
  gap: 14px;
}
.vehicle-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fafbfc;
}
.vehicle-fields[hidden] { display: none; }
@media (max-width: 700px) {
  .vehicle-fields { grid-template-columns: 1fr; }
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.field textarea, .field select, .field input {
  font: inherit;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea:focus, .field select:focus, .field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.existing-images {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8fafc;
}
.existing-image-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.existing-image-row .mono {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.form-actions { display: flex; align-items: center; gap: 12px; }
#compose-status { font-size: 12px; }

/* ---------- customer CRM + campaign studio ---------- */
.client-crm-card { scroll-margin-top: 80px; }
.crm-business-row { display: flex; gap: 10px; align-items: end; padding: 0 18px 14px; }
.crm-business-row .field { min-width: 280px; }
.crm-create-business { margin: 0 18px 18px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fafbfc; }
.crm-create-business summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.crm-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.crm-form-grid.compact { margin: 0 0 12px; }
.crm-wide { grid-column: 1 / -1; }
#crm-workspace { padding: 0 18px 18px; }
.crm-metrics { margin-bottom: 18px; }
.crm-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.crm-panel { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fafbfc; }
.crm-panel h3 { margin: 0 0 8px; font-size: 15px; }
.campaign-panel textarea { resize: vertical; }
.crm-customers-wrap { border: 1px solid var(--border); border-radius: var(--radius-sm); }
.campaign-output { margin-top: 18px; padding: 16px; border: 1px solid #bfdbfe; border-radius: var(--radius-sm); background: #eff6ff; }
.campaign-output h3 { margin: 0 0 6px; }
.campaign-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.campaign-tabs .active { background: var(--accent); color: #fff; border-color: var(--accent); }
.campaign-items { display: grid; gap: 8px; }
.campaign-item { padding: 10px; border: 1px solid #dbeafe; border-radius: 8px; background: #fff; white-space: pre-wrap; }
.campaign-item strong { display: block; margin-bottom: 4px; }
@media (max-width: 700px) {
  .crm-business-row { flex-wrap: wrap; padding-left: 0; padding-right: 0; }
  .crm-business-row .field { width: 100%; min-width: 0; }
  .crm-create-business { margin-left: 0; margin-right: 0; }
  #crm-workspace { padding-left: 0; padding-right: 0; }
  .crm-two-col, .crm-form-grid { grid-template-columns: 1fr; }
  .crm-wide { grid-column: auto; }
}
