/* Hub v2 — визуальный язык «панели»: стеклянные карточки, боковое меню, кольца, плавающий таб-бар.
   Свой код (шаблон Pane — только как референс внешнего вида). */
:root {
  --bg: #0b0c0f; --bg-2: #14161b; --card: rgba(255,255,255,.045); --card-2: rgba(255,255,255,.07);
  --line: rgba(255,255,255,.09); --line-2: rgba(255,255,255,.16);
  --ink: #f5f5f7; --ink-2: #c7c7cc; --mute: #8e8e93;
  --blue: #3987e5; --orange: #d95926; --aqua: #199e70; --pink: #e05a8a; --violet: #9085e9;
  --good: #30d158; --warn: #ffb340; --bad: #ff6961;
  --accent: #2f7cf6; --accent-2: #1d63d6;
  --r-xl: 28px; --r-lg: 18px; --r-md: 12px;
  --shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 20px 40px -24px rgba(0,0,0,.6);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) {
  --bg: #eef0f4; --bg-2: #e4e7ee; --card: rgba(255,255,255,.72); --card-2: rgba(255,255,255,.95);
  --line: rgba(15,23,42,.08); --line-2: rgba(15,23,42,.14);
  --ink: #111318; --ink-2: #3b3f47; --mute: #6b7079;
  --blue: #2a78d6; --orange: #eb6834; --aqua: #1baf7a; --pink: #d6457a; --violet: #4a3aa7;
  --good: #1f9d47; --warn: #b26b00; --bad: #d03b3b;
  --shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 18px 40px -28px rgba(15,23,42,.35);
  color-scheme: light;
} }
:root[data-theme="light"] {
  --bg: #eef0f4; --bg-2: #e4e7ee; --card: rgba(255,255,255,.72); --card-2: rgba(255,255,255,.95);
  --line: rgba(15,23,42,.08); --line-2: rgba(15,23,42,.14);
  --ink: #111318; --ink-2: #3b3f47; --mute: #6b7079;
  --blue: #2a78d6; --orange: #eb6834; --aqua: #1baf7a; --pink: #d6457a; --violet: #4a3aa7;
  --good: #1f9d47; --warn: #b26b00; --bad: #d03b3b;
  --shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 18px 40px -28px rgba(15,23,42,.35);
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: Inter, -apple-system, "SF Pro Text", system-ui, sans-serif; font-size: 14px; line-height: 1.45;
  color: var(--ink); background: radial-gradient(1200px 600px at 70% -10%, rgba(47,124,246,.16), transparent 60%), var(--bg);
  background-attachment: fixed; min-height: 100vh; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.num { font-variant-numeric: tabular-nums; }

/* ── layout ── */
.shell { display: grid; grid-template-columns: 260px 1fr; gap: 26px; padding: 16px 24px 40px 16px; max-width: 1480px; margin: 0 auto; }
.side {
  position: sticky; top: 16px; height: calc(100vh - 32px); display: flex; flex-direction: column; gap: 4px;
  padding: 18px 12px; border-radius: var(--r-xl); background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
}
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-weight: 700; font-size: 18px; }
.logo i { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(160deg, #5aa2ff, var(--accent-2)); display: grid; place-items: center; color: #fff; font-style: normal; font-size: 15px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 14px; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.nav a:hover { background: var(--card-2); color: var(--ink); }
.nav a.on { background: var(--card-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.nav svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.nav .badge { margin-left: auto; font-size: 11px; padding: 1px 7px; border-radius: 99px; background: var(--card-2); color: var(--ink-2); }
.side h6 { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); font-weight: 600; padding: 18px 12px 6px; }
.pin { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; color: var(--ink-2); font-size: 13px; font-weight: 500; }
.pin:hover { background: var(--card-2); color: var(--ink); }
.pin b { width: 8px; height: 8px; border-radius: 50%; }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; }
.me .ava { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(140deg, var(--orange), var(--pink)); display: grid; place-items: center; font-weight: 700; color: #fff; }
.me small { display: block; color: var(--mute); font-size: 12px; }
.me .theme { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); }

/* ── header ── */
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin: 6px 0 18px; }
h1 { font-size: 44px; line-height: 1.05; letter-spacing: -.025em; font-weight: 800; }
.sub { color: var(--ink-2); font-size: 16px; margin-top: 8px; }
.pills { display: flex; gap: 10px; flex-wrap: wrap; }
.pill { padding: 10px 16px 9px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 112px; }
.pill small { display: block; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.pill b { font-size: 21px; font-weight: 750; letter-spacing: -.01em; }
.pill b span { font-size: 13px; color: var(--mute); font-weight: 600; }
.row-actions { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 99px; font-weight: 650; font-size: 14px;
  background: var(--card-2); border: 1px solid var(--line-2); }
.btn.primary { background: linear-gradient(180deg, #4b8ff9, var(--accent-2)); border-color: transparent; color: #fff; box-shadow: 0 10px 24px -10px rgba(47,124,246,.8); }
.btn.warn { background: rgba(255,179,64,.14); border-color: rgba(255,179,64,.35); color: var(--warn); }

/* ── cards ── */
.grid { display: grid; gap: 18px; margin-bottom: 18px; }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2a { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.g2b { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.card { position: relative; padding: 20px 20px 18px; border-radius: var(--r-xl); background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); min-width: 0; }
.card-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.card-h h3 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.card-h p { color: var(--mute); font-size: 13px; margin-top: 2px; }
.card-h a.more { color: var(--blue); font-weight: 600; font-size: 14px; white-space: nowrap; }
.seg { display: flex; gap: 2px; padding: 3px; border-radius: 99px; background: var(--card-2); border: 1px solid var(--line); }
.seg button { padding: 4px 12px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--mute); }
.seg button.on { background: var(--card-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }

/* rings */
.rings { display: flex; align-items: center; gap: 26px; justify-content: center; padding: 8px 0 4px; }
.rings svg { width: 150px; height: 150px; flex-shrink: 0; transform: rotate(-90deg); }
.rings circle { fill: none; stroke-linecap: round; }
.legend-v { display: flex; flex-direction: column; gap: 12px; }
.legend-v div { border-left: 3px solid var(--c); padding-left: 10px; }
.legend-v small { display: block; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.legend-v b { font-size: 20px; font-weight: 750; }
.legend-v b span { font-size: 12px; color: var(--mute); font-weight: 600; }

/* highlight (up next) */
.hl { padding: 16px 18px; border-radius: var(--r-lg); background: linear-gradient(160deg, rgba(144,133,233,.22), rgba(57,135,229,.10)); border: 1px solid var(--line-2); margin-bottom: 14px; }
.hl small { color: var(--ink-2); font-size: 12px; font-weight: 600; }
.hl h4 { font-size: 19px; font-weight: 750; margin: 4px 0 2px; letter-spacing: -.01em; }
.hl p { color: var(--ink-2); font-size: 13px; }
.mini { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.mini::before { content: ''; width: 3px; height: 18px; border-radius: 2px; background: var(--c, var(--violet)); }
.mini span { margin-left: auto; color: var(--mute); font-size: 13px; white-space: nowrap; }

/* list rows (tasks) */
.rows { display: flex; flex-direction: column; }
.r { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-top: 1px solid var(--line); }
.r:first-child { border-top: 0; }
.dot { width: 22px; height: 22px; border-radius: 50%; border: 1.6px solid var(--line-2); flex-shrink: 0; display: grid; place-items: center; }
.dot.ok { background: var(--accent); border-color: var(--accent); color: #fff; font-size: 12px; font-weight: 800; }
.dot.warn { border-color: var(--warn); }
.r .t { min-width: 0; flex: 1; }
.r .t b { display: block; font-size: 14.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r .meta { display: flex; gap: 8px; align-items: center; margin-top: 3px; color: var(--mute); font-size: 12.5px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--card-2); color: var(--ink-2); white-space: nowrap; }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--mute)); }
.chip.plain::before { display: none; }
.tag { padding: 3px 9px; border-radius: 8px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.tag.sum { background: rgba(48,209,88,.14); color: var(--good); }
.tag.none { background: var(--card-2); color: var(--mute); font-weight: 600; }
.tag.hot { background: rgba(255,105,97,.14); color: var(--bad); }
.tag.mid { background: rgba(255,179,64,.14); color: var(--warn); }

/* bars */
.bars-head { display: flex; align-items: baseline; gap: 10px; margin: -4px 0 14px; }
.bars-head b { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.bars-head span { color: var(--ink-2); }
.delta.down { color: var(--bad); font-weight: 650; font-size: 13px; }
.delta.up { color: var(--good); font-weight: 650; font-size: 13px; }
.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; align-items: end; height: 230px; }
.bar { position: relative; height: 100%; display: flex; align-items: flex-end; border-radius: 12px; background: var(--card-2); cursor: default; }
.bar i { display: block; width: 100%; border-radius: 12px; background: linear-gradient(180deg, #8dc0ff, var(--blue)); min-height: 4px; transition: filter .15s; }
.bar.prev i { background: linear-gradient(180deg, rgba(217,89,38,.65), rgba(217,89,38,.4)); }
.bar.empty i { background: none; }
.bar:hover i, .bar:focus-visible i { filter: brightness(1.15); }
.bar .tipb { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--bg-2); border: 1px solid var(--line-2); padding: 5px 9px; border-radius: 10px; font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 3; }
.bar:hover .tipb, .bar:focus-visible .tipb { opacity: 1; }
.bars-x { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; margin-top: 8px; text-align: center; color: var(--ink-2); font-size: 12px; font-weight: 600; }

/* progress rows (projects) */
.prow { display: grid; grid-template-columns: 40px minmax(0, 1fr) minmax(80px, 160px) 54px 70px; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.prow:first-child { border-top: 0; }
.ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px; background: linear-gradient(150deg, var(--c), color-mix(in srgb, var(--c) 60%, #000)); }
.prow b { display: block; font-weight: 650; }
.prow small { color: var(--mute); font-size: 12.5px; }
.track { height: 6px; border-radius: 99px; background: var(--card-2); overflow: hidden; }
.track i { display: block; height: 100%; border-radius: 99px; background: var(--c); }
.prow .pc { font-weight: 700; text-align: right; }
.prow .sm { color: var(--ink-2); text-align: right; font-size: 13px; }

/* people (right now) */
.person { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.person:first-child { border-top: 0; }
.person .av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--c); position: relative; }
.person .av::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--s, var(--good)); border: 2px solid var(--bg); }
.person b { display: block; font-weight: 650; }
.person small { color: var(--mute); font-size: 12.5px; }
.person .right { margin-left: auto; text-align: right; font-size: 13px; color: var(--ink-2); }

/* debt */
.big { font-size: 46px; font-weight: 800; letter-spacing: -.03em; }
.big span { font-size: 15px; color: var(--mute); font-weight: 600; letter-spacing: 0; }
.schedule { display: flex; gap: 6px; margin: 14px 0; flex-wrap: wrap; }
.schedule div { flex: 1; min-width: 54px; padding: 8px 6px; border-radius: 12px; background: var(--card-2); text-align: center; }
.schedule div.next { box-shadow: inset 0 0 0 1px var(--blue); }
.schedule small { display: block; color: var(--mute); font-size: 11px; font-weight: 600; }
.schedule b { font-size: 13px; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--card-2); font-size: 13px; color: var(--ink-2); }
.foot b { color: var(--ink); }

.note { color: var(--mute); font-size: 12.5px; text-align: center; margin: 24px 0 0; }
.empty { color: var(--mute); padding: 18px 0; }

/* ── mobile ── */
.topbar-m, .tabbar { display: none; }
@media (max-width: 1100px) {
  .g3 { grid-template-columns: 1fr 1fr; }
  .g3 > :last-child { grid-column: 1 / -1; }
  .g2a, .g2b { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; padding: 12px 16px 110px; gap: 0; }
  .side { display: none; }
  .topbar-m { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
  .topbar-m .ttl { padding: 9px 18px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-weight: 700; }
  .topbar-m .tools { display: flex; gap: 6px; padding: 5px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); }
  .topbar-m .tools > * { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; }
  .head { flex-direction: column; margin-top: 0; }
  h1 { font-size: 34px; }
  .pills { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .pill { min-width: 0; padding: 9px 12px; }
  .pill b { font-size: 17px; }
  .actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .btn { justify-content: center; }
  .g3 { grid-template-columns: 1fr; }
  .rings svg { width: 128px; height: 128px; }
  .bars { height: 170px; gap: 4px; }
  .bars-x { gap: 4px; font-size: 10px; }
  .prow { grid-template-columns: 36px minmax(0, 1fr) 54px; }
  .prow .track, .prow .sm { display: none; }
  .tabbar { display: flex; position: fixed; left: 12px; right: 12px; bottom: 14px; z-index: 20; padding: 6px; gap: 2px; justify-content: space-around;
    border-radius: 30px; background: color-mix(in srgb, var(--bg-2) 82%, transparent); border: 1px solid var(--line-2); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: 0 18px 40px -16px rgba(0,0,0,.6); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 6px; border-radius: 22px; font-size: 10.5px; font-weight: 600; color: var(--ink-2); }
  .tabbar a.on { background: var(--card-2); color: var(--blue); }
  .tabbar svg { width: 21px; height: 21px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.shell > main { min-width: 0; }
.topbar-m .tools svg { width: 18px; height: 18px; }
.bar:nth-child(-n+2) .tipb { left: 0; transform: none; }
.bar:nth-last-child(-n+2) .tipb { left: auto; right: 0; transform: none; }
.bar .tipb { visibility: hidden; } .bar:hover .tipb, .bar:focus-visible .tipb { visibility: visible; }

/* ══ SPA: движение, островок, палитра, разделы ══════════════════ */
:root { --ease: cubic-bezier(.22,.8,.24,1); }
.enter > * { opacity: 0; transform: translateY(14px) scale(.985); filter: blur(6px); animation: rise .55s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes rise { to { opacity: 1; transform: none; filter: none; } }
.greet .w > span { display: inline-block; opacity: 0; transform: translateY(.35em); filter: blur(4px); animation: rise .5s var(--ease) forwards; animation-delay: calc(var(--c) * 22ms); white-space: pre; }
.card { transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease); }
a.card:hover, .card.hov:hover { transform: translateY(-2px); border-color: var(--line-2); }
.nav a, .pin, .btn, .seg button, .chip, .tabbar a { transition: background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease); }
.btn:active, .seg button:active { transform: scale(.97); }
.rings circle.p { transition: stroke-dasharray 1.1s var(--ease); }
.bar i { transition: height .8s var(--ease); }
.track i { transition: width .9s var(--ease); }
.draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.3s var(--ease) .15s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.fadein { opacity: 0; animation: rise .6s var(--ease) .7s forwards; }

/* верхняя панель инструментов (десктоп) */
.tools-d { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.search { display: flex; align-items: center; gap: 10px; width: 300px; height: 40px; padding: 0 12px 0 14px; border-radius: 99px; background: var(--card-2); color: var(--mute); font-size: 14px; }
.search kbd { margin-left: auto; font: 600 11px Inter, sans-serif; padding: 2px 6px; border-radius: 6px; background: var(--card-2); border: 1px solid var(--line-2); color: var(--ink-2); }
.ibtn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; position: relative; }
.ibtn:hover { background: var(--card-2); }
.ibtn svg { width: 19px; height: 19px; }
.ibtn .dotb { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--bg-2); }

/* островок */
.island { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 16px 0 12px;
  border-radius: 99px; background: #000; color: #f5f5f7; font-size: 13px; font-weight: 600; box-shadow: 0 10px 30px -10px rgba(0,0,0,.7);
  max-width: min(420px, calc(100vw - 32px)); transition: width .45s var(--ease), opacity .3s var(--ease), transform .45s var(--ease); white-space: nowrap; overflow: hidden; }
.island.hide { opacity: 0; transform: translateX(-50%) translateY(-18px) scale(.9); pointer-events: none; }
.island i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--c, var(--blue)); flex-shrink: 0; font-style: normal; font-size: 11px; }
.island small { color: var(--warn); font-variant-numeric: tabular-nums; margin-left: 6px; }

/* палитра ⌘K и поповер */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .2s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.palette { position: fixed; z-index: 55; top: 12vh; left: 50%; width: min(640px, calc(100vw - 24px)); transform: translateX(-50%); animation: pop .28s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateX(-50%) scale(.96) translateY(-8px); } }
.palette .in { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 18px; border-radius: 22px; background: var(--bg-2); border: 1px solid var(--line-2); margin-bottom: 10px; }
.palette input { flex: 1; background: none; border: 0; outline: 0; color: var(--ink); font: 500 17px Inter, sans-serif; }
.palette .list { max-height: 56vh; overflow: auto; padding: 8px; border-radius: 22px; background: var(--bg-2); border: 1px solid var(--line-2); }
.palette h6 { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); padding: 10px 10px 6px; }
.pi { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 14px; cursor: pointer; }
.pi .pic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--card-2); flex-shrink: 0; }
.pi .pic svg { width: 17px; height: 17px; }
.pi b { display: block; font-weight: 600; }
.pi small { color: var(--mute); font-size: 12px; }
.pi.sel { background: linear-gradient(180deg, #4b8ff9, var(--accent-2)); color: #fff; }
.pi.sel small { color: rgba(255,255,255,.75); }
.popover { position: fixed; z-index: 55; top: 70px; right: 24px; width: min(380px, calc(100vw - 24px)); padding: 14px; border-radius: 22px; background: var(--bg-2); border: 1px solid var(--line-2); box-shadow: 0 24px 60px -20px rgba(0,0,0,.6); animation: pop2 .25s var(--ease); }
@keyframes pop2 { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
.popover .ph { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 10px; }
.popover .ph b { font-size: 16px; }
.popover .ph button { color: var(--blue); font-weight: 600; font-size: 13px; }
.nt { display: flex; gap: 10px; padding: 10px 6px; border-top: 1px solid var(--line); font-size: 13.5px; }
.nt:first-of-type { border-top: 0; }
.nt i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--blue)); margin-top: 6px; flex-shrink: 0; }
.nt.read i { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.nt small { display: block; color: var(--mute); font-size: 12px; margin-top: 2px; }

/* общие элементы разделов */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 8px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); margin-bottom: 18px; }
.toolbar .filter { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 180px; height: 38px; padding: 0 14px; border-radius: 99px; background: var(--card-2); }
.toolbar input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); font: 500 14px Inter, sans-serif; }
.seg.lg button { padding: 7px 14px; font-size: 13.5px; }
.back { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); border: 1px solid var(--line-2); flex-shrink: 0; }

