/* ==========================================================================
   Business Control Center — generic engine stylesheet.
   Every colour/font comes from --bcc-* custom properties that app.js writes
   on :root from BCC.config.brand. Nothing client specific lives here.
   ========================================================================== */

:root {
  --bcc-bg: #0b0b0b;
  --bcc-bg2: #121212;
  --bcc-panel: rgba(22, 22, 22, .86);
  --bcc-panelSolid: #171717;
  --bcc-line: rgba(255, 255, 255, .08);
  --bcc-lineBright: rgba(255, 255, 255, .22);
  --bcc-text: #f5f5f5;
  --bcc-dim: #a8a8a8;
  --bcc-faint: #6a6a6a;
  --bcc-accent: #2563eb;
  --bcc-accent2: #7aa2ff;
  --bcc-ok: #34d399;
  --bcc-warn: #fbbf24;
  --bcc-info: #38bdf8;
  --bcc-violet: #8b5cf6;
  --bcc-pink: #ec4899;
  --bcc-gold: #f5c542;
  --bcc-fontDisplay: 'Montserrat', system-ui, -apple-system, sans-serif;
  --bcc-fontBody: 'Inter', system-ui, -apple-system, sans-serif;
  --bcc-fontMono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --r-card: 14px;
  --r-sm: 10px;
  --gap: 16px;
}

* { box-sizing: border-box; }

/* Bulgarian localised glyph forms (locl) turn Montserrat's к/п/т/м/и into
   cursive shapes that read as Latin at display sizes. Force the default set. */
html, body, * { font-feature-settings: "locl" 0 !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bcc-bg);
  color: var(--bcc-text);
  font-family: var(--bcc-fontBody);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  /* Soft brand glow behind everything. */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 620px at 18% -8%, color-mix(in srgb, var(--bcc-accent) 10%, transparent), transparent 70%),
    radial-gradient(760px 520px at 88% 4%, color-mix(in srgb, var(--bcc-accent) 6%, transparent), transparent 72%),
    linear-gradient(180deg, var(--bcc-bg2), var(--bcc-bg) 42%);
}

a { color: inherit; }
button { font-family: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bcc-line); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--bcc-lineBright); }

/* ---------- boot overlay ---------------------------------------------- */

.boot {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--bcc-bg);
  transition: opacity .35s ease;
}
.boot.is-out { opacity: 0; pointer-events: none; }
.boot-inner { width: min(420px, 82vw); text-align: center; position: relative; z-index: 1; }
.boot-logo {
  font-family: var(--bcc-fontDisplay);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -.01em;
  margin-bottom: 14px;
}
.boot-logo img { display: block; margin: 0 auto; }
.boot-text {
  font-family: var(--bcc-fontMono);
  font-size: 12px;
  color: var(--bcc-dim);
  margin-bottom: 14px;
  min-height: 18px;
}
.boot-bar {
  height: 3px;
  width: 100%;
  border-radius: 99px;
  background: var(--bcc-line);
  overflow: hidden;
}
.boot-bar i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--bcc-accent), var(--bcc-accent2));
  transition: width .18s linear;
}

/* ---------- shell ------------------------------------------------------ */

.app { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--bcc-line);
  background: color-mix(in srgb, var(--bcc-bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.tb-logo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tb-logo .name {
  font-family: var(--bcc-fontDisplay);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.tb-logo img { display: block; height: var(--logo-h, 26px); width: auto; }
.tb-logo .logo-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  background: #fff;
}
.tb-badge {
  font-family: var(--bcc-fontMono);
  font-size: 10.5px;
  letter-spacing: .06em;
  color: var(--bcc-dim);
  border: 1px solid var(--bcc-line);
  border-radius: 99px;
  padding: 3px 9px;
  white-space: nowrap;
}
.tb-spacer { flex: 1 1 auto; }
.tb-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--bcc-fontMono);
  font-size: 11.5px;
  color: var(--bcc-dim);
  white-space: nowrap;
}
.tb-meta b { color: var(--bcc-text); font-weight: 500; }
.tb-clock { font-variant-numeric: tabular-nums; letter-spacing: .04em; }

/* ---------- topbar chrome extras (optional, config-driven) ------------- */
.tb-brand { display: flex; align-items: center; gap: 9px; min-width: 0; overflow: hidden; flex: 0 1 auto; }
.tb-brand-mark {
  width: 27px; height: 27px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--bcc-accent), var(--bcc-accent2));
  display: flex; align-items: center; justify-content: center;
}
.tb-brand-mark svg { width: 13px; height: 13px; color: #fff; transform: translateX(1px); }
.tb-brand-txt { display: flex; flex-direction: column; line-height: 1.16; min-width: 0; overflow: hidden; }
.tb-brand-txt b {
  font-family: var(--bcc-fontDisplay); font-weight: 800; font-size: 16.5px;
  letter-spacing: -.01em; color: var(--bcc-text); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; display: block;
}
.tb-brand-txt span {
  font-family: var(--bcc-fontMono); font-size: 9.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--bcc-dim); white-space: nowrap;
}
.tb-div { width: 1px; align-self: stretch; margin: 4px 2px; background: var(--bcc-line); flex: 0 0 auto; }

/* Търсачката е декоративна — свива се първа. Превключвателят на роли е
   основната функция и трябва да пази пълната си ширина (виж .biz-switch). */
.tb-search { position: relative; flex: 1 1 160px; min-width: 0; max-width: 220px; }
.tb-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--bcc-faint); pointer-events: none; }
.tb-search input {
  width: 100%; background: color-mix(in srgb, var(--bcc-text) 6%, transparent);
  border: 1px solid var(--bcc-line); border-radius: 10px; color: var(--bcc-text);
  font-family: var(--bcc-fontBody); font-size: 12.5px; padding: 7px 34px 7px 32px;
}
.tb-search input::placeholder { color: var(--bcc-faint); }
.tb-search input:focus { outline: none; border-color: var(--bcc-lineBright); }
.tb-search kbd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-family: var(--bcc-fontMono); font-size: 10px; color: var(--bcc-faint);
  border: 1px solid var(--bcc-line); border-radius: 5px; padding: 1px 5px;
}

.btn-icon { width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; flex: 0 0 auto; }

.tb-user { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.tb-user-av {
  width: 27px; height: 27px; border-radius: 50%; flex: 0 0 auto; color: var(--bcc-onAccent, #fff);
  background: linear-gradient(135deg, var(--bcc-accent), var(--bcc-accent2));
  font-family: var(--bcc-fontDisplay); font-weight: 700; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}
.tb-user-txt { display: flex; flex-direction: column; line-height: 1.22; white-space: nowrap; }
.tb-user-txt b { font-size: 12.5px; font-weight: 600; color: var(--bcc-text); }
.tb-user-txt span { font-size: 10.5px; color: var(--bcc-dim); }

.shell {
  flex: 1 1 auto;
  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 300px;
  gap: 18px;
  padding: 18px 20px 40px;
  align-items: start;
}

/* ---------- sidebar ---------------------------------------------------- */

.side { position: sticky; top: 74px; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.nav-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--bcc-dim);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  cursor: pointer;
  text-align: left;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.nav-group {
  font-family: var(--bcc-fontMono);
  font-size: 9.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--bcc-faint);
  padding: 12px 11px 4px;
}
.side nav > .nav-group:first-child { padding-top: 2px; }
.nav-btn .ic { flex: none; opacity: .85; }
.nav-btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-btn:hover { background: color-mix(in srgb, var(--bcc-text) 6%, transparent); color: var(--bcc-text); }
.nav-btn.is-active {
  background: color-mix(in srgb, var(--bcc-accent) 16%, transparent);
  border-color: color-mix(in srgb, var(--bcc-accent) 42%, transparent);
  color: var(--bcc-text);
}
.nav-btn.is-active .ic { color: var(--bcc-accent2); opacity: 1; }
.side-foot {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--bcc-line);
  border-radius: var(--r-sm);
  font-size: 11.5px;
  color: var(--bcc-faint);
  line-height: 1.5;
}
.side-foot b { display: block; color: var(--bcc-dim); font-weight: 600; margin-bottom: 3px; }

