/* OwlAgenda panel. White, quiet, one accent colour. */
:root {
  --bg: #f5f5f7; --surface: #ffffff; --surface-2: #fafafa; --ink: #1d1d1f; --ink-2: #6e6e73; --ink-3: #8e8e93;
  --line: #e5e5ea; --line-2: #f0f0f3; --accent: #ff6a33; --accent-ink: #c2410c; --accent-soft: #fff1ea;
  --ok: #1f9d55; --ok-soft: #e8f7ee; --warn: #b26b00; --warn-soft: #fff6e0; --bad: #d92d20; --bad-soft: #fdecea; --info-soft: #f2f2f7;
  --r: 14px; --r-sm: 10px; --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  --side: 248px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --surface: #1c1c1e; --surface-2: #232325; --ink: #f5f5f7; --ink-2: #a1a1a6; --ink-3: #8e8e93;
    --line: #2c2c2e; --line-2: #262628; --accent: #ff7a45; --accent-ink: #ff9a6b; --accent-soft: #2e1a12;
    --ok: #34c77b; --ok-soft: #11291c; --warn: #ffb340; --warn-soft: #2e2410; --bad: #ff6b5e; --bad-soft: #301513; --info-soft: #2c2c2e;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --surface: #1c1c1e; --surface-2: #232325; --ink: #f5f5f7; --ink-2: #a1a1a6; --ink-3: #8e8e93;
  --line: #2c2c2e; --line-2: #262628; --accent: #ff7a45; --accent-ink: #ff9a6b; --accent-soft: #2e1a12;
  --ok: #34c77b; --ok-soft: #11291c; --warn: #ffb340; --warn-soft: #2e2410; --bad: #ff6b5e; --bad-soft: #301513; --info-soft: #2c2c2e;
  --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 Inter, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.boot { min-height: 100vh; display: grid; place-items: center; opacity: .4; }

/* ---------- layout */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 20px 14px; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand b { display: block; font-size: 15px; letter-spacing: -0.01em; }
.brand small { color: var(--ink-2); font-size: 12px; }
.switch { margin: 0 6px 10px; }
.switch select { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink-2); font-weight: 500; }
.nav a svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav a:hover { background: var(--line-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }
.nav .count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; text-align: center; }
.nav-h { margin: 16px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.side-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.side-foot .who { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.side-foot .row { display: flex; gap: 6px; }
.main { min-width: 0; padding: 32px clamp(16px, 3.5vw, 44px) 64px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head h1 { font-size: 30px; font-weight: 700; }
.page-head p { margin: 6px 0 0; color: var(--ink-2); max-width: 62ch; }
.topbar { display: none; }
.scrim { display: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(86vw, 300px); z-index: 40; transform: translateX(-102%); transition: transform .2s ease; }
  .shell.menu-open .side { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  .shell.menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 30; }
  .topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20; padding: 10px 16px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--line); }
  .topbar img { width: 28px; height: 28px; border-radius: 8px; }
  .main { padding: 20px 16px 48px; }
  .page-head h1 { font-size: 26px; }
}

/* ---------- pieces */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--line-2); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.btn-primary:hover { background: var(--ink); opacity: .88; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent); opacity: .9; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-sm { min-height: 30px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 0; border-radius: 10px; background: transparent; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { background: var(--line-2); }
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card h2 { font-size: 16px; font-weight: 600; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .kpis { grid-template-columns: 1fr; } }
.kpi { padding: 18px 20px; }
.kpi .label { color: var(--ink-2); font-size: 13px; font-weight: 500; }
.kpi .value { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; margin-top: 6px; }
.kpi .foot { margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.up { color: var(--ok); } .down { color: var(--bad); }
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; padding: 26px 28px; margin-bottom: 16px; }
.hero .big { font-size: clamp(44px, 6vw, 64px); font-weight: 700; letter-spacing: -0.045em; line-height: 1; }
.hero .big em { font-style: normal; color: var(--accent); }
.hero .lead { margin: 10px 0 0; color: var(--ink-2); }
.hero .label { font-size: 13px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }
.meter { height: 10px; border-radius: 6px; background: var(--line-2); overflow: hidden; margin-top: 12px; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } }

