@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/fonts/onest-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/fonts/onest-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #f6f7f5; --card: #fff; --ink: #17211f; --muted: #66736f; --line: #e2e6e3; --accent: #0f766e; --accent2: #ccfbf1;
  --hot: #c2410c; --ok: #15803d; --bad: #b91c1c; --r: 12px; --h: 40px;
  font: 15px/1.45 'Onest', system-ui, sans-serif; color: var(--ink); background: var(--bg);
}
@media (pointer: coarse) { :root { --h: 44px; font-size: 16px; } }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; padding-bottom: 48px; }
h2 { font-size: 20px; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 0 0 8px; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.pad { padding: 16px; }
.small { font-size: 13px; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; margin-right: auto; white-space: nowrap; flex: none; }
.dot { width: 12px; height: 12px; border-radius: 4px; background: var(--accent); }
#schoolPick { flex: 0 1 auto; min-width: 0; width: 100%; max-width: 280px; }
@media (max-width: 480px) { .top:has(#schoolPick:not([hidden])) .brand b { display: none; } }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 8px 16px; background: var(--card); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs:empty { display: none; }
.tabs a { flex: none; height: 36px; display: flex; align-items: center; padding: 0 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 500; }
.tabs a.on { background: var(--accent2); color: var(--accent); }
main { max-width: 880px; margin: 0 auto; padding: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.stat b { display: block; font-size: 22px; }
.stat span { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 160px; }
.between { justify-content: space-between; }
button, .btn { height: var(--h); padding: 0 16px; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
button.ghost, .btn.ghost { background: transparent; color: var(--accent); }
button.sm, .btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
button.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { width: 100%; min-height: var(--h); padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; color: var(--ink); }
select { width: auto; }
textarea { min-height: 120px; resize: vertical; }
label { display: block; margin-bottom: 12px; }
label > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.check { display: flex; align-items: center; gap: 8px; min-height: var(--h); }
.check input { width: 20px; min-height: 20px; height: 20px; }
.list { display: flex; flex-direction: column; }
.item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.item:last-child { border-bottom: 0; }
.item .grow { flex: 1; min-width: 0; }
.item .one { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 12px; font-size: 12px; background: #eef1ef; color: var(--muted); white-space: nowrap; }
.pill.hot { background: #ffedd5; color: var(--hot); }
.pill.interested, .pill.talking { background: var(--accent2); color: var(--accent); }
.pill.won { background: #dcfce7; color: var(--ok); }
.pill.stop, .pill.lost, .pill.error { background: #fee2e2; color: var(--bad); }
.filters { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 12px; }
.filters button { flex: none; }
.chat { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: #e7ece9; border-radius: var(--r); min-height: 200px; max-height: 60vh; overflow-y: auto; }
.msg { max-width: 86%; padding: 8px 12px; border-radius: 12px; white-space: pre-wrap; word-wrap: break-word; }
.msg.in { align-self: flex-start; background: #fff; }
.msg.out { align-self: flex-end; background: #d9f99d; }
.msg .meta { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
.seen { white-space: pre-wrap; font: 12px/1.4 ui-monospace, monospace; background: #f1f5f4; border-radius: 8px; padding: 12px; max-height: 320px; overflow: auto; }
details summary { cursor: pointer; color: var(--accent); min-height: 32px; display: flex; align-items: center; }
.offer { display: grid; grid-template-columns: 1fr 1fr 1.4fr 32px; gap: 8px; margin-bottom: 8px; }
@media (max-width: 600px) { .offer { grid-template-columns: 1fr 112px 32px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; } .offer .det { grid-column: 1 / 3; grid-row: 2; } }
.offer button { height: var(--h); width: 32px; padding: 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { text-align: left; padding: 8px 4px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
.num { text-align: right; white-space: nowrap; }
.big { font-size: 28px; font-weight: 700; }
.note { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 12px; font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 10px; max-width: 90vw; z-index: 9; }
.login { max-width: 360px; margin: 48px auto; }
.event { font-size: 13px; padding: 4px 0; }
.event.hot { color: var(--hot); font-weight: 600; }

button, a, select, input, textarea, .card, .stat, .tabs a { transition: background-color .18s cubic-bezier(.2,.7,.2,1), border-color .18s cubic-bezier(.2,.7,.2,1), color .18s cubic-bezier(.2,.7,.2,1), transform .18s cubic-bezier(.2,.7,.2,1), box-shadow .18s cubic-bezier(.2,.7,.2,1); }
button:active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