/* ---------- main ------------------------------------------------------- */

.main { min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }

.kicker {
  font-family: var(--bcc-fontMono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--bcc-accent);
  margin: 0 0 10px;
}
.hero { position: relative; }
.hero h1 {
  font-family: var(--bcc-fontDisplay);
  font-weight: 800;
  font-size: clamp(26px, 3.6vw, 44px);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 0 0 12px;
  max-width: 22ch;
}
.hero h1 em { font-style: normal; color: var(--bcc-accent); }
.hero p { margin: 0; color: var(--bcc-dim); max-width: 62ch; font-size: 14.5px; }
.hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hero-top > div:first-child { flex: 1 1 320px; }
.hero-top > .meta-badge { flex: 0 0 auto; margin-top: 4px; }

.meta-badge {
  font-family: var(--bcc-fontMono);
  font-size: 10.5px;
  color: var(--bcc-faint);
  border: 1px solid var(--bcc-line);
  border-radius: 99px;
  padding: 3px 10px;
  white-space: nowrap;
}

.card {
  border: 1px solid var(--bcc-line);
  background: var(--bcc-panel);
  border-radius: var(--r-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 16px;
}
.card.pad-0 { padding: 0; }
.card h2, .card h3 { font-family: var(--bcc-fontDisplay); letter-spacing: -.01em; }
.card h2 { font-size: 17px; font-weight: 700; margin: 0 0 12px; }
.card h3 { font-size: 14.5px; font-weight: 700; margin: 0 0 10px; }
.card-hover { transition: transform .18s ease, border-color .18s ease; }
.card-hover:hover { transform: translateY(-2px); border-color: var(--bcc-lineBright); }

.sec-title {
  font-family: var(--bcc-fontDisplay);
  font-size: 15px;
  font-weight: 700;
  margin: 4px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sec-title .sub { font-family: var(--bcc-fontBody); font-weight: 400; font-size: 12.5px; color: var(--bcc-faint); }

.grid { display: grid; gap: var(--gap); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-auto { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.g-cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }

/* ---------- tiles / kpi ------------------------------------------------ */

.tile {
  border: 1px solid var(--bcc-line);
  background: var(--bcc-panel);
  border-radius: var(--r-card);
  padding: 14px 15px;
  transition: transform .18s ease, border-color .18s ease;
}
.tile:hover { transform: translateY(-2px); border-color: var(--bcc-lineBright); }
.tile .lbl {
  font-family: var(--bcc-fontMono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bcc-faint);
  margin-bottom: 8px;
}
.tile .val {
  font-family: var(--bcc-fontDisplay);
  font-weight: 800;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.tile .sub { font-size: 12px; color: var(--bcc-dim); margin-top: 6px; }
.tile .delta { font-family: var(--bcc-fontMono); font-size: 11.5px; margin-top: 6px; }

/* ---------- chips / badges -------------------------------------------- */

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--bcc-line);
  background: color-mix(in srgb, var(--bcc-text) 4%, transparent);
  border-radius: 99px;
  padding: 6px 12px;
  font-size: 12.5px;
  color: var(--bcc-dim);
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.chip:hover { color: var(--bcc-text); border-color: var(--bcc-lineBright); }
.chip.is-active {
  background: color-mix(in srgb, var(--bcc-accent) 18%, transparent);
  border-color: color-mix(in srgb, var(--bcc-accent) 46%, transparent);
  color: var(--bcc-text);
}
.chip.static { cursor: default; }
.chip .dot { width: 7px; height: 7px; border-radius: 99px; background: currentColor; flex: none; }
.chip .sub { color: var(--bcc-faint); font-size: 11px; }

.badge {
  display: inline-block;
  font-family: var(--bcc-fontMono);
  font-size: 10.5px;
  letter-spacing: .06em;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid var(--bcc-line);
  color: var(--bcc-dim);
  white-space: nowrap;
}
.badge.ok { color: var(--bcc-ok); border-color: color-mix(in srgb, var(--bcc-ok) 40%, transparent); }
.badge.warn { color: var(--bcc-warn); border-color: color-mix(in srgb, var(--bcc-warn) 40%, transparent); }
.badge.bad { color: var(--bcc-accent2); border-color: color-mix(in srgb, var(--bcc-accent2) 45%, transparent); }
.badge.info { color: var(--bcc-info); border-color: color-mix(in srgb, var(--bcc-info) 40%, transparent); }
.badge.accent { color: var(--bcc-accent2); border-color: color-mix(in srgb, var(--bcc-accent) 55%, transparent); }

.dot-live {
  width: 8px; height: 8px; border-radius: 99px; flex: none;
  background: var(--bcc-ok);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--bcc-ok) 60%, transparent);
  animation: pulse 2s infinite;
}
.dot-idle { width: 8px; height: 8px; border-radius: 99px; flex: none; background: var(--bcc-faint); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bcc-ok) 55%, transparent); }
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ---------- buttons ---------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--bcc-line);
  background: color-mix(in srgb, var(--bcc-text) 5%, transparent);
  color: var(--bcc-text);
  border-radius: var(--r-sm);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, transform .12s ease;
}
.btn:hover { border-color: var(--bcc-lineBright); background: color-mix(in srgb, var(--bcc-text) 9%, transparent); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: var(--bcc-accent);
  border-color: var(--bcc-accent);
  color: var(--bcc-onAccent, #fff);
  font-weight: 600;
}
.btn-primary:hover { background: color-mix(in srgb, var(--bcc-accent) 84%, #fff); border-color: transparent; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn-ghost { background: transparent; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- tables ----------------------------------------------------- */

.tbl-wrap { overflow-x: auto; border-radius: var(--r-card); }
table.tbl { font-size: 13px; min-width: 100%; }
table.tbl th {
  font-family: var(--bcc-fontMono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--bcc-faint);
  font-weight: 500;
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--bcc-line);
  white-space: nowrap;
}
table.tbl td {
  padding: 9px 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--bcc-line) 60%, transparent);
  vertical-align: middle;
}
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover td { background: color-mix(in srgb, var(--bcc-text) 4%, transparent); }
table.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.tbl .strong { font-weight: 600; }
.t-up { color: var(--bcc-ok); }
.t-down { color: var(--bcc-warn); }
.t-stopped { color: var(--bcc-accent2); }
.t-flat { color: var(--bcc-dim); }

.bar-mini {
  position: relative;
  height: 5px;
  min-width: 48px;
  flex: 1 1 auto;
  border-radius: 99px;
  background: color-mix(in srgb, var(--bcc-text) 10%, transparent);
  overflow: hidden;
}
.bar-mini i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--bcc-accent); }

/* ---------- live feed -------------------------------------------------- */

.live { position: sticky; top: 74px; }
.live-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--bcc-line);
}
.live-head .ttl { font-family: var(--bcc-fontDisplay); font-weight: 700; font-size: 14px; }
.live-head .lbl { font-family: var(--bcc-fontMono); font-size: 10px; letter-spacing: .16em; color: var(--bcc-ok); margin-left: auto; }
.live-list { max-height: calc(100vh - 190px); overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding-right: 2px; }
.feed-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 6px;
  border-radius: 8px;
  font-size: 12.5px;
  animation: feedin .35s ease;
}
.feed-item:hover { background: color-mix(in srgb, var(--bcc-text) 4%, transparent); }
.feed-item .tm { font-family: var(--bcc-fontMono); font-size: 11px; color: var(--bcc-faint); padding-top: 1px; }
.feed-item .ag { font-weight: 600; font-size: 12px; display: block; }
.feed-item .tx { color: var(--bcc-dim); line-height: 1.45; }
@keyframes feedin { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }

/* ---------- agents ----------------------------------------------------- */

