/* Скопировано из RoboWB скриптом scripts/sync_robowb_brand.py — руками не править */
@font-face{font-family:'Golos Text';font-style:normal;font-weight:400 600;font-display:swap;src:url(/static/brand/golos-cyr.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Golos Text';font-style:normal;font-weight:400 600;font-display:swap;src:url(/static/brand/golos-lat.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Unbounded';font-style:normal;font-weight:500 700;font-display:swap;src:url(/static/brand/unb-cyr.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Unbounded';font-style:normal;font-weight:500 700;font-display:swap;src:url(/static/brand/unb-lat.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400 600;font-display:swap;src:url(/static/brand/jb-cyr.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400 600;font-display:swap;src:url(/static/brand/jb-lat.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Thesignature';font-style:normal;font-weight:400;font-display:block;src:url(/static/brand/thesignature.ttf) format('truetype')}
:root{--rb-font-heading:'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;--rb-font-body:'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;--rb-font-brand:'Unbounded', system-ui, sans-serif;--rb-font-mono:'JetBrains Mono', ui-monospace, monospace;--rb-weight-heading:600;--rb-weight-body:400;--rb-radius-sm:12px;--rb-radius-xs:5px;--rb-radius-md:14px;--rb-radius-lg:16px;--rb-radius-xl:20px;--rb-radius-pill:999px;--rb-border-frame:2px;--rb-corner-size:8px;--rb-corner-stroke:1px;--rb-corner-inset:-1px;--rb-check-size:17px;--rb-space-1:4px;--rb-space-2:8px;--rb-space-3:12px;--rb-space-4:16px;--rb-space-6:24px;--rb-space-8:32px;--rb-space-12:48px;--rb-ease:.18s ease;--rb-blur:blur(22px) saturate(1.7);--rb-shadow-hover:0 6px 18px color-mix(in srgb, var(--rb-ink) 10%, transparent);--rb-shadow-card:0 4px 14px color-mix(in srgb, var(--rb-ink) 12%, transparent);--rb-shadow-lift:0 10px 30px color-mix(in srgb, var(--rb-ink) 12%, transparent);--rb-shadow-glass:0 14px 38px color-mix(in srgb, var(--rb-ink) 15%, transparent);--rb-shadow-modal:0 30px 70px color-mix(in srgb, var(--rb-ink) 32%, transparent);--rb-glass-bg:color-mix(in srgb, var(--rb-canvas) 68%, transparent);--rb-glass-border:color-mix(in srgb, var(--rb-ink) 10%, transparent);--rb-composer-glass-opacity:80%;--rb-composer-glass-blur:12px;--rb-composer-glass-saturation:1.14;--rb-composer-glass-bg:color-mix(in srgb, var(--rb-canvas) var(--rb-composer-glass-opacity), transparent);--rb-icon-chevron:14px;--rb-logo-gradient:linear-gradient(100deg, #7C3AED, #C026D3);--rb-page:#F4F2ED;--rb-sidebar:#EAE6DD;--rb-canvas:#FFFFFF;--rb-surface-soft:#FAF8F4;--rb-ink:#191622;--rb-muted:#5F5A6B;--rb-faint:#8B8598;--rb-line:#DAD5CA;--rb-accent:#E0483C;--rb-accent-strong:#B02E23;--rb-accent-soft:#FBE7E4;--rb-brand-2:#C026D3;--rb-good:#0F7A4F;--rb-good-soft:#E1F2E9;--rb-warn:#B45309;--rb-warn-soft:#FBEDD8;--rb-bad:#C0244A;--rb-bad-soft:#FBE4E9;--rb-info:#1D6FD1;--rb-info-soft:#E2ECFB;--rb-chart-1:#3B44A5;--rb-chart-2:#0C7FA6;--rb-chart-3:#8A6D1C;--rb-chart-4:#B0348F;--rb-chart-5:#C4552D;--rb-chart-grid:#EFEDE7;}
/* RoboWB · общий слой компонентов кабинета.
   Значения берутся только из токенов (--rb-*), которые объявляет ui/design_tokens.json.
   Правило формы: крупные рамы — прямые углы и рамка 2px; всё, к чему тянется рука,
   скруглено; уголковая засечка помечает выбор и призыв к действию; круг — у аватаров,
   переключателей и кнопки отправки. */

*, *::before, *::after { box-sizing: border-box }

body {
  margin: 0;
  background: var(--rb-page);
  color: var(--rb-ink);
  font: var(--rb-weight-body) 15px/1.5 var(--rb-font-body);
}

button, input, textarea, select { font: inherit; color: inherit }
button, a { -webkit-tap-highlight-color: transparent }
a { color: var(--rb-accent) }
a:hover { color: var(--rb-accent-strong) }
/* Numeric values are entered as text; native stepper arrows are unused and
   made dense control panels look like increment/decrement tools. */
input[type="number"] { -moz-appearance: textfield }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none }
img { display: block; max-width: 100% }

/* иконки приходят из artifacts/render/icons.py с классом .ic */
.ic {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rb-btn .ic { width: 18px; height: 18px }
.rb-btn--icon .ic, .rb-composer__tool .ic { width: 20px; height: 20px }
.rb-nav-item .ic { width: 20px; height: 20px }
.rb-nav-item--chat .ic { width: 16px; height: 16px }
.rb-seller .ic { width: 13px; height: 13px }
.rb-chip .ic, .rb-composer__file .ic { width: 14px; height: 14px }
.rb-toast__icon .ic { width: 17px; height: 17px; stroke-width: 1.8 }
.rb-agent__stop .ic { width: 13px; height: 13px; fill: currentColor; stroke: none }
.rb-product__media .ic { width: 30px; height: 30px; stroke-width: 1.2 }
.rb-empty .ic { width: 34px; height: 34px; stroke-width: 1.3 }
.rb-delta .ic { width: 16px; height: 16px; stroke-width: 1.8 }
.rb-tabbar .ic, .bb-tabbar .ic { width: 20px; height: 20px }
::selection { background: var(--rb-accent-soft) }
:focus-visible { outline: 2px solid var(--rb-accent); outline-offset: 2px }

/* ---------- логотип: знак + Unbounded, ровно как на лендинге ---------- */
.rb-logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: inherit }
.rb-logo__mark { height: 20px; width: auto }
.rb-logo__word {
  font: 700 18px/1 var(--rb-font-brand);
  letter-spacing: .02em;
  white-space: nowrap;
}
.rb-logo__word span {
  background: var(--rb-logo-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.rb-logo--mono .rb-logo__mark { filter: grayscale(1) brightness(0) }
.rb-logo--mono .rb-logo__word span { background: none; color: var(--rb-ink) }
.rb-logo--sm .rb-logo__mark { height: 17px }
.rb-logo--sm .rb-logo__word { font-size: 16px }
.rb-logo--lg .rb-logo__mark { height: 30px }
.rb-logo--lg .rb-logo__word { font-size: 26px }
.rb-logo--on-dark .rb-logo__word { color: var(--rb-canvas) }

/* ---------- рамы и поверхности ---------- */
.rb-frame {
  border: var(--rb-border-frame) solid var(--rb-ink);
  border-radius: 0;
  background: var(--rb-canvas);
}
.rb-panel {
  border: 1px solid var(--rb-line);
  border-radius: 0;
  background: var(--rb-canvas);
}
.rb-soft {
  border: 1px solid var(--rb-line);
  border-radius: var(--rb-radius-md);
  background: var(--rb-canvas);
}
.rb-hr { height: var(--rb-border-frame); border: 0; background: var(--rb-ink) }
.rb-glass {
  background: var(--rb-glass-bg);
  backdrop-filter: var(--rb-blur);
  -webkit-backdrop-filter: var(--rb-blur);
  border: 1px solid var(--rb-glass-border);
  box-shadow: var(--rb-shadow-glass);
}

/* ---------- уголковая засечка ---------- */
.rb-corner { position: relative; --rb-corner-color: color-mix(in srgb, var(--rb-ink) 78%, transparent) }
.rb-corner::after {
  content: "";
  position: absolute;
  inset: var(--rb-corner-inset);
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(var(--rb-corner-color), var(--rb-corner-color)) left top / var(--rb-corner-size) var(--rb-corner-stroke) no-repeat,
    linear-gradient(var(--rb-corner-color), var(--rb-corner-color)) left top / var(--rb-corner-stroke) var(--rb-corner-size) no-repeat,
    linear-gradient(var(--rb-corner-color), var(--rb-corner-color)) right top / var(--rb-corner-size) var(--rb-corner-stroke) no-repeat,
    linear-gradient(var(--rb-corner-color), var(--rb-corner-color)) right top / var(--rb-corner-stroke) var(--rb-corner-size) no-repeat,
    linear-gradient(var(--rb-corner-color), var(--rb-corner-color)) left bottom / var(--rb-corner-size) var(--rb-corner-stroke) no-repeat,
    linear-gradient(var(--rb-corner-color), var(--rb-corner-color)) left bottom / var(--rb-corner-stroke) var(--rb-corner-size) no-repeat,
    linear-gradient(var(--rb-corner-color), var(--rb-corner-color)) right bottom / var(--rb-corner-size) var(--rb-corner-stroke) no-repeat,
    linear-gradient(var(--rb-corner-color), var(--rb-corner-color)) right bottom / var(--rb-corner-stroke) var(--rb-corner-size) no-repeat;
}
.rb-corner--accent { --rb-corner-color: var(--rb-accent) }
.rb-corner--light { --rb-corner-color: color-mix(in srgb, var(--rb-canvas) 82%, transparent) }

/* ---------- текст ---------- */
.rb-eyebrow {
  font: 600 11px/1 var(--rb-font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--rb-accent);
}
.rb-h1 { margin: 0; font: var(--rb-weight-heading) clamp(32px, 5vw, 56px)/1.04 var(--rb-font-heading); letter-spacing: -.035em }
.rb-h2 { margin: 0; font: var(--rb-weight-heading) clamp(24px, 3vw, 36px)/1.1 var(--rb-font-heading); letter-spacing: -.025em }
.rb-h3 { margin: 0; font: var(--rb-weight-heading) 22px/1.15 var(--rb-font-heading); letter-spacing: -.02em }
.rb-lead { margin: 0; color: var(--rb-muted); font-size: 18px }
.rb-label { font: 600 12px/1.3 var(--rb-font-body) }
.rb-mono { font: 400 12px/1.4 var(--rb-font-mono); color: var(--rb-muted) }
.rb-caps {
  font: 600 11px/1 var(--rb-font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--rb-faint);
}
.rb-muted { color: var(--rb-muted) }
.rb-num { font: 600 14px/1.2 var(--rb-font-mono) }

/* ---------- кнопки ---------- */
.rb-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 0;
  border-radius: var(--rb-radius-sm);
  background: transparent;
  color: var(--rb-ink);
  font: 600 14px/1.2 var(--rb-font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--rb-ease), color var(--rb-ease), border-color var(--rb-ease), box-shadow var(--rb-ease);
}
.rb-btn--primary { background: var(--rb-accent); color: var(--rb-canvas) }
.rb-btn--primary:hover { background: var(--rb-accent-strong); color: var(--rb-canvas) }
.rb-btn--outline { border: var(--rb-border-frame) solid var(--rb-ink) }
.rb-btn--outline:hover { background: var(--rb-ink); color: var(--rb-canvas) }
.rb-btn--quiet { border: 1px solid var(--rb-line); color: var(--rb-muted) }
.rb-btn--quiet:hover { border-color: var(--rb-ink); color: var(--rb-ink) }
.rb-btn--ghost { padding: 12px 8px; color: var(--rb-accent) }
.rb-btn--ghost:hover { color: var(--rb-accent-strong) }
.rb-btn--pill { border-radius: var(--rb-radius-pill) }
.rb-btn--icon {
  width: 46px;
  height: 46px;
  padding: 0;
  justify-content: center;
  border: 1px solid var(--rb-line);
}
.rb-btn--icon:hover { border-color: var(--rb-ink) }
.rb-btn--round {
  width: 38px;
  height: 38px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
  background: var(--rb-accent);
  color: var(--rb-canvas);
}
.rb-btn--round:hover { background: var(--rb-accent-strong) }
.rb-btn[disabled] { background: var(--rb-sidebar); color: var(--rb-faint); cursor: not-allowed }
/* Уголковая кнопка лендинга: засечка внутри заливки */
.rb-btn--corner { padding: 14px 26px; background: var(--rb-ink); color: var(--rb-canvas); --rb-corner-inset: 7px; --rb-corner-size: 7px }
.rb-btn--corner:hover { background: var(--rb-accent) }

/* ---------- поля ввода ---------- */
.rb-field { display: grid; gap: 6px }
.rb-input {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--rb-line);
  border-radius: var(--rb-radius-sm);
  background: var(--rb-canvas);
  color: var(--rb-ink);
  font: 400 15px/1.4 var(--rb-font-body);
  outline: none;
  transition: box-shadow var(--rb-ease);
}
.rb-input:hover { box-shadow: var(--rb-shadow-hover) }
.rb-input::placeholder { color: var(--rb-faint) }
.rb-input--error { border-color: var(--rb-bad); background: var(--rb-bad-soft) }
.rb-input[disabled] { background: var(--rb-sidebar); color: var(--rb-faint) }
.rb-hint { font: 400 12px/1.4 var(--rb-font-body); color: var(--rb-muted) }
.rb-hint--error { color: var(--rb-bad) }
.rb-check { display: inline-flex; align-items: flex-start; gap: 6px; cursor: pointer }
.rb-check input[type="checkbox"] { width: var(--rb-check-size); height: var(--rb-check-size); flex: none; margin: 1px 0 0; accent-color: var(--rb-accent); cursor: pointer }
.rb-check input[type="checkbox"]:disabled { opacity: .45; cursor: not-allowed }
.rb-switch {
  position: relative;
  display: inline-block;
  flex: none;
  width: 44px;
  height: 24px;
  padding: 0;
  border: 0;
  -webkit-appearance: none;
  appearance: none;
  border-radius: var(--rb-radius-pill);
  background: var(--rb-line);
  cursor: pointer;
}
.rb-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--rb-canvas);
  transition: transform var(--rb-ease);
}
.rb-switch.is-on { background: var(--rb-accent) }
.rb-switch.is-on::after { transform: translateX(20px) }
.rb-switch[disabled] { opacity: .5; cursor: default }

/* ---------- чипы и фильтры ---------- */
.rb-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--rb-radius-pill);
  background: color-mix(in srgb, var(--rb-ink) 12%, transparent);
  color: var(--rb-muted);
  font: 600 12px/1.3 var(--rb-font-body);
}
.rb-chip--accent { background: var(--rb-accent); color: var(--rb-canvas) }
.rb-chip--good { background: var(--rb-good); color: var(--rb-canvas) }
.rb-chip--warn { background: var(--rb-warn); color: var(--rb-canvas) }
.rb-chip--bad { background: var(--rb-bad); color: var(--rb-canvas) }
.rb-chip--info { background: var(--rb-info); color: var(--rb-canvas) }
.rb-chip--sm { padding: 3px 9px; font-size: 10px }
.rb-filter {
  padding: 7px 14px;
  border: 1px solid var(--rb-line);
  border-radius: var(--rb-radius-pill);
  background: transparent;
  color: var(--rb-ink);
  font: 500 12px/1.3 var(--rb-font-body);
  cursor: pointer;
  transition: border-color var(--rb-ease), background var(--rb-ease), color var(--rb-ease);
}
.rb-filter:hover { border-color: var(--rb-ink) }
.rb-filter.is-on { background: var(--rb-ink); border-color: var(--rb-ink); color: var(--rb-canvas) }
.rb-filter--add { border-style: dashed; color: var(--rb-muted) }

