/* BitCargo · Личный кабинет клиента
   Классическая SaaS-сетка: header сверху, sidebar слева, контент справа.
   Цвета по .impeccable.md. Шрифт — Geist (вместо Involve лендинга),
   чтобы кабинет ощущался как product UI, а не маркетинг.
*/

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&display=swap');

:root {
  --bc-bg:           #141413;
  --bc-bg-2:         #1D1D1B;
  --bc-card:         #1F1F1D;
  --bc-card-hover:   #232321;
  --bc-card-strong:  #30302E;
  --bc-border:       rgba(194, 192, 182, 0.08);
  --bc-border-strong: rgba(194, 192, 182, 0.16);
  --bc-rule:         rgba(255, 255, 255, 0.04);

  --bc-text:         #C2C0B6;
  --bc-text-strong:  #FAF9F5;
  --bc-text-soft:    rgba(250, 249, 245, 0.65);
  --bc-text-mute:    rgba(250, 249, 245, 0.42);
  --bc-text-faint:   rgba(250, 249, 245, 0.22);

  --bc-blue:         #269FEB;
  --bc-blue-soft:    rgba(38, 159, 235, 0.14);
  --bc-blue-tint:    rgba(38, 159, 235, 0.06);
  --bc-blue-deep:    #0D86D4;
  --bc-green:        #DDF1A8;
  --bc-danger:       #FF6B6B;

  --bc-sans: 'Geist', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --bc-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --bc-ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --bc-radius-sm:  8px;
  --bc-radius:     12px;
  --bc-radius-lg:  16px;
  --bc-radius-xl:  20px;

  --bc-header-h: 64px;
  --bc-sidebar-w: 240px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { background: var(--bc-bg); }
body.bc {
  color: var(--bc-text);
  font-family: var(--bc-sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}
button { font-family: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--bc-blue); outline-offset: 2px; border-radius: 4px; }

/* ── Header ──────────────────────────────────────────────────────────── */
.bc-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--bc-header-h);
  background: rgba(20, 20, 19, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--bc-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 30;
}
.bc-header__left, .bc-header__right { display: flex; align-items: center; gap: 16px; }

.bc-logo { display: flex; align-items: center; gap: 10px; }
.bc-logo__img { height: 24px; width: auto; }
.bc-logo__text {
  font-size: 16px;
  font-weight: 600;
  color: var(--bc-text-strong);
  letter-spacing: -0.3px;
}
.bc-logo__sub {
  font-size: 11px;
  color: var(--bc-text-mute);
  letter-spacing: 0.04em;
  margin-left: 6px;
  padding-left: 10px;
  border-left: 1px solid var(--bc-border);
}

.bc-userchip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 6px 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bc-border);
  border-radius: 50px;
}
.bc-userchip__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bc-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}
.bc-userchip__info { display: flex; flex-direction: column; line-height: 1.2; }
.bc-userchip__name { font-size: 13px; color: var(--bc-text-strong); font-weight: 500; }
.bc-userchip__meta {
  font-size: 11px;
  color: var(--bc-text-mute);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 1px;
}
.bc-userchip__dot { color: var(--bc-text-faint); }
.bc-plan-badge {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 9.5px;
  background: var(--bc-blue-soft);
  color: var(--bc-blue);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.bc-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bc-text-soft);
  transition: background 160ms var(--bc-ease-out), color 160ms var(--bc-ease-out);
}
.bc-icon-btn:hover { background: rgba(255,255,255,0.06); color: var(--bc-text-strong); }

/* ── Sidebar ────────────────────────────────────────────────────────── */
.bc-sidebar {
  position: fixed;
  top: var(--bc-header-h);
  left: 0;
  bottom: 0;
  width: var(--bc-sidebar-w);
  background: var(--bc-bg);
  border-right: 1px solid var(--bc-border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.bc-nav { display: flex; flex-direction: column; gap: 2px; }
.bc-nav__item {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--bc-radius-sm);
  font-size: 14px;
  color: var(--bc-text-soft);
  transition: background 160ms var(--bc-ease-out), color 160ms var(--bc-ease-out);
  position: relative;
}
.bc-nav__item:hover { background: rgba(255,255,255,0.04); color: var(--bc-text-strong); }
.bc-nav__item.is-active {
  background: rgba(255,255,255,0.05);
  color: var(--bc-text-strong);
}
.bc-nav__item.is-active::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--bc-blue);
  border-radius: 0 2px 2px 0;
}
.bc-nav__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--bc-text-mute);
  transition: color 160ms var(--bc-ease-out);
}
.bc-nav__item:hover .bc-nav__icon,
.bc-nav__item.is-active .bc-nav__icon { color: var(--bc-text-strong); }
.bc-nav__item.is-active .bc-nav__icon { color: var(--bc-blue); }
.bc-nav__label { font-weight: 500; letter-spacing: -0.1px; }
.bc-nav__pill {
  font-size: 11px;
  color: var(--bc-text-soft);
  background: rgba(255,255,255,0.06);
  padding: 1px 7px;
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
}