.agent-card { display: flex; flex-direction: column; gap: 10px; }
.agent-top { display: flex; align-items: flex-start; gap: 11px; }
.agent-ic {
  width: 38px; height: 38px; flex: none;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 17px;
  border: 1px solid var(--bcc-line);
}
.agent-name { font-family: var(--bcc-fontDisplay); font-weight: 700; font-size: 14.5px; line-height: 1.25; }
.agent-desc { font-size: 12.5px; color: var(--bcc-dim); }
.agent-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.agent-log li {
  font-size: 11.5px;
  color: var(--bcc-faint);
  padding-left: 12px;
  position: relative;
  line-height: 1.45;
}
.agent-log li::before { content: ""; position: absolute; left: 0; top: 7px; width: 4px; height: 4px; border-radius: 99px; background: var(--bcc-line); }
.agent-foot { display: flex; align-items: center; gap: 9px; margin-top: auto; padding-top: 4px; }
.agent-state { display: flex; align-items: center; gap: 6px; font-family: var(--bcc-fontMono); font-size: 11px; color: var(--bcc-dim); }

.team-row {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--bcc-line);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 12.5px;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: border-color .15s ease, background .15s ease;
}
.team-row:hover { border-color: var(--bcc-lineBright); background: color-mix(in srgb, var(--bcc-text) 4%, transparent); }
.team-row .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-row .rl { margin-left: auto; font-family: var(--bcc-fontMono); font-size: 10.5px; color: var(--bcc-faint); white-space: nowrap; }

/* ---------- chat ------------------------------------------------------- */

.chat { display: flex; flex-direction: column; min-height: 420px; }
.chat-log { flex: 1 1 auto; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: 52vh; padding-right: 4px; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 12px; font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; }
.msg.bot { background: color-mix(in srgb, var(--bcc-text) 6%, transparent); border: 1px solid var(--bcc-line); border-top-left-radius: 4px; }
.msg.me { align-self: flex-end; background: color-mix(in srgb, var(--bcc-accent) 22%, transparent); border: 1px solid color-mix(in srgb, var(--bcc-accent) 42%, transparent); border-top-right-radius: 4px; }
.msg.step { font-family: var(--bcc-fontMono); font-size: 12px; color: var(--bcc-dim); background: transparent; border: 1px dashed var(--bcc-line); }
.chat-form { display: flex; gap: 8px; margin-top: 12px; }
.inp {
  flex: 1 1 auto;
  min-width: 0;
  background: color-mix(in srgb, var(--bcc-text) 5%, transparent);
  border: 1px solid var(--bcc-line);
  border-radius: var(--r-sm);
  color: var(--bcc-text);
  font-family: inherit;
  font-size: 13.5px;
  padding: 10px 12px;
}
.inp:focus { outline: none; border-color: color-mix(in srgb, var(--bcc-accent) 60%, transparent); }
textarea.inp { min-height: 120px; resize: vertical; line-height: 1.55; }
select.inp { cursor: pointer; }
select.inp option { background: var(--bcc-panelSolid); color: var(--bcc-text); }

/* ---------- kanban ----------------------------------------------------- */

.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(198px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.kan-col { border: 1px solid var(--bcc-line); border-radius: var(--r-card); background: color-mix(in srgb, var(--bcc-text) 3%, transparent); padding: 10px; min-height: 130px; }
.kan-head { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; }
.kan-head .nm { font-family: var(--bcc-fontMono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--bcc-faint); }
.kan-head .ct { margin-left: auto; font-family: var(--bcc-fontMono); font-size: 10.5px; color: var(--bcc-dim); }
.kan-card {
  border: 1px solid var(--bcc-line);
  background: var(--bcc-panelSolid);
  border-radius: var(--r-sm);
  padding: 9px 10px;
  margin-bottom: 8px;
  font-size: 12px;
  animation: feedin .3s ease;
}
.kan-card .id { font-family: var(--bcc-fontMono); font-size: 10.5px; color: var(--bcc-accent2); }
.kan-card .cl { font-weight: 600; font-size: 12.5px; margin: 2px 0; }
.kan-card .mt { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--bcc-faint); font-size: 11px; margin-top: 5px; }
.kan-card .mt { flex-wrap: wrap; }
.kan-card.is-new { border-color: color-mix(in srgb, var(--bcc-accent) 55%, transparent); }

/* ---------- misc blocks ------------------------------------------------ */

.list-plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.list-plain li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--bcc-dim); }
.num-pill {
  flex: none; width: 22px; height: 22px; border-radius: 99px;
  display: grid; place-items: center;
  font-family: var(--bcc-fontMono); font-size: 11px;
  background: color-mix(in srgb, var(--bcc-accent) 22%, transparent);
  color: var(--bcc-text);
}
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 5px 0; }
.kv .k { color: var(--bcc-faint); }
.kv .v { font-variant-numeric: tabular-nums; }
.kv.total { border-top: 1px solid var(--bcc-line); margin-top: 6px; padding-top: 9px; font-weight: 700; font-size: 15px; }
.mono { font-family: var(--bcc-fontMono); }
.dim { color: var(--bcc-dim); }
.faint { color: var(--bcc-faint); }
.small { font-size: 12px; }
.center-empty { padding: 26px 10px; text-align: center; color: var(--bcc-faint); font-size: 13px; }

.doc { max-width: 760px; }
.doc h2 { font-size: 21px; margin-bottom: 6px; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 7px 0; cursor: pointer; }
.check-row input { accent-color: var(--bcc-accent); width: 15px; height: 15px; cursor: pointer; }
.check-row.is-done span { text-decoration: line-through; color: var(--bcc-faint); }

.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; padding-bottom: 16px; position: relative; }
.tl-item:not(:last-child)::before { content: ""; position: absolute; left: 12px; top: 22px; bottom: 0; width: 1px; background: var(--bcc-line); }
.tl-dot { width: 24px; height: 24px; border-radius: 99px; display: grid; place-items: center; border: 1px solid var(--bcc-line); background: var(--bcc-panelSolid); font-family: var(--bcc-fontMono); font-size: 11px; color: var(--bcc-accent2); }
.tl-item h4 { margin: 2px 0 4px; font-family: var(--bcc-fontDisplay); font-size: 14.5px; font-weight: 700; }

.hbar { display: grid; grid-template-columns: minmax(96px, 150px) minmax(0, 1fr) 84px; gap: 10px; align-items: center; font-size: 12.5px; padding: 5px 0; }
.hbar .track { height: 9px; border-radius: 99px; background: color-mix(in srgb, var(--bcc-text) 8%, transparent); overflow: hidden; }
.hbar .track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--bcc-accent), var(--bcc-accent2)); }
.hbar .v { text-align: right; font-variant-numeric: tabular-nums; }

.splitbar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; border: 1px solid var(--bcc-line); }
.splitbar i { display: block; height: 100%; }

.cta-card {
  border: 1px solid color-mix(in srgb, var(--bcc-accent) 42%, transparent);
  background: linear-gradient(120deg, color-mix(in srgb, var(--bcc-accent) 16%, transparent), transparent 62%);
  border-radius: var(--r-card);
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.cta-card .txt { min-width: 220px; flex: 1 1 auto; }
.cta-card h3 { margin: 0 0 4px; font-family: var(--bcc-fontDisplay); font-size: 16px; }

.notice {
  border: 1px dashed var(--bcc-line);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--bcc-faint);
}

/* ---------- toasts / modal --------------------------------------------- */

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 160; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast {
  border: 1px solid var(--bcc-lineBright);
  background: var(--bcc-panelSolid);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: 13px;
  max-width: min(360px, 82vw);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
  animation: toastin .25s ease;
}
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.toast.is-out { opacity: 0; transform: translateY(8px); transition: all .25s ease; }

