:root {
  --bg: #f4f5f2;
  --surface: #ffffff;
  --surface-2: #f8f9f7;
  --ink: #1a1d1b;
  --muted: #6c736e;
  --line: #dfe3df;
  --line-strong: #c9cfca;
  --green: #1f694e;
  --green-soft: #e7f1eb;
  --yellow: #f3c84b;
  --red: #b54b42;
  --red-soft: #faecea;
  --blue: #3066be;
  --shadow: 0 8px 28px rgba(28, 38, 31, .07);
  --radius: 8px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
html, body, #app { min-height: 100%; margin: 0; }
body { background: var(--bg); letter-spacing: 0; }
button, input, textarea, select { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
a { color: inherit; }

.boot {
  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 14px;
  color: var(--muted);
  text-align: center;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--green);
  color: white;
  font-weight: 800;
  margin: 0 auto;
  border-radius: 7px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(300px, 440px) minmax(420px, 1fr);
  background: var(--surface);
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 7vw, 88px);
  border-right: 1px solid var(--line);
}

.registration-panel {
  width: min(760px, 100%);
  position: relative;
}

.registration-page {
  grid-template-columns: minmax(560px, 760px) minmax(360px, 1fr);
}

.registration-back {
  position: absolute;
  top: 24px;
  right: 24px;
}

.registration-form {
  margin-top: 20px;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.plan-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  background: var(--surface);
}

.plan-card.selected {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
}

.plan-card > div:first-child {
  display: grid;
  gap: 6px;
}

.plan-card > div:first-child span,
.plan-card li {
  color: var(--muted);
  font-size: 13px;
}

.plan-card ul {
  padding-left: 18px;
  margin: 0;
  display: grid;
  gap: 7px;
}

.plan-price {
  font-size: 24px;
  font-weight: 700;
}

.plan-price small {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.plan-card .btn {
  margin-top: auto;
}

.copilot-panel {
  margin-top: 18px;
}

.copilot-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 0 18px 18px;
}

.copilot-answer {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  margin: 0 18px 18px;
  padding: 14px;
  background: var(--green-soft);
  border-radius: 7px;
  color: var(--ink);
}

.copilot-answer p {
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .plan-grid {
    grid-template-columns: 1fr;
  }

  .copilot-form {
    grid-template-columns: 1fr;
  }
}

.login-panel h1 {
  font-size: 30px;
  line-height: 1.12;
  margin: 26px 0 10px;
}