.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--line-2); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; cursor: pointer; color: var(--ink-2); font-weight: 500; font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--info-soft); color: var(--ink-2); white-space: nowrap; }
.tag.ok { background: var(--ok-soft); color: var(--ok); } .tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--bad-soft); color: var(--bad); } .tag.accent { background: var(--accent-soft); color: var(--accent-ink); }
.ch-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.ch-instagram { background: #d6249f; } .ch-whatsapp { background: #25d366; } .ch-sms { background: #8e8e93; } .ch-web { background: #0a84ff; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.input, textarea.input, select.input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); outline: none; }
.input:focus { border-color: var(--ink-3); box-shadow: 0 0 0 3px var(--line-2); }
textarea.input { min-height: 110px; resize: vertical; line-height: 1.5; }
.note { padding: 12px 14px; border-radius: var(--r-sm); background: var(--info-soft); color: var(--ink-2); font-size: 13px; }
.note.warn { background: var(--warn-soft); color: var(--warn); }
.note.ok { background: var(--ok-soft); color: var(--ok); }
.note.bad { background: var(--bad-soft); color: var(--bad); }
.banner { margin: -8px 0 20px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 500; }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-2); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--surface); font-size: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.2); }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.person b { display: block; font-weight: 600; }
.person small { color: var(--ink-2); }

/* charts */
.chart { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: 10px; }
.chart .bar { flex: 1; min-width: 3px; border-radius: 5px 5px 2px 2px; background: var(--ink); opacity: .85; position: relative; }
.chart .bar.off { background: var(--accent); opacity: 1; }
.chart .bar.zero { background: var(--line); opacity: 1; }
.chart .bar:hover { opacity: 1; }
.axis { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--ink-3); }
.two { grid-template-columns: 1.4fr 1fr; }
@media (max-width: 1000px) { .two { grid-template-columns: 1fr; } }
.split-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.split-row .name { width: 90px; font-size: 14px; }
.split-row .track { flex: 1; height: 8px; border-radius: 5px; background: var(--line-2); overflow: hidden; }
.split-row .track i { display: block; height: 100%; background: var(--ink); }
.split-row .n { width: 40px; text-align: right; font-size: 14px; }