/* ---------- табы ---------- */
.rb-tabs { display: flex; border-bottom: var(--rb-border-frame) solid var(--rb-line) }
.rb-tab {
  padding: 11px 16px;
  border: 0;
  background: transparent;
  color: var(--rb-muted);
  font: 500 14px/1.2 var(--rb-font-body);
  cursor: pointer;
}
.rb-tab:hover { color: var(--rb-ink) }
.rb-tab.is-active { color: var(--rb-ink); font-weight: 600; box-shadow: inset 0 -3px 0 var(--rb-accent) }

/* ---------- таблица ---------- */
.rb-table { width: 100%; border-collapse: collapse }
.rb-table th {
  padding: 12px 16px;
  border-bottom: var(--rb-border-frame) solid var(--rb-ink);
  background: var(--rb-sidebar);
  color: var(--rb-muted);
  font: 600 11px/1 var(--rb-font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: left;
}
.rb-table td { padding: 14px 16px; border-bottom: 1px solid var(--rb-line); font: 500 14px/1.4 var(--rb-font-body) }
.rb-table tbody tr:last-child td { border-bottom: 0 }
.rb-table tbody tr:hover { background: var(--rb-sidebar) }
.rb-table .rb-td-num { text-align: right; font: 600 14px/1.4 var(--rb-font-mono) }
.rb-table .rb-td-mono { font: 400 13px/1.4 var(--rb-font-mono); color: var(--rb-muted) }

/* ---------- уведомления ---------- */
.rb-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-radius: var(--rb-radius-lg);
  background: var(--rb-glass-bg);
  backdrop-filter: var(--rb-blur);
  -webkit-backdrop-filter: var(--rb-blur);
  border: 1px solid var(--rb-glass-border);
  box-shadow: var(--rb-shadow-glass);
}
.rb-toast__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
}
.rb-toast__icon--good { background: color-mix(in srgb, var(--rb-good) 16%, transparent); color: var(--rb-good) }
.rb-toast__icon--warn { background: color-mix(in srgb, var(--rb-warn) 18%, transparent); color: var(--rb-warn) }
.rb-toast__icon--bad { background: color-mix(in srgb, var(--rb-bad) 34%, transparent); color: var(--rb-canvas) }
.rb-toast__text { min-width: 0 }
.rb-toast__text b { display: block; font: 600 13px/1.35 var(--rb-font-body) }
.rb-toast__text span { font-size: 13px; color: var(--rb-muted) }
.rb-toast--dark {
  background: color-mix(in srgb, var(--rb-ink) 82%, transparent);
  border-color: color-mix(in srgb, var(--rb-canvas) 14%, transparent);
  box-shadow: var(--rb-shadow-modal);
  color: var(--rb-canvas);
}
.rb-toast--dark .rb-toast__text span { color: color-mix(in srgb, var(--rb-canvas) 72%, transparent) }
.rb-close {
  margin-left: auto;
  flex: none;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--rb-faint);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.rb-close:hover { background: color-mix(in srgb, var(--rb-ink) 8%, transparent); color: var(--rb-ink) }

/* ---------- модальное окно ---------- */
.rb-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: color-mix(in srgb, var(--rb-ink) 42%, transparent);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.rb-dialog {
  width: min(520px, 100%);
  overflow: hidden;
  border-radius: var(--rb-radius-xl);
  background: color-mix(in srgb, var(--rb-canvas) 88%, transparent);
  backdrop-filter: var(--rb-blur);
  -webkit-backdrop-filter: var(--rb-blur);
  border: 1px solid var(--rb-glass-border);
  box-shadow: var(--rb-shadow-modal);
}
.rb-dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px 0 }
.rb-dialog__body { padding: 14px 24px 20px }
.rb-dialog__body p { margin: 0 0 16px; color: var(--rb-muted) }
.rb-dialog__note {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-radius: var(--rb-radius-md);
  background: color-mix(in srgb, var(--rb-warn) 12%, transparent);
  font-size: 13px;
}
.rb-dialog__note::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rb-warn);
}
.rb-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid color-mix(in srgb, var(--rb-ink) 8%, transparent);
}

/* ---------- меню ---------- */
.rb-nav { background: var(--rb-sidebar); padding: 18px 0; display: flex; flex-direction: column }
.rb-nav__brand { padding: 0 18px 14px }
.rb-nav__list { display: grid; gap: 2px }
.rb-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 8px;
  padding: 10px 12px;
  border-radius: var(--rb-radius-md);
  color: var(--rb-ink);
  font: 500 14px/1.2 var(--rb-font-body);
  text-decoration: none;
  transition: background var(--rb-ease), box-shadow var(--rb-ease);
}
.rb-nav-item:hover { background: color-mix(in srgb, var(--rb-ink) 6%, transparent); color: var(--rb-ink) }
/* активный пункт поднимается белой карточкой — как выбранная вкладка */
.rb-nav-item.is-active {
  background: var(--rb-canvas);
  color: var(--rb-ink);
  font-weight: 600;
  box-shadow: var(--rb-shadow-card);
}
.rb-nav-item--chat { font-size: 13px; font-weight: 400; color: var(--rb-muted) }
/* Строка чата в сайдбаре: действия проявляются по наведению (паттерн Nanako) */
.rb-nav-chat { position: relative }
.rb-nav-chat .rb-nav-item--chat span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.rb-nav-chat__actions { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 1px; padding-left: 14px; opacity: 0; pointer-events: none; transition: opacity var(--rb-ease); background: linear-gradient(to right, transparent, var(--rb-sidebar) 14px) }
.rb-nav-chat:hover .rb-nav-chat__actions,
.rb-nav-chat:focus-within .rb-nav-chat__actions,
.rb-nav-chat.is-confirming .rb-nav-chat__actions { opacity: 1; pointer-events: auto }
.rb-nav-chat__action { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--rb-muted); cursor: pointer; transition: background var(--rb-ease), color var(--rb-ease) }
.rb-nav-chat__action .ic { width: 14px; height: 14px }
.rb-nav-chat__action:hover { background: color-mix(in srgb, var(--rb-ink) 8%, transparent); color: var(--rb-ink) }
.rb-nav-chat__action.is-pin.is-active { color: var(--rb-accent) }
.rb-nav-chat__action.is-delete:hover,
.rb-nav-chat__action.is-yes { color: var(--rb-bad) }
.rb-nav-chat__action.is-yes:hover { background: var(--rb-bad-soft); color: var(--rb-bad) }
.rb-nav-chat__action[hidden] { display: none }
html.rb-sidebar-collapsed .rb-nav-chat__actions { display: none }
.rb-nav__section {
  margin: 18px 20px 8px;
  padding-top: 14px;
  border-top: 1px solid var(--rb-line);
}
.rb-nav--rail { width: 64px; align-items: center }
.rb-nav--rail .rb-nav-item { margin: 0; padding: 0; width: 44px; height: 40px; justify-content: center }
/* выбор кабинета: обычная строка с аватаром, не белый блок */
.rb-seller {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 16px);
  margin: 0 8px 12px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--rb-radius-md);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.rb-seller:hover { background: color-mix(in srgb, var(--rb-ink) 6%, transparent) }
.rb-seller__avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--rb-ink);
  color: var(--rb-canvas);
  font: 600 12px/1 var(--rb-font-body);
}
.rb-seller__text { flex: 1; min-width: 0 }
.rb-seller__text b { display: block; font: 600 13px/1.2 var(--rb-font-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.rb-seller__text span { display: block; margin-top: 2px; font: 400 10px/1 var(--rb-font-mono); color: var(--rb-muted) }

/* ---------- выпадающее меню ---------- */
.rb-dropdown { position: relative; min-width: 0 }
.rb-dropdown__trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--rb-line);
  border-radius: var(--rb-radius-md);
  background: var(--rb-canvas);
  color: var(--rb-ink);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--rb-ease), box-shadow var(--rb-ease);
}
.rb-dropdown__trigger:hover,
.rb-dropdown.is-open .rb-dropdown__trigger { border-color: var(--rb-ink); box-shadow: var(--rb-shadow-hover) }
.rb-dropdown__value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.rb-dropdown__chevron { width: var(--rb-icon-chevron); height: var(--rb-icon-chevron); flex: none; opacity: .8; transition: transform var(--rb-ease) }
.rb-dropdown.is-open .rb-dropdown__chevron { transform: rotate(180deg) }
.rb-dropdown__menu {
  position: absolute;
  z-index: 75;
  top: calc(100% + 6px);
  left: 0;
  width: max(100%, 240px);
  max-height: min(360px, 60vh);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--rb-line);
  border-radius: var(--rb-radius-lg);
  background: var(--rb-canvas);
  box-shadow: var(--rb-shadow-modal);
}
.rb-dropdown__menu[hidden] { display: none }
.rb-dropdown--right .rb-dropdown__menu { right: 0; left: auto }
.rb-dropdown__label { padding: 9px 10px 5px; color: var(--rb-faint); font: 600 10px/1 var(--rb-font-mono); letter-spacing: .08em; text-transform: uppercase }
.rb-dropdown__option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--rb-radius-md);
  background: transparent;
  color: var(--rb-ink);
  font: 500 13px/1.3 var(--rb-font-body);
  text-align: left;
  cursor: pointer;
}
.rb-dropdown__option:hover,
.rb-dropdown__option:focus-visible { background: var(--rb-sidebar) }
/* Выбранное — спокойный нейтральный тон; красный акцент оставлен действиям. */
.rb-dropdown__option.is-selected { background: color-mix(in srgb, var(--rb-ink) 8%, transparent); color: var(--rb-ink); font-weight: 600 }
.rb-dropdown__option .ic { width: 18px; height: 18px }
.rb-dropdown__check { margin-left: auto; color: var(--rb-accent) }
.rb-dropdown__empty { padding: 12px 10px; color: var(--rb-muted); font-size: 13px }
.rb-native-select { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap }

/* ---------- аккаунт в подвале меню ---------- */
.rb-account {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 8px;
  padding: 9px 10px;
  border-radius: var(--rb-radius-md);
  color: var(--rb-ink);
  text-decoration: none;
}
.rb-account:hover { background: color-mix(in srgb, var(--rb-ink) 6%, transparent); color: var(--rb-ink) }
.rb-account.is-active { background: var(--rb-canvas); box-shadow: var(--rb-shadow-card) }
.rb-account__avatar { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--rb-ink); color: var(--rb-canvas); font: 600 11px/1 var(--rb-font-body) }
.rb-account__copy { flex: 1; min-width: 0 }
.rb-account__copy b,
.rb-account__copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.rb-account__copy b { font: 600 12px/1.25 var(--rb-font-body) }
.rb-account__copy span { margin-top: 2px; color: var(--rb-muted); font: 400 10px/1.2 var(--rb-font-mono) }
.rb-account>.ic { width: 15px; height: 15px; color: var(--rb-muted) }
.rb-nav__footer { margin-top: auto; padding-top: 12px }
.rb-nav__recent-state { padding: 7px 20px; color: var(--rb-muted); font-size: 12px }

