/* Стили конструктора графиков.

   Источник — макет владельца design\Конструктор графиков.dc.html. В макете всё
   написано инлайновыми style=, здесь те же значения перенесены в классы:
   политика безопасности (CSP style-src 'self') атрибуты стиля не выполняет.
   Значения не «примерно похожие», а ровно те же — это требование приёмки.
*/

/* ------------------------------------------------------------------ основа */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Onest', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: #ecebe6;
  color: #23241f;
  -webkit-font-smoothing: antialiased;
}
::placeholder { color: #a3a39d; }
a { color: #34b27a; text-decoration: none; }
a:hover { color: #2a9463; }
input, select, button, textarea { font-family: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: rgba(0, 0, 0, .28); }
::-webkit-scrollbar { height: 10px; width: 10px; }
::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .14); border-radius: 8px; }

.app { display: flex; min-height: 100vh; background: #ecebe6; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- сайдбар */
.side {
  width: 264px; flex: 0 0 264px; background: #17181a; color: #e9e9e6;
  padding: 22px 20px; display: flex; flex-direction: column; gap: 24px;
  position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 52px; height: 52px; border-radius: 13px;
  background: linear-gradient(150deg, #f4c84b, #e08f2e);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #2a1c05; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);
}
.brand-logo__name { font-weight: 800; font-size: 16px; letter-spacing: .5px; line-height: 1; }
.brand-logo__sub { font-size: 6px; font-weight: 600; letter-spacing: .5px; margin-top: 2px; }
.brand-text { line-height: 1.2; }
.brand-text__name { font-weight: 700; font-size: 15px; }
.brand-text__sub { font-size: 11px; color: #8b8b85; }
.side-label {
  font-size: 11px; letter-spacing: 1.5px; color: #6f6f69; font-weight: 600; margin: 0 4px 12px;
}
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; gap: 11px; align-items: flex-start; padding: 11px 12px;
  border-radius: 12px; cursor: pointer; background: transparent;
  border: none; text-align: left; width: 100%; color: inherit; font-size: 14px;
}
.nav-item.is-on { background: rgba(255, 255, 255, .08); }
.nav-item--dead { cursor: default; }
.nav-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: #4a4a46; flex: 0 0 8px; }
.nav-item.is-on .nav-dot { background: #34b27a; }
.nav-title { display: block; font-weight: 700; font-size: 14px; color: #e9e9e6; }
.nav-item--dead .nav-title { font-weight: 600; color: #cfcfca; }
.side-sub { display: block; font-size: 12px; color: #8b8b85; }
.nav-item--dead .side-sub { color: #77776f; }
.side-stats { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.stat {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255, 255, 255, .05); border-radius: 12px; padding: 11px 14px;
}
.stat__name { font-size: 13px; color: #cfcfca; }
.stat__val { font-weight: 700; font-size: 15px; }
.side-note {
  background: #12331f; border-radius: 12px; padding: 12px 14px;
  font-size: 12px; color: #8fd4a8; line-height: 1.4;
}
.side-note__head {
  display: flex; align-items: center; gap: 8px; font-weight: 700; color: #bfeccf; margin-bottom: 4px;
}
.side-note__dot { width: 8px; height: 8px; border-radius: 50%; background: #34b27a; }
.side-foot { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.side-link {
  font-size: 12px; color: #8b8b85; background: transparent; border: none;
  padding: 0; cursor: pointer; text-decoration: underline;
}
.side-link:hover { color: #cfcfca; }

/* ------------------------------------------------------------ главная часть */
.main { flex: 1; min-width: 0; padding: 34px 40px 60px; }
.pagewrap { display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap; }
.leftcol { flex: 1; min-width: 520px; max-width: 760px; }
.leftcol--wide { max-width: 860px; }
.rightcol { width: 440px; flex: 0 0 440px; position: sticky; top: 34px; }

.head {
  margin-bottom: 22px; display: flex; align-items: flex-start;
  justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.head--plain { margin-bottom: 20px; display: block; }
.title { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -.5px; }
.subtitle { margin-top: 6px; color: #83837c; font-size: 15px; }
.head-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.btn-rec {
  height: 44px; padding: 0 18px; border-radius: 11px; border: 1px solid #34b27a;
  background: #34b27a14; color: #34b27a; font-size: 14px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
.rec-note { max-width: 290px; text-align: right; font-size: 12px; color: #9a7a2e; line-height: 1.4; }

.card {
  background: #fff; border: 1px solid rgba(0, 0, 0, .06); border-radius: 20px;
  padding: 22px 24px; margin-bottom: 16px;
}
.card--last { margin-bottom: 0; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
.card-label { font-size: 12px; letter-spacing: 1.5px; color: #9a9a92; font-weight: 700; }
.card-label--solo { display: block; margin-bottom: 16px; }
.card-tools { display: flex; align-items: center; gap: 8px; }

.row-fields { display: flex; gap: 20px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field--grow { flex: 1; min-width: 180px; }
.field__label { font-size: 13px; color: #83837c; font-weight: 600; }
.inp-date {
  height: 44px; padding: 0 12px; border: 1px solid rgba(0, 0, 0, .12); border-radius: 11px;
  background: #fbfbf9; font-size: 15px; font-weight: 600; color: #23241f;
}
.combo-wrap { position: relative; }
.inp-author {
  width: 100%; height: 44px; padding: 0 40px 0 12px; border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 11px; background: #fbfbf9; font-size: 15px; font-weight: 600; color: #23241f;
}
.btn-clear {
  position: absolute; top: 0; right: 6px; width: 32px; height: 44px; border: none;
  background: transparent; color: #a3a39d; font-size: 17px; cursor: pointer;
}
.combo {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40;
  max-height: 230px; overflow: auto; background: #fff; border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .16); padding: 4px;
}
.combo--num { right: auto; min-width: 132px; z-index: 45; max-height: 220px; }
.combo--off { top: calc(100% + 6px); right: auto; min-width: 170px; }
.combo-item {
  padding: 9px 12px; border-radius: 7px; font-size: 14px; font-weight: 600;
  color: #33342e; cursor: pointer;
}
.combo-item:hover { background: #f3f2ee; }
.combo-item--num { padding: 8px 12px; font-weight: 700; }
.combo-empty { padding: 8px 12px; font-size: 13px; color: #a3a39d; }

.reset-q { font-size: 12px; color: #8a4a2e; font-weight: 600; }
.reset-pending { display: flex; align-items: center; gap: 6px; }
.btn-reset {
  height: 36px; padding: 0 10px; border: none; border-radius: 9px; background: transparent;
  color: #b7b7b1; font-size: 12px; font-weight: 600; cursor: pointer;
}
.btn-danger-sm {
  height: 36px; padding: 0 12px; border: none; border-radius: 9px; background: #b04a4a;
  color: #fff; font-size: 12px; font-weight: 700; cursor: pointer;
}
.btn-cancel-sm {
  height: 36px; padding: 0 10px; border: 1px solid rgba(0, 0, 0, .12); border-radius: 9px;
  background: #fff; color: #5f5f58; font-size: 12px; font-weight: 600; cursor: pointer;
}

/* ---------------------------------------------------------- люди по локациям */
.people-list { display: flex; flex-direction: column; gap: 9px; }
.person-row { display: flex; align-items: center; gap: 10px; }
.person-name { position: relative; flex: 1; min-width: 120px; }
.inp-person {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid rgba(0, 0, 0, .07);
  border-radius: 10px; background: #fbfbf9; font-size: 15px; font-weight: 600;
}
.sel-person-loc {
  height: 40px; padding: 0 10px; border: 1px solid rgba(0, 0, 0, .07); border-radius: 10px;
  background: #fff; font-size: 14px; font-weight: 600; color: #23241f; cursor: pointer;
}
.sel-person-loc.is-empty {
  border: 1px solid rgba(176, 74, 74, .5); color: #b04a4a; background: #fbf0ee;
}
.btn-del {
  width: 36px; height: 36px; flex: 0 0 36px; border: 1px solid rgba(0, 0, 0, .07);
  border-radius: 10px; background: #fff; color: #b04a4a; font-size: 16px; cursor: pointer;
}
.btn-del.is-armed {
  width: auto; height: 36px; padding: 0 12px; flex: 0 0 auto; border: none; border-radius: 10px;
  background: #b04a4a; color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap;
}

.add-wrap { margin-top: 16px; }
.btn-add {
  width: 100%; height: 50px; border: 1.5px dashed #34b27a66; border-radius: 13px;
  background: #34b27a12; color: #34b27a; font-size: 15px; font-weight: 800;
  letter-spacing: .2px; cursor: pointer; transition: all .12s;
}
.btn-add:hover {
  border: 1.5px solid #34b27a; background: #34b27a22; box-shadow: 0 4px 14px #34b27a33;
}

/* ------------------------------------------------------- бригады и квартиры */
.brig-list { display: flex; flex-direction: column; gap: 14px; }
.brig {
  border: 1px solid rgba(0, 0, 0, .08); border-radius: 14px; padding: 14px; background: #fbfbf9;
}
.brig-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.brig-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; background: #34b27a; }
.brig-dot--extra { background: #5b6fb0; }
.brig-name { position: relative; flex: 1; min-width: 180px; }
.inp-leader {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid rgba(0, 0, 0, .07);
  border-radius: 10px; background: #fff; font-size: 15px; font-weight: 700;
}
.apt-list { display: flex; flex-direction: column; gap: 7px; }
.apt-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sel-apt-loc {
  width: 152px; height: 38px; padding: 0 8px; border: 1px solid rgba(0, 0, 0, .07);
  border-radius: 9px; background: #fff; font-size: 13px; font-weight: 600;
  color: #33342e; cursor: pointer;
}
.num-wrap { position: relative; }
.inp-num {
  width: 64px; height: 38px; padding: 0 8px; text-align: center;
  border: 1px solid rgba(0, 0, 0, .07); border-radius: 9px; background: #fff;
  font-size: 15px; font-weight: 700;
}
.inp-time {
  width: 66px; height: 38px; padding: 0 8px; text-align: center;
  border: 1px solid rgba(0, 0, 0, .07); border-radius: 9px; background: #fff; font-size: 14px;
}
.inp-time--end { width: 74px; }
.slash { color: #a3a39d; font-weight: 700; }
.inp-people {
  width: 56px; height: 38px; padding: 0 8px; text-align: center;
  border: 1px solid rgba(0, 0, 0, .07); border-radius: 9px; background: #fff; font-size: 14px;
}
.btn-gen {
  width: 44px; height: 38px; border-radius: 9px; border: 1px solid rgba(0, 0, 0, .1);
  background: #fff; color: #a3a39d; font-size: 12px; font-weight: 700; cursor: pointer;
}
.btn-gen.is-on {
  border: 1px solid rgba(210, 165, 60, .6); background: rgba(215, 165, 60, .16); color: #a9781f;
}
.btn-x {
  width: 34px; height: 38px; border: 1px solid rgba(0, 0, 0, .07); border-radius: 9px;
  background: #fff; color: #b04a4a; font-size: 15px; cursor: pointer;
}
.apt-actions { display: flex; gap: 8px; }
.btn-add-apt {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px;
  border: 1.5px dashed #34b27a66; border-radius: 10px; background: #34b27a12; color: #34b27a;
  font-size: 13px; font-weight: 700; cursor: pointer; transition: all .12s;
}
.btn-add-apt:hover {
  border: 1.5px solid #34b27a; background: #34b27a22; box-shadow: 0 3px 10px #34b27a33;
}
.btn-add-emp {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px;
  border: 1.5px dashed #5b6fb066; border-radius: 10px; background: #5b6fb012; color: #5b6fb0;
  font-size: 13px; font-weight: 700; cursor: pointer; transition: all .12s;
}
.btn-add-emp:hover {
  border: 1.5px solid #5b6fb0; background: #5b6fb022; box-shadow: 0 3px 10px #5b6fb033;
}

/* Наше дополнение к макету: подсказки по квартире (пометки Bnovo, переезд,
   рекомендация). Компактные бейджи, чтобы не ломать сетку строки макета. */
.apt-badges { display: flex; flex-wrap: wrap; gap: 5px; width: 100%; padding-left: 158px; }
.badge {
  font-size: 11px; font-weight: 700; border-radius: 7px; padding: 2px 7px;
  background: rgba(215, 165, 60, .16); color: #a9781f;
}
.badge--info { background: rgba(91, 111, 176, .14); color: #5b6fb0; }
.badge--muted { background: rgba(0, 0, 0, .05); color: #83837c; }
.badge--bad { background: rgba(176, 74, 74, .12); color: #b04a4a; }

/* ---------------------------------------------------------------- выходные */
.off-list { display: flex; flex-wrap: wrap; gap: 9px; }
.off-chip {
  display: flex; align-items: center; gap: 6px; background: #fbfbf9;
  border: 1px solid rgba(0, 0, 0, .07); border-radius: 10px; padding: 0 6px 0 12px; height: 40px;
}
.inp-off {
  width: 120px; height: 38px; border: none; background: transparent;
  font-size: 15px; font-weight: 600;
}
.btn-off-x {
  width: 28px; height: 28px; border: none; border-radius: 7px; background: #fff;
  color: #b04a4a; font-size: 15px; cursor: pointer;
}

.footer-actions {
  display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 20px;
  flex-wrap: wrap;
}
.btn-reset-all {
  height: 40px; padding: 0 16px; border: 1px solid rgba(176, 74, 74, .4); border-radius: 11px;
  background: #fff; color: #b04a4a; font-size: 13px; font-weight: 700; cursor: pointer;
}
.btn-danger {
  height: 40px; padding: 0 16px; border: none; border-radius: 11px; background: #b04a4a;
  color: #fff; font-size: 13px; font-weight: 700; cursor: pointer;
}
.btn-cancel {
  height: 40px; padding: 0 14px; border: 1px solid rgba(0, 0, 0, .12); border-radius: 11px;
  background: #fff; color: #5f5f58; font-size: 13px; font-weight: 600; cursor: pointer;
}
.reset-all-q { font-size: 13px; color: #8a4a2e; font-weight: 600; }
.reset-all-pending {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end;
}

/* ------------------------------------------------------------- текст в чат */
.export-card {
  background: #fff; border: 1px solid rgba(0, 0, 0, .06); border-radius: 20px; padding: 20px 22px;
}
.export-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px;
}
.export-title { font-size: 18px; font-weight: 800; }
.btn-copy {
  height: 40px; padding: 0 18px; border: none; border-radius: 10px; background: #17181a;
  color: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
}
.btn-copy--small { padding: 0 16px; }
.btn-send-off {
  height: 40px; padding: 0 18px; border: 1px solid rgba(0, 0, 0, .12); border-radius: 10px;
  background: #f3f2ee; color: #a3a39d; font-size: 14px; font-weight: 700; cursor: not-allowed;
}
.export-area {
  width: 100%; height: 660px; resize: vertical; border: 1px solid rgba(0, 0, 0, .07);
  border-radius: 12px; padding: 16px; background: #fbfbf9;
  font-family: 'Onest', monospace; font-size: 14px; line-height: 1.55; color: #33342e;
  white-space: pre; overflow: auto;
}
.export-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

/* Вердикт шлюза и служебные подписи — в палитре макета. */
.gate { margin-top: 12px; border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.45; }
.gate ul { margin: 6px 0 0; padding-left: 18px; }
.gate--ok { background: #eef8f2; border: 1px solid rgba(52, 178, 122, .35); color: #2a7f5a; }
.gate--bad { background: #fbf0ee; border: 1px solid rgba(176, 74, 74, .3); color: #8a4a2e; }
.note { font-size: 12px; color: #a3a39d; }
.note--warn { color: #8a4a2e; }
.note--ok { color: #2a7f5a; }

/* --------------------------------------------------------------- доп. график */
.extra-note { font-size: 13px; color: #a3a39d; margin-bottom: 16px; }
.extra-text-block {
  margin-top: 18px; border-top: 1px solid rgba(0, 0, 0, .06); padding-top: 16px;
}
.extra-text-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 10px; flex-wrap: wrap;
}
.extra-text-title { font-size: 15px; font-weight: 800; }
.extra-area {
  width: 100%; height: 200px; resize: vertical; border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 12px; padding: 14px; background: #fbfbf9;
  font-family: 'Onest', monospace; font-size: 14px; line-height: 1.55; color: #33342e;
  white-space: pre; overflow: auto;
}

/* ------------------------------------------------------------------- вход */
.login {
  position: fixed; inset: 0; z-index: 100; background: rgba(23, 24, 26, .78);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-card {
  width: 360px; max-width: 100%; background: #fff; border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 20px; padding: 26px 28px;
}
.login-title { margin: 0 0 4px; font-size: 24px; font-weight: 800; letter-spacing: -.4px; }
.login-sub { color: #83837c; font-size: 14px; margin-bottom: 18px; }
.login-input {
  width: 100%; height: 44px; padding: 0 12px; border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 11px; background: #fbfbf9; font-size: 15px; font-weight: 600; color: #23241f;
  margin-bottom: 12px;
}
.login-btn {
  width: 100%; height: 46px; border: none; border-radius: 11px; background: #17181a;
  color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
}
.login-error { margin-top: 10px; font-size: 13px; color: #b04a4a; font-weight: 600; min-height: 18px; }

/* ----------------------------------------------------------- узкий экран */
@media (max-width: 920px) {
  .app { flex-direction: column; }
  .side {
    width: 100%; flex: 0 0 auto; height: auto; position: static; flex-direction: row;
    flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px;
  }
  .side-brand { margin-right: auto; }
  .side-label { display: none; }
  .side-nav { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .side-nav > .nav-item { padding: 8px 12px; width: auto; }
  .side-sub { display: none; }
  .side-stats { display: none; }
  .main { padding: 18px 14px 48px; }
  .pagewrap { flex-direction: column; gap: 16px; }
  .leftcol { min-width: 0; max-width: none; width: 100%; }
  .rightcol { width: 100%; flex: 0 0 auto; position: static; top: auto; }
  .rightcol .export-area { height: 340px; }
  .title { font-size: 25px; }
  .apt-badges { padding-left: 0; }
}


/* Универсальное поле и тёмная кнопка — те же значения, что у «Дата графика»
   и «Скопировать» в макете. Ими пользуется страница отсутствий. */
.inp {
  height: 44px; padding: 0 12px; border: 1px solid rgba(0, 0, 0, .12); border-radius: 11px;
  background: #fbfbf9; font-size: 15px; font-weight: 600; color: #23241f;
}
.card-head .inp { height: 40px; font-size: 14px; }

/* Страница отсутствий пользуется теми же карточками и кнопками (приказ: шапку
   и шрифты привести к общему стилю). Ниже — только её сетка. */
.abs-grid { border-collapse: collapse; font-size: 13px; }
.abs-grid th, .abs-grid td {
  border: 1px solid rgba(0, 0, 0, .07); padding: 4px 6px; text-align: center; min-width: 26px;
}
.abs-grid th:first-child, .abs-grid td:first-child {
  text-align: left; min-width: 150px; font-weight: 600; position: sticky; left: 0; background: #fff;
}
.abs-cell--off { background: rgba(215, 165, 60, .16); color: #a9781f; font-weight: 700; }
.abs-list { display: flex; flex-direction: column; gap: 8px; }
.abs-row {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  border: 1px solid rgba(0, 0, 0, .07); border-radius: 10px; padding: 8px 12px; background: #fbfbf9;
}
.u-scroll { overflow: auto; }
