:root {
  --bg: #f4f5fb; --card: #fff; --text: #1d2033; --muted: #6b7088; --line: #e3e5ef; --field: #f7f8fc;
  --primary: #4f46e5; --primary-2: #4338ca; --danger: #e5484d; --ok: #12a150;
  --call-bg: #0d0f1c; --tile: #1a1d31; --tile-2: #23273f; --call-text: #eef0fb; --call-muted: #9a9fb8;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #11131f; --card: #1a1d2e; --text: #e8e9f3; --muted: #9a9fb8; --line: #2a2e45; --field: #141626; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); -webkit-tap-highlight-color: transparent; }
.view { display: none; min-height: 100%; }
.view.active { display: block; }
.center.active { display: flex; align-items: center; justify-content: center; padding: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-bottom: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.narrow { width: 100%; max-width: 380px; text-align: center; }
.logo { width: 72px; height: 72px; border-radius: 18px; }
h1 { margin: 8px 0 0; } h2 { margin: 0 0 12px; font-size: 18px; }
.muted { color: var(--muted); }
.small-cap { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; margin: 12px 0 6px; }
.hint { font-size: 13px; margin: 12px 0 0; }
label { display: block; text-align: left; margin: 10px 0; font-size: 13px; color: var(--muted); }
input, select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--field); color: var(--text); }
input:focus, select:focus { outline: 2px solid var(--primary); border-color: transparent; }
button, .btn { font: inherit; border: 0; border-radius: 10px; padding: 10px 16px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--text); background: var(--line); white-space: nowrap; }
.primary { background: var(--primary); color: #fff; } .primary:hover { background: var(--primary-2); }
.ghost { background: transparent; } .ghost:hover { background: var(--line); }
.danger { background: var(--danger); color: #fff; }
.danger-text { color: var(--danger) !important; }
.small { padding: 6px 10px; font-size: 13px; }
.wide { width: 100%; margin-top: 8px; }
.error { color: var(--danger); min-height: 1em; margin: 6px 0; font-size: 14px; }
.row { display: flex; gap: 8px; } .row.end { justify-content: flex-end; flex-wrap: wrap; margin-top: 12px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--card); flex-wrap: wrap; position: sticky; top: 0; z-index: 5; }
.top nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.page { max-width: 880px; margin: 0 auto; padding: 16px; }
.list .item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.list .item:first-child { border-top: 0; }
.list .actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.list .actions select { width: auto; padding: 6px 8px; font-size: 13px; }
a.item:hover .title { color: var(--primary); }
.title { font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .sub { font-size: 13px; color: var(--muted); }
.room.is-live { background: linear-gradient(90deg, rgba(229,72,77,.08), transparent); margin: 0 -12px; padding: 12px; border-radius: 12px; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--line); white-space: nowrap; font-weight: 500; }
.badge.done { background: #d9f5e5; color: #0b6b37; } .badge.live { background: #fde2e2; color: #b42318; }
.badge.processing { background: #e6e8ff; color: #3730a3; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #a3a7bd; display: inline-block; flex-shrink: 0; }
.dot.on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
.dot.live { background: #ef4444; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .35; } }
.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 600px) { .grid-form { grid-template-columns: 1fr; } .list .item { flex-wrap: wrap; } }

/* окна */
.modal { position: fixed; inset: 0; background: rgba(10,12,25,.55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal-card { background: var(--card); color: var(--text); border-radius: 16px; padding: 22px; width: 100%; max-width: 460px; max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.picker { max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.pick { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px; border-radius: 8px; color: var(--text); font-size: 15px; cursor: pointer; }
.pick:hover { background: var(--field); }
.pick input { width: 18px; height: 18px; margin: 0; }
.pick .muted { margin-left: auto; font-size: 12px; }
.menu { display: grid; gap: 6px; margin: 12px 0; }
.menu button { justify-content: flex-start; background: var(--field); padding: 12px 14px; }
.linkbox { display: flex; gap: 8px; margin: 12px 0; } .linkbox input { font-size: 13px; }

/* входящий звонок */
.ring { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 24px 16px; background: rgba(10,12,25,.35); }
.ring-card { background: var(--card); color: var(--text); border-radius: 18px; padding: 20px 24px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.35); width: 100%; max-width: 360px; }
.ring-room { font-weight: 700; font-size: 18px; margin: 4px 0 14px; }
.ring-card .row { justify-content: center; } .ring-card .row button { flex: 1; }
.ring-pulse { font-size: 34px; width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; background: #dcfce7; display: flex; align-items: center; justify-content: center; animation: pulse 1.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.5); } 100% { box-shadow: 0 0 0 22px rgba(34,197,94,0); } }

.toasts { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; z-index: 70; pointer-events: none; width: max-content; max-width: 92vw; }
.toast { background: rgba(20,22,40,.94); color: #fff; padding: 9px 16px; border-radius: 10px; font-size: 14px; animation: rise .2s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* проверка перед входом */
.prejoin.active { display: flex; min-height: 100vh; min-height: 100dvh; align-items: center; justify-content: center; padding: 16px; background: var(--call-bg); color: var(--call-text); }
.prejoin-wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 28px; width: 100%; max-width: 1000px; align-items: center; }
.prejoin .preview { aspect-ratio: 16 / 9; border-radius: 18px; }
.prejoin .pre-side h2 { font-size: 24px; margin: 0 0 4px; }
.prejoin label { color: var(--call-muted); }
.prejoin input, .prejoin select { background: var(--tile); color: var(--call-text); border-color: #2c3050; }
.prejoin .ghost { color: var(--call-muted); } .prejoin .ghost:hover { background: var(--tile); }
.prejoin .muted { color: var(--call-muted); }
.meter { position: absolute; left: 14px; right: 14px; bottom: 74px; height: 4px; background: rgba(255,255,255,.12); border-radius: 4px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: #22c55e; transition: width .08s; }
.pre-toggles { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; gap: 12px; justify-content: center; }
.round { width: 52px; height: 52px; border-radius: 50%; padding: 0; font-size: 22px; background: rgba(255,255,255,.16); color: #fff; backdrop-filter: blur(6px); }
.round.off { background: var(--danger); }
@media (max-width: 760px) { .prejoin-wrap { grid-template-columns: 1fr; gap: 12px; } .prejoin .preview { aspect-ratio: 4 / 3; } }

/* звонок */
.call.active { display: flex; flex-direction: column; height: 100vh; height: 100dvh; background: var(--call-bg); color: var(--call-text); position: relative; overflow: hidden; }
.call-top { display: flex; gap: 14px; align-items: center; padding: 10px 16px; min-height: 48px; }
.call-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-top .muted { color: var(--call-muted); font-variant-numeric: tabular-nums; font-size: 14px; }
.spacer { flex: 1; }
.call-body { flex: 1; display: flex; min-height: 0; gap: 8px; padding: 0 8px; }
.stage { display: none; flex: 1; min-width: 0; }
.stage .tile { flex: 1; height: 100%; }
.grid { flex: 1; display: grid; gap: 8px; min-height: 0; overflow: auto; align-content: center;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); grid-auto-rows: minmax(150px, 1fr); }
.grid[data-count="1"] { grid-template-columns: 1fr; }
.grid[data-count="2"] { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
.call.speaker .stage { display: flex; }
.call.speaker .grid { flex: 0 0 220px; grid-template-columns: 1fr; grid-auto-rows: 124px; align-content: start; }
@media (max-width: 760px) {
  .call-body { flex-direction: column; }
  .call.speaker .grid { flex: 0 0 112px; grid-auto-flow: column; grid-auto-columns: 150px; grid-template-columns: none; grid-auto-rows: 100%; overflow-x: auto; overflow-y: hidden; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(130px, 1fr); gap: 6px; }
  .grid[data-count="1"], .grid[data-count="2"] { grid-template-columns: 1fr; }
}
.tile { position: relative; background: var(--tile); border-radius: 14px; overflow: hidden; min-height: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: box-shadow .15s; }
.tile video { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; background: #000; }
.tile.me:not(.screen) video { transform: scaleX(-1); }
.tile.screen video { object-fit: contain; }
.tile .avatar { width: 30%; max-width: 96px; min-width: 44px; aspect-ratio: 1; border-radius: 50%; background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; display: flex; align-items: center; justify-content: center; font-size: clamp(18px, 4vw, 36px); font-weight: 700; }
.tile.cam-off video { visibility: hidden; }
.tile:not(.cam-off) .avatar { display: none; }
.tile .name { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.55); color: #fff; padding: 3px 10px; border-radius: 8px; font-size: 13px; max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile.speaking { box-shadow: inset 0 0 0 3px #22c55e; }
.tile.pinned { box-shadow: inset 0 0 0 3px #818cf8; }
.tile .badges { position: absolute; right: 8px; top: 8px; display: flex; gap: 4px; }
.tile .badges span { display: none; border-radius: 8px; padding: 2px 6px; font-size: 13px; }
.tile .hand { background: #facc15; } .tile .mic-off { background: rgba(229,72,77,.92); }
.tile.hand-up .hand, .tile.muted .mic-off { display: block; }
.tile.hand-up { box-shadow: inset 0 0 0 3px #facc15; }
.float-react { position: absolute; bottom: 40px; display: flex; flex-direction: column; align-items: center; animation: floatup 3.2s ease-out forwards; pointer-events: none; z-index: 3; }
.float-react span { font-size: 42px; } .float-react small { background: rgba(0,0,0,.55); color: #fff; padding: 1px 8px; border-radius: 6px; font-size: 11px; }
@keyframes floatup { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { transform: translateY(-10px) scale(1.1); opacity: 1; } 100% { transform: translateY(-140px) scale(1); opacity: 0; } }

.side { flex: 0 0 320px; background: var(--tile); border-radius: 14px; display: flex; flex-direction: column; min-height: 0; margin-bottom: 0; }
@media (max-width: 760px) { .side { position: absolute; inset: 56px 8px 84px; z-index: 10; } }
.side-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid #2c3050; }
.side-head .ghost { color: var(--call-muted); }
.side-pane { flex: 1; overflow: auto; padding: 10px 12px; display: flex; flex-direction: column; min-height: 0; }
.side label { color: var(--call-muted); }
.side input, .side select { background: var(--call-bg); color: var(--call-text); border-color: #2c3050; }
.side-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.side-actions button { background: var(--tile-2); color: var(--call-text); }
.person { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #262a44; }
.person:first-of-type { border-top: 0; }
.avatar.sm { width: 30px; height: 30px; border-radius: 50%; background: #4f46e5; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.pname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picons { font-size: 13px; }
.pmenu .ghost { color: var(--call-muted); padding: 4px 6px; }
.chat-log { flex: 1; overflow: auto; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.chat-log b { color: #a5b4fc; }
#side-chat form { padding-top: 8px; }
.react-pop { position: absolute; bottom: 86px; left: 50%; transform: translateX(-50%); background: var(--tile-2); border-radius: 30px; padding: 6px; display: flex; gap: 2px; z-index: 20; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.react-pop button { background: transparent; font-size: 26px; padding: 6px 8px; border-radius: 50%; }
.react-pop button:hover { background: rgba(255,255,255,.1); transform: scale(1.15); }
.controls { display: flex; justify-content: center; gap: 8px; padding: 10px 8px; padding-bottom: max(10px, env(safe-area-inset-bottom)); flex-wrap: nowrap; overflow-x: auto; }
.controls button { background: var(--tile-2); color: #fff; display: flex; flex-direction: column; align-items: center; min-width: 70px; font-size: 20px; padding: 8px 10px; gap: 2px; position: relative; }
.controls button span { font-size: 11px; color: #c9cce0; }
.controls button:hover { background: #2f3454; }
.controls button.off { background: var(--danger); }
.controls button.on { background: var(--primary); }
.controls .danger { background: var(--danger); }
.badge-dot::after { content: ""; position: absolute; top: 6px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: #f43f5e; }
@media (max-width: 760px) {
  .controls { justify-content: center; gap: 5px; padding-left: 6px; padding-right: 6px; overflow: visible; }
  .controls button { flex: 1 1 0; min-width: 0; max-width: 60px; padding: 10px 0; font-size: 19px; }
  .controls button span { display: none; }
  #btn-layout, #btn-settings { display: none; }
}

/* встреча */
.summary h2 { font-size: 17px; margin: 18px 0 6px; } .summary h2:first-child { margin-top: 0; }
.summary ul { margin: 4px 0; padding-left: 20px; } .summary p { margin: 6px 0; }
.line { display: grid; grid-template-columns: 52px 1fr; gap: 8px; padding: 6px 0; }
.line .t { color: var(--muted); font-size: 12px; padding-top: 2px; font-variant-numeric: tabular-nums; }
.line .who { font-weight: 700; margin-right: 6px; }
.notice { padding: 12px; border-radius: 10px; background: #fff4d6; color: #6b4e00; margin-bottom: 12px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; line-height: 1.4; }
.check-row input { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.check-row b { color: var(--call-text); }

/* старт и регистрация */
.big { padding: 14px 18px; font-size: 16px; font-weight: 600; }
.small-note { font-size: 13px; margin: 8px 0; }
.divider { display: flex; align-items: center; gap: 10px; margin: 18px 0 6px; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ghost-outline { background: transparent; border: 1px solid var(--line); }
.ghost-outline:hover { background: var(--line); }
.card-head .row { flex-wrap: wrap; justify-content: flex-end; }
.notice-rec { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px;
  background: rgba(99,102,241,.12); color: inherit; font-size: 13px; margin: 10px 0; }
.my-meetings .item { padding: 8px 0; font-size: 14px; text-align: left; }
a { color: #6366f1; }
@media (prefers-color-scheme: dark) { a { color: #a5b4fc; } }
.divider::before, .divider::after { background: var(--muted); opacity: .35; }

/* протокол встречи */
.doc-title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; font-weight: 600; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-right: 6px; }
.seg button { border-radius: 0; padding: 6px 12px; background: transparent; font-size: 13px; font-weight: 600; }
.seg button.on { background: var(--primary); color: #fff; }

/* установка приложения */
ol.steps { padding-left: 20px; margin: 12px 0 16px; line-height: 1.6; }
ol.steps li { margin-bottom: 8px; }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-color: var(--primary); }
.banner-text { display: flex; flex-direction: column; gap: 4px; flex: 1 1 260px; }
.banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 600px) { .banner-actions, .banner-actions button { width: 100%; } }
label.check { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; font-weight: normal; }
label.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--primary); }
label.check .muted { font-size: 13px; }
/* сотрудники: должность и доступ */
#users .item { flex-wrap: wrap; gap: 8px; }
#users .actions { flex-wrap: wrap; justify-content: flex-end; }
#users select { max-width: 240px; }
@media (max-width: 600px) { #users .actions { width: 100%; justify-content: flex-start; } #users select { max-width: none; flex: 1 1 100%; } }

/* протокол 2.0: поручения, хронология, вопросы */
.task { display: flex; align-items: flex-start; gap: 12px; }
.task .task-done { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--primary); cursor: pointer; }
.task .tick { flex: none; }
.task .task-body { flex: 1; min-width: 0; }
.task.done .title { text-decoration: line-through; color: var(--muted); }
.task .quote { font-size: 13px; color: var(--muted); margin-top: 4px; font-style: italic; }
.task .prio { margin-right: 4px; }
.overdue { color: #dc2626; font-weight: 600; } .due-today { color: #d97706; font-weight: 600; }
button.link { background: none; border: 0; padding: 0 2px; color: var(--primary); font: inherit; font-variant-numeric: tabular-nums; cursor: pointer; text-decoration: underline; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { font-size: 13px; padding: 4px 10px; border-radius: 99px; background: var(--line); border: 0; color: var(--text); cursor: pointer; }
.chip span { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 2px; }
.line.flash { animation: flash 2s ease; border-radius: 8px; }
@keyframes flash { 0%, 40% { background: rgba(99, 102, 241, .25); } 100% { background: transparent; } }
.ask form input { flex: 1; min-width: 0; }
.qa { border-top: 1px solid var(--line); padding: 10px 0; }
.qa .q { font-weight: 600; margin-bottom: 4px; }
.qa .a p { margin: 4px 0; }
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.type-grid button.on { border-color: var(--primary); color: var(--primary); }
#letter-text { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; }
#my-tasks .task, #tasks-list .task { padding: 10px 0; }
@media (max-width: 600px) { .type-grid { grid-template-columns: 1fr; } .ask form { flex-wrap: wrap; } .ask form button { width: 100%; } }
/* чат: кнопка «Отправить» — на телефоне Enter есть не всегда */
#chat-form { display: flex; gap: 6px; }
#chat-form input { flex: 1; min-width: 0; font-size: 16px; }
#chat-form button { flex: none; width: 44px; padding: 0; font-size: 18px; }

/* история протоколов */
.num { color: var(--primary); font-variant-numeric: tabular-nums; font-weight: 700; margin-right: 2px; }
.minutes-filter { margin: 8px 0 12px; flex-wrap: wrap; }
.minutes-filter input { flex: 1 1 240px; min-width: 0; }
.list .item.more { justify-content: center; color: var(--primary); }
.center { text-align: center; }

/* памятка «кому что сделать» */
.todo-group { margin-top: 12px; } .todo-group .who { font-weight: 600; margin-bottom: 2px; }
.todo-group.mine { background: rgba(99, 102, 241, .08); border-radius: 10px; padding: 8px 10px; margin-left: -10px; margin-right: -10px; }
.todo { padding: 6px 0; } .todo .title { font-weight: 500; }
.todo .quote { font-size: 13px; color: var(--muted); margin-top: 2px; font-style: italic; }

/* коллеги: кто в звонке */
.group-head { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 12px 0 2px; font-weight: 600; }
.group-head:first-child { margin-top: 0; }
.dot.live { background: #ef4444; }
/* просьбы войти в звонок */
.knocks { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100% - 32px)); }
.knock { background: var(--card); color: var(--text); border: 1px solid var(--primary); border-radius: 14px; padding: 12px 14px; box-shadow: 0 8px 30px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 10px; }
.knock .row { justify-content: flex-end; }
.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; vertical-align: -1px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* «постучаться» */
.knock-head { display: flex; gap: 12px; align-items: center; }
.knock .door, .door-wait .door { font-size: 34px; display: inline-block; animation: knock 1.2s ease-in-out infinite; transform-origin: 50% 100%; }
.door-wait { text-align: center; } .door-wait .door { font-size: 64px; margin-bottom: 6px; }
@keyframes knock { 0%, 40%, 100% { transform: rotate(0); } 8%, 24% { transform: rotate(-8deg); } 16%, 32% { transform: rotate(5deg); } }

.vip-toggle { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; white-space: nowrap; cursor: pointer; }
.vip-toggle input { accent-color: #f59e0b; width: 16px; height: 16px; }

/* подрядчик: только приглашения в звонки */
body.contractor #my-tasks-card, body.contractor #meetings-card, body.contractor a[href="#/minutes"] { display: none !important; }

/* мастер «как телефон» */
.setup-step { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.setup-n { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.setup-step.done .setup-n { background: #16a34a; }
.setup-step.done b { color: var(--muted); }
.warn { color: #d97706; }

/* подсказка о ролях — строка на роль */
.roles-hint { margin-top: 14px; font-size: 13px; color: var(--muted); }
.roles-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; margin-bottom: 6px; }
.role-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); line-height: 1.4; }
.role-row:last-child { border-bottom: 0; }
.role-name { color: var(--text); font-weight: 600; white-space: nowrap; }
.roles-sep { height: 8px; }
@media (max-width: 600px) { .role-row { grid-template-columns: 1fr; gap: 2px; } }

.rules-note { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); }
.rules-note a, .small-note a { color: inherit; text-decoration: underline; }

/* должности */
.pos-row { align-items: center; padding: 6px 0; }
.pos-row .actions { flex-wrap: wrap; gap: 4px; }
.pos-add { margin-top: 10px; flex-wrap: wrap; align-items: center; }
.pos-add input[name=name] { flex: 1 1 220px; min-width: 0; }

/* пароль сотрудника + приглашение */
.pw-gen { display: flex; gap: 6px; } .pw-gen input { flex: 1; min-width: 0; }
#invite-text { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; line-height: 1.5; margin: 8px 0 12px; }

.pos-input { width: 170px; max-width: 100%; }
@media (max-width: 600px) { .pos-input { width: 100%; } }

/* расшифровка — под кнопкой */
details.transcript > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 600; font-size: 16px; }
details.transcript > summary::-webkit-details-marker { display: none; }
details.transcript > summary::after { content: "▾"; color: var(--muted); }
details.transcript[open] > summary { margin-bottom: 10px; }
details.transcript[open] > summary::after { content: "▴"; }