/* ---------- оболочка кабинета ---------- */
.rb-skip { position: fixed; left: -9999px; top: 8px; z-index: 100; padding: 9px 12px; border: var(--rb-border-frame) solid var(--rb-ink); background: var(--rb-canvas) }
.rb-skip:focus { left: 8px }
.rb-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: 248px; border-right: 1px solid var(--rb-line); transition: width var(--rb-ease), transform var(--rb-ease) }
.rb-sidebar__brand { display: flex; align-items: center; min-height: 40px }
.rb-sidebar__brand .rb-logo { min-width: 0 }
.rb-sidebar__collapsed-mark { display: none; width: auto; height: 20px; filter: grayscale(1) brightness(0) }
.rb-sidebar__toggle,
.rb-sidebar__close,
.rb-mobilebar__menu { display: grid; place-items: center; border: 0; border-radius: var(--rb-radius-sm); background: transparent; color: var(--rb-muted); cursor: pointer }
.rb-sidebar__toggle { width: 28px; height: 28px; margin-left: auto }
.rb-sidebar__toggle .ic { width: 14px; height: 14px }
.rb-sidebar__toggle:hover,
.rb-sidebar__close:hover,
.rb-mobilebar__menu:hover { background: var(--rb-canvas); color: var(--rb-ink) }
.rb-sidebar__toggle:hover { background: transparent }
.rb-sidebar__close { display: none; width: 34px; height: 34px; margin-left: auto }
.rb-sidebar__accounts { margin: 0 8px 8px }
.rb-sidebar__accounts>.rb-dropdown__trigger { padding: 0; border: 0; background: transparent; box-shadow: none }
.rb-sidebar__accounts>.rb-dropdown__trigger:hover { background: color-mix(in srgb, var(--rb-ink) 6%, transparent) }
.rb-sidebar__accounts .rb-seller { width: 100%; margin: 0; pointer-events: none }
.rb-sidebar__accounts .rb-seller>.ic { margin-left: auto }
.rb-sidebar__recents { min-height: 0; overflow-y: auto }
.rb-workspace { --rb-mobilebar-height: 0px; min-height: 100vh; margin-left: 248px; background: var(--rb-canvas); transition: margin-left var(--rb-ease) }
.rb-workspace__main { width: min(1560px, 100%); margin: auto; padding: 30px 34px 64px }
.rb-mobilebar { display: none }
.rb-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px }
.rb-page-head h1 { margin: 0; font: var(--rb-weight-heading) clamp(25px,3vw,38px)/1.15 var(--rb-font-heading); letter-spacing: -.025em }
.rb-page-head p { margin: 6px 0 0; color: var(--rb-muted) }
.rb-card { padding: 20px; border: 1px solid var(--rb-line); border-radius: var(--rb-radius-lg); background: var(--rb-canvas) }
.rb-loading { min-height: 180px; display: grid; place-items: center }
.rb-flash { position: fixed; right: 20px; bottom: 20px; z-index: 80; max-width: min(420px, calc(100vw - 40px)); padding: 11px 14px; border-radius: var(--rb-radius-sm); background: var(--rb-ink); color: var(--rb-canvas); box-shadow: var(--rb-shadow-lift); font-size: 13px }
.rb-flash[hidden] { display: none }
html.rb-sidebar-collapsed .rb-sidebar { width: 64px }
html.rb-sidebar-collapsed .rb-workspace { margin-left: 64px }
html.rb-sidebar-collapsed .rb-logo__word,
html.rb-sidebar-collapsed .rb-nav-item span,
html.rb-sidebar-collapsed .rb-nav__section,
html.rb-sidebar-collapsed .rb-nav__recent-state,
html.rb-sidebar-collapsed .rb-account__copy,
html.rb-sidebar-collapsed .rb-account>.ic,
html.rb-sidebar-collapsed .rb-seller__text,
html.rb-sidebar-collapsed .rb-seller>.ic { display: none }
html.rb-sidebar-collapsed .rb-nav__brand { padding-inline: 0; justify-content: center }
html.rb-sidebar-collapsed .rb-sidebar__brand { justify-content: center }
html.rb-sidebar-collapsed .rb-sidebar__brand .rb-logo { display: none }
html.rb-sidebar-collapsed .rb-sidebar__toggle-icon { display: none }
html.rb-sidebar-collapsed .rb-sidebar__collapsed-mark { display: block }
html.rb-sidebar-collapsed .rb-sidebar__toggle { margin: 0; width: 40px; height: 32px }
html.rb-sidebar-collapsed .rb-sidebar__accounts { margin-inline: 10px }
html.rb-sidebar-collapsed .rb-sidebar__accounts>.rb-dropdown__trigger { justify-content: center }
html.rb-sidebar-collapsed .rb-sidebar__accounts .rb-seller { justify-content: center; padding-inline: 0 }
html.rb-sidebar-collapsed .rb-nav-item { width: 44px; height: 40px; margin-inline: 10px; padding: 0; justify-content: center }
html.rb-sidebar-collapsed .rb-account { width: 44px; height: 44px; margin-inline: 10px; padding: 0; justify-content: center }

/* ---------- страница разговора ---------- */
/* Чат занимает высоту до самого низа вьюпорта: нижний отступ main на этой
   странице снят (rb-workspace__main--chat), лента уходит под поле ввода */
.rb-workspace__main--chat { padding-bottom: 0 }
/* grid-template-columns обязателен: у auto-колонки минимальный размер равен
   max-content, поэтому длинное название чата в шапке раздувало колонку шире
   экрана и лента вместе с ней уезжала за правый край на мобильных */
.rb-chat { position: relative; height: calc(100vh - 30px); height: calc(100dvh - 30px); min-width: 0; min-height: 540px; display: grid; grid-template-rows: 36px minmax(0,1fr); grid-template-columns: minmax(0,1fr); width: 100%; margin: auto }
.rb-chat__drop-overlay { position: absolute; z-index: 40; inset: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 2px dashed var(--rb-accent); border-radius: var(--rb-radius-xl); background: color-mix(in srgb, var(--rb-canvas) 90%, var(--rb-accent-soft)); color: var(--rb-ink); pointer-events: none; box-shadow: 0 0 0 999px color-mix(in srgb, var(--rb-canvas) 30%, transparent); animation: rb-chat-drop-in .14s ease-out }
.rb-chat__drop-overlay[hidden] { display: none }
.rb-chat__drop-overlay .ic { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: var(--rb-accent-soft); color: var(--rb-accent-strong) }
.rb-chat__drop-overlay strong { font: 650 18px/1.2 var(--rb-font-heading) }
.rb-chat__drop-overlay span { color: var(--rb-muted); font-size: 13px }
@keyframes rb-chat-drop-in { from { opacity: 0; transform: scale(.985) } }
/* Шапка чата живёт слева и не привязана к колонке сообщений: название,
   редактирование и удаление стоят одной группой, как в Nanako. */
.rb-chat__toolbar { grid-row: 1; width: 100%; min-width: 0; min-height: 36px; display: flex; align-items: center; justify-content: flex-start; gap: 2px; padding: 0; background: transparent }
.rb-chat__title-button { display: inline-flex; min-width: 0; align-items: center; gap: 7px; padding: 7px 9px; border: 0; border-radius: var(--rb-radius-pill); background: transparent; color: var(--rb-ink); font: 600 14px/1.2 var(--rb-font-heading); cursor: pointer }
.rb-chat__title-button:hover { background: var(--rb-sidebar) }
.rb-chat__title-button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.rb-chat__title-button .ic { flex: none; width: 17px; height: 17px; color: var(--rb-faint) }
/* Прикреплённый Telegram-чат: название видно, но не редактируется */
.rb-chat__title-button:disabled { cursor: default }
.rb-chat__title-button:disabled:hover { background: transparent }
.rb-chat__title-button.is-static .ic { display: none }
.rb-chat__delete[hidden] { display: none }
.rb-chat__title-edit { min-width: 0; display: flex; align-items: center; gap: 6px; flex: 1 }
.rb-chat__title-edit .rb-input { height: 36px; min-width: 0; flex: 1 }
.rb-chat__title-edit .rb-btn { height: 34px; padding-inline: 12px; font-size: 12px }
.rb-chat__delete { display: inline-flex; align-items: center; gap: 2px }
.rb-chat__delete.is-confirming [data-chat-delete] { display: none }
.rb-chat__header-action { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--rb-muted); cursor: pointer; transition: background var(--rb-ease), color var(--rb-ease) }
.rb-chat__header-action:hover { background: var(--rb-sidebar); color: var(--rb-ink) }
.rb-chat__header-action .ic { width: 17px; height: 17px }
.rb-chat__header-action.is-danger { color: var(--rb-bad) }
.rb-chat__header-action.is-danger:hover { background: var(--rb-bad-soft); color: var(--rb-bad) }
[data-chat-delete]:hover { color: var(--rb-bad); background: var(--rb-bad-soft) }
/* Подтверждение удаления — inline-свап на месте иконки, без модалки (паттерн Nanako) */
.rb-chat__delete-confirm { display: inline-flex; align-items: center; gap: 2px; padding: 2px 2px 2px 10px; border: 1px solid var(--rb-line); border-radius: var(--rb-radius-pill); background: var(--rb-canvas); font-size: 12px; color: var(--rb-muted); animation: rb-confirm-appear .15s ease-out }
@keyframes rb-confirm-appear { from { opacity: 0; transform: scale(.96) } }
.rb-chat__history-more { align-self: center; margin: 0 auto 4px; font-size: 12px }
.rb-chat__toolbar[hidden],.rb-chat__title-edit[hidden],.rb-chat__delete-confirm[hidden],.rb-chat__history-more[hidden] { display: none }
/* Нижний отступ следует за фактической высотой композера (см. ResizeObserver
   в CHAT_JS), иначе высокий textarea или voice-бар перекрывают последнюю карточку */
/* grid-row: 2 обязателен: у нового чата тулбар скрыт (display:none), и без
   явной привязки лента auto-placement'ом попадает в первую строку высотой 36px */
.rb-chat__messages { grid-row: 2; display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; padding: 22px max(16px, calc((100% - 768px)/2)) calc(var(--rb-compose-height, 138px) + var(--rb-keyboard-height, 0px) + 34px); overscroll-behavior: contain;
  /* узкая полоса растворения у верхней границы: текст исчезает в первых ~26px */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 26px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 26px) }
/* Лента прижимается к низу, как в мессенджерах: заполнитель занимает свободное
   место сверху, пока сообщений мало */
.rb-chat__messages::before { content: ""; flex: 1 }
.rb-chat__messages.is-empty::before { display: none }
.rb-chat__messages.is-empty { padding-block: 0 }
.rb-chat__message a, .rb-approval-card a, .rb-approval-toast a { color: var(--rb-accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--rb-accent) 45%, transparent); text-underline-offset: 2px; overflow-wrap: anywhere }
.rb-chat__message a:hover, .rb-approval-card a:hover, .rb-approval-toast a:hover { color: var(--rb-accent-strong); text-decoration-color: currentColor }
.rb-chat__inline-image { display: block; max-width: min(320px, 100%); margin: 6px 0; border: 1px solid var(--rb-line); border-radius: var(--rb-radius-md) }
.rb-chat__empty { margin: auto; max-width: 440px; padding: 24px; text-align: center; color: var(--rb-muted) }
.rb-chat__empty strong { display: block; margin-bottom: 7px; color: var(--rb-ink); font: var(--rb-weight-heading) 22px/1.2 var(--rb-font-heading) }
.rb-chat__message { max-width: 85%; padding: 11px 14px; border-radius: var(--rb-radius-lg); font-size: 15px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere }
.rb-chat__message.is-user { align-self: flex-end; border: 1px solid var(--rb-line); background: var(--rb-surface-soft); color: var(--rb-ink); border-bottom-right-radius: var(--rb-radius-xs) }
.rb-chat__message.is-assistant { align-self: flex-start; padding-inline: 0; border: 0; background: transparent; color: var(--rb-ink) }
.rb-chat__message .rb-table { display: block; width: 100%; max-width: 100%; margin: 10px 0; overflow-x: auto; -webkit-overflow-scrolling: touch }
.rb-chat__message.is-assistant { max-width: 100% }
.rb-chat__message .rb-table table { width: 100%; min-width: max-content; border-collapse: collapse; font-size: 13px; white-space: nowrap }
.rb-chat__message .rb-table th, .rb-chat__message .rb-table td { padding: 7px 10px; border-bottom: 1px solid var(--rb-line); text-align: left; vertical-align: top }
.rb-chat__message .rb-table th { background: var(--rb-surface-soft); font: 600 11px/1.3 var(--rb-font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--rb-muted) }
.rb-chat__message .rb-table td.is-numeric, .rb-chat__message .rb-table th.is-numeric { text-align: right; font-variant-numeric: tabular-nums }
.rb-chat__message .rb-table tr:last-child td { border-bottom: 0 }
.rb-chat__message.is-failed { color: var(--rb-muted) }
.rb-chat__message.is-processing { color: var(--rb-muted) }
.rb-chat__attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px }
.rb-chat__attachment { display: inline-flex; max-width: 260px; padding: 5px 9px; border: 1px solid var(--rb-line); border-radius: 999px; background: var(--rb-surface); color: var(--rb-muted); font-size: 11px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.rb-richtext { white-space: normal }
.rb-richtext > :first-child { margin-top: 0 }
.rb-richtext > :last-child { margin-bottom: 0 }
.rb-richtext p { margin: 0 0 8px }
.rb-richtext ul,.rb-richtext ol { margin: 4px 0 10px; padding-left: 22px }
.rb-richtext li + li { margin-top: 3px }
.rb-richtext h2,.rb-richtext h3,.rb-richtext h4,.rb-richtext h5 { margin: 14px 0 6px; font: 650 1em/1.35 var(--rb-font-body) }
.rb-richtext code { padding: 1px 4px; border-radius: 4px; background: var(--rb-surface-soft); font: .9em/1.45 var(--rb-font-mono, monospace) }
.rb-richtext pre { margin: 8px 0; padding: 10px 12px; overflow-x: auto; border-radius: var(--rb-radius-sm); background: var(--rb-surface-soft); white-space: pre }
.rb-richtext pre code { padding: 0; background: transparent }
.rb-approval-card {
  align-self: stretch;
  display: grid;
  gap: 12px;
  padding: 18px 20px;
  border: 1px solid var(--rb-line);
  background: var(--rb-canvas);
  --rb-corner-inset: -1px;
  --rb-corner-size: 12px;
  --rb-corner-stroke: 2px;
  --rb-corner-color: var(--rb-ink);
  transition: box-shadow var(--rb-ease), opacity var(--rb-ease);
}
.rb-approval-card:hover { box-shadow: var(--rb-shadow-hover) }
.rb-approval-card.is-processing { opacity: .65; pointer-events: none }
.rb-approval-card__head { display: flex; align-items: flex-start; gap: 12px }
.rb-approval-card__copy { min-width: 0; display: grid; gap: 5px }
.rb-approval-card__title { color: var(--rb-ink); font: 600 15px/1.35 var(--rb-font-heading) }
.rb-approval-card__subject { color: var(--rb-muted); font-size: 13px; line-height: 1.45 }
.rb-approval-card__scope {
  width: fit-content;
  padding: 5px 9px;
  border-radius: var(--rb-radius-pill);
  background: var(--rb-accent-soft);
  color: var(--rb-accent-strong);
  font: 600 11px/1.2 var(--rb-font-body);
}
.rb-approval-card__previews { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; max-width: 360px; margin: 8px auto 0 }
.rb-approval-preview { min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--rb-line); border-radius: 12px; background: var(--rb-surface) }
.rb-approval-preview img { display: block; width: 100%; aspect-ratio: 3/4; object-fit: contain; background: color-mix(in srgb,var(--rb-ink) 4%,transparent) }
.rb-approval-preview figcaption { display: grid; gap: 2px; padding: 8px 9px; color: var(--rb-muted); font-size: 11px; line-height: 1.35 }
.rb-approval-preview figcaption strong { color: var(--rb-ink); font-size: 11px }
.rb-approval-card__details { display: grid; gap: 7px; margin: 0 }
.rb-approval-card__details>div { display: grid; grid-template-columns:minmax(105px,.35fr) minmax(0,1fr); gap: 12px }
.rb-approval-card__details dt { color: var(--rb-faint); font: 600 10px/1.4 var(--rb-font-mono); text-transform: uppercase }
.rb-approval-card__details dd { min-width: 0; margin: 0; color: var(--rb-muted); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere }
.rb-approval-card__actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 2px }
.rb-approval-card__actions .rb-btn { padding: 9px 15px; font-size: 13px }
/* Подтверждения показываются по одному; заметка сообщает про очередь */
.rb-approval-queue-note { align-self: center; display: flex; align-items: center; gap: 12px; padding: 6px 12px; border-radius: var(--rb-radius-pill); background: color-mix(in srgb, var(--rb-ink) 5%, transparent); color: var(--rb-muted); font-size: 12px }
.rb-approval-queue-note__deny { padding: 0; border: 0; background: transparent; color: var(--rb-bad); font: 600 12px/1.2 var(--rb-font-body); cursor: pointer }
.rb-approval-queue-note__deny:hover { text-decoration: underline; text-underline-offset: 2px }
.rb-approval-queue-note__deny:disabled { color: var(--rb-faint); cursor: wait; text-decoration: none }
/* Глобальные тосты подтверждений: приходят и от автоматики, поэтому живут
   на уровне всей оболочки, а не внутри чата */
