:root {
  --bg: #F4F7F8;
  --card: #FFFFFF;
  --accent: #0E9594;
  --accent-dark: #0B7776;
  --accent-soft: #E3F4F3;
  --text: #17323D;
  --muted: #7A93A0;
  --line: #E4EBEE;
  --red: #D8574D;
  --amber: #E0A100;
  --green: #2E9E5B;
  --blue: #3A7BD5;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(23, 50, 61, .07);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overscroll-behavior: none;
}
.hidden { display: none !important; }
button { font: inherit; border: 0; background: none; cursor: pointer; color: inherit; }
input, textarea {
  font: inherit; color: var(--text); width: 100%;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; background: #fff; outline: none; resize: none;
}
input:focus, textarea:focus { border-color: var(--accent); }

/* ---------- gate ---------- */
.gate { min-height: 100vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 32px; gap: 10px; }
.gate-icon { font-size: 56px; }
.gate p { color: var(--muted); max-width: 280px; }

/* ---------- main ---------- */
.screen { min-height: 100vh; padding-bottom: 76px; }

/* ролевая нижняя навигация */
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000;
  display: flex; background: rgba(255,255,255,.97); backdrop-filter: blur(8px);
  box-shadow: 0 -1px 8px rgba(23,50,61,.1); padding-bottom: env(safe-area-inset-bottom); }
.navbtn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 2px 7px; color: var(--muted); position: relative; }
.navbtn .ni { font-size: 21px; line-height: 1; filter: grayscale(1) opacity(.7); transition: .15s; }
.navbtn .nl { font-size: 10.5px; font-weight: 600; }
.navbtn.active { color: var(--accent-dark); }
.navbtn.active .ni { filter: none; transform: translateY(-1px); }
.navbtn.active::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.panel-body { padding-bottom: 24px; }
/* панели верхнего уровня оставляют место под навбар */
#screen-schedule .panel-body, #screen-kpi .panel-body, #screen-team .panel-body { padding-bottom: 84px; }
.topbar { display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px 8px; }
.topbar h1 { font-size: 22px; letter-spacing: -.3px; }
.topbar .sub { color: var(--muted); font-size: 13px; }
.icon-btn { font-size: 20px; width: 38px; height: 38px; border-radius: 12px;
  background: var(--card); box-shadow: var(--shadow); display: inline-flex;
  align-items: center; justify-content: center; }

.projects { display: flex; gap: 6px; padding: 6px 16px; }
.projects .ptab { flex: 1; text-align: center; padding: 9px 4px; border-radius: 12px;
  background: var(--card); box-shadow: var(--shadow); font-size: 13.5px; font-weight: 600;
  color: var(--muted); border: 1.5px solid transparent; }
.projects .ptab.active { color: var(--accent-dark); border-color: var(--accent);
  background: var(--accent-soft); }

.chips { display: flex; gap: 6px; padding: 6px 16px 0; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; padding: 7px 13px; border-radius: 999px; background: var(--card);
  box-shadow: var(--shadow); font-size: 13px; font-weight: 500; color: var(--muted);
  border: 1.5px solid transparent; }
.chip.active { color: var(--accent-dark); border-color: var(--accent); background: var(--accent-soft); }
.chip .cnt { font-weight: 700; margin-left: 4px; }
.chips-types { padding-bottom: 2px; }

/* ---------- list ---------- */
.list { padding: 10px 16px; display: flex; flex-direction: column; gap: 10px; }
.empty { text-align: center; color: var(--muted); padding: 48px 20px; }
.tcard { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 14px; display: flex; flex-direction: column; gap: 7px; cursor: pointer;
  border-left: 4px solid transparent; transition: transform .08s; }