.modal-back {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(0, 0, 0, .62);
  backdrop-filter: blur(3px);
  display: grid; place-items: center;
  padding: 20px;
  animation: toastin .2s ease;
}
.modal {
  width: min(620px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  border: 1px solid var(--bcc-lineBright);
  background: var(--bcc-panelSolid);
  border-radius: var(--r-card);
  padding: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.modal-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.modal-head h3 { margin: 0; font-family: var(--bcc-fontDisplay); font-size: 17px; }
.modal-x { margin-left: auto; background: transparent; border: 0; color: var(--bcc-dim); cursor: pointer; padding: 2px; }
.modal-x:hover { color: var(--bcc-text); }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; }
.pre {
  font-family: var(--bcc-fontMono);
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  background: color-mix(in srgb, var(--bcc-text) 5%, transparent);
  border: 1px solid var(--bcc-line);
  border-radius: var(--r-sm);
  padding: 12px;
}

/* Overview mirrors the live feed only when the right column is gone. */
.only-narrow { display: none; }
/* chrome.liveFeed:false - без колоната „Жив поток" */
.shell.no-live { grid-template-columns: 220px minmax(0, 1fr); }
@media (max-width: 1199px) { .shell.no-live { grid-template-columns: 200px minmax(0, 1fr); } }
@media (max-width: 899px) { .shell.no-live { grid-template-columns: minmax(0, 1fr); } }


/* ---------- business switcher ------------------------------------------ */

.biz-switch {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--bcc-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bcc-text) 4%, transparent);
  /* flex-shrink:0 — превключвачът между роли е основната функция на демото,
     не бива тихо да се реже/скролва невидимо; декоративните tb-search/
     tb-brand-txt се свиват първи (виж горе). overflow-x остава safety net
     за наистина тесни екрани, не основният механизъм. */
  flex: 0 0 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.biz-switch::-webkit-scrollbar { display: none; }
.biz-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 9px;
  padding: 5px 12px;
  cursor: pointer;
  color: var(--bcc-dim);
  white-space: nowrap;
  transition: background .15s ease, color .15s ease, border-color .15s ease, opacity .15s ease;
}
.biz-btn .name {
  font-family: var(--bcc-fontDisplay);
  font-weight: 800;
  font-size: 14.5px;
  letter-spacing: -.01em;
}
.biz-btn img { display: block; height: 17px; width: auto; }
.biz-btn .logo-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 7px;
  background: #fff;
}
.biz-btn:not(.is-active) { opacity: .62; }
.biz-btn:not(.is-active):hover { opacity: 1; color: var(--bcc-text); background: color-mix(in srgb, var(--bcc-text) 6%, transparent); }
.biz-btn.is-active {
  color: var(--bcc-text);
  background: color-mix(in srgb, var(--bcc-accent) 18%, transparent);
  border-color: color-mix(in srgb, var(--bcc-accent) 48%, transparent);
}

/* ---------- connections ------------------------------------------------ */

.conn-card { display: flex; flex-direction: column; gap: 4px; }
.conn-top { display: flex; align-items: center; gap: 9px; }
.conn-top h3 { margin: 0; }
.conn-dot { width: 10px; height: 10px; border-radius: 99px; flex: none; }
.conn-io { margin-top: 6px; }
.conn-io .lbl {
  font-family: var(--bcc-fontMono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bcc-faint);
}
.conn-io ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.conn-io li {
  font-size: 12px;
  color: var(--bcc-dim);
  padding-left: 12px;
  position: relative;
  line-height: 1.45;
}
.conn-io li::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 4px; height: 4px;
  border-radius: 99px;
  background: var(--bcc-lineBright);
}
.conn-needs {
  margin-top: 10px;
  font-size: 12px;
  color: var(--bcc-dim);
  border-left: 2px solid color-mix(in srgb, var(--bcc-accent) 55%, transparent);
  padding-left: 10px;
}
.conn-needs b { color: var(--bcc-text); font-weight: 600; }
.conn-foot { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: auto; padding-top: 12px; }

/* ---------- creative studio -------------------------------------------- */

.fld { display: block; margin-bottom: 10px; }
.fld > span {
  display: block;
  font-family: var(--bcc-fontMono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bcc-faint);
  margin-bottom: 5px;
}
.fld .inp { width: 100%; }