.rb-approval-toasts { position: fixed; top: 16px; right: 16px; z-index: 85; display: grid; gap: 10px; width: min(360px, calc(100vw - 32px)) }
.rb-approval-toasts:empty { display: none }
.rb-approval-toast { align-items: flex-start; box-shadow: var(--rb-shadow-modal); animation: rb-toast-in .2s ease-out }
@keyframes rb-toast-in { from { opacity: 0; transform: translateY(-6px) } }
.rb-approval-toast .rb-toast__text { flex: 1 }
.rb-approval-toast__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px }
.rb-approval-toast__actions .rb-btn { padding: 7px 12px; font-size: 12px }
.rb-approval-toast.is-processing { opacity: .6; pointer-events: none }
.rb-approval-toast__brief { display: grid; gap: 3px; margin-top: 7px }
.rb-approval-toast__brief p { margin: 0; color: var(--rb-muted); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere }
.rb-approval-toast__preview { display: grid; gap: 4px; margin: 8px 0 0 }
.rb-approval-toast__preview img { width: 100%; max-height: 180px; object-fit: contain; border: 1px solid var(--rb-line); border-radius: 9px; background: var(--rb-surface) }
.rb-approval-toast__preview figcaption { color: var(--rb-faint); font: 600 10px/1.35 var(--rb-font-body) }
.rb-approval-toast__expand { margin-top: 7px; padding: 0; border: 0; background: transparent; color: var(--rb-accent); font: 600 12px/1 var(--rb-font-body); text-align: left; cursor: pointer }
.rb-approval-toast__expand:hover { color: var(--rb-accent-strong) }
.rb-approval-toast__details { display: grid; gap: 5px; margin: 8px 0 0 }
.rb-approval-toast__details>div { display: grid; grid-template-columns: minmax(90px,.4fr) minmax(0,1fr); gap: 8px }
.rb-approval-toast__details dt { color: var(--rb-faint); font: 600 9px/1.6 var(--rb-font-mono); text-transform: uppercase }
.rb-approval-toast__details dd { min-width: 0; margin: 0; color: var(--rb-muted); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere }
.rb-approval-toast__details[hidden] { display: none }
.rb-news-toast__icon { flex: none; width: 34px; height: 34px; border-radius: 9px; object-fit: cover }
.rb-news-toast .rb-toast__text>span { display: block; margin-bottom: 2px; color: var(--rb-faint); font-size: 10px; font-weight: 600 }
.rb-news-toast__preview { display: -webkit-box; margin: 5px 0 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: var(--rb-muted); font-size: 12px; line-height: 1.4 }
.rb-chat__compose { position: absolute; z-index: 10; right: 0; bottom: calc(var(--rb-keyboard-height, 0px) + 14px); left: 0; min-width: 0; width: min(768px, 100%); margin: 0 auto; pointer-events: none }
.rb-chat__compose>.rb-composer { pointer-events: auto }
/* Гласс-слой композера по образцу T3: контент чата слегка просвечивает под полем. */
.rb-chat__compose .rb-composer {
  background: var(--rb-composer-glass-bg);
  -webkit-backdrop-filter: blur(var(--rb-composer-glass-blur)) saturate(var(--rb-composer-glass-saturation));
  backdrop-filter: blur(var(--rb-composer-glass-blur)) saturate(var(--rb-composer-glass-saturation));
  box-shadow: 0 12px 28px -18px color-mix(in srgb, var(--rb-ink) 40%, transparent);
}
.rb-chat__compose .rb-dropdown { max-width: min(330px, 55vw) }
.rb-chat__compose .rb-dropdown__trigger { min-height: 36px; padding: 0 10px; border: 0; border-radius: var(--rb-radius-pill); background: transparent; color: var(--rb-muted); font-size: 12px; box-shadow: none }
.rb-chat__compose .rb-dropdown__trigger:hover { background: var(--rb-sidebar); color: var(--rb-ink) }
.rb-chat__compose .rb-dropdown__menu { top: auto; bottom: calc(100% + 6px) }
.rb-chat__compose [data-chat-mic].is-active { background: var(--rb-accent-soft); color: var(--rb-accent-strong); animation: rb-mic-pulse 1.2s ease-in-out infinite }
@keyframes rb-mic-pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb,var(--rb-accent) 15%,transparent) } }
.rb-chat__stop { display: none }
.rb-chat.is-busy .rb-chat__send { display: none }
.rb-chat.is-busy .rb-chat__stop { display: grid }
.rb-chat__stop[hidden],
.rb-chat__send[hidden] { display: none }

/* ---------- ход работы агента (по образцу T3 work log) ---------- */
.rb-agent-work { margin-bottom: 6px; font-size: 12px; color: var(--rb-muted) }
.rb-agent-work__head { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 3px 8px 3px 2px; border: 0; border-radius: var(--rb-radius-pill); background: transparent; color: inherit; font: 500 12px/1.4 var(--rb-font-body); cursor: pointer; font-variant-numeric: tabular-nums }
.rb-agent-work__head:hover:not(:disabled) { background: var(--rb-surface-soft); color: var(--rb-ink) }
.rb-agent-work__head:disabled { cursor: default }
.rb-agent-work__dots { display: inline-flex; align-items: center; gap: 3px; flex: none }
.rb-agent-work__dots span { width: 4px; height: 4px; border-radius: 50%; background: color-mix(in srgb, var(--rb-muted) 45%, transparent); animation: rb-status-pulse 2s infinite }
.rb-agent-work__dots span:nth-child(2) { animation-delay: 200ms }
.rb-agent-work__dots span:nth-child(3) { animation-delay: 400ms }
@keyframes rb-status-pulse {
  0%, 40% { opacity: 1; animation-timing-function: steps(6, end) }
  50%, 90% { opacity: .5; animation-timing-function: steps(6, end) }
  to { opacity: 1 }
}
.rb-agent-work__timer { flex: none; white-space: nowrap }
.rb-agent-work__step { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: color-mix(in srgb, var(--rb-muted) 65%, transparent) }
.rb-agent-work__chevron { width: var(--rb-icon-chevron); height: var(--rb-icon-chevron); flex: none; opacity: .7; transition: transform .2s ease }
.rb-agent-work.is-open .rb-agent-work__chevron { transform: rotate(180deg) }
.rb-agent-work__list { display: none; margin: 4px 0 2px; padding-left: 9px; border-left: 2px solid var(--rb-line) }
.rb-agent-work.is-open .rb-agent-work__list { display: block }
.rb-agent-work__entry { display: flex; align-items: baseline; gap: 7px; padding: 2px 0; font-size: 12px; line-height: 1.45; white-space: normal }
.rb-agent-work__entry::before { content: ""; flex: none; width: 4px; height: 4px; border-radius: 50%; background: color-mix(in srgb, var(--rb-muted) 40%, transparent); transform: translateY(-2px) }
.rb-agent-work__entry.is-note { color: var(--rb-ink) }
.rb-agent-work__entry.is-note::before { background: var(--rb-accent) }

/* ---------- сообщение ассистента: текст и копирование ---------- */
.rb-chat__message.is-assistant { position: relative }
.rb-chat__message-text { min-width: 0 }
.rb-chat__message-text:empty { display: none }
.rb-chat__message-text.is-typing::after { content: ""; display: inline-block; width: 2px; height: .9em; margin-left: 2px; border-radius: 1px; background: currentColor; vertical-align: -.08em; animation: rb-cursor-blink .9s steps(1,end) infinite }
@keyframes rb-cursor-blink { 50% { opacity: .15 } }
.rb-chat__pin.is-active { color: var(--rb-accent); background: var(--rb-accent-soft) }
.rb-msg-copy { display: inline-flex; align-items: center; gap: 5px; margin: 6px 0 0 -8px; padding: 3px 8px; border: 0; border-radius: var(--rb-radius-pill); background: transparent; color: var(--rb-faint); font: 500 11px/1 var(--rb-font-body); cursor: pointer; opacity: 0; transition: opacity var(--rb-ease), background var(--rb-ease), color var(--rb-ease) }
.rb-msg-copy .ic { width: 13px; height: 13px }
.rb-chat__message.is-assistant:hover .rb-msg-copy,
.rb-msg-copy:focus-visible, .rb-msg-copy.is-copied { opacity: 1 }
.rb-msg-copy:hover { background: var(--rb-surface-soft); color: var(--rb-ink) }
.rb-msg-copy.is-copied { color: var(--rb-good) }

/* ---------- кнопка «Прокрутить вниз» (по образцу T3 Scroll to end) ---------- */
.rb-chat__scroll-end { position: absolute; z-index: 15; left: 50%; bottom: calc(var(--rb-compose-height, 138px) + var(--rb-keyboard-height, 0px) + 22px); transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--rb-glass-border); border-radius: var(--rb-radius-pill); background: var(--rb-composer-glass-bg); -webkit-backdrop-filter: blur(var(--rb-composer-glass-blur)) saturate(var(--rb-composer-glass-saturation)); backdrop-filter: blur(var(--rb-composer-glass-blur)) saturate(var(--rb-composer-glass-saturation)); color: var(--rb-muted); font: 500 12px/1 var(--rb-font-body); box-shadow: var(--rb-shadow-card); cursor: pointer; transition: color var(--rb-ease), border-color var(--rb-ease) }
.rb-chat__scroll-end:hover { color: var(--rb-ink); border-color: var(--rb-line) }
.rb-chat__scroll-end .ic { width: var(--rb-icon-chevron); height: var(--rb-icon-chevron) }
.rb-chat__scroll-end[hidden] { display: none }

