/* График смен — на дизайн-ките «Бухгалтерия»: токены и компоненты bh-*. */
@font-face { font-family: Onest; font-weight: 400; font-display: swap; src: url(/fonts/onest-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: Onest; font-weight: 500; font-display: swap; src: url(/fonts/onest-cyrillic-500-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: Onest; font-weight: 600; font-display: swap; src: url(/fonts/onest-cyrillic-600-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: Onest; font-weight: 400; font-display: swap; src: url(/fonts/onest-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,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: Onest; font-weight: 500; font-display: swap; src: url(/fonts/onest-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,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: Onest; font-weight: 600; font-display: swap; src: url(/fonts/onest-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --bg: #f2f3f5; --card: #ffffff; --sidebar: #ffffff; --hover: #f5f6f8;
  --line: #e3e6ea; --line-soft: #eceef1; --control-line: #d3d8de;
  --text: #1e242b; --text-strong: #12171c; --muted: #4a535e; --faint: #6b7480;
  --accent: #2f5bd8; --accent-hover: #2449b6; --accent-soft: #edf1fd; --accent-line: #c9d6f7;
  --ok: #1e8550; --ok-soft: #e7f5ed;
  --warn: #8a5a06; --warn-bg: #fdf4e3; --warn-line: #f0d9ac; --warn-text: #7d4e08;
  --danger: #c2382b; --danger-soft: #fcecea;
  --font-sans: Onest, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 28px;
  --radius-control: 6px; --radius-card: 8px; --radius-pill: 9px; --radius-round: 50%;
  --shadow-menu: 0 6px 20px rgba(18, 23, 28, 0.10);
  --shadow-focus: 0 0 0 3px rgba(47, 91, 216, 0.14);
  --h-control: 36px; --h-control-touch: 44px; --w-sidebar: 216px;
  /* смена в графике */
  --shift-on: #dbe4fa;
  color-scheme: light;
}

html, body { margin: 0; background: var(--bg); }
body { min-height: 100%; }
[hidden] { display: none !important; }

/* ── компоненты кита ──────────────────────────────────────────────────────── */
.bh, .bh * { box-sizing: border-box; }
.bh { font-family: var(--font-sans); font-size: 15px; line-height: 1.45; color: var(--text); font-feature-settings: 'tnum' 1; -webkit-font-smoothing: antialiased; }
.bh a { color: var(--accent); text-decoration: none; }
.bh a:hover { text-decoration: underline; }
.bh :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.bh-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: var(--h-control); padding: 0 14px;
  border: 1px solid var(--accent); border-radius: var(--radius-control); background: var(--accent); color: #ffffff;
  font: inherit; font-size: 14.5px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.bh-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.bh-btn:disabled { background: #a9bbeb; border-color: #a9bbeb; cursor: default; }
.bh-btn.ghost { background: var(--card); color: var(--text); border-color: var(--control-line); }
.bh-btn.ghost:hover { background: var(--hover); }
.bh-btn.ghost:disabled { color: var(--faint); background: var(--card); border-color: var(--line); }
.bh-btn.icon { width: var(--h-control); padding: 0; }
.bh-btn.danger { background: var(--card); color: var(--danger); border-color: #e9b4ae; }
.bh-btn.danger:hover { background: var(--danger-soft); }
.bh-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.bh-link { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; font-weight: 500; color: var(--accent); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.bh-link:hover { text-decoration: underline; }
.bh-link.danger { color: var(--danger); }
.bh-link svg { width: 16px; height: 16px; flex-shrink: 0; }

.bh-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bh-field > span:first-child { font-size: 14px; font-weight: 500; color: var(--muted); }
.bh-field .req { color: var(--danger); }
.bh-input, .bh-select, .bh-textarea { width: 100%; height: var(--h-control); padding: 0 12px; border: 1px solid var(--control-line); border-radius: var(--radius-control);
  background: var(--card); color: var(--text); font: inherit; font-size: 14.5px; outline: none; }
.bh-input:focus, .bh-select:focus { border-color: var(--accent); box-shadow: var(--shadow-focus); }
.bh-input::placeholder { color: #8c95a0; }
.bh-select { -webkit-appearance: none; appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%234A535E' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.bh-hint { font-size: 13px; color: var(--faint); }
.bh-hint-error { font-size: 13px; color: var(--danger); }
.bh-check { display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; cursor: pointer; }
.bh-check input { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; margin: 0; border: 1.5px solid #b4bcc6; background: var(--card); display: inline-grid; place-content: center; cursor: pointer; flex-shrink: 0; }
.bh-check input[type=checkbox] { border-radius: 5px; }
.bh-check input[type=radio] { border-radius: var(--radius-round); }
.bh-check input[type=checkbox]:checked { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.6 9.6 3.6' fill='none' stroke='white' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; border-color: var(--accent); }
.bh-check input[type=radio]:checked { border: 5px solid var(--accent); }
.bh-check input:disabled { opacity: .45; cursor: default; }
.bh-check.disabled { color: var(--faint); cursor: default; }

.bh-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.bh-tab { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 2px; margin-bottom: -1px; background: none; border: 0; border-bottom: 2px solid transparent;
  font: inherit; font-size: 15px; color: var(--muted); white-space: nowrap; cursor: pointer; }
.bh-tab:hover { color: var(--text); }
.bh-tab.active { border-bottom-color: var(--accent); color: var(--text-strong); font-weight: 500; }
.bh-tab .n { font-size: 14px; font-weight: 500; color: var(--faint); }
.bh-tab.active .n { color: var(--accent); }
.bh-seg { display: inline-flex; border: 1px solid var(--control-line); border-radius: var(--radius-control); overflow: hidden; flex-shrink: 0; }
.bh-seg button { height: 34px; padding: 0 12px; border: 0; background: var(--card); color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.bh-seg button + button { border-left: 1px solid var(--control-line); }
.bh-seg button.on { background: var(--accent-soft); color: var(--accent-hover); font-weight: 500; }

.bh-dot { display: inline-block; width: 8px; height: 8px; border-radius: var(--radius-round); flex-shrink: 0; }
.bh-status { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }

.bh-avatar { position: relative; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-round); color: #ffffff; font-weight: 600; flex-shrink: 0; overflow: hidden; }
/* фото ложится поверх инициалов; не загрузилось — остаются инициалы */
.bh-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.bh-avatar.s24 { width: 24px; height: 24px; font-size: 10.5px; }
.bh-avatar.s32 { width: 32px; height: 32px; font-size: 12px; }
.bh-avatar.s40 { width: 40px; height: 40px; font-size: 14px; }

.bh-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); }
.bh-card-head { display: flex; align-items: center; gap: 10px; padding: 14px var(--space-5); border-bottom: 1px solid var(--line-soft); }
.bh-card-head h3 { margin: 0; font-size: 16px; line-height: 22px; font-weight: 600; color: var(--text-strong); }
.bh-card-body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); }

.bh-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.bh-table th { text-align: left; padding: 10px 12px; font-size: 13px; font-weight: 500; color: var(--faint); border-bottom: 1px solid var(--line); white-space: nowrap; }
.bh-table td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; line-height: 1.4; }
.bh-table tbody tr:last-child td { border-bottom: 0; }
.bh-table tbody tr:hover td { background: #f8f9fb; }
.bh-table .sub { font-size: 13px; color: var(--faint); }
.bh-table th:first-child, .bh-table td:first-child { padding-left: var(--space-5); }
.bh-table th:last-child, .bh-table td:last-child { padding-right: var(--space-5); }

.bh-notice { border: 1px solid; border-radius: var(--radius-control); padding: 10px 12px; font-size: 14px; line-height: 1.45; }
.bh-notice.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-text); }
.bh-notice.ok { background: var(--ok-soft); border-color: #bfe3cd; color: #17663d; }
.bh-notice.error { background: var(--danger-soft); border-color: #f1c4be; color: #9e2b20; }
.bh-notice.info { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-hover); }
.bh-notice .bh-link { font-size: inherit; }
.bh-notice code { font-size: 13px; }

.bh-sidebar { width: var(--w-sidebar); background: var(--sidebar); border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 18px; }
.bh-brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px; font-size: 16px; font-weight: 600; color: var(--text-strong); }
.bh-brand svg { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; }
.bh-nav { display: flex; flex-direction: column; gap: 2px; }
.bh-nav-item { display: flex; align-items: center; gap: 10px; height: var(--h-control); padding: 0 10px; border-radius: var(--radius-control); color: #3a434d; font-size: 15px; text-decoration: none; cursor: pointer; background: none; border: 0; font-family: inherit; text-align: left; width: 100%; }
.bh-nav-item:hover { background: var(--hover); }
.bh-nav-item.active { background: var(--accent-soft); color: var(--accent-hover); font-weight: 500; }
.bh-nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.bh-menu { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-menu); padding: 4px; min-width: 200px; display: flex; flex-direction: column; }
.bh-menu button { text-align: left; background: none; border: 0; padding: 8px 12px; border-radius: 4px; font: inherit; font-size: 14.5px; color: var(--text); cursor: pointer; }
.bh-menu button:hover { background: var(--hover); }
.bh-menu button.danger { color: var(--danger); }

/* ── раскладка приложения ─────────────────────────────────────────────────── */
.app { display: flex; min-height: 100vh; }
.app > .bh-sidebar { position: sticky; top: 0; height: 100vh; flex-shrink: 0; }
.main { flex: 1; min-width: 0; }
.page { max-width: 1320px; padding: 22px var(--space-6) 40px; display: flex; flex-direction: column; gap: 14px; }
.page-head { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; min-height: 40px; }
.page-head h1 { margin: 0; font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; color: var(--text-strong); }
.page-head .caption { font-size: 14px; color: var(--muted); }
.page-head .spacer { flex: 1; }
.actions { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }

.side-dept { display: flex; flex-direction: column; gap: 6px; padding: 0 2px; }
.side-dept > span { font-size: 13px; color: var(--faint); padding: 0 8px; }
.side-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px 0; border-top: 1px solid var(--line-soft); }
.side-user .who { min-width: 0; }
.side-user .name { font-size: 14px; font-weight: 500; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .role { font-size: 13px; color: var(--faint); }

.caption { font-size: 13px; color: var(--faint); }
.muted { color: var(--muted); }
.strong { color: var(--text-strong); font-weight: 600; }
.warn-text { color: var(--warn); }
.danger-text { color: var(--danger); }
.ok-text { color: var(--ok); }
.row { display: flex; align-items: center; gap: var(--space-2); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.person { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.person .nm { color: var(--text); font-weight: 500; }
.person .ps { font-size: 13px; color: var(--faint); }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.pill.accent { background: var(--accent-soft); color: var(--accent-hover); }
.pill.gray { background: var(--hover); color: var(--muted); }
code.inline { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--hover); border: 1px solid var(--line-soft); border-radius: 4px; padding: 1px 6px; word-break: break-all; }
.empty { padding: 28px var(--space-5); text-align: center; color: var(--muted); }
.empty .bh-link { font-size: inherit; }
.loading { padding: 28px; color: var(--faint); text-align: center; }

/* ── «Сегодня» ────────────────────────────────────────────────────────────── */
.duty-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.duty-card .bh-card-head { flex-wrap: wrap; }
.duty-card .bh-card-head .caption { margin-left: auto; }
.duty-list { display: flex; flex-direction: column; }
.duty-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.duty-row:last-child { border-bottom: 0; }
.duty-row .nm { flex: 1; min-width: 0; }
.duty-row .cnt { font-size: 14px; color: var(--muted); white-space: nowrap; }
.duty-card .bh-card-body { gap: 10px; padding-top: 10px; }

/* ── График: таблица ─────────────────────────────────────────────────────── */
.toolbar { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; padding: 10px var(--space-5); }
.month-nav { display: flex; align-items: center; gap: 6px; }
.month-nav .label { min-width: 150px; text-align: center; font-size: 16px; font-weight: 600; color: var(--text-strong); }
.stage-tabs { padding: 0 var(--space-5); }
.sched-wrap { overflow-x: auto; }
.sched { border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 100%; }
.sched th, .sched td { padding: 0; text-align: center; border-bottom: 1px solid var(--line-soft); }
.sched thead th { position: sticky; top: 0; background: var(--card); z-index: 2; height: 44px; font-weight: 500; color: var(--faint); border-bottom: 1px solid var(--line); }
.sched thead th .d { display: block; font-size: 13.5px; color: var(--text); font-weight: 500; }
.sched thead th .w { display: block; font-size: 11.5px; }
.sched .name-col { position: sticky; left: 0; z-index: 1; background: var(--card); text-align: left; padding: 0 12px 0 var(--space-5); min-width: 210px; max-width: 240px; border-right: 1px solid var(--line); }
.sched thead .name-col { z-index: 3; }
.sched .name-col .nm { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); font-size: 14px; }
.sched .name-col .ps { display: block; font-size: 12.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched td.day, .sched th.day { width: 32px; min-width: 32px; }
.sched .wknd { background: #fafbfc; }
.sched thead th.wknd .d { color: var(--muted); }
.sched thead th.today { box-shadow: inset 0 -2px 0 var(--accent); }
.sched thead th.today .d { color: var(--accent); font-weight: 600; }
.sched td.today { background: #f7f9fe; }
.sched tr.emp td { height: 42px; }
.sched tr.grp td { background: var(--hover); height: 32px; text-align: left; font-size: 13px; color: var(--muted); }
.sched tr.grp td.name-col { background: var(--hover); font-weight: 600; color: var(--text-strong); white-space: nowrap; }
.sched tr.mine td.name-col .nm { font-weight: 600; color: var(--text-strong); }
.sched tr.grp .need { font-weight: 400; color: var(--faint); margin-left: 6px; }
.sched tr.tot td { height: 30px; font-size: 12.5px; color: var(--faint); }
.sched tr.tot td.name-col { font-size: 13px; color: var(--faint); }
.sched tr.tot td.short { color: var(--danger); font-weight: 600; }
.cell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin: 0 auto; border: 1px solid transparent; border-radius: 5px; background: none; padding: 0; font: inherit; color: var(--faint); cursor: default; }
.cell.on { background: var(--shift-on); border-color: var(--accent-line); color: var(--accent-hover); }
.cell.off::after { content: ''; width: 4px; height: 4px; border-radius: 50%; background: #c9ced5; }
.cell.empty::after { content: ''; }
.cell.manual::before { content: ''; position: absolute; top: -3px; right: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); border: 1.5px solid var(--card); }
.editable .cell { cursor: pointer; }
.editable .cell:hover { border-color: var(--accent); }
.legend { display: flex; gap: 18px; flex-wrap: wrap; padding: 10px var(--space-5); border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--faint); }
.legend .cell { width: 18px; height: 18px; margin: 0 6px 0 0; vertical-align: -4px; cursor: default; }
.legend .cell.manual::before { width: 6px; height: 6px; top: -3px; right: -3px; }

/* ── График: календарь ───────────────────────────────────────────────────── */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal .dow { padding: 8px 10px; font-size: 13px; color: var(--faint); border-bottom: 1px solid var(--line); }
.cal .c { min-height: 108px; padding: 8px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 3px; cursor: pointer; background: var(--card); text-align: left; font: inherit; border-top: 0; border-left: 0; }
.cal .c:nth-child(7n) { border-right: 0; }
.cal .c:hover { background: #f8f9fb; }
.cal .c.blank { background: #fafbfc; cursor: default; }
.cal .c.wknd .num { color: var(--muted); }
.cal .num { font-size: 13.5px; font-weight: 500; color: var(--text); margin-bottom: 2px; display: flex; align-items: center; gap: 6px; }
.cal .c.today .num b { background: var(--accent); color: #fff; border-radius: 11px; padding: 0 7px; font-weight: 600; }
.cal .chip { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .chip .bh-dot { width: 7px; height: 7px; }
.cal .short { font-size: 12.5px; color: var(--danger); font-weight: 500; margin-top: auto; }
.cal .more { font-size: 12.5px; color: var(--faint); }

/* ── модальные окна ───────────────────────────────────────────────────────── */
.overlay { position: fixed; inset: 0; background: rgba(18, 23, 28, .38); z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px 24px; overflow-y: auto; }
.modal { width: 540px; max-width: 100%; background: var(--card); border-radius: var(--radius-card); border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(18, 23, 28, .18); }
.modal.wide { width: 680px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px var(--space-5); border-bottom: 1px solid var(--line-soft); }
.modal-head h2 { margin: 0; font-size: 16px; line-height: 22px; font-weight: 600; color: var(--text-strong); flex: 1; }
.modal-body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); }
.modal-foot { display: flex; justify-content: flex-end; align-items: center; gap: var(--space-2); padding: 14px var(--space-5); border-top: 1px solid var(--line-soft); }
.modal-foot .left { margin-right: auto; }
.x-btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; border-radius: var(--radius-control); color: var(--muted); cursor: pointer; }
.x-btn:hover { background: var(--hover); }
.x-btn svg { width: 18px; height: 18px; }

/* выбор сотрудника Б24 */
.picker { position: relative; }
.picker .search { position: relative; }
.picker .search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--faint); pointer-events: none; }
.picker .search .bh-input { padding-left: 36px; }
.picker-list { margin-top: 6px; border: 1px solid var(--line); border-radius: var(--radius-card); max-height: 264px; overflow-y: auto; background: var(--card); }
.picker-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line-soft); background: none; font: inherit; text-align: left; cursor: pointer; color: var(--text); }
.picker-item:last-child { border-bottom: 0; }
.picker-item:hover, .picker-item.hl { background: var(--hover); }
.picker-item .txt { min-width: 0; flex: 1; }
.picker-item .nm { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker-item .ps { font-size: 13px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker-state { padding: 12px; font-size: 14px; color: var(--faint); }
.picked { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: var(--radius-card); }
.picked .txt { flex: 1; min-width: 0; }
.picked .nm { font-weight: 500; color: var(--text-strong); }
.picked .ps { font-size: 13px; color: var(--muted); }

.strip { display: flex; flex-wrap: wrap; gap: 3px; }
.strip span { width: 24px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; font-size: 11.5px; color: var(--faint); background: var(--hover); }
.strip span.on { background: var(--shift-on); color: var(--accent-hover); font-weight: 500; }
.strip span.pre { background: none; color: #b4bcc6; }

.roles { display: flex; flex-direction: column; gap: 8px; }
.role-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--control-line); border-radius: var(--radius-control); cursor: pointer; }
.role-opt:has(input:checked) { border-color: var(--accent-line); background: var(--accent-soft); }
.role-opt input { margin-top: 2px; }
.role-opt .t { font-weight: 500; color: var(--text-strong); font-size: 14.5px; }
.role-opt .d { font-size: 13px; color: var(--muted); }
.checks { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; }
.fill-table td, .fill-table th { padding: 7px 10px; }
.fill-table td:first-child, .fill-table th:first-child { padding-left: 0; }

/* меню «⋯» */
.menu-pop { position: fixed; z-index: 300; }

/* уведомление */
.toast { position: fixed; top: 16px; left: 50%; transform: translate(-50%, -12px); z-index: 400; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; max-width: 92vw; box-shadow: var(--shadow-menu); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* экран входа */
.gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.gate .bh-card { width: 420px; max-width: 100%; padding: 28px; text-align: left; display: flex; flex-direction: column; gap: 12px; }
.gate h1 { margin: 0; font-size: 21px; line-height: 27px; font-weight: 600; color: var(--text-strong); }
.gate .bh-brand { padding: 0; }

/* ── телефон и узкий фрейм ────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .bh { font-size: 16px; }
  .bh-btn, .bh-input, .bh-select { height: var(--h-control-touch); }
  .app { flex-direction: column; }
  .app > .bh-sidebar { position: sticky; top: 0; z-index: 50; width: 100%; height: auto; flex-direction: row; align-items: center; padding: 8px 12px; gap: 10px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .bh-brand span, .side-user, .side-dept > span { display: none; }
  .bh-nav { flex-direction: row; }
  .bh-nav-item { width: auto; white-space: nowrap; }
  .side-dept { flex-direction: row; }
  .side-dept .bh-select { min-width: 160px; }
  .sched .name-col { min-width: 140px; max-width: 160px; padding-left: var(--space-3); }
  .page { padding: 14px var(--space-3) 32px; }
  .grid2 { grid-template-columns: 1fr; }
  .bh-table.stack thead { display: none; }
  .bh-table.stack tr { display: block; border-bottom: 1px solid var(--line-soft); padding: 8px 0; }
  .bh-table.stack td { display: block; border: 0; padding: 4px var(--space-4) !important; }
  .cal .c { min-height: 72px; padding: 5px; }
  .cal .chip { font-size: 11.5px; }
  .cal .chip .bh-dot { display: none; }
}