.bc-sidebar__foot {
  padding-top: 16px;
  border-top: 1px solid var(--bc-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bc-foot-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--bc-text-mute);
  letter-spacing: 0.01em;
}
.bc-foot-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bc-green);
}
.bc-foot-link {
  font-size: 12px;
  color: var(--bc-text-soft);
  transition: color 160ms var(--bc-ease-out);
}
.bc-foot-link:hover { color: var(--bc-blue); }

/* ── Main ────────────────────────────────────────────────────────────── */
.bc-main {
  margin-top: var(--bc-header-h);
  margin-left: var(--bc-sidebar-w);
  padding: 32px clamp(20px, 4vw, 48px) 80px;
  min-height: calc(100dvh - var(--bc-header-h));
  background: var(--bc-bg);
}

.bc-section { display: none; }
.bc-section.is-active { display: block; animation: bc-fade .35s var(--bc-ease-out) both; }
@keyframes bc-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.bc-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.bc-page-title {
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 600;
  color: var(--bc-text-strong);
  letter-spacing: -0.6px;
  line-height: 1.15;
}
.bc-page-sub {
  font-size: 14px;
  color: var(--bc-text-soft);
  margin-top: 6px;
  max-width: 560px;
}

.bc-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bc-blue);
  background: var(--bc-blue-soft);
  padding: 5px 10px;
  border-radius: 20px;
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
.bc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.1px;
  border: 1px solid transparent;
  transition: background 160ms var(--bc-ease-out), border-color 160ms var(--bc-ease-out), color 160ms var(--bc-ease-out), transform 160ms var(--bc-ease-out);
  white-space: nowrap;
}
.bc-btn--primary { background: var(--bc-blue); color: #fff; }
.bc-btn--primary:hover:not(:disabled) { background: var(--bc-blue-deep); transform: translateY(-1px); }
.bc-btn--primary:disabled { opacity: 0.5; cursor: not-allowed; }
.bc-btn--ghost {
  background: transparent;
  color: var(--bc-text-strong);
  border-color: var(--bc-border-strong);
}
.bc-btn--ghost:hover { background: rgba(255,255,255,0.04); border-color: var(--bc-text-mute); }
.bc-btn--danger {
  background: transparent;
  color: var(--bc-danger);
  border-color: rgba(255, 107, 107, 0.3);
}
.bc-btn--danger:hover { background: rgba(255, 107, 107, 0.08); border-color: var(--bc-danger); }
.bc-btn--text {
  padding: 6px 0;
  background: transparent;
  color: var(--bc-text-soft);
  border: none;
  font-size: 13px;
  font-weight: 500;
}
.bc-btn--text:hover { color: var(--bc-blue); }
.bc-btn--small { padding: 7px 12px; font-size: 12px; }

/* ── Card ────────────────────────────────────────────────────────────── */
.bc-card {
  background: var(--bc-card);
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius-lg);
  padding: 24px;
  transition: border-color 200ms var(--bc-ease-out);
}
.bc-card:hover { border-color: var(--bc-border-strong); }
.bc-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.bc-card__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--bc-text-strong);
  letter-spacing: -0.2px;
}
.bc-card__sub {
  font-size: 12px;
  color: var(--bc-text-mute);
  margin-top: 3px;
}
.bc-card__text {
  font-size: 13px;
  color: var(--bc-text-soft);
  line-height: 1.6;
}
.bc-card__text a {
  color: var(--bc-blue);
  text-decoration: underline;
  text-decoration-color: rgba(38,159,235,0.4);
  text-underline-offset: 2px;
}
.bc-card__text a:hover { text-decoration-color: var(--bc-blue); }