/* канбан */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 6px; align-items: start; }
.col { border-radius: 24px; background: var(--card); border: 1px solid var(--line); padding: 12px; }
.col-h { display: flex; align-items: center; gap: 8px; padding: 4px 6px 12px; font-weight: 700; }
.col-h .n { font-size: 12px; color: var(--mute); padding: 1px 8px; border-radius: 99px; background: var(--card-2); }
.col-h .s { margin-left: auto; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.col-h::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.kc { display: block; padding: 13px 14px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line); margin-bottom: 10px; transition: transform .2s var(--ease), border-color .2s var(--ease); }
.kc:hover { transform: translateY(-2px); border-color: var(--line-2); }
.kc .top { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.kc .top .price { margin-left: auto; }
.kc b { display: block; font-weight: 650; font-size: 14px; line-height: 1.3; }
.kc p { color: var(--mute); font-size: 12.5px; margin-top: 3px; }
.kc .bot { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--mute); }
.kc .bot .stale { color: var(--bad); }
.av-s { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; background: var(--c, var(--violet)); margin-left: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; color: var(--mute); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: var(--card); }
.tbl .ra { text-align: right; }

/* календарь */
.cal-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .dh { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--mute); padding: 4px 8px; }
.day { min-height: 104px; padding: 8px; border-radius: 14px; background: var(--card-2); border: 1px solid transparent; cursor: pointer; transition: border-color .2s var(--ease), background .2s var(--ease); overflow: hidden; }
.day:hover { border-color: var(--line-2); }
.day.out { opacity: .38; }
.day.sel { border-color: var(--blue); }
.day .dn { font-weight: 700; font-size: 13px; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; }
.day.today .dn { background: var(--accent); color: #fff; }
.ev { display: block; margin-top: 4px; padding: 2px 6px; border-radius: 6px; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--ink); border-left: 2px solid var(--c); }
.ev.more { background: none; border: 0; color: var(--mute); }
.agenda .it { display: grid; grid-template-columns: 64px 3px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.agenda .it:first-child { border-top: 0; }
.agenda .it .tm { color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.agenda .it .ln { border-radius: 2px; background: var(--c); }
.agenda .it b { display: block; font-weight: 650; }
.agenda .it small { color: var(--mute); font-size: 12.5px; }

/* клиенты (проекты) */
.cards3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.pc-h { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.pc-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 17px; flex-shrink: 0; background: linear-gradient(150deg, var(--c), color-mix(in srgb, var(--c) 55%, #000)); }
.pc-h b { display: block; font-size: 17px; font-weight: 700; margin-bottom: 5px; }
.pc-d { color: var(--ink-2); font-size: 13.5px; margin-bottom: 14px; min-height: 40px; }
.ms { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--card-2); margin-bottom: 14px; }
.ms svg { width: 56px; height: 56px; transform: rotate(-90deg); flex-shrink: 0; }
.ms .pct { position: absolute; }
.ms small { display: block; color: var(--mute); font-size: 12px; }
.ms b { font-weight: 650; }
.pc-f { display: flex; justify-content: space-between; align-items: center; color: var(--mute); font-size: 12.5px; }
.timeline { position: relative; height: 8px; border-radius: 99px; background: var(--card-2); margin: 34px 0 10px; }
.timeline i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: linear-gradient(90deg, var(--violet), var(--blue)); }
.timeline .mk { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--bg-2); border: 3px solid var(--violet); }
.timeline .mk.done { background: var(--violet); }
.timeline .now { position: absolute; top: -30px; transform: translateX(-50%); font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 8px; background: var(--ink); color: var(--bg); white-space: nowrap; }
.tl-lbl { display: flex; justify-content: space-between; color: var(--mute); font-size: 12px; }

/* аналитика */
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-svg .gl { stroke: var(--line); }
.chart-svg text { fill: var(--mute); font-size: 11px; font-family: Inter, sans-serif; }
.legend2 { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-2); }
.legend2 i { display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: 6px; }
.donut-wrap { display: grid; place-items: center; position: relative; margin: 4px 0 14px; }
.donut-wrap .c { position: absolute; text-align: center; }
.donut-wrap .c b { display: block; font-size: 26px; font-weight: 800; }
.donut-wrap .c small { color: var(--mute); font-size: 12px; }
.lg-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.lg-row:first-of-type { border-top: 0; }
.lg-row i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); flex-shrink: 0; }
.lg-row span { margin-left: auto; color: var(--ink-2); font-weight: 600; }
.lg-row em { font-style: normal; color: var(--mute); width: 40px; text-align: right; }
.ctip { position: absolute; pointer-events: none; padding: 7px 10px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line-2); font-size: 12px; z-index: 5; white-space: nowrap; box-shadow: 0 10px 24px -12px rgba(0,0,0,.6); }
.ctip b { display: block; margin-bottom: 2px; }