.login-panel p { color: var(--muted); margin: 0 0 30px; line-height: 1.55; }
.login-art {
  background:
    linear-gradient(rgba(22, 66, 50, .78), rgba(22, 66, 50, .78)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='900'%3E%3Crect width='1200' height='900' fill='%23dfe7df'/%3E%3Cpath d='M0 690L1200 250V900H0Z' fill='%23f3c84b'/%3E%3Ccircle cx='850' cy='300' r='210' fill='%23ffffff' fill-opacity='.8'/%3E%3Crect x='180' y='130' width='430' height='520' rx='6' fill='%23ffffff' fill-opacity='.9'/%3E%3C/svg%3E");
  background-size: cover;
  position: relative;
}
.login-art-copy {
  position: absolute;
  left: 9%;
  bottom: 10%;
  max-width: 560px;
  color: white;
}
.login-art-copy strong { display: block; font-size: 42px; line-height: 1.08; margin-bottom: 14px; }
.login-art-copy span { font-size: 18px; line-height: 1.55; opacity: .86; }

.field { display: grid; gap: 7px; min-width: 0; }
.field label { font-size: 13px; font-weight: 650; color: #414844; }
.field small { color: var(--muted); line-height: 1.4; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 105, 78, .12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--green); color: white; }
.btn-primary:hover { background: #175b42; }
.btn-secondary { border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-danger { color: var(--red); border-color: #e5c6c2; }
.btn-danger:hover { background: #fff2f0; }
.btn-icon { width: 36px; padding: 0; border-color: var(--line); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-wide { width: 100%; }

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  background: #183d30;
  color: white;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 3px 7px 20px;
}
.sidebar-brand .brand-mark { margin: 0; background: var(--yellow); color: #20352c; }
.sidebar-brand strong { display: block; font-size: 14px; }
.sidebar-brand span { display: block; color: rgba(255,255,255,.58); font-size: 11px; margin-top: 3px; }
.sidebar nav { min-height: 0; overflow-y: auto; }

.nav-label {
  padding: 15px 10px 6px;
  font-size: 10px;
  text-transform: uppercase;
  color: rgba(255,255,255,.42);
  font-weight: 750;
}
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.72);
  padding: 9px 10px;
  border-radius: 6px;
  text-align: left;
}
.nav-item svg { width: 18px; height: 18px; }
.nav-item:hover { color: white; background: rgba(255,255,255,.07); }
.nav-item.active { color: white; background: rgba(255,255,255,.13); }
.nav-disclosure { margin-top: 9px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 8px; }
.nav-disclosure summary {
  display: grid;
  grid-template-columns: 18px 1fr 16px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  color: rgba(255,255,255,.68);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  list-style: none;
}
.nav-disclosure summary::-webkit-details-marker { display: none; }
.nav-disclosure summary svg { width: 17px; height: 17px; }
.nav-disclosure summary svg:last-child { transition: transform .18s; }
.nav-disclosure[open] summary svg:last-child { transform: rotate(180deg); }
.nav-disclosure .nav-label { padding-top: 8px; }

.license-badge {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.license-limits {
  display: grid;
  gap: 0;
}

.license-limit {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 52px;
}

.license-limit:last-child { border-bottom: 0; }
.license-limit span { color: var(--muted); }
.license-limit strong { font-size: 15px; }
.license-detail { color: var(--muted); line-height: 1.55; margin: 0 0 18px; }
.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 14px;
}
.user-line { padding: 8px 10px; }
.user-line strong { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.user-line span { font-size: 11px; color: rgba(255,255,255,.5); }

.main { min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  background: rgba(255,255,255,.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.venue-switcher { display: flex; align-items: center; gap: 10px; }
.venue-switcher select { min-width: 230px; padding: 8px 34px 8px 10px; font-weight: 650; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.mobile-nav { display: none; }

.content { padding: 26px 30px 80px; max-width: 1440px; margin: 0 auto; }
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.page-head h1 { margin: 0; font-size: 25px; line-height: 1.2; }
.page-head p { margin: 7px 0 0; color: var(--muted); line-height: 1.45; }
.page-actions { display: flex; gap: 8px; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
}
.metric { background: var(--surface); padding: 19px; min-width: 0; }
.metric span { display: block; color: var(--muted); font-size: 12px; }
.metric strong { display: block; font-size: 27px; margin: 7px 0 4px; }
.metric small { color: var(--muted); }

.work-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}
.work-action {
  display: grid;
  grid-template-columns: 28px 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 116px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong);
  border-radius: var(--radius);
}
.work-action.tone-critical { border-left-color: var(--red); }
.work-action.tone-attention { border-left-color: #b78600; }
.work-action.tone-growth { border-left-color: var(--green); }
.work-rank { color: var(--muted); font-size: 12px; font-weight: 800; }
.work-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 6px;
}
.tone-critical .work-icon { color: var(--red); background: var(--red-soft); }
.tone-attention .work-icon { color: #8b6500; background: #fff5d4; }
.work-icon svg { width: 18px; height: 18px; }
.work-copy h2 { margin: 0 0 5px; font-size: 16px; }
.work-copy p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.work-evidence { display: flex; gap: 8px 16px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; }
.work-evidence span { color: var(--muted); }
.work-freshness {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.work-freshness strong, .work-freshness span { display: block; }
.work-freshness strong { font-size: 13px; }
.work-freshness span { color: var(--muted); font-size: 12px; margin-top: 4px; }

.report-insights { padding: 4px 18px; }
.report-insight {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.5;
}
.report-insight:last-child { border-bottom: 0; }
.report-insight svg { width: 17px; height: 17px; color: var(--green); margin-top: 2px; }
.report-links { display: grid; }
.report-link {
  display: grid;
  grid-template-columns: 28px 1fr 18px;
  align-items: center;
  gap: 11px;
  min-height: 66px;
  padding: 12px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}
.report-link:last-child { border-bottom: 0; }
.report-link:hover { background: var(--surface-2); }
.report-link > svg { width: 18px; height: 18px; color: var(--green); }
.report-link span strong, .report-link span small { display: block; }
.report-link span small { color: var(--muted); margin-top: 4px; }

.campaign-builder { display: grid; gap: 18px; }
.builder-error {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid #efb5ad;
  border-radius: var(--radius);
  background: #fff5f3;
  color: #742d25;
}
.builder-error svg { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 1px; }
.builder-error p { margin: 4px 0 0; color: #8a443b; }
.inbox-panel-head { align-items: flex-start; flex-wrap: wrap; gap: 10px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.filter-chip:hover { border-color: var(--ink); color: var(--ink); }
.filter-chip.active { border-color: var(--ink); background: var(--ink); color: #fff; }
.setup-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.setup-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.setup-summary div { display: grid; gap: 3px; }
.setup-summary span { color: var(--muted); font-size: 13px; }
.setup-summary b { font-size: 24px; }
.setup-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.setup-step {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.setup-step svg { width: 18px; height: 18px; color: var(--muted); }
.setup-step span { display: grid; gap: 3px; }
.setup-step small { color: var(--muted); }
.setup-step em { grid-column: 2; color: var(--accent); font-size: 12px; font-style: normal; }
.setup-step.done { background: #f4f8f3; }
.setup-step.done svg { color: #2f6d3c; }
.campaign-builder .form-section { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.campaign-builder .form-section-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.step-number {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-size: 12px;
  font-weight: 800;
}
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 18px 18px; }
.choice-card {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}
.choice-card:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.choice-card strong, .choice-card small { display: block; }
.choice-card small { color: var(--muted); margin-top: 5px; line-height: 1.4; }
.audience-grid { display: grid; padding: 0 18px 18px; }
.audience-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 62px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.audience-option:last-child { border-bottom: 0; }
.audience-option strong, .audience-option small { display: block; }
.audience-option small { color: var(--muted); margin-top: 3px; }
.audience-option b { min-width: 34px; text-align: right; font-size: 18px; }
.audience-option.disabled { opacity: .48; cursor: not-allowed; }
.check-row { min-height: 40px; display: flex; align-items: center; gap: 18px; }
.check-row label { display: flex; align-items: center; gap: 7px; }
.builder-actions { display: flex; justify-content: space-between; gap: 10px; }
.progress-panel, .completion-panel {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 36px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
}
.progress-panel > svg { width: 34px; height: 34px; color: var(--green); }
.progress-panel h2, .completion-panel h2 { margin: 0 0 7px; font-size: 18px; }
.progress-panel p, .completion-panel p { margin: 0; color: var(--muted); line-height: 1.5; max-width: 620px; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.completion-panel { flex-direction: column; text-align: center; }
.completion-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
}
.completion-icon svg { width: 22px; height: 22px; }
.campaign-preview-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.guest-preview {
  max-width: 680px;
  justify-self: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.guest-preview img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--surface-2); }
.guest-message { padding: 18px; }
.guest-message strong { display: block; margin-bottom: 9px; }
.guest-message p { margin: 0; line-height: 1.55; }
.launch-summary {
  position: sticky;
  top: 88px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.launch-summary h2 { margin: 0 0 12px; font-size: 16px; }
.launch-summary dl { margin: 0 0 16px; }
.launch-summary dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.launch-summary dt { color: var(--muted); }
.launch-summary dd { margin: 0; text-align: right; font-weight: 700; }
.summary-note { color: var(--muted); font-size: 12px; line-height: 1.5; }
.launch-summary .btn + .btn { margin-top: 8px; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .8fr); gap: 20px; }
.grid-2 > * { min-width: 0; }
.panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 { margin: 0; font-size: 15px; }
.panel-body { padding: 18px; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-ok { color: var(--green); background: var(--green-soft); }
.status-draft { color: #8b6500; background: #fff5d4; }
.status-off { color: var(--muted); background: #eef0ee; }
.status-error { color: var(--red); background: var(--red-soft); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfcfb; }
.table-main strong { display: block; }
.table-main span { color: var(--muted); font-size: 12px; }

.module-list { display: grid; }
.module-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.module-row:last-child { border-bottom: 0; }
.module-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green);
}
.module-icon svg { width: 17px; height: 17px; }
.module-row strong { font-size: 13px; display: block; }
.module-row small { color: var(--muted); }

.editor-layout { display: grid; grid-template-columns: 210px minmax(0, 820px); gap: 24px; align-items: start; }
.section-nav {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 4px;
}
.section-nav button {
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  padding: 9px 12px;
  text-align: left;
  color: var(--muted);
}
.section-nav button.active { color: var(--green); border-left-color: var(--green); font-weight: 700; }
.editor { min-width: 0; }
.form-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.form-section-head { padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.form-section-head h2 { margin: 0; font-size: 16px; }
.form-section-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 20px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.check-row { display: flex; gap: 14px; flex-wrap: wrap; }
.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  padding: 9px 11px;
  border-radius: 6px;
}
.check input { width: auto; accent-color: var(--green); }
.save-bar {
  position: sticky;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  margin-top: 18px;
  background: #1e2924;
  color: white;
  border-radius: 7px;
  box-shadow: var(--shadow);
  z-index: 10;
}
.save-bar small { color: rgba(255,255,255,.65); }
.save-bar-actions { display: flex; gap: 8px; }

.connector-groups { display: grid; gap: 22px; }
.edge-panel {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.edge-panel-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green);
}
.edge-panel-icon svg { width: 20px; height: 20px; }
.edge-panel-title { display: flex; align-items: center; gap: 10px; }
.edge-panel-copy p { margin: 5px 0; color: var(--muted); font-size: 13px; }
.edge-panel-copy small { color: var(--muted); }
.install-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}
.install-command code { overflow-wrap: anywhere; font-size: 12px; line-height: 1.5; }
.modal-lead { margin-top: 0; line-height: 1.5; }
.connector-group h2 { font-size: 14px; margin: 0 0 10px; }
.connector-list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: white; }
.connector {
  border-bottom: 1px solid var(--line);
}
.connector:last-child { border-bottom: 0; }
.connector-summary {
  width: 100%;
  display: grid;
  grid-template-columns: 38px 1fr auto 22px;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 0;
  background: white;
  text-align: left;
}
.connector-summary:hover { background: var(--surface-2); }
.connector-logo {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--green);
}
.connector-logo svg { width: 18px; height: 18px; }
.connector-copy strong { display: block; font-size: 13px; }
.connector-copy span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.connector-body { padding: 18px 20px 20px 66px; background: var(--surface-2); border-top: 1px solid var(--line); }
.connector-actions { display: flex; justify-content: flex-end; margin-top: 16px; }

.toggle { position: relative; width: 38px; height: 22px; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle span { position: absolute; inset: 0; border-radius: 999px; background: #c9ceca; transition: .2s; }
.toggle span::after { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 50%; background: white; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.toggle input:checked + span { background: var(--green); }
.toggle input:checked + span::after { transform: translateX(16px); }

.audit-list { border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.audit-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 180px;
  gap: 13px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}
.audit-row:last-child { border-bottom: 0; }
.audit-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--green); }
.audit-icon svg { width: 16px; height: 16px; }
.audit-copy strong { display: block; font-size: 13px; }
.audit-copy span, .audit-time { color: var(--muted); font-size: 12px; }
.audit-time { text-align: right; }

.operation-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.operation-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 72px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.operation-row:last-child { border-bottom: 0; }
.operation-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--green);
}
.operation-icon svg { width: 17px; height: 17px; }
.operation-title { display: flex; align-items: center; gap: 9px; }
.operation-copy strong { font-size: 13px; }
.operation-copy > span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.operation-meta { display: grid; justify-items: end; gap: 8px; }
.operation-meta time { color: var(--muted); font-size: 11px; }

.empty { padding: 42px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 34px; height: 34px; margin-bottom: 8px; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 24, 21, .48);
}
.modal {
  width: min(620px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 22px 70px rgba(0,0,0,.2);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-body { padding: 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }

#toast-root { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 8px; }
.toast { min-width: 280px; max-width: 420px; padding: 12px 14px; border-radius: 7px; background: #1e2924; color: white; box-shadow: var(--shadow); }
.toast.error { background: #7f302b; }
.error-text { color: var(--red); font-size: 13px; line-height: 1.4; }
.muted { color: var(--muted); }
.mono { font-family: Consolas, monospace; font-size: 12px; }

@media (max-width: 1050px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .editor-layout { grid-template-columns: 1fr; }
  .section-nav { position: static; display: flex; overflow-x: auto; border-bottom: 1px solid var(--line); }
  .section-nav button { border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; }
  .section-nav button.active { border-bottom-color: var(--green); }
}

@media (max-width: 760px) {
  .login-page { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 238px; z-index: 60; transform: translateX(-100%); transition: .2s; }
  .shell.nav-open .sidebar { transform: translateX(0); }
  .mobile-nav { display: inline-flex; }
  .topbar { padding: 0 14px; }
  .venue-switcher { gap: 6px; min-width: 0; }
  .venue-switcher > svg { display: none; }
  .venue-switcher select { min-width: 0; max-width: 110px; }
  .topbar-actions { gap: 5px; }
  .topbar-actions > .status:not(.license-badge) { display: none; }
  .content { padding: 20px 14px 72px; }
  .page-head { align-items: stretch; flex-direction: column; }
  .page-actions { width: 100%; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric { padding: 15px; }
  .metric strong { font-size: 18px; overflow-wrap: anywhere; }
  .metric small { display: block; line-height: 1.35; }
  .form-grid { grid-template-columns: 1fr; padding: 16px; }
  .form-grid .span-2 { grid-column: auto; }
  .connector-body { padding: 16px; }
  .edge-panel { grid-template-columns: 40px 1fr; }
  .edge-panel > .btn { grid-column: 1 / -1; width: 100%; }
  .connector-summary { grid-template-columns: 36px 1fr 20px; }
  .connector-summary .status { display: none; }
  .audit-row { grid-template-columns: 34px 1fr; }
  .audit-time { grid-column: 2; text-align: left; }
  .operation-row { grid-template-columns: 34px 1fr; }
  .operation-meta { grid-column: 2; justify-items: start; }
  .save-bar { align-items: stretch; flex-direction: column; }
  .save-bar-actions .btn { flex: 1; }
  .license-limit { align-items: flex-start; gap: 12px; padding: 10px 0; }
  .license-limit strong { max-width: 55%; text-align: right; overflow-wrap: anywhere; }
  .work-action { grid-template-columns: 28px 36px minmax(0, 1fr); }
  .work-action > .btn { grid-column: 2 / -1; width: 100%; }
  .work-freshness { align-items: stretch; flex-direction: column; }
  .work-freshness .btn { width: 100%; }
  .choice-grid { grid-template-columns: 1fr; }
  .campaign-preview-layout { grid-template-columns: 1fr; }
  .setup-steps { grid-template-columns: 1fr; }
  .launch-summary { position: static; }
  .builder-actions { flex-direction: column-reverse; }
  .builder-actions .btn { width: 100%; }
  .progress-panel { align-items: flex-start; padding: 24px 18px; }
}
.feedback-link-panel { margin-bottom: 18px; }
.feedback-public-warning {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 18px 16px;
  padding: 11px 12px;
  border-left: 4px solid #df8b22;
  background: #fff7e6;
  color: #69501f;
}
.feedback-public-warning svg { width: 18px; flex: 0 0 18px; }
.feedback-share-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 0 18px 18px;
}
.feedback-qr {
  width: 180px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background: white;
}
.feedback-share-actions { min-width: 0; }
.feedback-share-actions .feedback-link-row { padding-left: 0; padding-right: 0; }
.feedback-download { width: fit-content; }
.feedback-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 0 18px 16px;
}
.feedback-link-row.secondary { grid-template-columns: minmax(0, 1fr) auto; padding-top: 0; }
.feedback-link-row code {
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9f8;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feedback-score {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 6px;
  font-weight: 800;
}
.feedback-score.score-good { color: #087751; background: #e4f5ee; }
.feedback-score.score-neutral { color: #8b6200; background: #fff3cb; }
.feedback-score.score-bad { color: #b22d2d; background: #fde8e5; }
.feedback-actions .report-insight { margin: 0; }
.subscription-notice {
  display: grid;
  gap: 4px;
  margin: 16px 0;
  padding: 14px;
  border-left: 4px solid #df8b22;
  background: #fff7e6;
}
.subscription-notice span { color: var(--muted); }
.table-note { display: block; max-width: 180px; margin-top: 5px; color: var(--muted); line-height: 1.3; }
.activation-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 18px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid #b9dccc;
  background: #f0faf5;
}
.activation-panel > div:nth-child(2) { display: grid; gap: 3px; }
.activation-panel small { color: var(--muted); }
.activation-progress {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  background: #dcebe4;
}
.activation-progress span { display: block; height: 100%; background: var(--green); }
.health-score {
  display: inline-grid;
  width: 42px;
  height: 36px;
  place-items: center;
  border-radius: 6px;
  font-weight: 800;
}
.health-healthy { color: #087751; background: #e4f5ee; }
.health-attention { color: #8b6200; background: #fff3cb; }
.health-risk { color: #b22d2d; background: #fde8e5; }

@media (max-width: 720px) {
  .feedback-link-row,
  .feedback-link-row.secondary { grid-template-columns: 1fr; }
  .feedback-share-layout { grid-template-columns: 1fr; }
  .feedback-qr { width: min(180px, 100%); }
  .activation-panel { grid-template-columns: 1fr; }
  .activation-panel .btn { width: 100%; }
}
