/* Eeerk Consulting — тёмная тема в духе мобильного планировщика задач:
   графитовый фон, крупные цветные заголовки разделов (Oswald), простой список задач без рамок
   с квадратными галочками, цифры в круглых значках, круглая кнопка «+» в углу. Раскладка — одобренная CRM. */

:root {
  --bg: #1c1d23; --side: #16171c; --panel: #23242b; --raised: #2a2b33; --input: #1f2026;
  --text: #e8e8ec; --muted: #a3a4ae; --light: #74768287; --faint: #5d5f6a;
  --line: #2a2b33; --line-strong: #383944; --hover: rgba(255, 255, 255, .04); --active: rgba(255, 255, 255, .08);
  --check: #6d63c9;                         /* обводка галочки, как на образце */
  --today: #3fc1f5; --soon: #4f7cf6; --rest: #6b6e7b;   /* цвета заголовков разделов */
  --primary: #3b82f6; --primary-hover: #4f8ff7;
  --red: #f87171; --red-bg: rgba(248, 113, 113, .14);
  --orange: #fb923c; --orange-bg: rgba(251, 146, 60, .14);
  --yellow: #facc15; --yellow-bg: rgba(250, 204, 21, .12);
  --green: #4ade80; --green-bg: rgba(74, 222, 128, .12);
  --blue: #60a5fa; --blue-bg: rgba(96, 165, 250, .14);
  --gray: #a3a4ae; --gray-bg: #2f3039;
  --shadow: 0 16px 40px rgba(0, 0, 0, .45);
  --font: "Inter", ui-sans-serif, system-ui, "Segoe UI", Arial, sans-serif;
  --head: "Oswald", "Arial Narrow", "Inter", sans-serif;
  color-scheme: dark;
}
:root { --light: #767884; }
/* старые имена переменных, на которые ссылаются отдельные места */
:root { --border: var(--line); --border-strong: var(--line-strong); --accent: var(--primary); --surface: var(--panel); --surface-2: var(--raised); --paper: var(--panel); }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14.5px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: rgba(59, 130, 246, .4); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
i.ic, svg.lucide { width: 18px; height: 18px; flex-shrink: 0; }
.app { display: flex; min-height: 100vh; }

/* ---------- Меню ---------- */
.sidebar {
  width: 236px; flex-shrink: 0; background: var(--side); position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; overflow-y: auto; padding: 14px 10px; border-right: 1px solid var(--line);
}
.ws { display: flex; align-items: center; gap: 10px; }
.ws-me { width: 100%; padding: 8px; margin-bottom: 10px; border: 0; border-radius: 10px; background: none; cursor: pointer; text-align: left; }
.ws-me:hover { background: var(--hover); }
.ws-me .ava { width: 32px; height: 32px; }
.ws-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.ws-text b { font-weight: 700; font-size: 14.5px; }
.ws-sub, .ws-me .ws-sub { font-size: 12px; color: var(--light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-logo { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #3b82f6, #22c5f0); color: #fff; display: grid; place-items: center; font-weight: 700; }
.nav-sec { padding: 16px 10px 6px; font: 600 12px/1 var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; margin: 1px 0; border: 0; border-radius: 8px;
  background: none; text-align: left; cursor: pointer; color: var(--muted);
}
.nav-item svg, .nav-item .ic { color: var(--light); }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item.on { background: var(--active); color: var(--text); font-weight: 500; }
.nav-item.on svg { color: var(--today); }
.nav-item .nl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .cnt { font-size: 12px; color: var(--light); }
.nav-item .cnt.red { min-width: 22px; padding: 0 7px; border-radius: 11px; background: var(--gray-bg); color: var(--text); text-align: center; line-height: 22px; }
.side-foot { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
.side-toggle { border: 0; background: none; width: 100%; text-align: left; cursor: pointer; }
.side-toggle:hover { color: var(--text); }
.mark { display: inline-block; width: 7px; height: 7px; border-radius: 50%; font-size: 0; flex-shrink: 0; }
.mark.red { background: var(--red); }
.mark.yellow { background: var(--yellow); }
.new-badge { margin-left: 4px; padding: 0 6px; border-radius: 6px; background: var(--green-bg); color: var(--green); font-size: 10.5px; font-weight: 600; line-height: 18px; }

/* ---------- Шапка ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 5; height: 60px; display: flex; align-items: center; gap: 10px; padding: 0 28px; background: rgba(28, 29, 35, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.burger { display: none; border: 0; background: none; font-size: 22px; padding: 4px 8px; cursor: pointer; color: var(--muted); }
.crumbs { display: flex; gap: 6px; min-width: 0; color: var(--light); white-space: nowrap; overflow: hidden; }
.crumbs span:last-child { color: var(--text); font-weight: 500; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: none; cursor: pointer; font-size: 13.5px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.chip svg { color: var(--light); }
.chip:hover { background: var(--hover); color: var(--text); }
.chip.shifted { color: var(--yellow); background: var(--yellow-bg); border-color: transparent; }
.me-btn { display: none; border: 0; background: none; padding: 0; cursor: pointer; }
.demo-badge { display: none; }
.role-select { border: 1px solid var(--line-strong); border-radius: 8px; padding: 4px 8px; background: var(--input); }

/* ---------- Страница ---------- */
.page { width: 100%; max-width: 920px; margin: 0 auto; padding: 20px 28px 140px; }
.cover, .page-icon { display: none; }
.page-icon:has(.ava-xl) { display: block; margin-bottom: 12px; }
.title-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
h1.title { flex: 0 1 auto; min-width: 0; margin: 0; font: 600 30px/1.2 var(--head); letter-spacing: .02em; text-transform: uppercase; }
.title-actions { display: flex; align-items: center; gap: 8px; flex: 1; }
p { margin: 4px 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sort-hint { display: none; }
hr.div { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
h3 { font-size: 15px; font-weight: 600; margin: 18px 0 8px; }

/* Цифры — круглые значки, как на образце */
.pill-row { display: flex; flex-wrap: wrap; gap: 22px; margin: 20px 0 8px; }
.stat { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 104px; padding: 0; background: none; border: 0; text-align: center; }
.stat .sv {
  width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center;
  font: 600 26px var(--head); color: #fff; background: var(--raised); box-shadow: inset 0 0 0 3px var(--line-strong);
}
.stat:nth-child(1) .sv { background: linear-gradient(135deg, #22c5f0, #3b82f6); box-shadow: none; }
.stat:nth-child(2) .sv { background: linear-gradient(135deg, #34d399, #0ea5a5); box-shadow: none; }
.stat:nth-child(3) .sv { background: linear-gradient(135deg, #fb7185, #f97316); box-shadow: none; }
.stat .sl { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
button.stat { cursor: pointer; color: var(--text); }

/* Заголовки разделов — крупные, цветные */
h2 { display: flex; align-items: center; gap: 12px; margin: 34px 0 8px; font: 600 30px/1.1 var(--head); letter-spacing: .01em; text-transform: uppercase; color: var(--rest); }
.page h2:nth-of-type(1) { color: var(--today); }
.page h2:nth-of-type(2) { color: var(--soon); }
h2 .n { padding: 2px 10px; border-radius: 10px; background: var(--gray-bg); color: var(--muted); font: 500 13px/1.4 var(--font); letter-spacing: 0; text-transform: none; }

/* Задачи — простой список */
.page > .todo, .page > .row, .page > details.task-card:not(.setup-card), .page > .empty, .page > .inwork-h { margin: 0; padding: 12px 4px; }
.page > .todo:hover, .page > .row:hover, .page > details.task-card:not(.setup-card):hover { background: var(--hover); border-radius: 10px; }
.page > .todo.done .tt, .page > .row:has(> .tb s) .tb { color: var(--faint); }
.inwork-h { display: flex; gap: 8px; align-items: center; font: 600 15px var(--head); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.page > .inwork-h { padding: 14px 4px 4px; }
.inwork-h .n { color: var(--faint); }
.empty { color: var(--faint); }

/* Свойства клиента */
.props { display: grid; grid-template-columns: 210px 1fr; margin: 16px 0 8px; padding: 6px 18px; background: var(--panel); border-radius: 14px; }
.props .k, .props .v { padding: 11px 0; border-bottom: 1px solid var(--line); }
.props .k { color: var(--light); }
.props .k:nth-last-child(2), .props .v:last-child { border-bottom: 0; }
.props .v { min-width: 0; }
.lock { font-size: 12px; color: var(--light); }
.socials { display: flex; flex-wrap: wrap; gap: 14px; margin: 6px 0; }
.social { color: var(--blue); text-decoration: none; }
.soc-line { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.soc-line .socials { margin: 0; }

/* Подсказки */
.callout { display: flex; gap: 10px; margin: 14px 0; padding: 12px 16px; background: var(--panel); border-radius: 12px; color: var(--muted); }
.callout .ci { display: none; }
.callout.red { background: var(--red-bg); color: var(--red); }
.callout.yellow { background: var(--yellow-bg); color: var(--yellow); }
.callout.green { background: var(--green-bg); color: var(--green); }
.callout.blue { background: var(--blue-bg); color: var(--blue); }

/* Метки */
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; color: var(--gray); background: var(--gray-bg); }
.t-gray { color: var(--gray); background: var(--gray-bg); }
.t-brown, .t-orange { color: var(--orange); background: var(--orange-bg); }
.t-yellow { color: var(--yellow); background: var(--yellow-bg); }
.t-green { color: var(--green); background: var(--green-bg); }
.t-blue, .t-purple { color: var(--blue); background: var(--blue-bg); }
.t-red { color: var(--red); background: var(--red-bg); }

/* ---------- Строки ---------- */
.todo, .row { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 14px; padding: 8px 0; }
.row .ri { display: none; }
.tb { flex: 1 1 300px; min-width: 0; }
.tt { font-size: 16px; font-weight: 400; color: var(--text); }
.row .tb > div:first-child { font-size: 16px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; font-size: 13px; color: var(--light); }
.ta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }
.fix { margin-top: 8px; padding: 10px 12px; background: var(--red-bg); color: var(--red); border-radius: 10px; }

.cb {
  flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px; padding: 0; position: relative; cursor: pointer;
  border: 2px solid var(--check); border-radius: 5px; background: none; transition: background .12s, border-color .12s;
}
.cb:hover:not(:disabled) { background: rgba(109, 99, 201, .15); }
.cb.on { background: var(--check); border-color: var(--check); }
.cb.on::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.cb.part::after { content: ""; position: absolute; left: 4px; right: 4px; top: 50%; height: 2px; margin-top: -1px; background: var(--check); }
.cb:disabled { opacity: .4; cursor: not-allowed; }
.todo.done .tt, .shoot-title.done { color: var(--faint); text-decoration: line-through; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel); color: var(--text);
  font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background .12s;
}
.btn:hover { background: var(--raised); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.green { color: var(--green); }
.btn.red { color: var(--red); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.small-btn { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
/* «+ Задание» — круглая плавающая кнопка в углу */
.btn.add-task {
  position: fixed; right: 32px; bottom: 32px; z-index: 15; width: 60px; height: 60px; padding: 0; border: 0; border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #22c5f0); color: #fff; font-size: 0; box-shadow: 0 10px 24px rgba(34, 140, 240, .35);
}
.btn.add-task::before, .btn.add-task::after { content: ""; position: absolute; left: 50%; top: 50%; width: 22px; height: 2.5px; border-radius: 2px; background: #fff; transform: translate(-50%, -50%); }
.btn.add-task::after { transform: translate(-50%, -50%) rotate(90deg); }
.btn.add-task:hover { filter: brightness(1.08); }
.icon-btn { border: 0; background: none; height: 26px; padding: 0 8px; border-radius: 6px; color: var(--light); font-size: 12.5px; cursor: pointer; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.link { background: none; border: 0; padding: 0; cursor: pointer; color: var(--blue); font-size: inherit; text-decoration: none; }
.link:hover { text-decoration: underline; }
.link.off { color: var(--faint); }

/* ---------- Раскрывашки ---------- */
details.toggle > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 0; }
details.toggle > summary::-webkit-details-marker { display: none; }
details.toggle > summary::before { content: ""; width: 6px; height: 6px; margin: 0 4px; border: solid var(--light); border-width: 0 2px 2px 0; transform: rotate(-45deg); transition: transform .15s; flex-shrink: 0; }
details.toggle[open] > summary::before { transform: rotate(45deg); }
details.toggle > .inner { padding: 0 0 10px 22px; }
.page > details.toggle:not(.task-card) { margin: 14px 0 0; padding: 4px 16px; background: var(--panel); border-radius: 12px; }
details.task-card > summary { gap: 14px; }
details.task-card > summary .cb { order: -1; margin-top: 0; }
details.task-card:not(.setup-card) > summary { padding: 0; font-size: 16px; }
details.task-card:not(.setup-card) > summary::before { order: 1; }
details.task-card:not(.setup-card) > .inner { padding: 12px 0 0 36px; }
.bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }

/* ---------- Таблицы ---------- */
.db-wrap { overflow-x: auto; margin: 10px 0 18px; background: var(--panel); border-radius: 12px; }
table.db { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 13.5px; }
table.db th { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line-strong); font-weight: 500; color: var(--light); white-space: nowrap; }
table.db td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.db tr:last-child td { border-bottom: 0; }
table.db tr:hover td { background: var(--hover); }
.db-views { display: none; }

/* ---------- Поля ---------- */
table.db input, table.db select, .field input, .field select, .field textarea, .copy-row input, .sd-input, .plan-input,
.row .ta input[type="date"], .filters input[type="date"], .dd > summary {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--input);
}
.field textarea { height: auto; padding: 10px 12px; }
.sd-input, .plan-input, .row .ta input[type="date"], .filters input[type="date"] { width: auto; height: 34px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary) !important; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--check); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin: 14px 0; }
.form > * { min-width: 0; }
.form > .full, .field.full, .check.full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 500; color: var(--light); }
.field input[type="file"] { height: auto; padding: 7px 10px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.check.who { color: var(--text); }
.level-pick { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 0; }
.who-list { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.who-group { font-size: 12px; color: var(--light); }
.fscope[data-dirty] .save-btn::after { content: " •"; }

/* Выпадающий список «Кому» */
.dd { position: relative; }
.dd > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.dd > summary::-webkit-details-marker { display: none; }
.dd-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-arrow { color: var(--light); }
.dd-panel { margin-top: 6px; max-height: 260px; overflow-y: auto; background: var(--raised); border: 1px solid var(--line-strong); border-radius: 12px; padding: 6px; box-shadow: var(--shadow); }
.dd-group { padding: 8px 8px 4px; font: 600 12px var(--head); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.dd-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; cursor: pointer; }
.dd-item:hover { background: var(--hover); }
.field .dd-item { flex-direction: row; color: var(--text); }
.field .dd-item input[type="checkbox"] { width: 16px; height: 16px; flex: none; margin: 0; }

/* Галерея резерва */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 14px 0; }
.g-card { background: var(--panel); border-radius: 12px; overflow: hidden; }
.g-thumb { aspect-ratio: 9 / 12; background: var(--raised); }
.g-body { padding: 10px 12px; }

/* ---------- Окна ---------- */
.modal-wrap, .confirm-wrap { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .6); }
.confirm-wrap { z-index: 80; }
.modal-wrap[hidden], .confirm-wrap[hidden] { display: none; }
.modal { width: min(560px, 100%); max-height: 88vh; overflow: auto; overflow-x: hidden; padding: 24px; background: var(--panel); border-radius: 18px; box-shadow: var(--shadow); }
.modal h3 { margin: 0 0 8px; font: 600 22px var(--head); text-transform: uppercase; letter-spacing: .02em; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.modal .row { border-bottom: 1px solid var(--line); }
.confirm-box { width: min(420px, 100%); }
.confirm-box .modal-foot { flex-wrap: wrap; }
.modal-wrap, .confirm-wrap { animation: fadein .15s ease-out; }
@keyframes fadein { from { opacity: 0; } }

/* Всплывающие уведомления */
.toasts { position: fixed; right: 24px; top: 72px; z-index: 60; display: flex; flex-direction: column; gap: 10px; }
.toast { max-width: 340px; padding: 12px 16px; background: var(--raised); border-radius: 14px; color: var(--muted); box-shadow: var(--shadow); animation: fadein .15s ease-out; }
.toast b { display: block; margin-bottom: 2px; color: var(--text); font-weight: 600; }

/* Аватарки */
.ava { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; display: inline-grid; place-items: center; }
.ava-letter { background: linear-gradient(135deg, #3b82f6, #22c5f0); color: #fff; font-size: 12px; font-weight: 700; }
.ava-xl { width: 76px; height: 76px; font-size: 28px; }

/* Колокольчик */
.bell { position: relative; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.bell:hover { color: var(--text); }
.bell.ring { color: #fff; background: linear-gradient(135deg, #fb7185, #f97316); border-color: transparent; }
.bell-n { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #f43f5e; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 18px; text-align: center; }

/* Календарь в шапке */
.cal-wrap { position: relative; }
.today-btn { height: 36px; }
.today-btn:not(:disabled) { background: var(--primary); color: #fff; border-color: var(--primary); }
.today-btn:disabled { opacity: .4; }
.cal-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 45; width: 290px; padding: 14px; background: var(--raised); border-radius: 16px; box-shadow: var(--shadow); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head b { font: 600 16px var(--head); text-transform: uppercase; letter-spacing: .04em; }
.cal-nav { width: 30px; height: 30px; border: 1px solid var(--line-strong); border-radius: 50%; background: none; cursor: pointer; color: var(--muted); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow span { text-align: center; padding: 4px 0; font-size: 11px; color: var(--faint); }
.cal-d { height: 34px; border: 0; border-radius: 50%; background: none; cursor: pointer; color: var(--text); }
.cal-d:hover { background: var(--hover); }
.cal-d.we { color: var(--light); }
.cal-d.real { color: var(--today); font-weight: 700; }
.cal-d.sel { background: var(--primary); color: #fff; }
.cal-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-strong); font-size: 12.5px; color: var(--light); }

/* Перетаскивание заданий */
.drag-h { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; min-height: 26px; margin: -2px 0 -2px -8px; color: var(--line-strong); cursor: grab; touch-action: none; user-select: none; }
.drag-h:hover { color: var(--muted); }
.dragging { background: var(--panel) !important; border-radius: 10px; }

/* ---------- Вход ---------- */
.login { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: var(--bg); }
.login[hidden] { display: none; }
.login-card { width: min(380px, 100%); padding: 28px; background: var(--panel); border-radius: 20px; }
.login-card .ws-logo { width: 46px; height: 46px; margin-bottom: 18px; font-size: 20px; }
.login-card h1 { margin: 0 0 6px; font: 600 30px var(--head); text-transform: uppercase; }
.login-card .field { margin-top: 14px; }
.login-card .btn { width: 100%; height: 42px; margin-top: 18px; }
.err { min-height: 20px; margin-top: 10px; color: var(--red); }
.copy-row { display: flex; gap: 6px; margin: 4px 0 12px; }
.copy-row input { flex: 1; font-size: 12.5px; }
.dev-bar { font-size: 12px; color: var(--light); }
.demo-roles { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.demo-role { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-radius: 12px; background: var(--raised); text-align: left; cursor: pointer; }
.demo-role:hover { background: var(--line-strong); }
.demo-role > span:last-child { display: flex; flex-direction: column; }
.dr-ic { display: none; }

.scrim, .tabbar { display: none; }

/* ---------- Телефон ---------- */
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 40; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .scrim.open { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .55); }
  .burger { display: inline-block; }
  .burger.hide-tabbed { display: none; }
  .me-btn { display: inline-block; }
  .crumbs .hide-m, .today-btn .hide-m { display: none; }
  .topbar { height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(22, 23, 28, .96); border-top: 1px solid var(--line); padding: 0 0 env(safe-area-inset-bottom); }
  .tab { flex: 1; position: relative; padding: 14px 2px; border: 0; background: none; color: var(--light); font-size: 12px; cursor: pointer; }
  .tab .ti { display: none; }
  .tab.on { color: var(--today); font-weight: 600; }
  .tab .badge { margin-left: 4px; padding: 0 6px; border-radius: 8px; background: var(--gray-bg); color: var(--text); font-size: 10.5px; }
  .page { padding: 12px 16px calc(150px + env(safe-area-inset-bottom)); }
  h1.title { font-size: 26px; }
  h2 { font-size: 30px; margin-top: 28px; }
  .pill-row { gap: 14px; }
  .stat { width: 86px; }
  .stat .sv { width: 68px; height: 68px; font-size: 22px; }
  .props { grid-template-columns: 110px 1fr; padding: 4px 14px; }
  .ta { width: 100%; margin-left: 0; }
  .todo .ta { padding-left: 36px; }
  .btn { height: 40px; }
  .btn.small-btn { height: 32px; }
  .btn.add-task { right: 18px; bottom: calc(70px + env(safe-area-inset-bottom)); }
  input, select, textarea { font-size: 16px !important; }
  .form { grid-template-columns: 1fr; }
  .modal-wrap { place-items: end stretch; padding: 0; }
  .modal { width: 100%; max-height: 90vh; border-radius: 20px 20px 0 0; padding: 22px 16px calc(20px + env(safe-area-inset-bottom)); }
  .modal-foot { flex-wrap: wrap; }
  .modal-foot .btn { flex: 1 1 auto; }
  .toasts { top: auto; bottom: calc(140px + env(safe-area-inset-bottom)); left: 12px; right: 12px; }
  .toast { max-width: none; }
  .cal-pop { position: fixed; left: 12px; right: 12px; top: calc(62px + env(safe-area-inset-top)); width: auto; }
  .cal-d { height: 40px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
/* Галочка «показать информацию» рядом с названием кабинета и ссылка на Google Диск */
.title-links { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; }
.info-toggle { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--light); font-size: 14px; cursor: pointer; transition: transform .15s; }
.info-toggle.open { transform: rotate(180deg); }
.info-toggle:hover { color: inherit; }