/* ── Stat grid ───────────────────────────────────────────────────────── */
.bc-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.bc-stat {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bc-stat[data-tone="brand"] {
  background: var(--bc-blue-tint);
  border-color: rgba(38,159,235,0.25);
}
.bc-stat[data-tone="brand"] .bc-stat__value { color: var(--bc-blue); }
.bc-stat__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bc-text-mute);
}
.bc-stat__value {
  font-size: 36px;
  font-weight: 600;
  color: var(--bc-text-strong);
  letter-spacing: -1.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.bc-stat__hint { font-size: 12px; color: var(--bc-text-mute); }

@media (max-width: 1200px) {
  .bc-stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .bc-stat-grid { grid-template-columns: 1fr; }
}

/* ── Row layouts ────────────────────────────────────────────────────── */
.bc-row { display: grid; gap: 16px; }
.bc-row--7-3 { grid-template-columns: 7fr 3fr; }
.bc-row--6-4 { grid-template-columns: 6fr 4fr; }

@media (max-width: 980px) {
  .bc-row--7-3, .bc-row--6-4 { grid-template-columns: 1fr; }
}

/* ── Chart 7-day ────────────────────────────────────────────────────── */
.bc-chart {
  display: flex;
  align-items: flex-end;
  height: 200px;
}
.bc-chart__bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  width: 100%;
  height: 100%;
  align-items: end;
  position: relative;
  padding-top: 24px;
}
.bc-chart__bar {
  position: relative;
  border-radius: 4px 4px 0 0;
  background: rgba(255,255,255,0.08);
  transition: background 160ms var(--bc-ease-out);
  min-height: 4px;
}
.bc-chart__bar:hover { background: var(--bc-blue); }
.bc-chart__bar::after {
  content: attr(data-count);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, -4px);
  font-size: 11px;
  color: var(--bc-text-soft);
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity 160ms var(--bc-ease-out);
}
.bc-chart__bar:hover::after { opacity: 1; }
.bc-chart__bar-day {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--bc-text-mute);
  margin-top: 6px;
}

.bc-empty {
  font-size: 13px;
  color: var(--bc-text-mute);
  text-align: center;
  width: 100%;
  align-self: center;
}

/* ── Actions list ───────────────────────────────────────────────────── */
.bc-actions { display: flex; flex-direction: column; gap: 8px; }
.bc-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--bc-radius);
  background: rgba(255,255,255,0.025);
  border: 1px solid transparent;
  transition: background 160ms var(--bc-ease-out), border-color 160ms var(--bc-ease-out);
  text-align: left;
}
.bc-action:hover {
  background: rgba(38,159,235,0.05);
  border-color: rgba(38,159,235,0.18);
}
.bc-action:hover .bc-action__arrow { color: var(--bc-blue); transform: translateX(3px); }
.bc-action__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.bc-action__title { font-size: 14px; color: var(--bc-text-strong); font-weight: 500; }
.bc-action__sub { font-size: 12px; color: var(--bc-text-mute); }
.bc-action__arrow {
  color: var(--bc-text-mute);
  font-size: 18px;
  flex-shrink: 0;
  transition: color 160ms var(--bc-ease-out), transform 200ms var(--bc-ease-out);
}

/* ── Bots ────────────────────────────────────────────────────────────── */
.bc-empty-state {
  background: var(--bc-card);
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius-lg);
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
@media (max-width: 980px) {
  .bc-empty-state { grid-template-columns: 1fr; gap: 36px; padding: 28px; }
}
.bc-empty-state__title {
  font-size: 22px;
  font-weight: 600;
  color: var(--bc-text-strong);
  letter-spacing: -0.3px;
  margin-bottom: 18px;
  line-height: 1.25;
}
.bc-empty-state__steps {
  list-style: none;
  counter-reset: bc-step;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.bc-empty-state__steps li {
  counter-increment: bc-step;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  align-items: start;
}
.bc-empty-state__steps li::before {
  content: counter(bc-step);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bc-blue-soft);
  color: var(--bc-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.bc-empty-state__steps li > div { min-width: 0; }
.bc-empty-state__steps strong {
  font-size: 14px;
  color: var(--bc-text-strong);
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}
.bc-empty-state__steps p {
  font-size: 13px;
  color: var(--bc-text-soft);
  line-height: 1.55;
}
.bc-empty-state__steps code {
  font-family: inherit;
  font-size: 0.92em;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--bc-border);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--bc-text-strong);
}