.banner-wrap { display: flex; justify-content: center; }
.banner {
  container-type: inline-size;
  width: 100%;
  max-width: 360px;
  border-radius: var(--r-card);
  border: 1px solid var(--bcc-line);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
}
.banner .bn-row { display: flex; align-items: center; gap: 8px; }
.banner .bn-kicker {
  font-family: var(--bcc-fontMono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .78;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.banner .bn-fmt {
  margin-left: auto;
  font-family: var(--bcc-fontMono);
  font-size: 9.5px;
  letter-spacing: .1em;
  opacity: .55;
  white-space: nowrap;
}
.banner .bn-mid { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; gap: 8px; min-height: 0; }
.banner .bn-name {
  font-family: var(--bcc-fontDisplay);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.banner .bn-hook { font-size: clamp(12px, 3.7cqw, 15px); line-height: 1.4; opacity: .85; max-width: 26ch; }
.banner .bn-foot { margin-top: auto; }
.banner .bn-cta {
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  padding: 7px 16px;
  font-size: clamp(11px, 3.4cqw, 13px);
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}
.banner .bn-brand {
  margin-left: auto;
  font-family: var(--bcc-fontDisplay);
  font-weight: 700;
  font-size: clamp(11px, 3.4cqw, 14px);
  opacity: .9;
  white-space: nowrap;
}

.copy-row { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.copy-row .pre { flex: 1 1 240px; min-width: 0; }
.copy-row .btn { flex: 0 0 auto; }

/* ---------- responsive -------------------------------------------------- */

@media (max-width: 1199px) {
  .shell { grid-template-columns: 200px minmax(0, 1fr); }
  .live-col { display: none; }
  .only-narrow { display: block; }
  .only-narrow .live-list { max-height: 360px; }
}

@media (max-width: 899px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding: 14px 14px 32px; gap: 14px; }
  .side { position: static; margin: 0 -14px; padding: 0 14px; }
  .side nav {
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .side nav::-webkit-scrollbar { display: none; }
  .nav-btn {
    flex-direction: column;
    gap: 5px;
    min-width: 72px;
    padding: 9px 6px;
    text-align: center;
    font-size: 10.5px;
  }
  .nav-btn span { white-space: normal; line-height: 1.2; }
  .nav-group { display: none; }
  .side-foot { display: none; }
  .split, .g-2, .g-3, .g-4 { grid-template-columns: minmax(0, 1fr); }
  .g-auto, .g-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
  .topbar { padding: 9px 14px; gap: 10px; }
  .tb-meta { gap: 10px; font-size: 11px; }
  .tb-search { display: none; }
  .tb-user-txt { display: none; }
  .tb-div { display: none; }
}

@media (max-width: 620px) {
  .tb-badge { display: none; }
  .biz-btn { padding: 5px 9px; }
  .biz-btn .name { font-size: 13px; }
  .copy-row { flex-direction: column; align-items: stretch; }
  .copy-row .btn { align-self: flex-start; }
  .tb-meta .tb-agents { display: none; }
  .hero h1 { font-size: 26px; }
  .card { padding: 13px; }
  .hbar { grid-template-columns: minmax(80px, 1fr) 70px; }
  .hbar .track { grid-column: 1 / -1; }
  .msg { max-width: 96%; }
  .tb-brand-txt { display: none; }
  .tb-user { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* Light theme: app.js only swaps the --bcc-* vars; these few rules keep
   shadows/overlays readable when the brand asks for a light surface. */
:root[data-bcc-theme="light"] .toast { box-shadow: 0 12px 30px rgba(0, 0, 0, .12); }
:root[data-bcc-theme="light"] .modal { box-shadow: 0 24px 60px rgba(0, 0, 0, .16); }
:root[data-bcc-theme="light"] .modal-back { background: rgba(15, 15, 15, .32); }
:root[data-bcc-theme="light"] .btn-primary { color: var(--bcc-onAccent, #fff); }

/* ---------- roles: превключвател „Виж като“ (opt-in, config.roles) ------- */

.tb-role { position: relative; flex: 0 0 auto; }
.tb-role-btn {
  display: flex; align-items: center; gap: 9px;
  padding: 3px 10px 3px 4px; border-radius: 999px;
  border: 1px solid transparent; background: transparent;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.tb-role-btn:hover, .tb-role.is-open .tb-role-btn {
  border-color: var(--bcc-line);
  background: color-mix(in srgb, var(--bcc-text) 5%, transparent);
}
.tb-role-btn:focus-visible { outline: 2px solid var(--bcc-accent); outline-offset: 2px; }
.tb-role-caret { font-size: 11px; color: var(--bcc-dim); transition: transform .15s; }
.tb-role.is-open .tb-role-caret { transform: rotate(180deg); }

.role-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 8px);
  width: min(360px, 92vw); max-height: min(70vh, 560px); overflow-y: auto;
  padding: 8px; z-index: 60;
  background: var(--bcc-panelSolid);
  border: 1px solid var(--bcc-lineBright); border-radius: var(--r-card);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .38);
}
.tb-role.is-open .role-menu { display: block; }
.role-menu-head {
  padding: 6px 10px 8px; font-family: var(--bcc-fontMono); font-size: 10.5px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--bcc-faint);
}
.role-opt {
  display: flex; flex-direction: column; gap: 3px; width: 100%;
  padding: 9px 11px; margin: 0 0 4px; text-align: left; cursor: pointer;
  color: var(--bcc-text); font: inherit;
  background: transparent; border: 1px solid transparent; border-radius: var(--r-sm);
}
.role-opt:last-child { margin-bottom: 0; }
.role-opt:hover { background: color-mix(in srgb, var(--bcc-text) 5%, transparent); }
.role-opt:focus-visible { outline: 2px solid var(--bcc-accent); outline-offset: -2px; }
.role-opt.is-active {
  border-color: var(--bcc-accent);
  background: color-mix(in srgb, var(--bcc-accent) 10%, transparent);
}
.role-opt-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.role-opt-top b { font-size: 13px; font-weight: 600; }
.role-opt-n { font-family: var(--bcc-fontMono); font-size: 10.5px; color: var(--bcc-dim); white-space: nowrap; }
.role-opt.is-active .role-opt-n { color: var(--bcc-text); }
.role-opt-sub { font-size: 11.5px; color: var(--bcc-dim); }
.role-opt-note { font-size: 11px; line-height: 1.4; color: var(--bcc-faint); }

.role-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px;
  padding: 8px 12px; font-size: 12px; line-height: 1.45; color: var(--bcc-dim);
  background: color-mix(in srgb, var(--bcc-accent) 7%, var(--bcc-panelSolid));
  border: 1px solid var(--bcc-line); border-left: 3px solid var(--bcc-accent);
  border-radius: var(--r-sm);
}
.role-bar b { color: var(--bcc-text); font-weight: 600; }
.role-bar-txt { flex: 1 1 320px; min-width: 0; }
.role-bar-back {
  flex: 0 0 auto; padding: 0; background: none; border: 0; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--bcc-text);
  text-decoration: underline; text-decoration-color: var(--bcc-accent); text-underline-offset: 3px;
}
.role-bar-back:hover { color: var(--bcc-accent2); }
.role-bar-back:focus-visible { outline: 2px solid var(--bcc-accent); outline-offset: 3px; border-radius: 3px; }

.role-denied-ic { font-size: 30px; color: var(--bcc-faint); line-height: 1; margin-bottom: 8px; }
.role-denied-t { font-size: 14px; color: var(--bcc-dim); }

@media (max-width: 899px) {
  .tb-role { position: static; }
  .role-menu { left: 10px; right: 10px; width: auto; top: 100%; margin-top: 6px; }
  .role-bar-txt { flex-basis: 100%; }
}

:root[data-bcc-theme="light"] .role-menu { box-shadow: 0 18px 44px rgba(0, 0, 0, .16); }

/* ---------- opt-in раздели: Жизнен цикъл, Digital Passport, Одит лог, Одобрения ---------- */

.nav-btn { position: relative; }
.nav-badge {
  margin-left: auto; flex: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: var(--bcc-accent); color: var(--bcc-onAccent, #fff);
  font: 600 10.5px/18px var(--bcc-fontMono); text-align: center; font-style: normal;
}
.nav-badge[hidden] { display: none; }

.tile-link { cursor: pointer; }
.tile-link:focus-visible { outline: 2px solid var(--bcc-accent); outline-offset: 2px; }
.tile-go { color: var(--bcc-accent2); font-weight: 500; }

/* --- Жизнен цикъл */
.lc-wrap { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.lc-board { grid-auto-columns: minmax(212px, 1fr); align-items: start; }
.lc-card { cursor: pointer; display: block; transition: border-color .15s ease, transform .15s ease; }
.lc-card:hover { border-color: var(--bcc-lineBright); transform: translateY(-1px); }
.lc-card:focus-visible { outline: 2px solid var(--bcc-accent); outline-offset: 2px; }
.lc-card.has-block { border-left: 3px solid var(--bcc-warn); }
.lc-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 6px; font-size: 11px; color: var(--bcc-dim); }
.lc-days { font-family: var(--bcc-fontMono); font-size: 10.5px; color: var(--bcc-faint); }
.lc-days.is-over { color: var(--bcc-warn); }
.lc-next { margin-top: 6px; font-size: 11.5px; line-height: 1.4; color: var(--bcc-dim); }
.lc-block { margin-top: 6px; padding: 5px 7px; border-radius: 7px; font-size: 11px; line-height: 1.35; color: var(--bcc-warn);
  background: color-mix(in srgb, var(--bcc-warn) 11%, transparent); }
.lc-block b { font-family: var(--bcc-fontMono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; margin-right: 4px; }
.lc-block-lg { font-size: 12.5px; padding: 8px 10px; }
.lc-wait {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 7px; padding: 3px 9px; border-radius: 99px; cursor: pointer;
  font: 600 10.5px var(--bcc-fontMono); letter-spacing: .04em; color: var(--bcc-accent2);
  border: 1px solid color-mix(in srgb, var(--bcc-accent) 50%, transparent);
  background: color-mix(in srgb, var(--bcc-accent) 10%, transparent);
}
span.lc-wait { cursor: default; }
.lc-empty { padding: 8px 2px; }

.drawer-back {
  position: fixed; inset: 0; z-index: 150; display: flex; justify-content: flex-end;
  background: rgba(0, 0, 0, .5); backdrop-filter: blur(3px); animation: toastin .2s ease;
}
.drawer {
  width: min(470px, 100%); height: 100%; display: flex; flex-direction: column;
  background: var(--bcc-panelSolid); border-left: 1px solid var(--bcc-lineBright);
  box-shadow: -20px 0 50px rgba(0, 0, 0, .35); animation: drawerin .26s ease;
}
@keyframes drawerin { from { transform: translateX(28px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px 10px; }
.drawer-head h3 { margin: 0 0 3px; font-family: var(--bcc-fontDisplay); font-size: 17px; line-height: 1.25; }
.drawer-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.drawer-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--bcc-line); }
.lc-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.lc-steps li { font-size: 11px; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--bcc-line); color: var(--bcc-faint); }
.lc-steps li i { display: none; }
.lc-steps li.is-done { color: var(--bcc-ok); border-color: color-mix(in srgb, var(--bcc-ok) 40%, transparent); }
.lc-steps li.is-cur { color: var(--bcc-text); border-color: color-mix(in srgb, var(--bcc-accent) 60%, transparent); background: color-mix(in srgb, var(--bcc-accent) 16%, transparent); }
.lc-d-next { padding: 10px 12px; border-radius: 10px; font-size: 13px; background: color-mix(in srgb, var(--bcc-text) 5%, transparent); border: 1px solid var(--bcc-line); }
.lc-d-next .lbl { display: block; font: 10px var(--bcc-fontMono); letter-spacing: .12em; text-transform: uppercase; color: var(--bcc-faint); margin-bottom: 4px; }
.lc-wait-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 9px 12px; border-radius: 10px; font-size: 12.5px;
  border: 1px solid color-mix(in srgb, var(--bcc-accent) 45%, transparent); background: color-mix(in srgb, var(--bcc-accent) 9%, transparent); }
.lc-kv { padding: 8px 12px; }
.lc-path { font-family: var(--bcc-fontMono); line-height: 1.5; }
.lc-h { margin: 6px 0 0; font: 700 13px var(--bcc-fontDisplay); }
.lc-grp { padding: 6px 0 2px; border-top: 1px solid var(--bcc-line); }
.lc-grp-h { font: 10.5px var(--bcc-fontMono); letter-spacing: .1em; text-transform: uppercase; color: var(--bcc-faint); padding-top: 4px; }
.lc-grp.is-cur .lc-grp-h { color: var(--bcc-text); }

/* --- Одобрения */
.ap-card { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.ap-card h3 { margin: 0; line-height: 1.35; }
.ap-top { display: flex; align-items: center; gap: 9px; }
.ap-when { margin-left: auto; }
.ap-nums { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-num { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--bcc-line); background: color-mix(in srgb, var(--bcc-text) 4%, transparent); }
.ap-num .lbl { font: 9.5px var(--bcc-fontMono); letter-spacing: .12em; text-transform: uppercase; color: var(--bcc-faint); }
.ap-num b { font: 700 16px var(--bcc-fontDisplay); font-variant-numeric: tabular-nums; }
.ap-num.is-low { border-color: color-mix(in srgb, var(--bcc-warn) 55%, transparent); }
.ap-num.is-low b { color: var(--bcc-warn); }
.ap-lines { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.55; color: var(--bcc-dim); }
.ap-agent { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--bcc-text) 4%, transparent); border: 1px solid var(--bcc-line); }
.ap-agent p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--bcc-dim); }
.ap-ag-ic { font-size: 16px; line-height: 1.3; flex: none; }
.ap-needs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ap-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: auto; padding-top: 4px; }
.ap-actions .inp { flex: 1 1 150px; padding: 8px 11px; font-size: 12.5px; }
.ap-actions .inp:disabled, .btn:disabled { opacity: .45; cursor: not-allowed; }
.ap-lock { margin: 0; color: var(--bcc-warn); }
.ap-res-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--bcc-line); }
.ap-res-row:last-child { border-bottom: 0; }
.ap-res-row.is-now { background: color-mix(in srgb, var(--bcc-accent) 7%, transparent); margin: 0 -8px; padding: 10px 8px; border-radius: 8px; }
.ap-res-row .badge { margin-top: 2px; flex: none; }
.ap-res-row > .badge:last-child { margin-left: auto; }
.ap-res-t { font-size: 13px; font-weight: 600; line-height: 1.35; }
.ap-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 14px; }
.ap-flow span { font-size: 11.5px; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--bcc-line); color: var(--bcc-dim); }
.ap-flow i { font-style: normal; color: var(--bcc-faint); }