/* conversations */
.conv { display: grid; grid-template-columns: 360px 1fr; min-height: 70vh; overflow: hidden; }
.conv-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.conv-tools { padding: 14px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.conv-items { overflow-y: auto; max-height: 72vh; }
.conv-item { display: block; width: 100%; text-align: left; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line-2); background: transparent; cursor: pointer; }
.conv-item:hover { background: var(--surface-2); }
.conv-item[aria-current="true"] { background: var(--accent-soft); }
.conv-item .top { display: flex; justify-content: space-between; gap: 8px; }
.conv-item .top b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-item .top time { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.conv-item .last { margin-top: 3px; font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-item .meta { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.thread { display: flex; flex-direction: column; min-width: 0; }
.thread-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.thread-body { padding: 20px; overflow-y: auto; max-height: 72vh; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); flex: 1; }
.msg { max-width: min(72%, 560px); }
.msg .bubble { padding: 10px 14px; border-radius: 18px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.in { align-self: flex-start; } .msg.in .bubble { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.out { align-self: flex-end; text-align: right; } .msg.out .bubble { background: var(--ink); color: var(--surface); border-bottom-right-radius: 6px; text-align: left; }
.msg.staff .bubble { background: var(--accent); color: #fff; }
.msg .info { margin-top: 4px; font-size: 12px; color: var(--ink-3); }
.msg .info .fast { color: var(--ok); font-weight: 600; }
.handoff-note { align-self: center; max-width: 90%; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; }
.back-btn { display: none; }
@media (max-width: 900px) {
  .conv { grid-template-columns: 1fr; }
  .conv.has-open .conv-list { display: none; }
  .conv:not(.has-open) .thread { display: none; }
  .conv-list { border-right: 0; }
  .back-btn { display: inline-flex; }
  .msg { max-width: 88%; }
}

/* handoff cards */
.hand-row { display: grid; grid-template-columns: 1.1fr 1.6fr 1.5fr; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.hand-row:last-child { border-bottom: 0; }
.hand-row .summary { color: var(--ink); white-space: pre-wrap; }
.outcomes { display: flex; flex-wrap: wrap; gap: 6px; }
.outcomes button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 11px; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.outcomes button[aria-pressed="true"][data-o="won"] { background: var(--ok); border-color: var(--ok); color: #fff; }
.outcomes button[aria-pressed="true"][data-o="lost"] { background: var(--bad); border-color: var(--bad); color: #fff; }
.outcomes button[aria-pressed="true"][data-o="no_answer"] { background: var(--ink-2); border-color: var(--ink-2); color: var(--surface); }
.outcomes button[aria-pressed="true"][data-o="pending"] { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.hand-note { display: flex; gap: 6px; margin-top: 8px; }
.hand-note input { flex: 1; min-width: 0; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 13px; }
@media (max-width: 900px) { .hand-row { grid-template-columns: 1fr; gap: 10px; } }

/* knowledge base */
.kb-section { margin-bottom: 16px; }
.kb-section > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.kb-section > header h2 { margin: 0; }
.kb-item { padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.kb-item:last-child { border-bottom: 0; }
.kb-item .k { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.change { padding: 14px 20px; border-bottom: 1px solid var(--line-2); display: grid; gap: 6px; }
.change:last-child { border-bottom: 0; }
.diff { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.diff div { padding: 10px 12px; border-radius: 10px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.diff .old { background: var(--bad-soft); } .diff .new { background: var(--ok-soft); }
@media (max-width: 700px) { .diff { grid-template-columns: 1fr; } }

/* modal */
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.3); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(4px); }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border-radius: 18px; box-shadow: 0 24px 80px rgba(0,0,0,.25); }
.modal header { display: flex; justify-content: space-between; gap: 10px; padding: 20px 22px 6px; }
.modal header h2 { font-size: 18px; }
.modal .body { padding: 10px 22px; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 22px 20px; }
.readonly { padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); white-space: pre-wrap; color: var(--ink-2); font-size: 14px; }
.secret { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px dashed var(--ink-3); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; overflow-wrap: anywhere; }
.secret code { flex: 1; }

/* settings */
.hours { display: grid; gap: 8px; }
.hours .day { display: grid; grid-template-columns: 120px auto 1fr; align-items: center; gap: 12px; }
.hours .times { display: flex; align-items: center; gap: 8px; }
.hours input[type="time"] { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.settings-grid { grid-template-columns: 1.3fr 1fr; align-items: start; }
@media (max-width: 1000px) { .settings-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .hours .day { grid-template-columns: 1fr auto; } .hours .times { grid-column: 1 / -1; } }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.login .card { width: min(400px, 100%); padding: 36px 32px 28px; }
.login img { width: 44px; height: 44px; }
.login h1 { font-size: 26px; font-weight: 700; margin: 18px 0 6px; }
.login p { margin: 0 0 22px; color: var(--ink-2); }
.login .btn { width: 100%; min-height: 44px; margin-top: 6px; }
.login .help { margin-top: 18px; font-size: 13px; color: var(--ink-3); text-align: center; }
.login .langs { display: flex; justify-content: center; gap: 4px; margin-top: 14px; }

/* knowledge base, typed fields */
.kb-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding: 16px 20px; margin-bottom: 16px; }
.kb-progress { flex: 1; min-width: 220px; }
.kb-progress b { font-size: 22px; letter-spacing: -0.02em; }
.kb-progress .meter { margin-top: 8px; height: 8px; }
.kb-section > header small { display: block; margin-top: 2px; font-size: 12px; }
.kb-item { display: block; }
.kb-item.adding { background: var(--surface-2); }
.kb-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.kb-head .hint { margin-top: 2px; font-size: 13px; color: var(--ink-3); }
.kb-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.kb-view { margin-top: 8px; }
.kb-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.kb-empty { color: var(--ink-3); font-style: italic; }
.kb-list { margin: 0; padding-left: 18px; display: grid; gap: 3px; }
.kb-prices { width: auto; min-width: min(420px, 100%); border-collapse: collapse; }
.kb-prices td { padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.kb-prices td.num { padding-left: 24px; text-align: right; font-weight: 600; white-space: nowrap; }
.kb-prices small { display: block; color: var(--ink-2); font-size: 12px; }
.kb-faq { display: grid; gap: 10px; }
.kb-faq b { font-weight: 600; }
.kb-faq p { margin: 2px 0 0; color: var(--ink-2); white-space: pre-wrap; }
.kb-tone p { margin: 8px 0 0; color: var(--ink-2); }
.kb-hours { display: grid; grid-template-columns: max-content max-content; gap: 3px 22px; font-size: 14px; }
.kb-hours span { color: var(--ink-2); }
.kb-pending { margin-top: 12px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.kb-pending .kb-view { margin: 8px 0 10px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kb-history { margin-bottom: 16px; }
.kb-history summary { padding: 16px 20px; cursor: pointer; list-style: none; }
.kb-history summary::-webkit-details-marker { display: none; }
.kb-history summary::after { content: "\203A"; float: right; color: var(--ink-3); transition: transform .15s; }
.kb-history[open] summary::after { transform: rotate(90deg); }
.kb-history[open] summary { border-bottom: 1px solid var(--line); }
.diff .kb-view, .diff .kb-list { margin: 0; }

/* editors */
.ed { margin-top: 12px; padding: 16px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.kb-item.adding .ed { margin-top: 0; }
.ed-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 600px) { .ed-grid2 { grid-template-columns: 1fr; } }
.ed-rows { display: grid; gap: 8px; }
.ed-row { display: flex; gap: 6px; align-items: flex-start; }
.ed-row .input { min-width: 0; }
.ed-row.price { display: grid; grid-template-columns: 1.4fr .8fr 1.2fr auto; }
.ed-cols { display: grid; grid-template-columns: 1.4fr .8fr 1.2fr 38px; gap: 6px; margin-bottom: 6px; }
.ed-row.faq .faq-in { flex: 1; display: grid; gap: 6px; padding: 10px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line-2); }
.ed-row.faq textarea.input { min-height: 60px; }
@media (max-width: 600px) { .ed-row.price { grid-template-columns: 1fr 1fr auto; } .ed-row.price [data-note] { grid-column: 1 / 3; } .ed-cols { display: none; } }
.icon-btn.sm { width: 38px; height: 40px; flex: none; font-size: 14px; }
.add-row { margin-top: 8px; color: var(--accent-ink); }
.ed-preview { margin: 14px 0 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px dashed var(--line); }
.ed-preview pre { margin: 6px 0 0; font: 13px/1.5 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); max-height: 180px; overflow-y: auto; }
.ed-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ed-actions .sp { flex: 1; }
.ed .note.bad { margin-bottom: 12px; }
.danger { color: var(--bad); }
.btn-ghost.danger:hover { background: var(--bad-soft); }
.seg[data-pick] button { font-size: 13px; padding: 6px 12px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; margin-bottom: 12px; }

/* admin: businesses */
.tenant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tenant-card { display: grid; gap: 10px; padding: 18px 20px; text-decoration: none; transition: border-color .15s, transform .15s; }
.tenant-card:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.tc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tc-top b { font-size: 16px; }
.tc-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 13px; color: var(--ink-2); }
.tc-meta b { color: var(--ink); }
.onboard h2 { font-size: 18px; }
.steps-plain { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.back-link { display: inline-block; margin-bottom: 10px; color: var(--ink-2); text-decoration: none; }
.back-link:hover { color: var(--ink); }
.page-head h1 .tag { vertical-align: middle; margin-left: 6px; font-size: 12px; }
.tenant-layout { grid-template-columns: 1.15fr 1fr; align-items: start; }
@media (max-width: 1100px) { .tenant-layout { grid-template-columns: 1fr; } }
.card-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-title h2 { margin: 0; }
.card-title.pad { padding: 20px 20px 0; }
.pad-x { padding: 0 20px; margin: 0 0 8px; }
.checklist { list-style: none; margin: 8px 0 0; padding: 0; display: grid; }
.checklist li { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.checklist li:last-child { border-bottom: 0; padding-bottom: 0; }
.checklist .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; border: 1.5px solid var(--line); color: var(--ink-3); }
.checklist li.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.checklist b { display: block; font-weight: 600; }
.checklist li.done b { color: var(--ink-2); }
.checklist small { color: var(--ink-2); overflow-wrap: anywhere; }
@media (max-width: 520px) { .checklist li { grid-template-columns: 28px 1fr; } .checklist li .btn { grid-column: 2; justify-self: start; } }
.user-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--line-2); }
.user-row .person { min-width: 0; overflow-wrap: anywhere; }
.user-add { padding: 16px 20px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r) var(--r); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 14px; align-items: center; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv code, .copy-row code { font: 13px ui-monospace, Menlo, Consolas, monospace; }
.steps { margin: 16px 0 0; padding-left: 20px; display: grid; gap: 14px; }
.steps li::marker { font-weight: 700; color: var(--ink-3); }
.steps b { display: block; font-weight: 600; margin-bottom: 4px; }
.steps small { display: block; color: var(--ink-2); }
.copy-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 6px 6px 6px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); }
.copy-row code { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.copy-row .muted { width: 42px; flex: none; }
.secret-inline { padding: 2px 8px; border-radius: 6px; background: var(--warn-soft); color: var(--ink); font-weight: 600; }
.modal textarea[readonly] { font-size: 13px; background: var(--surface-2); }
.pw-meter { height: 6px; border-radius: 4px; background: var(--line-2); overflow: hidden; margin: -4px 0 6px; }
.pw-meter i { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }
.login .btn-ghost { margin-top: 4px; }
[hidden] { display: none !important; }