.bc-form-card {
  background: var(--bc-bg-2);
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius);
  padding: 24px;
}
.bc-form-card__title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bc-text-mute);
  margin-bottom: 18px;
}
.bc-field { margin-bottom: 18px; }
.bc-field__label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--bc-text-soft);
  margin-bottom: 6px;
}
.bc-field__input,
.bc-field__textarea,
.bc-field__select {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: var(--bc-text-strong);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius-sm);
  padding: 11px 14px;
  outline: none;
  transition: border-color 160ms var(--bc-ease-out), background 160ms var(--bc-ease-out);
}
.bc-field__textarea { min-height: 84px; resize: vertical; }
.bc-field__input:focus,
.bc-field__textarea:focus,
.bc-field__select:focus { border-color: var(--bc-blue); background: rgba(38,159,235,0.04); }
.bc-field__input::placeholder, .bc-field__textarea::placeholder { color: var(--bc-text-faint); }
.bc-field__hint {
  font-size: 11px;
  color: var(--bc-text-mute);
  margin-top: 6px;
}

.bc-form-status {
  margin-top: 12px;
  font-size: 13px;
  min-height: 20px;
  color: var(--bc-text-mute);
}
.bc-form-status.is-ok { color: var(--bc-green); }
.bc-form-status.is-err { color: var(--bc-danger); }
.bc-form-status .bc-flash-success {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--bc-green);
}
.bc-flash-success::before {
  content: '✓';
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bc-green);
  color: #141413;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.bc-toggle-form {
  background: var(--bc-card);
  border: 1px dashed var(--bc-border-strong);
  border-radius: var(--bc-radius-lg);
  padding: 28px;
  margin-bottom: 16px;
}

/* Bot list */
.bc-botlist { display: flex; flex-direction: column; gap: 12px; }
.bc-botcard {
  background: var(--bc-card);
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius-lg);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  transition: border-color 200ms var(--bc-ease-out);
}
.bc-botcard:hover { border-color: var(--bc-border-strong); }
.bc-botcard__top { display: flex; align-items: center; gap: 14px; }
.bc-botcard__avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bc-blue-soft);
  color: var(--bc-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.bc-botcard__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bc-botcard__name {
  font-size: 16px;
  font-weight: 600;
  color: var(--bc-text-strong);
  letter-spacing: -0.2px;
}
.bc-botcard__handle {
  font-size: 12px;
  color: var(--bc-text-mute);
  font-variant-numeric: tabular-nums;
}
.bc-botcard__welcome {
  font-size: 12px;
  color: var(--bc-text-soft);
  line-height: 1.5;
  margin-top: 6px;
}
.bc-botcard__meta {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 12px;
  color: var(--bc-text-soft);
}
.bc-botcard__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.bc-botcard__status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bc-text-faint);
}
.bc-botcard__status--on::before { background: var(--bc-green); }
.bc-botcard__actions { display: flex; gap: 8px; align-items: center; }
.bc-botcard__edit {
  display: none;
  grid-column: 1 / -1;
  margin-top: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--bc-border);
}
.bc-botcard.is-editing { grid-template-columns: 1fr; }
.bc-botcard.is-editing .bc-botcard__edit { display: block; }
.bc-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Tabs inside bot edit (Brand · Payment) */
.bc-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  padding: 3px;
  background: var(--bc-bg);
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius-sm);
  width: max-content;
  max-width: 100%;
}
.bc-tab {
  font-size: 13px;
  font-weight: 500;
  color: var(--bc-text-soft);
  padding: 7px 14px;
  border-radius: 6px;
  transition: background 160ms var(--bc-ease-out), color 160ms var(--bc-ease-out);
}
.bc-tab:hover { color: var(--bc-text-strong); }
.bc-tab.is-active {
  background: var(--bc-card-strong);
  color: var(--bc-text-strong);
}