/* ---------- документы, журнал и настройки ---------- */
.rb-settings { display: grid; grid-template-columns: minmax(0,640px); gap: 16px }
.rb-settings__row { display: flex; align-items: center; justify-content: space-between; gap: 18px }
.rb-settings__row p { margin: 4px 0 0; color: var(--rb-muted) }
.rb-settings__row--child { padding-left: 14px }
.rb-settings__row--divided { border-top: 1px solid var(--rb-line); padding-top: 12px; margin-top: 12px }
.rb-settings-group { display: grid; gap: 12px }
.rb-settings-group > header h2 { margin: 0 }
.rb-settings-group > header p { margin: 4px 0 0; color: var(--rb-muted) }
.rb-settings__panel { display: grid; gap: 22px }
.rb-settings__list { display: grid; gap: 12px }
.rb-settings__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center }
.rb-settings__empty { color: var(--rb-muted); margin: 0 }
.rb-settings__select { width: auto; min-width: 190px; flex: none }
.rb-settings__route { display: grid; gap: 10px }
.rb-settings__route-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px }
.rb-settings__details > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px }
.rb-settings__details > summary::-webkit-details-marker { display: none }
.rb-settings__details > summary::before { content: "›"; display: inline-block; width: 14px; transition: transform .15s ease }
.rb-settings__details[open] > summary::before { transform: rotate(90deg) }
.rb-settings textarea.rb-input { width: 100%; resize: vertical }
.rb-table .rb-td-mark { width: 90px; text-align: center }
@media (max-width: 720px) { .rb-settings__select { min-width: 0; width: 100% } .rb-settings__details .rb-settings__row { flex-wrap: wrap } }
.rb-btn--danger { border: 1px solid var(--rb-line); color: var(--rb-bad) }
.rb-btn--danger:hover { border-color: var(--rb-bad); background: var(--rb-bad-soft) }
.rb-journal { max-width: 1120px }
.rb-journal__status { display: inline-flex; align-items: center; gap: 7px; color: var(--rb-muted); font-size: 13px }
.rb-journal__status i { width: 8px; height: 8px; border-radius: 50%; background: var(--rb-good); box-shadow: 0 0 0 4px color-mix(in srgb,var(--rb-good) 12%,transparent) }
.rb-journal-summary { margin-top: 22px }
.rb-journal__section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 13px }
.rb-journal__section-head h2 { margin: 4px 0 0; font-size: 19px }
.rb-journal__section-head>p { max-width: 430px; margin: 0; color: var(--rb-muted); font-size: 12px; text-align: right }
.rb-journal-summary__grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: var(--rb-border-frame) solid var(--rb-ink) }
.rb-journal-summary__card { min-width: 0; padding: 17px 18px; border-right: 1px solid var(--rb-line); background: var(--rb-canvas); transition: background var(--rb-ease) }
.rb-journal-summary__card:last-child { border-right: 0 }
.rb-journal-summary__card:hover { background: var(--rb-accent-soft) }
.rb-journal-summary__card>div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px }
.rb-journal-summary__card strong { color: var(--rb-accent-strong); font: 700 22px/1 var(--rb-font-mono) }
.rb-journal-summary__card p { margin: 12px 0 0; color: var(--rb-muted); font-size: 12px; line-height: 1.45 }
.rb-journal-feed { margin-top: 34px }
.rb-journal__list { position: relative; min-height: 70px; padding: 18px 20px 2px; border-top: var(--rb-border-frame) solid var(--rb-ink); background: var(--rb-canvas) }
.rb-journal__event { display: grid; grid-template-columns: 120px 18px 1fr; gap: 12px; min-height: 72px }
.rb-journal__time { padding-top: 2px; color: var(--rb-muted); font-size: 12px }
.rb-journal__marker { position: relative }
.rb-journal__marker::before { content: ''; position: absolute; top: 7px; left: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--rb-accent) }
.rb-journal__marker::after { content: ''; position: absolute; top: 18px; bottom: 0; left: 8px; width: 1px; background: var(--rb-line) }
.rb-journal__event:last-child .rb-journal__marker::after { display: none }
.rb-journal__copy strong { display: block }
.rb-journal__copy p { margin: 3px 0 18px; color: var(--rb-muted) }
.rb-journal__more { display: flex; margin: 12px auto 0 }
.rb-journal__more[hidden] { display: none }
.rb-journal__tabs { margin-top: 16px }
.rb-journal-code { margin-top: 26px }
.rb-journal-code[hidden] { display: none }
.rb-journal-code__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 12px }
.rb-journal-code__hours { display: inline-flex; align-items: center; gap: 6px; color: var(--rb-ink); font: 600 13px/1 var(--rb-font-mono) }
.rb-journal-code__window { min-width: 118px; text-align: center }
.rb-journal-log { max-height: 68vh; overflow: auto; margin: 0; padding: 16px 18px; border: var(--rb-border-frame) solid var(--rb-ink); border-radius: var(--rb-radius-lg); background: color-mix(in srgb, var(--rb-ink) 6%, transparent); color: var(--rb-ink); font: 12px/1.55 var(--rb-font-mono); white-space: pre-wrap; word-break: break-word }
.rb-journal-code__hint { margin: 10px 0 0; color: var(--rb-muted); font-size: 12px }
.rb-documents { max-width: 1120px }
.rb-dropzone { min-height: 220px; display: grid; place-items: center; padding: 30px; border: var(--rb-border-frame) dashed var(--rb-line); border-radius: var(--rb-radius-xl); background: var(--rb-surface-soft); text-align: center; cursor: pointer; transition: border-color var(--rb-ease), background var(--rb-ease) }
.rb-dropzone.is-dragging { border-color: var(--rb-accent); background: var(--rb-accent-soft) }
.rb-dropzone strong { display: block; margin: 10px 0 4px; font-size: 20px }
.rb-dropzone p { margin: 0; color: var(--rb-muted) }
.rb-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0 }
.rb-dropzone>.ic { width: 30px; height: 30px; color: var(--rb-accent) }
.rb-documents__section { margin-top: 30px }
.rb-documents__section h2 { margin: 0 0 12px; font-size: 18px }
.rb-documents__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px }
.rb-documents__toolbar h2 { margin: 0 }
.rb-counterparty-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin: -2px 0 16px }
.rb-counterparty-filter[hidden] { display: none }
.rb-counterparty-filter__chip { border: 0; cursor: pointer }
.rb-counterparty-filter p { margin: 0; color: var(--rb-muted); font-size: 12px }
.rb-dropdown__menu .rb-dropdown__segmented { display: flex; justify-content: center; width: fit-content; max-width: 100%; margin: 0 auto 6px }
.rb-dropdown__menu .rb-dropdown__segmented .rb-segmented__item { flex: 0 0 auto; min-width: 96px; min-height: 30px; padding: 0 10px }
.rb-segmented { display: inline-flex; align-items: center; gap: 3px; padding: 3px; border-radius: var(--rb-radius-pill); background: var(--rb-sidebar) }
.rb-segmented__item { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 14px; border: 0; border-radius: var(--rb-radius-pill); background: transparent; color: var(--rb-muted); font: 600 12px/1 var(--rb-font-body); cursor: pointer }
.rb-segmented__item:hover { color: var(--rb-ink) }
.rb-segmented__item.is-active { background: var(--rb-canvas); color: var(--rb-ink); box-shadow: var(--rb-shadow-card) }
.rb-upload-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 8px }
.rb-upload-list--active { margin-top: 12px }
.rb-archive-more { min-height: 64px; display: grid; place-items: center }
.rb-archive-more[hidden] { display: none }
.rb-upload { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--rb-line); border-radius: var(--rb-radius-md); background: var(--rb-canvas) }
.rb-upload__icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--rb-sidebar); color: var(--rb-muted); font-weight: 700 }
.rb-upload strong,.rb-upload p { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.rb-upload p { margin: 3px 0 0; color: var(--rb-muted); font-size: 11px }
.rb-document-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(190px,1fr)); gap: 18px }
.rb-document-card { min-width: 0; overflow: hidden; border: 1px solid var(--rb-line); border-radius: var(--rb-radius-lg); background: var(--rb-canvas); transition: transform var(--rb-ease),box-shadow var(--rb-ease) }
.rb-document-card[data-document-open] { cursor: zoom-in }
.rb-document-card:hover { transform: translateY(-2px); box-shadow: var(--rb-shadow-lift) }
.rb-document-card:focus-visible { outline: 2px solid var(--rb-accent); outline-offset: 3px }
.rb-document-card__media { display: grid; place-items: center; aspect-ratio: 3/4; overflow: hidden; border-bottom: 1px solid var(--rb-line); background: var(--rb-sidebar) }
.rb-document-card__media img { width: 100%; height: 100%; object-fit: cover }
.rb-document-card__placeholder { color: var(--rb-faint); font: 700 18px/1.35 var(--rb-font-mono); letter-spacing: .12em; text-align: center }
.rb-document-card__placeholder.is-error { color: var(--rb-bad); font-size: 13px; letter-spacing: 0 }
.rb-document-card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding: 14px }
.rb-document-card__body strong,.rb-document-card__body p { width: 100%; margin: 0; overflow-wrap: anywhere }
.rb-document-card__body strong { font-size: 14px; line-height: 1.35 }
.rb-document-card__body p { color: var(--rb-muted); font-size: 12px; line-height: 1.45 }
.rb-document-card__counterparty { width: 100%; padding: 0; border: 0; background: transparent; color: var(--rb-muted); font: 400 12px/1.45 var(--rb-font-body); text-align: left; text-decoration: underline; text-decoration-color: var(--rb-line); text-underline-offset: 3px; cursor: pointer }
.rb-document-card__counterparty:hover { color: var(--rb-accent-strong); text-decoration-color: currentColor }
.rb-document-card__body b { min-height: 19px; font: 600 14px/1.35 var(--rb-font-mono) }
.rb-document-preview { width: min(980px,calc(100vw - 32px)); max-width: none; height: calc(100dvh - 32px); max-height: none; padding: 0; overflow: hidden; border: 1px solid var(--rb-glass-border); border-radius: var(--rb-radius-xl); background: var(--rb-canvas); box-shadow: var(--rb-shadow-modal) }
.rb-document-preview[open] { display: flex; flex-direction: column }
.rb-document-preview::backdrop { background: color-mix(in srgb,var(--rb-ink) 58%,transparent); backdrop-filter: blur(5px) }
.rb-document-preview__head { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 16px; min-height: 62px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--rb-line) }
.rb-document-preview__head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.rb-document-preview__actions { display: flex; flex: none; align-items: center; gap: 8px }
.rb-document-preview__download { min-height: 38px; padding: 0 13px; text-decoration: none }
.rb-document-preview__download>.ic { width: 17px; height: 17px }
.rb-document-preview__download:focus-visible { outline-color: var(--rb-ink) }
.rb-document-preview__canvas { flex: 1; min-height: 0; overflow: auto; padding: 16px; background: var(--rb-sidebar); text-align: center; overscroll-behavior: contain }
.rb-document-preview__canvas img { display: block; width: auto; max-width: 100%; height: auto; margin: 0 auto; border-radius: var(--rb-radius-sm); box-shadow: var(--rb-shadow-card) }
.rb-operation-list { display: grid; gap: 10px }
.rb-operation { overflow: hidden; border: 1px solid var(--rb-line); border-radius: var(--rb-radius-lg); background: var(--rb-canvas) }
.rb-operation summary { display: grid; grid-template-columns: minmax(0,1fr) auto 24px; align-items: center; gap: 16px; padding: 17px 18px; cursor: pointer; list-style: none }
.rb-operation summary::-webkit-details-marker { display: none }
.rb-operation summary strong,.rb-operation summary p { display: block; margin: 4px 0 0 }
.rb-operation summary p { color: var(--rb-muted); font-size: 12px }
.rb-operation__state { padding: 6px 10px; border-radius: var(--rb-radius-pill); font-size: 11px; font-weight: 700 }
.rb-operation__state.is-ready { background: var(--rb-good-soft); color: var(--rb-good) }
.rb-operation__state.is-missing { background: var(--rb-warn-soft); color: var(--rb-warn) }
.rb-operation__chevron { color: var(--rb-muted); transition: transform var(--rb-ease) }
.rb-operation[open] .rb-operation__chevron { transform: rotate(180deg) }
.rb-operation__body { padding: 0 18px 18px; border-top: 1px solid var(--rb-line) }
.rb-operation__body .rb-document-grid { margin-top: 16px }
.rb-operation__missing-list { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 14px }
.rb-operation__missing { padding: 6px 9px; border-radius: var(--rb-radius-pill); background: var(--rb-warn-soft); color: var(--rb-warn); font-size: 11px; font-weight: 600 }
.rb-operation__ready { margin: 14px 0 0; color: var(--rb-good); font-size: 12px }
.rb-document-list { display: grid; gap: 8px }
.rb-document-row { display: grid; grid-template-columns: minmax(180px,1fr) 150px 160px 110px; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--rb-line); border-radius: var(--rb-radius-md) }
.rb-document-row__name { min-width: 0 }
.rb-document-row__name strong,
.rb-document-row__name span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.rb-document-row__name span,
.rb-document-row__meta { color: var(--rb-muted); font-size: 12px }
.rb-document-row__status { justify-self: end; font-size: 12px; font-weight: 700 }
.rb-document-row__status.is-processing,
.rb-document-row__status.is-queued { color: var(--rb-warn) }
.rb-document-row__status.is-completed { color: var(--rb-good) }
.rb-document-row__status.is-failed { color: var(--rb-bad) }

@media(max-width:820px) {
  .rb-sidebar { width: min(310px,88vw); transform: translateX(-101%); box-shadow: var(--rb-shadow-modal) }
  html.rb-menu-open .rb-sidebar { transform: none }
  html.rb-sidebar-collapsed .rb-sidebar { width: min(310px,88vw) }
  .rb-sidebar__toggle { display: none }
  .rb-sidebar__close { display: grid }
  html.rb-sidebar-collapsed .rb-sidebar__brand { justify-content: flex-start }
  html.rb-sidebar-collapsed .rb-sidebar__brand .rb-logo { display: inline-flex }
  .rb-workspace,
  html.rb-sidebar-collapsed .rb-workspace { margin-left: 0; --rb-mobilebar-height: 58px }
  .rb-mobilebar { position: sticky; top: 0; z-index: 40; height: var(--rb-mobilebar-height); display: flex; align-items: center; gap: 12px; padding: 0 15px; border-bottom: 1px solid var(--rb-line); background: var(--rb-glass-bg); backdrop-filter: var(--rb-blur) }
  .rb-mobilebar__menu { width: 38px; height: 38px }
  .rb-workspace__main { padding: 22px 14px 40px }
  .rb-page-head { display: block }
  html.rb-sidebar-collapsed .rb-logo__word,
  html.rb-sidebar-collapsed .rb-nav-item span,
  html.rb-sidebar-collapsed .rb-nav__section,
  html.rb-sidebar-collapsed .rb-account__copy,
  html.rb-sidebar-collapsed .rb-account>.ic,
  html.rb-sidebar-collapsed .rb-seller__text,
  html.rb-sidebar-collapsed .rb-seller>.ic { display: initial }
  .rb-journal-summary__grid { grid-template-columns: repeat(2,minmax(0,1fr)) }
  .rb-journal-summary__card:nth-child(2) { border-right: 0 }
  .rb-journal-summary__card:nth-child(-n+2) { border-bottom: 1px solid var(--rb-line) }
  .rb-chat { height: calc(100dvh - 80px) }
}
@media(max-width:650px) {
  /* Высота от dvh: при открытии клавиатуры (interactive-widget=resizes-content)
     вьюпорт сжимается и чат сжимается вместе с ним, без прыжков и обрезки.
     min-height не мешает сжатию — иначе с клавиатурой появляется прокрутка страницы. */
  .rb-chat { height: calc(100dvh - 80px); min-height: 240px }
  .rb-chat__head { display: block }
  .rb-chat__message { max-width: 92% }
  .rb-approval-card { padding: 16px }
  .rb-approval-card__details>div { grid-template-columns: 1fr; gap: 2px }
  .rb-approval-card__actions { justify-content: stretch }
  .rb-approval-card__actions .rb-btn { flex: 1; justify-content: center }
  .rb-chat__compose { width: calc(100vw - 28px); max-width: 100%; padding-bottom: env(safe-area-inset-bottom, 0px) }
  .rb-chat__compose .rb-composer__foot { min-width: 0 }
  .rb-chat__compose .rb-dropdown { flex: 1; min-width: 0; max-width: calc(100vw - 230px) }
  .rb-chat__compose .rb-dropdown__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
  .rb-chat__compose .rb-composer__enter { display: none }
  /* Подпись Enter скрыта — правый край держит сама кнопка отправки. */
  .rb-chat__compose .rb-chat__send, .rb-chat__compose .rb-chat__stop { margin-left: auto }
  .rb-approval-toasts { top: calc(56px + env(safe-area-inset-top, 0px)); bottom: auto; right: 12px; left: 12px; width: auto }
}
@media(max-width:700px) {
  .rb-documents__toolbar { align-items: flex-start; flex-direction: column }
  .rb-segmented { width: 100% }
  .rb-segmented__item { flex: 1 }
  .rb-document-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px }
  .rb-document-card__body { padding: 11px }
  .rb-operation summary { grid-template-columns: minmax(0,1fr) 20px }
  .rb-operation__state { grid-column: 1/-1; justify-self: start }
  .rb-document-row { grid-template-columns: 1fr auto }
  .rb-document-row .rb-document-row__meta:nth-of-type(2) { display: none }
}
@media(max-width:580px) {
  .rb-journal__section-head { display: block }
  .rb-journal__section-head>p { margin-top: 8px; text-align: left }
  .rb-journal-summary__grid { grid-template-columns: 1fr }
  .rb-journal-summary__card,
  .rb-journal-summary__card:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--rb-line) }
  .rb-journal-summary__card:last-child { border-bottom: 0 }
  .rb-journal__list { padding-inline: 12px }
  .rb-journal__event { grid-template-columns: 76px 14px 1fr; gap: 7px }
  .rb-document-preview { width: calc(100vw - 16px); height: calc(100dvh - 16px) }
  .rb-document-preview__download span { display: none }
  .rb-document-preview__download { width: 38px; padding: 0; justify-content: center }
}

