@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
  --sidebar-bg: #111a14;
  --sidebar-text: rgba(255,255,255,.52);
  --sidebar-active: #ffffff;
  --workspace-bg: #f9f9f7;
  --panel-bg: #ffffff;
  --border: #e5e5e0;
  --ink: #1a2018;
  --muted: #6b7a6a;
  --accent: #1a6b4a;
  --accent-light: #e8f5ef;
  --danger: #b83232;
  --gold: #c9a84c;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--workspace-bg); color: var(--ink); font-family: var(--font); font-size: 16px; font-weight: 400; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
h1 { margin: 0 0 4px; font-size: 28px; line-height: 1.25; font-weight: 600; }
h2 { margin: 0 0 14px; font-size: 22px; font-weight: 600; }
h3 { margin: 0 0 8px; font-size: 18px; font-weight: 600; }
p { margin-top: 0; }
.muted { color: var(--muted); font-size: 15px; }
.public-shell, .app-shell { min-height: 100vh; }
.public-hero {
  min-height: 88vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 430px);
  gap: 42px;
  align-items: center;
  padding: 48px clamp(18px, 5vw, 76px);
  background: var(--workspace-bg);
}
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 28px; }
.mark { width: 40px; height: 40px; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 600; font-size: 15px; letter-spacing: .04em; border-radius: 4px; }
.hero-copy { max-width: 680px; font-size: 16px; line-height: 1.7; color: var(--muted); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.panel, .card, .metric, .auth-panel, .plan-card, .simple-card {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  padding: 20px 22px;
  border-radius: 0;
}
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 5px; }
label { font-size: 15px; font-weight: 500; color: #3d4d3c; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  transition: border-color .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
textarea { min-height: 88px; resize: vertical; }
textarea.tall { min-height: 144px; }
.field-hint { font-size: 15px; color: var(--muted); margin-top: 3px; font-style: italic; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.btn:hover { background: #14573c; }
.btn.secondary { background: #fff; color: var(--ink); border-color: var(--border); }
.btn.secondary:hover { background: #f4f4f1; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.plans { padding: 32px clamp(18px, 5vw, 76px) 64px; }
.pill { display: inline-flex; width: fit-content; padding: 3px 9px; background: var(--accent-light); color: var(--accent); font-size: 11px; font-weight: 600; border-radius: 20px; letter-spacing: .03em; }
.badge {
  display: inline-flex;
  width: fit-content;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 20px;
  background: #e8e8e4;
  color: #5a5a52;
  letter-spacing: .02em;
}
.badge.published { background: #dcf3e9; color: #1a6b4a; }
.badge.draft { background: #ebebeb; color: #6b6b6b; }
.badge.delivered { background: #dcf3e9; color: #17643d; }
.badge.failed { background: #fde8e8; color: #a12424; }
.badge.queued, .badge.skipped { background: #fff4d6; color: #7c5600; }
/* Page title dot */
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; vertical-align: middle; }
.status-dot.published { background: #22c47a; }
.status-dot.draft { background: #b0b0b0; }
.notice { padding: 12px 14px; border: 1px solid #b8ddc7; background: #edf8f1; color: #184c34; margin-bottom: 16px; font-size: 15px; }
.notice.success { border-color: #b8ddc7; background: #edf8f1; color: #184c34; }
.notice.warn { border-color: #ead196; background: #fff8e5; color: #7b5900; }
.notice.info { border-color: #bbd3f5; background: #eef4ff; color: #1d4b90; }
/* App shell */
.app-shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { padding: 20px 0; background: var(--sidebar-bg); color: #fff; display: flex; flex-direction: column; gap: 0; min-height: 100vh; }
.sidebar .brand { padding: 0 16px 16px; margin-bottom: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .brand strong { font-size: 16px; font-weight: 600; }
.sidebar p { color: var(--sidebar-text); margin: 2px 0 0; font-size: 11px; }
.nav { display: grid; gap: 0; padding: 14px 0 0; flex: 1; }
.nav a { padding: 9px 16px; color: var(--sidebar-text); border-left: 3px solid transparent; font-size: 15px; font-weight: 400; transition: color .12s, background .12s; }
.nav a.active, .nav a:hover { color: var(--sidebar-active); background: rgba(255,255,255,.06); border-left-color: var(--accent); }
.nav a.active { font-weight: 500; }
.sidebar > .btn { margin: auto 16px 16px; }
.mobile-section-label { display: none; padding: 10px 16px; color: #fff; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.08); }
.workspace { padding: 28px 32px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 24px; }
.topbar h1 { margin-bottom: 2px; }
.metric { padding: 20px 24px; }
.metric p { margin: 0 0 6px; font-size: 15px; color: var(--muted); font-weight: 500; }
.metric-value { font-size: 30px; line-height: 1; font-weight: 600; color: var(--ink); }
.metric-value small { font-size: 15px; margin-left: 4px; color: var(--muted); font-weight: 400; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; font-size: 15px; }
.table th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 500; background: #fafaf8; }
.table tbody tr:hover td { background: #f9f9f6; }
.table td small { color: var(--muted); display: block; font-size: 15px; margin-top: 2px; }
/* Builder */
.builder-form { max-width: 940px; }
.builder-section { display: grid; gap: 16px; margin-bottom: 4px; }
.builder-section.collapsed > *:not(.builder-section-header) { display: none !important; }
.builder-section-header { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.builder-section-header small { color: var(--muted); font-size: 15px; font-weight: 400; }
.builder-section summary { cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center; font-size: 16px; font-weight: 600; }
.builder-section summary small { color: var(--muted); font-size: 15px; font-weight: 400; }
.builder-section[open] summary { padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.builder-progress { max-width: 940px; background: #fff; border: 1px solid var(--border); padding: 14px 18px; margin-bottom: 16px; }
.builder-progress ul { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 0; margin: 8px 0 0; list-style: none; color: var(--muted); font-size: 13px; }
.progress-bar { height: 8px; background: #ecece7; margin: 10px 0 4px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: var(--accent); }
.preview-context { border-left: 3px solid var(--accent-light); padding-left: 12px; }
.section-save { width: fit-content; }
.simple-card { display: grid; gap: 12px; background: #fafaf8; position: relative; padding: 16px 18px; }
.simple-card .card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.simple-card .card-header h3 { margin: 0; }
.remove-item { font-size: 15px; color: var(--muted); cursor: pointer; background: none; border: none; padding: 2px 6px; font-family: var(--font); }
.remove-item:hover { color: var(--danger); }
.add-item-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 500; color: var(--accent); cursor: pointer; background: none; border: 1px dashed #a0cbb7; padding: 8px 14px; font-family: var(--font); width: 100%; justify-content: center; margin-top: 4px; }
.add-item-btn:hover { background: var(--accent-light); border-style: solid; }
/* Builder sticky top bar */
.builder-topbar { position: sticky; top: 0; z-index: 20; background: rgba(249,249,247,.97); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); padding: 12px 32px; margin: -28px -32px 28px; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.builder-topbar .page-title-wrap { display: flex; align-items: center; gap: 8px; }
.builder-topbar h1 { margin: 0; font-size: 18px; }
.builder-section-header { font-size: 15px; font-weight: 600; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); color: var(--ink); }
/* Onboarding checklist */
.onboarding-strip { border: 1px solid #b8ddc7; background: #f0faf5; padding: 16px 20px; margin-bottom: 24px; }
.onboarding-strip h3 { margin: 0 0 10px; font-size: 16px; font-weight: 600; }
.onboarding-steps { display: flex; gap: 20px; flex-wrap: wrap; }
.onboarding-step { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.onboarding-step .step-num { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; align-items: center; justify-content: center; flex-shrink: 0; }
.onboarding-dismiss { font-size: 15px; color: var(--muted); background: none; border: none; font-family: var(--font); cursor: pointer; margin-left: auto; display: block; margin-top: 10px; }
.onboarding-dismiss:hover { color: var(--ink); }
/* Misc */
.sticky-actions { position: sticky; top: 0; z-index: 5; background: rgba(249,249,247,.96); padding: 10px 0; backdrop-filter: blur(8px); }
.end-actions { margin-bottom: 28px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs a { padding: 7px 12px; background: #eee9df; color: var(--muted); font-weight: 500; font-size: 15px; }
.tabs a.active { color: var(--ink); background: #fff; border: 1px solid var(--border); }
.check { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 400; }
.check input { width: auto; }
.thumb { width: 100%; max-width: 160px; aspect-ratio: 16/10; object-fit: cover; border: 1px solid var(--border); }
.image-field input[type=file] { padding: 8px; background: #faf7ef; font-size: 15px; }
.image-field { border: 1px dashed #b9c9bd; padding: 12px; background: #fff; }
.image-field::before { content: 'Image slot: upload a property photo or paste a URL below'; color: var(--muted); font-size: 15px; }
.text-link { color: var(--accent); font-weight: 500; }
.clickable { cursor: pointer; }
.inline-form { display: inline; }
.inline-form .btn { vertical-align: middle; }
.pager { margin-top: 12px; }
.publish-success { display: grid; gap: 16px; max-width: 760px; }
.copy-url { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
dialog { border: 1px solid var(--border); max-width: 760px; width: min(92vw, 760px); border-radius: 0; box-shadow: 0 4px 24px rgba(0,0,0,.1); }
dialog pre { white-space: pre-wrap; max-height: 60vh; overflow: auto; font-size: 15px; }
.lead-card p { margin: 0 0 8px; }
.map { width: 100%; min-height: 300px; border: 0; background: #eee9df; }
/* Trial banner */
.trial-banner { background: #fff8e5; border: 1px solid #e8c94c; color: #7b5900; padding: 10px 16px; font-size: 15px; font-weight: 500; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.trial-banner::before { content: '⏱'; }
/* Plan card */
.plan-card { display: grid; gap: 10px; }
/* Subscription */
.feature-compare { margin-top: 4px; font-size: 15px; color: var(--muted); }
.admin-settings .panel { margin-bottom: 0; }
/* Builder section panels spacing */
.builder-form .panel { margin-bottom: 0; }
.builder-form { display: grid; gap: 20px; }
@media (max-width: 980px) {
  .public-hero, .app-shell, .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; }
  .sidebar { min-height: auto; }
  .mobile-section-label { display: block; }
  .nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .builder-topbar { margin: -28px -18px 24px; padding: 12px 18px; }
}
@media (max-width: 640px) {
  .workspace { padding: 20px 18px; }
  .topbar, .actions { flex-direction: column; align-items: stretch; }
  .copy-url { grid-template-columns: 1fr; }
  h1 { font-size: 20px; }
}