/* Payment block (collapsible visual section) */
.bc-pay-block {
  padding: 16px;
  background: var(--bc-bg);
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius);
  margin-bottom: 16px;
}
.bc-pay-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--bc-text-strong);
}
.bc-pay-status {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
}
.bc-pay-status[data-state="on"] {
  color: var(--bc-green);
  background: rgba(221, 241, 168, 0.08);
}
.bc-pay-status[data-state="off"] {
  color: var(--bc-text-mute);
  background: rgba(255, 255, 255, 0.04);
}
@media (max-width: 720px) {
  .bc-botcard { grid-template-columns: 1fr; }
  .bc-botcard__actions { justify-content: flex-start; }
  .bc-edit-grid { grid-template-columns: 1fr; }
}

/* ── Users / CRM ────────────────────────────────────────────────────── */
.bc-userlist-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.1fr) 1.5fr;
  background: var(--bc-card);
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius-lg);
  overflow: hidden;
  min-height: 540px;
}
.bc-userlist-col {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--bc-border);
}
.bc-userlist-col:last-child { border-right: 0; }
.bc-userlist__head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--bc-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bc-text-mute);
}
.bc-userlist__rows {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--bc-border-strong) transparent;
}
.bc-userlist__rows::-webkit-scrollbar { width: 6px; }
.bc-userlist__rows::-webkit-scrollbar-thumb { background: var(--bc-border-strong); border-radius: 3px; }

.bc-userrow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 20px;
  border-bottom: 1px solid var(--bc-rule);
  cursor: pointer;
  transition: background 160ms var(--bc-ease-out);
}
.bc-userrow:hover { background: rgba(255,255,255,0.025); }
.bc-userrow.is-selected { background: var(--bc-blue-tint); border-left: 2px solid var(--bc-blue); padding-left: 18px; }
.bc-userrow__name { font-size: 13px; color: var(--bc-text-strong); font-weight: 500; }
.bc-userrow__handle { font-size: 11px; color: var(--bc-text-mute); margin-top: 2px; }
.bc-userrow__meta {
  font-size: 11px;
  color: var(--bc-text-mute);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.bc-userrow__count { color: var(--bc-text-strong); }

.bc-chatpane {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}
.bc-chatpane__placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 32px;
  color: var(--bc-text-mute);
  gap: 8px;
}
.bc-chatpane__placeholder strong {
  font-size: 16px;
  color: var(--bc-text-strong);
  font-weight: 600;
}
.bc-chatpane__placeholder span { font-size: 13px; max-width: 280px; line-height: 1.5; }

.bc-chatpane__hdr {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--bc-border);
}
.bc-chatpane__hdr-name { font-size: 16px; font-weight: 600; color: var(--bc-text-strong); }
.bc-chatpane__hdr-sub { font-size: 12px; color: var(--bc-text-mute); margin-top: 3px; }

.bc-chatmsg { display: flex; flex-direction: column; gap: 5px; }
.bc-chatmsg__role {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bc-text-faint);
}
.bc-chatmsg--assistant .bc-chatmsg__role { color: var(--bc-blue); }
.bc-chatmsg__body {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--bc-text-strong);
  white-space: pre-wrap;
  word-wrap: break-word;
  padding: 12px 14px;
  background: rgba(255,255,255,0.025);
  border-radius: var(--bc-radius-sm);
  border-left: 2px solid var(--bc-border-strong);
}
.bc-chatmsg--assistant .bc-chatmsg__body { border-left-color: var(--bc-blue); }
.bc-chatmsg__when {
  font-size: 10px;
  color: var(--bc-text-faint);
  padding-left: 14px;
}

@media (max-width: 880px) {
  .bc-userlist-grid { grid-template-columns: 1fr; min-height: auto; }
  .bc-userlist-col { border-right: 0; border-bottom: 1px solid var(--bc-border); }
}

/* ── Products ───────────────────────────────────────────────────────── */
.bc-products-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}
@media (max-width: 980px) { .bc-products-grid { grid-template-columns: 1fr; } }