/* команда */
.tc-h { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.tc-h .av { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; background: var(--c); position: relative; flex-shrink: 0; }
.tc-h .av::after { content: ''; position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--s, var(--good)); border: 2px solid var(--bg); }
.tc-h b { display: block; font-size: 16px; font-weight: 700; }
.tc-h small { color: var(--mute); }
.load { padding: 12px 14px; border-radius: 16px; background: var(--card-2); margin-bottom: 12px; }
.load .lh { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.load .lh b { color: var(--ink); }

@media (max-width: 1100px) { .cal-wrap { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .tools-d { display: none; }
  .day { min-height: 64px; padding: 5px; }
  .day .ev { display: none; }
  .day.has::after { content: ''; display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); margin: 4px auto 0; }
  .board { grid-auto-columns: 84%; scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; }
  .popover { right: 12px; top: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .enter > *, .greet span, .fadein { animation: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
  .draw { animation: none; stroke-dashoffset: 0; }
}
.quiet .enter > *, .quiet .greet span, .quiet .fadein { animation: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
.quiet .draw { animation: none; stroke-dashoffset: 0; }
a.mini { color: inherit; }
.r { color: inherit; }

:root { --yellow: #c98500; --green: #008300; --red: #e66767; }
:root[data-theme="light"] { --yellow: #eda100; --green: #008300; --red: #e34948; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --yellow: #eda100; --red: #e34948; } }
.shell > main { padding-top: 34px; }
.island { top: 10px; }
.r .meta { min-width: 0; }
.r .meta .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: inline-block; }
.r .meta .chip::before { display: inline-block; margin-right: 5px; vertical-align: 1px; }
.col-h { flex-wrap: wrap; row-gap: 4px; }
@media (max-width: 760px) { .shell > main { padding-top: 6px; } }

.greet .w { display: inline-block; white-space: nowrap; }
.greet .w span { display: inline-block; }

/* ── Hub v2: неделя, CRM ─────────────────────────────────────────── */
.sec2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 34px 0 14px; }
.sec2 h2 { font-size: 21px; font-weight: 750; letter-spacing: -.01em; margin-right: 4px; }
.sec2 .more { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.tks { display: flex; flex-direction: column; }
.tk { display: flex; gap: 12px; align-items: flex-start; padding: 10px 2px; border-top: 1px solid var(--line); }
.tk:first-child { border-top: 0; padding-top: 2px; }
.tk .bx { width: 22px; height: 22px; border-radius: 7px; border: 1.6px solid var(--line-2); flex-shrink: 0; display: grid; place-items: center; cursor: pointer; transition: background .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease); margin-top: 1px; }
.tk .bx:hover { border-color: var(--good); }
.tk .bx:active { transform: scale(.9); }
.tk .bx:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.tk .bx.ro { cursor: default; }
.tk .bx.busy { opacity: .5; }
.tk.done .bx { background: var(--good); border-color: var(--good); }
.tk.done .bx::after { content: '✓'; color: #fff; font-size: 12px; font-weight: 800; }
.tk.wait .bx { border-style: dashed; border-color: var(--warn); }
.tk .tt { font-size: 14px; line-height: 1.45; min-width: 0; }
.tk.done .tt { color: var(--mute); text-decoration: line-through; text-decoration-color: var(--line-2); }
.tk .note { display: block; color: var(--mute); font-size: 12.5px; margin-top: 2px; text-align: left; }
.wsel { height: 40px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); color: var(--ink); padding: 0 16px; font: 600 13.5px Inter, sans-serif; cursor: pointer; max-width: 100%; }
.msr { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 14px; }
.msr span { display: flex; flex-direction: column; align-items: center; min-width: 54px; padding: 6px 8px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); font-size: 11.5px; color: var(--mute); }
.msr span b { font-size: 13px; color: var(--ink-2); }
.msr .ms-done { background: color-mix(in srgb, var(--good) 16%, transparent); border-color: transparent; }
.msr .ms-done b { color: var(--good); }
.msr .ms-planned { border-color: var(--blue); }
.msr .ms-planned b { color: var(--blue); }
.chipsr { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chipsr .chip { white-space: normal; text-align: left; }
details.closed2 > summary { list-style: none; cursor: pointer; }
details.closed2 > summary::-webkit-details-marker { display: none; }
details.closed2 > summary h2::after { content: ' ›'; color: var(--mute); }
details.closed2[open] > summary h2::after { content: ' ⌄'; }
.card.paused { opacity: .6; }