/* ---------- композер ---------- */
.rb-composer {
  border: 1px solid var(--rb-line);
  border-radius: var(--rb-radius-xl);
  background: var(--rb-canvas);
  transition: box-shadow var(--rb-ease);
}
.rb-composer:hover { box-shadow: var(--rb-shadow-lift) }
.rb-composer__files { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px 0 }
.rb-composer__file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--rb-radius-pill);
  background: color-mix(in srgb, var(--rb-ink) 6%, transparent);
  font: 500 12px/1.2 var(--rb-font-body);
}
.rb-composer__file.is-error { color: var(--rb-bad); background: var(--rb-bad-soft) }
.rb-composer__file-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.rb-composer__file-state { color: var(--rb-faint); font-size: 10px }
.rb-composer__file .rb-close { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: currentColor; cursor: pointer }
.rb-composer__files[hidden],
.rb-voice-recorder[hidden],
.rb-document-grid[hidden],
.rb-operation-list[hidden] { display: none }
.rb-voice-recorder {
  display: flex;
  align-items: stretch;
  min-width: 0;
  min-height: 44px;
  border-bottom: 1px solid var(--rb-line);
  /* верхние углы повторяют скругление композера, иначе прямоугольный фон
     выступает в его скруглённую угловую зону */
  border-radius: calc(var(--rb-radius-xl) - 1px) calc(var(--rb-radius-xl) - 1px) 0 0;
  background: var(--rb-surface-soft);
  overflow: hidden;
}
.rb-voice-recorder__button {
  display: grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--rb-muted);
  cursor: pointer;
  transition: color var(--rb-ease), background var(--rb-ease);
}
.rb-voice-recorder__button .ic { width: 18px; height: 18px }
.rb-voice-recorder__button.is-cancel { border-right: 1px solid var(--rb-line) }
.rb-voice-recorder__button.is-cancel:hover { background: var(--rb-bad-soft); color: var(--rb-bad) }
.rb-voice-recorder__button.is-send { border-left: 1px solid var(--rb-line); color: var(--rb-accent-strong) }
.rb-voice-recorder__button.is-send:hover { background: var(--rb-accent-soft) }
.rb-voice-recorder__button:disabled { cursor: wait; opacity: .5 }
.rb-voice-recorder__track { display: flex; flex: 1; min-width: 0; align-items: center; gap: 10px; padding: 0 14px }
.rb-voice-recorder__dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--rb-bad); animation: rb-recording-dot 1.5s ease-in-out infinite }
.rb-voice-recorder__time { min-width: 34px; color: var(--rb-ink); font: 600 12px/1 var(--rb-font-mono); font-variant-numeric: tabular-nums }
.rb-voice-recorder__wave { display: flex; flex: 1; min-width: 0; height: 30px; align-items: center; justify-content: space-between; gap: 2px; overflow: hidden }
.rb-voice-recorder__wave i { width: 3px; min-height: 4px; flex: 1; max-width: 5px; border-radius: var(--rb-radius-pill); background: var(--rb-accent); opacity: .62; transition: height 50ms linear }
.rb-voice-recorder.is-transcribing .rb-voice-recorder__dot { background: var(--rb-accent); animation: rb-recording-dot .8s ease-in-out infinite }
.rb-voice-recorder.is-transcribing .rb-voice-recorder__wave { opacity: .35 }
@keyframes rb-recording-dot { 50% { opacity: .35 } }
.rb-composer__input {
  width: 100%;
  min-height: 76px;
  max-height: 200px;
  field-sizing: content;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  color: var(--rb-ink);
  font: 400 16px/1.5 var(--rb-font-body);
  outline: none;
  resize: none;
  overflow-y: auto;
}
.rb-composer__foot { display: flex; align-items: center; gap: 4px; padding: 0 12px 12px }
.rb-composer__tool {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  min-width: 36px;
  padding: 0 10px;
  justify-content: center;
  border: 0;
  border-radius: var(--rb-radius-pill);
  background: transparent;
  color: var(--rb-muted);
  font: 500 12px/1 var(--rb-font-body);
  cursor: pointer;
}
.rb-composer__tool:hover { background: color-mix(in srgb, var(--rb-ink) 7%, transparent); color: var(--rb-ink) }
.rb-composer__enter { margin-left: auto; padding-right: 8px; font: 400 11px/1 var(--rb-font-mono); color: var(--rb-faint) }
.rb-suggest { display: flex; flex-wrap: wrap; gap: 8px }
.rb-suggest button {
  padding: 9px 14px;
  border: 1px solid var(--rb-line);
  border-radius: var(--rb-radius-pill);
  background: var(--rb-canvas);
  color: var(--rb-ink);
  font: 500 13px/1.2 var(--rb-font-body);
  cursor: pointer;
}
.rb-suggest button:hover { border-color: var(--rb-ink) }

/* статус агента: стеклянная пилюля с пульсирующими точками */
.rb-agent {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: 100%;
  padding: 9px 9px 9px 16px;
  border-radius: var(--rb-radius-pill);
  background: var(--rb-glass-bg);
  backdrop-filter: var(--rb-blur);
  -webkit-backdrop-filter: var(--rb-blur);
  border: 1px solid var(--rb-glass-border);
  box-shadow: var(--rb-shadow-glass);
}
.rb-agent__dots { display: inline-flex; gap: 4px; flex: none }
.rb-agent__dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rb-accent);
  animation: rb-dot 1.2s ease-in-out infinite;
}
.rb-agent__dots i:nth-child(2) { animation-delay: .18s }
.rb-agent__dots i:nth-child(3) { animation-delay: .36s }
.rb-agent__label { font: 500 13px/1.2 var(--rb-font-body) }
.rb-agent__time { font: 400 12px/1 var(--rb-font-mono); color: var(--rb-faint) }
.rb-agent__stop {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--rb-ink) 8%, transparent);
  color: var(--rb-ink);
  cursor: pointer;
}
.rb-agent__stop:hover { background: var(--rb-ink); color: var(--rb-canvas) }

/* ---------- карточка товара ---------- */
.rb-product {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rb-line);
  border-radius: var(--rb-radius-md);
  background: var(--rb-canvas);
  transition: box-shadow var(--rb-ease);
}
.rb-product:hover { box-shadow: var(--rb-shadow-lift) }
.rb-product__media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: calc(var(--rb-radius-md) - 1px) calc(var(--rb-radius-md) - 1px) 0 0;
  background: var(--rb-sidebar);
  color: var(--rb-faint);
}
.rb-product__media .rb-chip { position: absolute; top: 8px; left: 8px }
.rb-product__body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 14px }
.rb-product__body b { font: 600 14px/1.35 var(--rb-font-body) }
.rb-product__foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--rb-line);
}
.rb-product__price { font: 600 17px/1.2 var(--rb-font-mono) }
.rb-product.is-selected { border-color: var(--rb-accent); --rb-corner-color: var(--rb-accent) }
.rb-product.is-selected .rb-product__media { background: color-mix(in srgb, var(--rb-accent) 10%, transparent); color: var(--rb-accent) }
.rb-product.is-archived { opacity: .6 }
.rb-product--square .rb-product__media { aspect-ratio: 1 }

/* ---------- метрики, загрузка, пустые состояния ---------- */
.rb-metric { padding: 20px }
.rb-metric__value { margin: 10px 0 6px; font: var(--rb-weight-heading) 32px/1.1 var(--rb-font-heading); letter-spacing: -.03em }
.rb-delta { display: inline-flex; align-items: center; gap: 6px; font: 600 13px/1.2 var(--rb-font-body) }
.rb-delta--up { color: var(--rb-good) }
.rb-delta--down { color: var(--rb-bad) }
.rb-bars { display: flex; align-items: flex-end; gap: 6px; height: 132px }
.rb-bars i { flex: 1; background: var(--rb-accent-soft) }
.rb-bars i.is-peak { background: var(--rb-accent) }
.rb-spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 3px solid var(--rb-line);
  border-top-color: var(--rb-accent);
  border-radius: 50%;
  animation: rb-spin .75s linear infinite;
}
.rb-skeleton {
  height: 12px;
  border-radius: var(--rb-radius-pill);
  background: linear-gradient(90deg, var(--rb-surface-soft), var(--rb-accent-soft), var(--rb-surface-soft));
  background-size: 200% 100%;
  animation: rb-shimmer 1.3s ease infinite;
}
.rb-progress { height: 10px; background: var(--rb-sidebar) }
.rb-progress i { display: block; height: 100%; background: var(--rb-accent) }
.rb-empty {
  padding: 28px 22px;
  border: var(--rb-border-frame) dashed var(--rb-line);
  border-radius: var(--rb-radius-md);
  text-align: center;
}
.rb-empty svg { margin: 0 auto 12px; color: var(--rb-faint) }
.rb-error {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border: var(--rb-border-frame) solid var(--rb-bad);
  border-radius: var(--rb-radius-md);
}

/* ---------- тултип ---------- */
/* Единый тултип вместо нативного title: тёмная чернильная плашка над элементом.
   Появляется с задержкой, чтобы не мельтешить при случайных наведениях;
   прячется мгновенно. */
[data-rb-tip] { position: relative }
[data-rb-tip]::before {
  content: attr(data-rb-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  width: max-content;
  max-width: 260px;
  padding: 7px 10px;
  border-radius: var(--rb-radius-sm);
  background: color-mix(in srgb, var(--rb-ink) 92%, transparent);
  color: var(--rb-canvas);
  font: 500 11.5px/1.4 var(--rb-font-body);
  letter-spacing: normal;
  text-transform: none;
  white-space: normal;
  text-align: left;
  pointer-events: none;
  box-shadow: var(--rb-shadow-lift);
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s ease 0s, visibility 0s linear .15s;
}
[data-rb-tip]:hover::before {
  opacity: 1;
  visibility: visible;
  transition-delay: 2.5s, 2.5s;
}

/* ---------- ховер-рамка ---------- */
/* Уголковая рамка, вспыхивающая при наведении: помечает активные строки и
   значения, по которым можно кликнуть или получить подробность. Вешается
   парой классов rb-corner rb-hoverframe. */
.rb-hoverframe { --rb-corner-color: var(--rb-accent); --rb-corner-inset: -5px; --rb-corner-size: 7px; --rb-corner-stroke: 1px }
.rb-hoverframe::after { opacity: 0; transition: opacity var(--rb-ease) }
.rb-hoverframe:hover::after,
.rb-hoverframe:focus-visible::after { opacity: 1 }

/* Единый подъём интерактивных карточек. Transform композитится отдельно от
   содержимого карточки, поэтому тяжёлые обложки не делают анимацию рваной. */
.rb-hoverlift { transition: transform var(--rb-ease), box-shadow var(--rb-ease) }
.rb-hoverlift:hover { transform: translateY(-2px); box-shadow: var(--rb-shadow-lift) }

/* ---------- дашборд ---------- */
/* Плиточная сетка: ширина/высота плитки приходят из сохранённого layout
   (dashboard_widgets), поэтому пролёты заданы data-атрибутами, а не классами */
.rb-dash-page { position: relative }
/* Панель периода спокойная, как плитки; стекло и тень — только когда она
   реально прилипла при скролле (is-stuck от sentinel) или под курсором */
.rb-dash-toolbar { position: sticky; top: 12px; z-index: 30; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; padding: 9px 12px; border: 1px solid var(--rb-line); border-radius: var(--rb-radius-xl); background: var(--rb-canvas); transition: box-shadow var(--rb-ease), background var(--rb-ease) }
.rb-dash-toolbar:hover { box-shadow: var(--rb-shadow-hover) }
.rb-dash-toolbar.is-stuck { border-color: var(--rb-glass-border); background: var(--rb-glass-bg); backdrop-filter: var(--rb-blur); -webkit-backdrop-filter: var(--rb-blur); box-shadow: var(--rb-shadow-glass) }
.rb-dash-toolbar[hidden] { display: none }
.rb-dash-toolbar .rb-filter { background: var(--rb-canvas) }
.rb-dash-toolbar .rb-filter.is-on { background: var(--rb-ink) }
.rb-dash-toolbar .rb-btn { padding: 8px 15px; font-size: 12px }
.rb-dash-toolbar__hint { color: var(--rb-muted); font-size: 12px }
.rb-dash-toolbar__hint.is-syncing::before {
  content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px;
  border-radius: 50%; background: var(--rb-accent); vertical-align: middle;
  animation: rb-dot 1.2s ease-in-out infinite;
}
.rb-dash-toolbar__custom { position: relative }
.rb-dash-toolbar__spacer { flex: 1 }
.rb-dash-toolbar__edit { display: inline-flex; gap: 6px }
.rb-dash { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); grid-auto-rows: 190px; grid-auto-flow: dense; gap: 16px }
.rb-dash.is-refreshing { opacity: .55; pointer-events: none }
.rb-dash__tile { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 16px 18px; border: 1px solid var(--rb-line); border-radius: var(--rb-radius-xl); background: var(--rb-canvas); overflow: hidden; transition: box-shadow var(--rb-ease) }
.rb-dash__tile:hover { box-shadow: var(--rb-shadow-hover) }
.rb-dash__tile[data-w="2"] { grid-column: span 2 }
.rb-dash__tile[data-w="3"] { grid-column: span 3 }
.rb-dash__tile[data-w="4"] { grid-column: span 4 }
.rb-dash__tile[data-h="2"] { grid-row: span 2 }
.rb-dash__tile[data-h="3"] { grid-row: span 3 }
.rb-dash__tile[data-h="4"] { grid-row: span 4 }
.rb-dash__head { display: flex; flex: none; align-items: center; gap: 8px; min-height: 24px; margin-bottom: 6px }
/* Заголовок плитки — заголовочная гарнитура обычного регистра: caps-моно
   на этой странице не читались */
