:root {
  /* GrowthBase360: Growth Indigo #4338E0 · Base Navy #0F1240 · Signal Lavender #8B85FF · Growth Mint #2EE6A8 · Indigo Mist #F4F3FF */
  --bg: #f4f3ff;
  --surface: #ffffff;
  --surface-2: #faf9ff;
  --text: #0f1240;
  --muted: #5d6088;
  --border: #e3e2f4;
  --accent: #4338e0;
  --accent-ink: #ffffff;
  --accent-weak: #ebe9ff;
  --brand-indigo: #4338e0;
  --brand-navy: #0f1240;
  --brand-lavender: #8b85ff;
  --brand-mint: #2ee6a8;
  --brand: #4338e0;
  --brand-soft: #ebe9ff;
  --font-text: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Inter Display', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --good: #11795a;
  --good-weak: #e2f5ee;
  --bad: #c0332b;
  --bad-weak: #fdeceb;
  --warn: #a55a06;
  --warn-weak: #fdf1dc;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .18);
  --s-lead: #8b95a7;
  --s-qualified: #3b82f6;
  --s-proposal: #8b5cf6;
  --s-negotiation: #f59e0b;
  --s-won: #11795a;
  --s-lost: #c0332b;
  --s-5: #14a89a;
  --s-6: #d9468f;
  --s-7: #5667e8;
  --s-8: #7fa21a;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0a0b;
    --surface: #131314;
    --surface-2: #1a1a1c;
    --text: #f4f4f5;
    --muted: #9a9aa2;
    --border: #262628;
    --accent: #ececee;
    --accent-ink: #0a0a0b;
    --accent-weak: #242427;
    --brand: #a29dff;
    --brand-soft: rgba(139, 133, 255, .16);
    --good: #2ee6a8;
    --good-weak: #14312a;
    --bad: #f27a72;
    --bad-weak: #3a1b19;
    --warn: #f0b252;
    --warn-weak: #382a10;
    --shadow: none;
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .6);
    --s-lead: #7d889b;
    --s-won: #2ee6a8;
    --s-lost: #f27a72;
  }
}
:root[data-theme="dark"] {
    --bg: #0a0a0b;
    --surface: #131314;
    --surface-2: #1a1a1c;
    --text: #f4f4f5;
    --muted: #9a9aa2;
    --border: #262628;
    --accent: #ececee;
    --accent-ink: #0a0a0b;
    --accent-weak: #242427;
    --brand: #a29dff;
    --brand-soft: rgba(139, 133, 255, .16);
    --good: #2ee6a8;
    --good-weak: #14312a;
    --bad: #f27a72;
    --bad-weak: #3a1b19;
    --warn: #f0b252;
    --warn-weak: #382a10;
    --shadow: none;
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .6);
    --s-lead: #7d889b;
    --s-won: #2ee6a8;
    --s-lost: #f27a72;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font-text);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 22px; font-weight: 650; }
h2 { font-size: 15px; font-weight: 650; }
h3 { font-size: 13px; font-weight: 650; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Layout */
.app { display: grid; grid-template-columns: 220px 1fr; height: 100vh; }
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 18px 12px;
  display: flex; flex-direction: column; gap: 18px;
}
.brand { display: flex; align-items: center; padding: 0 8px; text-decoration: none; }
.brand img { display: none; height: 26px; width: auto; }
.brand .b-full-l { display: block; }
/* logo variants follow the theme (indigo on light, lavender on dark) and shrink to the symbol on narrow screens */
:root[data-theme="dark"] .brand .b-full-l { display: none; } :root[data-theme="dark"] .brand .b-full-d { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand .b-full-l { display: none; } :root:not([data-theme="light"]) .brand .b-full-d { display: block; } }
@media (max-width: 720px) {
  .brand .b-full-l, .brand .b-full-d { display: none !important; }
  .brand .b-sym-l { display: block !important; height: 30px; }
  :root[data-theme="dark"] .brand .b-sym-l { display: none !important; } :root[data-theme="dark"] .brand .b-sym-d { display: block !important; height: 30px; }
}
@media (max-width: 720px) and (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand .b-sym-l { display: none !important; } :root:not([data-theme="light"]) .brand .b-sym-d { display: block !important; height: 30px; } }
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; } :root[data-theme="dark"] .logo-dark { display: inline-block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-light { display: none; } :root:not([data-theme="light"]) .logo-dark { display: inline-block; } }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
  color: var(--muted); text-decoration: none; font-weight: 550;
}
.nav a svg { width: 18px; height: 18px; fill: currentColor; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--accent-weak); color: var(--accent); }
.nav-count {
  margin-left: auto; background: var(--bad); color: #fff; border-radius: 999px;
  font-size: 11px; font-weight: 700; padding: 1px 7px;
}
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font-size: 12px; text-decoration: underline; }
.view { overflow: auto; padding: 28px 32px 40px; outline: none; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

/* Buttons & fields */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 600;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.icon-btn {
  border: 0; background: none; cursor: pointer; color: var(--muted); width: 28px; height: 28px;
  border-radius: 6px; font-size: 18px; line-height: 1;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 600; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); min-width: 0;
}
textarea { resize: vertical; min-height: 90px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card h2 { margin-bottom: 14px; }
.card-sub { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 6px; }

/* Dashboard */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 14px; }
.kpi { padding: 16px 18px; }
.kpi .label { color: var(--muted); font-size: 12px; font-weight: 600; }
.kpi .value { font-size: 26px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .note { color: var(--muted); font-size: 12px; margin: 2px 0 0; padding: 0; border: 0; background: none; }
.dash-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }

.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 96px 1fr auto; gap: 10px; align-items: center; }
.bar-row .name { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { background: var(--surface-2); border-radius: 6px; height: 14px; overflow: hidden; border: 1px solid var(--border); }
.bar-fill { height: 100%; background: var(--c, var(--brand)); border-radius: 5px; min-width: 2px; }
.bar-row .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; white-space: nowrap; }
.bar-row .num b { color: var(--text); }

.forecast { display: flex; align-items: flex-end; gap: 14px; height: 200px; padding-top: 10px; }
.fc-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; min-width: 0; }
.fc-bars { flex: 1; display: flex; align-items: flex-end; gap: 4px; width: 100%; justify-content: center; }
.fc-bar { width: 38%; max-width: 34px; border-radius: 5px 5px 0 0; min-height: 2px; position: relative; }
.fc-bar.total { background: var(--accent-weak); border: 1px solid var(--accent); border-bottom: 0; }
.fc-bar.weighted { background: var(--accent); }
.fc-val { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fc-label { font-size: 12px; font-weight: 600; }
.legend { display: flex; gap: 16px; color: var(--muted); font-size: 12px; margin-top: 12px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut {
  --won: 0; width: 140px; height: 140px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--s-won) calc(var(--won) * 1%), var(--s-lost) 0);
  display: grid; place-items: center; position: relative;
}
.donut.empty { background: var(--border); }
.donut::after { content: ""; position: absolute; inset: 22px; background: var(--surface); border-radius: 50%; }
.donut-center { position: relative; z-index: 1; text-align: center; }
.donut-center b { font-size: 24px; display: block; }
.donut-center span { font-size: 11px; color: var(--muted); }
.wl-list { display: flex; flex-direction: column; gap: 8px; }
.wl-list div { display: flex; align-items: center; gap: 8px; }
.wl-list i { width: 10px; height: 10px; border-radius: 3px; }

.progress-list { display: flex; flex-direction: column; }
.progress-row {
  display: grid; grid-template-columns: minmax(0, 1.4fr) 150px 110px 90px; gap: 14px; align-items: center;
  padding: 10px 6px; border-top: 1px solid var(--border); cursor: pointer; border-radius: 6px;
  background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; width: 100%;
}
.progress-row:first-child { border-top: 0; }
.progress-row:hover { background: var(--surface-2); }
.progress-row .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-row .s { color: var(--muted); font-size: 12px; }
.segs { display: flex; gap: 3px; }
.segs i { flex: 1; height: 8px; border-radius: 3px; background: var(--border); }
.segs i.on { background: var(--c); }
.progress-row .stage-name { font-size: 12px; font-weight: 600; }
.progress-row .amt { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }

.mini-tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mini-tasks li { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.mini-tasks .tt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { color: var(--muted); padding: 16px 0; text-align: center; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 2px 8px;
  border-radius: 999px; white-space: nowrap; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
}
.badge.high { background: var(--bad-weak); color: var(--bad); border-color: transparent; }
.badge.medium { background: var(--warn-weak); color: var(--warn); border-color: transparent; }
.badge.low { background: var(--accent-weak); color: var(--accent); border-color: transparent; }
.due { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.due.overdue { color: var(--bad); }
.due.today { color: var(--warn); }

/* Pipeline */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar input[type=search] { width: 220px; }
.toolbar select { width: auto; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; min-height: 140px; }
.col.drag-over { outline: 2px dashed var(--accent); outline-offset: -2px; background: var(--accent-weak); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; }
.col-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.col-head .total { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.col-head .count { color: var(--muted); font-weight: 600; }
.col-cards { display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.deal-card {
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--c);
  border-radius: 8px; padding: 10px 12px; cursor: grab; box-shadow: var(--shadow); text-align: left; width: 100%;
  display: block;
}
.deal-card:hover { border-color: var(--accent); border-left-color: var(--c); }
.deal-card.dragging { opacity: .4; }
.deal-card .title { font-weight: 650; margin-bottom: 2px; }
.deal-card .co { color: var(--muted); font-size: 12px; }
.deal-card .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.deal-card .val { font-weight: 700; font-variant-numeric: tabular-nums; }
.deal-card .foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.add-card { width: 100%; margin-top: 8px; background: none; border: 1px dashed var(--border); border-radius: 8px; padding: 6px; color: var(--muted); cursor: pointer; }
.add-card:hover { color: var(--text); border-color: var(--muted); }

/* Tasks */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 6px 12px;
  cursor: pointer; font-weight: 600; color: var(--muted);
}
.chip:hover { color: var(--text); }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip .n { opacity: .75; margin-left: 4px; font-weight: 500; }
.chip.overdue:not(.active) .n { color: var(--bad); opacity: 1; font-weight: 700; }
.task-controls { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 16px 0; align-items: center; }
.task-controls label.inline { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.task-controls label.inline input { width: auto; }
.task-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.task { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto 28px; gap: 12px; align-items: center; padding: 11px 14px; border-top: 1px solid var(--border); }
.task:first-child { border-top: 0; }
.task input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; margin: 0; }
.task .t-title { font-weight: 600; }
.task.done .t-title { text-decoration: line-through; color: var(--muted); }
.task .t-meta { color: var(--muted); font-size: 12px; }
.task .t-meta button { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-size: 12px; }
.task .t-meta button:hover { text-decoration: underline; }
.task .t-note { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* Scrim */
.scrim { position: fixed; inset: 0; background: rgba(10, 14, 22, .45); z-index: 20; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-weak); color: var(--accent); display: inline-grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.avatar.xs { width: 20px; height: 20px; font-size: 9px; vertical-align: middle; }
.owner-tag { display: inline-flex; align-items: center; gap: 6px; }

/* Deal page */
.back { display: inline-block; margin-bottom: 12px; color: var(--muted); text-decoration: none; font-weight: 600; }
.back:hover { color: var(--text); }
.deal-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.deal-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.deal-title h1 { font-size: 24px; }
.deal-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.owner-pick { display: flex; align-items: center; gap: 10px; margin-right: 8px; }
.owner-pick select { border: 0; background: transparent; font-weight: 650; padding: 0 16px 0 0; width: auto; cursor: pointer; }
.owner-pick small { display: block; color: var(--muted); }
.btn.won { background: var(--good); border-color: var(--good); color: #fff; }
.btn.lost { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.won:hover, .btn.lost:hover { filter: brightness(1.1); background: inherit; }
.status-pill { padding: 3px 12px; border-radius: 999px; font-weight: 700; font-size: 12px; }
.status-pill.won { background: var(--good-weak); color: var(--good); }
.status-pill.lost { background: var(--bad-weak); color: var(--bad); }

.stagebar { list-style: none; display: flex; margin: 18px 0 22px; padding: 0; }
.stagebar li { flex: 1; min-width: 0; margin-left: -8px; }
.stagebar li:first-child { margin-left: 0; }
.stage {
  width: 100%; height: 46px; border: 0; cursor: pointer; background: var(--border); color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%);
  padding: 0 18px;
}
li:first-child > .stage { clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); border-radius: 8px 0 0 8px; }
li:last-child > .stage { border-radius: 0 8px 8px 0; }
.stage:hover { filter: brightness(.96); }
.stage .s-name { font-weight: 700; font-size: 12px; }
.stage .s-days { font-size: 12px; }
.stage.visited { background: var(--accent-weak); color: var(--accent); }
.stage.current { background: var(--accent); color: var(--accent-ink); }
.stage.visited.won { background: var(--good-weak); color: var(--good); }
.stage.visited.lost { background: var(--bad-weak); color: var(--bad); }

.deal-layout { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 16px; align-items: start; }
.deal-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.summary h2 { margin-bottom: 8px; }
.kv { margin: 0; }
.kv > div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--border); }
.kv > div:first-child { border-top: 0; }
.kv dt { color: var(--muted); font-size: 12px; font-weight: 600; }
.kv dd { margin: 0; min-width: 0; }
.kv input, .kv select { border-color: transparent; background: transparent; padding: 5px 6px; margin-left: -6px; width: calc(100% + 6px); }
.kv input:hover, .kv select:hover, .kv input:focus, .kv select:focus { border-color: var(--border); background: var(--surface); }
.kv .static { padding: 5px 0; display: inline-block; }
.kv.plain input { margin: 0; }
.kv.plain > div { grid-template-columns: 100px 1fr; }
.contacts { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.contact-link { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-weight: 600; text-align: left; }
.contact-link:hover { text-decoration: underline; }
.contact-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.tab { background: none; border: 0; padding: 8px 14px; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab .n { font-size: 11px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 0 6px; margin-left: 2px; }
#d-composer { padding-bottom: 14px; }
#d-composer .tabs { margin-bottom: 12px; }
.compose { display: flex; flex-direction: column; gap: 10px; }
.compose .actions { display: flex; justify-content: flex-end; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px; border: 2px dashed var(--border); border-radius: 10px; cursor: pointer; text-align: center; }
.dropzone:hover { border-color: var(--accent); background: var(--accent-weak); }
.dropzone span { color: var(--muted); font-size: 12px; }
.dropzone input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

.focus-table { display: flex; flex-direction: column; }
.focus-row { display: grid; grid-template-columns: 22px minmax(0, 2fr) 100px minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, 1.2fr); gap: 12px; align-items: center; padding: 10px 4px; border-top: 1px solid var(--border); }
.focus-row.focus-head { border-top: 0; color: var(--muted); font-size: 12px; font-weight: 600; padding-top: 0; }
.focus-row input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; margin: 0; }
.f-title { font-weight: 600; }
.f-title .badge { margin-left: 6px; }
.f-person { display: inline-flex; align-items: center; gap: 6px; }
.focus-row > span { overflow-wrap: anywhere; }

.note { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; background: var(--surface-2); }
.note header { display: flex; align-items: center; gap: 8px; }
.note .when { color: var(--muted); font-size: 12px; }
.note .icon-btn { margin-left: auto; }
.note p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.file { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 28px; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.file:first-child { border-top: 0; }
.file-ico { width: 40px; height: 40px; border-radius: 8px; background: var(--accent-weak); color: var(--accent); display: grid; place-items: center; font-size: 10px; font-weight: 800; }
.file .btn { text-decoration: none; }
.hist-body .task-list { box-shadow: none; }
.task .t-meta a { color: var(--accent); }

.modal {
  position: fixed; z-index: 40; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto;
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 22px;
}
.modal h2 { font-size: 18px; margin-bottom: 16px; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.form fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin: 0; }
.form legend { font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 6px; }

@media (max-width: 960px) {
  .deal-layout { grid-template-columns: 1fr; }
  .grid4 { grid-template-columns: 1fr 1fr; }
  .focus-row.focus-head { display: none; }
  .focus-row { grid-template-columns: 22px 1fr; }
  .focus-row > span[data-label] { grid-column: 2; }
  .focus-row > span[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 12px; }
  .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
  .progress-row { grid-template-columns: 1fr 90px; }
  .progress-row .segs, .progress-row .stage-name { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: auto; min-height: 100vh; }
  .sidebar { flex-direction: row; align-items: center; padding: 10px 12px; gap: 10px; overflow-x: auto; }
  .nav { flex-direction: row; }
  .sidebar-foot { display: none; }
  .view { padding: 18px 16px 32px; overflow: visible; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .task { grid-template-columns: 22px minmax(0, 1fr) 28px; }
  .task .badge, .task .due { grid-column: 2; justify-self: start; }
  .bar-row { grid-template-columns: 80px 1fr auto; }
}

/* Pipeline: stage columns run to the bottom of the screen */
.view.fill { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 20px; }
.view.fill .board { flex: 1; min-height: 0; align-items: stretch; padding-bottom: 0; }
.view.fill .col { display: flex; flex-direction: column; min-height: 0; }
.view.fill .col-cards { flex: 1; overflow-y: auto; min-height: 0; }
@media (max-width: 720px) {
  .view.fill { display: block; overflow: visible; }
  .view.fill .board { min-height: 70vh; }
}

/* Pipeline editor */
.modal.wide { width: min(680px, calc(100vw - 24px)); }
.pl-bar { display: flex; gap: 10px; margin-bottom: 14px; align-items: center; }
.pl-bar select { flex: 1; }
.stage-edit { list-style: none; margin: 10px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.stage-edit li { display: grid; grid-template-columns: 18px 10px minmax(0, 1fr) 84px 28px 28px 28px; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.stage-edit li.dragging { opacity: .4; }
.stage-edit li.drag-over { border-color: var(--accent); background: var(--accent-weak); }
.stage-edit .grip { cursor: grab; color: var(--muted); user-select: none; letter-spacing: -2px; }
.stage-edit .swatch { width: 10px; height: 10px; border-radius: 50%; }
.stage-edit .prob { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.icon-btn:disabled { opacity: .3; cursor: default; }
@media (max-width: 720px) { .toolbar > select, .toolbar > .btn { flex: 1; } }
.pl-bar input[type=text] { flex: 1; font-weight: 650; }
.pl-bar .edit-ico { border: 1px solid var(--border); width: 34px; height: 34px; font-size: 16px; flex: none; }

/* Filters popover */
.filter-wrap { position: relative; }
.filter-count { background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: 11px; padding: 0 6px; min-width: 18px; text-align: center; }
.filter-panel {
  position: absolute; right: 0; top: calc(100% + 6px); width: 300px; z-index: 15; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.filter-panel[hidden] { display: none; }
.filter-panel select { width: 100%; }
.filter-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 2px; }

/* Closed / all deals list */
.deal-list { overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.view.fill .deal-list { flex: 1; min-height: 0; }
.deal-table { width: 100%; border-collapse: collapse; }
.deal-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); white-space: nowrap; }
.deal-table td { padding: 11px 14px; border-top: 1px solid var(--border); white-space: nowrap; }
.deal-table tbody tr { cursor: pointer; }
.deal-table tbody tr:hover { background: var(--surface-2); }
.deal-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.deal-table .strong { font-weight: 600; }
.status-pill.open { background: var(--accent-weak); color: var(--accent); }
.deal-table .status-pill { font-size: 11px; padding: 2px 10px; }

/* Win / lose drop zones while dragging */
.dropbar { position: fixed; bottom: 0; left: 220px; right: 0; z-index: 25; display: flex; gap: 14px; padding: 14px 20px; background: linear-gradient(to top, var(--bg) 70%, transparent); animation: rise .15s ease-out; }
.dropbar[hidden] { display: none; }
@keyframes rise { from { transform: translateY(30px); opacity: 0; } }
.dz { flex: 1; border: 2px dashed var(--c); border-radius: 12px; padding: 16px; text-align: center; background: var(--surface); display: flex; flex-direction: column; gap: 2px; color: var(--c); }
.dz b { font-size: 16px; }
.dz span { font-size: 12px; color: var(--muted); }
.dz.won { --c: var(--good); } .dz.lost { --c: var(--bad); }
.dz.over { background: var(--c); color: #fff; border-style: solid; }
.dz.over span { color: #fff; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 50; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); display: flex; gap: 14px; align-items: center; max-width: calc(100vw - 24px); }
.toast[hidden] { display: none; }
.toast .link-btn { color: inherit; font-weight: 700; }
@media (max-width: 720px) { .dropbar { left: 0; } .filter-panel { position: fixed; left: 12px; right: 12px; top: 90px; width: auto; max-height: calc(100vh - 110px); overflow: auto; } }

.page-head > .toolbar { flex-wrap: wrap; }
.toolbar .btn { white-space: nowrap; }

.filter-panel { max-height: calc(100vh - 140px); overflow-y: auto; }
.saved-views { border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.view-row { display: flex; align-items: center; justify-content: space-between; border-radius: 8px; padding: 0 0 0 10px; }
.view-row:hover { background: var(--surface-2); }
.view-row.active { background: var(--accent-weak); }
.view-name { flex: 1; background: none; border: 0; text-align: left; padding: 6px 0; cursor: pointer; font-weight: 600; }
.view-row.active .view-name { color: var(--accent); }
.save-view { display: flex; gap: 8px; margin-top: 4px; }
.save-view input { flex: 1; }

/* Pipeline picker with per-pipeline edit icon */
.pl-menu-wrap { position: relative; }
.pl-menu { position: absolute; left: 0; top: calc(100% + 6px); min-width: 260px; z-index: 15; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.pl-menu[hidden] { display: none; }
.pl-item { display: flex; align-items: center; border-radius: 8px; padding-right: 4px; }
.pl-item:hover { background: var(--surface-2); }
.pl-item.active { background: var(--accent-weak); }
.pl-pick { flex: 1; display: flex; flex-direction: column; align-items: flex-start; background: none; border: 0; padding: 8px 10px; cursor: pointer; font-weight: 650; text-align: left; }
.pl-item.active .pl-pick { color: var(--accent); }
.pl-pick .card-sub { margin: 0; font-weight: 400; }
.pl-item .icon-btn { display: grid; place-items: center; }
@media (max-width: 720px) { .pl-menu-wrap { flex: 1; } .pl-menu-wrap > .btn { width: 100%; } }
.pl-add { margin-top: 4px; border: 0; border-top: 1px solid var(--border); background: none; padding: 10px; text-align: left; cursor: pointer; font-weight: 650; color: var(--accent); border-radius: 0 0 8px 8px; }
.pl-add:hover { background: var(--surface-2); }

/* Modern checkboxes */
input[type=checkbox],
.task input[type=checkbox],
.focus-row input[type=checkbox],
.task-controls label.inline input[type=checkbox] {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; margin: 0; padding: 0; flex: none; cursor: pointer;
  border: 1.5px solid var(--muted); border-radius: 7px; background: transparent no-repeat center / 14px;
  transition: background-color .15s, border-color .15s, box-shadow .15s, transform .1s;
}
input[type=checkbox]:hover { border-color: var(--accent); background-color: var(--accent-weak); }
input[type=checkbox]:active { transform: scale(.9); }
input[type=checkbox]:checked {
  background-color: var(--accent); border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
input[type=checkbox]:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-weak), 0 0 0 4.5px var(--accent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) input[type=checkbox]:checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2311131a' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  }
}
:root[data-theme="dark"] input[type=checkbox]:checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2311131a' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

.task-controls select { min-width: 180px; }

/* Settings */
.set-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.set-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; }
.set-tab { text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--muted); }
.set-tab:hover { background: var(--surface-2); color: var(--text); }
.set-tab.active { background: var(--accent-weak); color: var(--accent); }
.set-body { display: flex; flex-direction: column; gap: 16px; max-width: 860px; }
.set-card { display: flex; flex-direction: column; gap: 14px; }
.set-card h2 { margin: 0; }
.set-card h3 { display: flex; align-items: center; gap: 8px; }
.muted { color: var(--muted); margin: 0; }
.muted.small { font-size: 12px; }
.field small { color: var(--muted); font-size: 12px; font-weight: 400; }
.grow { flex: 1; min-width: 0; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.danger-zone { border-color: var(--bad); }
.conn-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); flex-wrap: wrap; }
.conn-banner.ok { border-color: var(--good); background: var(--good-weak); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--good); flex: none; }
.dot.off { background: var(--muted); }
.provider-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.provider { border: 1px solid var(--border); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.provider .field { width: 100%; }
.provider details { width: 100%; color: var(--muted); font-size: 13px; }
.provider summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.provider ol { padding-left: 18px; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.provider code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 0 5px; word-break: break-all; color: var(--text); }
.p-logo { width: 22px; height: 22px; border-radius: 6px; display: inline-grid; place-items: center; color: #fff; font-size: 12px; font-weight: 800; }
.p-logo.g { background: #ea4335; } .p-logo.o { background: #0a64ad; }
.form-error { color: var(--bad); background: var(--bad-weak); border-radius: 8px; padding: 8px 12px; margin: 0; }
.form-ok { color: var(--good); background: var(--good-weak); border-radius: 8px; padding: 8px 12px; margin: 0; }
.team-list, .plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.team-list li { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.plain-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 4px 6px 4px 12px; font-weight: 600; }
.tag button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 16px; line-height: 1; border-radius: 50%; width: 20px; height: 20px; }
.tag button:hover { background: var(--border); color: var(--text); }

/* Email composer + history */
.notice { border: 1px dashed var(--border); border-radius: 10px; padding: 18px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.notice p { margin: 0; color: var(--muted); }
.mail-from { color: var(--muted); }
.mail-from b { color: var(--text); }
.provider-tag { background: var(--accent-weak); color: var(--accent); border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 700; margin-left: 6px; }
.mail-body { min-height: 200px; font-family: inherit; line-height: 1.5; }
.email-item details { margin-top: 6px; }
.email-item summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 12px; }
.email-item details p { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 960px) { .set-layout { grid-template-columns: 1fr; } .set-nav { flex-direction: row; flex-wrap: wrap; position: static; } .provider-grid { grid-template-columns: 1fr; } }

.signin-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn.signin { padding: 10px 18px; gap: 10px; }
.btn.signin:disabled { opacity: .55; cursor: not-allowed; }
.btn:disabled { cursor: not-allowed; }
.admin-help { border-top: 1px solid var(--border); padding-top: 12px; color: var(--muted); font-size: 13px; }
.admin-help summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.admin-help p { margin: 10px 0; }
.admin-help code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 0 5px; word-break: break-all; color: var(--text); }
.admin-help ol { padding-left: 18px; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.admin-help h3 { color: var(--text); margin-bottom: 4px; }
.notice .signin-row { margin-top: 4px; }

/* ---------- Automations ---------- */
.au-note { background: var(--accent-weak); color: var(--text); border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; font-size: 13px; }
.au-tabs { flex-wrap: wrap; }
.au-list { display: flex; flex-direction: column; gap: 10px; }
.au-row { display: flex; align-items: center; gap: 16px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; box-shadow: var(--shadow); }
.au-row:hover { border-color: var(--accent); }
.au-meta { text-align: right; font-size: 12px; min-width: 190px; }
.run-badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.run-badge.success { background: var(--good-weak); color: var(--good); border-color: transparent; }
.run-badge.failed { background: var(--bad-weak); color: var(--bad); border-color: transparent; }
.run-badge.waiting, .run-badge.running { background: var(--warn-weak); color: var(--warn); border-color: transparent; }
.au-empty { display: flex; flex-direction: column; gap: 14px; }
.au-tpl { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.au-tplcard { text-align: left; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.au-tplcard:hover { border-color: var(--accent); }
.au-tplcard span { color: var(--muted); font-size: 13px; }

/* toggle switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; flex: none; }
.switch input[type=checkbox] { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { display: inline-block; width: 40px; height: 23px; border-radius: 999px; background: var(--border); position: relative; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch input:checked + span { background: var(--good); }
.switch input:checked + span::after { transform: translateX(17px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch.big b { min-width: 24px; }

/* builder */
.au-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.au-name { font-size: 22px; font-weight: 650; background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 4px 8px; margin-left: -8px; min-width: 260px; flex: 1; max-width: 560px; }
.au-name:hover, .au-name:focus { border-color: var(--border); background: var(--surface); }
.au-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.au-canvas { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; align-items: stretch; }
.au-step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.au-step.open { border-color: var(--accent); }
.au-card-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; border-radius: var(--radius); }
.au-trigger .au-card-head { cursor: default; }
.au-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.au-title .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.au-ctrl { display: flex; gap: 2px; }
.au-body { padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--border); padding-top: 14px; }
.au-badge { --c: var(--muted); flex: none; min-width: 46px; text-align: center; font-size: 10px; font-weight: 800; letter-spacing: .04em; padding: 5px 6px; border-radius: 6px; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.tone-trigger { --c: var(--accent); } .tone-crm { --c: var(--s-qualified); } .tone-search { --c: var(--s-5); } .tone-logic { --c: var(--s-negotiation); }
.tone-data { --c: var(--s-proposal); } .tone-time { --c: var(--s-6); } .tone-db { --c: var(--s-8); } .tone-api { --c: var(--s-7); } .tone-code { --c: var(--muted); }
.au-conn { display: flex; justify-content: center; position: relative; height: 30px; }
.au-conn::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--border); transform: translateX(-1px); }
.au-plus { position: relative; align-self: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0; opacity: .6; }
.au-conn:hover .au-plus, .au-plus:focus-visible { opacity: 1; border-color: var(--accent); color: var(--accent); }
.au-end { align-self: center; font-size: 11px; font-weight: 700; color: var(--muted); border: 1px dashed var(--border); border-radius: 999px; padding: 2px 14px; }
.au-branches { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 12px 14px; }
.au-branch { background: var(--surface-2); border: 1px dashed var(--border); border-radius: 10px; padding: 10px; min-width: 0; }
.au-branch.loop { margin: 0 12px 14px; border-left: 3px solid var(--s-negotiation); }
.au-branch.yes { border-top: 3px solid var(--good); } .au-branch.no { border-top: 3px solid var(--bad); }
.au-blabel { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.au-branch .au-conn { height: 22px; }
.au-empty-branch { display: flex; justify-content: center; padding: 10px 0; }
.au-tags { margin: 28px auto 0; max-width: 720px; }
.au-tags summary { cursor: pointer; font-weight: 650; }
.au-tags code, .ff-key { background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 0 5px; font-size: 12px; }
.tag-chip { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; font: 12px ui-monospace, Menlo, monospace; cursor: pointer; color: var(--text); }
.tag-chip:hover { border-color: var(--accent); color: var(--accent); }
.au-tags .chip-list { margin-top: 10px; }

.check-row { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.au-coe { color: var(--muted); font-size: 13px; }
.conds { display: flex; flex-direction: column; gap: 8px; }
.cond-match { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.cond-match select { width: auto; padding: 4px 8px; }
.cond-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.2fr) 28px; gap: 6px; align-items: center; }
.kv-row { display: grid; grid-template-columns: 1fr 1.4fr 28px; gap: 6px; margin-bottom: 6px; }
.col-in { display: grid; grid-template-columns: 110px 1fr; gap: 8px; align-items: center; margin-bottom: 6px; }
.col-in em { font-style: normal; color: var(--muted); font-size: 12px; }
.codebox { font: 12.5px/1.5 ui-monospace, Menlo, Consolas, monospace; white-space: pre; tab-size: 2; }

/* picker */
.au-picker { display: flex; flex-direction: column; gap: 18px; }
.au-picker h3 { margin-bottom: 8px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.au-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.au-pick { display: flex; gap: 10px; align-items: flex-start; text-align: left; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px; cursor: pointer; }
.au-pick:hover { border-color: var(--accent); }
.au-pick small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.au-testres { border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: var(--surface-2); }

/* forms + databases + history */
.au-two { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ff-list { display: flex; flex-direction: column; gap: 10px; }
.ff-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.ff-wide { grid-column: 1 / -1; }
.ff-key { grid-column: 1 / -1; width: fit-content; color: var(--muted); }
.ff-ctrl { display: inline-flex; }
.tc-list { display: flex; flex-direction: column; gap: 8px; }
.tc-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto 28px; gap: 8px; align-items: center; }
.au-tablewrap { overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.au-tablewrap .deal-table td input[type=text], .au-tablewrap .deal-table td input[type=number], .au-tablewrap .deal-table td input[type=date] { min-width: 120px; }
.au-run { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.au-run summary { cursor: pointer; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.runlog { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.runlog li { padding: 4px 8px; border-radius: 6px; overflow-wrap: anywhere; }
.runlog li.error { background: var(--bad-weak); color: var(--bad); }
.runlog li.skip { color: var(--muted); }
.pf-wrap { min-height: 100%; display: grid; place-items: start center; padding: 40px 16px; }
.pf { width: min(560px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 28px; }
body.public .sidebar { display: none; }
body.public .app { grid-template-columns: 1fr; }
body.public .view { padding: 0; }
@media (max-width: 960px) { .au-two { grid-template-columns: 1fr; } .au-branches { grid-template-columns: 1fr; } .au-meta { display: none; } }
input[type=time], input[type=url] { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); min-width: 0; color-scheme: light dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) input[type=time], :root:not([data-theme="light"]) input[type=date] { color-scheme: dark; } }
:root[data-theme="dark"] input[type=time], :root[data-theme="dark"] input[type=date] { color-scheme: dark; }

/* ---------- Calendar ---------- */
.cal-icon { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex: none; background: var(--surface-2); }
.cal-icon.big { width: 64px; height: 64px; border-radius: 16px; }
.cal-icon.ph { display: grid; place-items: center; background: var(--accent-weak); color: var(--accent); font-weight: 800; font-size: 20px; }
.icon-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.chip-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.av-row { display: grid; grid-template-columns: 48px 100px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--border); }
.av-day { padding-top: 3px; }
.av-ranges { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.av-range { display: flex; align-items: center; gap: 8px; }
.av-range input { width: 120px; }
.cal-preview { width: 100%; height: 640px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.cal-split { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-h { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 4px 0; }
.cal-cell { min-height: 86px; display: flex; flex-direction: column; align-items: stretch; gap: 3px; padding: 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); text-align: left; cursor: pointer; overflow: hidden; }
.cal-cell.off { background: transparent; border-color: transparent; cursor: default; }
.cal-cell:not(.off):hover { border-color: var(--accent); }
.cal-cell.today > span { background: var(--accent); color: var(--accent-ink); border-radius: 999px; width: 22px; height: 22px; display: grid; place-items: center; }
.cal-cell.sel { border-color: var(--accent); background: var(--accent-weak); }
.cal-cell > span { font-weight: 650; font-size: 12px; }
.cal-chip, .cal-more { font-style: normal; font-size: 11px; background: var(--accent-weak); color: var(--accent); border-radius: 5px; padding: 1px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-more { background: none; color: var(--muted); }
.bk-card { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.bk-line { padding: 4px 0; border-top: 1px solid var(--border); font-size: 13px; }

/* public booking page */
.bk { width: min(860px, 100%); display: flex; flex-direction: column; gap: 16px; padding: 28px; }
.bk-head { display: flex; align-items: center; gap: 16px; }
.bk-head h1 { font-size: 24px; }
.bk-desc { margin: 0; color: var(--muted); white-space: pre-wrap; }
.bk-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; border-top: 1px solid var(--border); padding-top: 18px; }
.bk-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 8px; }
.bk-day { aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; border: 0; background: transparent; font-weight: 600; color: var(--muted); opacity: .45; }
button.bk-day { opacity: 1; background: var(--accent-weak); color: var(--accent); cursor: pointer; }
button.bk-day:hover { outline: 2px solid var(--accent); }
.bk-day.sel { background: var(--accent); color: var(--accent-ink); }
.bk-day.today:not(.sel) { box-shadow: inset 0 0 0 1.5px var(--muted); }
.bk-slots { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; max-height: 360px; overflow: auto; padding: 2px; }
.bk-slot { padding: 11px; border: 1.5px solid var(--accent); border-radius: 8px; background: transparent; color: var(--accent); font-weight: 700; cursor: pointer; }
.bk-slot:hover { background: var(--accent); color: var(--accent-ink); }
.bk-form { display: flex; flex-direction: column; gap: 12px; }
.bk-pick { padding: 12px; border-radius: 10px; background: var(--accent-weak); }
.bk-hint { padding: 30px 8px; text-align: center; }
.bk-ok { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--border); padding-top: 18px; }
body.embed .pf-wrap { padding: 0; }
body.embed .bk { box-shadow: none; border: 0; padding: 20px; background: transparent; }
body.embed { background: transparent; }
@media (max-width: 960px) { .cal-split { grid-template-columns: 1fr; } .bk-body { grid-template-columns: 1fr; } .av-row { grid-template-columns: 48px 1fr; } .av-ranges { grid-column: 1 / -1; } .cal-cell { min-height: 60px; } .cal-chip { display: none; } }

/* shared helpers (section headers + inline forms) */
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.inline-form { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.inline-form .actions { display: flex; gap: 8px; justify-content: flex-end; }

.sync-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); text-decoration: none; margin-left: 4px; }
.sync-badge.ok { background: var(--good-weak); color: var(--good); border-color: transparent; }
.sync-badge.bad { background: var(--bad-weak); color: var(--bad); border-color: transparent; }

.sync-found { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--surface-2); }
.sync-found .runlog { margin-top: 8px; }

/* ---------- Marketing ---------- */
.mk-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.mk-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 16px; }
.mk-block { border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.mk-block .sec-head { margin-bottom: 0; }
.mk-btype { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mk-cond { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.1fr) 28px; gap: 8px; align-items: center; margin-bottom: 8px; }
.mk-frame-wrap { display: flex; justify-content: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; overflow: auto; }
.mk-frame { width: 100%; height: 520px; border: 0; border-radius: 8px; background: #f3f4f6; transition: width .2s; }
.mk-frame.mobile { width: 375px; max-width: 100%; }
.mk-bar { height: 10px; border-radius: 999px; background: var(--border); overflow: hidden; }
.mk-bar i { display: block; height: 100%; background: var(--good); transition: width .3s; }
.mk-todo { margin: 0; padding-left: 18px; color: var(--warn); font-size: 13px; }
@media (max-width: 960px) { .mk-split { grid-template-columns: 1fr; } .mk-side { position: static; } .mk-cond { grid-template-columns: 1fr 1fr; } }

/* ---- Cloud mode: sign-in screens, workspace box, team ---- */
body.cloud-locked > :not(#cloud-root):not(script) { display: none !important; }
#cloud-root[hidden] { display: none; }
.cloud-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg, #f6f7fb); }
.cloud-card { width: 100%; max-width: 420px; background: var(--surface, #fff); color: var(--text, #1b1f2a); border: 1px solid var(--border, #e3e6ee); border-radius: 14px; padding: 28px; box-shadow: 0 10px 30px rgba(20, 24, 40, .08); display: flex; flex-direction: column; gap: 12px; }
.cloud-card h1 { font-size: 22px; margin: 0; }
.cloud-card form { display: flex; flex-direction: column; gap: 12px; }
.cloud-card .field { display: flex; flex-direction: column; gap: 4px; }
.cloud-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 4px; }
.cloud-brand img { height: 30px; width: auto; display: block; }
.cloud-center { text-align: center; padding: 24px 0; }
.cloud-links { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; margin: 0; }
.cloud-invite { background: color-mix(in srgb, var(--accent, #4338e0) 10%, transparent); border-radius: 8px; padding: 10px 12px; font-size: 14px; margin: 0; }
.cloud-or { display: flex; align-items: center; gap: 10px; color: var(--muted, #6b7280); font-size: 12px; }
.cloud-or::before, .cloud-or::after { content: ''; flex: 1; border-top: 1px solid var(--border, #e3e6ee); }
.cloud-list { display: flex; flex-direction: column; gap: 8px; }
.cloud-ws { display: flex; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--border, #e3e6ee); border-radius: 10px; background: transparent; color: inherit; cursor: pointer; font: inherit; }
.cloud-ws:hover { border-color: var(--accent, #4338e0); }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent, #4338e0); cursor: pointer; font: inherit; text-decoration: underline; }
.form-error { color: #b42318; background: #fef3f2; border-radius: 8px; padding: 8px 10px; font-size: 13px; margin: 0; }
.cloud-user { margin-top: auto; padding: 12px; border-top: 1px solid var(--border, #e3e6ee); display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.cloud-user { min-width: 0; max-width: 100%; overflow: hidden; }
.cloud-who { display: flex; align-items: baseline; gap: 4px; min-width: 0; max-width: 100%; }
.cloud-who .cloud-mail { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cloud-who .cloud-role { flex: none; }
.cloud-ws-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cloud-actions { display: flex; gap: 12px; }
.cloud-status.saving { color: var(--muted, #6b7280); }
.cloud-status.error { color: #b42318; }
.cloud-status.saved { color: #067647; }
.cloud-team li { display: flex; align-items: center; gap: 10px; }
.cloud-team .grow, .grow { flex: 1; min-width: 0; }
.invite-link { display: flex; gap: 8px; } .invite-link input { flex: 1; min-width: 0; }
.notice { background: color-mix(in srgb, var(--accent, #4338e0) 8%, transparent); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 13px; }
.cloud-card input { width: 100%; box-sizing: border-box; padding: 9px 10px; border: 1px solid var(--border, #e3e6ec); border-radius: 8px; background: var(--surface-2, #f9fafb); color: inherit; font: inherit; }
.cloud-card input:focus { outline: 2px solid var(--accent, #4338e0); outline-offset: 1px; }
.cloud-card .btn { width: 100%; }
.cloud-legal { margin: 4px 0 0; text-align: center; font-size: 12px; color: var(--muted, #667085); }
.cloud-legal a, .cloud-card .check a { color: inherit; }
.cloud-card .check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.cloud-card .check input { width: auto; margin-top: 2px; }
.danger-zone hr { border: 0; border-top: 1px solid var(--border, #e3e6ec); margin: 14px 0; }
.cf-box { display: flex; justify-content: center; min-height: 65px; }
.usage-grid { display: grid; gap: 14px; margin: 14px 0; }
.usage-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 4px; }
.usage-bar { height: 8px; border-radius: 99px; background: var(--surface-2, #f1f3f6); overflow: hidden; }
.usage-bar i { display: block; height: 100%; background: var(--accent, #4338e0); border-radius: 99px; }
.usage-bar.near i { background: #d97706; } .usage-bar.full i { background: #b42318; }
#cloud-banners { position: relative; z-index: 30; }
.cloud-banner { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 8px 16px; font-size: 14px; background: #eef0ff; color: #1b1f2a; border-bottom: 1px solid #d5d9ff; }
.cloud-banner.warning { background: #fffaeb; border-color: #fedf89; } .cloud-banner.critical { background: #fef3f2; border-color: #fecdca; color: #7a271a; }
.cloud-banner .link-btn { text-decoration: none; color: inherit; opacity: .7; }
/* with a banner showing, share the screen height between the banner and the app */
body:has(#cloud-banners > .cloud-banner) { display: flex; flex-direction: column; height: 100vh; }
body:has(#cloud-banners > .cloud-banner) .app { height: auto; flex: 1; min-height: 0; }

h1, h2, h3, .kpi b, .adm-card b { font-family: var(--font-display); letter-spacing: -.01em; }
:focus-visible { outline: 2px solid var(--brand-indigo); outline-offset: 2px; }
:root[data-theme="dark"] :focus-visible { outline-color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :focus-visible { outline-color: var(--accent); } }
.powered { text-align: center; font-size: 12px; color: var(--muted); padding: 18px 0 6px; } .powered a { color: inherit; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; } .powered img { height: 14px; width: auto; vertical-align: middle; } body.embed .powered { display: none; }

/* ------------------------------------------------------------------ mobile (phones) */
@media (max-width: 720px) {
  html { -webkit-text-size-adjust: 100%; }
  body { overflow-x: hidden; }
  /* top bar: logo + workspace/sign-out; main navigation moves to a bottom tab bar */
  .app { display: block; height: auto; min-height: 100vh; min-height: 100dvh; }
  .sidebar { position: sticky; top: 0; z-index: 18; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; padding-top: calc(8px + env(safe-area-inset-top)); overflow: visible; border-right: 0; border-bottom: 1px solid var(--border); }
  .cloud-user { margin: 0; padding: 0; border: 0; flex-direction: row; align-items: center; gap: 10px; min-width: 0; font-size: 12px; }
  .cloud-user > .muted, .cloud-user .cloud-status.saved, .cloud-user .cloud-status.saving { display: none; }
  .cloud-ws-name { max-width: 34vw; }
  .cloud-actions { gap: 14px; }
  .cloud-actions .link-btn, .link-btn { font-size: 13px; padding: 10px 0; }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; background: var(--surface); border-top: 1px solid var(--border); padding: 0 2px env(safe-area-inset-bottom); box-shadow: 0 -4px 16px rgba(15, 18, 64, .06); }
  .nav a { position: relative; flex-direction: column; justify-content: center; gap: 3px; min-height: 56px; padding: 6px 0; font-size: 10.5px; font-weight: 600; text-align: center; border-radius: 10px; }
  .nav a svg { width: 22px; height: 22px; }
  .nav-count { position: absolute; top: 4px; left: 50%; margin: 0 0 0 6px; font-size: 10px; padding: 0 5px; }
  .view { padding: 16px 14px calc(88px + env(safe-area-inset-bottom)); }
  .page-head { gap: 10px; margin-bottom: 14px; }
  .page-head h1 { font-size: 22px; }
  .page-head > .toolbar { width: 100%; }
  .toolbar { gap: 8px; }
  .toolbar input[type=search] { width: 100%; flex: 1 1 100%; }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .dropbar { display: none !important; }

  /* comfortable touch targets, and 16px inputs so iOS Safari does not zoom on focus */
  input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=search], input[type=url], input[type=password], select, textarea { font-size: 16px; min-height: 44px; }
  .btn { min-height: 44px; justify-content: center; }
  .btn.small { min-height: 38px; }
  .icon-btn { width: 40px; height: 40px; font-size: 20px; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .tabs > * { white-space: nowrap; flex: none; }
  .card { padding: 14px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi .value { font-size: 22px; }
  .grid4 { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .progress-row { grid-template-columns: minmax(0, 1fr) auto; }
  .progress-row > div { min-width: 0; }
  .dash-grid > * { min-width: 0; }
  .kpis > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }

  /* pipeline board: one stage at a time, swipe sideways */
  .board { grid-auto-columns: 84%; scroll-snap-type: x mandatory; margin: 0 -14px; padding: 0 14px 12px; scroll-padding: 0 14px; -webkit-overflow-scrolling: touch; }
  .board > .col { scroll-snap-align: start; }
  .deal-card { padding: 12px; }

  /* tables scroll sideways inside their card instead of stretching the page */
  .deal-list { -webkit-overflow-scrolling: touch; }
  .deal-table th, .deal-table td { padding: 12px 12px; }

  /* dialogs become bottom sheets */
  .modal, .modal.wide { top: auto; bottom: 0; left: 0; right: 0; transform: none; width: 100%; max-height: 92vh; max-height: 92dvh; border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
  .form .actions { position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom)); background: var(--surface); padding: 10px 0 0; }
  .form .actions .btn { flex: 1; }

  /* pipeline editor rows, team list, settings menu, calendar */
  .stage-edit li { grid-template-columns: 10px minmax(0, 1fr) 70px 36px 36px 36px; gap: 6px; }
  .stage-edit .grip { display: none; }
  .team-list li > :nth-child(n+3) { margin-left: 44px; }
  .stagebar { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .stagebar > li { flex: 0 0 auto; min-width: 104px; }
  .set-nav { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .set-nav > * { flex: none; white-space: nowrap; }
  .invite-link { flex-direction: column; align-items: stretch; }
  .cal-cell { min-height: 52px; padding: 3px; }
}
@media (max-width: 720px) { .hint-desktop { display: none; } }
.hint-touch { display: none; }
@media (max-width: 720px) { .hint-touch { display: inline; } }
@media (max-width: 340px) { .kpis { grid-template-columns: 1fr; } .nav a, .nav-more { font-size: 10px; } }

@media (max-width: 720px) {
  /* five clean tabs; Marketing, Automations and Settings live under More */
  .nav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: stretch; }
  .nav a, .nav-more { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; padding: 8px 0; font-size: 11px; font-weight: 600; letter-spacing: 0; color: var(--muted); background: none; border: 0; border-radius: 0; cursor: pointer; font-family: inherit; -webkit-tap-highlight-color: transparent; }
  .nav a svg, .nav-more svg { width: 22px; height: 22px; fill: currentColor; }
  .nav a:hover, .nav-more:hover { background: none; color: var(--muted); }
  .nav a.active, .nav-more.active, .nav-more[aria-expanded="true"] { background: none; color: var(--accent); }
  .nav a.active::before, .nav-more.active::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
  .nav-count { top: 6px; left: 50%; margin-left: 6px; }
}

/* Appearance switch (Settings → Preferences) */
:root[data-theme="light"] { color-scheme: light; } :root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="light"] input[type=time], :root[data-theme="light"] input[type=date] { color-scheme: light; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; max-width: 420px; margin-bottom: 10px; }
.seg-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-weight: 600; cursor: pointer; }
.seg-btn:hover { color: var(--text); }
.seg-btn.on { background: var(--surface); color: var(--accent); box-shadow: 0 1px 3px rgba(15, 18, 64, .18); }

/* Brand purple: selected items and small accents. Same hue in light mode; a soft lavender tint on the neutral dark theme. */
a, .link-btn, .contact-link, .task .t-meta a, .task .t-meta button, .provider summary, .email-item summary, .admin-help summary { color: var(--brand); }
:focus-visible, .cloud-card input:focus { outline-color: var(--brand); }
:root[data-theme="dark"] :focus-visible { outline-color: var(--brand); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :focus-visible { outline-color: var(--brand); } }
.nav a.active, .set-tab.active, .view-row.active, .pl-item.active { background: var(--brand-soft); }
.nav a.active, .set-tab.active, .view-row.active .view-name, .pl-item.active .pl-pick, .tab.active, .seg-btn.on { color: var(--brand); }
.tab.active { border-bottom-color: var(--brand); }
.stage.visited, .avatar, .file-ico, .provider-tag, .cal-chip, .cal-more, .cal-icon.ph, .status-pill.open, .badge.low, button.bk-day { background: var(--brand-soft); color: var(--brand); }
.deal-card:hover, .au-row:hover, .au-tplcard:hover, .cal-cell:not(.off):hover, .dropzone:hover { border-color: var(--brand); }
.cal-cell.sel { border-color: var(--brand); background: var(--brand-soft); }
@media (max-width: 720px) {
  .nav a.active, .nav-more.active, .nav-more[aria-expanded="true"] { background: none; color: var(--brand); }
  .nav a.active::before, .nav-more.active::before { background: var(--brand); }
}

/* Dashboard KPI cards: a tint and a thin top line per metric */
.kpi { --k: var(--brand); position: relative; background: color-mix(in srgb, var(--k) 9%, var(--surface)); border-color: color-mix(in srgb, var(--k) 24%, var(--border)); box-shadow: inset 0 3px 0 var(--k); }
.kpi .label { color: color-mix(in srgb, var(--k) 70%, var(--text)); }
/* every metric uses the same brand purple */
.kpi, .kpi.k-brand, .kpi.k-blue, .kpi.k-good, .kpi.k-warn, .kpi.k-teal { --k: var(--brand); }
.fc-bar.weighted { background: var(--brand); }

/* Team rows: avatar + name take the free space; role picker and buttons keep their own size */
.team-list li > .grow { flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }
.team-list li > select { width: auto; min-width: 110px; flex: none; }
.team-list li > .btn, .team-list li > .badge { flex: none; white-space: nowrap; }

/* Marketing: Email / Social media switch */
.mk-channels { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 960px; margin: 0 0 16px; }
@media (max-width: 900px) { .mk-channels { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .mk-channels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mk-blank { min-height: 220px; display: grid; place-content: center; text-align: center; }

/* ------------------------------------------------------------------ AI Content Planner (Marketing -> Social media) */
.soc-loading { padding: 30px 4px; }
.soc-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.soc-top .tabs { margin-bottom: 0; border-bottom: 0; flex-wrap: wrap; }
.soc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.soc-actions .btn[disabled] { opacity: .5; cursor: not-allowed; }
.soc-note { display: flex; flex-direction: row; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 14px; border-style: solid; padding: 12px 14px; font-size: 14px; }
.soc-busy { justify-content: flex-start; background: var(--brand-soft); }
.soc-fail { background: var(--bad-weak); }
.soc-spin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--brand); animation: soc-spin 0.9s linear infinite; flex: none; }
@keyframes soc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .soc-spin { animation-duration: 3s; } }
.soc-empty { margin-bottom: 14px; }

/* intro + questionnaire */
.soc-intro { max-width: 640px; text-align: left; }
.soc-intro-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--brand-soft); color: var(--brand); margin-bottom: 12px; }
.soc-points { margin: 10px 0 18px; padding-left: 20px; color: var(--muted); line-height: 1.7; }
.soc-wiz { max-width: 680px; }
.soc-prog { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-bottom: 10px; border: 1px solid var(--border); }
.soc-prog i { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width .2s; }
.soc-step { margin: 0 0 4px; }
.soc-fields { margin: 16px 0 6px; gap: 16px; }
.soc-lab { font-size: 12px; font-weight: 600; color: var(--muted); }
.req { color: var(--bad); }
.soc-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.soc-opt { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer; font-size: 14px; }
.soc-opt:hover { border-color: var(--brand); }
.soc-opt.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.soc-chk input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.soc-chk:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.soc-mix { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.soc-err { color: var(--bad); font-weight: 600; margin: 8px 0 0; }
.soc-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.soc-nav .btn { min-width: 110px; justify-content: center; }

/* calendar */
.soc-calbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.soc-calbar h3 { font-size: 17px; min-width: 150px; text-align: center; }
.soc-viewsw { margin-left: auto; margin-bottom: 0; width: 170px; grid-template-columns: 1fr 1fr; padding: 3px; }
.soc-viewsw .seg-btn { min-height: 34px; }
.soc-grid { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.soc-dow { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.soc-dow span { padding: 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.soc-cells { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.soc-cell { min-height: 112px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; }
.soc-cell:nth-child(7n) { border-right: 0; }
.soc-cell.off { background: var(--surface-2); cursor: default; }
.soc-cell:not(.off):hover { background: var(--brand-soft); }
.soc-cell.today .soc-dn { background: var(--brand); color: var(--surface); }
.soc-dn { font-size: 12px; font-weight: 700; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 999px; color: var(--muted); }
.soc-ch { display: flex; align-items: center; gap: 5px; width: 100%; padding: 3px 5px; border: 0; border-left: 3px solid var(--border); border-radius: 5px; background: var(--surface-2); color: var(--text); font-size: 11px; text-align: left; cursor: pointer; min-width: 0; }
.soc-ch b { font-size: 10px; color: var(--muted); flex: none; }
.soc-ch span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soc-ch.st-approved { border-left-color: var(--good); } .soc-ch.st-draft { border-left-color: var(--brand); } .soc-ch.st-rejected { border-left-color: var(--bad); opacity: .55; text-decoration: line-through; }
.soc-ch.stg-published { opacity: .7; }
.soc-more { border: 0; background: none; color: var(--brand); font-size: 11px; font-weight: 700; text-align: left; padding: 2px 4px; cursor: pointer; }
.soc-legend { display: flex; gap: 14px; align-items: center; margin-top: 10px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; background: var(--border); }
.dot.st-draft { background: var(--brand); } .dot.st-approved { background: var(--good); } .dot.st-rejected { background: var(--bad); }
.soc-hide { display: none; }
.soc-mob { display: none; }
.soc-agenda { display: flex; flex-direction: column; gap: 6px; }
.soc-day h4 { font-size: 13px; margin: 14px 0 8px; color: var(--muted); }
.soc-day .soc-card { margin-bottom: 8px; }
.soc-none { padding: 20px 0; }

/* post cards */
.soc-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.soc-card { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.soc-card.st-approved { border-left-color: var(--good); } .soc-card.st-rejected { border-left-color: var(--bad); opacity: .7; }
.soc-card-h { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.soc-pl { font-weight: 700; font-size: 13px; }
.soc-b { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.soc-b.s-approved { background: var(--good-weak); color: var(--good); border-color: transparent; } .soc-b.s-rejected { background: var(--bad-weak); color: var(--bad); border-color: transparent; }
.soc-b.s-draft { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.soc-b.g-published { background: var(--good-weak); color: var(--good); border-color: transparent; } .soc-b.g-ready { background: var(--warn-weak); color: var(--warn); border-color: transparent; } .soc-b.g-recorded { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.soc-title { border: 0; background: none; padding: 0; text-align: left; font-weight: 650; font-size: 15px; color: var(--text); cursor: pointer; line-height: 1.3; }
.soc-title:hover { color: var(--brand); text-decoration: underline; }
.soc-when { margin: 0; } .soc-cap { margin: 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.soc-card-a { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 2px; }
.soc-filters input[type=search] { flex: 1 1 200px; }

/* editor */
.soc-ed .grid2 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.soc-video { border: 1px solid var(--border); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 12px; margin: 0; background: var(--surface-2); }
.soc-video legend { font-weight: 700; padding: 0 6px; color: var(--brand); }
.soc-scene { display: grid; grid-template-columns: 1fr 34px; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; background: var(--surface); position: relative; }
.soc-scene .soc-sn { grid-column: 1; font-size: 12px; color: var(--brand); }
.soc-scene .soc-sf { grid-column: 1; display: flex; flex-direction: column; gap: 8px; } .soc-scene .icon-btn { grid-row: 1; grid-column: 2; }
.soc-prog-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: end; }
.soc-seg3 { grid-template-columns: repeat(3, 1fr); max-width: none; margin: 0; }
.soc-metrics { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin: 0; } .soc-metrics legend { font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 6px; }
.soc-regen { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 10px; border: 1px dashed var(--brand); border-radius: 10px; background: var(--brand-soft); }
.soc-regen[hidden] { display: none; } .soc-regen .field { flex: 1 1 220px; }
.soc-ed-a { flex-wrap: wrap; } .soc-ed-a .grow { flex: 1; }

/* automation + profile */
.soc-auto { max-width: 760px; margin-bottom: 14px; } .soc-runs { max-width: 760px; } .soc-runs h3 { margin-bottom: 10px; }
.soc-runs li { padding: 8px 0; border-top: 1px solid var(--border); } .soc-runs li:first-child { border-top: 0; }
.soc-switch { display: flex; align-items: center; gap: 10px; font-weight: 650; min-height: 44px; cursor: pointer; } .soc-switch input { width: 20px; height: 20px; }
.soc-prof-h { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 8px; }
.soc-prof { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 24px; }
.soc-kv dt { font-size: 12px; font-weight: 600; color: var(--muted); } .soc-kv dd { margin: 2px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }

@media (max-width: 720px) {
  .soc-desk { display: none; } .soc-mob { display: flex; }
  .soc-viewsw { display: none; }
  .soc-top { flex-direction: column; align-items: stretch; } .soc-top > * { min-width: 0; max-width: 100%; }
  .soc-top .tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; } .soc-top .tabs .tab { white-space: nowrap; flex: none; }
  .soc-actions .btn { flex: 1; justify-content: center; }
  .soc-calbar { justify-content: space-between; } .soc-calbar h3 { order: -1; width: 100%; text-align: left; }
  .soc-calbar .btn { flex: 1; justify-content: center; }
  .soc-lib { grid-template-columns: 1fr; }
  .soc-card-a .btn { flex: 1 1 auto; justify-content: center; } .soc-stage-old { margin-left: 0; flex: 1 1 100%; min-height: 44px; }
  .soc-nav .btn { flex: 1; }
  .soc-note.soc-fail { flex-direction: column; align-items: stretch; }
  .soc-opt { min-height: 44px; }
  .soc-ed-a .btn { flex: 1 1 45%; justify-content: center; } .soc-ed-a .grow { display: none; }
  .soc-prof { grid-template-columns: 1fr; }
}

/* Design studio */
.soc-studio { max-width: 1100px; margin-bottom: 14px; } .soc-studio h2 { margin-bottom: 6px; }
.soc-launch { max-width: 520px; margin-top: 12px; }
.soc-studio-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; } .soc-studio-bar b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soc-frame { display: block; width: 100%; height: min(78vh, 900px); min-height: 520px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); margin-bottom: 8px; }
.soc-h3 { font-size: 14px; margin: 16px 0 10px; }
.soc-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.soc-thumbs figure { position: relative; margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.soc-thumbs figure > a { display: block; aspect-ratio: 4 / 5; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.soc-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.soc-pdf { display: grid; place-items: center; width: 100%; height: 100%; font-weight: 800; color: var(--brand); background: var(--brand-soft); }
.soc-thumbs figcaption { font-size: 12px; font-weight: 600; overflow-wrap: anywhere; line-height: 1.25; } .soc-thumbs figcaption small { display: block; font-weight: 400; color: var(--muted); }
.soc-thumbs .icon-btn { position: absolute; top: 8px; right: 8px; background: var(--surface); border: 1px solid var(--border); width: 28px; height: 28px; border-radius: 50%; }
.soc-designs { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin: 0; display: flex; flex-direction: column; gap: 10px; } .soc-designs legend { font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 6px; }
@media (max-width: 720px) { .soc-frame { height: calc(100dvh - 250px); min-height: 480px; } .soc-thumbs { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); } .soc-thumbs .icon-btn { width: 36px; height: 36px; } }

/* Brand look (logo + two colours) */
.soc-logo { display: flex; flex-direction: column; gap: 8px; }
.soc-logo-box { width: 100%; max-width: 260px; height: 120px; overflow: hidden; border: 1px dashed var(--border); border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #fff; padding: 10px; }
.soc-logo-box img { display: block; width: auto; height: auto; max-width: 100%; max-height: 98px; object-fit: contain; }
.soc-logo-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.soc-colour { display: flex; align-items: center; gap: 10px; }
.soc-colour input[type=color] { width: 52px; height: 44px; padding: 2px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; }
.soc-colour input[type=text] { width: 120px; font-family: ui-monospace, Menlo, monospace; text-transform: uppercase; }
.soc-kit-prev { margin-top: 12px; border-radius: 12px; padding: 22px 20px; background: linear-gradient(135deg, var(--p), color-mix(in srgb, var(--p) 45%, #000)); color: #fff; display: flex; flex-direction: column; gap: 4px; max-width: 420px; }
.soc-kit-prev i { display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--s); margin-bottom: 8px; }
.soc-kit-prev b { font-size: 18px; } .soc-kit-prev span { opacity: .85; font-size: 13px; }
.soc-kit { max-width: 760px; margin-bottom: 14px; }

.soc-logo-img { background-position: center; background-size: contain; background-repeat: no-repeat; }

/* ---- Content Studio: one guided path (set up -> calendar -> review -> create -> approve -> publish) */
.btn.big { min-height: 48px; padding: 0 22px; font-size: 16px; font-weight: 700; justify-content: center; }
.soc-howto { list-style: none; padding: 0; margin: 14px 0 18px; display: grid; gap: 12px; counter-reset: h; }
.soc-howto li { display: grid; grid-template-columns: 32px 1fr; column-gap: 12px; align-items: center; counter-increment: h; }
.soc-howto li::before { content: counter(h); grid-row: span 2; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 800; display: grid; place-items: center; }
.soc-howto span { color: var(--muted); font-size: 13px; }
.soc-help { display: block; margin: -2px 0 2px; }
.soc-flow { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.soc-flow li { display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.2; }
.soc-flow li i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.soc-flow li small { display: block; font-weight: 500; font-size: 11px; margin-top: 1px; }
.soc-flow li.done i { background: var(--good-weak); color: var(--good); border-color: transparent; }
.soc-flow li.now { color: var(--text); } .soc-flow li.now i { background: var(--brand); color: #fff; border-color: var(--brand); }
.soc-next { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; border-left: 4px solid var(--brand); }
.soc-next h2 { font-size: 18px; margin: 0 0 4px; } .soc-next p { margin: 0; }
.soc-next.done { border-left-color: var(--good); }
.soc-next-a { display: flex; gap: 8px; flex-wrap: wrap; }
.soc-reviewlist { margin-bottom: 18px; display: grid; gap: 10px; }
.soc-card-m { display: flex; gap: 10px; align-items: flex-start; }
.soc-card-m > div { min-width: 0; flex: 1; }
.soc-thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex: none; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; font-size: 24px; }
.soc-kind { font-size: 12px; font-weight: 700; color: var(--muted); }
.soc-b.s-idea { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.soc-b.g-not_started { background: var(--surface-2); color: var(--muted); }
.soc-b.g-in_progress { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.soc-b.g-review { background: var(--warn-weak); color: var(--warn); border-color: transparent; }
.soc-b.g-approved, .soc-b.g-published { background: var(--good-weak); color: var(--good); border-color: transparent; }
.soc-ch.pg-in_progress { border-left-color: var(--brand); } .soc-ch.pg-review { border-left-color: var(--warn); } .soc-ch.pg-approved, .soc-ch.pg-published { border-left-color: var(--good); } .soc-ch.pg-published { opacity: .7; }
.dot.pg-in_progress { background: var(--brand); } .dot.pg-review { background: var(--warn); } .dot.pg-approved, .dot.pg-published { background: var(--good); }
.soc-legend .dot { margin-left: 10px; } .soc-legend .dot:first-child { margin-left: 0; }
.soc-pre dd { white-space: pre-wrap; } .soc-idea-a { flex-wrap: wrap; } .soc-idea h2 { margin: 8px 0 2px; }
.soc-more-opt { margin: 4px 0 8px; } .soc-more-opt summary { cursor: pointer; font-weight: 600; color: var(--brand); min-height: 32px; }
.soc-rad input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; } .soc-rad:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
/* the workspace */
.soc-work { display: flex; flex-direction: column; }
.soc-work-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.soc-work-t { display: flex; flex-direction: column; min-width: 0; } .soc-work-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soc-steps { list-style: none; display: flex; gap: 4px; padding: 0; margin: 0 0 8px; overflow-x: auto; scrollbar-width: none; }
.soc-steps li { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); padding: 4px 12px 4px 4px; border-radius: 99px; white-space: nowrap; }
.soc-steps li i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; background: var(--surface-2); border: 1px solid var(--border); }
.soc-steps li.done i { background: var(--good-weak); color: var(--good); border-color: transparent; }
.soc-steps li.now { color: var(--text); background: var(--brand-soft); } .soc-steps li.now i { background: var(--brand); color: #fff; border-color: var(--brand); }
.soc-hint { color: var(--muted); margin: 0 0 10px; font-size: 14px; }
.soc-link { background: none; border: 0; padding: 0; margin-left: 6px; color: var(--brand); text-decoration: underline; cursor: pointer; font: inherit; }
.soc-stage { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.soc-stage .soc-frame { border: 0; border-radius: 0; }
.soc-bar { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; justify-content: flex-end; align-items: center; padding: 12px 0 4px; margin-top: 12px; background: var(--bg); border-top: 1px solid var(--border); }
.soc-bar .btn { min-width: 120px; justify-content: center; }
.soc-bar .soc-spin { margin-right: 8px; }
.soc-prev { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; padding: 18px; }
.soc-prev figure { margin: 0; flex: 1 1 260px; max-width: 440px; }
.soc-prev.multi figure { max-width: 300px; }
.soc-prev img, .soc-prev video { width: 100%; display: block; border-radius: 8px; border: 1px solid var(--border); background: #000; max-height: 72vh; object-fit: contain; }
.soc-prev figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.soc-prev .file { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 160px; } .soc-prev .file .soc-pdf { height: 80px; }
.soc-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 18px; }
.soc-dl-files { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; } .soc-dl-files > .btn { margin-top: 12px; }
.soc-file { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); width: 100%; }
.soc-file img, .soc-file .soc-pdf { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; flex: none; border: 1px solid var(--border); }
.soc-file > div { flex: 1; min-width: 0; } .soc-file b { display: block; overflow-wrap: anywhere; font-size: 14px; } .soc-file small { color: var(--muted); }
.soc-dl-cap h3 { font-size: 14px; margin: 0 0 8px; }
.soc-capbox { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px; font: inherit; font-size: 14px; margin: 0 0 10px; max-height: 260px; overflow: auto; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .soc-dl { grid-template-columns: 1fr; padding: 14px; }
  .soc-flow li { font-size: 11px; } .soc-flow li i { width: 24px; height: 24px; }
  .soc-next { flex-direction: column; align-items: stretch; } .soc-next-a .btn { flex: 1; }
  .soc-bar { gap: 8px; bottom: calc(57px + env(safe-area-inset-bottom)); } .soc-bar .btn { flex: 1; min-width: 0; padding-left: 10px; padding-right: 10px; }
  .soc-prev { padding: 12px; }
  .soc-stage .soc-frame { height: calc(100dvh - 330px); min-height: 460px; }
}
.soc-idea .soc-prof { margin: 14px 0; } .soc-idea-a { margin-top: 16px; }
#modal .muted + .form { margin-top: 14px; }
.soc-suggest { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; } .soc-sw { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); display: inline-block; }

/* ---- AI pictures: the create screen */
.soc-gen-grid { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; } .soc-gen-brief { flex: 1 1 340px; max-width: 460px; min-width: 0; } .soc-gen-result { flex: 2 1 340px; min-width: 0; }
.soc-gen-brief h2 { margin-bottom: 4px; } .soc-gen-brief .field { margin-top: 14px; }
.soc-gen-refs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.soc-gen-refs figure { position: relative; margin: 0; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.soc-gen-refs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.soc-gen-refs .icon-btn { position: absolute; top: 3px; right: 3px; width: 26px; height: 26px; min-height: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 50%; padding: 0; line-height: 1; }
.soc-gen-add { width: 84px; height: 84px; border: 2px dashed var(--border); border-radius: 10px; background: none; color: var(--muted); font-weight: 600; cursor: pointer; font-size: 13px; }
.soc-gen-add:hover { border-color: var(--brand); color: var(--brand); }
.soc-gen-go { flex-wrap: wrap; margin-top: 14px; }
.soc-gen-result { min-height: 380px; display: flex; flex-direction: column; gap: 12px; }
.soc-gen-img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); display: block; }
.soc-gen-wait, .soc-gen-empty { flex: 1; display: grid; place-content: center; justify-items: center; text-align: center; gap: 8px; padding: 40px 16px; }
.soc-gen-wait .soc-spin { width: 34px; height: 34px; }
.soc-gen-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 22px; }
.soc-gen-hist { display: flex; gap: 8px; flex-wrap: wrap; }
.soc-gen-h { width: 64px; height: 80px; padding: 0; border: 2px solid var(--border); border-radius: 8px; overflow: hidden; background: none; cursor: pointer; } .soc-gen-h.on { border-color: var(--brand); } .soc-gen-h img { width: 100%; height: 100%; object-fit: cover; display: block; }
.soc-gen-act { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 860px) { .soc-gen-brief { max-width: none; } .soc-gen-act .btn { flex: 1 1 45%; justify-content: center; } .soc-gen-act .btn.big { flex: 1 1 100%; } }

/* ---- brand onboarding and the Brand tab */
.soc-wiz { max-width: 820px; } .soc-wiz-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; } .soc-pct { font-weight: 700; color: var(--brand); font-size: 13px; }
.soc-secs { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 12px; scrollbar-width: none; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.soc-sec { display: flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px; border: 1px solid var(--border); border-radius: 99px; background: var(--surface); color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; min-height: 40px; }
.soc-sec i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.soc-sec.done i { background: var(--good-weak); color: var(--good); border-color: transparent; } .soc-sec.now { color: var(--text); background: var(--brand-soft); border-color: var(--brand); } .soc-sec.now i { background: var(--brand); color: #fff; border-color: var(--brand); }
.soc-nav { flex-wrap: wrap; } .soc-ok { background: var(--good-weak); }
.soc-libsec { padding: 14px 0; border-top: 1px solid var(--border); } .soc-libsec:first-child { border-top: 0; }
.soc-libh { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; } .soc-libh p { margin: 2px 0 0; }
.soc-libitems { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.soc-libitems figure { position: relative; margin: 0; width: 92px; height: 92px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); } .soc-libitems img { width: 100%; height: 100%; object-fit: cover; display: block; }
.soc-libitems .icon-btn { position: absolute; top: 3px; right: 3px; width: 26px; height: 26px; min-height: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 50%; line-height: 1; }
.soc-libfile { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); min-width: 220px; } .soc-libfile > span { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 12px; } .soc-libfile b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; } .soc-libfile .icon-btn { background: none; border: 0; min-height: 0; }
.soc-brand { display: grid; gap: 14px; } .soc-bps { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.soc-bp h3 { font-size: 15px; margin: 0 0 8px; } .soc-bp p { margin: 0 0 8px; } .soc-ul { margin: 4px 0 8px; padding-left: 18px; display: grid; gap: 3px; font-size: 14px; }
.soc-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; } .soc-chip { padding: 2px 10px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 600; }
.soc-swatches { display: flex; gap: 8px; margin: 6px 0; } .soc-swatches i { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); display: inline-block; }
.soc-persona { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin: 8px 0; background: var(--surface-2); }
.soc-pillar { margin: 10px 0; } .soc-pl-h { display: flex; justify-content: space-between; } .soc-bar-s { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: 4px 0; } .soc-bar-s i { display: block; height: 100%; background: var(--brand); }
@media (max-width: 720px) { .soc-bps { grid-template-columns: 1fr; } .soc-nav .btn { flex: 1 1 45%; justify-content: center; } .soc-nav .btn.primary { flex: 1 1 100%; } }

/* Content strategy */
.soc-strat-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.soc-strat h2 { margin: 0 0 2px; font-size: 20px; }
.soc-strat-a { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.soc-strat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin: 14px 0; }
.soc-strat-grid .card { margin: 0; } .soc-strat-grid h3 { margin: 0 0 8px; font-size: 15px; }
.soc-pil { padding: 8px 0; border-top: 1px solid var(--border); } .soc-pil:first-of-type { border-top: 0; padding-top: 0; } .soc-pil p { margin: 3px 0 0; }
.soc-ul { margin: 6px 0; padding-left: 18px; list-style: disc; } .soc-ul li { margin: 2px 0; }
.soc-bar { display: grid; grid-template-columns: minmax(90px, 1.1fr) 2fr auto; align-items: center; gap: 8px; margin: 6px 0; font-size: 13px; }
.soc-bar i { display: block; height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); position: relative; overflow: hidden; }
.soc-bar i::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--brand); border-radius: inherit; }
.soc-bar b { font-weight: 700; white-space: nowrap; }
.soc-cat { background: var(--surface-2); }
.soc-cat.c-educational { background: var(--brand-soft); color: var(--brand); } .soc-cat.c-promotional { background: var(--warn-weak); color: var(--warn); }
.soc-cat.c-trust { background: var(--good-weak); color: var(--good); } .soc-cat.c-engagement { background: var(--brand-soft); color: var(--brand); }
.soc-brief { margin: 10px 0; } .soc-brief summary { cursor: pointer; font-weight: 700; margin-bottom: 4px; }
.soc-asfmt { display: inline-flex; gap: 6px; align-items: center; }
.soc-briefed .field { margin-top: 8px; }
@media (max-width: 720px) { .soc-flow { grid-template-columns: repeat(7, minmax(46px, 1fr)); overflow-x: auto; } .soc-flow li small { display: none; } }

/* AI pictures: versions to compare, exact-size preview with the real logo, usage card */
.soc-vers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.soc-ver { display: flex; flex-direction: column; gap: 6px; padding: 6px; text-align: left; border: 2px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; font: inherit; color: inherit; }
.soc-ver.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); } .soc-ver.run, .soc-ver.bad { cursor: default; }
.soc-ver-img { aspect-ratio: 4 / 5; border-radius: 8px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; text-align: center; padding: 6px; }
.soc-ver-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.soc-ver-m { display: flex; flex-direction: column; gap: 2px; } .soc-ver-m b { font-size: 13px; }
.soc-gen-frame { position: relative; width: 100%; max-width: 520px; margin: 0 auto 8px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.soc-gen-frame .soc-gen-img { width: 100%; height: 100%; max-height: none; object-fit: cover; border: 0; border-radius: 0; position: absolute; inset: 0; }
.soc-gen-logo { position: absolute; width: 20%; height: auto; } .soc-gen-logo.p-br { right: 4.5%; bottom: 4.5%; } .soc-gen-logo.p-bl { left: 4.5%; bottom: 4.5%; } .soc-gen-logo.p-tr { right: 4.5%; top: 4.5%; } .soc-gen-logo.p-tl { left: 4.5%; top: 4.5%; } .soc-gen-logo.p-bc { left: 40%; bottom: 4.5%; }
.soc-gen-edit, .soc-gen-logoo { margin-top: 12px; } .soc-gen-editrow { display: flex; gap: 8px; } .soc-gen-editrow input { flex: 1; min-width: 0; }
.soc-picset .tablewrap { margin: 8px 0 14px; overflow-x: auto; } .soc-picset .table th, .soc-picset .table td { text-align: left; padding: 6px 8px; font-size: 13px; vertical-align: top; }

.soc-scenes { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; } .soc-scene { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; background: var(--surface-2); } .soc-scene .soc-prof { margin: 4px 0 0; }

.soc-shot { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); }
.soc-shot-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; } .soc-shot-h b { margin-right: 4px; }
.soc-shot .soc-prof { grid-template-columns: 1fr; gap: 8px; margin: 0; }
.soc-shots { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 10px; }

/* Accounting */
.acc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.acc-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.acc-stat span { font-size: 12px; font-weight: 600; color: var(--muted); }
.acc-stat b { font-size: 22px; letter-spacing: -.01em; }
.acc-stat small { color: var(--muted); font-size: 12px; }
.acc-stat.bad b { color: var(--bad); }
.acc-notice { margin-bottom: 16px; }
.acc-filters { margin-bottom: 12px; }
.acc-card { padding: 6px 4px; }
.acc-table-wrap { overflow-x: auto; }
.acc-table { width: 100%; border-collapse: collapse; }
.acc-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.acc-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.acc-table tr:last-child td { border-bottom: 0; }
.acc-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.acc-table td small { display: block; color: var(--muted); font-size: 12px; }
.acc-row { cursor: pointer; }
.acc-row:hover, .acc-row:focus-visible { background: var(--surface-2); outline: none; }
.acc-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.acc-badge.paid, .acc-badge.accepted { background: var(--good-weak); color: var(--good); border-color: transparent; }
.acc-badge.sent { background: var(--accent-weak); color: var(--accent); border-color: transparent; }
.acc-badge.overdue, .acc-badge.declined { background: var(--bad-weak); color: var(--bad); border-color: transparent; }
.acc-badge.void { text-decoration: line-through; }
.acc-deal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.acc-deal-head h2 { margin: 0; }
.acc-deal-new { display: flex; gap: 6px; flex-wrap: wrap; }
.acc-docbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0 16px; }
.acc-docbar-l .muted { margin-top: 2px; font-size: 13px; }
.acc-docbar-r { display: flex; gap: 6px; flex-wrap: wrap; }
.acc-paper { background: #e9ebf0; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 12px; overflow-x: auto; }
.acc-paper .acc-sheet { box-shadow: 0 6px 24px rgba(20, 24, 40, .14); border-radius: 4px; }
.acc-form .field input, .acc-form .field textarea, .acc-form .field select { width: 100%; }
.acc-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.acc-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.acc-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.acc-kinds { display: flex; gap: 6px; flex-wrap: wrap; }
.acc-kind { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.acc-kind.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.acc-lines { display: flex; flex-direction: column; gap: 6px; }
.acc-line { display: grid; grid-template-columns: minmax(0, 1fr) 64px 92px 62px 62px 30px; gap: 6px; align-items: center; }
.acc-line-h { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.acc-totals { margin-left: auto; width: min(300px, 100%); display: flex; flex-direction: column; gap: 3px; }
.acc-totals div { display: flex; justify-content: space-between; }
.acc-totals .grand { border-top: 1px solid var(--border); padding-top: 6px; margin-top: 3px; font-size: 16px; }
@media (max-width: 720px) {
  .acc-grid2, .acc-grid3, .acc-grid4 { grid-template-columns: 1fr; }
  .acc-line-h { display: none; }
  .acc-line { grid-template-columns: 1fr 1fr 1fr 30px; }
  .acc-line > input:first-child { grid-column: 1 / -1; }
  .acc-table thead { display: none; }
  .acc-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
  .acc-table td { border: 0; padding: 0; }
  .acc-table td[data-label="Date"] { color: var(--muted); font-size: 12px; }
  .acc-table td.num { text-align: right; }
}

/* Publishing and paid ads (Zernio) */
.zn-tabs { align-items: center; margin-bottom: 14px; }
.zn-tabs .grow, .zn-row .grow, .zn-th-h .grow { flex: 1; }
.zn-warn { background: var(--bad) !important; color: #fff !important; }
.zn-notice { margin-bottom: 14px; }
.zn-card { margin-bottom: 14px; }
.zn-card > h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.zn-filters { margin-bottom: 12px; }
.zn-filters select, .zn-filters input { width: auto; max-width: 100%; }
.zn-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.zn-stats-s { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); margin-bottom: 0; }
.zn-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.zn-stat span { font-size: 12px; font-weight: 600; color: var(--muted); }
.zn-stat b { font-size: 20px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.zn-stat small { color: var(--muted); font-size: 12px; }
.zn-stat.bad b { color: var(--bad); }
.zn-up { color: var(--good); } .zn-down { color: var(--bad); }
.zn-small { font-size: 12px; }
.zn-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.zn-row:first-of-type { border-top: 0; }
.zn-row .num { font-variant-numeric: tabular-nums; }
.zn-click { cursor: pointer; } .zn-click:hover, .zn-click:focus-visible { background: var(--surface-2); outline: none; }
.zn-av { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); }
.zn-av-t { display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--muted); border: 1px solid var(--border); }
.zn-pl { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 5px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); font-size: 10px; font-weight: 800; color: var(--muted); flex: none; }
.zn-icons { display: inline-flex; gap: 3px; }
.zn-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.zn-badge.published { background: var(--good-weak); color: var(--good); border-color: transparent; }
.zn-badge.scheduled, .zn-badge.publishing, .zn-badge.pending_approval { background: var(--accent-weak); color: var(--accent); border-color: transparent; }
.zn-badge.failed, .zn-badge.partial { background: var(--bad-weak); color: var(--bad); border-color: transparent; }
.zn-warnl { color: var(--warn); font-size: 12px; margin-top: 2px; } .zn-need { display: block; color: var(--warn); }
.zn-inl { padding: 4px 8px; font-size: 12px; margin-top: 3px; }
.zn-h3 { font-size: 13px; margin: 14px 0 4px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.zn-actions { flex-wrap: wrap; }
.zn-connect { display: flex; gap: 8px; flex-wrap: wrap; }
.zn-tz { margin-top: 8px; }
.zn-ai { border: 1px dashed var(--accent); background: var(--accent-weak); border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-size: 13px; }
.zn-ai-t { margin-top: 6px; color: var(--text); }
/* calendar */
.zn-calhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.zn-calnav { display: flex; align-items: center; gap: 6px; } .zn-calnav h2 { margin: 0 0 0 8px; font-size: 18px; }
.zn-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 0 4px 4px; }
.zn-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.zn-day { min-height: 104px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 4px; display: flex; flex-direction: column; gap: 3px; cursor: cell; min-width: 0; }
.zn-day.out { opacity: .5; } .zn-day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.zn-day:hover { background: var(--surface-2); } .zn-over-day { outline: 2px dashed var(--accent); outline-offset: -2px; }
.zn-dn { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 3px; }
.zn-more { font-size: 11px; text-align: left; padding: 0 3px; }
.zn-chip { display: flex; align-items: center; gap: 4px; font-size: 11px; padding: 3px 5px; border-radius: 6px; background: var(--accent-weak); border-left: 3px solid var(--accent); cursor: pointer; overflow: hidden; min-width: 0; }
.zn-chip.published, .zn-chip.partial { background: var(--good-weak); border-left-color: var(--good); }
.zn-chip.failed { background: var(--bad-weak); border-left-color: var(--bad); }
.zn-chip.draft { background: var(--surface-2); border-left-color: var(--muted); }
.zn-chip.drag { opacity: .4; } .zn-chip[draggable] { cursor: grab; }
.zn-chip-t { font-weight: 700; flex: none; } .zn-chip-c { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.zn-chip .zn-pl { min-width: 16px; height: 16px; font-size: 8px; padding: 0 2px; }
.zn-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.zn-wday { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 4px; min-height: 200px; min-width: 0; }
.zn-wday.today { border-color: var(--accent); } .zn-wh { display: flex; justify-content: space-between; align-items: center; font-size: 12px; gap: 4px; flex-wrap: wrap; }
.zn-none { text-align: center; } .zn-dayv { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
/* composer */
.zn-composer { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
.zn-sec { display: flex; flex-direction: column; gap: 6px; } .zn-lbl { font-size: 12px; font-weight: 600; color: var(--muted); }
.zn-acc-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .zn-acc-group > b { width: 100%; font-size: 12px; }
.zn-acc { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 6px 10px; cursor: pointer; font-size: 13px; }
.zn-acc.on { border-color: var(--accent); background: var(--accent-weak); } .zn-acc.off { opacity: .55; cursor: not-allowed; } .zn-acc input { margin: 0; }
.zn-media { display: flex; gap: 8px; flex-wrap: wrap; }
.zn-mi { position: relative; } .zn-mi .icon-btn { position: absolute; top: 2px; right: 2px; background: var(--surface); width: 22px; height: 22px; }
.zn-th { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); }
.zn-th-v { display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.zn-upl input[hidden] { display: none; } label.zn-upl { cursor: pointer; }
.zn-over { color: var(--bad) !important; font-weight: 700; }
.zn-cust { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; margin-top: 6px; } .zn-cust summary { cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.zn-cust .field { margin-top: 8px; } .zn-tt { border: 1px solid var(--border); border-radius: 10px; padding: 10px; margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.zn-checks { display: flex; gap: 14px; flex-wrap: wrap; }
.zn-when { align-self: flex-start; } .zn-datef { max-width: 280px; }
.zn-prev { position: sticky; top: 0; display: flex; flex-direction: column; gap: 10px; }
.zn-pv { border: 1px solid var(--border); border-radius: 12px; padding: 10px; background: var(--surface); display: flex; flex-direction: column; gap: 6px; }
.zn-pv-h { display: flex; gap: 8px; align-items: center; font-size: 13px; } .zn-pv-h small { display: block; }
.zn-pv-m { width: 100%; max-height: 220px; object-fit: cover; border-radius: 8px; } .zn-pv-t { font-size: 13px; word-break: break-word; white-space: pre-wrap; }
.zn-pv-cta { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--surface-2); border-radius: 8px; padding: 8px 10px; font-size: 13px; } .zn-pv-cta small { display: block; }
.zn-cta { background: var(--accent); color: var(--accent-ink); padding: 5px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.zn-warnl::before { content: ''; }
.zn-detail { display: flex; flex-direction: column; gap: 10px; margin: 8px 0; } .zn-dtext { white-space: pre-wrap; word-break: break-word; } .zn-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.zn-libgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 10px 0; }
.zn-libitem { border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; align-items: center; color: var(--text); font: inherit; } .zn-libitem:hover { border-color: var(--accent); } .zn-libitem .zn-th { width: 100%; height: 80px; }
/* inbox */
.zn-ib { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 12px; align-items: start; }
.zn-ib-l { padding: 6px; max-height: 560px; overflow: auto; } .zn-ib-r { min-height: 280px; }
.zn-conv { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: transparent; border-radius: 8px; padding: 8px; cursor: pointer; color: var(--text); font: inherit; }
.zn-conv:hover, .zn-conv.on { background: var(--surface-2); } .zn-conv small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .zn-conv .grow { min-width: 0; flex: 1; }
.zn-th-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.zn-msgs { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow: auto; margin-bottom: 10px; }
.zn-msg { max-width: 82%; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); font-size: 14px; align-self: flex-start; word-break: break-word; } .zn-msg small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.zn-msg.out { background: var(--accent-weak); align-self: flex-end; }
.zn-reply { display: flex; gap: 8px; align-items: flex-end; margin-top: 6px; } .zn-reply textarea, .zn-reply input { flex: 1; }
.zn-trend { width: 100%; height: 120px; fill: var(--accent); } .zn-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
/* ads */
.zn-ctable td small { display: block; color: var(--muted); font-size: 11px; }
.zn-adset { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; margin: 8px 0; } .zn-adset .zn-row { border: 0; padding: 4px 0; }
.zn-ad { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 10px; padding: 4px 0 4px 14px; font-size: 13px; border-top: 1px dashed var(--border); }
.zn-adacct { border-top: 1px solid var(--border); padding: 4px 0; }
.zn-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 16px; flex-wrap: wrap; } .zn-steps li { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.zn-steps li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border); font-weight: 700; }
.zn-steps li.on { color: var(--text); font-weight: 700; } .zn-steps li.on span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); } .zn-steps li.done span { background: var(--good-weak); color: var(--good); border-color: transparent; }
.zn-wbody { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.zn-pick { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 10px 12px; cursor: pointer; } .zn-pick.on { border-color: var(--accent); background: var(--accent-weak); } .zn-pick.off { opacity: .55; cursor: not-allowed; } .zn-pick small { display: block; }
.zn-seg-g { display: flex; gap: 8px; flex-wrap: wrap; }
.zn-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; } .zn-found { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.zn-tag { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; font-size: 12px; color: var(--text); font: inherit; font-size: 12px; } .zn-tag button { border: 0; background: transparent; cursor: pointer; color: var(--muted); padding: 0; } .zn-tag.add { cursor: pointer; }
.zn-creative { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
.zn-sum { width: 100%; border-collapse: collapse; } .zn-sum th { text-align: left; width: 130px; color: var(--muted); font-size: 12px; font-weight: 600; vertical-align: top; padding: 8px 10px 8px 0; border-top: 1px solid var(--border); } .zn-sum td { padding: 8px 0; border-top: 1px solid var(--border); }
.zn-spend { border: 1px solid var(--warn); background: var(--warn-weak); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; } .zn-spend p { margin: 0; } .zn-confirm p { margin: 0 0 8px; }
.zn-boostpost { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin: 8px 0 12px; font-weight: 400; }
@media (max-width: 900px) {
  .zn-composer, .zn-creative, .zn-ib { grid-template-columns: 1fr; } .zn-prev { position: static; }
  .zn-ib-l { max-height: 220px; }
  .zn-week { grid-template-columns: 1fr; } .zn-wday { min-height: 0; }
}
@media (max-width: 640px) {
  .zn-day { min-height: 64px; } .zn-chip-c, .zn-chip .zn-icons { display: none; } .zn-dow span { text-align: center; }
  .zn-th { width: 68px; height: 68px; }
}

/* Lead generation */
.lg-tabs { margin-bottom: 14px; flex-wrap: wrap; }
.lg-card { margin-bottom: 14px; } .lg-card > h2 { margin-bottom: 12px; }
.lg-filters { margin-bottom: 12px; align-items: center; } .lg-filters select, .lg-filters input[type=search] { width: auto; max-width: 100%; }
.lg-small { font-size: 12px; margin-top: 6px; } .lg-wrap { word-break: break-all; } .lg-grow { flex: 1; min-width: 220px; }
.lg-notice { margin-bottom: 14px; }
.lg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.lg-stat { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; color: var(--text); font: inherit; }
.lg-stat:hover { border-color: var(--accent); } .lg-stat span { font-size: 12px; font-weight: 600; color: var(--muted); } .lg-stat b { font-size: 26px; letter-spacing: -.02em; } .lg-stat small { color: var(--muted); font-size: 12px; }
.lg-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-bottom: 14px; } .lg-cols .lg-card { margin-bottom: 0; } .lg-wide { grid-column: 1 / -1; }
.lg-bar { display: grid; grid-template-columns: minmax(70px, 130px) 1fr auto; gap: 10px; align-items: center; width: 100%; border: 0; background: transparent; padding: 5px 0; text-align: left; color: var(--text); font: inherit; cursor: pointer; }
.lg-bar:hover .lg-bar-l { color: var(--accent); } .lg-bar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.lg-bar-t { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; } .lg-bar-t i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.lg-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); flex-wrap: wrap; } .lg-row:first-of-type { border-top: 0; } .lg-row .grow { flex: 1; min-width: 0; }
.lg-click { cursor: pointer; } .lg-click:hover, .lg-click:focus-visible { background: var(--surface-2); outline: none; }
.lg-cat { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 999px; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.lg-cat.hot { background: var(--bad-weak); color: var(--bad); } .lg-cat.warm { background: var(--warn-weak); color: var(--warn); } .lg-cat.cold { background: var(--accent-weak); color: var(--accent); }
.lg-st { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); } .lg-st.qualified { background: var(--good-weak); color: var(--good); } .lg-st.unqualified { background: var(--surface-2); text-decoration: line-through; }
.lg-badge { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; } .lg-badge.published { background: var(--good-weak); color: var(--good); border-color: transparent; }
.lg-tcard { padding: 4px; } .lg-table td small { display: block; color: var(--muted); font-size: 11px; }
.lg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; } .lg-fcard { display: flex; flex-direction: column; gap: 10px; } .lg-fh { display: flex; gap: 10px; align-items: flex-start; } .lg-fh .grow { flex: 1; min-width: 0; }
.lg-fstats { display: flex; gap: 16px; font-size: 13px; color: var(--muted); flex-wrap: wrap; } .lg-fstats b { color: var(--text); font-size: 16px; } .lg-fa { display: flex; gap: 6px; flex-wrap: wrap; }
.lg-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } .lg-h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 6px; } .lg-kv > div { grid-template-columns: 110px minmax(0, 1fr); }
.lg-why { list-style: none; margin: 0; padding: 0; } .lg-why li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-top: 1px solid var(--border); font-size: 13px; } .lg-why b { color: var(--good); } .lg-why b.neg { color: var(--bad); }
.lg-consent { font-size: 13px; margin: 4px 0; } .lg-actions { flex-wrap: wrap; }
.lg-dealcard { padding: 8px 0; border-top: 1px solid var(--border); } .lg-dealcard:first-of-type { border-top: 0; }
.lg-inline { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin: 8px 0; } .lg-inline .field { min-width: 120px; } .lg-th .field { width: 130px; }
.lg-rule { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); } .lg-rule.off { opacity: .55; } .lg-rule .grow { flex: 1; min-width: 0; }
.lg-pts { font-weight: 800; color: var(--good); min-width: 42px; text-align: right; } .lg-pts.neg { color: var(--bad); }
.lg-trend { width: 100%; height: 130px; } .lg-trend .v { fill: var(--accent); opacity: .45; } .lg-trend .n { fill: var(--good); }
.lg-legend { display: flex; gap: 16px; font-size: 12px; margin-top: 6px; flex-wrap: wrap; } .lg-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; } .lg-legend i.v { background: var(--accent); opacity: .45; } .lg-legend i.n { background: var(--good); }
/* builders */
.lg-edbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; } .lg-edbar .grow { flex: 1; } .lg-name { width: min(280px, 100%); font-weight: 700; }
.lg-edbody { display: grid; grid-template-columns: 200px minmax(0, 1fr) 340px; gap: 12px; align-items: start; } .lg-pgbody { grid-template-columns: 230px minmax(0, 1fr) 340px; }
.lg-pal { padding: 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 8px; max-height: calc(100vh - 24px); overflow: auto; } .lg-pal .lg-h3 { margin: 0 0 4px; }
.lg-pal-i { display: flex; align-items: center; gap: 8px; text-align: left; width: 100%; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 7px 10px; cursor: grab; color: var(--text); font: inherit; font-size: 13px; } .lg-pal-i:hover { border-color: var(--accent); } .lg-pal-i span { width: 22px; text-align: center; color: var(--muted); font-weight: 800; }
.lg-canvas-w { min-width: 0; } .lg-canvas { background: var(--surface-2); border: 1px dashed var(--border); border-radius: var(--radius); padding: 18px; min-height: 320px; }
.lg-field { position: relative; display: flex; gap: 8px; align-items: flex-start; border: 2px solid transparent; border-radius: 10px; padding: 6px; cursor: pointer; } .lg-field:hover { border-color: var(--border); } .lg-field.sel { border-color: var(--accent); background: rgba(127, 127, 255, .06); }
.lg-field .lg-fp { flex: 1; min-width: 0; } .lg-fc { display: flex; gap: 2px; opacity: 0; } .lg-field:hover .lg-fc, .lg-field.sel .lg-fc, .lg-field:focus-within .lg-fc { opacity: 1; } .lg-grip { color: var(--muted); cursor: grab; padding-top: 8px; user-select: none; }
.lg-fields { display: flex; flex-direction: column; gap: 4px; } .lg-empty { text-align: center; color: var(--muted); padding: 30px 10px; border: 2px dashed var(--border); border-radius: 10px; } .lg-hid { font-size: 12px; color: var(--muted); padding: 8px 10px; border: 1px dashed var(--border); border-radius: 8px; }
.drop-before { box-shadow: 0 -3px 0 var(--accent); } .drop-after { box-shadow: 0 3px 0 var(--accent); }
.lg-insp { padding: 12px; display: flex; flex-direction: column; gap: 10px; position: sticky; top: 8px; max-height: calc(100vh - 24px); overflow: auto; } .lg-insp .field input, .lg-insp .field select, .lg-insp .field textarea { width: 100%; } .lg-insp input[type=color] { height: 38px; padding: 2px; }
.lg-segs { max-width: none; margin: 0 0 6px; display: flex; flex-wrap: wrap; } .lg-segs .seg-btn { flex: 1; min-height: 36px; font-size: 13px; padding: 0 8px; }
.lg-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .lg-adv { border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; margin: 6px 0; } .lg-adv summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.lg-cond { border: 1px solid var(--border); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.lg-code { border: 1px solid var(--border); border-radius: 10px; margin: 8px 0; overflow: hidden; } .lg-code-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; background: var(--surface-2); font-size: 12px; } .lg-code pre { margin: 0; padding: 10px; overflow: auto; font-size: 12px; white-space: pre-wrap; word-break: break-all; }
.lg-prevwrap { background: #e9ebf0; border-radius: var(--radius); padding: 14px; display: flex; justify-content: center; overflow: auto; } .lg-prev { border: 0; background: #fff; border-radius: 8px; min-height: 420px; box-shadow: 0 4px 20px rgba(0, 0, 0, .15); } .lg-prevtall { height: 78vh; }
.lg-sec { display: flex; align-items: center; gap: 4px; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 5px 6px; margin-bottom: 4px; cursor: pointer; font-size: 13px; } .lg-sec.sel { border-color: var(--accent); background: var(--accent-weak); } .lg-sec .icon-btn { width: 22px; height: 22px; font-size: 11px; }
.lg-addsec { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; } .lg-item { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--border); border-radius: 8px; padding: 6px; margin-bottom: 6px; position: relative; } .lg-item .icon-btn { position: absolute; right: 4px; top: 4px; } .lg-item input { padding-right: 30px; }
.lg-thumb { width: 100%; max-height: 120px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); margin-bottom: 6px; } .lg-slug { display: flex; align-items: center; gap: 4px; font-size: 13px; } .lg-slug input { flex: 1; }
@media (max-width: 1100px) { .lg-edbody, .lg-pgbody { grid-template-columns: 1fr; } .lg-pal, .lg-insp { position: static; max-height: none; } .lg-pal { flex-direction: row; flex-wrap: wrap; } .lg-pal-i { width: auto; } .lg-addsec { flex-direction: row; flex-wrap: wrap; } }
@media (max-width: 720px) { .lg-grid2 { grid-template-columns: 1fr; } .lg-fc { opacity: 1; } .lg-table thead { display: none; } .lg-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); } .lg-table td { border: 0; padding: 0; } }

/* Inbox */
.view.fill .ib { flex: 1; min-height: 0; }
.ib { display: grid; grid-template-columns: 220px 360px minmax(0, 1fr); gap: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; height: calc(100dvh - 130px); min-height: 480px; }
.ib.collapsed { grid-template-columns: 56px 360px minmax(0, 1fr); }
.ib-loading { display: grid; place-items: center; }
.ib-nav { border-right: 1px solid var(--border); padding: 10px 8px; display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow: auto; background: var(--surface-2); }
.ib-navtop { display: flex; gap: 6px; align-items: center; } .ib-new { flex: 1; display: flex; justify-content: center; gap: 8px; }
.ib-folders { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; } .ib-navbot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--border); padding-top: 6px; }
.ib-folder { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13.5px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.ib-folder:hover { background: var(--surface); } .ib-folder.on { background: var(--accent-weak); color: var(--accent); font-weight: 700; }
.ib-ic { width: 18px; text-align: center; flex: none; font-size: 14px; } .ib-lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-folder .n { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--surface); color: var(--muted); border: 1px solid var(--border); } .ib-folder .n.hot { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.ib.collapsed .ib-lbl, .ib.collapsed .ib-folder .n { display: none; } .ib.collapsed .ib-navtop { flex-direction: column; } .ib.collapsed .ib-new { width: 100%; padding: 8px 0; }
.ib-list { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.ib-lhead { padding: 10px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; } .ib-search input { width: 100%; }
.ib-lbar { display: flex; gap: 6px; align-items: center; } .ib-lbar select { flex: 1; width: auto; min-width: 0; }
.ib-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 4px; } .ib-filters .field { min-width: 0; } .ib-filters .field select, .ib-filters .field input { width: 100%; } .ib-two { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .ib-filters .check, .ib-filters .btn { grid-column: 1 / -1; }
.ib-items { flex: 1; overflow: auto; min-height: 0; }
.ib-item { display: flex; gap: 10px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; padding: 11px 12px; cursor: pointer; }
.ib-item:hover { background: var(--surface-2); } .ib-item.sel { background: var(--accent-weak); } .ib-item.unread .ib-name { font-weight: 800; } .ib-item.unread::before { content: ''; width: 3px; background: var(--accent); margin: -11px 0 -11px -12px; border-radius: 0 3px 3px 0; flex: none; }
.ib-av { position: relative; width: 38px; height: 38px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--muted); flex: none; }
.ib-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; } .ib-av.lg { width: 42px; height: 42px; }
.ib-pl { position: absolute; right: -4px; bottom: -4px; min-width: 18px; height: 18px; padding: 0 3px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); font-size: 9px; font-weight: 800; display: grid; place-items: center; color: var(--muted); }
.ib-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .ib-r1 { display: flex; justify-content: space-between; gap: 8px; } .ib-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; } .ib-time { font-size: 11.5px; color: var(--muted); flex: none; }
.ib-subj { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ib-prev { font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.ib-r3 { display: flex; gap: 6px; align-items: center; margin-top: 2px; } .ib-acct { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.ib-tag { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); } .ib-tag.open { background: var(--good-weak); color: var(--good); border-color: transparent; }
.ib-asg { width: 20px; height: 20px; border-radius: 50%; background: var(--accent-weak); color: var(--accent); font-size: 9px; font-weight: 800; display: grid; place-items: center; } .ib-star { color: #e8a317; font-size: 13px; } .ib-unread { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 10.5px; font-weight: 800; display: grid; place-items: center; }
.ib-more { padding: 10px; text-align: center; } .ib-empty { padding: 36px 18px; text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; } .ib-empty p { margin: 0; } .ib-small { font-size: 12px; }
.ib-conv { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.ib-none { margin: auto; text-align: center; padding: 30px; } .ib-none-i { font-size: 44px; opacity: .25; }
.ib-chead { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; } .ib-back { display: none; }
.ib-ct { flex: 1; min-width: 160px; display: flex; flex-direction: column; } .ib-ct b { font-size: 15px; } .ib-ct .muted { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-ca { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .ib-ca select { width: auto; max-width: 170px; } .ib-ca .icon-btn.on { color: #e8a317; }
.ib-warn { margin: 8px 14px 0; padding: 8px 12px; border-radius: 8px; background: var(--warn-weak); color: var(--warn); font-size: 13px; }
.ib-status { display: flex; gap: 8px; align-items: center; padding: 8px 14px; font-size: 13px; } .ib-subject { font-size: 14px; }
.ib-main { flex: 1; min-height: 0; display: flex; } .ib-msgs { flex: 1; min-width: 0; min-height: 220px; overflow: auto; padding: 6px 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.ib-day { text-align: center; margin: 8px 0 2px; font-size: 11px; color: var(--muted); } .ib-day span { background: var(--surface-2); padding: 2px 10px; border-radius: 999px; }
.ib-sys { text-align: center; font-size: 11.5px; color: var(--muted); }
.ib-msg { display: flex; flex-direction: column; gap: 3px; max-width: 86%; } .ib-msg.email { width: 100%; max-width: 100%; align-self: stretch; } .ib-msg.in { align-self: flex-start; } .ib-msg.out { align-self: flex-end; align-items: flex-end; }
.ib-bubble { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; font-size: 15px; line-height: 1.55; min-width: 120px; max-width: 100%; overflow-wrap: anywhere; } .ib-msg.out .ib-bubble { background: var(--accent-weak); border-color: transparent; } .ib-msg.email .ib-bubble { width: 100%; border-radius: 10px; }
.ib-mh { margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border); font-size: 13px; } .ib-text { white-space: normal; word-break: break-word; }
.ib-mail { width: 100%; border: 0; background: transparent; border-radius: 8px; min-height: 60px; display: block; }
.ib-meta { font-size: 11px; color: var(--muted); } .ib-st.failed { color: var(--bad); font-weight: 700; } .ib-st.read, .ib-st.delivered { color: var(--good); }
.ib-atts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; } .ib-att { border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 4px 9px; font: inherit; font-size: 12px; cursor: pointer; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; } .ib-att img { max-width: 220px; max-height: 160px; border-radius: 6px; }
.ib-note { align-self: stretch; background: #fff8dc; color: #4a3b00; border: 1px dashed #d9b84a; border-radius: 10px; padding: 9px 13px; } .ib-note .muted, .ib-note .ib-meta { color: #7a6420; } .ib-note-h { font-size: 12px; margin-bottom: 3px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ib-note { background: #3a3210; color: #f3e7b0; border-color: #8a7420; } }
:root[data-theme="dark"] .ib-note { background: #3a3210; color: #f3e7b0; border-color: #8a7420; }
.ib-center { text-align: center; padding: 30px; }
.ib-crm { width: 290px; border-left: 1px solid var(--border); overflow: auto; flex: none; background: var(--surface); } .ib-crm.closed { display: none; } .ib-crm-in { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; } .ib-crm h3, .ib-h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 8px 0 2px; }
.ib-card { border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; display: flex; flex-direction: column; gap: 3px; } .ib-card.linked { border-color: var(--accent); } .ib-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; } .ib-crmnote { border-top: 1px solid var(--border); padding-top: 5px; }
.ib-compose { border-top: 1px solid var(--border); background: var(--surface); flex: none; max-height: 52%; overflow: auto; } .ib-cbar { display: flex; gap: 8px; align-items: center; padding: 10px 14px 12px; flex-wrap: wrap; }
.ib-ctabs { display: flex; gap: 2px; padding: 6px 12px 0; } .ib-ctab { border: 0; background: transparent; padding: 7px 12px; font: inherit; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; } .ib-ctab.on { color: var(--accent); border-color: var(--accent); } .ib-ctab.on.note { color: #a07d00; border-color: #d9b84a; }
.ib-cbody { padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 8px; } .ib-cbody.note textarea { background: #fff8dc; color: #3a2f00; } .ib-cbody textarea { width: 100%; resize: vertical; }
.ib-crow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .ib-crow .grow { flex: 1; } .ib-modes .btn { padding: 4px 10px; }
.ib-f { display: flex; align-items: center; gap: 8px; font-size: 13px; } .ib-f span { width: 52px; color: var(--muted); flex: none; } .ib-f input { flex: 1; min-width: 0; } .ib-recip { margin: 0; }
.ib-tools { display: flex; gap: 4px; } .ib-tools button { border: 1px solid var(--border); background: var(--surface); border-radius: 6px; padding: 3px 9px; font: inherit; font-size: 12px; cursor: pointer; color: var(--text); }
.ib-editor { min-height: 90px; max-height: 240px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--field-bg, var(--surface)); outline: none; } .ib-editor:focus { border-color: var(--accent); } .ib-editor:empty::before { content: attr(data-placeholder); color: var(--muted); }
.ib-files { display: flex; gap: 6px; flex-wrap: wrap; } .ib-file { font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 4px 2px 10px; display: inline-flex; align-items: center; gap: 4px; } .ib-file .icon-btn { width: 20px; height: 20px; font-size: 10px; }
.ib-err { color: var(--bad); font-size: 12.5px; } .ib-attach { cursor: pointer; }
.ib-acc { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--border); } .ib-acc .grow { flex: 1; min-width: 0; }
.ib-notif { display: flex; justify-content: space-between; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--border); background: transparent; padding: 10px 4px; font: inherit; color: var(--text); cursor: pointer; } .ib-notif.new { font-weight: 700; }
@media (max-width: 1280px) { .ib-crm { position: absolute; right: 0; top: 0; bottom: 0; z-index: 3; box-shadow: -8px 0 24px rgba(0, 0, 0, .18); } .ib-conv { position: relative; } .ib { grid-template-columns: 200px 320px minmax(0, 1fr); } .ib.collapsed { grid-template-columns: 56px 320px minmax(0, 1fr); } }
@media (max-width: 980px) {
  .ib, .ib.collapsed { grid-template-columns: 1fr; height: calc(100dvh - 150px); } .ib-nav { display: none; } .ib-m-list .ib-conv { display: none; } .ib-m-conv .ib-list { display: none; } .ib-back { display: inline-flex; } .ib-msg { max-width: 96%; }
  .ib-m-list .ib-nav { display: flex; flex-direction: row; overflow-x: auto; padding: 6px; border-right: 0; border-bottom: 1px solid var(--border); } .ib-m-list { grid-template-rows: auto 1fr; } .ib-m-list .ib-folders { flex-direction: row; margin: 0; } .ib-m-list .ib-navtop, .ib-m-list .ib-navbot { display: none; } .ib-m-list .ib-folder { white-space: nowrap; width: auto; } .ib-m-list .ib-folder .ib-ic { display: none; } .ib-m-list .ib-lbl { display: inline; } .ib-m-list .ib-folder .n { display: inline; }
}
/* Inbox sidebar sections */
.ib-folders { overflow-y: auto; min-height: 0; flex: 1; }
.ib-sec { flex: none; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 14px 10px 4px; }
.ib-sec:first-child { padding-top: 6px; }
@media (max-width: 980px) { .ib-sec { display: none; } }

/* WhatsApp Business card */
.wa-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; } .wa-logo { flex: none; border-radius: 8px; }
.wa-acct { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; } .wa-acct-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.wa-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px 16px; margin: 0 0 10px; } .wa-dl dt { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); } .wa-dl dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.wa-modes { border: 0; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 8px; } .wa-mode { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; cursor: pointer; } .wa-mode.on { border-color: var(--accent); background: var(--accent-weak); }
.wa-mode small { display: block; color: var(--muted); margin-top: 2px; line-height: 1.4; } .wa-mode input { margin-top: 3px; } .wa-steps { margin: 6px 0 12px 18px; padding: 0; } .wa-ok { color: var(--good); font-weight: 600; }
.wa-ready { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; } .wa-panel { border: 1px solid var(--border); border-radius: 12px; padding: 4px 16px 12px; margin: 10px 0; } .wa-panel h3 { margin: 12px 0 6px; } .wa-panel h4 { margin: 14px 0 4px; font-size: 13px; } .wa-panel ol, .wa-panel ul { margin: 4px 0 4px 18px; padding: 0; line-height: 1.5; } .wa-links { list-style: disc; }

/* Social Media (one module for Content Studio and Publishing) */
.sm { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.sm-nav { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 2px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.sm-sec { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 10px 4px; } .sm-sec:first-child { padding-top: 4px; }
.sm-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--text); text-decoration: none; font-size: 13.5px; } .sm-link:hover { background: var(--surface-2); } .sm-link.on { background: var(--accent-weak); color: var(--accent); font-weight: 700; }
.sm-ic { width: 18px; text-align: center; flex: none; } .sm-link .n { margin-left: auto; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); } .sm-link .n.hot { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.sm-main { min-width: 0; } .sm-h { margin: 18px 0 8px; font-size: 14px; } .sm-small { font-size: 12px; } .sm-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.sm-chip { display: flex; align-items: center; gap: 5px; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--muted); border-radius: 6px; padding: 2px 6px; margin: 2px 0; font: inherit; font-size: 11.5px; color: var(--text); background: var(--surface-2); cursor: pointer; overflow: hidden; white-space: nowrap; }
.sm-chip .sm-t { font-variant-numeric: tabular-nums; color: var(--muted); } .sm-chip .sm-pl { font-weight: 700; } .sm-chip .sm-x { overflow: hidden; text-overflow: ellipsis; } .sm-chip.idea { border-style: dashed; border-left-style: solid; }
.sm-chip.st-idea, .sm-dot.st-idea { border-left-color: #8a8a96; background-color: rgba(138, 138, 150, .14); } .sm-chip.st-approved, .sm-dot.st-approved { border-left-color: #7c6cf0; background-color: rgba(124, 108, 240, .16); } .sm-chip.st-rejected, .sm-dot.st-rejected { border-left-color: #c46b6b; background-color: rgba(196, 107, 107, .13); text-decoration: line-through; }
.sm-chip.st-draft, .sm-dot.st-draft { border-left-color: #b8a46a; background-color: rgba(184, 164, 106, .16); } .sm-chip.st-pending_approval, .sm-dot.st-pending_approval { border-left-color: #d49a3a; background-color: rgba(212, 154, 58, .16); } .sm-chip.st-scheduled, .sm-chip.st-publishing, .sm-dot.st-scheduled { border-left-color: #4c8df5; background-color: rgba(76, 141, 245, .16); }
.sm-chip.st-published, .sm-chip.st-partial, .sm-dot.st-published { border-left-color: #2ba57b; background-color: rgba(43, 165, 123, .16); } .sm-chip.st-failed, .sm-dot.st-failed { border-left-color: #e0554d; background-color: rgba(224, 85, 77, .16); }
.sm-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 10px; font-size: 12px; color: var(--muted); } .sm-lg { display: inline-flex; align-items: center; gap: 5px; } .sm-dot { width: 10px; height: 10px; border-radius: 3px; border-left: 3px solid; display: inline-block; }
.sm-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: 9px 12px; margin-bottom: 6px; font: inherit; color: var(--text); cursor: pointer; flex-wrap: wrap; } .sm-row:hover { border-color: var(--accent); } .sm-rt { font-weight: 600; flex: 1; min-width: 160px; }
.sm-date { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.sm-post { align-items: flex-start; } .sm-accs { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 3px; } .sm-acc { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; } .sm-pt { overflow-wrap: anywhere; } .sm-ra { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.zn-badge.idea { background: rgba(138, 138, 150, .18); } .zn-badge.approved { background: rgba(124, 108, 240, .2); color: var(--brand, #7c6cf0); } .zn-badge.rejected { background: rgba(196, 107, 107, .18); } .soc-linked { display: flex; gap: 8px; align-items: center; padding: 4px 0; } .zn-brief { margin: 8px 0; }
@media (max-width: 900px) { .sm { grid-template-columns: 1fr; } .sm-nav { position: static; flex-direction: row; overflow-x: auto; gap: 4px; padding: 6px; } .sm-sec { display: none; } .sm-link { white-space: nowrap; } }

/* Customer 360 */
.cu-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 14px; } .cu-bar input[type=search] { flex: 1 1 240px; min-width: 0; }
.cu-seg { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); overflow-x: auto; max-width: 100%; }
.cu-seg button { border: 0; background: transparent; color: var(--muted); padding: 7px 12px; border-radius: 9px; cursor: pointer; font: inherit; font-weight: 600; white-space: nowrap; } .cu-seg button:hover { color: var(--text); }
.cu-seg button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(15, 18, 64, .12); }
.cu-list { display: flex; flex-direction: column; gap: 8px; }
.cu-row { display: grid; grid-template-columns: auto minmax(0, 2.2fr) auto minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.cu-row:hover { border-color: var(--brand, var(--accent)); } .cu-row .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cu-main { min-width: 0; } .cu-main > b { overflow-wrap: anywhere; } .cu-main .small { white-space: normal; }
.cu-av { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-weak); color: var(--brand, var(--accent)); font-weight: 700; font-size: 14px; object-fit: cover; flex: none; }
.cu-av.rect { border-radius: 10px; } .cu-av.xs { width: 30px; height: 30px; font-size: 11px; }
.cu-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--accent-weak); color: var(--brand, var(--accent)); white-space: nowrap; }
.cu-badge.customer { background: var(--good-weak); color: var(--good); } .cu-badge.prospect { background: var(--warn-weak); color: var(--warn); } .cu-badge.inactive { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); } .cu-badge.partner { background: var(--brand-soft, var(--accent-weak)); }
.cu-more { display: flex; justify-content: center; padding: 10px 0; } .cu-empty { text-align: center; padding: 30px; } .cu-back { display: inline-block; margin-bottom: 10px; color: var(--muted); text-decoration: none; font-weight: 600; } .cu-back:hover { color: var(--text); }
.cu-head { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: flex-start; } .cu-id { display: flex; gap: 16px; align-items: center; min-width: 0; flex: 1 1 320px; } .cu-id .cu-av { width: 64px; height: 64px; font-size: 22px; }
.cu-idtext { min-width: 0; } .cu-idtext h1 { margin: 0 0 2px; font-size: 24px; overflow-wrap: anywhere; } .cu-contactline { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; }
.cu-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; } .cu-sel { margin: 0; min-width: 150px; }
.cu-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 12px 0; } .cu-stat { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; background: var(--surface); min-width: 0; }
.cu-stat.warn { border-color: var(--warn); } .cu-val { font-size: 20px; font-weight: 750; margin: 2px 0; overflow-wrap: anywhere; } .cu-sub { margin-top: 0; }
.cu-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; } .cu-dup { border: 1px solid var(--warn); background: var(--warn-weak); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; }
.cu-tabs { margin-bottom: 14px; } .cu-n { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 999px; background: var(--accent-weak); color: var(--brand, var(--accent)); font-size: 11px; font-weight: 700; }
.cu-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; align-items: start; } .cu-grid .card { margin-bottom: 14px; } .cu-cardhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; } .cu-cardhead h3 { margin: 0; }
.cu-ins { margin: 8px 0 0; padding-left: 18px; } .cu-ins li.warn { color: var(--warn); font-weight: 600; }
.cu-people { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; } .cu-people li { display: flex; gap: 10px; align-items: center; } .cu-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 8px 0 0; } .cu-dl dt { color: var(--muted); } .cu-dl dd { margin: 0; text-align: right; }
.cu-tl { list-style: none; margin: 10px 0 0; padding: 0; position: relative; } .cu-tl li { display: flex; gap: 12px; padding: 0 0 14px; position: relative; } .cu-tl li:not(:last-child)::before { content: ''; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--border); }
.cu-ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-weak); color: var(--brand, var(--accent)); font-size: 14px; } .cu-tl .t-finance .cu-ic { background: var(--good-weak); color: var(--good); } .cu-tl .t-task .cu-ic, .cu-tl .t-appointment .cu-ic { background: var(--warn-weak); color: var(--warn); }
.cu-tlm { min-width: 0; flex: 1; } .cu-tlt { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; } .cu-detail { overflow-wrap: anywhere; } .cu-src { display: inline-block; padding: 0 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); font-size: 11px; font-weight: 600; margin-right: 6px; }
.cu-filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; } .cu-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cu-item { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); } .cu-item:last-of-type { border-bottom: 0; } .cu-note { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 3px; } .cu-done { text-decoration: line-through; color: var(--muted); }
.cu-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; } .cu-table { width: 100%; border-collapse: collapse; } .cu-table th, .cu-table td { padding: 9px 8px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; } .cu-table th { color: var(--muted); font-size: 12px; font-weight: 700; } .cu-table .num { text-align: right; white-space: nowrap; }
.cu-rowbtns { white-space: nowrap; text-align: right; } .cu-lr { max-height: 340px; overflow: auto; margin: 10px 0; } .btn.ghost { background: transparent; border-color: transparent; color: var(--muted); } .btn.ghost:hover { color: var(--bad); }
@media (max-width: 900px) { .cu-grid { grid-template-columns: 1fr; } .cu-row { grid-template-columns: auto minmax(0, 1fr) auto; } .cu-row .cu-cell { display: none; } .cu-meta { width: 100%; } .cu-table { display: block; overflow-x: auto; } }

/* Settings → Connected applications */
.cn-cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; } .cn-sec { margin: 18px 0; } .cn-sec > h2 { margin: 0 0 10px; font-size: 18px; } .cn-note { margin: 0 0 10px; }
.cn-grid { columns: 320px; column-gap: 12px; }
.cn-card { border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; background: var(--surface); margin-bottom: 12px; min-width: 0; } .cn-grid .cn-card { break-inside: avoid; margin-bottom: 12px; }
.cn-head { display: flex; gap: 12px; align-items: flex-start; } .cn-head h3 { margin: 0 0 2px; font-size: 16px; } .cn-head p { margin: 0; } .cn-head .cn-chip { flex: none; }
.cn-logo { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; color: #fff; font-weight: 800; font-size: 14px; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.cn-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.cn-chip.ok { background: var(--good-weak); color: var(--good); border-color: transparent; } .cn-chip.bad { background: var(--bad-weak); color: var(--bad); border-color: transparent; }
.cn-caps { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; } .cn-acct { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); margin-top: 8px; } .cn-acct .grow { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.cn-card .btn-row { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }

/* Accounting platform (Xero / QuickBooks) */
.acc-ext { margin-bottom: 14px; } .acc-ext-head { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: flex-start; } .acc-ext-head h2 { margin: 0 0 2px; } .acc-ext-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; margin: 10px 0; }
.acc-ext h3 { margin: 12px 0 6px; font-size: 14px; } .acc-ext-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 8px; } .acc-line { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.acc-bars { display: flex; gap: 6px; align-items: flex-end; height: 130px; padding: 4px 0; } .acc-bar { flex: 1; display: flex; gap: 2px; align-items: flex-end; height: 100%; position: relative; min-width: 0; } .acc-bar i { flex: 1; border-radius: 3px 3px 0 0; min-height: 2px; } .acc-bar span { position: absolute; bottom: -16px; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--muted); }
.acc-bar i.a, .acc-key.a { background: var(--brand, var(--accent)); } .acc-bar i.b, .acc-key.b { background: var(--good); } .acc-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 8px; } .acc-ext .acc-bars + .muted { margin-top: 20px; }
@media (max-width: 900px) { .acc-ext-grid { grid-template-columns: 1fr; } }
.cn-logo-svg { flex: none; width: 40px; height: 40px; } .cn-set { margin: 12px 0; } .cn-set h4 { margin: 0 0 6px; font-size: 13px; color: var(--muted); } .cn-checks { display: flex; flex-direction: column; gap: 6px; } .cn-checks .check { display: flex; gap: 8px; align-items: flex-start; } .cn-src td { font-size: 13px; } .cn-chip.info { background: var(--accent-weak); color: var(--brand, var(--accent)); border-color: transparent; }
.cn-shoprow { align-items: flex-start; } .cn-shopbtns { display: flex; flex-wrap: wrap; gap: 6px; } .cn-shopset { flex: 1 1 100%; padding: 8px 0 2px; } .cn-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; } .cn-add input { flex: 1 1 200px; min-width: 0; }
.cn-guide { margin-top: 10px; } .cn-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 12px; } .cn-steps input { width: 100%; margin-top: 6px; } .cn-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } @media (max-width: 600px) { .cn-keys { grid-template-columns: 1fr; } }

/* E-commerce & Payments */
.cm-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; } .cm-bar input[type=search] { flex: 1 1 160px; min-width: 0; } .cm-date { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); } .cm-presets { display: inline-flex; gap: 6px; }
.cm-tabs { margin-top: 8px; } .cm-h { margin: 18px 0 8px; font-size: 17px; } .cm-warn { border: 1px solid var(--warn); background: var(--warn-weak); border-radius: 12px; padding: 10px 14px; margin: 8px 0; } .cm-empty { text-align: center; padding: 30px; } .cm-note { margin-top: 16px; }
.cm-click { cursor: pointer; } .cm-click:hover { background: var(--surface-2); } .cm-table td { vertical-align: top; } .cm-axis { display: flex; justify-content: space-between; } .cm-subs { margin-top: 10px; }
.cm-barrow { display: grid; grid-template-columns: 130px 1fr 40px; gap: 8px; align-items: center; font-size: 13px; padding: 3px 0; } .cm-barrow div { background: var(--surface-2); border-radius: 4px; height: 8px; overflow: hidden; } .cm-barrow i { display: block; height: 100%; background: var(--brand, var(--accent)); } .cm-barrow b { text-align: right; }
.cm-dl { margin-bottom: 8px; }
