/* 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); text-transform: capitalize; }
.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; margin-bottom: 10px; }
.sheet-head h2 { margin: 0; font-size: 17px; }
.row3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 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.leave { display: block; margin-bottom: 4px; padding: 4px 8px; border-radius: 8px; font-size: 12px; text-align: left; background: #F3F4F6; color: #4B5563; border-left: 3px dashed #9CA3AF; }
  .chip.leave.sick { background: #FEF2F2; color: #991B1B; border-left-color: #FCA5A5; }
  .chip.leave.paid_leave { background: #ECFDF5; color: #065F46; border-left-color: #6EE7B7; }
  .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; }
.link.lang { font-weight: 600; letter-spacing: .04em; }

/* ── Явка, коллеги, часы по дням, шаги настройки ───── */
.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; gap: 6px; align-items: center; }
.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); align-items: start; }
  #app > .top { grid-column: 1 / -1; }
  #app > .tabs { grid-column: 1; grid-row: 2; 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: 2; 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; }