.bc-products-list { display: flex; flex-direction: column; gap: 10px; }
.bc-product {
  background: var(--bc-card);
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius);
  padding: 14px;
  display: grid;
  grid-template-columns: 72px 1fr auto auto;
  gap: 16px;
  align-items: center;
  transition: border-color 200ms var(--bc-ease-out);
}
.bc-product:hover { border-color: var(--bc-border-strong); }
.bc-product__img {
  width: 72px;
  height: 72px;
  border-radius: var(--bc-radius-sm);
  object-fit: cover;
  background: var(--bc-bg-2);
}
.bc-product__noimg {
  width: 72px;
  height: 72px;
  border-radius: var(--bc-radius-sm);
  background: var(--bc-bg-2);
  border: 1px dashed var(--bc-border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bc-text-faint);
}
.bc-product__info { min-width: 0; }
.bc-product__title {
  font-size: 14px;
  font-weight: 500;
  color: var(--bc-text-strong);
}
.bc-product__sub {
  font-size: 12px;
  color: var(--bc-text-mute);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bc-product__price {
  font-size: 16px;
  font-weight: 600;
  color: var(--bc-text-strong);
  font-variant-numeric: tabular-nums;
}
.bc-product__price small {
  font-size: 11px;
  color: var(--bc-text-mute);
  font-weight: 400;
  margin-left: 4px;
}

/* ── Settings · Apple-style preferences ─────────────────────────────── */
.bc-prefs {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 0 64px;
}

.bc-prefs__title {
  margin-bottom: 32px;
  padding: 0 4px;
}
.bc-prefs__title h1 {
  font-size: 30px;
  font-weight: 600;
  color: var(--bc-text-strong);
  letter-spacing: -0.6px;
  line-height: 1.15;
}
.bc-prefs__title p {
  font-size: 14px;
  color: var(--bc-text-soft);
  margin-top: 6px;
}

.bc-pref-group {
  margin-bottom: 32px;
}
.bc-pref-group__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bc-text-mute);
  margin: 0 16px 10px;
}
.bc-pref-group__label--danger { color: rgba(255, 107, 107, 0.55); }
.bc-pref-group__hint {
  font-size: 12px;
  color: var(--bc-text-mute);
  margin: 10px 16px 0;
  line-height: 1.55;
}
.bc-pref-group__hint a {
  color: var(--bc-blue);
  text-decoration: underline;
  text-decoration-color: rgba(38,159,235,0.4);
  text-underline-offset: 2px;
}
.bc-pref-group__hint a:hover { text-decoration-color: var(--bc-blue); }

.bc-pref-card {
  background: var(--bc-card);
  border: 1px solid var(--bc-border);
  border-radius: 14px;
  overflow: hidden;
}

/* Profile hero */
.bc-pref-card--profile {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  margin-bottom: 32px;
}
.bc-pref-profile__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bc-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
  font-family: var(--bc-sans);
}
.bc-pref-profile__info { min-width: 0; }
.bc-pref-profile__name {
  font-size: 17px;
  font-weight: 600;
  color: var(--bc-text-strong);
  letter-spacing: -0.2px;
}
.bc-pref-profile__email {
  font-size: 13px;
  color: var(--bc-text-mute);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bc-pref-edit {
  font-size: 13px;
  font-weight: 500;
  color: var(--bc-blue);
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 160ms var(--bc-ease-out);
}
.bc-pref-edit:hover:not(:disabled) { background: var(--bc-blue-soft); }
.bc-pref-edit:disabled { color: var(--bc-text-faint); cursor: not-allowed; }

/* Row inside a group card */
.bc-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  min-height: 48px;
  border-bottom: 0.5px solid var(--bc-rule);
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 14px;
}
.bc-pref-row:last-child { border-bottom: 0; }

button.bc-pref-row,
a.bc-pref-row {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  transition: background 140ms var(--bc-ease-out);
}
button.bc-pref-row:hover:not(:disabled),
a.bc-pref-row:hover { background: rgba(255,255,255,0.03); }
button.bc-pref-row:active:not(:disabled),
a.bc-pref-row:active { background: rgba(255,255,255,0.05); }
button.bc-pref-row:disabled { cursor: not-allowed; opacity: 0.5; }

.bc-pref-row--center { justify-content: center; }
.bc-pref-row--action .bc-pref-row__label {
  font-weight: 500;
}

.bc-pref-row__label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--bc-text-strong);
  font-size: 14px;
  min-width: 0;
}
.bc-pref-row__label--blue { color: var(--bc-blue); }
.bc-pref-row__sub {
  font-size: 12px;
  color: var(--bc-text-mute);
  font-weight: 400;
  letter-spacing: -0.05px;
}
.bc-pref-row__value {
  font-size: 14px;
  color: var(--bc-text-strong);
  text-align: right;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bc-pref-row__value--muted { color: var(--bc-text-mute); }
.bc-pref-row__chev {
  color: var(--bc-text-faint);
  display: inline-flex;
  align-items: center;
}

.bc-pref-plan {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bc-blue);
  background: var(--bc-blue-soft);
  padding: 3px 9px;
  border-radius: 6px;
}