.rb-dash__title { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--rb-ink); font: 700 13px/1.25 var(--rb-font-heading); letter-spacing: .06em; text-transform: uppercase }
.rb-dash__meta { margin-left: auto; flex: none; color: var(--rb-faint); font: 400 11px/1 var(--rb-font-mono); white-space: nowrap }
/* «Обновить» — тихая иконка: проступает при наведении на плитку и при фокусе с
   клавиатуры, на тач-экранах видна всегда (наведения там нет) */
.rb-dash__refresh { flex: none; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--rb-faint); opacity: 0; cursor: pointer; transition: opacity .15s ease, color .15s ease }
.rb-dash__refresh svg { width: 14px; height: 14px }
.rb-dash__tile:hover .rb-dash__refresh, .rb-dash__refresh:focus-visible { opacity: 1 }
.rb-dash__refresh:hover { color: var(--rb-ink) }
.rb-dash__refresh:disabled { cursor: progress }
.rb-dash__tile.is-syncing .rb-dash__refresh { opacity: 1; animation: rb-spin 1.1s linear infinite }
.is-editing .rb-dash__refresh { display: none }
@media (hover: none) { .rb-dash__refresh { opacity: .7 } }
.rb-dash__body { display: flex; flex: 1; min-height: 0; flex-direction: column }
.rb-dash__value { width: fit-content; font: 700 clamp(24px, 2vw, 32px)/1.1 var(--rb-font-heading); font-variant-numeric: tabular-nums; letter-spacing: -.02em }
.rb-dash__value.is-bad { color: var(--rb-bad) }
.rb-dash__value.is-good { color: var(--rb-good) }
.rb-dash__delta { margin-top: 7px; font-size: 12px }
.rb-dash__delta[hidden] { display: none }
.rb-dash__unit { margin-left: 4px; color: var(--rb-muted); font-size: .6em; font-weight: 600 }
.rb-dash__sub { margin-top: 6px; color: var(--rb-muted); font-size: 12px; line-height: 1.4 }
.rb-dash__empty { flex: 1; display: grid; place-items: center; padding: 12px; color: var(--rb-muted); font-size: 13px; text-align: center }
.rb-dash__more { display: block; margin: 8px auto 4px; padding: 7px 14px; border: 1px solid var(--rb-line); border-radius: var(--rb-radius-pill); background: transparent; color: var(--rb-muted); font: 600 12px/1 var(--rb-font-body); cursor: pointer }
.rb-dash__more:hover { border-color: var(--rb-ink); color: var(--rb-ink) }
/* Герой «Чистая прибыль» нейтрален; тон результата несёт только цифра. */
.rb-dash__tile--hero { background: var(--rb-canvas) }
.rb-dash__hero { display: grid; flex: 1; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; align-items: center }
.rb-dash__hero .rb-dash__value { font-size: clamp(32px, 3vw, 46px) }
.rb-dash__rows { display: grid; gap: 6px; align-content: center }
.rb-dash__row { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--rb-muted); font-size: 12.5px }
.rb-dash__row b { flex: none; color: var(--rb-ink); font: 600 13px/1.3 var(--rb-font-heading); font-variant-numeric: tabular-nums }
.rb-dash__row b.is-bad { color: var(--rb-bad) }
.rb-dash__row b.is-muted { color: var(--rb-muted); font-weight: 500 }
/* прокручиваемые списки внутри плитки */
.rb-dash__scroll { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -18px -16px; padding: 0 18px 14px; overscroll-behavior: contain }
.rb-dash__item { display: grid; gap: 2px; padding: 9px 0; border-top: 1px solid var(--rb-line) }
.rb-dash__item:first-child { border-top: 0 }
.rb-dash__item-top { display: flex; align-items: baseline; gap: 8px; min-width: 0 }
.rb-dash__item-top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 13px/1.35 var(--rb-font-body) }
.rb-dash__item-top .rb-num { margin-left: auto; flex: none }
.rb-dash__item-top time { margin-left: auto; flex: none }
.rb-dash__item p { margin: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--rb-muted); font-size: 12px; line-height: 1.45 }
.rb-dash__item time { color: var(--rb-faint); font: 400 11px/1.3 var(--rb-font-mono); white-space: nowrap }
.rb-dash__item p .rb-chip { vertical-align: baseline; margin-right: 4px }
/* «Всего продаж»: строка маркетплейса с логотипом */
.rb-mp-list { display: grid; gap: 2px; margin-top: 12px }
.rb-mp { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--rb-line) }
.rb-mp:first-child { border-top: 0 }
.rb-mp__logo { flex: none; width: 20px; height: 20px; border-radius: var(--rb-radius-xs); object-fit: contain }
.rb-mp__fallback { flex: none; color: var(--rb-muted); font: 600 11px/1.2 var(--rb-font-body) }
.rb-mp__cells { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0 }
.rb-mp__units { font: 600 14px/1.2 var(--rb-font-heading); font-variant-numeric: tabular-nums }
.rb-mp__amount { color: var(--rb-ink); font-size: 12.5px; font-variant-numeric: tabular-nums }
.rb-mp__ppu { color: var(--rb-good); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums }
.rb-mp__ppu.is-bad { color: var(--rb-bad) }
.rb-mp__note { margin-left: auto; color: var(--rb-faint); font: 400 11px/1.3 var(--rb-font-mono); white-space: nowrap }
.rb-mp__empty { padding: 7px 0; border-top: 1px solid var(--rb-line); color: var(--rb-faint); font-size: 12px }
/* Принадлежность плитки маркетплейсу: фирменные цвета WB/Ozon — осознанно вне
   палитры брендбука, это чужие бренды, а не наши роли. */