/* --- Digital Passport */
.pp-layout { display: grid; grid-template-columns: minmax(0, 270px) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.pp-list-card h3 { margin-bottom: 10px; }
.pp-list-card .inp { width: 100%; margin-bottom: 10px; }
.pp-list { display: flex; flex-direction: column; gap: 4px; max-height: 640px; overflow-y: auto; }
.pp-row {
  display: grid; gap: 3px; width: 100%; text-align: left; padding: 9px 10px; cursor: pointer; font: inherit; color: inherit;
  border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; justify-items: start;
}
.pp-row:hover { background: color-mix(in srgb, var(--bcc-text) 5%, transparent); }
.pp-row.is-active { border-color: color-mix(in srgb, var(--bcc-accent) 50%, transparent); background: color-mix(in srgb, var(--bcc-accent) 11%, transparent); }
.pp-row:focus-visible { outline: 2px solid var(--bcc-accent); outline-offset: -2px; }
.pp-row-id { color: var(--bcc-accent2); word-break: break-all; }
.pp-row-m { font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.pp-detail { display: flex; flex-wrap: wrap; gap: var(--gap); align-items: flex-start; min-width: 0; }
.pp-owner { flex: 1 1 250px; min-width: 0; }
.pp-qrbox { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pp-qr { width: 112px; height: 112px; flex: none; border-radius: 8px; border: 1px solid var(--bcc-line); }
.pp-events { list-style: none; margin: 8px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; }
.pp-events li { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 8px; }
.pp-events li.is-now span:last-child { color: var(--bcc-accent2); }

/* Макет на телефон: страницата е на сайта на клиента (светла), затова цветовете са фиксирани. */
.pp-phone {
  position: relative; flex: 0 0 auto; width: 300px; max-width: 100%; padding: 10px; border-radius: 40px;
  background: #0d0c0b; border: 1px solid var(--bcc-lineBright); box-shadow: 0 18px 40px rgba(0, 0, 0, .3);
}
.pp-notch { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 92px; height: 20px; border-radius: 0 0 14px 14px; background: #0d0c0b; z-index: 2; }
.pp-screen {
  height: 560px; overflow-y: auto; border-radius: 31px; background: #f6f1ea; color: #1c1916;
  font-family: var(--bcc-fontBody); font-size: 12.5px; line-height: 1.5; scrollbar-width: thin;
}
.pp-url { position: sticky; top: 0; z-index: 1; padding: 28px 14px 8px; text-align: center; background: #ece5da; color: #6f665c; font: 10px var(--bcc-fontMono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-pg { padding: 18px 18px 22px; }
.pp-logo { display: block; height: 22px; margin: 0 auto 16px; }
.pp-logo-t { text-align: center; font: 800 18px var(--bcc-fontDisplay); letter-spacing: .08em; margin-bottom: 16px; }
.pp-eyebrow { text-align: center; font: 9.5px var(--bcc-fontMono); letter-spacing: .22em; text-transform: uppercase; color: #8a7f72; }
.pp-pg h4 { margin: 6px 0 2px; text-align: center; font: 700 20px/1.2 var(--bcc-fontDisplay); color: #1c1916; }
.pp-ver { text-align: center; color: #6f665c; }
.pp-no { margin: 10px 0 14px; padding: 7px 10px; text-align: center; border-radius: 9px; background: #ece5da; font: 11px var(--bcc-fontMono); word-break: break-all; }
.pp-note { margin-bottom: 12px; padding: 8px 10px; border-radius: 9px; background: #f1e3c8; color: #6a4b12; font-size: 11.5px; }
.pp-sec { padding: 11px 0; border-top: 1px solid rgba(28, 25, 22, .12); }
.pp-h { font: 700 10.5px var(--bcc-fontMono); letter-spacing: .12em; text-transform: uppercase; color: #8a7f72; margin-bottom: 6px; }
.pp-line { display: flex; justify-content: space-between; gap: 10px; }
.pp-line span:last-child:not(:first-child) { color: #6f665c; text-align: right; }
.pp-sec ul { margin: 0; padding-left: 16px; color: #3c352e; }
.pp-hist { list-style: none; margin: 0; padding: 0 0 0 12px; border-left: 1px solid #cfc6b8; display: flex; flex-direction: column; gap: 9px; }
.pp-hist li { display: flex; flex-direction: column; }
.pp-hd { font: 10px var(--bcc-fontMono); color: #8a7f72; }
.pp-btns { padding-top: 6px; border-top: 1px solid rgba(28, 25, 22, .12); }
.pp-btn {
  display: block; width: 100%; margin-top: 8px; padding: 10px 12px; cursor: pointer; border-radius: 10px;
  border: 1px solid #1c1916; background: transparent; color: #1c1916; font: 600 12.5px var(--bcc-fontBody);
}
.pp-btn:first-child { background: #1c1916; color: #f6f1ea; }
.pp-btn:disabled { opacity: .4; cursor: not-allowed; }
.pp-btn:focus-visible { outline: 2px solid #1c1916; outline-offset: 2px; }
.pp-conf { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #e0ede4; color: #1f4d3a; font-size: 12px; }
.pp-foot { margin-top: 18px; text-align: center; font: italic 11px var(--bcc-fontBody); color: #8a7f72; }

/* --- Одит лог */
.au-filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.au-frow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.au-frow > .mono { width: 38px; flex: none; }
.au-filters .inp { width: 100%; flex: none; }
.au-count { margin-bottom: 4px; }
.au-row { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 14px; padding: 11px 6px; border-top: 1px solid var(--bcc-line); }
.au-row.is-now { background: color-mix(in srgb, var(--bcc-accent) 8%, transparent); border-radius: 8px; }
.au-t { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; font-family: var(--bcc-fontMono); font-size: 11px; color: var(--bcc-dim); }
.au-t b { color: var(--bcc-text); font-weight: 600; }
.au-t em { margin-top: 3px; font-style: normal; }
.au-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.au-who { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 13px; }
.au-act { font-size: 13px; font-weight: 500; line-height: 1.4; overflow-wrap: normal; }
.au-act .dim { font-weight: 400; }
.au-diff { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font: 11.5px var(--bcc-fontMono); color: var(--bcc-dim); overflow-wrap: normal; }
.au-diff i { font-style: normal; color: var(--bcc-accent2); }

@media (max-width: 899px) {
  .lc-board { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); overflow-x: visible; }
  .pp-layout { grid-template-columns: minmax(0, 1fr); }
  .pp-list { max-height: 260px; }
  .pp-detail { justify-content: center; }
  .pp-owner { flex-basis: 100%; }
}
@media (max-width: 620px) {
  .drawer-back { align-items: flex-end; }
  .drawer { width: 100%; height: auto; max-height: 92vh; border-left: 0; border-top: 1px solid var(--bcc-lineBright); border-radius: 16px 16px 0 0; animation: toastin .25s ease; }
  .au-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .au-t { flex-direction: row; gap: 8px; align-items: center; }
  .au-t em { margin: 0; }
  .ap-actions .btn { flex: 1 1 auto; justify-content: center; }
  .pp-events li { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
:root[data-bcc-theme="light"] .drawer { box-shadow: -20px 0 50px rgba(0, 0, 0, .14); }
:root[data-bcc-theme="light"] .drawer-back { background: rgba(15, 15, 15, .32); }
:root[data-bcc-theme="light"] .pp-phone { box-shadow: 0 18px 40px rgba(0, 0, 0, .16); }

.pp-owner .kv .v, .lc-kv .kv .v { min-width: 0; text-align: right; overflow-wrap: normal; }
@media (max-width: 899px) {
  .nav-badge { position: absolute; top: 3px; right: 6px; margin: 0; }
}

.tile .val.val-sm { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.25; overflow-wrap: normal; }

/* ---------- projects / variants / quantities (opt-in, проектантски бизнес) ---------- */
.pj-board { grid-auto-columns: minmax(214px, 1fr); }
.pj-col { transition: border-color .15s ease, background .15s ease; }
.pj-col.is-over { border-color: color-mix(in srgb, var(--bcc-accent) 70%, transparent); background: color-mix(in srgb, var(--bcc-accent) 10%, transparent); }
.pj-colsum { font-size: 10.5px; color: var(--bcc-dim); margin: -4px 0 8px; }
.pj-card { cursor: grab; display: block; transition: border-color .15s ease, transform .15s ease, opacity .15s ease; }
.pj-card:hover { border-color: var(--bcc-lineBright); transform: translateY(-1px); }
.pj-card:focus-visible { outline: 2px solid var(--bcc-accent); outline-offset: 2px; }
.pj-card.is-drag { opacity: .45; cursor: grabbing; }
.pj-card.has-block { border-left: 3px solid var(--bcc-warn); }
.pj-thumb { height: 74px; margin: -2px -2px 8px; border-radius: 8px; background: center/cover no-repeat var(--bcc-line); }
.pj-client { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--bcc-dim); margin-top: 5px; }
.pj-wait { display: inline-block; margin-top: 7px; font-size: 10.5px; padding: 2px 8px; border-radius: 99px; color: var(--bcc-warn);
  border: 1px solid color-mix(in srgb, var(--bcc-warn) 45%, transparent); background: color-mix(in srgb, var(--bcc-warn) 10%, transparent); }
.pj-cover { flex: none; height: 170px; border-radius: 12px; margin-bottom: 12px; background: center/cover no-repeat var(--bcc-line); }

.vr-pick .chip { max-width: 100%; }
.vr-proj { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.vr-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); align-items: start; }
.vr-card { padding: 12px; display: flex; flex-direction: column; }
.vr-card.is-approved { border-color: color-mix(in srgb, var(--bcc-ok) 55%, transparent); }
.vr-mwrap { position: relative; margin-bottom: 12px; }
.vr-media { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; border: 0; padding: 0; background: center/cover no-repeat var(--bcc-line); cursor: zoom-in; }
.vr-plan { cursor: default; background: color-mix(in srgb, var(--bcc-text) 4%, transparent); display: flex; align-items: center; justify-content: center; }
.vr-letter { position: absolute; top: 8px; left: 8px; width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font: 800 14px var(--bcc-fontDisplay); color: #fff; background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); }
.vr-toggle { position: absolute; top: 8px; right: 8px; display: flex; border-radius: 8px; overflow: hidden; background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); }
.vr-toggle button { border: 0; background: transparent; color: rgba(255, 255, 255, .7); font: 500 11px var(--bcc-fontBody); padding: 5px 9px; cursor: pointer; }
.vr-toggle button.is-on { background: var(--bcc-accent); color: #fff; }
.vr-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.vr-head h3 { margin: 0; }
.vr-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--bcc-dim); margin-bottom: 10px; }
.vr-facts b { color: var(--bcc-text); font-weight: 600; }
.vr-comments { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.vr-cm { font-size: 12.5px; line-height: 1.45; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--bcc-text) 5%, transparent); border: 1px solid var(--bcc-line); }
.vr-cm.is-me { background: color-mix(in srgb, var(--bcc-accent) 12%, transparent); border-color: color-mix(in srgb, var(--bcc-accent) 35%, transparent); }
.vr-cm-h { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; margin-bottom: 3px; }
.vr-reply { display: flex; gap: 6px; }
.vr-reply .inp { flex: 1 1 auto; min-width: 0; padding: 6px 10px; font-size: 12.5px; }
.vr-big { display: block; width: 100%; border-radius: 10px; }
.vr-cmp { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--bcc-line); }
.vr-cmp > img, .vr-cmp-top img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.vr-cmp-top { position: absolute; inset: 0; clip-path: inset(0 50% 0 0); }
.vr-cmp-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #fff; box-shadow: 0 0 8px rgba(0, 0, 0, .5); pointer-events: none; }
.vr-cmp-l, .vr-cmp-r { position: absolute; top: 10px; font: 800 13px var(--bcc-fontDisplay); color: #fff; background: rgba(0, 0, 0, .55); padding: 3px 9px; border-radius: 7px; }
.vr-cmp-l { left: 10px; } .vr-cmp-r { right: 10px; }
.vr-range { width: 100%; margin-top: 10px; accent-color: var(--bcc-accent); }
.modal:has(.vr-cmp), .modal:has(.vr-big) { width: min(880px, 94vw); max-width: 94vw; }

.plan-svg { width: 100%; height: 100%; display: block; }
.plan-svg .pl-bg { fill: transparent; }
.plan-svg .pl-room { fill: color-mix(in srgb, var(--bcc-accent) 7%, transparent); stroke: var(--bcc-dim); stroke-width: .5; }
.plan-svg .pl-wall { fill: none; stroke: var(--bcc-text); stroke-width: 1.4; }
.plan-svg .pl-txt { fill: var(--bcc-text); font-family: var(--bcc-fontBody); font-weight: 600; text-anchor: middle; dominant-baseline: middle; }
.plan-svg .pl-area { fill: var(--bcc-faint); font-family: var(--bcc-fontMono); text-anchor: middle; dominant-baseline: middle; }

.qs-tbl td, .qs-tbl th { vertical-align: middle; }
.qs-sec td { font: 700 12.5px var(--bcc-fontDisplay); background: color-mix(in srgb, var(--bcc-accent) 9%, transparent); }
.qs-inp { width: 96px; padding: 4px 8px; text-align: right; font: 12.5px var(--bcc-fontMono); }
.qs-tbl tfoot td { font-weight: 600; border-top: 1px solid var(--bcc-line); }
.qs-grand td { font: 800 14px var(--bcc-fontDisplay); color: var(--bcc-accent2); }
.qs-empty { text-align: center; padding: 34px 20px; }
.qs-empty p { max-width: 520px; margin: 6px auto 16px; }
.qs-empty-ic { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  color: var(--bcc-accent2); background: color-mix(in srgb, var(--bcc-accent) 14%, transparent); }
.qs-log { margin-top: 14px; display: flex; flex-direction: column; gap: 4px; align-items: center; }

@media (max-width: 620px) {
  .vr-grid { grid-template-columns: minmax(0, 1fr); }
  .pj-cover { height: 130px; }
  .qs-inp { width: 76px; }
}

/* ---- opt-in: напомняния + последен разговор в сделките */
.rm-list { display: flex; flex-direction: column; gap: 8px; }
.rm-card { display: grid; grid-template-columns: 130px 1fr auto; gap: 12px; align-items: start; padding: 11px 13px; border-radius: 12px;
  border: 1px solid var(--bcc-line); background: color-mix(in srgb, var(--bcc-text) 3%, transparent); }
.rm-card.is-today { border-color: color-mix(in srgb, var(--bcc-accent) 55%, transparent); }
.rm-card.is-over { border-color: color-mix(in srgb, var(--bcc-warn) 60%, transparent); }
.rm-card.is-over .rm-when { color: var(--bcc-warn); }
.rm-card.is-done { opacity: .55; }
.rm-when { font-size: 11.5px; color: var(--bcc-accent2); padding-top: 2px; }
.rm-hot { display: inline-block; margin-top: 4px; font-size: 10px; padding: 1px 7px; border-radius: 99px; color: var(--bcc-warn);
  border: 1px solid color-mix(in srgb, var(--bcc-warn) 45%, transparent); }
.rm-client { font-weight: 700; font-size: 14px; margin-bottom: 3px; }
.rm-next { margin-top: 6px; font-size: 13px; }
.rm-next .lbl { display: block; font: 9.5px var(--bcc-fontMono); letter-spacing: .12em; text-transform: uppercase; color: var(--bcc-faint); margin-bottom: 2px; }
.rm-acts { display: flex; flex-direction: column; gap: 6px; align-items: stretch; min-width: 130px; }
.rm-acts a.btn { text-decoration: none; justify-content: center; }
.rm-form { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 10px; align-items: end; }
.rm-form label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rm-form .rm-wide { grid-column: 1 / 3; }
.rm-form input, .rm-form select { width: 100%; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--bcc-line);
  background: var(--bcc-panel); color: var(--bcc-text); font: inherit; font-size: 13px; }
.pj-prio { height: 4px; border-radius: 99px; margin-top: 7px; background: color-mix(in srgb, var(--bcc-text) 10%, transparent); overflow: hidden; }
.pj-prio i { display: block; height: 100%; background: linear-gradient(90deg, var(--bcc-accent), var(--bcc-accent2)); }
.pj-talk { margin: 12px 0; }
.pj-talk a.btn { text-decoration: none; }
.pj-talk-row { padding: 8px 0; border-bottom: 1px solid var(--bcc-line); font-size: 13px; }
.pj-talk-row:last-child { border-bottom: 0; }
@media (max-width: 720px) {
  .rm-card { grid-template-columns: 1fr; }
  .rm-acts { flex-direction: row; flex-wrap: wrap; min-width: 0; }
  .rm-form { grid-template-columns: 1fr; }
  .rm-form .rm-wide { grid-column: auto; }
}

/* ---- opt-in: календар на съдържанието */
.ct-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.ct-cal-h { font: 10px var(--bcc-fontMono); letter-spacing: .12em; text-transform: uppercase; color: var(--bcc-faint); padding: 0 4px; }
.ct-cal-d { min-height: 92px; padding: 6px; border-radius: 10px; border: 1px solid var(--bcc-line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ct-cal-d.is-today { border-color: color-mix(in srgb, var(--bcc-accent) 60%, transparent); }
.ct-cal-d.is-past { opacity: .6; }
.ct-ev { font-size: 11px; line-height: 1.3; padding: 3px 6px; border-radius: 6px; border-left: 3px solid var(--bcc-faint);
  background: color-mix(in srgb, var(--bcc-text) 5%, transparent); overflow: hidden; text-overflow: ellipsis; }
.ct-ev b { font-weight: 700; }
.ct-ev.is-published { border-left-color: var(--bcc-ok); }
.ct-ev.is-scheduled { border-left-color: var(--bcc-accent2); }
.ct-ev.is-draft { border-left-color: var(--bcc-warn); }
.ct-ev.is-video, .ct-ev.is-script, .ct-ev.is-rendered { border-left-color: #a78bfa; }
.ct-legend { display: flex; gap: 8px; flex-wrap: wrap; margin: -4px 0 10px; }
@media (max-width: 720px) { .ct-cal { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ct-cal-h { display: none; } }

/* config.orderDrawer - детайл на поръчка/пакет */
.kan-card.is-click { cursor: pointer; transition: border-color .15s, transform .15s; }
.kan-card.is-click:hover { border-color: color-mix(in srgb, var(--bcc-accent) 55%, transparent); transform: translateY(-1px); }
.od-prog { margin-bottom: 14px; }
.od-prog-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 7px; }
.od-prog-top span { color: var(--bcc-dim); }
.od-bar { height: 9px; border-radius: 99px; background: var(--bcc-line); overflow: hidden; }
.od-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--bcc-accent), var(--bcc-accent2)); }
.od-steps { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.od-step { font-size: 11.5px; padding: 4px 9px; border-radius: 99px; border: 1px solid var(--bcc-line); color: var(--bcc-faint); }
.od-step.done { color: var(--bcc-ok); border-color: color-mix(in srgb, var(--bcc-ok) 40%, transparent); }
.od-step.now { color: var(--bcc-onAccent, #fff); background: var(--bcc-accent); border-color: var(--bcc-accent); }
.od-hist { list-style: none; margin: 0 0 6px; padding: 0; }
.od-hist li { display: grid; grid-template-columns: 74px 1fr; gap: 10px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--bcc-line); }
.od-hist li:last-child { border-bottom: 0; }
.od .lc-h { margin: 16px 0 8px; }
.od > .od-prog:first-child { margin-top: 2px; }

/* ---- opt-in report blocks (funnel / program / extra) ---- */
.ct-ev.is-webinar { border-left-color: var(--bcc-accent); background: color-mix(in srgb, var(--bcc-accent) 10%, transparent); }
.ct-ev.is-shoot { border-left-color: var(--bcc-info); }
.ct-ev.is-call { border-left-color: var(--bcc-warn); }
.hbar.rb-wide { grid-template-columns: minmax(120px, 210px) minmax(0, 1fr) 128px; }
.rb-note { margin: -2px 0 6px 0; padding-left: 4px; }
.rb-mini { display: inline-block; vertical-align: middle; width: 56px; height: 7px; border-radius: 99px; background: color-mix(in srgb, var(--bcc-text) 9%, transparent); overflow: hidden; }
.rb-mini i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--bcc-accent), var(--bcc-accent2)); }
.rb-cmp .rb-big { font-family: var(--bcc-fontDisplay); font-weight: 800; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.1; margin-top: 6px; color: var(--bcc-accent2); }
.rb-cmp.bad .rb-big { color: var(--bcc-warn); }
.rb-cmp.ok .rb-big { color: var(--bcc-ok); }
.rb-checks { display: flex; flex-direction: column; gap: 4px; }
.rb-check { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 8px 4px; border-bottom: 1px solid var(--bcc-line); font-size: 13px; cursor: pointer; }
.rb-check:last-child { border-bottom: 0; }
.rb-check input { margin-top: 2px; accent-color: var(--bcc-accent); width: 16px; height: 16px; }
tr.rb-hl.ok td { background: color-mix(in srgb, var(--bcc-ok) 9%, transparent); }
tr.rb-hl.bad td { background: color-mix(in srgb, var(--bcc-warn) 10%, transparent); }
@media (max-width: 600px) { .hbar.rb-wide { grid-template-columns: minmax(80px, 1fr) 100px; } .hbar.rb-wide .track { grid-column: 1 / -1; } }

.rb-table table.tbl { min-width: 0; font-size: 12px; }
.rb-table table.tbl th, .rb-table table.tbl td { padding-left: 5px; padding-right: 5px; }
.rb-table table.tbl td:first-child { white-space: nowrap; }
.rb-table table.tbl td .strong { display: inline-block; min-width: 150px; }