.tcard:active { transform: scale(.985); }
.tcard.prio-high { border-left-color: var(--red); }
.tcard .trow { display: flex; align-items: center; gap: 8px; }
.tcard .title { font-weight: 600; font-size: 15px; flex: 1; }
.tcard .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  color: var(--muted); font-size: 12.5px; }
.badge { padding: 2.5px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.b-short  { background: #E3F4F3; color: #0B7776; }
.b-long   { background: #EAEFFA; color: #3A5BC7; }
.b-mentor { background: #FBEFE2; color: #B26A00; }
.s-new         { background: #EAF1FB; color: var(--blue); }
.s-in_progress { background: #FBF3DC; color: #9A7100; }
.s-review      { background: #F1EAFB; color: #7B4BC9; }
.s-done        { background: #E7F5EC; color: var(--green); }
.s-closed      { background: #EEF1F3; color: var(--muted); }
.b-time { background: #EEF4F5; color: var(--accent-dark); font-variant-numeric: tabular-nums; }
.b-rep  { background: #FFF2D9; color: #A66B00; }
.b-vpn-active { background:#E7F5EC; color: var(--green); }
.b-vpn-none { background:#EEF1F3; color: var(--muted); }
.b-vpn-revoked { background:#FBE9E7; color: var(--red); }
.mini { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 3px; }

.fab { position: fixed; right: 18px; bottom: 82px; width: 56px; height: 56px;
  border-radius: 18px; background: var(--accent); color: #fff; font-size: 28px;
  box-shadow: 0 6px 18px rgba(14, 149, 148, .4); z-index: 9050; }
.fab:active { background: var(--accent-dark); }

/* ---------- panel (тикет / создание / команда) ---------- */
.panel { position: fixed; inset: 0; background: var(--bg); z-index: 100;
  display: flex; flex-direction: column; animation: slidein .18s ease-out; }
@keyframes slidein { from { transform: translateX(30px); opacity: .4; } to { transform: none; opacity: 1; } }
.panel-head { display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; background: var(--card); box-shadow: var(--shadow); }
.panel-title { font-weight: 700; font-size: 16px; }
.back { font-size: 26px; width: 36px; height: 36px; color: var(--accent-dark); }
.panel-body { flex: 1; overflow-y: auto; padding: 14px 16px 20px; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px; }
.tk-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.tk-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tk-meta { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px;
  font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.tk-meta b { color: var(--text); font-weight: 600; }
.tk-desc { white-space: pre-wrap; margin-bottom: 4px; }
.tk-actions { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.primary { background: var(--accent); color: #fff; font-weight: 600; padding: 11px 18px;
  border-radius: 12px; flex: 1; text-align: center; }
.primary:active { background: var(--accent-dark); }
.secondary { background: var(--card); color: var(--accent-dark); font-weight: 600;
  padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow); }
.danger-text { color: var(--red); }

.section-title { font-size: 13px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .4px; margin: 16px 0 8px; }
.progressbar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 6px 0 10px; }
.progressbar i { display: block; height: 100%; background: var(--accent); border-radius: 3px;
  transition: width .25s; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0;
  border-bottom: 1px solid var(--line); cursor: pointer; }
.check:last-child { border-bottom: 0; }
.check .box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line);
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; margin-top: 1px; }
.check.done .box { background: var(--accent); border-color: var(--accent); }
.check.done .ctext { text-decoration: line-through; color: var(--muted); }
.check-add { display: flex; gap: 8px; margin-top: 8px; }

.att-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.att-grid img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; cursor: pointer; }
audio { width: 100%; height: 38px; }

/* comments */
.comments { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.cmt { background: var(--card); border-radius: 12px; padding: 9px 12px; box-shadow: var(--shadow); }
.cmt.own { background: var(--accent-soft); }
.cmt .who { font-size: 12.5px; font-weight: 700; color: var(--accent-dark); }
.cmt .when { font-size: 11px; color: var(--muted); float: right; }
.cmt .body { white-space: pre-wrap; }
.cmt img { max-width: 160px; border-radius: 10px; margin-top: 6px; display: block; cursor: pointer; }
.sysline { text-align: center; color: var(--muted); font-size: 12px; padding: 2px 0; }

/* composer */
.composer { display: flex; align-items: flex-end; gap: 6px; padding: 8px 10px
  calc(8px + env(safe-area-inset-bottom)); background: var(--card);
  box-shadow: 0 -1px 4px rgba(23,50,61,.08); }
.composer-mid { flex: 1; }
.composer textarea { max-height: 110px; }
.send { width: 42px; height: 42px; border-radius: 50%; background: var(--accent);
  color: #fff; font-size: 17px; flex: 0 0 auto; }
.icon-btn.rec { background: var(--red); color: #fff; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .6; } }
.attach-previews { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.attach-previews:empty { display: none; }
.attach-previews .ap { position: relative; }
.attach-previews img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.attach-previews .ap-x { position: absolute; top: -6px; right: -6px; background: var(--red);
  color: #fff; width: 18px; height: 18px; border-radius: 50%; font-size: 11px;
  display: flex; align-items: center; justify-content: center; }
.attach-previews .ap-voice { padding: 6px 10px; background: var(--accent-soft);
  border-radius: 8px; font-size: 12px; color: var(--accent-dark); font-weight: 600; }

/* form */
.form label { display: block; font-size: 13px; font-weight: 700; color: var(--muted);
  margin: 12px 0 6px; }
.form .chips { padding: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form .primary { width: 100%; margin-top: 18px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* team */
.tmember { display: flex; align-items: center; gap: 10px; background: var(--card);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 11px 13px; margin-bottom: 8px; }
.tmember .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent-dark); font-weight: 700; display: flex; align-items: center;
  justify-content: center; flex: 0 0 auto; }
.tmember .info { flex: 1; min-width: 0; }
.tmember .nm { font-weight: 600; }
.tmember .sub { font-size: 12px; color: var(--muted); }
.tmember select { border: 1px solid var(--line); border-radius: 8px; padding: 5px 6px;
  font-size: 13px; background: #fff; color: var(--text); }
.tmember .rm { color: var(--red); font-size: 18px; padding: 6px; }

/* toast, lightbox */
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  background: rgba(23, 50, 61, .92); color: #fff; padding: 10px 18px; border-radius: 12px;
  font-size: 14px; z-index: 9600; max-width: 88vw; text-align: center; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 9500;
  display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 96vw; max-height: 92vh; border-radius: 8px; }

/* executor + kpi */
.execrow { padding: 8px 16px 0; }
.execrow select { width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 10px; background: var(--card); font-size: 13.5px; color: var(--text); }
.kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 8px 16px 0; }
.kpi .k { background: var(--card); border-radius: 12px; box-shadow: var(--shadow);
  padding: 8px 4px; text-align: center; }
.kpi .k b { display: block; font-size: 17px; color: var(--accent-dark); }
.kpi .k span { font-size: 10.5px; color: var(--muted); }

/* board (Trello-style) */
.board { display: flex; gap: 10px; padding: 12px 16px; overflow-x: auto;
  scroll-snap-type: x mandatory; align-items: flex-start; }
.bcol { flex: 0 0 76vw; max-width: 320px; scroll-snap-align: start;
  background: #ECF1F3; border-radius: var(--radius); padding: 10px;
  min-height: 120px; }
.bcol h3 { font-size: 13px; font-weight: 700; color: var(--muted); margin: 0 4px 8px;
  display: flex; justify-content: space-between; }
.bcol h3 .n { background: var(--card); border-radius: 999px; padding: 0 8px; }
.bcard { background: var(--card); border-radius: 10px; box-shadow: var(--shadow);
  padding: 9px 11px; margin-bottom: 8px; cursor: pointer; border-left: 3px solid transparent; }
.bcard.prio-high { border-left-color: var(--red); }
.bcard .bt { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.bcard .bm { display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  font-size: 11.5px; color: var(--muted); }
.bcard .quick { margin-top: 7px; width: 100%; padding: 7px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; font-size: 13px; }

/* аватарки */
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent-dark); font-weight: 700; display: flex; align-items: center;
  justify-content: center; flex: 0 0 auto; overflow: hidden; cursor: pointer; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.av-lg { width: 44px; height: 44px; font-size: 18px; }
.av-sm { width: 26px; height: 26px; font-size: 12px; }
.me-block { display: flex; align-items: center; gap: 10px; }

/* инбокс приёмки для старших */
.rvcard { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  border-left: 4px solid #7B4BC9; padding: 12px 14px; margin-bottom: 10px; }
.rvcard .rv-top { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.rvcard .rv-title { font-weight: 600; flex: 1; }
.rvcard .rv-report { background: #F6F1FF; border-radius: 10px; padding: 8px 11px;
  margin-top: 8px; font-size: 14px; }
.rvcard .rv-report .by { font-size: 12px; font-weight: 700; color: #7B4BC9; }
.rvcard .rv-photo { width: 64px; height: 64px; object-fit: cover; border-radius: 8px;
  margin-top: 8px; cursor: pointer; }
.rvcard .rv-actions { display: flex; gap: 8px; margin-top: 10px; }
.rvcard .rv-actions .primary { padding: 9px 12px; font-size: 14px; }
.rvcard .rv-actions .secondary { padding: 9px 12px; font-size: 14px; }
.rvcard .rv-reject { display: flex; gap: 8px; margin-top: 8px; }

/* расписание */
.sch-week { font-weight: 700; margin-bottom: 4px; }
.sch-status { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.sch-day { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 10px 12px; margin-bottom: 8px; }
.sch-day .d-name { font-weight: 700; font-size: 13.5px; margin-bottom: 8px; }
.sch-cells { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sch-cell { border: 1.5px dashed var(--line); border-radius: 10px; padding: 9px 10px;
  min-height: 52px; cursor: pointer; }
.sch-cell .c-label { font-size: 11.5px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; }
.sch-cell.on { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.sch-cell .c-names { font-size: 12px; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 3px; }
.sch-cell .c-names .nm-chip { background: #fff; border-radius: 999px; padding: 1px 8px;
  box-shadow: var(--shadow); }
.sch-cell .c-names .nm-chip.asg { background: var(--accent); color: #fff; }
.sch-cell .c-cnt { font-size: 12px; color: var(--muted); margin-top: 4px; }
.sch-actions { display: flex; gap: 8px; margin: 12px 0; }

/* дневной конструктор графика */
.cab-row { font-size: 12.5px; margin: 2px 0; }
.cab-row .slot-chip { display: inline-block; background: var(--accent-soft);
  color: var(--accent-dark); border-radius: 8px; padding: 1px 7px; margin: 1px 2px; font-size: 11.5px; }
.cab-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 10px 12px; margin-bottom: 10px; }
.cab-head { font-weight: 700; margin-bottom: 6px; }
.blk { display: flex; align-items: center; gap: 8px; background: var(--bg);
  border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; }
.blk-main { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px;
  cursor: pointer; }
.blk-edit { opacity: .4; font-size: 12px; margin-left: auto; }
.blk-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.blk-asr.bad { color: var(--red); font-weight: 600; }
.blk-del { color: var(--red); font-size: 15px; padding: 4px 8px; }
.add-blk { width: 100%; padding: 9px; border-radius: 10px; background: var(--accent-soft);
  color: var(--accent-dark); font-weight: 600; font-size: 13.5px; }
.doc-card { background: var(--card); border-radius: 12px; box-shadow: var(--shadow);
  padding: 4px 12px; margin-bottom: 6px; }

/* выбор ассистента в блоке */
.pick-list { max-height: 46vh; overflow-y: auto; }
.pick-asr { display: flex; align-items: center; gap: 8px; padding: 9px 10px;
  border: 1.5px solid var(--line); border-radius: 10px; margin-bottom: 6px; cursor: pointer; }
.pick-asr.sel { border-color: var(--accent); background: var(--accent-soft); }
.pick-asr.bad { opacity: .55; cursor: not-allowed; border-style: dashed; }
.pick-asr .info { flex: 1; }
.pick-asr .bad-tag { color: var(--red); font-size: 12px; font-weight: 700; }
.pick-asr .warn-tag { color: var(--amber); font-size: 12px; font-weight: 700; }
.pick-asr .ok-tag { color: var(--green); font-size: 12.5px; font-weight: 800; }
.pick-asr .rec-badge { background: var(--accent); color: #fff; font-size: 10px; font-weight: 700;
  border-radius: 999px; padding: 1px 7px; margin-left: 6px; vertical-align: middle; }

/* кадрирование аватара */
.crop-back { position: fixed; inset: 0; z-index: 9500; background: rgba(23,50,61,.6);
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.crop-box { background: var(--card); border-radius: 18px; padding: 18px; width: 100%;
  max-width: 340px; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.crop-title { font-weight: 700; font-size: 14px; text-align: center; margin-bottom: 12px; }
.crop-view { position: relative; margin: 0 auto; border-radius: 50%; overflow: hidden;
  background: #000; touch-action: none; cursor: grab; box-shadow: 0 0 0 3px var(--accent-soft); }
.crop-view:active { cursor: grabbing; }
.crop-img { position: absolute; left: 0; top: 0; user-select: none; -webkit-user-drag: none; max-width: none; }
.crop-hint { text-align: center; font-size: 12px; color: var(--muted); margin: 12px 4px 0; }
.crop-actions { display: flex; gap: 8px; margin-top: 14px; }
.crop-actions button { flex: 1; padding: 11px; border-radius: 12px; font-weight: 600; }

/* тумблер уведомлений */
.notifrow { display: flex; align-items: center; justify-content: space-between;
  background: var(--card); border-radius: 12px; box-shadow: var(--shadow);
  padding: 12px 14px; margin: 10px 0 4px; font-weight: 600; }
.switch2 { padding: 6px 16px; border-radius: 999px; font-weight: 700; font-size: 13px;
  background: var(--line); color: var(--muted); min-width: 56px; }
.switch2.on { background: var(--accent); color: #fff; }

/* навигатор месяцев */
.monthnav { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 8px; }
.mn-title { font-weight: 700; font-size: 15px; flex: 1; text-align: center; }
.mn-arrow { width: 40px; height: 34px; border-radius: 10px; background: var(--card);
  box-shadow: var(--shadow); font-size: 20px; color: var(--accent-dark); font-weight: 700; }

/* навигатор недель */
.weekbar { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 0 0 10px; }
.weekbar::-webkit-scrollbar { display: none; }
.weekchip { flex: 0 0 auto; display: flex; align-items: center; gap: 5px; padding: 8px 12px;
  border-radius: 12px; background: var(--card); box-shadow: var(--shadow); font-size: 13px;
  font-weight: 600; color: var(--muted); border: 1.5px solid transparent; }
.weekchip.active { color: var(--accent-dark); border-color: var(--accent); background: var(--accent-soft); }
.weekchip .ws { font-size: 11px; }
.weekchip.add { color: var(--accent-dark); border-style: dashed; border-color: var(--accent); }

/* таймлайн занятости в шторке блока */
.timeline { margin: 8px 0 4px; }
.tl-track { position: relative; height: 24px; border-radius: 7px; overflow: hidden;
  background: #E7F5EC; border: 1px solid var(--line); }
.tl-busy { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(
  45deg, #F3C0BC, #F3C0BC 5px, #EBA9A4 5px, #EBA9A4 10px); border-left: 1px solid var(--red);
  border-right: 1px solid var(--red); }
.tl-sel { position: absolute; top: 0; bottom: 0; border: 2px solid; box-sizing: border-box; border-radius: 4px; }
.tl-sel.ok { border-color: var(--green); background: rgba(46,158,91,.18); }
.tl-sel.bad { border-color: var(--red); background: rgba(216,87,77,.22); }
/* перетаскиваемые ручки границ */
.tl-track { height: 30px; }
.tl-h { position: absolute; top: 50%; transform: translateY(-50%); width: 22px; height: 40px;
  display: flex; align-items: flex-start; justify-content: center; cursor: ew-resize;
  touch-action: none; z-index: 2; }
.tl-h::after { content: ''; position: absolute; top: 50%; transform: translateY(-50%);
  width: 12px; height: 22px; border-radius: 5px; background: var(--card); box-shadow: 0 1px 4px rgba(0,0,0,.3);
  border: 2px solid var(--green); }
.tl-sel.bad .tl-h::after { border-color: var(--red); }
.tl-h-from { left: -11px; } .tl-h-to { right: -11px; }
.tl-h b { position: absolute; top: -16px; font-size: 10px; font-weight: 700; color: var(--accent-dark);
  background: var(--card); border-radius: 6px; padding: 0 4px; box-shadow: var(--shadow); white-space: nowrap; }
.tl-ticks { position: relative; height: 14px; font-size: 10px; color: var(--muted); }
.tl-ticks span { position: absolute; transform: translateX(-50%); }
.tl-legend { font-size: 12px; font-weight: 600; margin-top: 2px; }
.tl-legend .ok { color: var(--green); }
.tl-legend .bad { color: var(--red); }
.editlbl { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin: 12px 0 6px; }

/* часы «с — до» */
.timerow { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
.timerow input { flex: 1; text-align: center; }
.trow-sm { margin: 6px 0 0; max-width: 210px; }
.trow-sm input { padding: 5px 6px; font-size: 13px; }

/* шторка назначения */
.sheet-back { position: fixed; inset: 0; background: rgba(23,50,61,.45); z-index: 9300; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9400; background: var(--card);
  border-radius: 18px 18px 0 0; padding: 16px 16px calc(18px + env(safe-area-inset-bottom));
  max-height: 70vh; overflow-y: auto; box-shadow: 0 -8px 30px rgba(23,50,61,.25); }
.sheet h3 { margin-bottom: 10px; font-size: 15px; }
.sheet .srow { display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--line); }
.sheet .srow:last-child { border-bottom: 0; }
.sheet .srow .info { flex: 1; }
.sheet .srow .avail-dot { font-size: 11.5px; color: var(--green); font-weight: 600; }
.sheet .srow .no-dot { font-size: 11.5px; color: var(--muted); }
.sheet .srow .asg-btn { padding: 7px 14px; border-radius: 10px; font-weight: 600;
  background: var(--bg); color: var(--muted); }
.sheet .srow .asg-btn.on { background: var(--accent); color: #fff; }

/* ручной ввод минут */
.minrow { display: flex; gap: 8px; align-items: center; }
.minrow .chips { flex: 1; padding: 0; }
.minrow input { width: 76px; flex: 0 0 auto; text-align: center; }

/* секции главного списка */
.sec-head { display: flex; align-items: center; gap: 8px; padding: 10px 4px 4px;
  font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase;
  letter-spacing: .4px; cursor: pointer; user-select: none; }
.sec-head .n { background: var(--card); border-radius: 999px; padding: 1px 9px;
  box-shadow: var(--shadow); color: var(--text); }
.sec-head .chev { margin-left: auto; transition: transform .15s; }
.sec-head.closed .chev { transform: rotate(-90deg); }
.sec-review .sec-head { color: #7B4BC9; }

/* факт времени для старших */
.fact { background: #F6F1FF; border-radius: 10px; padding: 8px 12px; margin-top: 10px;
  font-size: 13px; color: #5A3E99; }
.fact b { font-variant-numeric: tabular-nums; }

/* drag & drop */
.bcard.drag-src { opacity: .35; }
.drag-ghost { position: fixed; z-index: 9200; pointer-events: none;
  transform: rotate(2.5deg) scale(1.04); box-shadow: 0 14px 32px rgba(23,50,61,.3);
  transition: none; border-radius: 10px; }
.bcol.drop-hint { outline: 2px dashed var(--accent); outline-offset: -2px;
  background: #E3F1F0; }
.drop-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9100;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  padding: 10px 10px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96); box-shadow: 0 -4px 18px rgba(23,50,61,.15); }
.drop-chip { text-align: center; padding: 16px 4px; border-radius: 12px;
  font-size: 12px; font-weight: 700; background: var(--bg);
  border: 1.5px dashed var(--line); color: var(--muted); }
.drop-chip.hover { background: var(--accent-soft); border-color: var(--accent);
  color: var(--accent-dark); transform: scale(1.05); }

/* KPI */
.krow { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 11px 14px; margin-bottom: 8px; }
.krow.me { border: 1.5px solid var(--accent); }
.krow .top { display: flex; align-items: baseline; gap: 8px; }
.krow .pos { font-weight: 800; color: var(--muted); width: 22px; }
.krow .nm { font-weight: 600; flex: 1; }
.krow .mins { font-weight: 800; color: var(--accent-dark); font-variant-numeric: tabular-nums; }
.krow .bar { height: 7px; border-radius: 4px; background: var(--line); margin: 7px 0 4px; overflow: hidden; }
.krow .bar i { display: block; height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), #4DB8B0); }
.krow .det { font-size: 12px; color: var(--muted); }

/* отметка дежурного в ленте */
.markline { background: #EAF7EE; border-radius: 12px; padding: 8px 12px;
  box-shadow: var(--shadow); font-size: 13.5px; }
.markline .who { font-weight: 700; color: var(--green); }
.markline .when { float: right; font-size: 11px; color: var(--muted); }

/* recurring rules */
.rule { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 14px; margin-bottom: 8px; }
.rule .rt { font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.rule .rs { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.rule .ractions { display: flex; gap: 8px; margin-top: 8px; }
.rule.off { opacity: .55; }
.switch { padding: 6px 12px; border-radius: 8px; background: var(--accent-soft);
  color: var(--accent-dark); font-weight: 600; font-size: 13px; }

.skeleton { height: 74px; border-radius: var(--radius); background:
  linear-gradient(100deg, #ECF1F3 40%, #F6FAFB 50%, #ECF1F3 60%); background-size: 200% 100%;
  animation: sk 1.1s infinite; }
@keyframes sk { to { background-position: -200% 0; } }
