/* TWO MAD PIXELS CRM — светлый минимализм: белый, чёрный, фирменный оранжевый */
:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --card2: #fbfbfd;
  --sidebar: rgba(246, 246, 248, .82);
  --glass: rgba(255, 255, 255, .72);
  --fill: rgba(118, 118, 128, .1);
  --fill-2: rgba(118, 118, 128, .16);
  --fill-soft: rgba(118, 118, 128, .06);
  --input: #f2f2f5;
  --line: rgba(0, 0, 0, .07);
  --line-2: rgba(0, 0, 0, .12);
  --text: #1d1d1f;
  --text2: #6e6e73;
  --text3: #8e8e93;
  --ink: #1d1d1f;
  --ink-contrast: #ffffff;
  --accent: #fd5100;
  --accent-hover: #e64900;
  --accent-soft: rgba(253, 81, 0, .1);
  --accent-text: #e04800;
  --ok: #34c759;
  --warn: #ff9f0a;
  --bad: #ff3b30;
  --r: 20px;
  --r-sm: 12px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .04), 0 2px 10px rgba(0, 0, 0, .035);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, .04), 0 14px 36px rgba(0, 0, 0, .08);
  --shadow-pop: 0 12px 48px rgba(0, 0, 0, .18), 0 0 0 .5px rgba(0, 0, 0, .06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, Consolas, monospace;
  --brand: "Saira Condensed", "Arial Narrow", sans-serif;
  /* совместимость со старыми именами */
  --muted: var(--text2);
  --dim: var(--text3);
  --panel: var(--card);
  --panel2: var(--fill-soft);
  --panel3: var(--fill);
  --border: var(--line);
  --border2: var(--line-2);
  --bg2: var(--fill-soft);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #000000;
  --card: #1c1c1e;
  --card2: #232325;
  --sidebar: rgba(22, 22, 24, .82);
  --glass: rgba(22, 22, 24, .72);
  --fill: rgba(118, 118, 128, .24);
  --fill-2: rgba(118, 118, 128, .34);
  --fill-soft: rgba(118, 118, 128, .14);
  --input: #2c2c2e;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .15);
  --text: #f5f5f7;
  --text2: #a1a1a6;
  --text3: #6e6e73;
  --ink: #f5f5f7;
  --ink-contrast: #000000;
  --accent-soft: rgba(253, 81, 0, .2);
  --accent-text: #ff7433;
  --shadow-1: 0 0 0 .5px rgba(255, 255, 255, .06);
  --shadow-2: 0 0 0 .5px rgba(255, 255, 255, .08), 0 16px 40px rgba(0, 0, 0, .5);
  --shadow-pop: 0 0 0 .5px rgba(255, 255, 255, .12), 0 20px 60px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.47 var(--font);
  letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-family: var(--display); }
h1 { font-size: 32px; font-weight: 700; letter-spacing: -.028em; }
h2 { font-size: 21px; font-weight: 700; letter-spacing: -.022em; }
h3 { font-size: 15px; font-weight: 600; letter-spacing: -.015em; }
small, .small { font-size: 12px; }
.muted { color: var(--text2); }
.dim { color: var(--text3); }
.mono { font-family: var(--mono); }
.grow { flex: 1; }
.nowrap { white-space: nowrap; }
.hidden, [hidden] { display: none !important; }
.ok { color: var(--ok); }
.bad { color: var(--bad); }
.warn { color: var(--warn); }
::selection { background: rgba(253, 81, 0, .22); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--fill-2); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i.sm { width: 15px; height: 15px; }
.i.lg { width: 22px; height: 22px; }

/* ---------- brand */
.mark { display: block; flex: none; }
.mark .m { fill: var(--ink); }
.wordmark { font-family: var(--brand); font-weight: 800; text-transform: uppercase; letter-spacing: .02em; line-height: 1; }

/* ---------- boot / fatal */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-logo { width: 14px; height: 14px; border-radius: 3px; background: var(--accent); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: rotate(20deg) scale(.7); opacity: .5; } }
.fatal { max-width: 520px; margin: 15vh auto; padding: 32px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow-2); }
.fatal h2 { margin-bottom: 8px; }

/* ---------- layout */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 252px; z-index: 40;
  display: flex; flex-direction: column;
  background: var(--sidebar); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-right: .5px solid var(--line-2);
  padding: 20px 12px 12px;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 10px 22px; }
.brand .mark { width: 34px; height: 28px; }
.brand-name { font-size: 17px; }
.brand-sub { font-size: 11px; color: var(--text3); margin-top: 3px; letter-spacing: .01em; }
.nav { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; flex: 1; margin: 0 -4px; padding: 0 4px; }
.nav-sep { height: 14px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: 9px;
  color: var(--text); font-weight: 500; font-size: 13.5px; transition: background .15s;
}
.nav a .i { color: var(--text2); width: 19px; height: 19px; }
.nav a:hover { background: var(--fill-soft); }
.nav a.on { background: var(--fill); }
.nav a.on .i { color: var(--accent); }
.nav .cnt { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--text3); font-variant-numeric: tabular-nums; }
.nav .cnt.hot { background: var(--accent); color: #fff; padding: 1px 7px; border-radius: 20px; min-width: 20px; text-align: center; }
.side-foot { display: flex; align-items: center; gap: 4px; padding: 12px 6px 2px; border-top: .5px solid var(--line-2); margin-top: 10px; }
.me { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.me b { display: block; font-size: 13px; font-weight: 600; }
.me small { color: var(--text3); display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text3); display: inline-block; flex: none; }
.online-dot.on { background: var(--ok); }

.main { flex: 1; margin-left: 252px; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px;
  padding: 10px 40px; min-height: 58px; background: var(--glass);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid var(--line);
}
.search-trigger {
  display: flex; align-items: center; gap: 9px; width: min(380px, 100%); padding: 7px 12px;
  background: var(--fill); border: 0; border-radius: 10px; color: var(--text3); text-align: left; transition: background .15s;
}
.search-trigger:hover { background: var(--fill-2); }
.search-trigger span { flex: 1; }
kbd { font: 11px var(--font); padding: 1px 6px; border-radius: 6px; background: var(--card); color: var(--text3); box-shadow: 0 0 0 .5px var(--line-2); }
.partner { display: flex; align-items: center; gap: 8px; color: var(--text2); font-size: 12.5px; white-space: nowrap; }
#view { padding: 34px 40px 72px; width: 100%; max-width: 1440px; }
.mobile-only { display: none !important; }
.scrim { display: none; }

/* ---------- page head */
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head .sub { color: var(--text2); margin-top: 6px; font-size: 15px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar h2 { margin-right: 4px; }
.toolbar .search { position: relative; }
.toolbar .search .i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text3); }
.toolbar .search input { padding-left: 34px; width: 230px; }
.toolbar select, .toolbar input { width: auto; }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 16px; border-radius: 980px; border: 0;
  background: var(--fill); color: var(--text); font-weight: 500; font-size: 13.5px; white-space: nowrap;
  transition: background .15s, opacity .15s, transform .1s;
}
.btn:hover { background: var(--fill-2); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn .i { width: 16px; height: 16px; }
.btn.primary { background: var(--ink); color: var(--ink-contrast); }
.btn.primary:hover { opacity: .86; }
.btn.accent, .btn.grad { background: var(--accent); color: #fff; }
.btn.accent:hover, .btn.grad:hover { background: var(--accent-hover); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--fill-soft); }
.btn.danger { color: var(--bad); }
.btn.danger:not(.ghost) { background: rgba(255, 59, 48, .1); }
.btn.sm { padding: 5px 12px; font-size: 12.5px; }
.btn.block { width: 100%; padding: 11px 16px; font-size: 15px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: transparent; color: var(--text2); flex: none; transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--fill); color: var(--text); }
.icon-btn.sm { width: 28px; height: 28px; }
.icon-btn.sm .i { width: 15px; height: 15px; }
.link-btn { background: none; border: 0; color: var(--accent-text); padding: 4px 0; font-weight: 500; font-size: inherit; }
.link-btn:hover { text-decoration: underline; }

