/* Панель «Протоколы встреч». Чертёжный стиль: бумага с сеткой, чернильные линии, сигнальный оранжевый,
   Unbounded в заголовках, IBM Plex в тексте и подписях, карандашные пометки Caveat. Шрифты лежат рядом, без внешних сайтов. */

@font-face { font-family: 'Unbounded'; font-weight: 200 900; font-display: swap; src: url('fonts/unb-var-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-weight: 200 900; font-display: swap; src: url('fonts/unb-var-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 100 700; font-display: swap; src: url('fonts/plexsans-var-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 100 700; font-display: swap; src: url('fonts/plexsans-var-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: swap; src: url('fonts/plexmono-400-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: swap; src: url('fonts/plexmono-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-display: swap; src: url('fonts/plexmono-500-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-display: swap; src: url('fonts/plexmono-500-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: 'Caveat'; font-weight: 400 700; font-display: swap; src: url('fonts/caveat-var-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Caveat'; font-weight: 400 700; font-display: swap; src: url('fonts/caveat-var-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }

:root {
  color-scheme: light;
  --bg: #F7F6F1; --panel: #FDFCF8; --panel-2: #F0EEE6;
  --ink: #12161F; --muted: #4E5566; --faint: #6F7586;
  --acc: #E04B18; --acc-fill: #C8400F; --acc-soft: rgba(224, 75, 24, .09); --on-acc: #FFFFFF;
  --line: rgba(18, 22, 31, .55); --line-b: rgba(18, 22, 31, .16); --line-2: rgba(18, 22, 31, .09);
  --grid: rgba(18, 22, 31, .04); --grid-2: rgba(18, 22, 31, .075);
  --hard: #12161F; --pencil: rgba(54, 60, 78, .78);
  --ok: #1B7F54; --ok-soft: rgba(27, 127, 84, .10); --danger: #C23535; --danger-soft: rgba(194, 53, 53, .09);
  --ff-d: 'Unbounded', system-ui, sans-serif;
  --ff-b: 'IBM Plex Sans', -apple-system, 'Segoe UI', sans-serif;
  --ff-m: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  --ff-p: 'Caveat', cursive;
  --ease: cubic-bezier(.22, .7, .25, 1);
  --rail: 256px;
  /* ряды графиков: проверены скриптом на различимость на светлой и тёмной поверхности */
  --v1: #2a78d6; --v2: #eb6834; --v3: #1baf7a; --v4: #eda100; --v5: #e87ba4; --v6: #008300; --v7: #6250d6; --v8: #e34948;
}
html[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0B0D13; --panel: #10141D; --panel-2: #151A26;
  --ink: #EAEDF5; --muted: #9AA1B5; --faint: #7C8399;
  --acc: #FF6A3D; --acc-fill: #FF6A3D; --acc-soft: rgba(255, 106, 61, .11); --on-acc: #14100E;
  --line: rgba(234, 237, 245, .6); --line-b: rgba(234, 237, 245, .17); --line-2: rgba(234, 237, 245, .09);
  --grid: rgba(234, 237, 245, .035); --grid-2: rgba(234, 237, 245, .065);
  --hard: #FF6A3D; --pencil: rgba(198, 205, 224, .62);
  --ok: #4CC38A; --ok-soft: rgba(76, 195, 138, .12); --danger: #F07474; --danger-soft: rgba(240, 116, 116, .12);
  --v1: #3987e5; --v2: #d95926; --v3: #199e70; --v4: #c98500; --v5: #d55181; --v6: #008300; --v7: #9085e9; --v8: #e66767;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font: 400 15.5px/1.6 var(--ff-b); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums; transition: background .4s var(--ease), color .4s var(--ease); }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid-2) 1px, transparent 1px), linear-gradient(90deg, var(--grid-2) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px; }
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--acc); color: #fff; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
svg.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.oico { display: inline-block; width: 1em; height: 1em; flex: none; vertical-align: -.12em; }
.oico .oc { fill: none; stroke: currentColor; stroke-width: 1.8; } .oico .ot { stroke: currentColor; stroke-width: 1.8; } .oico .od { fill: var(--acc); }
.mono, .label { font-family: var(--ff-m); font-size: 11.5px; font-weight: 500; letter-spacing: .13em; text-transform: uppercase; }
.muted { color: var(--muted); } .small { font-size: 13.5px; } .nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* карандашная пометка: «пишется» слева направо */
.note { font-family: var(--ff-p); font-weight: 500; font-size: 22px; line-height: 1.2; color: var(--pencil); }
.note .nw { display: inline-block; clip-path: inset(-20% 103% -20% 0); animation: write 1.3s ease .35s forwards; }
@keyframes write { to { clip-path: inset(-20% -8% -20% 0); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.6); opacity: .3; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flow { to { background-position: 28px 0; } }
@keyframes drawline { from { transform: scaleX(0); } }
@keyframes growx { from { transform: scaleX(0); } }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- каркас */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 26px 18px 18px; background: var(--panel);
  border-right: 1.5px solid var(--ink); }
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 30px; }
.brand .oico { font-size: 30px; color: var(--ink); }
.brand b { display: block; font-family: var(--ff-d); font-weight: 600; font-size: 13.5px; letter-spacing: .1em; text-transform: uppercase; line-height: 1.25; }
.brand small { display: block; font-family: var(--ff-m); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-top: 3px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; color: var(--muted);
  font-family: var(--ff-m); font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; transition: color .2s, background .2s; }
.nav a::before { content: ''; position: absolute; left: 0; top: 9px; bottom: 9px; width: 2px; background: var(--acc); transform: scaleY(0); transition: transform .25s var(--ease); }
.nav a:hover { color: var(--ink); background: var(--panel-2); }
.nav a[aria-current='page'] { color: var(--acc); background: var(--acc-soft); }
.nav a[aria-current='page']::before { transform: scaleY(1); }
.nav .count { margin-left: auto; min-width: 22px; padding: 1px 6px; background: var(--acc-fill); color: var(--on-acc); font-size: 11px; letter-spacing: 0; text-align: center; }
.rail-foot { margin-top: auto; display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line-b); }
.rail-tools { display: flex; gap: 6px; }
.me { display: flex; align-items: center; gap: 10px; padding: 4px 4px 0; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; flex: none; border: 1.5px solid var(--ink); font-family: var(--ff-m); font-weight: 500; font-size: 11px; }
.me b { display: block; font-weight: 600; line-height: 1.2; } .me span { font-family: var(--ff-m); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.me .btn { margin-left: auto; }
.sign { font-family: var(--ff-p); font-size: 19px; color: var(--pencil); padding: 2px 6px 0; transform: rotate(-2deg); transform-origin: left; white-space: nowrap; }
.sign .oico { font-size: .8em; }

.main { min-width: 0; padding: 34px 56px 96px; }
.wrap { max-width: 1240px; margin: 0 auto; }
.topbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; min-height: 42px; }
.topbar .me-top { display: none; }

/* заголовок экрана: «лист чертежа» */
.page-head { position: relative; display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap; padding-top: 44px; margin-bottom: 34px; }
.page-head::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--ink); transform-origin: left; animation: drawline 1s var(--ease) both; }
.page-head .sh { position: absolute; top: 12px; left: 0; display: flex; gap: 20px; font-family: var(--ff-m); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.page-head .sh-l { color: var(--acc); } .page-head .sh-r { color: var(--faint); }
.page-head h1 { font-family: var(--ff-d); font-weight: 500; font-size: clamp(26px, 3vw, 38px); line-height: 1.12; letter-spacing: -.005em; text-wrap: balance; }
.page-head .sub { color: var(--muted); margin-top: 10px; max-width: 62ch; }
.page-head .tools { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.page-head .tools select.input { max-width: 240px; }
#view > * { animation: rise .7s var(--ease) both; }
#view > *:nth-child(2) { animation-delay: .06s; } #view > *:nth-child(3) { animation-delay: .12s; } #view > *:nth-child(4) { animation-delay: .18s; } #view > *:nth-child(n+5) { animation-delay: .24s; }

.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border: 1.5px solid var(--acc); background: var(--acc-soft); margin-bottom: 20px; }
.banner svg { color: var(--acc); margin-top: 3px; }
.banner.err { border-color: var(--danger); background: var(--danger-soft); } .banner.err svg { color: var(--danger); }

/* ---------- кнопки и поля */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 42px; padding: 0 18px; border: 1.5px solid var(--ink);
  background: var(--panel); color: var(--ink); font-family: var(--ff-m); font-size: 11.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  cursor: pointer; white-space: nowrap; transition: transform .22s var(--ease), box-shadow .22s var(--ease), background .2s, color .2s, border-color .2s; }
.btn:hover:not(:disabled) { transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--hard); }
.btn:active:not(:disabled) { transform: none; box-shadow: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary, .btn-sun { background: var(--acc-fill); border-color: var(--acc-fill); color: var(--on-acc); }
.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover:not(:disabled) { transform: none; box-shadow: none; color: var(--acc); border-color: var(--line-b); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 10.5px; gap: 8px; }
.btn-icon { width: 42px; padding: 0; } .btn-sm.btn-icon { width: 34px; }
.spin { width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; flex: none; }
.help-btn { flex: 1; justify-content: flex-start; padding: 0 10px; } .help-btn.btn-icon { flex: none; justify-content: center; padding: 0; }

.seg { display: inline-flex; border: 1.5px solid var(--ink); background: var(--panel); }
.seg button { min-height: 40px; padding: 0 18px; border: 0; background: transparent; color: var(--muted); font-family: var(--ff-m); font-size: 11.5px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; cursor: pointer; transition: background .25s var(--ease), color .2s; }
.seg button + button { border-left: 1px solid var(--line-b); }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed='true'] { background: var(--ink); color: var(--bg); }

.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field > label, .field > .label { font-family: var(--ff-m); font-size: 11px; font-weight: 500; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.field .hint { font-size: 13px; color: var(--faint); } .field .error { font-size: 13px; color: var(--danger); }
.input, select.input, textarea.input { width: 100%; min-height: 42px; padding: 8px 12px; border: 1.5px solid var(--line-b); border-radius: 0; background: var(--panel);
  transition: border-color .2s, box-shadow .2s; }
.input:hover { border-color: var(--line); }
.input:focus { outline: none; border-color: var(--ink); box-shadow: 4px 4px 0 var(--acc-soft); }
textarea.input { resize: vertical; line-height: 1.6; }
.search { position: relative; } .search .input { padding-left: 40px; min-width: 270px; } .search svg { position: absolute; left: 13px; top: 12px; color: var(--faint); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .grow { flex: 1 1 auto; min-width: 0; }
.check { display: flex; gap: 10px; align-items: center; min-height: 34px; cursor: pointer; } .check input { width: 17px; height: 17px; accent-color: var(--acc); }

.chip { display: inline-flex; align-items: center; gap: 8px; font-family: var(--ff-m); font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap; }
.chip::before { content: ''; width: 7px; height: 7px; background: currentColor; flex: none; }
.chip.new { color: var(--acc); } .chip.ready, .chip.sent { color: var(--ok); } .chip.failed { color: var(--danger); } .chip.plain { color: var(--faint); }
.chip.run, .chip.queued { color: var(--ink); } .chip.run::before { background: var(--acc); border-radius: 50%; animation: pulse 1.4s ease-in-out infinite; }

.card { background: var(--panel); border: 1.5px solid var(--line-b); }
.card-pad { padding: 26px 28px; }
.card h2, .side h2 { font-family: var(--ff-m); font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.empty { padding: 64px 24px; text-align: center; color: var(--muted); border: 1.5px dashed var(--line); background: var(--panel); }
.empty b { display: block; font-family: var(--ff-d); font-weight: 500; font-size: 20px; color: var(--ink); margin-bottom: 8px; }
.empty .note { display: block; margin-top: 14px; }
.skeleton { height: 78px; margin-bottom: 10px; border: 1.5px solid var(--line-2); background: linear-gradient(90deg, var(--panel) 0%, var(--panel-2) 50%, var(--panel) 100%);
  background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.bar { height: 6px; background: var(--line-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background-color: var(--acc);
  background-image: repeating-linear-gradient(90deg, transparent 0 8px, rgba(255, 255, 255, .35) 8px 14px); background-size: 28px 100%; animation: flow .9s linear infinite; transition: width .7s var(--ease); }

/* ---------- журнал встреч */
.month { display: flex; align-items: center; gap: 14px; margin: 44px 0 14px; font-family: var(--ff-m); font-size: 11.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.month::after { content: ''; flex: 1; height: 1px; background: var(--line-b); }
.month:first-of-type { margin-top: 26px; }
.ledger { background: var(--panel); border: 1.5px solid var(--line-b); border-top: 1.5px solid var(--ink); }
.day { position: relative; display: grid; grid-template-columns: 124px minmax(0, 1fr) auto auto; gap: 24px; align-items: center; padding: 22px 28px; border-top: 1px solid var(--line-2);
  cursor: pointer; transition: background .25s var(--ease), padding-left .25s var(--ease); animation: rise .55s var(--ease) both; }
.day:first-child { border-top: 0; }
.day:nth-child(2) { animation-delay: .04s; } .day:nth-child(3) { animation-delay: .08s; } .day:nth-child(4) { animation-delay: .12s; } .day:nth-child(5) { animation-delay: .16s; }
.day:nth-child(6) { animation-delay: .2s; } .day:nth-child(7) { animation-delay: .24s; } .day:nth-child(n+8) { animation-delay: .28s; }
.day::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--acc); transform: scaleY(0); transform-origin: top; transition: transform .3s var(--ease); }
.day:hover { background: var(--panel-2); padding-left: 34px; } .day:hover::before, .day.is-new::before { transform: scaleY(1); }
.day-date { display: flex; align-items: baseline; gap: 12px; }
.day-date b { font-family: var(--ff-d); font-weight: 500; font-size: 34px; line-height: 1; letter-spacing: -.01em; }
.day-date span { font-family: var(--ff-m); font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: var(--faint); }
.day-info b { font-weight: 600; font-size: 16px; } .day-info div { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.day-state { display: grid; justify-items: end; gap: 8px; min-width: 210px; } .day-state .bar { width: 210px; }
.day-act { min-width: 132px; display: flex; justify-content: flex-end; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters button { min-height: 34px; padding: 0 14px; border: 1.5px solid var(--line-b); background: transparent; color: var(--muted); cursor: pointer;
  font-family: var(--ff-m); font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; transition: .2s; }
.filters button:hover { border-color: var(--ink); color: var(--ink); }
.filters button[aria-pressed='true'] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.drop { outline: 2px dashed var(--acc); outline-offset: 8px; }

/* ---------- страница встречи */
.back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); margin-bottom: 22px; font-family: var(--ff-m); font-size: 11.5px; letter-spacing: .13em; text-transform: uppercase; transition: color .2s, gap .25s var(--ease); }
.back:hover { color: var(--acc); gap: 12px; }
.meet { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 36px; align-items: start; }
.sheet { position: relative; background: var(--panel); border: 1.5px solid var(--line-b); border-top: 1.5px solid var(--ink); padding: 52px 60px 64px; }
.sheet::before, .sheet::after { content: ''; position: absolute; width: 14px; height: 14px; border: 1.5px solid var(--acc); }
.sheet::before { top: 12px; right: 12px; border-left: 0; border-bottom: 0; } .sheet::after { bottom: 12px; left: 12px; border-right: 0; border-top: 0; }
.doc { max-width: 72ch; font-size: 16.5px; line-height: 1.72; }
.doc h1 { font-family: var(--ff-d); font-weight: 500; font-size: 26px; line-height: 1.22; margin-bottom: 18px; text-wrap: balance; }
.doc h2 { font-family: var(--ff-d); font-weight: 500; font-size: 17px; margin: 40px 0 14px; padding-top: 22px; border-top: 1.5px solid var(--ink); }
.doc h3 { font-size: 17px; font-weight: 600; margin: 26px 0 4px; }
.doc h4 { font-family: var(--ff-m); font-size: 11.5px; font-weight: 500; letter-spacing: .13em; text-transform: uppercase; color: var(--acc); margin: 22px 0 6px; }
.doc p { margin: 6px 0; } .doc p.meta { color: var(--muted); }
.doc ul, .doc ol { margin: 6px 0 12px; padding-left: 22px; } .doc li { margin: 8px 0; } .doc li::marker { color: var(--acc); }
.doc .tag { display: inline-block; margin-left: 8px; font-family: var(--ff-m); font-size: 11.5px; color: var(--faint); }
.doc .detail { margin: 3px 0 3px 16px; font-size: 14.5px; color: var(--muted); }
.editor { width: 100%; min-height: 62vh; font-size: 15px; }
.side { display: grid; gap: 20px; position: sticky; top: 24px; } .side .card { padding: 22px 24px; }
.steps { display: grid; gap: 8px; margin: 14px 0 2px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 14.5px; margin: 0; }
.kv dt { font-family: var(--ff-m); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding-top: 3px; } .kv dd { margin: 0; }
.rec { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-2); }
.rec:first-of-type { border-top: 0; }
.rec-name { font-weight: 600; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.rec audio { grid-column: 1 / -1; width: 100%; height: 38px; }
.voice { display: flex; height: 14px; gap: 2px; margin: 6px 0 14px; } .voice i { display: block; min-width: 3px; transform-origin: left; animation: growx .9s var(--ease) both; }
.who { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; font-size: 14px; padding: 4px 0; }
.who i { width: 10px; height: 10px; align-self: center; } .who span { color: var(--faint); font-size: 13px; }
.tasklist { display: grid; gap: 10px; } .tasklist .t { font-size: 14px; line-height: 1.45; } .tasklist .t span { color: var(--faint); }

/* ---------- таблицы, вкладки */
.table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1.5px solid var(--line-b); border-top: 1.5px solid var(--ink); }
.table th { text-align: left; font-family: var(--ff-m); font-size: 10.5px; font-weight: 500; letter-spacing: .13em; text-transform: uppercase; color: var(--faint);
  padding: 14px 18px; border-bottom: 1px solid var(--line-b); white-space: nowrap; }
.table th.sort { cursor: pointer; user-select: none; } .table th.sort:hover, .table th[aria-sort] { color: var(--ink); }
.table td { padding: 16px 18px; border-top: 1px solid var(--line-2); vertical-align: top; }
.table tr:first-child td { border-top: 0; }
.table tr.click { cursor: pointer; transition: background .2s; } .table tr.click:hover td, .table tr.on td { background: var(--panel-2); }
.table .num { color: var(--muted); white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.table.dense th, .table.dense td { padding: 13px 12px; } .table.dense td:first-child, .table.dense th:first-child { padding-left: 18px; }
.table .role { margin-left: 18px; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs { display: flex; gap: 6px; border-bottom: 1.5px solid var(--line-b); margin-bottom: 30px; overflow-x: auto; }
.tabs a { position: relative; padding: 14px 16px; color: var(--muted); font-family: var(--ff-m); font-size: 11.5px; font-weight: 500; letter-spacing: .13em; text-transform: uppercase; white-space: nowrap; transition: color .2s; }
.tabs a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1.5px; height: 2px; background: var(--acc); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.tabs a:hover { color: var(--ink); } .tabs a[aria-current='page'] { color: var(--acc); } .tabs a[aria-current='page']::after { transform: scaleX(1); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }

/* ---------- аналитика: плитки, графики, подсказка */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); border: 1.5px solid var(--line-b); border-top: 1.5px solid var(--ink); background: var(--panel); margin-bottom: 24px; }
.tile { padding: 24px 26px; border-left: 1px solid var(--line-2); } .tile:first-child { border-left: 0; }
.tile .label { color: var(--faint); display: block; margin-bottom: 10px; }
.tile b { display: block; font-family: var(--ff-d); font-weight: 500; font-size: 30px; line-height: 1.1; }
.tile span { display: block; color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.charts { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 24px; margin-bottom: 24px; align-items: start; }
.plot { position: relative; } .plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.plot text { font-family: var(--ff-m); font-size: 11px; fill: var(--faint); }
.plot .gridline { stroke: var(--line-2); stroke-width: 1; } .plot .axis { stroke: var(--line-b); stroke-width: 1; }
.plot .series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; transition: opacity .2s; }
.plot .dim { opacity: .16; } .plot .cross { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; }
.plot .dot { stroke: var(--panel); stroke-width: 2; }
.plot .endlabel { font-family: var(--ff-b); font-size: 12px; fill: var(--muted); }
.plot .pin { stroke: var(--acc); stroke-width: 1.5; }
.tip { position: absolute; z-index: 5; min-width: 190px; padding: 12px 14px; background: var(--panel); border: 1.5px solid var(--ink); box-shadow: 5px 5px 0 var(--hard); pointer-events: none; font-size: 13.5px; }
.tip .label { display: block; color: var(--faint); margin-bottom: 8px; }
.tip .r { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; padding: 2px 0; } .tip .r i { width: 10px; height: 10px; } .tip .r b { font-weight: 600; }
.legend { display: flex; gap: 8px 18px; flex-wrap: wrap; font-size: 13.5px; margin-top: 14px; }
.legend button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer; padding: 2px 0; color: var(--ink); }
.legend button i { width: 10px; height: 10px; } .legend button:hover { color: var(--acc); }
.hbars { display: grid; gap: 6px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 36%) 1fr 52px; gap: 12px; align-items: center; border: 0; background: none; padding: 5px 0; cursor: pointer; text-align: left; font-size: 13.5px; color: var(--ink); }
.hbar .track { height: 12px; background: var(--line-2); } .hbar .track i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--faint); transform-origin: left; animation: growx .8s var(--ease) both; }
.hbar:hover .n, .hbar.on .n { color: var(--acc); } .hbar .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hbar .v { font-family: var(--ff-m); font-size: 12px; color: var(--muted); text-align: right; }
.mini { display: flex; align-items: center; gap: 8px; } .mini i { display: block; height: 6px; background: var(--ink); opacity: .7; border-radius: 0 3px 3px 0; } .mini span { font-family: var(--ff-m); font-size: 12.5px; min-width: 26px; }
.delta { font-family: var(--ff-m); font-size: 12px; white-space: nowrap; } .delta.up { color: var(--ok); } .delta.down { color: var(--danger); }
.swatch { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border: 1.5px solid var(--line-b); }

.cols { display: flex; align-items: flex-end; gap: 6px; height: 210px; padding-top: 22px; border-bottom: 1px solid var(--line-b); margin-bottom: 26px; }
.col { position: relative; flex: 1 1 0; min-width: 6px; max-width: 64px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.col i { display: block; width: 100%; background: var(--ink); opacity: .78; border-radius: 4px 4px 0 0; transform-origin: bottom; animation: growy .8s var(--ease) both; transition: opacity .2s, background .2s; }
.col:hover i, .col:focus-visible i { opacity: 1; background: var(--acc); }
.col .cv { font-family: var(--ff-m); font-size: 11.5px; color: var(--muted); margin-bottom: 5px; min-height: 16px; }
.col .cl { position: absolute; top: calc(100% + 7px); font-family: var(--ff-m); font-size: 10.5px; color: var(--faint); white-space: nowrap; }
@keyframes growy { from { transform: scaleY(0); } }
.hbar .stack { display: flex; gap: 2px; height: 12px; min-width: 8px; } .hbar .stack i { display: block; min-width: 3px; transform-origin: left; animation: growx .8s var(--ease) both; }
.hbar .stack i:last-child { border-radius: 0 4px 4px 0; }
.legend > span { display: inline-flex; align-items: center; color: var(--muted); }
.tip[style*='fixed'] { z-index: 70; }

/* ---------- окна и сообщения */
dialog { border: 1.5px solid var(--ink); padding: 0; border-radius: 0; background: var(--panel); color: var(--ink); box-shadow: 8px 8px 0 var(--hard);
  width: min(580px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
dialog[open] { animation: rise .35s var(--ease); }
dialog::backdrop { background: rgba(11, 13, 19, .55); animation: fade .3s; }
.dlg { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.dlg-head { display: flex; align-items: center; gap: 12px; padding: 24px 28px 8px; }
.dlg-head h2 { font-family: var(--ff-d); font-weight: 500; font-size: 20px; flex: 1; }
.dlg-body { padding: 10px 28px 8px; overflow: auto; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 28px 26px; flex-wrap: wrap; }
.plan { background: var(--panel-2); border-left: 3px solid var(--ink); padding: 14px 18px; margin-bottom: 12px; font-size: 14.5px; }
.plan b { display: block; margin-bottom: 3px; } .plan .warn { color: var(--acc); margin-top: 8px; } .plan .bad { color: var(--danger); margin-top: 8px; }
.toasts { position: fixed; right: 26px; bottom: 26px; display: grid; gap: 10px; z-index: 80; max-width: min(440px, calc(100vw - 40px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--ink); color: var(--bg); border: 1.5px solid var(--ink); box-shadow: 5px 5px 0 var(--acc); animation: rise .3s var(--ease); }
.toast.err { background: var(--danger); border-color: var(--danger); color: #fff; box-shadow: 5px 5px 0 var(--ink); }
.toast svg { margin-top: 2px; } .toast.ok svg { color: var(--acc); }
.toast button { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; opacity: .7; padding: 0 2px; }

/* ---------- вход */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { position: relative; width: min(440px, 100%); background: var(--panel); border: 1.5px solid var(--ink); padding: 44px 44px 36px; box-shadow: 10px 10px 0 var(--hard); animation: rise .7s var(--ease) both; }
.login-card .brand { padding: 0 0 26px; }
.login-card h1 { font-family: var(--ff-d); font-weight: 500; font-size: 30px; margin: 0 0 8px; }
.login-card .btn { width: 100%; min-height: 48px; margin-top: 8px; }
.login-card .foot { margin-top: 20px; font-size: 13px; color: var(--faint); }
.login-card > .note { position: absolute; right: -14px; top: -28px; transform: rotate(4deg); }

/* ---------- обзор с подсказками */
.tour-shade { position: fixed; inset: 0; z-index: 90; }
.tour-ring { position: fixed; z-index: 91; pointer-events: none; box-shadow: 0 0 0 9999px rgba(11, 13, 19, .62), 0 0 0 1.5px var(--acc);
  transition: left .45s var(--ease), top .45s var(--ease), width .45s var(--ease), height .45s var(--ease); }
/* риски прицела по сторонам рамки: прицел наводится на нужное место */
.tour-ring.pulse::before, .tour-ring.pulse::after { content: ''; position: absolute; background: var(--acc); }
.tour-ring.pulse::before { left: 50%; top: -16px; bottom: -16px; width: 1.5px; margin-left: -.75px;
  -webkit-mask: linear-gradient(#000 0 10px, transparent 10px calc(100% - 10px), #000 calc(100% - 10px)); mask: linear-gradient(#000 0 10px, transparent 10px calc(100% - 10px), #000 calc(100% - 10px)); }
.tour-ring.pulse::after { top: 50%; left: -16px; right: -16px; height: 1.5px; margin-top: -.75px;
  -webkit-mask: linear-gradient(90deg, #000 0 10px, transparent 10px calc(100% - 10px), #000 calc(100% - 10px)); mask: linear-gradient(90deg, #000 0 10px, transparent 10px calc(100% - 10px), #000 calc(100% - 10px)); }
.tour-pop { position: fixed; z-index: 92; width: min(380px, calc(100vw - 24px)); padding: 20px 24px 22px; background: var(--panel); color: var(--ink); border: 1.5px solid var(--ink);
  box-shadow: 7px 7px 0 var(--acc); transition: left .45s var(--ease), top .45s var(--ease); }
.tour-pop.in > h2, .tour-pop.in > p { animation: rise .4s var(--ease) both; } .tour-pop.in > p { animation-delay: .06s; }
.tour-top { display: flex; align-items: center; justify-content: space-between; margin: -6px -10px 6px 0; }
.tour-count { font-family: var(--ff-m); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--acc); }
.tour-pop h2 { font-family: var(--ff-d); font-weight: 500; font-size: 19px; line-height: 1.25; margin-bottom: 10px; }
.tour-pop p { color: var(--muted); line-height: 1.6; }
.tour-pop .note { display: block; margin-top: 10px; font-size: 21px; }
.tour-dots { display: flex; gap: 4px; margin: 18px 0 16px; } .tour-dots i { height: 2px; flex: 1; background: var(--line-b); transition: background .3s; }
.tour-dots i.was { background: var(--ink); } .tour-dots i.on { background: var(--acc); }
.tour-foot { display: flex; justify-content: space-between; gap: 10px; }

/* ---------- карандашные зарисовки на фоне */
.main { position: relative; } .wrap { position: relative; z-index: 1; }
#scene { position: absolute; top: 0; right: 44px; width: min(520px, 40%); aspect-ratio: 560 / 320; pointer-events: none; z-index: 0; opacity: .85; }
#scene svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke: var(--pencil); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  filter: url(#sk-rough-1); animation: sk-boil 1.5s steps(1) infinite; transition: opacity .45s var(--ease), transform .45s var(--ease); }
#scene svg.out { opacity: 0; transform: translateY(12px); }
#scene svg.sk-once { animation: none; filter: url(#sk-rough-2); }
@keyframes sk-boil { 0% { filter: url(#sk-rough-1); } 33% { filter: url(#sk-rough-2); } 66% { filter: url(#sk-rough-3); } }
.sk { stroke-dasharray: 1; stroke-dashoffset: 1; animation: sk-draw .9s var(--ease) forwards; }
@keyframes sk-draw { to { stroke-dashoffset: 0; } }
.sk-acc { stroke: var(--acc); }
#scene g { transform-box: fill-box; transform-origin: center; }
.sk-talk { animation: sk-talk 6s ease-in-out infinite; transform-origin: 20% 100% !important; opacity: 0; }
@keyframes sk-talk { 0%, 6% { opacity: 0; transform: scale(.7); } 12%, 42% { opacity: 1; transform: scale(1); } 50%, 100% { opacity: 0; transform: scale(.94); } }
.sk-wave { animation: sk-wave 1.6s ease-in-out infinite; } @keyframes sk-wave { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.sk-spin { animation: spin 9s linear infinite; }
.sk-grow { animation: sk-grow 4s var(--ease) infinite; transform-origin: bottom !important; }
@keyframes sk-grow { 0%, 100% { transform: scaleY(.55); } 50% { transform: scaleY(1); } }
.sk-bob { animation: sk-bob 2.2s ease-in-out infinite; } @keyframes sk-bob { 50% { transform: translate(5px, -4px); } }
.sk-flow { stroke-dasharray: .06 .07 !important; stroke-dashoffset: 0 !important; animation: sk-flow 1.4s linear infinite !important; } @keyframes sk-flow { to { stroke-dashoffset: -.26; } }
.sk-tick .sk { animation: sk-redraw 7s var(--ease) infinite; } @keyframes sk-redraw { 0%, 8% { stroke-dashoffset: 1; } 18%, 100% { stroke-dashoffset: 0; } }
.sk-type .sk { animation: sk-redraw 4.5s var(--ease) infinite; }
.sk-fly { animation: sk-fly 2.2s var(--ease) forwards; } @keyframes sk-fly { 0% { transform: translate(0, 0) rotate(0); opacity: 0; } 14% { opacity: 1; } 100% { transform: translate(250px, -190px) rotate(-14deg); opacity: 0; } }
.sk-pop { animation: sk-pop 1.9s var(--ease) forwards; } @keyframes sk-pop { 0% { transform: scale(.6); opacity: 0; } 20% { transform: scale(1.08); opacity: 1; } 70% { opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
#scene.busy .sk-grow { animation-duration: 1.3s; } #scene.busy .sk-spin { animation-duration: 2s; }
.login #scene { position: fixed; left: 3vw; bottom: 5vh; top: auto; right: auto; width: min(560px, 42vw); }
@media (max-width: 1180px) { #scene { width: 44%; opacity: .55; right: 20px; } }
@media (max-width: 820px) { #scene, .login #scene { display: none; } }

/* ---------- узкие экраны */
@media (max-width: 1180px) { .meet, .charts { grid-template-columns: minmax(0, 1fr); } .side { position: static; } .main { padding: 28px 32px 96px; } }
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; z-index: 20; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; padding: 6px; border-right: 0; border-top: 1.5px solid var(--ink); }
  .brand, .rail-foot { display: none; }
  .nav { flex-direction: row; flex: 1; justify-content: space-around; gap: 0; }
  .nav a { flex-direction: column; gap: 3px; font-size: 9px; letter-spacing: .06em; min-height: 52px; padding: 4px 6px; min-width: 58px; justify-content: center; }
  .nav a::before { left: 9px; right: 9px; top: 0; bottom: auto; width: auto; height: 2px; transform: scaleX(0); } .nav a[aria-current='page']::before { transform: scaleX(1); }
  .nav .count { position: absolute; top: 2px; right: 6px; margin: 0; }
  .main { padding: 18px 16px 104px; }
  .topbar { margin-bottom: 24px; } .topbar .me-top { display: flex; align-items: center; gap: 6px; margin-left: auto; } .topbar .me-top .me { padding: 0; }
  .page-head { padding-top: 38px; margin-bottom: 24px; } .page-head .tools { margin-left: 0; width: 100%; }
  .day { grid-template-columns: 76px minmax(0, 1fr); gap: 8px 14px; padding: 18px 16px; } .day:hover { padding-left: 16px; }
  .day-state { grid-column: 2; justify-items: start; min-width: 0; } .day-act { grid-column: 2; justify-content: flex-start; min-width: 0; }
  .day-date { flex-direction: column; gap: 4px; } .day-date b { font-size: 28px; }
  .sheet { padding: 30px 20px 36px; } .doc { font-size: 16px; }
  .seg { width: 100%; } .seg button { flex: 1; padding: 0 6px; font-size: 10px; letter-spacing: .06em; }
  .search .input { min-width: 0; width: 100%; } .search { flex: 1; }
  .toasts { left: 14px; right: 14px; bottom: 80px; } .login-card { padding: 32px 24px 28px; } .login-card > .note { right: 6px; }
  .tile { border-left: 0; border-top: 1px solid var(--line-2); }
}
@media print {
  body { background: #fff; } body::before, .rail, .topbar, .toasts, .page-head .tools, #scene, .card.card-pad:has(input[type='date']), .row:has(> .btn) { display: none !important; }
  .shell { display: block; } .main { padding: 0; } .sheet { border: 0; padding: 0; } .sheet::before, .sheet::after { display: none; }
  .card, .tiles, .sheet { break-inside: avoid; } * { animation: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .note .nw { clip-path: none; animation: none; }
  #scene svg, .sk-talk, .sk-wave, .sk-grow, .sk-bob, .sk-spin, .sk-flow, .sk-tick .sk, .sk-type .sk { animation: none !important; opacity: 1; }
  .sk { stroke-dashoffset: 0; animation: none !important; }
}