.rb-dash__tile--wb { border-color: color-mix(in srgb, #CB11AB 38%, var(--rb-line)) }
.rb-dash__tile--ozon { border-color: color-mix(in srgb, #005BFF 38%, var(--rb-line)) }
.rb-dash__mp-icon { flex: none; width: 22px; height: 22px; border-radius: 6px; object-fit: contain }
.rb-dash-toolbar__mp { margin-left: 6px }
.rb-dash-toolbar__mp .rb-segmented__item { min-height: 28px; padding: 0 12px }
/* контроль остатков: обложка + остаток + дни до нуля */
.rb-stock__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px }
.rb-stock__threshold { display: inline-flex; align-items: center; gap: 5px; color: var(--rb-faint); font: 600 10px/1 var(--rb-font-mono); letter-spacing: .05em; text-transform: uppercase }
.rb-stock__threshold input { width: 52px; height: 26px; padding: 0 8px; border: 1px solid var(--rb-line); border-radius: var(--rb-radius-pill); background: var(--rb-canvas); color: var(--rb-ink); font: 600 12px var(--rb-font-heading); font-variant-numeric: tabular-nums }
.rb-stock__bar .rb-filter { padding: 4px 10px; font-size: 11px }
.rb-stock__restore { border: 0; background: transparent; color: var(--rb-muted); font: 500 11px var(--rb-font-body); cursor: pointer; text-decoration: underline dotted }
.rb-stock { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--rb-line) }
.rb-stock:first-child { border-top: 0 }
.rb-stock__cover { flex: none; width: 34px; height: 45px; border-radius: var(--rb-radius-xs); border: 1px solid var(--rb-line); background: var(--rb-sidebar); object-fit: cover }
i.rb-stock__cover { display: block }
.rb-stock__main { flex: 1; min-width: 0; display: grid; gap: 3px }
.rb-stock__top { display: flex; align-items: center; gap: 6px; min-width: 0 }
.rb-stock__top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 12.5px/1.3 var(--rb-font-body) }
.rb-stock__hide { flex: none; border: 0; background: transparent; color: var(--rb-faint); font-size: 14px; line-height: 1; cursor: pointer; opacity: 0 }
.rb-stock:hover .rb-stock__hide { opacity: 1 }
.rb-stock__facts { display: flex; align-items: baseline; gap: 8px }
.rb-stock__facts > b { font: 600 12.5px/1.2 var(--rb-font-heading); font-variant-numeric: tabular-nums }
.rb-stock__days { padding: 1px 7px; border-radius: var(--rb-radius-pill); background: var(--rb-good-soft); color: var(--rb-good); font: 600 10.5px/1.5 var(--rb-font-mono); white-space: nowrap }
.rb-stock__days.is-warn { background: var(--rb-warn-soft); color: var(--rb-warn) }
.rb-stock__days.is-bad { background: var(--rb-bad-soft); color: var(--rb-bad) }
.rb-stock__speed { color: var(--rb-faint); font: 400 11px/1.2 var(--rb-font-mono) }
/* пострадавший на складах товар: склад раскрывается в список позиций */
.rb-damaged__head { margin-bottom: 4px }
.rb-damaged { border-top: 1px solid var(--rb-line) }
.rb-damaged:first-child { border-top: 0 }
.rb-damaged__office { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; width: 100%; padding: 9px 0; border: 0; background: transparent; color: var(--rb-ink); font: 500 12.5px/1.3 var(--rb-font-body); text-align: left; cursor: pointer }
.rb-damaged__office::after { content: '⌄'; flex: none; color: var(--rb-faint); font-size: 11px; transition: transform .15s ease }
.rb-damaged__office.is-open::after { transform: rotate(180deg) }
.rb-damaged__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.rb-damaged__facts { display: flex; align-items: baseline; gap: 8px }
.rb-damaged__facts > b { font: 600 12.5px/1.2 var(--rb-font-heading); font-variant-numeric: tabular-nums }
.rb-damaged__cogs { color: var(--rb-faint); font: 400 11px/1.2 var(--rb-font-mono) }
.rb-damaged__list { padding: 0 0 8px 10px; border-left: 1px solid var(--rb-line); margin-left: 2px }
/* история переводов на р/с */
.rb-transfer { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-top: 1px solid var(--rb-line) }
.rb-transfer:first-child { border-top: 0 }
.rb-transfer__main { flex: 1; min-width: 0; display: grid; gap: 2px }
.rb-transfer__top { display: flex; align-items: center; gap: 8px }
.rb-transfer__top b { font: 600 13px/1.3 var(--rb-font-heading); font-variant-numeric: tabular-nums }
.rb-transfer__state { margin-left: auto; padding: 2px 8px; border-radius: var(--rb-radius-pill); font: 600 9px/1.5 var(--rb-font-mono); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap }
.rb-transfer__state.is-done { background: var(--rb-good-soft); color: var(--rb-good) }
.rb-transfer__state.is-pending { background: var(--rb-warn-soft); color: var(--rb-warn) }
.rb-transfer__time { color: var(--rb-faint); font: 400 11px/1.35 var(--rb-font-mono) }
/* автоматизации: иконка в плашке + статус-галка вместо цветных точек */
.rb-auto { display: flex; gap: 11px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--rb-line) }
.rb-auto:first-child { border-top: 0 }
.rb-auto__icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--rb-line); border-radius: var(--rb-radius-sm); background: var(--rb-sidebar); color: var(--rb-muted) }
.rb-auto__icon .ic { width: 17px; height: 17px }
.rb-auto__main { flex: 1; min-width: 0; display: grid; gap: 3px }
.rb-auto__top { display: flex; align-items: center; gap: 8px; min-width: 0 }
.rb-auto__top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 13px/1.35 var(--rb-font-body) }
.rb-auto__state { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--rb-good-soft); color: var(--rb-good) }
.rb-auto__state .ic { width: 12px; height: 12px }
.rb-auto__state.is-error { background: var(--rb-bad-soft); color: var(--rb-bad) }
.rb-auto__state.is-running { background: var(--rb-info-soft); color: var(--rb-info) }
.rb-auto__state.is-running .ic { animation: rb-auto-spin 1.6s linear infinite }
@keyframes rb-auto-spin { to { transform: rotate(360deg) } }
.rb-auto__desc { margin: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--rb-muted); font-size: 12px; line-height: 1.45 }
.rb-auto__time { color: var(--rb-faint); font: 400 11px/1.3 var(--rb-font-mono) }
.rb-dash__thumb { flex: none; width: 26px; height: 26px; align-self: center; border: 1px solid var(--rb-line); border-radius: var(--rb-radius-xs); object-fit: cover; background: var(--rb-sidebar); display: inline-block }
.rb-dash__item--news { width: 100%; margin: 2px 0; padding: 9px 10px; border-right: 0; border-bottom: 0; border-left: 0; border-radius: var(--rb-radius-xs); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; --rb-corner-inset: 0px }
.rb-dash__item--news:hover, .rb-dash__item--news:focus-visible { background: transparent; color: inherit; outline: none }
.rb-dash__item--news:hover .rb-dash__news-title, .rb-dash__item--news:focus-visible .rb-dash__news-title { color: var(--rb-accent-strong) }
.rb-dash__item--news:hover p, .rb-dash__item--news:focus-visible p { color: var(--rb-ink) }
.rb-dash__news-title { font: 600 13px/1.4 var(--rb-font-body); white-space: normal }
.rb-dash__news-meta { align-items: center }
.rb-dash__news-meta time { margin-left: auto }
.rb-dash__news-content { display: flex; gap: 9px; min-width: 0 }
.rb-dash__news-content>span { min-width: 0 }
.rb-dash__news-content p { margin-top: 2px }
.rb-dash__news-thumb { flex: none; width: 42px; height: 42px; border-radius: var(--rb-radius-xs); object-fit: cover; background: var(--rb-sidebar) }
.rb-news-source { display: inline-flex; min-width: 0; align-items: center; gap: 6px; color: var(--rb-muted); font-size: 11px; line-height: 1.2 }
.rb-news-source>span, .rb-news-source>b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.rb-news-source__icon { flex: none; width: 17px; height: 17px; border-radius: 5px; object-fit: cover }
.rb-news-popover { position: fixed; z-index: 88; max-height: calc(100vh - 24px); overflow: auto; padding: 18px; border-radius: var(--rb-radius-xl); box-shadow: var(--rb-shadow-modal) }
.rb-news-popover[hidden] { display: none }
.rb-news-popover>.rb-close { position: absolute; top: 10px; right: 10px }
.rb-news-popover .rb-news-source { max-width: calc(100% - 34px); padding-right: 34px }
.rb-news-popover h3 { margin: 13px 0 10px; font: 600 17px/1.35 var(--rb-font-heading) }
.rb-news-popover__body { color: var(--rb-muted); font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere }
.rb-news-popover__body a { color: var(--rb-accent-strong) }
.rb-news-popover__media { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin: 10px 0 }
.rb-news-popover__media img { display: block; width: 100%; max-height: 240px; border-radius: var(--rb-radius-md); object-fit: cover }
.rb-news-popover>.rb-btn { margin-top: 14px }
.rb-dialog--news { width: min(680px,100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column }
.rb-dialog--news .rb-dialog__body { overflow-y: auto }
.rb-news-sources { display: grid; gap: 10px }
.rb-news-source-card { padding: 13px; border: 1px solid var(--rb-line); border-radius: var(--rb-radius-md) }
.rb-news-source-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px }
.rb-news-source-card__head .rb-news-source { max-width: 70%; color: var(--rb-ink); font-size: 13px }
.rb-news-source-card__status { flex: none; color: var(--rb-faint); font: 600 10px/1 var(--rb-font-mono) }
.rb-news-source-card__status.is-active { color: var(--rb-good) }
.rb-news-source-card__status.is-error, .rb-news-source-card__error { color: var(--rb-bad) }
.rb-news-source-card__error { margin: -3px 0 9px!important; font-size: 11px }
.rb-news-source-card textarea.rb-input { min-height: 58px }
.rb-news-source-card__actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px }
.rb-news-source-card__actions .is-danger { color: var(--rb-bad) }
.rb-news-source-add { display: flex; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rb-line) }
.rb-news-source-add .rb-input { flex: 1; min-width: 0 }
/* лента заказов: миниатюра на две строки, суммы и время правым столбцом */
.rb-dash-order { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; gap: 2px 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--rb-line) }
.rb-dash-order:first-child { border-top: 0 }
.rb-dash-order .rb-dash__thumb { width: 36px; height: 36px; grid-row: 1 / span 2; align-self: center }
.rb-dash-order__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 13px/1.3 var(--rb-font-body) }
.rb-dash-order__sum { text-align: right; white-space: nowrap; font: 600 13px/1.3 var(--rb-font-heading); font-variant-numeric: tabular-nums }
/* маршрут может занять две строки: склады и округа длинные, в одну не влезали */
.rb-dash-order__route { grid-column: 2 / span 2; min-width: 0; margin: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--rb-muted); font-size: 12px; line-height: 1.4 }
.rb-dash-order__route b { font-weight: 600; color: var(--rb-muted) }
.rb-dash-order__route b.is-good { color: var(--rb-good) }
.rb-dash-order__route b.is-bad { color: var(--rb-bad) }
.rb-dash-order__time { grid-column: 3; align-self: start; text-align: right; white-space: nowrap; color: var(--rb-faint); font: 400 11px/1.3 var(--rb-font-mono) }
.rb-dash__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--rb-faint); align-self: center }
.rb-dash__dot.is-good { background: var(--rb-good) }
.rb-dash__dot.is-bad { background: var(--rb-bad) }
.rb-dash__dot.is-info { background: var(--rb-info) }
.rb-dash__filter-btn { padding: 4px 10px; border: 1px solid var(--rb-line); border-radius: var(--rb-radius-pill); background: transparent; color: var(--rb-muted); font: 600 11px/1.2 var(--rb-font-body); cursor: pointer }
.rb-dash__filter-btn:hover { border-color: var(--rb-ink); color: var(--rb-ink) }
/* график: один показатель за раз, цвет закреплён за показателем (--rb-chart-N) */
/* итог по выбранной метрике над графиком */
.rb-dash-chart__total { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px }
.rb-dash-chart__total .rb-dash__value { font-size: clamp(24px, 2.2vw, 32px) }
.rb-dash-chart__total-label { color: var(--rb-muted); font-size: 12px }
.rb-dash-chart__legend { display: inline-flex; align-items: center; gap: 12px; margin-left: auto }
.rb-dash-chart__key { display: inline-flex; align-items: center; gap: 5px; color: var(--rb-muted); font: 500 11.5px/1 var(--rb-font-mono); font-variant-numeric: tabular-nums }
.rb-dash-chart__swatch { width: 12px; height: 3px; border-radius: 2px; background: var(--rb-chart-2) }
.rb-dash-chart__key.is-ozon .rb-dash-chart__swatch { background: #005BFF }
.rb-dash-chart__pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px }
.rb-dash-chart__pills .rb-filter { padding: 6px 12px; font-size: 12px }
.rb-dash-chart { position: relative; flex: 1; min-height: 0 }
.rb-dash-chart svg { display: block; width: 100%; height: 100% }
.rb-dash-chart__tip { position: absolute; z-index: 5; padding: 7px 10px; border-radius: var(--rb-radius-sm); background: var(--rb-glass-bg); backdrop-filter: var(--rb-blur); -webkit-backdrop-filter: var(--rb-blur); border: 1px solid var(--rb-glass-border); box-shadow: var(--rb-shadow-card); pointer-events: none; white-space: nowrap; font-size: 11px; color: var(--rb-muted) }
.rb-dash-chart__tip b { display: block; color: var(--rb-ink); font: 600 13px/1.3 var(--rb-font-mono) }
.rb-dash-chart__tip[hidden] { display: none }
/* таблица товаров */
.rb-dash-table { width: 100%; border-collapse: collapse }
.rb-dash-table th { position: sticky; top: 0; z-index: 2; padding: 8px 10px; border-bottom: var(--rb-border-frame) solid var(--rb-ink); background: var(--rb-canvas); color: var(--rb-muted); font: 600 10px/1.2 var(--rb-font-mono); letter-spacing: .07em; text-transform: uppercase; text-align: right; white-space: nowrap; cursor: pointer; user-select: none }
.rb-dash-table th:first-child { text-align: left; cursor: default }
.rb-dash-table th:hover { color: var(--rb-ink) }
.rb-dash-table th.is-on { color: var(--rb-accent-strong) }
.rb-dash-table td { padding: 8px 10px; border-bottom: 1px solid var(--rb-line); font: 500 12px/1.35 var(--rb-font-mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap }
.rb-dash-table td:first-child { text-align: left; white-space: normal; font-family: var(--rb-font-body) }
.rb-dash-table td.is-bad { color: var(--rb-bad) }
.rb-dash-table tbody tr:last-child td { border-bottom: 0 }
.rb-dash-table tbody tr:hover { background: var(--rb-surface-soft) }
.rb-dash-table tbody tr.is-link { cursor: pointer }
.rb-dash-product { display: flex; align-items: center; gap: 10px; min-width: 200px }
.rb-dash-product img, .rb-dash-product i { flex: none; width: 34px; height: 34px; border: 1px solid var(--rb-line); border-radius: var(--rb-radius-xs); object-fit: cover; background: var(--rb-sidebar) }
.rb-dash-product div { min-width: 0 }
.rb-dash-product b { display: block; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 12px/1.3 var(--rb-font-body) }
.rb-dash-product span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--rb-faint); font: 400 10px/1.4 var(--rb-font-mono) }
/* режим настройки: пунктирная рамка, стрелки переноса и лоток добавления */
.is-editing .rb-dash__tile { box-shadow: none; outline: var(--rb-border-frame) dashed color-mix(in srgb, var(--rb-ink) 25%, transparent); outline-offset: 3px }
.rb-dash__ctl { display: none; flex: none; align-items: center; gap: 2px }
.is-editing .rb-dash__ctl { display: inline-flex }
.rb-dash__ctl button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--rb-line); border-radius: 50%; background: var(--rb-canvas); color: var(--rb-muted); font-size: 15px; line-height: 1; cursor: pointer }
.rb-dash__ctl button:hover { background: color-mix(in srgb, var(--rb-ink) 8%, transparent); color: var(--rb-ink) }
.rb-dash__ctl button.is-remove:hover { background: var(--rb-bad-soft); color: var(--rb-bad) }
.rb-dash-tray { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; width: max-content; max-width: calc(100vw - 32px); padding: 10px 14px; border-radius: var(--rb-radius-xl) }
.rb-dash-tray[hidden] { display: none }
.rb-dash-tray__empty { color: var(--rb-muted); font-size: 12px }

/* ---------- календарь диапазона ---------- */
.rb-datepicker { position: absolute; z-index: 70; top: calc(100% + 8px); left: 0; width: 288px; padding: 12px; border: 1px solid var(--rb-line); border-radius: var(--rb-radius-lg); background: var(--rb-canvas); box-shadow: var(--rb-shadow-modal) }
.rb-datepicker[hidden] { display: none }
.rb-datepicker__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px }
.rb-datepicker__title { font: 600 13px/1.2 var(--rb-font-heading); text-transform: capitalize }
.rb-datepicker__nav { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid var(--rb-line); border-radius: 50%; background: transparent; color: var(--rb-muted); font-size: 14px; line-height: 1; cursor: pointer }
.rb-datepicker__nav:hover { border-color: var(--rb-ink); color: var(--rb-ink) }
.rb-datepicker__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px }
.rb-datepicker__dow { padding: 4px 0; text-align: center; color: var(--rb-faint); font: 600 10px/1 var(--rb-font-mono); text-transform: uppercase }
.rb-datepicker__day { height: 32px; padding: 0; border: 0; border-radius: var(--rb-radius-xs); background: transparent; color: var(--rb-ink); font: 500 12px/1 var(--rb-font-body); font-variant-numeric: tabular-nums; cursor: pointer }
.rb-datepicker__day:hover { background: var(--rb-sidebar) }
.rb-datepicker__day.is-out { color: var(--rb-faint) }
.rb-datepicker__day.is-inrange { background: var(--rb-accent-soft); border-radius: 0 }
.rb-datepicker__day.is-edge { background: var(--rb-accent); color: var(--rb-canvas) }
.rb-datepicker__day:disabled { color: var(--rb-line); background: transparent; cursor: default }
.rb-datepicker__hint { margin: 8px 2px 0; color: var(--rb-muted); font-size: 11px }
.rb-dialog-backdrop[hidden] { display: none }
.rb-dialog__body textarea.rb-input { resize: vertical; min-height: 90px }
@media(max-width:1180px) {
  .rb-dash { grid-template-columns: repeat(2, minmax(0,1fr)) }
  .rb-dash__tile[data-w="3"], .rb-dash__tile[data-w="4"] { grid-column: span 2 }
}
@media(max-width:680px) {
  .rb-dash { grid-template-columns: minmax(0,1fr); grid-auto-rows: auto }
  .rb-dash__tile[data-w] { grid-column: span 1 }
  .rb-dash__tile[data-h] { grid-row: auto; min-height: 0 }
  .rb-dash__tile[data-h="2"], .rb-dash__tile[data-h="3"], .rb-dash__tile[data-h="4"] { min-height: 330px; max-height: 430px }
  .rb-dash__hero { grid-template-columns: minmax(0,1fr); gap: 12px }
  .rb-dash-toolbar { position: static }
  .rb-news-popover { right: 8px!important; bottom: 8px; left: 8px!important; top: auto!important; width: auto!important; max-height: min(78vh,620px); border-radius: var(--rb-radius-xl) }
  .rb-news-source-add { flex-direction: column }
}

/* На тач-экране нет наведения: первый тап по строке чата уходил на проявление
   действий, и переход требовал ещё одного касания. */
@media (hover: none) {
  .rb-nav-chat__actions { opacity: 1; pointer-events: auto }
  .rb-nav-chat .rb-nav-item--chat { padding-right: 74px }
}

/* Композер на телефоне: круглая кнопка отправки съедала строку инструментов,
   а выбор контекста сжимался до «Весь каб…». */
@media(max-width:580px) {
  .rb-composer__input { min-height: 56px; padding: 12px 14px }
  .rb-composer__foot { gap: 2px; padding: 0 8px 10px }
  .rb-composer__tool { min-width: 34px; padding: 0 6px }
  .rb-chat__compose .rb-dropdown { flex: 0 1 auto; min-width: 0; max-width: none }
  .rb-chat__compose .rb-dropdown__trigger { width: auto; max-width: 100%; gap: 4px; padding-inline: 8px }
  .rb-chat__compose .rb-dropdown__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
  .rb-chat__send.rb-btn--round { width: 34px; height: 34px }
  .rb-chat__send.rb-btn--round .ic { width: 17px; height: 17px }
}

@keyframes rb-spin { to { transform: rotate(360deg) } }
@keyframes rb-shimmer { to { background-position: -200% 0 } }
@keyframes rb-dot {
  0%, 100% { transform: translateY(0); opacity: .45 }
  50% { transform: translateY(-3px); opacity: 1 }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important }
}
