/* boardroom.css — web-отчёты «совета советников». Фирменный стиль CattleSales
   (forest green / cream / olive, rounded 31px, pill-теги, мягкие тени).
   Источник цветов — tokens.css (загружен через app.css), с hex-fallback'ами. */

.brd {
  --brd-green: var(--md-sys-color-primary, #1B743E);
  --brd-olive: #c2bf6c;
  --brd-cream: var(--md-sys-color-surface, #FFFBEE);
  --brd-ink: var(--md-sys-color-on-surface, #1A1C18);
  --brd-good: #2E7D32;
  --brd-ok: #6c9a3a;
  --brd-weak: #F57F17;
  --brd-bad: #B3261E;
  --brd-na: #9aa0a6;
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 4px 64px;
  color: var(--brd-ink);
}

/* --- hero / шапка --- */
.brd__hero { margin-bottom: 24px; }
.brd__h1 { font-size: 30px; font-weight: 700; color: var(--brd-green); margin: 8px 0 12px; }
.brd__lead { font-size: 16px; line-height: 1.6; max-width: 760px; color: #3a3d38; }
.brd__hint { margin-top: 12px; font-size: 14px; color: #5a5d57; }
.brd__hint code, .brd__empty code {
  background: rgba(194,191,108,.18); padding: 2px 8px; border-radius: 8px;
  font-size: 13px; color: var(--brd-green);
}
.brd__back {
  display: inline-block; margin-bottom: 16px; color: var(--brd-green);
  text-decoration: none; font-weight: 500;
}
.brd__back:hover { text-decoration: underline; }
.brd__empty { padding: 40px 0; color: #5a5d57; }

/* --- сетка карточек/советников --- */
.brd__grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* --- карточка заседания (список) --- */
.brd-card {
  display: block; text-decoration: none; color: inherit;
  background: linear-gradient(rgba(194,191,108,.06), rgba(194,191,108,.10)), var(--brd-cream);
  border: 1px solid rgba(194,191,108,.35);
  border-radius: 24px; padding: 18px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: transform .15s, box-shadow .15s;
}
.brd-card:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(0,0,0,.12); }
.brd-card__top { display: flex; align-items: center; justify-content: space-between; }
.brd-card__date { font-size: 12px; color: #8a8d87; }
.brd-card__title { font-size: 18px; font-weight: 600; margin: 10px 0; line-height: 1.35; }
.brd-card__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.brd-card__spread { margin-top: 10px; font-size: 12px; color: #8a8d87; }

/* --- балл (кружок) --- */
.brd-score {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; padding: 0 8px; border-radius: 100px;
  font-weight: 700; font-size: 18px; color: #fff; background: var(--brd-na);
}
.brd-score--lg { min-width: 64px; height: 64px; font-size: 26px; }
.brd-score--good { background: var(--brd-good); }
.brd-score--ok   { background: var(--brd-ok); }
.brd-score--weak { background: var(--brd-weak); }
.brd-score--bad  { background: var(--brd-bad); }
.brd-score--na   { background: var(--brd-na); }

/* --- теги/чипы (pill) --- */
.brd-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 12px; border-radius: 100px; font-size: 12px; font-weight: 600;
  background: rgba(0,0,0,.05); color: #444;
}
.brd-tag--for     { background: rgba(46,125,50,.14); color: #2E7D32; }
.brd-tag--against { background: rgba(179,38,30,.12); color: #B3261E; }
.brd-tag--mixed   { background: rgba(245,127,23,.14); color: #b25f00; }
.brd-tag--delta   { background: rgba(27,116,62,.12); color: var(--brd-green); }
.brd-tag--soft    { background: rgba(194,191,108,.20); color: #6a6a2e; }
.brd-chip {
  display: inline-flex; padding: 4px 12px; border-radius: 100px;
  border: 1px solid rgba(194,191,108,.45); font-size: 12px; color: #5a5d57;
}

/* --- деталь: шапка идеи --- */
.brd-detail__head { margin-bottom: 20px; }
.brd-detail__body { margin: 10px 0; line-height: 1.6; color: #3a3d38; max-width: 800px; }
.brd-detail__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* --- сводка баллов --- */
.brd-summary {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px; padding: 18px 22px; border-radius: 24px; margin-bottom: 20px;
  background: linear-gradient(rgba(27,116,62,.05), rgba(27,116,62,.09)), var(--brd-cream);
  border: 1px solid rgba(27,116,62,.18);
}
.brd-summary__score { display: flex; align-items: center; gap: 14px; }
.brd-summary__label { font-size: 13px; color: #5a5d57; }
.brd-summary__spread { font-size: 15px; font-weight: 600; }
.brd-summary__dist { display: flex; gap: 8px; flex-wrap: wrap; }

/* --- синтез секретаря --- */
.brd-synth {
  padding: 20px 24px; border-radius: 24px; margin-bottom: 20px;
  background: var(--brd-cream); border: 1px solid rgba(194,191,108,.4);
  border-left: 5px solid var(--brd-green);
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.brd-synth__h { font-size: 18px; color: var(--brd-green); margin: 0 0 10px; }
.brd-synth__text { line-height: 1.65; font-size: 15px; }

/* --- адвокат дьявола --- */
.brd-devil {
  padding: 18px 24px; border-radius: 24px; margin-bottom: 24px;
  background: rgba(179,38,30,.05); border: 1px solid rgba(179,38,30,.25);
  border-left: 5px solid var(--brd-bad);
}
.brd-devil__h { font-size: 17px; color: var(--brd-bad); margin: 0 0 10px;
  display: flex; align-items: center; gap: 10px; }
.brd-devil__risk { font-weight: 600; margin: 6px 0; }
.brd-devil__list { margin: 8px 0 0; padding-left: 20px; line-height: 1.6; }

.brd-section-h { font-size: 20px; margin: 8px 0 16px; color: var(--brd-ink); }

/* --- карточка советника --- */
.brd-advisor {
  background: var(--brd-cream); border: 1px solid rgba(194,191,108,.4);
  border-radius: 24px; padding: 18px 20px; box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.brd-advisor--farmer { border-left: 4px solid var(--brd-olive); }
.brd-advisor--it_lens { border-left: 4px solid var(--brd-green); }
.brd-advisor__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.brd-advisor__name { font-size: 15px; font-weight: 600; margin: 0 0 6px; line-height: 1.3; }
.brd-advisor__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.brd-advisor__risk {
  font-size: 14px; line-height: 1.55; margin: 8px 0 12px;
  padding: 8px 12px; background: rgba(245,127,23,.08); border-radius: 12px;
}
.brd-err { color: var(--brd-bad); font-size: 13px; }

/* --- pros / cons --- */
.brd-pc { margin: 8px 0; }
.brd-pc__h {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; padding: 2px 10px; border-radius: 100px; margin-bottom: 4px;
}
.brd-pc__h--pro { background: rgba(46,125,50,.14); color: #2E7D32; }
.brd-pc__h--con { background: rgba(179,38,30,.10); color: #B3261E; }
.brd-pc ul { margin: 4px 0 0; padding-left: 20px; line-height: 1.55; font-size: 14px; }
.brd-pc li { margin-bottom: 4px; }

/* --- ответ оппонентам --- */
.brd-reb { margin-top: 10px; font-size: 14px; }
.brd-reb summary { cursor: pointer; color: var(--brd-green); font-weight: 500; }
.brd-reb p { margin: 8px 0 0; line-height: 1.55; color: #3a3d38; }

/* --- глобальный фильтр совещаний --- */
.brd-filter {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px 14px; margin-bottom: 22px; border-radius: 100px;
  background: rgba(194,191,108,.10); border: 1px solid rgba(194,191,108,.35);
}
.brd-filter__label { font-size: 13px; color: #5a5d57; font-weight: 600; margin-right: 2px; }
.brd-filter__btn {
  display: inline-flex; align-items: center; padding: 6px 16px; border-radius: 100px;
  font-size: 13px; font-weight: 600; text-decoration: none; color: #555;
  background: var(--brd-cream); border: 1px solid rgba(0,0,0,.08); transition: all .12s;
}
.brd-filter__btn:hover { background: rgba(27,116,62,.08); }
.brd-filter__btn--active { background: var(--brd-green); color: #fff; border-color: var(--brd-green); }

/* --- разбивка по заседаниям (чипы) --- */
.brd-card { display: flex; flex-direction: column; }
.brd-card__main { display: block; text-decoration: none; color: inherit; }
.brd-sessions {
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgba(194,191,108,.5);
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.brd-sessions__label { font-size: 11px; color: #8a8d87; margin-right: 4px; }
.brd-session-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 100px; font-size: 12px; font-weight: 600;
  text-decoration: none; color: #444; background: rgba(0,0,0,.04);
  border: 1px solid transparent; transition: background .12s;
}
.brd-session-chip:hover { background: rgba(27,116,62,.10); }
.brd-session-chip--latest { background: rgba(27,116,62,.12); color: var(--brd-green); }
.brd-session-chip--current { border-color: var(--brd-green); background: rgba(27,116,62,.16); }
.brd-session-chip__date { font-size: 10px; color: #8a8d87; font-weight: 500; }
.brd-session-chip__badge {
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  background: var(--brd-green); color: #fff; padding: 1px 6px; border-radius: 100px;
}
.brd-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brd-na); }
.brd-dot--good { background: var(--brd-good); }
.brd-dot--ok { background: var(--brd-ok); }
.brd-dot--weak { background: var(--brd-weak); }
.brd-dot--bad { background: var(--brd-bad); }

/* --- переключатель заседаний на деталке --- */
.brd-switch {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 12px 16px; margin-bottom: 16px; border-radius: 100px;
  background: rgba(194,191,108,.10); border: 1px solid rgba(194,191,108,.35);
}
.brd-switch__label { font-size: 13px; color: #5a5d57; font-weight: 500; }

@media (max-width: 600px) {
  .brd__grid { grid-template-columns: 1fr; }
  .brd__h1 { font-size: 24px; }
  .brd-switch { border-radius: 16px; }
}