/* iOS-style toggle */
.bc-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
}
.bc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.bc-switch span {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.08);
  border: 0.5px solid rgba(255,255,255,0.06);
  border-radius: 999px;
  transition: background 220ms var(--bc-ease-out);
  cursor: pointer;
}
.bc-switch span::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 21px;
  height: 21px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4), 0 1px 1px rgba(0,0,0,0.2);
  transition: transform 240ms var(--bc-ease-out);
}
.bc-switch input:checked + span { background: var(--bc-blue); border-color: var(--bc-blue); }
.bc-switch input:checked + span::before { transform: translateX(18px); }
.bc-switch input:disabled + span { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 560px) {
  .bc-prefs { padding: 0 0 64px; }
  .bc-pref-row { padding: 12px 14px; }
  .bc-pref-card--profile { grid-template-columns: auto 1fr; gap: 12px; padding: 18px; }
  .bc-pref-card--profile .bc-pref-edit { grid-column: 1 / -1; justify-self: start; padding: 8px 14px; background: rgba(255,255,255,0.05); }
}

/* ── Login page ─────────────────────────────────────────────────────── */
.bc--login {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  background: var(--bc-bg);
}
@media (max-width: 880px) { .bc--login { grid-template-columns: 1fr; } }

.bc-login-left {
  background: var(--bc-bg-2);
  padding: clamp(40px, 5vw, 72px) clamp(24px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--bc-border);
}
.bc-login-left::before { content: none; }
.bc-login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.bc-login-brand img { height: 28px; }
.bc-login-brand span { font-size: 18px; font-weight: 600; color: var(--bc-text-strong); }
.bc-login-brand small {
  font-size: 11px;
  color: var(--bc-text-mute);
  margin-left: 8px;
  padding-left: 10px;
  border-left: 1px solid var(--bc-border);
}

.bc-login-hero {
  position: relative;
  z-index: 1;
  margin: clamp(48px, 8vw, 96px) 0;
  max-width: 440px;
}
.bc-login-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bc-blue);
  background: var(--bc-blue-soft);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 22px;
}
.bc-login-title {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 600;
  color: var(--bc-text-strong);
  letter-spacing: -1.5px;
  line-height: 1.05;
  margin-bottom: 20px;
}
.bc-login-sub {
  font-size: 15px;
  color: var(--bc-text-soft);
  line-height: 1.7;
}

.bc-login-foot { position: relative; z-index: 1; }
.bc-login-foot-links { display: flex; gap: 24px; flex-wrap: wrap; }
.bc-login-foot-links a {
  font-size: 13px;
  color: var(--bc-text-soft);
  transition: color 160ms var(--bc-ease-out);
}
.bc-login-foot-links a:hover { color: var(--bc-blue); }
.bc-login-copy {
  font-size: 11px;
  color: var(--bc-text-faint);
  margin-top: 14px;
  letter-spacing: 0.04em;
}

.bc-login-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(40px, 5vw, 80px) clamp(24px, 5vw, 48px);
}
.bc-login-form {
  width: 100%;
  max-width: 380px;
}
.bc-login-form h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--bc-text-strong);
  letter-spacing: -0.4px;
  margin-bottom: 8px;
}
.bc-login-form p.bc-login-form__sub {
  font-size: 13px;
  color: var(--bc-text-soft);
  margin-bottom: 32px;
}
.bc-login-error {
  font-size: 13px;
  color: var(--bc-danger);
  min-height: 20px;
  margin-top: 12px;
  opacity: 0;
  transition: opacity 160ms var(--bc-ease-out);
}
.bc-login-error.is-visible { opacity: 1; }
.bc-login-legal {
  margin-top: 22px;
  font-size: 11px;
  color: var(--bc-text-mute);
  line-height: 1.6;
}

/* ── Mobile sidebar ─────────────────────────────────────────────────── */
@media (max-width: 880px) {
  :root { --bc-sidebar-w: 0px; }
  .bc-sidebar { display: none; }
  .bc-main { margin-left: 0; padding: 20px 16px 64px; }
  .bc-header__left .bc-logo__sub { display: none; }
  .bc-userchip__info { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