/* ---------- chips & badges */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-f {
  padding: 6px 13px; border-radius: 980px; border: 0; background: var(--fill-soft);
  color: var(--text); font-size: 13px; font-weight: 500; display: inline-flex; gap: 6px; align-items: center; transition: background .15s;
}
.chip-f:hover { background: var(--fill); }
.chip-f.on { background: var(--ink); color: var(--ink-contrast); }
.chip-f .n { opacity: .5; font-weight: 500; font-variant-numeric: tabular-nums; }
.badge {
  --c: #8e8e93;
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 980px;
  font-size: 12px; font-weight: 500; white-space: nowrap; color: var(--text); background: var(--fill-soft);
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.badge.nodot::before { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 980px;
  background: var(--fill-soft); color: var(--text2); font-size: 12px; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.chip .i { width: 13px; height: 13px; }
.chip.overdue { background: rgba(255, 59, 48, .1); color: var(--bad); }
.chip.soon { background: var(--accent-soft); color: var(--accent-text); }
.chip.done { background: rgba(52, 199, 89, .12); color: #248a3d; }
[data-theme="dark"] .chip.done { color: #30d158; }
.tag { font-size: 11.5px; padding: 1px 8px; border-radius: 980px; background: var(--fill-soft); color: var(--text2); }
.tags { display: flex; gap: 4px; flex-wrap: wrap; }
.dot { --c: var(--accent); width: 8px; height: 8px; border-radius: 50%; background: var(--c); display: inline-block; flex: none; }
.gchip { --c: var(--accent); display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--text2); white-space: nowrap; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.gchip::before { content: ""; width: 8px; height: 8px; border-radius: 2.5px; background: var(--c); flex: none; transform: rotate(-17deg); }

/* ---------- avatar */
.ava {
  --c: #8e8e93; --on-c: #fff;
  width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: var(--c); color: var(--on-c); font-weight: 600; font-size: 13px; letter-spacing: 0;
}
.ava.sm { width: 22px; height: 22px; font-size: 10.5px; }
.ava.lg { width: 44px; height: 44px; font-size: 18px; }

/* ---------- cards */
.card { background: var(--card); border-radius: var(--r); padding: 22px; min-width: 0; box-shadow: var(--shadow-1); }
.card.pad0 { padding: 0; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; min-height: 28px; }
.card-h h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.card-h h3 .i { color: var(--text3); }
.card-h .right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.card.pad0 .card-h { padding: 20px 22px 0; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.grid { display: grid; gap: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2-1 { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.empty { text-align: center; padding: 44px 16px; color: var(--text2); }
.empty > .i { width: 40px; height: 40px; color: var(--text3); margin: 0 auto 14px; stroke-width: 1.3; display: block; }
.empty b { display: block; color: var(--text); font-size: 17px; font-weight: 600; margin-bottom: 4px; letter-spacing: -.02em; }
.empty .btn { margin-top: 18px; }
.empty-mini { color: var(--text3); font-size: 13.5px; padding: 6px 0; }

/* ---------- KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { --c: var(--accent); background: var(--card); border-radius: var(--r); padding: 18px 20px 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-1); }
.kpi-ico { color: var(--c); display: flex; }
.kpi-ico .i { width: 22px; height: 22px; stroke-width: 1.7; }
.kpi-val { font: 700 28px/1.1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi-lbl { color: var(--text2); font-size: 13px; margin-top: 4px; }
.kpi-sub { font-size: 12px; color: var(--text3); margin-top: 2px; }

/* ---------- hello (dashboard) */
.hello { display: flex; align-items: flex-end; gap: 20px; margin: 4px 0 28px; }
.hello .eyebrow { font-size: 13px; font-weight: 600; color: var(--accent-text); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.hello h1 { font-size: 40px; letter-spacing: -.035em; }
.hello p { margin: 8px 0 0; color: var(--text2); font-size: 16px; }
.hello .mark { width: 74px; height: 60px; margin-left: auto; opacity: .9; }

/* ---------- progress */
.prog { height: 6px; border-radius: 10px; background: var(--fill); overflow: hidden; flex: 1; }
.prog > i { display: block; height: 100%; border-radius: 10px; background: var(--accent); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.prog.warn > i { background: var(--bad); }
.prog-row { display: flex; align-items: center; gap: 10px; }
.prog-row b { font-size: 12.5px; font-weight: 600; min-width: 36px; text-align: right; font-variant-numeric: tabular-nums; }
.stacked { display: flex; height: 8px; border-radius: 10px; overflow: hidden; background: var(--fill); gap: 2px; }
.stacked i { display: block; height: 100%; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; font-size: 12.5px; color: var(--text2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- games grid */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.game-card {
  --gc: var(--accent);
  display: flex; flex-direction: column; background: var(--card); border-radius: 22px; overflow: hidden;
  box-shadow: var(--shadow-1); transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s;
}
.game-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.gc-cover { position: relative; aspect-ratio: 16 / 8; background: color-mix(in srgb, var(--gc) 9%, var(--card2)); overflow: hidden; display: grid; place-items: center; }
.gc-cover img { width: 100%; height: 100%; object-fit: cover; }
.gc-cover .badge { position: absolute; top: 12px; left: 12px; background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 0 0 .5px var(--line); }
.gc-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.gc-title { display: flex; align-items: center; gap: 10px; }
.gc-title h3 { font-size: 17px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-meta { color: var(--text2); font-size: 13px; min-height: 18px; }
.gc-stats { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.pixel-ph { width: 100%; height: 100%; display: grid; place-items: center; }
.pixel-ph span { font: 800 46px/1 var(--brand); color: var(--gc); letter-spacing: .02em; }
.glogo { --gc: var(--accent); width: 40px; height: 40px; border-radius: 11px; overflow: hidden; flex: none; background: color-mix(in srgb, var(--gc) 12%, var(--card2)); display: grid; place-items: center; }
.glogo img { width: 100%; height: 100%; object-fit: cover; }
.glogo span { font: 800 16px/1 var(--brand); color: var(--gc); }
.glogo.sm { width: 28px; height: 28px; border-radius: 8px; } .glogo.sm span { font-size: 12px; }
.glogo.xl { width: 112px; height: 112px; border-radius: 26px; box-shadow: var(--shadow-2); } .glogo.xl span { font-size: 44px; }

/* ---------- game page */
.game-hero { --gc: var(--accent); position: relative; border-radius: 26px; overflow: hidden; background: var(--card); padding: 22px 30px 26px; margin-bottom: 20px; box-shadow: var(--shadow-1); }
.gh-bg { position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--gc) 7%, transparent), transparent 70%); pointer-events: none; }
.gh-bg.img { background-size: cover; background-position: center; opacity: .1; filter: blur(40px) saturate(1.3); transform: scale(1.3); }
.game-hero > *:not(.gh-bg) { position: relative; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-text); font-size: 14px; margin-bottom: 16px; }
.back:hover { text-decoration: underline; }
.gh-main { display: flex; gap: 26px; align-items: center; }
.gh-info { flex: 1; min-width: 0; }
.gh-info h1 { font-size: 36px; margin: 8px 0 6px; letter-spacing: -.035em; }
.gh-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.gh-pitch { margin: 0 0 14px; color: var(--text2); max-width: 720px; font-size: 15px; }
.gh-progress { display: flex; align-items: center; gap: 12px; max-width: 460px; }
.gh-progress b { font-variant-numeric: tabular-nums; }
.gh-actions { display: flex; gap: 6px; align-self: flex-start; }
.gh-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.gh-links a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 980px; font-size: 13px; font-weight: 500; background: var(--fill-soft); transition: background .15s; }
.gh-links a:hover { background: var(--fill); }
.tabs { display: flex; gap: 2px; margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; background: var(--fill); padding: 3px; border-radius: 12px; width: max-content; max-width: 100%; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: flex; align-items: center; gap: 7px; padding: 6px 14px; color: var(--text); font-weight: 500; font-size: 13px; border-radius: 9px; white-space: nowrap; transition: background .15s; }
.tabs a .i { color: var(--text2); }
.tabs a:hover { background: var(--fill-soft); }
.tabs a.on { background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, .1), 0 0 0 .5px rgba(0, 0, 0, .04); }
[data-theme="dark"] .tabs a.on { background: #636366; box-shadow: none; }
.tabs a.on .i { color: var(--accent); }
.tabs a .cnt { font-size: 11px; color: var(--text3); font-variant-numeric: tabular-nums; }
.tabs a .cnt.hot { background: var(--accent); color: #fff; padding: 0 6px; border-radius: 10px; }
.info-list { display: grid; grid-template-columns: auto 1fr; gap: 0; margin: 0; font-size: 13.5px; }
.info-list dt, .info-list dd { padding: 9px 0; border-bottom: .5px solid var(--line); }
.info-list dt:last-of-type, .info-list dd:last-of-type { border-bottom: 0; }
.info-list dt { color: var(--text2); }
.info-list dd { margin: 0; text-align: right; font-weight: 500; display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 6px; }
.link-list { display: flex; flex-direction: column; }
.link-list a { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: .5px solid var(--line); }
.link-list a:last-child { border-bottom: 0; }
.link-list a .i { color: var(--accent); }
.link-list a b { font-weight: 500; }
.link-list a:hover b { color: var(--accent-text); }
.link-list a .u { color: var(--text3); font-size: 12.5px; margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 10px; top: 8px; bottom: 8px; width: 1.5px; background: var(--line-2); }
.timeline li { position: relative; display: flex; gap: 14px; padding: 7px 0; }
.tl-dot { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--card); flex: none; display: grid; place-items: center; color: #fff; padding: 0; z-index: 1; transition: background .15s, border-color .15s; }
.tl-dot:hover { border-color: var(--accent); }
.tl-dot .i { width: 13px; height: 13px; stroke-width: 3; }
.timeline li.done .tl-dot { background: var(--accent); border-color: var(--accent); }
.timeline li.late .tl-dot { border-color: var(--bad); }
.tl-body { flex: 1; cursor: pointer; padding: 1px 0; }
.tl-body b { display: block; font-weight: 500; }
.timeline li.done .tl-body b { color: var(--text3); text-decoration: line-through; }
.tl-body small { color: var(--text2); }
.timeline li.late .tl-body small { color: var(--bad); }

/* ---------- kanban */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(205px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 10px; align-items: start; }
.kcol { background: var(--fill-soft); border-radius: 18px; display: flex; flex-direction: column; min-height: 200px; max-height: calc(100vh - 230px); }
.kcol header { display: flex; align-items: center; gap: 8px; padding: 13px 12px 10px 14px; }
.kcol header b { font-size: 13.5px; font-weight: 600; }
.kcol .count { font-size: 12px; color: var(--text3); font-variant-numeric: tabular-nums; }
.kcol header .icon-btn { margin-left: auto; }
.kcards { flex: 1; overflow-y: auto; padding: 2px 10px 12px; display: flex; flex-direction: column; gap: 8px; min-height: 60px; border-radius: 0 0 18px 18px; transition: background .15s; }
.kcards.over { background: var(--accent-soft); }
.kempty { color: var(--text3); font-size: 12.5px; text-align: center; padding: 20px 0; border: 1.5px dashed var(--line-2); border-radius: 12px; }
.kcard { background: var(--card); border-radius: 14px; padding: 12px 13px; cursor: grab; display: flex; flex-direction: column; gap: 8px; position: relative; box-shadow: var(--shadow-1); transition: box-shadow .2s, transform .2s; }
.kcard:hover { box-shadow: var(--shadow-2); }
.kcard.dragging { opacity: .4; }
.kcard.prio-urgent::before, .kcard.prio-high::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--bad); }
.kcard.prio-high::before { background: var(--accent); }
.ktitle { font-weight: 500; font-size: 13.5px; line-height: 1.38; word-break: break-word; }
.kcard.is-done .ktitle { color: var(--text3); text-decoration: line-through; }
.kmeta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.prio { --c: #8e8e93; display: inline-flex; gap: 3px; align-items: center; font-size: 11.5px; font-weight: 600; color: var(--c); }
.prio .i { width: 12px; height: 12px; }
.kcol > .link-btn { margin: 0 14px 12px; text-align: left; }

/* ---------- tables */
.table-wrap { overflow-x: auto; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow-1); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 500; color: var(--text3); font-size: 12px; padding: 13px 16px 10px; border-bottom: .5px solid var(--line-2); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: .5px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr[data-act] { cursor: pointer; transition: background .12s; }
.table tbody tr[data-act]:hover { background: var(--fill-soft); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .t-title { font-weight: 500; }
.table .t-sub { color: var(--text3); font-size: 12.5px; }
.table tr.muted-row td { opacity: .5; }
.bug-id { font: 500 12px var(--mono); color: var(--text3); white-space: nowrap; }
.amount-exp { color: var(--text); font-weight: 600; }
.amount-inc { color: #248a3d; font-weight: 600; }
[data-theme="dark"] .amount-inc { color: #30d158; }
.amount-tr { color: var(--text2); font-weight: 600; }
.row-actions { display: flex; gap: 2px; justify-content: flex-end; }
.ficon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--fill-soft); color: var(--text2); overflow: hidden; flex: none; }
.ficon img { width: 100%; height: 100%; object-fit: cover; }
.fcell { display: flex; align-items: center; gap: 12px; min-width: 200px; }

/* ---------- lists */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 8px; margin: 0 -8px; border-radius: 12px; cursor: pointer; min-width: 0; position: relative; transition: background .12s; }
.li + .li::before { content: ""; position: absolute; top: 0; left: 8px; right: 8px; border-top: .5px solid var(--line); }
.li:hover { background: var(--fill-soft); }
.li:hover::before, .li:hover + .li::before { opacity: 0; }
.li .li-main { flex: 1; min-width: 0; }
.li .li-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .li-sub { color: var(--text3); font-size: 12.5px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.ag-date { width: 44px; text-align: center; flex: none; }
.ag-date b { display: block; font: 600 20px/1.1 var(--display); letter-spacing: -.02em; }
.ag-date small { color: var(--accent-text); font-size: 11px; font-weight: 600; text-transform: uppercase; }
.ag-ico { --c: var(--accent); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--c); background: var(--fill-soft); flex: none; }
.ag-ico .i { width: 15px; height: 15px; }
.act-item { display: flex; gap: 12px; padding: 10px 8px; align-items: flex-start; }
.act-item .act-main { flex: 1; min-width: 0; font-size: 13.5px; }
.act-item .act-main .i { color: var(--text3); }
.act-item .act-main .q { color: var(--text); font-weight: 500; }
.act-item small { color: var(--text3); display: block; margin-top: 1px; }
.act-day { font-size: 13px; font-weight: 600; color: var(--text); margin: 22px 0 4px; }
.act-day:first-child { margin-top: 0; }
.team-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: .5px solid var(--line); }
.team-row:last-child { border-bottom: 0; }
.team-row b { font-weight: 600; }
.team-row .stats { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- charts */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--text3); font-size: 11px; font-family: var(--font); }
.chart .grid-l { stroke: var(--line); }
.chart rect.bar { transition: opacity .15s; }
.chart rect.bar:hover { opacity: .7; }
.hbars { display: flex; flex-direction: column; gap: 13px; }
.hbar-l { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 6px; }
.hbar-l span { color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-l b { font-weight: 600; font-variant-numeric: tabular-nums; }
.hbar-t { height: 6px; border-radius: 10px; background: var(--fill); overflow: hidden; }
.hbar-t i { --c: var(--accent); display: block; height: 100%; background: var(--c); border-radius: 10px; }
.chart-legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--text2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ---------- settlement */
.settle { display: flex; flex-direction: column; gap: 12px; }
.settle-people { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.settle-p { background: var(--fill-soft); border-radius: 14px; padding: 14px; display: flex; gap: 10px; align-items: center; }
.settle-p b { display: block; font: 600 18px var(--display); letter-spacing: -.02em; }
.settle-p small { color: var(--text2); }
.settle-res { padding: 13px 16px; border-radius: 14px; background: var(--ink); color: var(--ink-contrast); font-weight: 500; display: flex; gap: 10px; align-items: center; }
.settle-res .i { color: var(--accent); }
.settle-res.even { background: rgba(52, 199, 89, .12); color: var(--text); }
.settle-res.even .i { color: var(--ok); }

/* ---------- calendar */
.cal-head { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.cal-head h2 { min-width: 200px; text-transform: capitalize; font-size: 24px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-radius: var(--r); overflow: hidden; background: var(--line); gap: .5px; box-shadow: var(--shadow-1); }
.cal-dow { background: var(--card); padding: 10px 10px 6px; font-size: 11.5px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: .04em; }
.cal-cell { background: var(--card); min-height: 116px; padding: 6px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; transition: background .12s; }
.cal-cell:hover { background: var(--card2); }
.cal-cell.out { background: var(--card2); }
.cal-cell.out .cal-num { color: var(--text3); opacity: .6; }
.cal-cell.weekend .cal-num { color: var(--text3); }
.cal-num { font-size: 13px; font-weight: 500; width: 26px; height: 26px; display: grid; place-items: center; align-self: flex-end; border-radius: 50%; font-variant-numeric: tabular-nums; }
.cal-cell.today .cal-num { background: var(--accent); color: #fff; font-weight: 600; }
.cal-item { --c: var(--accent); font-size: 11.5px; padding: 2px 7px; border-radius: 6px; background: color-mix(in srgb, var(--c) 13%, transparent); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.cal-item.done { opacity: .45; text-decoration: line-through; }
.cal-more { font-size: 11px; color: var(--text2); padding: 0 6px; font-weight: 500; }

/* ---------- contacts / ideas cards */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.ccard { background: var(--card); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; box-shadow: var(--shadow-1); transition: box-shadow .25s, transform .25s cubic-bezier(.2, .8, .2, 1); min-width: 0; }
.ccard:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.ccard-h { display: flex; gap: 12px; align-items: flex-start; }
.ccard-h h3 { font-size: 16px; }
.ccard-h .sub { color: var(--text2); font-size: 13px; margin-top: 2px; }
.ccard p { margin: 0; color: var(--text2); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.contact-links { display: flex; gap: 6px; flex-wrap: wrap; }
.contact-links a, .contact-links span { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; padding: 4px 10px; border-radius: 980px; background: var(--fill-soft); color: var(--text2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-links a:hover { color: var(--accent-text); background: var(--accent-soft); }
.contact-links .i { width: 13px; height: 13px; }
.votes { display: flex; flex-direction: column; gap: 7px; padding-top: 12px; border-top: .5px solid var(--line); margin-top: auto; }
.vote-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.vote-row .name { width: 72px; color: var(--text2); }
.stars { display: inline-flex; gap: 1px; }
.stars button { background: none; border: 0; padding: 1px; color: var(--line-2); }
.stars button .i { width: 17px; height: 17px; }
.stars button.on { color: var(--accent); }
.stars button.on .i { fill: currentColor; }
.stars.ro button { cursor: default; }
.stars:not(.ro) button:hover { transform: scale(1.15); }
.score { font: 700 24px var(--display); margin-left: auto; color: var(--text); letter-spacing: -.03em; }
.note-card { background: var(--fill-soft); border-radius: 16px; padding: 16px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: background .15s; min-width: 0; }
.note-card:hover { background: var(--fill); }
.note-card h4 { font-size: 14.5px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.note-card h4 .i { color: var(--accent); }
.note-card p { margin: 0; font-size: 13px; color: var(--text2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.note-card small { color: var(--text3); }
.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }

/* ---------- versions */
.versions { display: flex; flex-direction: column; gap: 14px; }
.vcard { background: var(--card); border-radius: var(--r); padding: 20px 22px; display: flex; gap: 22px; box-shadow: var(--shadow-1); }
.vnum { font: 600 22px var(--mono); min-width: 120px; letter-spacing: -.02em; }
.vnum small { display: block; font: 400 12.5px var(--font); color: var(--text2); margin-top: 4px; letter-spacing: 0; }
.vbody { flex: 1; min-width: 0; }
.vbody .vh { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.vbody .vh b { font-size: 16px; font-weight: 600; }
.vbody .md { font-size: 13.5px; color: var(--text2); }

/* ---------- checklist */
.checklist { display: flex; flex-direction: column; }
.ck { display: flex; align-items: center; gap: 12px; padding: 8px 6px; border-radius: 10px; cursor: pointer; }
.ck:hover { background: var(--fill-soft); }
.ck .box { width: 21px; height: 21px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; color: #fff; flex: none; transition: background .15s, border-color .15s; }
.ck .box .i { width: 12px; height: 12px; stroke-width: 3.5; }
.ck.done .box { background: var(--accent); border-color: var(--accent); }
.ck.done span { color: var(--text3); text-decoration: line-through; }
.ck span { flex: 1; }
.ck .icon-btn { opacity: 0; }
.ck:hover .icon-btn { opacity: 1; }
.inline-add { display: flex; gap: 8px; margin-top: 12px; }

/* ---------- forms */
input, select, textarea {
  width: 100%; padding: 10px 13px; border-radius: 12px; border: 1px solid transparent;
  background: var(--input); color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: var(--text3); }
input:focus, select:focus, textarea:focus { background: var(--card); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
textarea { resize: vertical; min-height: 64px; line-height: 1.5; }
textarea.mono { font-family: var(--mono); font-size: 13px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5-5 5 5M7 14l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 32px; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); padding: 0; }
input[type="range"] { padding: 0; accent-color: var(--accent); border: 0; background: none; box-shadow: none !important; }
input[type="color"] { width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: conic-gradient(#ff3b30, #ffcc00, #34c759, #32ade6, #5e5ce6, #ff375f, #ff3b30); box-shadow: none !important; overflow: hidden; }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 3px; }
input[type="color"]::-webkit-color-swatch { border: 2px solid var(--card); border-radius: 50%; }
input[type="color"]::-moz-color-swatch { border: 2px solid var(--card); border-radius: 50%; }
.toolbar select, .toolbar input { background-color: var(--card); box-shadow: var(--shadow-1); }
.toolbar select:focus, .toolbar input:focus { box-shadow: 0 0 0 4px var(--accent-soft); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.flabel { font-size: 13px; font-weight: 500; color: var(--text2); }
.flabel i { color: var(--accent); font-style: normal; margin-left: 2px; }
.field.err input, .field.err select, .field.err textarea { border-color: var(--bad); box-shadow: 0 0 0 4px rgba(255, 59, 48, .12); }
.hint { font-size: 12px; color: var(--text3); }
.form-section { grid-column: 1 / -1; font: 600 17px var(--display); letter-spacing: -.02em; color: var(--text); padding-top: 14px; margin-top: 4px; border-top: .5px solid var(--line); }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row output { font-weight: 600; min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; padding: 6px 0; }
.pill-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.pcheck input { display: none; }
.pcheck span { display: inline-block; padding: 6px 13px; border-radius: 980px; background: var(--input); font-size: 13px; cursor: pointer; color: var(--text); user-select: none; transition: background .15s; }
.pcheck input:checked + span { background: var(--ink); color: var(--ink-contrast); }
.color-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.swatch { --c: #fd5100; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--c); padding: 0; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .1); transition: transform .15s; }
.swatch:hover { transform: scale(1.1); }
.swatch.on { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--c); }
.rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.row-edit { display: flex; gap: 6px; align-items: center; }
.row-edit .w-label { width: 34%; flex: none; }
.row-edit input[type="checkbox"] { flex: none; }
.upload-box { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px; border: 1.5px dashed var(--line-2); border-radius: 16px; background: transparent; color: var(--text2); transition: border-color .15s, background .15s; }
.upload-box .i { color: var(--accent); width: 24px; height: 24px; }
.upload-box:hover { border-color: var(--accent); background: var(--accent-soft); }
.upload-box small { color: var(--text3); }
.img-prev { display: flex; gap: 14px; align-items: center; }
.img-prev img { width: 96px; height: 96px; object-fit: cover; border-radius: 22px; box-shadow: var(--shadow-1); }
.img-prev .img-actions { display: flex; flex-direction: column; gap: 6px; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--fill-soft); }
.file-row .i { color: var(--text2); }
.file-row .fn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.att-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.att { position: relative; width: 92px; height: 72px; border-radius: 12px; overflow: hidden; background: var(--fill-soft); display: grid; place-items: center; text-align: center; font-size: 10.5px; color: var(--text2); padding: 4px; }
.att img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.att .x { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; padding: 0; z-index: 1; backdrop-filter: blur(6px); }
.att .x .i { width: 11px; height: 11px; stroke-width: 2.5; }
.att a.open { position: absolute; inset: 0; z-index: 0; }
.uprog { padding: 16px; border-radius: 14px; background: var(--fill-soft); font-size: 13px; color: var(--text2); display: flex; flex-direction: column; gap: 9px; }
.md-field { display: flex; flex-direction: column; gap: 7px; }
.md-tabs { display: flex; gap: 2px; align-items: center; }
.md-tabs button { background: none; border: 0; padding: 4px 11px; border-radius: 980px; font-size: 12.5px; font-weight: 500; color: var(--text2); }
.md-tabs button.on { background: var(--fill); color: var(--text); }
.md-tabs .hint { margin-left: auto; }
.md-preview { min-height: 120px; padding: 14px 16px; border-radius: 12px; background: var(--input); }

/* markdown */
.md { line-height: 1.6; word-break: break-word; }
.md > *:first-child { margin-top: 0; }
.md > *:last-child { margin-bottom: 0; }
.md h2, .md h3, .md h4, .md h5 { margin: 1.2em 0 .45em; }
.md h2 { font-size: 21px; } .md h3 { font-size: 17px; } .md h4, .md h5 { font-size: 15px; }
.md p { margin: 0 0 .75em; }
.md ul, .md ol { margin: 0 0 .85em; padding-left: 1.4em; }
.md li { margin: .2em 0; }
.md li::marker { color: var(--text3); }
.md ul.tasklist { list-style: none; padding-left: .1em; }
.md ul.tasklist li { display: flex; gap: 8px; align-items: baseline; }
.md code { font: 12.5px var(--mono); background: var(--fill-soft); padding: 1px 6px; border-radius: 6px; }
.md pre { background: var(--fill-soft); padding: 14px 16px; border-radius: 14px; overflow-x: auto; }
.md pre code { background: none; padding: 0; }
.md a { color: var(--accent-text); }
.md a:hover { text-decoration: underline; }
.md blockquote { margin: 0 0 .85em; padding: 4px 16px; border-left: 3px solid var(--accent); color: var(--text2); }
.md hr { border: 0; border-top: .5px solid var(--line-2); margin: 1.3em 0; }

/* ---------- modal */
.modal-wrap { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: flex-start; justify-content: center; padding: 7vh 16px; overflow-y: auto; animation: fade .2s; }
[data-theme="dark"] .modal-wrap { background: rgba(0, 0, 0, .55); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.modal { width: 100%; max-width: 620px; background: var(--card); border-radius: 24px; box-shadow: var(--shadow-pop); animation: rise .28s cubic-bezier(.2, .9, .3, 1); display: flex; flex-direction: column; }
.modal.sm { max-width: 420px; }
.modal.lg { max-width: 860px; }
.modal.xl { max-width: 1040px; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 22px 24px 6px; }
.modal-head h3 { font-size: 21px; font-weight: 700; letter-spacing: -.025em; flex: 1; min-width: 0; }
.modal-head .icon-btn { background: var(--fill); width: 30px; height: 30px; }
.modal-head .icon-btn .i { width: 15px; height: 15px; stroke-width: 2.4; }
.modal-body { padding: 16px 24px 24px; }
.modal-foot { display: flex; align-items: center; gap: 8px; padding: 14px 24px 18px; border-top: .5px solid var(--line); flex-wrap: wrap; }
.modal-foot .meta { font-size: 12px; color: var(--text3); }
.modal.search { max-width: 640px; border-radius: 20px; }
.modal.search .modal-body { padding: 10px 14px 14px; }
.search-box { display: flex; align-items: center; gap: 10px; padding: 6px 6px 12px; border-bottom: .5px solid var(--line); }
.search-box input { border: 0; background: none; box-shadow: none !important; font-size: 19px; padding: 6px 0; letter-spacing: -.02em; }
.search-box input:focus { background: none; }
.search-box .i { color: var(--text3); }
.search-res { max-height: 56vh; overflow-y: auto; padding-top: 8px; }
.sr-group { font-size: 12px; font-weight: 600; color: var(--text3); padding: 12px 10px 4px; }
.sr { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.sr.on, .sr:hover { background: var(--accent); color: #fff; }
.sr .i { color: var(--text2); }
.sr.on .i, .sr:hover .i, .sr.on small, .sr:hover small { color: rgba(255, 255, 255, .85); }
.sr .sr-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.sr small { color: var(--text3); white-space: nowrap; }

/* ---------- popover menu */
.pop { position: fixed; z-index: 120; min-width: 220px; background: var(--glass); backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px); border-radius: 14px; box-shadow: var(--shadow-pop); padding: 5px; animation: rise .16s ease-out; }
.pop button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; border: 0; background: none; text-align: left; font-weight: 400; font-size: 13.5px; }
.pop button:hover { background: var(--accent); color: #fff; }
.pop button .i { color: var(--text2); width: 16px; height: 16px; }
.pop button:hover .i { color: #fff; }
.pop button.danger { color: var(--bad); } .pop button.danger .i { color: var(--bad); }
.pop button.danger:hover { background: var(--bad); color: #fff; } .pop button.danger:hover .i { color: #fff; }
.pop hr { border: 0; border-top: .5px solid var(--line-2); margin: 5px 8px; }

/* ---------- toasts */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; background: var(--ink); color: var(--ink-contrast); padding: 11px 18px; border-radius: 980px; box-shadow: var(--shadow-pop); font-weight: 500; font-size: 13.5px; display: flex; gap: 10px; align-items: center; max-width: min(460px, 92vw); animation: rise .25s cubic-bezier(.2, .9, .3, 1); }
.toast .tmsg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast .i { width: 17px; height: 17px; flex: none; }
.toast.ok .i { color: var(--ok); }
.toast.msg .i, .toast.busy .i { color: var(--accent); }
.toast.error .i { color: var(--bad); }
.toast .prog { min-width: 90px; }

/* ---------- dropzone */
[data-dropzone] { position: relative; }
[data-dropzone].drop-over::after { content: "Отпустите, чтобы загрузить"; position: absolute; inset: 0; border-radius: inherit; border: 2px dashed var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--card)); display: grid; place-items: center; font-weight: 600; color: var(--accent-text); z-index: 5; }
.drop-hint { display: flex; gap: 8px; align-items: center; color: var(--text3); font-size: 13px; padding: 16px; border: 1.5px dashed var(--line-2); border-radius: 14px; margin-top: 12px; justify-content: center; }

/* ---------- auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.auth-card { width: 100%; max-width: 400px; }
.auth-logo { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-bottom: 36px; text-align: center; }
.auth-logo .mark { width: 96px; height: 78px; }
.auth-logo .wordmark { font-size: 34px; }
.auth-logo .brand-sub { font-size: 15px; color: var(--text2); margin-top: 6px; letter-spacing: -.01em; }
.auth form { display: flex; flex-direction: column; gap: 16px; background: var(--card); padding: 26px; border-radius: 24px; box-shadow: var(--shadow-2); }
.auth input { padding: 12px 14px; font-size: 15px; }
.who { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.who label { cursor: pointer; }
.who input { display: none; }
.who .wcard { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 18px 10px 14px; border-radius: 16px; background: var(--fill-soft); font-weight: 600; transition: background .15s, box-shadow .15s; }
.who input:checked + .wcard { background: var(--card); box-shadow: 0 0 0 2px var(--accent); }
.auth-note { font-size: 13.5px; color: var(--text2); background: var(--accent-soft); padding: 11px 14px; border-radius: 12px; margin-bottom: 14px; }
.auth [data-block] { display: flex; flex-direction: column; gap: 16px; }
.auth [data-block] .auth-note { margin-bottom: 0; }
.code-input { font-family: var(--mono) !important; font-size: 18px !important; letter-spacing: .14em; text-transform: uppercase; text-align: center; }
.invite { text-align: center; }
.invite-code { font-size: 30px; font-weight: 600; letter-spacing: .14em; padding: 18px; border-radius: 16px; background: var(--fill-soft); margin-bottom: 16px; user-select: all; }
.invite p { margin: 0 0 10px; }
.auth .err { color: var(--bad); font-size: 13px; min-height: 18px; text-align: center; }
.auth p.lead { color: var(--text2); margin: -18px 0 26px; text-align: center; font-size: 15px; }

/* ---------- settings */
.set-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: .5px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-row label { flex: 1; font-weight: 500; }
.set-row label small { display: block; color: var(--text3); font-weight: 400; }
.set-row input, .set-row select { width: 200px; }
.rate-row { display: grid; grid-template-columns: 80px 1fr auto; gap: 8px; align-items: center; margin-bottom: 6px; }
.rate-row b { font-family: var(--mono); font-weight: 600; }
.btn-col { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.btn-col .btn { justify-content: flex-start; padding: 10px 16px; border-radius: 12px; }
.btn-col .btn .i { color: var(--accent); }
.snap { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: .5px solid var(--line); font-size: 13px; }
.snap:last-child { border-bottom: 0; }
.snap .i { color: var(--text3); }
.snap .mono { font-size: 12.5px; flex: 1; }

/* ---------- chat */
.chat { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: calc(100vh - 128px); min-height: 460px; background: var(--card); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-1); }
.chat.in-game { height: max(460px, calc(100vh - 400px)); }
.ch-list { border-right: .5px solid var(--line-2); display: flex; flex-direction: column; min-height: 0; background: var(--card2); }
[data-theme="dark"] .ch-list { background: #171719; }
.ch-list-h { display: flex; align-items: center; gap: 2px; padding: 18px 12px 8px 18px; }
.ch-list-h b { flex: 1; font: 700 21px var(--display); letter-spacing: -.025em; }
.ch-scroll { overflow-y: auto; flex: 1; padding: 0 8px 14px; }
.ch-group { margin-bottom: 8px; }
.ch-gh { font-size: 12px; font-weight: 600; color: var(--text3); padding: 10px 10px 4px; }
.ch-gh .gchip { font-size: 12px; }
.ch-item { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 12px; color: var(--text); transition: background .12s; }
.ch-item:hover { background: var(--fill-soft); }
.ch-item.on { background: var(--accent); color: #fff; }
.ch-item.on small { color: rgba(255, 255, 255, .8) !important; }
.ch-item.on .ch-emoji { background: rgba(255, 255, 255, .22); }
.ch-item.on .ch-badge { background: #fff; color: var(--accent); }
.ch-item.unread .ch-t b { font-weight: 700; }
.ch-item .ava.sm { width: 36px; height: 36px; font-size: 14px; }
.ch-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ch-t b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-t small { font-size: 12.5px; color: var(--text3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-emoji { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); font-size: 17px; flex: none; }
.ch-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 600; display: grid; place-items: center; }
.ch-presets { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 6px; }
.ch-hint { font-size: 12px; color: var(--text3); padding: 12px 10px; }
.ch-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ch-main.ch-empty { justify-content: center; }
.ch-head { display: flex; align-items: center; gap: 11px; padding: 12px 18px; border-bottom: .5px solid var(--line); background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.ch-head .ch-emoji, .ch-head .ava.sm { width: 38px; height: 38px; font-size: 18px; }
.ch-head-t { min-width: 0; display: flex; flex-direction: column; }
.ch-head-t b { font-size: 15px; font-weight: 600; }
.ch-head-t small { color: var(--text3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msgs { flex: 1; overflow-y: auto; padding: 12px 10px 16px; min-height: 0; }
.msgs .empty { margin-top: 8vh; }
.msgs-more { text-align: center; padding: 6px 0 10px; }
.day-sep { text-align: center; margin: 18px 0 8px; font-size: 12px; font-weight: 500; color: var(--text3); }
.msg { position: relative; display: flex; gap: 8px; padding: 6px 10px 1px; align-items: flex-end; }
.msg.compact { padding-top: 1px; }
.msg.flash .bubble { box-shadow: 0 0 0 3px var(--accent-soft); }
.msg-ava { width: 30px; flex: none; display: flex; justify-content: center; align-self: flex-start; padding-top: 18px; }
.msg.compact .msg-ava { padding-top: 0; visibility: hidden; height: 0; }
.msg-ava .ava { width: 30px; height: 30px; font-size: 13px; }
.msg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.msg-head { display: flex; gap: 8px; align-items: baseline; padding: 0 12px; }
.msg-head b { font-size: 12px; font-weight: 600; color: var(--text2) !important; }
.msg-time { font-size: 11px; color: var(--text3); }
.bubble { max-width: min(620px, 82%); background: var(--fill); padding: 8px 13px; border-radius: 19px; transition: box-shadow .3s; }
.msg-text { font-size: 14.5px; line-height: 1.42; }
.msg-text p { margin: 0 0 .25em; }
.msg-text p:last-child { margin-bottom: 0; }
.msg-text h2, .msg-text h3, .msg-text h4, .msg-text h5 { margin: .3em 0 .2em; }
.msg-text code, .msg-text pre { background: rgba(0, 0, 0, .06); }
.msg-edited { font-size: 11px; opacity: .6; }
.msg.deleted .msg-text { color: var(--text3); font-size: 12.5px; padding: 2px 12px; }
.msg-reply { display: flex; gap: 6px; align-items: center; font-size: 12.5px; opacity: .85; border-left: 2px solid currentColor; padding: 1px 8px; margin: 2px 0 6px; cursor: pointer; max-width: 520px; }
.msg-reply b { font-weight: 600; }
.msg-reply span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.msg-imgs { display: flex; flex-wrap: wrap; gap: 6px; }
.msg-imgs img { max-width: 320px; max-height: 260px; border-radius: 18px; object-fit: cover; }
.msg-files { display: flex; flex-direction: column; gap: 6px; max-width: 420px; }
.msg-files .file-row { background: var(--fill); border-radius: 16px; }
.msg-reacts { display: flex; gap: 4px; flex-wrap: wrap; }
.react { border: 0; background: var(--card); box-shadow: 0 0 0 .5px var(--line-2), var(--shadow-1); border-radius: 980px; padding: 2px 8px; font-size: 13px; display: inline-flex; gap: 4px; align-items: center; }
.react b { font-size: 11.5px; font-weight: 600; color: var(--text2); }
.react.on { box-shadow: 0 0 0 1.5px var(--accent); }
.msg-tools { position: absolute; right: 12px; top: -10px; display: none; gap: 1px; background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: 980px; padding: 2px; box-shadow: var(--shadow-pop); z-index: 2; }
.msg:hover .msg-tools { display: flex; }
.mention { font-weight: 600; color: var(--accent-text); }
/* свои сообщения — справа, в оранжевом пузыре */
.msg.mine { flex-direction: row-reverse; }
.msg.mine .msg-ava { display: none; }
.msg.mine .msg-main { align-items: flex-end; }
.msg.mine .msg-head b { display: none; }
.msg.mine .bubble { background: var(--accent); color: #fff; }
.msg.mine .bubble a, .msg.mine .mention { color: #fff; text-decoration: underline; }
.msg.mine .msg-text code, .msg.mine .msg-text pre { background: rgba(255, 255, 255, .2); }
.msg.mine .msg-tools { right: auto; left: 12px; }
.msg.mine .msg-reacts { justify-content: flex-end; }
.composer { padding: 10px 14px 14px; border-top: .5px solid var(--line); }
.cmp-row { display: flex; gap: 8px; align-items: flex-end; }
.cmp-row textarea { resize: none; min-height: 40px; max-height: 200px; padding: 9px 16px; line-height: 1.45; border-radius: 20px; font-size: 14.5px; }
.cmp-row .icon-btn { height: 40px; width: 40px; }
.btn.cmp-send { height: 40px; width: 40px; padding: 0; flex: none; border-radius: 50%; background: var(--accent); color: #fff; }
.btn.cmp-send:hover { background: var(--accent-hover); opacity: 1; }
.cmp-ctx { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text2); padding: 6px 6px 6px 12px; margin-bottom: 8px; border-left: 2px solid var(--accent); background: var(--fill-soft); border-radius: 0 12px 12px 0; }
.cmp-ctx span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-att { display: flex; flex-wrap: wrap; gap: 8px; }
.cmp-att:not(:empty) { margin-bottom: 8px; }
.att-prog { position: absolute; left: 6px; right: 6px; bottom: 6px; height: 4px; background: var(--card); border-radius: 4px; overflow: hidden; }
.att-prog i { display: block; height: 100%; background: var(--accent); }
.pop.emoji-pop { display: flex; min-width: 0; padding: 5px; gap: 2px; border-radius: 980px; }
.pop.emoji-pop button { font-size: 21px; padding: 4px 6px; width: auto; border-radius: 50%; transition: transform .12s; }
.pop.emoji-pop button:hover { background: var(--fill); transform: scale(1.18); }
.swatch.emoji { background: var(--fill); width: 36px; height: 36px; font-size: 18px; display: grid; place-items: center; box-shadow: none; }
.swatch.emoji.on { box-shadow: 0 0 0 2px var(--accent); background: var(--accent-soft); }
@media (hover: none) {
  .msg-tools { display: flex; position: static; box-shadow: none; background: none; align-self: center; opacity: .55; }
}

/* ---------- responsive */
@media (max-width: 1200px) {
  .grid-2-1 { grid-template-columns: 1fr; }
  .ch-head .gchip { display: none; }
  .chat { grid-template-columns: 260px minmax(0, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .3s cubic-bezier(.2, .9, .3, 1); background: var(--card); box-shadow: var(--shadow-pop); }
  body.side-open .sidebar { transform: none; }
  body.side-open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .3); }
  .main { margin-left: 0; }
  .mobile-only { display: inline-grid !important; }
  .topbar { padding: 8px 14px; }
  .search-trigger kbd, .search-trigger span { display: none; }
  .search-trigger { width: auto; border-radius: 50%; padding: 8px; }
  .topbar .btn span { display: none; }
  .topbar .btn.primary { width: 36px; height: 36px; padding: 0; border-radius: 50%; }
  #view { padding: 20px 16px 56px; }
  h1 { font-size: 28px; }
  .hello h1 { font-size: 30px; }
  .hello .mark { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .gh-main { flex-direction: column; align-items: flex-start; gap: 14px; }
  .game-hero { padding: 18px 18px 20px; border-radius: 22px; }
  .glogo.xl { width: 80px; height: 80px; border-radius: 20px; }
  .gh-info h1 { font-size: 27px; }
  .gh-actions { position: absolute; top: 14px; right: 14px; }
  .gh-actions .btn span { display: none; }
  .partner span:last-child { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px 15px; gap: 8px; }
  .kpi-val { font-size: 22px; }
  .kanban { grid-template-columns: repeat(5, 82vw); scroll-snap-type: x mandatory; }
  .kcol { scroll-snap-align: start; max-height: none; }
  .cal-head h2 { min-width: 0; font-size: 20px; flex: 1; }
  .cal-dow { padding: 8px 2px 4px; text-align: center; font-size: 10.5px; }
  .cal-cell { min-height: 64px; padding: 4px; }
  .cal-num { width: 22px; height: 22px; font-size: 12px; align-self: center; }
  .cal-item { font-size: 0; padding: 0; height: 5px; border-radius: 3px; background: var(--c); }
  .vcard { flex-direction: column; gap: 8px; }
  .toolbar .search input { width: 100%; }
  .toolbar .search { flex: 1 1 100%; }
  .tabs { width: 100%; }
  .row-edit .w-label { width: 38%; }
  .modal-wrap { padding: 0; align-items: flex-end; }
  .modal { border-radius: 22px 22px 0 0; max-width: none !important; max-height: 94dvh; overflow-y: auto; }
  .modal-foot { position: sticky; bottom: 0; background: var(--card); }
  .set-row { flex-wrap: wrap; }
  .set-row input, .set-row select { width: 100%; }
  .chat, .chat.in-game { grid-template-columns: 1fr; height: calc(100dvh - 92px); min-height: 380px; border-radius: 20px; }
  .chat.has-cur .ch-list { display: none; }
  .chat:not(.has-cur) .ch-main { display: none; }
  .msg-imgs img { max-width: 100%; }
  .bubble { max-width: 88%; }
  .ch-head .gchip { display: none; }
  .toasts { bottom: 16px; }
}
