/* IzyShift — один макет на телефон, планшет и компьютер.

   Мобильный порядок — основной: смены смотрят стоя у входа, а не за столом.
   На широком экране та же разметка разъезжается в две колонки, отдельной
   «десктопной версии» нет намеренно: две вёрстки расходятся уже к третьему
   изменению. */

:root {
  --ink: #111827;
  --muted: #6B7280;
  --line: #E5E7EB;
  --bg: #F6F7F9;
  --card: #FFFFFF;
  --accent: #2563EB;
  --ok: #059669;
  --warn: #D97706;
  --err: #DC2626;
  --radius: 14px;
  color-scheme: only light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Атрибут hidden слабее любого явного display: `.login{display:grid}` и
   `.stack{display:flex}` его перебивали, и экран входа оставался на месте
   поверх приложения. Ловится только рендером, по коду не видно. */
[hidden] { display: none !important; }

body {
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
           env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin: 12px;
}
.card + .card { margin-top: 0; }
.card.center { text-align: center; }

h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .04em;
     color: var(--muted); margin-bottom: 12px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.err { color: var(--err); margin: 10px 12px; }

/* ── Вход ───────────────────────────────────────────── */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 16px 0;
  background: radial-gradient(1200px 600px at 10% -10%, #DBEAFE 0%, transparent 60%), var(--bg); }
.login .card { width: min(420px, 92vw); }
.login-wrap { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: center; width: min(920px, 96vw); }
.login-side { padding: 8px 20px 0; }
.logo-mark { margin-bottom: 8px; }
.brand { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.brand-sub { font-size: 17px; color: var(--ink); margin: 4px 0 14px; max-width: 24em; }
.brand-points { list-style: none; display: none; }
.brand-points li { position: relative; padding-left: 22px; margin-bottom: 8px; color: var(--muted); }
.brand-points li:before { content: ''; position: absolute; left: 0; top: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.brand-foot { display: none; }
.login-card { padding: 22px 20px; margin: 0 auto; box-shadow: 0 12px 40px rgba(17,24,39,.08); }
.login-h { font-size: 20px; text-transform: none; letter-spacing: -.01em; color: var(--ink); margin-bottom: 4px; }
.pw-row { position: relative; }
.pw-row .inp { padding-right: 48px; letter-spacing: .12em; }
.eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none;
  font-size: 18px; padding: 8px; cursor: pointer; opacity: .6; }
.tg-block { margin: 16px 0 6px; text-align: center; }
.or { font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 10px; position: relative; }
.or:before, .or:after { content: ''; position: absolute; top: 50%; width: 42%; border-top: 1px solid var(--line); }
.or:before { left: 0; } .or:after { right: 0; }
#tg-widget { display: flex; justify-content: center; }
.cred { display: flex; flex-direction: column; gap: 2px; background: var(--bg); border: 1px dashed var(--line);
  border-radius: 10px; padding: 12px 14px; }
.cred b { font-size: 22px; letter-spacing: .02em; }
.pick-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%;
  text-align: left; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
  font-size: 16px; cursor: pointer; }
.pick-item:hover { border-color: var(--accent); }
.pick-item small { color: var(--muted); }
@media (min-width: 760px) {
  .login-wrap { grid-template-columns: 1.1fr 1fr; gap: 40px; }
  .login-side { padding: 0 8px; }
  .brand { font-size: 38px; }
  .brand-points, .brand-foot { display: block; }
  .login-card { width: 100%; }
}

.stack { display: flex; flex-direction: column; gap: 10px; }
.lbl { font-size: 13px; color: var(--muted); }
.inp {
  width: 100%; padding: 13px 14px; font-size: 16px;  /* 16px — иначе iOS зумит */
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.inp:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.btn {
  width: 100%; padding: 13px 16px; font-size: 16px; font-weight: 600;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  color: var(--ink); cursor: pointer; min-height: 48px;  /* палец, не курсор */
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn.big { font-size: 19px; padding: 20px; margin-top: 16px; }
.btn[disabled] { opacity: .55; cursor: default; }
.link { background: none; border: 0; color: var(--accent); font-size: 15px; cursor: pointer; }

/* ── Каркас ─────────────────────────────────────────── */
.top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.who { font-weight: 600; }

.tabs {
  display: flex; gap: 4px; padding: 8px 12px; overflow-x: auto;
  background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 57px; z-index: 9;
}
.tab {
  flex: 0 0 auto; padding: 8px 14px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); font-size: 15px; cursor: pointer;
}
.tab.active { background: var(--ink); color: #fff; }

.clock { font-size: 44px; font-weight: 700; letter-spacing: -.03em; }
.note { margin-top: 12px; font-size: 14px; color: var(--muted); min-height: 20px; }
.note.ok { color: var(--ok); }
.note.bad { color: var(--err); }

.row { display: flex; justify-content: space-between; align-items: baseline;
       padding: 9px 0; border-bottom: 1px solid var(--line); gap: 12px; }
.row:last-child { border-bottom: 0; }

.weekbar { display: flex; justify-content: space-between; align-items: center;
           padding: 12px 20px; font-weight: 600; }

.shift {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin: 0 12px 8px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.shift .when { font-weight: 600; }
.shift .day { font-size: 13px; color: var(--muted); }
.shift .day::first-letter { text-transform: uppercase; }   /* «Вт, 29 сентября», а не «29 Сентября» */
.shift .role { font-size: 13px; color: var(--muted); text-align: right; }
.shift.today { border-color: var(--accent); border-width: 2px; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px;
        font-size: 12px; background: var(--bg); color: var(--muted); }
.pill.wait { background: #FEF3C7; color: #92400E; }

.radio { display: flex; gap: 12px; align-items: flex-start; padding: 12px;
         border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.radio input { margin-top: 4px; }
.radio b { display: block; font-weight: 600; }
.radio em { font-style: normal; font-size: 13px; color: var(--muted); }
.radio:has(input:checked) { border-color: var(--accent); background: #EFF6FF; }

/* ── Широкий экран ──────────────────────────────────── */
@media (min-width: 820px) {
  .top, .tabs { padding-left: 40px; padding-right: 40px; }
  .view { max-width: 1000px; margin: 0 auto; }
  #view-settings, #view-team { display: grid; grid-template-columns: 1fr 1fr;
                               align-items: start; }
  #view-settings .card, #view-team .card { margin: 16px; }
  .shift { margin: 0 16px 8px; }
}

/* ── Роли, сотрудники, переключатель расписания ─────── */

.pill.role { background: #EEF2FF; color: #3730A3; }
.pill.own-badge { background: #FEF3C7; color: #92400E; font-weight: 600; }

/* Переключатель «моё / чужое» в расписании. Показывается только там,
   где заведение разрешило видеть чужие смены. */
.segmented { display: flex; gap: 6px; margin: 0 12px 10px; }
.seg {
  flex: 1; padding: 8px 10px; border: 1px solid var(--line, #E5E7EB);
  background: #fff; border-radius: 10px; font: inherit; font-size: 14px;
  color: #4B5563; cursor: pointer;
}
.seg.active { background: #111827; border-color: #111827; color: #fff; }

.staff {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid #F1F1F1;
}
.staff:last-child { border-bottom: 0; }
.staff.off .name { color: #9CA3AF; text-decoration: line-through; }
.staff .name { font-weight: 600; }
.staff .acts { display: flex; gap: 12px; white-space: nowrap; }
.who-sm { font-size: 13px; color: #6B7280; align-self: center; }

.sep { border: 0; border-top: 1px solid #F1F1F1; margin: 14px 0; }
.btn.danger { background: #DC2626; color: #fff; border-color: #DC2626; }
select.inp { appearance: none; background: #fff; }

/* ── Регистрация, подписка, структура ─────────────────── */

.center { text-align: center; }
#to-signup { margin-top: 14px; }
#signup-form h2 { font-size: 18px; margin: 4px 0 0; }

.plan {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 14px; border: 1px solid #E5E7EB; border-radius: 12px; background: #fff;
}
.plan.current { border-color: #111827; }
.plan.suggested { background: #F0FDF4; border-color: #86EFAC; }
.plan .ttl { font-weight: 600; }
.plan .lim { font-size: 13px; color: #6B7280; }
.plan .price { font-weight: 700; white-space: nowrap; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px;
  border-radius: 999px; background: #F3F4F6; font-size: 14px;
}
.chip .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.chip.on { background: #111827; color: #fff; }
.chip button { background: none; border: 0; color: inherit; cursor: pointer; padding: 0; }

.row-add { display: flex; gap: 8px; }
.row-add .inp { flex: 1; }

.dept { padding: 10px 0; border-top: 1px solid #F1F1F1; }
.dept .name { font-weight: 600; margin-bottom: 6px; display: flex; justify-content: space-between; }
.dept .chips { margin: 0; }
.loc-head { display: flex; justify-content: space-between; align-items: baseline; }
.loc-head .muted { font-size: 13px; }
/* Кнопка в общей раскладке растягивается на всю ширину; в строке
   «поле + кнопка» ей положено ровно столько, сколько занимает надпись. */
.row-add .inp { flex: 1 1 auto; min-width: 0; }
.row-add .btn { width: auto; flex: 0 0 auto; padding-left: 16px; padding-right: 16px; }

.danger-zone { text-align: center; margin: 28px 0 12px; }
.link.quiet { color: #9CA3AF; font-size: 13px; }
.invite { padding: 10px 0; border-top: 1px solid #F1F1F1; }
.invite .url { font-family: ui-monospace, monospace; font-size: 12px; color: #374151;
  word-break: break-all; }
.invite .acts { display: flex; gap: 12px; margin-top: 4px; }

.segmented.period { margin: 6px 0 10px; }
.segmented.period .seg { font-size: 13px; }

/* ── График ─────────────────────────────────────────── */

.chips.filter { margin: 0 12px 8px; }
.sch-actions { display: flex; justify-content: space-between; align-items: center; margin: 0 12px 8px; }
.btn.small { width: auto; padding: 8px 14px; font-size: 14px; }
.btn.danger-ghost { background: #fff; color: #DC2626; border: 1px solid #FCA5A5; width: auto; flex: 0 0 auto; }

.day { margin: 0 12px 14px; }
.day-head { display: flex; justify-content: space-between; align-items: baseline;
  font-weight: 600; margin-bottom: 6px; }
.day-head .muted { font-weight: 400; }
.day-head.today { color: #1D4ED8; }
.sh { display: grid; grid-template-columns: 78px 1fr auto; gap: 8px; align-items: center;
  background: #fff; border-radius: 12px; padding: 9px 12px; margin-bottom: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05); cursor: pointer; }
.sh .t { font-weight: 600; font-variant-numeric: tabular-nums; }
.sh .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh .r { font-size: 12px; color: #6B7280; }
.sh.draft { border-left: 3px solid #F59E0B; }
/* отметка прихода — мелким шрифтом, по цвету видно суть */
.pm { font-size: 11px; white-space: nowrap; color: #6B7280; }
.pm.ok { color: #15803D; }
.pm.late { color: #B45309; }
.pm.miss { color: #DC2626; }
.pm.open { color: #1D4ED8; }

/* Карточка смены */
.sheet-wrap { position: fixed; inset: 0; background: rgba(17,24,39,.45); z-index: 50;
  display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: #fff; width: 100%; max-width: 520px; border-radius: 18px 18px 0 0;
  padding: 16px 16px 24px; max-height: 92vh; overflow: auto; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.sheet-head h2 { margin: 0; font-size: 17px; }
.row3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
.row3 > * { min-width: 0; }            /* поле даты/времени не распирает сетку (в EN «08:00 AM» шире) */
.row3 .inp { padding-left: 10px; padding-right: 8px; }
.punchbox { background: #F9FAFB; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.punchbox b { display: block; margin-bottom: 4px; }

/* Сетка для компьютера */
.sch-grid { display: none; }
@media (min-width: 900px) {
  #sch-list { display: none; }
  .sch-grid { display: block; margin: 0 12px; overflow: auto; }
  .sch-grid table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
  .sch-grid th, .sch-grid td { border-bottom: 1px solid #E5E7EB; vertical-align: top; padding: 6px; }
  .sch-grid th { text-align: left; font-weight: 600; background: #F9FAFB; position: sticky; top: 0; }
  .sch-grid th.today { color: #1D4ED8; }
  .sch-grid td.name { white-space: nowrap; font-weight: 600; position: sticky; left: 0; background: #fff; }
  .sch-grid td.cell { min-width: 110px; cursor: pointer; }
  .sch-grid td.cell:hover { background: #F3F4F6; }
  .chip.shift { display: block; margin-bottom: 4px; background: #EEF2FF; color: #1E3A8A; padding: 4px 8px; border-radius: 8px; font-size: 12px; text-align: left; }
  .chip.shift.draft { background: #FEF3C7; color: #92400E; }
  .chip.shift .pm { display: block; }
  .chip.shift .ex { display: block; font-size: 11px; color: #6B7280; white-space: normal; }
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 18px; }
}

/* ── Навигация «Ещё», менеджерское «Сегодня», формы за кнопками ── */
.card.menu { padding: 4px 0; }
.mrow { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%;
  background: none; border: 0; border-bottom: 1px solid #F1F1F1; padding: 14px 16px;
  font: inherit; text-align: left; cursor: pointer; }
.mrow:last-child { border-bottom: 0; }
.mrow:active { background: #F9FAFB; }
.row-add.actions { margin: 0 12px 12px; }
.row-add.actions .btn { flex: 1 1 auto; }
.hdr-right { display: flex; gap: 14px; align-items: center; flex: 0 0 auto; }
.top > div:first-child { min-width: 0; }
.top .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Выбор языка «🌐 EN ▾» (03.10.2026; раньше переключатель EN | RU): кнопка
   с кодом текущего языка и список из четырёх под ней. В шапке приложения,
   в верхней панели десктопа и в углу экранов без входа. */
.lang-sw { position: relative; display: inline-flex; flex: 0 0 auto; }
.lang-btn { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; font-family: inherit; font-size: 12px; font-weight: 700; letter-spacing: .05em; line-height: 1;
  padding: 0 9px 0 8px; min-height: 32px; color: var(--ink); cursor: pointer; white-space: nowrap; }
.lang-btn:hover { border-color: var(--muted); }
.lang-btn svg { width: 15px; height: 15px; color: var(--muted); flex: 0 0 auto; }
.lang-btn .lang-chev { width: 12px; height: 12px; }
.lang-menu { position: absolute; z-index: 60; top: calc(100% + 6px); right: 0; min-width: 168px; display: grid; gap: 2px;
  padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(17,24,39,.14); }
.lang-menu[hidden] { display: none; }
.lang-menu button { border: 0; background: transparent; font-family: inherit; font-size: 14px; font-weight: 500; text-align: left;
  padding: 0 12px; min-height: 40px; border-radius: 7px; color: var(--ink); cursor: pointer; white-space: nowrap; }
.lang-menu button:hover { background: #F3F4F6; }
.lang-menu button.on { font-weight: 700; }
.lang-menu button.on::after { content: " ✓"; color: var(--muted); }
select.lang-select { font: inherit; font-size: 14px; min-height: 40px; padding: 0 28px 0 10px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; color: var(--ink); max-width: 100%; }
.lang-float { position: fixed; z-index: 30; top: calc(12px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right));
  box-shadow: 0 4px 14px rgba(17,24,39,.08); }
body:has(#app:not([hidden])) .lang-float { display: none; }
@media (max-width: 420px) {
  .top { padding-left: 12px; padding-right: 12px; gap: 8px; }
  .hdr-right { gap: 10px; }
  .login-side { padding-top: 44px; }
}

/* ── Явка, коллеги, часы по дням, шаги настройки ───── */
.attend { margin-top: 10px; font-size: 14px; }
.attend .ok { color: #15803D; } .attend .late { color: #B45309; } .attend .none { color: #6B7280; }
.hday { display: grid; grid-template-columns: 64px 1fr 1fr 48px; gap: 8px; padding: 8px 0;
  border-bottom: 1px solid #F1F1F1; font-size: 13px; align-items: baseline; }
.hday:last-child { border-bottom: 0; }
.hday .d { font-weight: 600; } .hday .p { color: #6B7280; } .hday .f { font-variant-numeric: tabular-nums; }
.hday .diff { text-align: right; font-weight: 600; } .hday .diff.plus { color: #15803D; } .hday .diff.minus { color: #DC2626; }
.hhead { color: #9CA3AF; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.steps { padding-left: 20px; display: flex; flex-direction: column; gap: 14px; margin: 12px 0 16px; }
.steps li { display: flex; flex-direction: column; gap: 6px; }
.publine { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; border-bottom: 1px solid #F1F1F1; }

/* ── Итерация «как у 7shifts»: внимание, лента, карточка, отчёты, боковое меню ── */

.att { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left;
  background: none; border: 0; border-bottom: 1px solid #F1F1F1; padding: 10px 0; font: inherit; cursor: pointer; }
.att:last-child { border-bottom: 0; }
.att[disabled] { cursor: default; }
.att b { font-weight: 600; }

.tl { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 10px; }
.tl-scale { display: flex; justify-content: space-between; margin-left: 132px; font-size: 10px; color: #9CA3AF; }
.tl-row { display: grid; grid-template-columns: 124px 1fr; gap: 8px; align-items: center; }
.tl-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-name em { display: block; font-style: normal; font-size: 11px; color: #9CA3AF; }
.tl-track { position: relative; height: 26px; background: #F3F4F6; border-radius: 6px; }
.tl-bar { position: absolute; top: 3px; height: 20px; border-radius: 5px; border: 1px solid; font-size: 11px; line-height: 18px;
  padding: 0 6px; white-space: nowrap; overflow: hidden; color: #1F2937; cursor: pointer; box-sizing: border-box; }
.tl-bar.miss { border-style: dashed; color: #DC2626; }
.tl-fact { position: absolute; top: 3px; height: 20px; border-radius: 5px; opacity: .85; }
.tl-fact.live { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.25) 0 6px, transparent 6px 12px); }
.tl-now { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #DC2626; }
@media (max-width: 480px) { .tl-row { grid-template-columns: 84px 1fr; } .tl-scale { margin-left: 92px; } .tl-bar { font-size: 0; } }

.filters { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 10px; }
@media (min-width: 640px) { .filters { grid-template-columns: 1.4fr 1fr 1fr; } }
.banner { margin: 0 12px 12px; padding: 12px 14px; background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 12px; font-size: 14px; }
.staff { cursor: pointer; }
.staff .grow { flex: 1; min-width: 0; }
.staff .chev { color: #9CA3AF; font-size: 20px; }
.tgno { color: #D97706; font-size: 12px; }
#sf-status { margin: 0 0 8px; }

.card-head { padding: 8px 16px 0; }
.card-head h1 { font-size: 22px; margin: 6px 0 2px; letter-spacing: -.02em; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 4px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; }
.stat b { display: block; font-size: 20px; }
.stat span { font-size: 11px; color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center; }
.two .link { white-space: nowrap; }
#cd-assign .two { grid-template-columns: 1fr 1fr auto; }
table.rep tr.muted td { color: #9CA3AF; }
.fld { display: flex; flex-direction: column; gap: 4px; }
.fld > span { font-size: 13px; color: var(--muted); }
.fld.two { grid-template-columns: 1fr 140px; }
.check { display: flex; gap: 10px; align-items: center; padding: 8px 0; }
.rule { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; }
.inp.num { width: 110px; text-align: right; }
h3.sub { font-size: 14px; margin: 14px 0 4px; }
textarea.inp { font: inherit; resize: vertical; }
.row .ok { color: #15803D; }
@media (max-width: 480px) { .two { grid-template-columns: 1fr; } .stats { grid-template-columns: repeat(2, 1fr); } }

.rep-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin: 0 12px 4px; }
.rep-bar .segmented { margin: 0; flex-wrap: wrap; }
.rep-period { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; max-width: 100%; }
.rep-period select.inp { max-width: 100%; }
.rep-period .inp { width: auto; padding: 8px 10px; font-size: 14px; }
#rep-box { overflow: auto; }
table.rep { width: 100%; border-collapse: collapse; font-size: 13px; }
table.rep th, table.rep td { padding: 8px 6px; border-bottom: 1px solid #F1F1F1; text-align: left; vertical-align: top; }
table.rep th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #9CA3AF; font-weight: 600; white-space: nowrap; }
table.rep .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.rep tbody tr[data-id] { cursor: pointer; }
table.rep tbody tr[data-id]:hover { background: #F9FAFB; }
table.rep tr.warn td { background: #FFFBEB; }
table.rep tfoot td { font-weight: 600; border-top: 2px solid #E5E7EB; }
.fl { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 6px; background: #F3F4F6; color: #4B5563; margin: 1px 2px 1px 0; }
.fl.late, .fl.early_leave { background: #FEF3C7; color: #92400E; }
.fl.no_punch, .fl.needs_confirm { background: #FEE2E2; color: #991B1B; }
.fl.adjusted { background: #DCFCE7; color: #166534; }
.fl.overtime, .fl.unscheduled { background: #DBEAFE; color: #1E40AF; }
.link.small { font-size: 12px; padding: 0; }
.plus { color: #15803D; } .minus { color: #DC2626; }

/* сетка графика: часы под именем, итоги */
.sch-grid td.name .sub { font-weight: 400; margin-top: 2px; }
.sch-grid td.tot { font-size: 12px; color: #4B5563; font-weight: 600; white-space: nowrap; }

/* боковое меню на компьютере */
.tab.desk { display: none; }
@media (min-width: 900px) {
  #app { display: grid; grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: auto auto 1fr; align-items: start; }
  #app > .top { grid-column: 1 / -1; }
  #app > #notices { grid-column: 2; grid-row: 2; padding: 8px 24px 0; }
  #app > #notices:empty { display: none; }
  #app > .tabs { grid-column: 1; grid-row: 2 / 4; flex-direction: column; gap: 2px; padding: 14px 12px;
    position: sticky; top: 57px; height: calc(100vh - 57px); border-right: 1px solid var(--line); border-bottom: 0; overflow: auto; }
  #app > .tabs .tab { text-align: left; border-radius: 10px; padding: 10px 14px; }
  #app > .tabs .tab.desk:not([hidden]) { display: block; }
  #app > .tabs .tab[data-view="more"] { display: none; }
  #app > .view { grid-column: 2; grid-row: 3; margin: 0; max-width: none; padding: 8px 24px 40px; width: 100%; }
  #app > .view > .card, #app > .view .weekbar, #app > .view .chips.filter, #app > .view .sch-actions, #app > .view .rep-bar, #app > .view .banner, #app > .view .row-add.actions { margin-left: 0; margin-right: 0; }
  #view-settings, #view-team { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
  #view-settings .card { margin: 0 0 16px; }
}

.co-switch { font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; padding: 2px 6px; background: #fff; max-width: 200px; }

/* ── График на телефоне: полоса дней + один день, как в 7shifts ── */
.daystrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 0 12px 10px; }
.dstrip { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 0 6px; border: 0; border-radius: 12px;
  background: transparent; font: inherit; cursor: pointer; color: var(--muted); }
.dstrip .dw { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.dstrip .dn { font-size: 20px; font-weight: 700; color: var(--ink); line-height: 1.1; }
.dstrip .dc { font-size: 10px; min-height: 12px; }
.dstrip.today .dn { color: var(--accent); }
.dstrip.on { background: var(--ink); color: #cbd5e1; }
.dstrip.on .dn, .dstrip.on.today .dn { color: #fff; }
.sh2 { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; background: #fff; border-radius: 14px;
  padding: 12px; margin-bottom: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.05); cursor: pointer; }
.sh2.draft { border-left: 3px solid #F59E0B; }
.sh2 .ava { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.sh2 .n { font-weight: 600; }
.sh2 .t { font-variant-numeric: tabular-nums; color: #374151; font-size: 14px; }
.sh2 .r { font-size: 12px; color: #6B7280; display: flex; align-items: center; gap: 6px; }
.sh2 .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.sh2 .pm-box { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.sh2 .chev { color: #9CA3AF; font-size: 20px; line-height: 1; }
@media (min-width: 900px) { .daystrip { display: none; } }

.sch-grid tr.dept-row td { background: #111827; color: #fff; font-weight: 600; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; padding: 6px 8px; position: sticky; left: 0; }
.sch-grid tr.role-row td { background: #F3F4F6; color: #4B5563; font-weight: 600; font-size: 12px; padding: 4px 8px; }
.dept-sub { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #6B7280; margin: 10px 2px 6px; }

/* перерыв и заметка в списке смен; отпуск */
.sh2 .ex, .shift .ex { font-size: 12px; color: #6B7280; }
.sh2.leave-row .t { color: #4B5563; }
.row3.brk { grid-template-columns: 1fr 1.6fr; }
.row3.lvd { grid-template-columns: 1fr 1fr; }
.sh2 .ava.lv { background: #F3F4F6 !important; color: #6B7280 !important; }

.cell-add { display: none; border: 1px dashed #D1D5DB; background: transparent; color: #9CA3AF; border-radius: 6px; font-size: 12px; width: 100%; padding: 1px 0; cursor: pointer; }
.sch-grid td.cell:hover .cell-add { display: block; }

/* ── Терминал отметки в настройках ──────────────────── */
.term-link { background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; margin: 8px 0 10px; overflow-wrap: anywhere; font-size: 14px; }
.term-link code { font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.term-qr { margin: 12px 0; text-align: center; }
.term-qr img { width: 220px; height: 220px; image-rendering: pixelated; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }

/* ── Выгрузка расписания ───────────────────────────── */
.sch-btns { display: inline-flex; gap: 8px; }
.xp-open-row { display: flex; justify-content: flex-end; margin: -4px 12px 6px; }
.xp-open-row .link.small { font-size: 14px; padding: 4px 0; }
.sheet.xp .lbl { margin: 14px 0 6px; font-weight: 600; color: var(--ink); font-size: 14px; }
.sheet.xp .lbl .muted { font-weight: 400; }
.xp-lbl-row { display: flex; justify-content: space-between; align-items: baseline; }
.xp-week { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--bg); border-radius: 12px; padding: 6px 6px; }
.xp-week .link { font-size: 20px; min-width: 44px; min-height: 40px; }
.xp-week b { font-size: 15px; text-align: center; }
.sheet.xp .chips { margin-bottom: 0; }
.sheet.xp .chips .chip { border: 0; cursor: pointer; font: inherit; font-size: 14px; min-height: 36px; }
.xp-search { padding: 10px 12px; margin-bottom: 6px; }
.xp-members { max-height: 236px; overflow: auto; border: 1px solid var(--line); border-radius: 10px;
  -webkit-overflow-scrolling: touch; }
.xp-m { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid #F1F1F1;
  cursor: pointer; font-size: 15px; }
.xp-m:last-child { border-bottom: 0; }
.xp-m input { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--accent); }
.xp-m .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xp-m .sub { color: var(--muted); font-size: 12px; white-space: nowrap; }
.xp-m.all { font-weight: 600; background: #FAFAFB; position: sticky; top: 0; z-index: 1; }
.xp-tgl { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; cursor: pointer; }
.xp-tgl input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--accent); flex: 0 0 auto; }
.xp-tgl em { display: block; font-style: normal; color: var(--muted); font-size: 13px; }
.segmented.xp-fmt { margin: 0; }
.xp-foot { position: sticky; bottom: -24px; background: #fff; margin: 12px -16px -24px; padding: 12px 16px 16px;
  border-top: 1px solid var(--line); box-shadow: 0 -6px 12px rgba(17,24,39,.04); }
.xp-foot #xp-fmt-hint { margin: 6px 2px 0; min-height: 18px; }
.xp-actions { display: flex; gap: 8px; margin-top: 10px; }
.xp-actions .btn { flex: 1 1 0; }
.xp-actions .btn[hidden] { display: none; }
#xp-note { margin: 8px 0 0; }
@media (max-width: 420px) {
  .sch-actions { flex-wrap: wrap; gap: 8px; }
}
/* в Mini App главная кнопка — «Прислать в Telegram», она первой */
.sheet-wrap.in-tg .xp-actions { flex-direction: row-reverse; }
@media (min-width: 900px) {
  .sheet.xp { max-width: 820px; }
  .xp-body { display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; }
  .xp-members { max-height: 300px; }
  .xp-foot { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; }
  .xp-foot .xp-actions { margin-top: 0; grid-column: 2; grid-row: 1; }
  .xp-foot .xp-actions .btn { min-width: 170px; }
  .xp-foot #xp-fmt-hint, .xp-foot #xp-note { grid-column: 1 / -1; }
}
.xp-foot .note:empty { display: none; }
.inp.bad { border-color: #d64545 !important; }

/* ── Выходной / отпуск и «повторить в дни» (28.09.2026) ─────────── */
/* цвет вида отсутствия: выходной — серо-синий, отпуск — зелёный,
   больничный — красный, без содержания — оранжевый */
.k-day_off { --lc: #475569; --lb: #F1F5F9; --lh: rgba(100,116,139,.16); }
.k-paid_leave { --lc: #047857; --lb: #ECFDF5; --lh: rgba(16,185,129,.16); }
.k-sick_leave { --lc: #B91C1C; --lb: #FEF2F2; --lh: rgba(239,68,68,.14); }
.k-unpaid { --lc: #C2410C; --lb: #FFF7ED; --lh: rgba(249,115,22,.15); }
.lvk { display: inline-flex; align-items: center; gap: 5px; color: var(--lc, #374151); font-weight: 600; }
.li { font-size: 1em; line-height: 1; }

.chip.leave { display: flex; align-items: center; gap: 5px; width: 100%; margin-bottom: 4px; padding: 4px 8px;
  border-radius: 999px; font-size: 12px; font-weight: 600; text-align: left; cursor: pointer;
  background: var(--lb, #F3F4F6); color: var(--lc, #4B5563); border: 1px solid var(--lc, #9CA3AF); }
.chip.leave.req { background: #fff; border-style: dashed; }
.chip.leave .q { margin-left: auto; font-weight: 500; font-size: 10px; text-transform: uppercase; letter-spacing: .04em;
  background: #FEF3C7; color: #92400E; border-radius: 999px; padding: 1px 6px; }
.sch-grid td.cell.lv { background-image: repeating-linear-gradient(135deg, var(--lh) 0 6px, transparent 6px 12px); }
.sch-grid td.cell.rq { box-shadow: inset 0 0 0 1px #FCD34D; }

/* пустая клетка: два действия при наведении */
.cell-acts { display: none; flex-direction: column; gap: 4px; }
.sch-grid td.cell:hover .cell-acts, .sch-grid td.cell:focus-within .cell-acts { display: flex; }
.ca { border: 1px dashed #C7D2FE; background: #fff; color: #3730A3; border-radius: 8px; font-size: 12px;
  padding: 3px 6px; cursor: pointer; white-space: nowrap; text-align: left; }
.ca:hover { background: #EEF2FF; }
.ca.ca-off { border-color: #99F6E4; color: #0F766E; }
.ca.ca-off:hover { background: #F0FDFA; }
.grid-tip { display: none; }
@media (min-width: 900px) { .grid-tip { display: block; margin: 0 0 6px; } }

/* кнопка «Отпуск / выходной» в панели графика и в карточке смены */
.btn.small.off, .btn.off-alt { background: #F0FDFA; border-color: #5EEAD4; color: #0F766E; }
.sh-alt { margin-top: 6px; padding-top: 12px; border-top: 1px dashed #E5E7EB; display: flex; flex-direction: column; gap: 6px; }
.btn.off-alt { width: 100%; }
.day-acts { display: inline-flex; gap: 14px; }
.link.off-link { color: #0F766E; }
.note.warn { color: #92400E; }
.rep-report { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.rep-report .ok { color: #166534; }
.rep-report .bad { color: #92400E; }
.rep-report .skip { margin-left: 10px; }

/* «Повторить в дни» */
.repeat { border: 1px solid #E5E7EB; border-radius: 12px; padding: 10px 12px; }
.repeat.nodate { opacity: .5; }
.rep-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.rep-lbl { font-weight: 600; font-size: 14px; }
.rep-quick { display: inline-flex; gap: 12px; }
.rep-quick .link.small { font-size: 13px; }
.rep-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.rd { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 0; border-radius: 10px;
  border: 1px solid #D1D5DB; background: #fff; color: #374151; font: inherit; cursor: pointer; min-width: 0; }
.rd .w { font-size: 12px; }
.rd .n { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rd.on { background: #111827; border-color: #111827; color: #fff; }
.rd.locked { cursor: default; box-shadow: inset 0 -3px 0 #6366F1; }
@media (max-width: 480px) {
  .repeat { padding: 8px 10px; }
  .rep-days { gap: 4px; }
  .rd { padding: 4px 0; border-radius: 8px; }
  .rd .n { font-size: 14px; }
}

/* форма отсутствия */
.lv-kinds { margin-bottom: 0; }
.chip.lvk-btn { border: 1px solid #E5E7EB; background: #fff; cursor: pointer; font: inherit; font-size: 14px; color: #374151; }
.chip.lvk-btn.on { background: var(--lb); border-color: var(--lc); color: var(--lc); font-weight: 600; box-shadow: 0 0 0 1px var(--lc); }
.lvl { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lv-warn { background: #FFFBEB; border: 1px solid #FCD34D; color: #92400E; border-radius: 10px; padding: 8px 12px;
  font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.lv-warn[hidden] { display: none; }
.link.lv-back { align-self: flex-start; }

/* заявки */
.rq-card { border: 1px solid #E5E7EB; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.rq-top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.rq-when { font-size: 14px; color: #374151; }
.rq-warn { font-size: 13px; color: #92400E; }
.rq-card .row-add { margin-top: 4px; }
.pill.okp { background: #DCFCE7; color: #166534; }
.pill.nop { background: #FEE2E2; color: #991B1B; }
.req-row { justify-content: flex-start; }
#my-requests .shift.my-rq.pending { border-left: 3px dashed #F59E0B; }
/* панель графика: кнопок стало четыре — на узком экране переносятся */
.sch-btns { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 620px) {
  .sch-actions { flex-wrap: wrap; gap: 8px; }
  .sch-btns { width: 100%; justify-content: flex-start; gap: 6px; }
  .sch-btns .btn.small { padding: 7px 10px; font-size: 13px; }
}

/* ── Учёт отпусков (карточка, «Смены», отчёт) ── */
.tblwrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.lg-year { display: flex; align-items: center; gap: 12px; }
.lg-year b { font-size: 16px; }
.lg-h { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 4px; }
.lg-allow { align-items: center; flex-wrap: wrap; gap: 8px; }
#lg-allow-inp { width: 110px; flex: 0 0 110px; }
.lg-how { margin-top: 10px; }
.sheet.wide { max-width: 760px; }
#rep-leave-ctl input[type=date] { width: 150px; }
@media (max-width: 480px) { #rep-leave-ctl input[type=date] { width: calc(50% - 16px); } #rep-leave-ctl select.inp { flex: 1 1 45%; } }

/* ── Публикация: уведомлять или нет ── */
.pub-choice { margin-top: 12px; }
.pub-people { margin-top: 8px; max-height: 38vh; overflow: auto; }
.pub-person { padding: 6px 0; border-bottom: 1px solid #F1F1F1; font-size: 14px; }
.pub-person .ln { font-size: 13px; color: #374151; padding-left: 4px; font-variant-numeric: tabular-nums; }
#pub-notg { margin: 6px 0 0; color: #92400E; }

/* 28.09: у любой карточки снизу заголовок с «Закрыть» прилипает к верху —
   раньше при прокрутке длинной карточки на телефоне выйти было нечем.
   Выгрузка на телефоне — на весь экран. */
.sheet-head { position: sticky; top: -16px; z-index: 5; background: #fff;
  margin: -16px -16px 10px; padding: 14px 16px 10px; border-bottom: 1px solid transparent; }
.sheet-head .link { font-size: 16px; min-height: 40px; padding: 0 4px; }
@media (max-width: 899px) {
  #xp-sheet .sheet.xp { max-width: none; height: 100dvh; max-height: 100dvh; border-radius: 0;
    padding-top: calc(16px + env(safe-area-inset-top)); }
  #xp-sheet .sheet-head { top: calc(-16px - env(safe-area-inset-top)); padding-top: calc(14px + env(safe-area-inset-top));
    margin-top: calc(-16px - env(safe-area-inset-top)); border-bottom-color: var(--line); }
}
.segmented.xp-per { margin: 0 0 8px; }
.xp-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.xp-range label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.xp-range .inp { padding: 9px 10px; }
.xp-range p { grid-column: 1 / -1; margin: 0; }
.corr-row .small { font-size: 12px; }

/* 28.09: пунктуальность и переработка */
.rt-tops { display: grid; gap: 0; }
@media (min-width: 900px) { .rt-tops { grid-template-columns: 1fr 1fr; gap: 12px; } .rt-tops .card { margin-left: 0; margin-right: 0; } .rt-tops { margin: 0 12px; } }
.rt-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #F1F1F1; font-size: 15px; }
.rt-row:last-child { border-bottom: 0; }
.rt-row .muted { white-space: nowrap; font-size: 13px; }
table.rep tr.rt-good td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
table.rep tr.rt-bad td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
table.rep tr[data-id] { cursor: pointer; }
.rt-how { margin-top: 10px; }
.rt-how summary { cursor: pointer; color: var(--accent); font-size: 14px; }
.rt-preview { white-space: pre-wrap; font-family: inherit; font-size: 14px; background: #F9FAFB; border: 1px solid var(--line);
  border-radius: 12px; padding: 12px; margin: 10px 0 0; }
#rt-post .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ot-over { color: #B45309; }

/* 28.09: шапка графика — главное действие и «Ещё» */
.sch-actions { display: block; }
.sch-main { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.sch-main .pub-ok { color: var(--ok); font-weight: 600; font-size: 14px; padding: 0 4px; margin-right: auto; }
.sch-main #sch-publish { margin-right: auto; }
.sch-sec { display: none; flex-direction: column; align-items: stretch; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; margin-top: 8px; padding: 4px; }
.sch-sec .link { text-align: left; padding: 11px 12px; font-size: 15px; border-radius: 8px; }
.sch-sec .link:hover { background: #F3F4F6; }
.sch-actions.open .sch-sec { display: flex; }
@media (min-width: 900px) {
  .sch-actions { display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; gap: 12px; }
  .sch-more-btn { display: none; }
  .sch-sec { display: flex; flex-direction: row; border: 0; background: none; padding: 0; margin: 0; gap: 2px; }
  .sch-sec .link { padding: 6px 8px; font-size: 14px; }
  .sch-main #sch-publish, .sch-main .pub-ok { margin-right: 0; }
}

/* 28.09: баннер «подключите Telegram» наверху «Сегодня» */
.tg-banner { display: flex; gap: 14px; align-items: flex-start; background: #EFF6FF; border-color: #BFDBFE; }
.tg-banner .tg-ic { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; background: #229ED9; color: #fff;
  display: grid; place-items: center; font-size: 20px; }
.tg-banner b { display: block; font-size: 16px; margin-bottom: 4px; }
.tg-banner p { margin: 0 0 10px; }
.sf-hint { margin: 6px 2px 0; }
.sf-hint:empty { display: none; }

/* ── 28.09 (2): период, таблица с сортировкой, «Смены → По сотруднику» ── */
.per-ctl { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; min-width: 0; }
.per-ctl .segmented.period { margin: 0; }
.per-nav { display: flex; align-items: center; gap: 6px; }
.per-nav .inp { width: auto; padding: 7px 10px; font-size: 14px; }
.per-nav .per-label { font-size: 14px; white-space: nowrap; }
#rep-main-ctl { gap: 8px 12px; }
#staff-sheet .rep-bar { margin-bottom: 8px; }
#staff-sheet select.inp { min-width: 200px; }

/* Прокрутка вбок на телефоне; имя закреплено слева, чтобы не терять, чья строка. */
.tbl-scroll { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
#rep-box:has(.tbl-scroll) { overflow: visible; }
table.sortable { min-width: 760px; }
table.sortable th { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--muted); white-space: normal;
  vertical-align: bottom; line-height: 1.3; padding-top: 4px; }
table.sortable th:first-child, table.sortable td:first-child { position: sticky; left: 0; z-index: 1; background: var(--card);
  min-width: 128px; max-width: 160px; box-shadow: 1px 0 0 var(--line); }
table.sortable tbody tr[data-id]:hover td:first-child { background: #F9FAFB; }
table.sortable td.sorted { background: #F5F8FF; }
table.sortable tbody tr[data-id]:hover td.sorted { background: #EEF3FE; }
.th-in { display: block; }
table.sortable th.num { white-space: normal; min-width: 76px; }
table.sortable th.num .th-in { max-width: 104px; margin-left: auto; }   /* длинные названия — в две строки, а не вширь */
.warn-note details { display: inline; }
.warn-note summary { display: inline; cursor: pointer; color: var(--accent); }
.warn-note { background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 10px; padding: 8px 12px; margin: 0 0 10px; font-size: 13px; }
/* телефон: вкладки отчётов и период — одной строкой с прокруткой, а не стопкой в три этажа */
@media (max-width: 620px) {
  #view-reports .rep-bar > .segmented, .per-ctl .segmented.period { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  #view-reports .rep-bar > .segmented .seg, .per-ctl .segmented.period .seg { flex: none; white-space: nowrap; }
  #view-reports .rep-bar > .segmented::-webkit-scrollbar, .per-ctl .segmented.period::-webkit-scrollbar { display: none; }
  table.sortable td:first-child, table.sortable th:first-child { min-width: 112px; max-width: 128px; }
}
.th-sort { all: unset; cursor: pointer; display: inline; color: inherit; font-weight: 600; overflow-wrap: break-word; }
.th-sort:focus-visible, .th-help:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.th-sort .arr { margin-left: 3px; font-size: 10px; color: #C4C9D2; }
th.sorted { color: var(--ink); }
th.sorted .arr { color: var(--accent); font-size: 11px; }
.th-help { all: unset; cursor: pointer; display: inline-block; vertical-align: 1px; box-sizing: border-box; width: 16px; height: 16px;
  margin-left: 4px; border-radius: 50%; border: 1px solid #D1D5DB; color: var(--muted); font-size: 10px; line-height: 14px;
  text-align: center; font-weight: 600; }
/* палец больше кружка: невидимая зона нажатия */
.th-help { position: relative; }
.th-help::after { content: ""; position: absolute; inset: -8px; }
.th-help:hover { border-color: var(--accent); color: var(--accent); }
table.rep .z { color: #D1D5DB; }
.ot-over { font-weight: 600; }
.th-pop { position: fixed; z-index: 50; background: var(--ink); color: #fff; border-radius: 10px; padding: 10px 12px;
  font-size: 13px; line-height: 1.4; box-shadow: 0 8px 24px rgba(17, 24, 39, .25); }
.th-pop b { display: block; margin-bottom: 2px; }
.col-help { margin-top: 12px; font-size: 13px; }
.col-help summary { cursor: pointer; color: var(--accent); }
.col-help dl { display: grid; grid-template-columns: minmax(0, 220px) 1fr; gap: 6px 14px; margin-top: 8px; }
.col-help dt { font-weight: 600; }
.col-help dd { color: var(--muted); }
@media (max-width: 560px) { .col-help dl { grid-template-columns: 1fr; gap: 2px; } .col-help dd { margin-bottom: 6px; } }

/* ── Интеграции, выручка и ФОТ (28.09.2026) ── */
.int-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 10px 0 6px; }
.int-head { display: flex; align-items: center; gap: 12px; }
.int-logo { width: 40px; height: 40px; flex: 0 0 40px; }
.int-title { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.int-title b { font-size: 16px; }
.int-st { background: #F3F4F6; color: #4B5563; white-space: nowrap; }
.int-st.ok { background: #DCFCE7; color: #166534; }
.int-st.bad, .pill.bad { background: #FEE2E2; color: #991B1B; }
#sy-info { margin-top: 8px; }
#sy-info .row b { text-align: right; overflow-wrap: anywhere; }
#sy-info .row b.bad { color: #B91C1C; }
.sy-form { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.sy-form .row-add { margin-top: 6px; }
.band-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.band-dot.good { background: #059669; } .band-dot.watch { background: #D97706; } .band-dot.high { background: #DC2626; }
.lab-pct { display: inline-block; padding: 1px 8px; border-radius: 999px; font-weight: 600; font-size: 12px; white-space: nowrap; }
.lab-pct.b-good { background: #DCFCE7; color: #166534; }
.lab-pct.b-watch { background: #FEF3C7; color: #92400E; }
.lab-pct.b-high { background: #FEE2E2; color: #991B1B; }
.lab-pct.b-incomplete, .lab-pct.b-none { background: #F3F4F6; color: #4B5563; }
.lab-day { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 6px 12px 8px; margin: 0 0 4px;
  border-bottom: 1px solid var(--line); font-size: 13px; background: #FAFAFB; }
.lab-day b { font-variant-numeric: tabular-nums; }
.lab-src { flex-basis: 100%; }
#sch-grid tfoot tr.lab-row td { font-size: 12px; font-variant-numeric: tabular-nums; }
#sch-grid tfoot tr.lab-row.first td { border-top: 2px solid var(--line); }
#sch-grid tfoot tr.lab-row .lab-src { display: inline; }
.rv-empty { padding: 18px 4px; }
.rv-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 12px; }
.rv-kpi { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rv-kpi .rv-k { font-size: 12px; color: var(--muted); }
.rv-kpi b { font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi-pct.b-good { color: #047857; } .kpi-pct.b-watch { color: #B45309; } .kpi-pct.b-high { color: #B91C1C; } .kpi-pct.b-incomplete { color: #4B5563; }
.rv-warn { margin: 0 0 12px; }
.rv-warn #rv-who-list { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.rv-sec { margin: 6px 0 16px; }
.rv-sec h3 { font-size: 14px; margin: 14px 0 6px; }
.vz-box { width: 100%; overflow: hidden; }
.vz { display: block; touch-action: pan-y; }
.vz-grid { stroke: #EEF0F3; stroke-width: 1; }
.vz-base { stroke: #9CA3AF; stroke-width: 1; }
.vz-ax { font-size: 11px; fill: #6B7280; font-variant-numeric: tabular-nums; }
.vz-hit { fill: transparent; cursor: default; }
.vz-hit:hover { fill: rgba(17, 24, 39, .04); }
.vz-hl { fill: #FEE2E2; opacity: .55; }
.vz-line { fill: none; stroke: #374151; stroke-width: 2; stroke-linejoin: round; }
.vz-dot { stroke: #fff; stroke-width: 2; }
.vz-band.good { fill: #059669; opacity: .07; } .vz-band.watch { fill: #D97706; opacity: .09; } .vz-band.high { fill: #DC2626; opacity: .07; }
.vz-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: #4B5563; margin: 2px 0 4px; }
.vz-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.vz-tip { position: fixed; z-index: 90; background: #111827; color: #fff; font-size: 12px; line-height: 1.45; padding: 8px 10px;
  border-radius: 8px; pointer-events: none; max-width: 260px; box-shadow: 0 6px 20px rgba(0,0,0,.18); font-variant-numeric: tabular-nums; }
.vz-tip .muted { color: #D1D5DB; } .vz-tip .bad { color: #FCA5A5; }
.rv-ch { display: flex; flex-direction: column; gap: 6px; }
.rv-chr { display: grid; grid-template-columns: 90px 1fr 48px auto; align-items: center; gap: 10px; font-size: 13px; }
.rv-chbar { height: 10px; background: #F3F4F6; border-radius: 5px; overflow: hidden; }
.rv-chbar i { display: block; height: 100%; background: #2a78d6; border-radius: 5px; }
tr.rv-over td { background: #FEF2F2; }
.rv-how { margin-top: 14px; font-size: 13px; color: #374151; }
.rv-how summary { cursor: pointer; font-weight: 600; }
@media (max-width: 760px) {
  .rv-kpis { grid-template-columns: repeat(2, 1fr); }
  .rv-kpis .rv-kpi:first-child { grid-column: 1 / -1; }
  .rv-chr { grid-template-columns: 70px 1fr 40px; }
  .rv-chr .muted { grid-column: 2 / -1; }
}

/* 29.09: сообщения в приложении, журнал прав, что применено к опозданию */
#notices .card.notice { display: flex; gap: 12px; align-items: center; justify-content: space-between; border-left: 4px solid #2563EB; background: #EFF6FF; }
#notices .card.notice p { margin: 0; }
.row.audit { align-items: baseline; gap: 12px; }
.row.audit em { font-style: normal; white-space: nowrap; }
.lt-applied { font-size: 12px; color: #6B7280; margin-top: 2px; }
.lt-applied.on { color: #92400E; }
@media (max-width: 600px) { #notices .card.notice { flex-direction: column; align-items: stretch; } .row.audit { flex-direction: column; gap: 2px; } }
/* 29.09: личные правила сотрудника */
.pill.ind { background: #E0F2FE; color: #075985; font-weight: 600; }
.rules-side { border-left: 3px solid #E0F2FE; padding-left: 10px; }
.mr-sum { margin-top: -2px; }
#cd-rules .row-add { flex-wrap: wrap; }

/* ── 29.09 UX-аудит: попадание пальцем, заголовки карточек, пустые состояния ── */

/* Стрелки недели и периода были 15×17 px — мимо них промахивались на телефоне */
.wk-arr { min-width: 44px; min-height: 44px; font-size: 22px; line-height: 1; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; }
@media (hover: hover) { .wk-arr:hover { background: #EEF2FF; } }
.wk-arr:focus-visible, .wk-now:focus-visible, .att:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.weekbar { padding: 6px 8px; }
.wk-mid { display: flex; flex-direction: column; align-items: center; gap: 0; text-align: center; }
.wk-now { font-size: 13px; font-weight: 500; padding: 2px 8px; min-height: 28px; }
.per-nav .wk-arr { font-size: 20px; }

/* Заголовок карточки снизу — имя и день обычным текстом, не капсом как у разделов */
.sheet-head h2 { text-transform: none; letter-spacing: 0; color: var(--ink); font-size: 17px; line-height: 1.3; }

/* Карточка смены на телефоне: дата отдельной строкой — «09/29/202(» больше не обрезается */
@media (max-width: 480px) {
  #sheet .row3 { grid-template-columns: 1fr 1fr; }
  #sheet .row3 > #sh-date { grid-column: 1 / -1; }
}

/* Ссылки-действия в таблицах («подтвердить», «исправить», «снять правило») — 14 px в высоту было мало */
table.rep .link.small { display: inline-flex; align-items: center; min-height: 32px; padding: 0 6px; margin: 0 -6px; font-size: 13px; }
/* табель сотрудника: дата и время не рвутся на две строки */
table.tsheet td:nth-child(-n+4) { white-space: nowrap; }

/* Галочки и переключатели 13×13 → 18×18 */
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 auto; }

/* «Выйти» — нормальная кнопка, а не 17 px текста у края */
#logout { min-height: 40px; padding: 0 6px; }

/* Отчёты и период на компьютере — подписи в одну строку («Revenue &⏎labour») */
@media (min-width: 900px) {
  #rep-tabs .seg, .segmented.period .seg { white-space: nowrap; padding-left: 14px; padding-right: 14px; }
}

/* «Требует внимания»: видно, что строка нажимается */
.att:not([disabled]) { position: relative; padding-right: 22px; }
.att:not([disabled])::after { content: "›"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  color: #9CA3AF; font-size: 20px; }
.att:not([disabled]):hover b { color: var(--accent); }

/* Сотрудник: две ссылки под неделей больше не слипаются («…отгул📒 Мои…») */
.req-row { gap: 16px; flex-wrap: wrap; justify-content: flex-start; }
.req-row .link.small { min-height: 36px; }

/* Уход — обычное действие, не «опасное»: тёмная кнопка вместо красной */
.btn.out { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Вопрос с вариантами (вместо confirm) */
.ch-sheet .ch-opts { margin-top: 14px; gap: 10px; }
.ch-sheet .ch-opts .btn { width: 100%; }
.ch-sheet .ch-opts .btn.big { margin-top: 0; font-size: 17px; padding: 16px; }
.ch-sheet #ch-text { margin: 0; }

/* Пустая неделя в графике */
.sch-empty { margin: 8px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.sch-empty-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.sch-empty-acts .btn { width: auto; flex: 1 1 200px; }
@media (min-width: 900px) { #app > .view .sch-empty { margin-left: 0; margin-right: 0; } .sch-empty-acts .btn { flex: 0 0 auto; } }

/* Табель сотрудника на телефоне — карточка на смену вместо таблицы в 9 столбцов:
   «подтвердить / исправить» уезжали за правый край, строки без отметки были
   в полэкрана высотой. Подпись столбца — из data-l (уже на языке интерфейса). */
@media (max-width: 640px) {
  table.tsheet, table.tsheet tbody, table.tsheet tfoot { display: block; }
  table.tsheet thead { display: none; }
  table.tsheet tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 10px; row-gap: 4px;
    padding: 10px 2px; border-bottom: 1px solid #EEF0F3; }
  table.tsheet td { display: block; border: 0; padding: 0; text-align: left; white-space: normal; }
  table.tsheet td.num { text-align: left; }
  table.tsheet td::before { content: attr(data-l); display: block; font-size: 11px; color: #9CA3AF; font-weight: 500; }
  table.tsheet td:first-child { grid-column: 1 / 2; font-weight: 600; }
  table.tsheet td:first-child::before, table.tsheet td:nth-child(2)::before { content: none; }
  table.tsheet td:nth-child(2) { grid-column: 2 / -1; color: var(--muted); }
  table.tsheet td:nth-child(8) { grid-column: 1 / -1; }
  table.tsheet td:nth-child(8)::before { content: none; }
  table.tsheet td:empty { display: none; }
  table.tsheet tfoot tr { border-top: 2px solid #E5E7EB; }
  table.tsheet tfoot td::before { content: attr(data-l); }
  table.tsheet tr.warn { background: #FFFBEB; border-radius: 10px; padding: 10px 8px; }
  table.tsheet tr.warn td { background: none; }
}

/* «+ смена» у дня на телефоне — 17 px в высоту было мало; переключатель языка чуть выше */
.day-acts .link { min-height: 36px; padding: 0 4px; }
.lang-menu button { min-height: 44px; }
.xp-open-row .link.small { min-height: 36px; }

/* Поле без права правки выглядит как текст, а не как сломанное поле ввода */
.inp:disabled { background: #F9FAFB; color: var(--ink); border-color: #EEF0F3; opacity: 1; -webkit-text-fill-color: var(--ink); }

/* Перерыв на телефоне: минуты и «как оплачивается» — по строке, текст выбора не обрезается */
@media (max-width: 480px) { #sheet .row3.brk { grid-template-columns: 1fr; } }

/* 01.10.2026 — на компьютере кнопки над списком компактные, справа, а не во всю ширину */
@media (min-width: 900px) {
  .row-add.actions { display: flex; justify-content: flex-end; gap: 8px; }
  .row-add.actions .btn { flex: 0 0 auto; width: auto; padding-left: 18px; padding-right: 18px; }
}

/* 01.10.2026 — элементы десктопа (desk.js / desk.css). Здесь — только то, что
   их прячет: на телефоне и в Mini App их нет; показывает их desk.css при body.dk. */
#dk-side, #dk-top, #dk-head, .dk-only { display: none; }

/* 01.10.2026 — навигация (app.js navUpdate): плавающая панель снизу. «← Назад» на
   вложенных экранах, ‹ › соседний сотрудник, «↑» после прокрутки. Не закрывает
   содержимое: у страницы отступ снизу под панель и под «домашнюю полоску» iOS. */
.navbar { position: fixed; z-index: 40; right: calc(12px + env(safe-area-inset-right));
  bottom: calc(12px + env(safe-area-inset-bottom) + var(--nav-lift, 0px));
  display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 999px;
  background: rgba(255,255,255,.96); border: 1px solid var(--line);
  box-shadow: 0 8px 24px -8px rgba(17,24,39,.28); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.navbar.wide { left: calc(12px + env(safe-area-inset-left)); justify-content: space-between; }
.nb-btn { min-height: 44px; min-width: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent;
  color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; touch-action: manipulation; }
.nb-btn:active { background: #EEF0F3; }
.nb-btn:disabled { color: #C4C8CF; cursor: default; background: transparent; }
.nb-back { background: var(--ink); color: #fff; }
.nb-back:active { background: #374151; }
.nb-pn { display: flex; align-items: center; gap: 2px; margin: 0 auto; }
.nb-pn .nb-btn { font-size: 24px; line-height: 1; padding: 0 10px; }
.nb-pos { font-size: 13px; color: var(--muted); min-width: 52px; text-align: center; font-variant-numeric: tabular-nums; }
.nb-top { font-size: 18px; padding: 0; background: #F3F4F6; }
.nb-back:not([hidden]) ~ .nb-pn[hidden] + .nb-top { margin-left: auto; }
body.has-nav { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
body.has-demo-bar { --nav-lift: 60px; }
body.has-nav.has-demo-bar { padding-bottom: calc(140px + env(safe-area-inset-bottom)); }
body:has(.sheet-wrap:not([hidden])) .navbar { display: none; }
@media (hover: hover) { .nb-btn:not(:disabled):hover { background: #EEF0F3; } .nb-back:hover { background: #374151 !important; } }
.nav-toast { position: fixed; z-index: 60; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom) + var(--nav-lift, 0px));
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
  background: var(--ok); color: #fff; font-weight: 600; font-size: 15px; padding: 10px 18px; border-radius: 999px;
  box-shadow: 0 8px 24px -8px rgba(5,150,105,.5); }
.nav-toast.on { opacity: 1; transform: translate(-50%, 0); }
.nav-flash { animation: navflash 1.6s ease-out; }
@keyframes navflash { 0%, 30% { background: #FEF3C7; } 100% { background: transparent; } }

/* ── 05.10: итоги смены («Как прошла смена?») ───────────────────── */
.rn-today { display: flex; gap: 12px; align-items: flex-start; }
.rn-today .grow { flex: 1; min-width: 0; }
.rn-today .rn-t-ic { font-size: 26px; line-height: 1; }
.rn-today.due { border-color: #FCD34D; background: #FFFBEB; }
.rn-today .btn { margin-top: 8px; }
.rn-today.done { align-items: center; }
.rn-today b.ok { color: var(--ok); }
.rn-sheet .rn-sub { margin-top: -4px; }
.rn-shiftline { font-weight: 600; font-size: 14px; }
.rn-hints { background: #F8FAFC; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.rn-hints ul { margin: 4px 0 0 18px; }
.rn-hints li { margin: 2px 0; }
.rn-text { min-height: 140px; resize: vertical; font: inherit; line-height: 1.45; }
.rn-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.rn-photos:empty { display: none; }
.rn-ph { position: relative; width: 76px; height: 76px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); display: block; background: #F3F4F6; }
.rn-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rn-ph-x { position: absolute; top: 2px; right: 2px; width: 26px; height: 26px; border-radius: 50%; border: 0;
  background: rgba(17, 24, 39, .72); color: #fff; font-size: 13px; cursor: pointer; }
.rn-add-photo { align-self: flex-start; cursor: pointer; }
.rn-add-photo.off { opacity: .45; pointer-events: none; }
.rn-seg { margin: 12px 12px 10px; }
.rn-intro .btn.primary { margin-top: 10px; }
.rn-remind { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 14px; }
.rn-remind input { margin-top: 4px; width: 18px; height: 18px; }
.rn-item { border-top: 1px solid var(--line); padding: 12px 0; }
.rn-item:first-of-type { border-top: 0; }
.card > h2 + .rn-item { border-top: 0; }
.rn-item.hl { background: #FFFBEB; box-shadow: 0 0 0 6px #FFFBEB; border-radius: 4px; }
.rn-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.rn-text-v { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0; line-height: 1.45; }
.rn-item .rn-photos { margin: 6px 0; }
.rn-foot { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.rn-foot .btn { margin-left: auto; }
.rn-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 12px 10px; }
.rn-day { display: flex; align-items: center; gap: 4px; }
.rn-day .inp { width: auto; min-width: 150px; }
.rn-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.rn-filters .inp { width: auto; max-width: 190px; }
.rn-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.rn-off { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; border-color: #FCD34D; background: #FFFBEB; }
.rn-missing .row { gap: 10px; }
.rn-count { font-weight: 400; }
.rn-legal { margin: 4px 14px 16px; }
.rn-set h3 { font-size: 15px; margin: 16px 0 6px; }
.rn-set .check { display: flex; gap: 10px; align-items: flex-start; padding: 4px 0; }
.rn-set .check input { margin-top: 4px; }
.rn-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2px 12px; }
.rn-offset .inp { width: 90px; }
.rn-offset { align-items: center; }
.rn-time { display: inline-block; width: 80px; margin-left: 6px; padding: 4px 8px; }
.rn-tpl { border-top: 1px solid var(--line); padding: 8px 0; }
.rn-tpl summary { cursor: pointer; padding: 6px 0; }
.rn-tpl .stack { margin: 6px 0 4px; }
.rn-link { margin-top: 6px; }
.shift .rn-link { flex-basis: 100%; text-align: left; }
@media (max-width: 600px) {
  .rn-acts { margin-left: 0; width: 100%; }
  .rn-filters .inp { max-width: none; flex: 1 1 140px; }
}
.shift:has(.rn-link) { flex-wrap: wrap; }
.rn-set .rn-offset .inp { width: 90px !important; flex: 0 0 90px; }
.rn-set .rn-time { width: 80px !important; }

/* ── 05.10: оплата подписки (страна, валюта, карта / счёт, реквизиты, счета) ── */
.bill { gap: 10px; }
.bill-status .row b { text-align: right; }
.bill-status .pill.ok { background: #DCFCE7; color: #166534; }
.bill-status .pill.warn { background: #FEF3C7; color: #92400E; }
.bill-renew { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.bill-cc { display: grid; grid-template-columns: 1fr 120px; gap: 10px; margin-top: 6px; }
.bill-cc select { width: 100%; }
.bill .segmented.period { margin: 2px 0 0; }
.bill-plans .plan { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.bill-plans div.plan { cursor: default; }
.bill-plans .plan.chosen { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(37, 99, 235, .18); background: #F5F8FF; }
.bill-plans .plan .price { text-align: right; }
.bill-plans .plan .price .lim { font-weight: 400; }
.bill-plans .pill { font-size: 11px; vertical-align: 1px; }
.bill-sum { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: #FAFAFB; }
.bill-sum .row.total b { font-size: 17px; }
.bill-why { margin-top: 0; min-height: 0; }
.bill-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bill-acts .btn { flex: 0 0 auto; }
.bill-hint { flex-basis: 100%; }
.bill-req { border: 1px solid var(--line); border-radius: 12px; padding: 12px; gap: 8px; }
.bill-req textarea { resize: vertical; font: inherit; }
.bill-prof summary { cursor: pointer; font-weight: 600; padding: 6px 0; min-height: 32px; }
.bill-prof .stack { gap: 8px; }
.bill-prof .ok { color: var(--ok); }
.bill-prof .warn { color: #92400E; }
.bill-two { display: grid; grid-template-columns: 120px 1fr; gap: 8px; }
.bill-inv-row { gap: 10px; align-items: baseline; }
.bill-inv-row > span:last-child { white-space: nowrap; }
#paywall .card { max-width: 560px; }
@media (max-width: 420px) { .bill-cc { grid-template-columns: 1fr 96px; } .bill-inv-row { flex-wrap: wrap; } }

/* 07.10.2026: юридические документы — подвал входа, галочка акцепта, «Аккаунт и данные» */
.legal-foot { margin-top: 18px; padding-top: 12px; border-top: 1px solid #E5E7EB; font-size: 12px; line-height: 1.7; color: #6B7280; text-align: center; }
.legal-foot a, .legal-links a, .legal-list a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.legal-foot .co { display: block; }
.check.su-terms, .check.bl-terms { align-items: flex-start; font-size: 14px; line-height: 1.45; }
.check.su-terms input, .check.bl-terms input { margin-top: 3px; flex: none; }
.legal-links { margin-top: -4px; }
.legal-list { display: flex; flex-direction: column; gap: 2px; margin: 8px 0; }
.legal-list a { color: #111827; padding: 6px 0; }
.legal-co { margin-top: 8px; }
.legal-notice .row-add { margin-top: 8px; }
.acc-del-st { margin: 8px 0; }
.acc-del-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }

/* ── Сотрудники и отметки Syrve (12.10.2026) ── */
.int-st.wait, .pill.wait { background: #FEF3C7; color: #92400E; }
.ss-card { display: flex; flex-direction: column; gap: 8px; }
.ss-card .check em { font-style: normal; }
.ss-preview { background: #FFFBEB; border-radius: 10px; padding: 8px 10px; }
.ss-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ss-kpis > div { background: #F9FAFB; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; }
.ss-kpis b { font-size: 18px; }
.ss-kpis span { font-size: 12px; color: var(--muted); }
.ss-kpis .bad b { color: var(--err); }
.ss-tabs { margin: 6px 0 0; }
.ss-roles, .ss-match, .ss-att { display: flex; flex-direction: column; }
.ss-role, .ss-mrow, .ss-arow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 6px 12px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--line); }
.ss-role.sub { padding: 2px 0 6px 14px; border-bottom: 0; }
.ss-role-name, .ss-who { display: flex; flex-direction: column; min-width: 0; }
.ss-role-sel { display: flex; gap: 8px; align-items: center; }
.ss-role-sel .inp { flex: 1; min-width: 0; }
.ss-to { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.ss-to .inp { flex: 1 1 220px; min-width: 0; }
.ss-to .check { padding: 0; }
.ss-mrow.linked .ss-to .ok { color: var(--ok); font-weight: 600; }
.ss-arow { grid-template-columns: minmax(0, 1.4fr) auto auto minmax(0, 1fr); }
.ss-t { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.ss-s { text-align: right; }
.ss-day { font-weight: 600; margin-top: 10px; color: var(--muted); font-size: 13px; }
.ss-op { border-bottom: 1px solid var(--line); padding: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.ss-op .row-add { gap: 6px; }
.ss-req summary { cursor: pointer; color: var(--accent); font-size: 13px; }
.ss-req pre { white-space: pre-wrap; word-break: break-all; font-size: 12px; background: #F9FAFB; border: 1px solid var(--line);
  border-radius: 8px; padding: 8px; margin-top: 4px; max-height: 240px; overflow: auto; }
.ss-pin { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 2px; font-size: 17px; }
.ss-fire { background: #FEF2F2; color: #991B1B; border-radius: 10px; padding: 8px 10px; }
#st-syrve-row em { display: block; font-style: normal; }
@media (max-width: 640px) {
  .ss-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ss-role, .ss-mrow { grid-template-columns: 1fr; }
  .ss-arow { grid-template-columns: minmax(0, 1fr) auto auto; }
  .ss-arow .ss-s { grid-column: 1 / -1; text-align: left; }
}

/* 12.10.2026: Syrve — «для чего используется интеграция» */
.sy-purp { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 4px; }
.sy-purp h3.sub { margin: 8px 0 2px; }
.sy-purp-list { display: flex; flex-direction: column; }
.sy-purp-list .check { align-items: flex-start; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.sy-purp-list .check:last-child { border-bottom: 0; }
.sy-purp-list .check input { margin-top: 3px; flex: none; width: 18px; height: 18px; }
.sy-purp-list .check span { display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }
.sy-purp-list .check em { font-style: normal; }
.sy-purp-list .check.locked { opacity: .62; }
.sy-purp-list .sy-p-tag { align-self: flex-start; margin-top: 2px; }
.ss-role-opts { display: block; margin-top: 3px; }
body .sy-purp-list .check, body.mb .sy-purp-list .check { align-items: flex-start; }
#sy-acts { flex-wrap: wrap; }

/* 25.10.2026: уведомление для сотрудников — экран при первом входе (до приложения) и пометка в «Сотрудниках» */
.sn-wrap{position:fixed;inset:0;z-index:2000;display:flex;align-items:flex-start;justify-content:center;overflow-y:auto;
  padding:max(24px,env(safe-area-inset-top)) 16px 24px;background:var(--bg,#f6f4f1)}
.sn-card{width:100%;max-width:520px;margin:auto 0;display:flex;flex-direction:column;gap:12px;padding:24px}
.sn-title{font-size:22px;line-height:1.25;margin:0}
.sn-points{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:8px;line-height:1.45}
.sn-read{font-weight:600}
.sn-ok{width:100%;justify-content:center}
.sn-punch{width:100%;justify-content:center}
.sn-note:empty{display:none}
.sn-foot{text-align:center;margin:0}
.pill.sn-pill{background:#fff1de;color:#8a5a00}
.sn-remind{margin:0 0 10px}
.sn-read{color:#2563EB}

/* 26.10.2026: явка разошлась со сменой — маленькая красная точка (график, табель, карточка смены) */
.drift-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #DC2626; vertical-align: middle;
  margin-left: 4px; box-shadow: 0 0 0 1.5px #fff; cursor: help; flex: none; }
.fl.drift { background: #FEE2E2; color: #991B1B; cursor: help; }
.fl.drift .drift-dot { margin: 0 4px 0 0; width: 7px; height: 7px; box-shadow: none; }
.drift-line { color: #B91C1C; margin-top: 2px; }
.drift-line .drift-dot { margin: 0 4px 0 0; }
/* 26.10.2026: надбавки и вычеты под табелем сотрудника */
.ts-extras { margin-top: 12px; max-width: 640px; }
.ts-extras .row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid #E5E7EB; font-size: 14px; }
.ts-extras .row.tot { border-bottom: 0; font-weight: 600; }
.ts-extras .pos { color: #15803D; } .ts-extras .neg { color: #B91C1C; }

/* 02.11.2026: «Смены → По дню» — итоги дня плитками, таблица всех людей дня, списки «не вышли» / «без смены» */
#day-sheet .rep-bar { margin-bottom: 8px; }
#day-sheet .per-nav .inp[type=date] { min-width: 0; }
#dy-sort { margin: 0; flex-wrap: nowrap; }
#dy-sort .seg { flex: none; white-space: nowrap; font-size: 13px; padding: 7px 10px; }
.dy-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 0 12px 10px; }
.dy-tile { background: #fff; border: 1px solid #E5E7EB; border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dy-tile span { font-size: 12px; color: #6B7280; }
.dy-tile b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.dsheet .dy-open { padding: 0; font: inherit; font-weight: 600; text-align: left; color: var(--ink); }
table.dsheet .dy-open:hover { color: var(--accent); text-decoration: underline; }
table.tsheet.dsheet td:nth-child(-n+3) { white-space: normal; }
table.dsheet td:nth-child(3) { min-width: 120px; max-width: 220px; }
table.dsheet td:nth-child(4), table.dsheet td:nth-child(5) { white-space: nowrap; }
table.dsheet td:nth-child(9) { min-width: 180px; }
table.dsheet td:nth-child(10) { white-space: nowrap; }
.dy-list { margin-top: 10px; }
.dy-list .row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; padding: 4px 0; border-bottom: 1px solid #F1F1F1; }
.dy-list .row:last-child { border-bottom: 0; }
.dy-list .dy-open { padding: 0; min-height: 32px; font-weight: 600; }
.dy-list.bad h3 { color: #B91C1C; }
.dy-list.wait h3 { color: #92400E; }
@media (min-width: 900px) { #app > .view .dy-sum { margin-left: 0; margin-right: 0; } }
@media (max-width: 640px) {
  .dy-sum { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dy-tile { padding: 6px 10px; }
  .dy-tile.money { grid-column: span 2; }
  table.dsheet td:first-child { grid-column: 1 / -1; }
  table.dsheet td:nth-child(2) { grid-column: 1 / 2; }
  table.dsheet td:nth-child(3) { grid-column: 2 / -1; color: var(--muted); }
  table.dsheet td:nth-child(3)::before { content: none; }
  table.dsheet td:nth-child(8) { grid-column: auto; }
  table.dsheet td:nth-child(8)::before { content: attr(data-l); }
  table.dsheet td:nth-child(9) { grid-column: 1 / -1; min-width: 0; }
  table.dsheet td:nth-child(9)::before { content: none; }
  table.dsheet td:nth-child(4), table.dsheet td:nth-child(5) { white-space: normal; }
  table.dsheet td:nth-child(3) { max-width: none; min-width: 0; }
  table.dsheet tfoot td:first-child { grid-column: 1 / -1; }
}
/* на компьютере .tbl-scroll не прокручивается (desk.css) — длинные подписи (EL) прокручивает сама карточка */
body.dk #dy-box { overflow-x: auto; }

/* 03.11.2026: «Уведомления в Telegram по компаниям» (subs.js) */
.ns-list { list-style: none; margin: 8px 0; padding: 0; }
.ns-row { padding: 10px 0; border-top: 1px solid var(--line, #e5e7eb); }
.ns-row.off .ns-main b { color: var(--muted, #6b7280); }
.ns-main { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ns-tg { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.ns-sub, .ns-locs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 6px 0 0 26px; }
.ns-sub { flex-wrap: nowrap; align-items: flex-start; gap: 8px; cursor: pointer; }
.ns-sub input { flex: none; margin-top: 2px; }
.ns-loc { display: inline-flex; align-items: center; gap: 4px; }
.ns-q { margin: 6px 0; }
.ns-all { gap: 8px; }
