@font-face { font-family: "Onest"; src: url("/fonts/onest.woff") format("woff"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url("/fonts/unbounded.woff") format("woff"); font-weight: 200 900; font-display: swap; }

/* Палитра «поле»: тёмный газон в навигации, светлая рабочая зона, карточки как у судьи */
:root {
  --bg: #f3f5f1;
  --surface: #ffffff;
  --surface-2: #eef1ec;
  --ink: #14211b;
  --ink-2: #5d6a62;
  --line: #e1e6df;
  --accent: #1d8a57;
  --accent-ink: #ffffff;
  --accent-soft: #e2f3ea;
  --pitch: #0e2c22;
  --pitch-2: #163b2e;
  --chalk: rgba(255, 255, 255, .09);
  --yellow: #f2bf1d;
  --yellow-soft: #fdf3d3;
  --red: #e0393e;
  --red-soft: #fde6e6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(14, 44, 34, .06), 0 6px 18px -10px rgba(14, 44, 34, .18);
  --font: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: "Unbounded", "Onest", sans-serif;
  --side: 236px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1613; --surface: #17201c; --surface-2: #1f2a25; --ink: #e9efe9; --ink-2: #9cab9f;
    --line: #2a3630; --accent: #3cbf7d; --accent-ink: #062014; --accent-soft: #173a29;
    --pitch: #0a1f18; --pitch-2: #12302500; --yellow-soft: #3a3215; --red-soft: #3e1c1d;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 20px -12px rgba(0,0,0,.6);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); font-feature-settings: "tnum" 1; }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h2 { font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
h3 { font-size: 15.5px; font-weight: 650; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* layout: боковое «поле» на компьютере, нижние вкладки на телефоне */
.topbar { position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 20; display: flex; flex-direction: column; gap: 6px;
  padding: 22px 14px 16px; background: var(--pitch); color: #fff; overflow-y: auto;
  background-image:
    radial-gradient(circle at 50% 100%, transparent 69px, var(--chalk) 70px, var(--chalk) 72px, transparent 73px),
    linear-gradient(var(--chalk), var(--chalk));
  background-size: 100% 100%, 100% 2px; background-position: 0 0, 0 100%; background-repeat: no-repeat; }
.brand { font-family: var(--display); font-weight: 700; font-size: 14.5px; letter-spacing: -.02em; padding: 0 10px 18px;
  display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand i { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; font-style: normal; font-size: 15px; }
.brand span { color: #7fe0ad; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav button { border: 0; background: none; padding: 9px 10px; border-radius: 10px; color: rgba(255,255,255,.72); cursor: pointer;
  white-space: nowrap; display: flex; align-items: center; gap: 11px; text-align: left; font-size: 14.5px; }
.nav button svg { width: 19px; height: 19px; flex: none; opacity: .85; }
.nav button:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav button.active { background: #fff; color: var(--pitch); font-weight: 600; }
.nav button.active svg { opacity: 1; color: var(--accent); }
.nav .nbadge { margin-left: auto; }
.topbar #new-client { margin-top: 12px; background: var(--accent); color: #fff; border: 0; padding: 10px 12px; border-radius: 10px; font-weight: 600; }
.topbar #new-client:hover { filter: brightness(1.08); }
.page { margin-left: var(--side); padding: 26px 28px 40px; max-width: 1640px; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .grow { flex: 1; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.tabbar, .more-sheet { display: none; }

/* controls */
.btn { border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 10px; cursor: pointer; white-space: nowrap; font-weight: 500; }
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--red); }
.btn.sm { padding: 5px 11px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { border: 0; background: none; cursor: pointer; font-size: 18px; padding: 6px; color: var(--ink-2); }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 13px; border-radius: 8px; cursor: pointer; color: var(--ink-2); font-weight: 500; }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-weight: 600; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 9px 11px; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 4px; }
.field { margin-bottom: 12px; }
.row { display: flex; gap: 10px; align-items: end; }
.row > * { flex: 1; }
.search { max-width: 320px; }

/* kanban */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; align-items: flex-start; }
.col { flex: 0 0 272px; background: var(--surface-2); border-radius: var(--radius); padding: 10px; scroll-snap-align: start;
  max-height: calc(100vh - 150px); display: flex; flex-direction: column; }
.col-head { display: flex; align-items: baseline; gap: 8px; padding: 2px 4px 10px; }
.col-head h3 { font-size: 13px; font-weight: 600; flex: 1; }
.col-head .count { font-size: 12px; color: var(--ink-2); background: var(--surface); border-radius: 999px; padding: 1px 8px; }
.col-head .auto { font-size: 11px; color: var(--ink-2); }
.col-body { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 40px; border-radius: 8px; }
.col.drop .col-body { background: var(--accent-soft); outline: 2px dashed var(--accent); }
.card { background: var(--surface); border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow); cursor: pointer;
  border-left: 4px solid transparent; }
.card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.card.yellow { border-left-color: var(--yellow); background: var(--yellow-soft); }
.card.red { border-left-color: var(--red); background: var(--red-soft); }
.card .name { font-weight: 600; }
.card .meta { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.card .badge { display: inline-block; margin-top: 6px; font-size: 12px; background: var(--surface-2); padding: 2px 8px; border-radius: 999px; }
.card.dragging { opacity: .4; }
.empty { font-size: 13px; color: var(--ink-2); padding: 8px 4px; }
.note { font-size: 13px; color: var(--ink-2); margin: -6px 0 12px; }

/* list */
.list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row.click { cursor: pointer; }
.list-row.click:hover { background: var(--surface-2); }
.list-row .grow { flex: 1; min-width: 0; }
.pill { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.pill.green { background: var(--accent-soft); color: var(--accent); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.yellow { background: var(--yellow-soft); color: #8a6a00; }

/* drawer */
.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.25); }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(560px, 100%); background: var(--bg);
  overflow-y: auto; padding: 20px 20px 60px; box-shadow: -8px 0 30px rgba(0,0,0,.12); }
.drawer-close { position: absolute; right: 12px; top: 12px; }
.section { background: var(--surface); border-radius: var(--radius); padding: 14px; margin-top: 12px; box-shadow: var(--shadow); }
.section h3 { margin-bottom: 10px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; font-size: 14px; }
.kv dt { color: var(--ink-2); } .kv dd { margin: 0; }
.counters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.counter { background: var(--surface-2); border-radius: 10px; padding: 8px; text-align: center; }
.counter b { display: block; font-family: var(--display); font-weight: 600; font-size: 21px; line-height: 1.1; }
.counter span { font-size: 11.5px; color: var(--ink-2); }
.counter.hl { background: var(--accent-soft); } .counter.hl b { color: var(--accent); }
.quote { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 10px; }
.quote .total { font-size: 20px; font-weight: 700; }
.history { list-style: none; padding: 0; margin: 0; font-size: 13.5px; }
.history li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.history li:last-child { border: 0; }
.history .when { color: var(--ink-2); font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 10px; font-size: 13px; cursor: pointer; }

/* journal */
.mark { display: flex; gap: 6px; }
.mark button { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 13px; }
.mark button.on-present { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.mark button.on-absent { background: var(--red); color: #fff; border-color: var(--red); }

/* login: ночное поле с разметкой */
.login-wrap { min-height: 100vh; background: var(--pitch); color: #fff; display: grid; place-items: center; padding: 24px 16px;
  background-image:
    radial-gradient(circle at 50% 50%, transparent 159px, var(--chalk) 160px, var(--chalk) 162px, transparent 163px),
    radial-gradient(circle at 50% 50%, var(--chalk) 5px, transparent 6px),
    linear-gradient(90deg, transparent calc(50% - 1px), var(--chalk) calc(50% - 1px), var(--chalk) calc(50% + 1px), transparent calc(50% + 1px)); }
.login { width: min(380px, 100%); }
.login-mark { width: 46px; height: 46px; border-radius: 14px; background: var(--accent); display: grid; place-items: center; font-size: 22px; margin-bottom: 18px; }
.login h1 { font-family: var(--display); font-size: 28px; font-weight: 700; letter-spacing: -.03em; }
.login h1 span { color: #7fe0ad; }
.login-sub { color: rgba(255,255,255,.7); margin-top: 6px; }
.login form { margin-top: 24px; background: var(--surface); color: var(--ink); padding: 22px; border-radius: 18px; box-shadow: 0 20px 50px -20px rgba(0,0,0,.6); }
.login .btn.primary { padding: 11px; font-size: 15.5px; }
.error { color: var(--red); font-size: 13px; margin-top: 8px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 10px; z-index: 100; font-size: 14px; max-width: calc(100% - 32px); }
.toast.err { background: var(--red); color: #fff; }

@media (max-width: 760px) {
  .topbar { position: sticky; inset: auto; top: 0; width: auto; height: auto; flex-direction: row; align-items: center;
    padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); background-image: none; }
  .brand { padding: 0; font-size: 15.5px; flex: 1; } .brand i { width: 26px; height: 26px; font-size: 13px; }
  .topbar .nav { display: none; }
  .topbar #new-client { margin: 0; padding: 7px 12px; font-size: 14px; }
  .page { margin-left: 0; padding: 16px 12px calc(84px + env(safe-area-inset-bottom)); }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--pitch);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .tabbar button { flex: 1; border: 0; background: none; color: rgba(255,255,255,.65); display: flex; flex-direction: column;
    align-items: center; gap: 3px; font-size: 11px; padding: 4px 2px; border-radius: 10px; position: relative; }
  .tabbar button svg { width: 22px; height: 22px; }
  .tabbar button.active { color: #fff; } .tabbar button.active svg { color: #7fe0ad; }
  .tabbar .nbadge { position: absolute; top: 0; left: 55%; margin: 0; }
  .more-sheet:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.3); }
  .more-sheet .sheet { position: absolute; left: 8px; right: 8px; bottom: calc(76px + env(safe-area-inset-bottom)); background: var(--surface);
    border-radius: 16px; padding: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
  .more-sheet button { display: flex; width: 100%; gap: 12px; align-items: center; border: 0; background: none; padding: 12px; border-radius: 10px; font-size: 15px; text-align: left; }
  .more-sheet button svg { width: 20px; height: 20px; color: var(--accent); }
  .more-sheet button.active { background: var(--accent-soft); font-weight: 600; }
  .col { flex-basis: 86vw; max-height: none; }
  .counters { grid-template-columns: repeat(2, 1fr); }
  .kv { grid-template-columns: 96px 1fr; }
  .search { max-width: none; }
  h2 { font-size: 19px; }
}

@media (max-width: 640px) {
  .row { flex-wrap: wrap; }
  .row > * { min-width: 140px; }
}

/* dashboard — по образцу ERP */
:root { --dash-blue: #1f7a4d; --dash-blue-soft: rgba(31,122,77,.18); --dash-pink: #d9a441; --dash-pink-soft: rgba(217,164,65,.14);
  --up: #2e8b57; --down: #d64541; --dash-head-2: #6aab86; }
@media (prefers-color-scheme: dark) { :root { --dash-blue: #3fb37a; --dash-blue-soft: rgba(63,179,122,.22); --dash-head-2: #2b5e43; } }
.dash-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.dash-filters select { width: auto; min-width: 170px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.kpi, .panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.kpi-head { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; color: var(--ink); }
.kpi-icon { width: 34px; height: 34px; color: var(--dash-blue); flex: none; }
.kpi-body { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.kpi-value { font-family: var(--display); font-size: 30px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.kpi-value small { font-size: 17px; font-weight: 600; }
.kpi-deltas { border-left: 1px solid var(--line); padding-left: 16px; display: grid; gap: 4px; }
.delta { display: flex; gap: 8px; font-size: 14px; color: var(--ink); white-space: nowrap; }
.delta b { font-weight: 500; } .delta .up { color: var(--up); } .delta .down { color: var(--down); }
.kpi-note { font-size: 12px; color: var(--ink-2); margin-top: 8px; }
.dash-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.panel.center { text-align: center; display: flex; flex-direction: column; justify-content: center; }
.day-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.day-table th { font-size: 13px; font-weight: 600; text-align: center; padding: 6px; }
.day-table td { padding: 8px 6px; border-top: 1px solid var(--line); text-align: center; }
.day-table td:first-child { text-align: right; color: var(--ink-2); }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.chart-grid .panel { padding: 0 0 14px; overflow: hidden; }
.panel-head { background: var(--dash-blue); color: var(--accent-ink, #fff); padding: 14px 18px; font-size: 15px; margin-bottom: 12px; }
.panel-tabs { display: flex; margin-bottom: 12px; }
.panel-tabs button { flex: 1; border: 0; padding: 14px 18px; text-align: left; font-weight: 600; background: var(--dash-head-2); color: #fff; cursor: pointer; }
.panel-tabs button.active { background: var(--dash-blue); }
.chart-legend { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.lg { display: inline-block; width: 34px; height: 11px; border-radius: 2px; margin-left: 10px; }
.lg.cur { background: var(--dash-blue-soft); border: 2px solid var(--dash-blue); }
.lg.prev { background: var(--dash-pink-soft); border: 2px solid var(--dash-pink); }
.line-chart { width: 100%; height: auto; padding: 0 10px; }
.line-chart .grid { stroke: var(--line); }
.line-chart .tick { font-size: 11px; fill: var(--ink-2); }
.line-chart .area.cur { fill: var(--dash-blue-soft); } .line-chart .area.prev { fill: var(--dash-pink-soft); }
.line-chart .ln { fill: none; stroke-width: 2.5; stroke-linejoin: round; }
.line-chart .ln.cur { stroke: var(--dash-blue); } .line-chart .ln.prev { stroke: var(--dash-pink); }
.line-chart .pt.cur { fill: var(--dash-blue); } .line-chart .pt.prev { fill: #fff; stroke: var(--dash-pink); stroke-width: 1.5; }
.funnel2 { padding: 6px 18px; display: grid; gap: 10px; }
.fn-row { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 12px; }
.fn-track { display: flex; justify-content: center; }
.fn-bar { height: 34px; border-radius: 2px; }
.fn-label { font-size: 13.5px; color: var(--ink-2); }
.fn-label b { color: var(--ink); font-weight: 600; }
.donut-wrap { display: flex; align-items: center; gap: 18px; padding: 6px 18px; }
.donut { width: 190px; flex: none; }
.donut-legend { list-style: none; margin: 0; padding: 0; font-size: 13.5px; display: grid; gap: 8px; }
.donut-legend span { display: inline-block; width: 26px; height: 12px; margin-right: 8px; vertical-align: -1px; }
@media (max-width: 1000px) { .kpis { grid-template-columns: 1fr 1fr; } .chart-grid, .dash-row2 { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .kpis { grid-template-columns: 1fr; } .kpi-value { font-size: 28px; }
  .donut-wrap { flex-direction: column; } .fn-row { grid-template-columns: 1fr; gap: 4px; }
  .dash-filters select { flex: 1; min-width: 0; }
}

.enr { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 10px; }
.enr-head { display: flex; align-items: center; gap: 8px; }
.enr-head b { flex: 1; }
.chip.day { min-width: 40px; text-align: center; color: var(--ink-2); }
.chip.day.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chips select { font-size: 13px; }

.fill2 { display: flex; gap: 18px; }
.fill2 > span { display: block; white-space: nowrap; }
.fill2 em { display: block; font-style: normal; font-family: var(--font); font-size: 12.5px; color: var(--ink-2); font-weight: 400; }

/* чаты и звонки */
.nbadge { display: inline-block; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 999px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.nbadge.static { margin: 4px 0 0; }
.right { text-align: right; flex: none; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill.ch-telegram { background: #e3f0fb; color: #1f6fb2; }
.pill.ch-max { background: #ece6fb; color: #5b3fc4; }
.pill.ch-whatsapp { background: #e1f5e6; color: #1b8a3c; }
@media (prefers-color-scheme: dark) {
  .pill.ch-telegram { background: #1d2f40; color: #7fb7e6; } .pill.ch-max { background: #2a2342; color: #b3a1f0; }
  .pill.ch-whatsapp { background: #1b3323; color: #79d190; }
}
.feed { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; padding: 4px 2px; }
.chat-feed { max-height: none; margin-top: 12px; }
.msg { max-width: 85%; padding: 8px 11px; border-radius: 12px; background: var(--surface-2); align-self: flex-start; font-size: 14px; }
.section .msg { background: var(--surface-2); }
.msg.out { align-self: flex-end; background: var(--accent-soft); }
.msg.err { outline: 1px solid var(--red); }
.msg-text { white-space: pre-wrap; word-wrap: break-word; }
.msg-meta { font-size: 11.5px; color: var(--ink-2); margin-top: 3px; }
.msg-img { max-width: 220px; max-height: 260px; border-radius: 8px; display: block; margin-bottom: 4px; }
.msg audio, .call-row audio, .list-row audio { width: 100%; max-width: 300px; height: 34px; margin-top: 6px; display: block; }
.call-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; border: 1px dashed var(--line); font-size: 14px; }
.call-row.missed, .row-missed { background: var(--red-soft); }
.call-ico { font-size: 18px; color: var(--ink-2); width: 20px; text-align: center; }
.composer { margin-top: 10px; display: grid; gap: 8px; }
.composer textarea { resize: vertical; min-height: 44px; }
.composer.sticky { position: sticky; bottom: -60px; background: var(--bg); padding: 10px 0 12px; }
.int { border-top: 1px solid var(--line); padding: 12px 0 4px; }
.int-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.int-head b { flex: 1; }
.copy { display: flex; gap: 6px; } .copy input { font-size: 12.5px; }
.log-row { border-top: 1px solid var(--line); padding: 6px 0; }
.log-row pre { white-space: pre-wrap; word-break: break-all; font-size: 11.5px; margin: 4px 0 0; color: var(--ink-2); }
.alert { margin-top: 10px; background: var(--red-soft); color: var(--red); border-radius: 10px; padding: 8px 12px; font-size: 13.5px; }

/* результаты тренеров */
.hero { background: linear-gradient(135deg, var(--accent), #2f9e66); color: #fff; border-radius: 16px; padding: 20px 22px;
  box-shadow: var(--shadow); position: relative; overflow: hidden; }
.hero::after { content: "⚽"; position: absolute; right: -10px; bottom: -24px; font-size: 120px; opacity: .14; transform: rotate(-15deg); }
.hero-place { display: flex; align-items: center; gap: 10px; font-size: 42px; line-height: 1; }
.hero-place span { font-size: 15px; font-weight: 600; background: rgba(255,255,255,.2); padding: 4px 12px; border-radius: 999px; }
.hero h3 { font-family: var(--display); font-weight: 600; font-size: 21px; margin-top: 12px; line-height: 1.25; max-width: 640px; }
.hero-sub { margin-top: 8px; font-size: 15px; opacity: .92; max-width: 640px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.hero-badges span { background: rgba(255,255,255,.22); border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.tile { background: var(--surface); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.tile-head { font-size: 13.5px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.tile-emoji { font-size: 24px; }
.tile-big { font-family: var(--display); font-size: 34px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.tile-line { font-size: 14px; }
.tile-joke { margin-top: auto; padding-top: 8px; font-size: 13.5px; color: var(--accent); font-weight: 600; }
.bar { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.league { margin-top: 16px; }
.league h3 { font-size: 17px; margin-bottom: 4px; }
.league-rows { display: grid; gap: 10px; }
.lrow { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.lrow.me { background: var(--accent-soft); outline: 2px solid var(--accent); }
.lplace { font-size: 30px; width: 40px; text-align: center; font-weight: 700; color: var(--ink-2); line-height: 1.2; }
.lmain { flex: 1; min-width: 0; }
.lname { font-weight: 700; font-size: 15.5px; }
.lbar { position: relative; height: 28px; margin: 8px 0; background: var(--surface); border-radius: 8px; overflow: hidden; display: flex; align-items: center; }
.lbar i { position: absolute; inset: 0 auto 0 0; background: var(--dash-blue-soft); border-right: 3px solid var(--accent); }
.lbar b { position: relative; padding-left: 10px; font-size: 14px; }
.lbar em { position: relative; margin-left: 8px; font-style: normal; font-size: 12.5px; font-weight: 700; }
.lbar em.up { color: var(--up); } .lbar em.down { color: var(--down); }
.lfacts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-2); }
.noms { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.nom { display: flex; gap: 12px; align-items: center; background: var(--surface); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
.nom.mine { outline: 2px solid var(--yellow); background: var(--yellow-soft); }
.nom-emoji { font-size: 34px; }
.nom-title { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.nom-who { font-size: 17px; font-weight: 700; margin: 2px 0; }
.how summary { cursor: pointer; font-weight: 600; }
.how ul { margin: 10px 0 0; padding-left: 18px; font-size: 14px; display: grid; gap: 6px; }
@media (max-width: 1000px) { .tiles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  .tiles { grid-template-columns: 1fr; } .tile-big { font-size: 32px; }
  .hero h3 { font-size: 19px; } .lplace { width: 30px; font-size: 24px; }
}

/* рабочий стол */
h2.sub { font-size: 17px; }
.now { background: var(--surface); border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.now.calm { background: var(--accent-soft); border-color: transparent; }
.now-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.now-head h3 { font-family: var(--display); font-weight: 600; font-size: 17px; }
.now-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; max-height: 340px; overflow-y: auto; }
.now-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.now-item.red { background: var(--red-soft); }
.now-item .grow { flex: 1 1 0; min-width: 0; }
.now-item .when { white-space: nowrap; }
.now-act { display: flex; gap: 6px; flex: none; }
.ref-card { display: inline-block; width: 13px; height: 18px; border-radius: 2.5px; transform: rotate(10deg); flex: none;
  box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.ref-card.red { background: var(--red); } .ref-card.yellow { background: var(--yellow); }
.card { position: relative; border-left: 0; border: 1px solid transparent; }
.card .ref-card { position: absolute; top: 10px; right: 12px; }
.card.yellow { border-color: #f2d77a; background: var(--yellow-soft); }
.card.red { border-color: #f3aeb0; background: var(--red-soft); }
.card .name { padding-right: 18px; }
.col { background: var(--surface-2); border-radius: 16px; }
.col-head h3 { font-size: 13.5px; }
@media (max-width: 760px) {
  .now { padding: 14px 12px; border-radius: 16px; }
  .now-item { flex-wrap: wrap; } .now-item .grow { flex-basis: calc(100% - 30px); } .now-item .when { order: 2; flex: 1; text-align: right; }
  .now-act { justify-content: flex-end; order: 3; }
  .now-list { max-height: 300px; }
  .now-head h3 { font-size: 16px; }
}

/* аналитика звонков */
.cstats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.cstat { background: var(--surface); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.cstat span { font-size: 13px; color: var(--ink-2); }
.cstat b { font-family: var(--display); font-weight: 600; font-size: 24px; line-height: 1.15; }
.cstat b small { font-family: var(--font); font-size: 13px; font-weight: 500; color: var(--ink-2); }
.cstat.warn { background: var(--red-soft); }
.trend { font-size: 12.5px; font-weight: 600; } .trend.good { color: var(--up); } .trend.bad { color: var(--down); }
.table-wrap { overflow-x: auto; }
.optable { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
.optable th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.optable td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.optable tr:last-child td { border-bottom: 0; }
.hours { display: flex; gap: 6px; align-items: flex-end; height: 140px; }
.hcol { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.hcol i { width: 100%; max-width: 34px; background: var(--red); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.hcol i.zero { background: var(--line); }
.hcol span { font-size: 11.5px; color: var(--ink-2); }
.panel.soon { background: var(--surface-2); box-shadow: none; border: 1px dashed var(--line); }
.panel h3 { margin-bottom: 4px; }
@media (max-width: 1100px) { .cstats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .cstats { grid-template-columns: 1fr 1fr; } .cstat b { font-size: 21px; } .hours { gap: 3px; } }

/* разбор звонков */
.ai-chip { display: inline-flex; gap: 6px; align-items: center; margin-top: 6px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 3px 10px; font-size: 12.5px; cursor: pointer; color: var(--ink); }
.ai-chip.wait { cursor: default; color: var(--ink-2); border-style: dashed; }
.s-good { color: var(--up); } .s-mid { color: #b8860b; } .s-bad { color: var(--red); }
.bar i.s-good { background: var(--accent); } .bar i.s-mid { background: var(--yellow); } .bar i.s-bad { background: var(--red); }
.ai-head { display: flex; gap: 14px; align-items: flex-start; }
.ai-head p { margin: 6px 0 0; }
.ai-score { font-family: var(--display); font-weight: 700; font-size: 36px; line-height: 1; flex: none; }
.ai-score small { font-size: 15px; color: var(--ink-2); font-weight: 500; }
.ai-score.sm { font-size: 20px; width: 34px; text-align: center; }
.ai-good { background: var(--accent-soft); border-radius: 10px; padding: 8px 12px; }
.ai-tips { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 6px; }
.cklist { display: grid; gap: 6px; font-size: 14px; }
.ck { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; margin-right: 8px; font-size: 12px; font-weight: 700; }
.ck.ok { background: var(--accent-soft); color: var(--accent); } .ck.no { background: var(--red-soft); color: var(--red); }
.ck.na { background: var(--surface-2); color: var(--ink-2); }
.transcript { white-space: pre-wrap; font: inherit; font-size: 13.5px; margin: 0; line-height: 1.6; }
.ai-weak { background: var(--yellow-soft); border-radius: 10px; padding: 10px 12px; margin-top: 8px; font-size: 14.5px; }
.steps { display: grid; gap: 8px; }
.step { display: grid; grid-template-columns: minmax(0, 1fr) 160px 44px; gap: 12px; align-items: center; font-size: 14px; }
.step.weak span { font-weight: 700; }
.step b { text-align: right; }
.chip.on-chip { background: var(--ink); color: var(--bg); border-color: var(--ink); }
@media (max-width: 760px) { .step { grid-template-columns: 1fr 70px 40px; font-size: 13px; } }

/* задачи */
.tasks-box .now-head { align-items: center; }
.task-group h4 { font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin: 12px 0 6px; }
.task-group.late h4 { color: var(--red); }
.task { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); margin-bottom: 6px; }
.task-group.late .task { background: var(--red-soft); }
.task-group.later .task { opacity: .75; }
.task .grow { flex: 1; min-width: 0; }
.task .when { white-space: nowrap; padding-top: 2px; }
.task-ico { font-size: 20px; line-height: 1.2; }
.task-done { display: flex; gap: 6px; margin-top: 8px; }
.task-done input { padding: 6px 10px; }
.linkish { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; }
/* стол тренера */
.today-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.today-card { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 16px; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.today-card:hover { border-color: var(--accent); }
.today-card.ok { background: var(--accent-soft); border-color: transparent; }
.today-time { font-family: var(--display); font-weight: 700; font-size: 26px; }
.today-name { font-weight: 650; font-size: 16px; }
.today-facts { display: flex; gap: 12px; font-size: 14px; margin: 4px 0; }
@media (max-width: 760px) { .task { flex-wrap: wrap; } .task .grow { flex-basis: calc(100% - 34px); } .task .when { flex: 1; text-align: right; } }
.task-done[hidden] { display: none; }
.struck { opacity: .5; } .struck b { text-decoration: line-through; }
.src-ch { border-top: 1px solid var(--line); padding: 8px 0; } .src-ch summary { cursor: pointer; }
.bday { background: var(--yellow-soft); border-radius: 10px; padding: 6px 10px; font-size: 13.5px; } .bday-box { background: var(--yellow-soft); border-color: transparent; }

/* расписание */
.sched-day { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.sched-day.compact { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.sched-br { background: var(--surface); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); border-top: 4px solid var(--br); }
.sched-widget .sched-br { background: var(--surface-2); box-shadow: none; }
.sched-br-head { display: flex; flex-direction: column; margin-bottom: 4px; }
.sched-staff { font-size: 13px; margin-bottom: 8px; color: var(--ink-2); }
.sched-staff b { color: var(--ink); font-weight: 600; }
.sched-l { display: flex; gap: 10px; align-items: baseline; width: 100%; text-align: left; border: 0; background: none; padding: 7px 4px;
  border-top: 1px solid var(--line); cursor: pointer; border-radius: 6px; }
.sched-l:hover { background: var(--surface-2); }
.sched-t { font-family: var(--display); font-weight: 600; font-size: 14px; width: 46px; flex: none; }
.sched-widget summary { cursor: pointer; list-style: none; } .sched-widget summary::-webkit-details-marker { display: none; }
.week { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 8px; overflow-x: auto; }
.week-col h4 { font-size: 13px; margin: 0 0 6px; color: var(--ink-2); }
.week-l { display: block; width: 100%; text-align: left; border: 0; border-left: 4px solid var(--br); background: var(--surface); border-radius: 8px;
  padding: 7px 9px; margin-bottom: 6px; font-size: 13px; cursor: pointer; box-shadow: var(--shadow); }
.week-l span { display: block; color: var(--ink-2); font-size: 12px; }
.br-block { border-top: 1px solid var(--line); padding: 12px 0; }
.br-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; flex-wrap: wrap; }
.br-head .btn { margin-left: auto; }
.shift-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.shift-form select { width: auto; } .shift-form input[type=time] { width: 110px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink); }
.check input { width: auto; }
@media (max-width: 760px) { .week { grid-template-columns: repeat(7, 78vw); } .sched-day { grid-template-columns: 1fr; } }
.pay-list.folded li:nth-child(n+5) { display: none; }
.sched-l > .small { white-space: nowrap; }
.consents { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; } .consents > div { flex-basis: 100%; } .ledit { padding: 8px 0 12px; }
.sched-lw { display: flex; gap: 6px; align-items: stretch; }
.sched-lw .sched-l { flex: 1; min-width: 0; }
.sched-lw .sub-btn { flex: 0 0 auto; align-self: center; }
.sub-form { background: var(--surface-2, #f3f5f1); border-radius: 12px; padding: 10px 12px; margin: 4px 0 8px; }
.viewas { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-radius: 12px; margin-bottom: 12px; background: var(--surface-2, #f3f5f1); font-size: 14px; }
.viewas select { width: auto; min-width: 200px; flex: 0 1 auto; }
.viewas.on { background: #fdf3d3; color: #4a3b07; }
.coach-sum .cfacts { display: flex; flex-wrap: wrap; gap: 8px; }
.cfact { display: flex; flex-direction: column; padding: 8px 14px; border-radius: 12px; background: var(--surface-2, #f3f5f1); min-width: 96px; }
.cfact b { font-size: 22px; line-height: 1.1; font-family: var(--font-display, inherit); }
.cfact span { font-size: 12.5px; opacity: .75; }
.cfact.green { background: #e3f4ea; } .cfact.blue { background: #e4edfb; } .cfact.yellow { background: #fdf3d3; }
.today-card.is-sub { outline: 2px dashed #e0a800; }
.sub-flag { font-size: 13px; font-weight: 600; color: #8a6400; margin-bottom: 6px; }
.kid-list { margin: 6px 0; } .kid-list summary { cursor: pointer; }
.kid-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid rgba(0,0,0,.05); }
.pill.blue { background: #e4edfb; color: #1e4fa3; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .viewas.on { background: #3a3215; color: #f5e7b5; }
  :root:not([data-theme="light"]) .cfact.green { background: #173826; } :root:not([data-theme="light"]) .cfact.blue { background: #1a2a45; } :root:not([data-theme="light"]) .cfact.yellow { background: #3a3215; }
  :root:not([data-theme="light"]) .pill.blue { background: #1a2a45; color: #a9c4f5; }
}
.today-card { cursor: default; } .today-card:hover { border-color: var(--line); } .today-card.ok:hover { border-color: transparent; }
.sub-form .row { flex-wrap: wrap; }
.sub-form .row > .field { flex: 1 1 100%; min-width: 0; margin-bottom: 4px; }
.sched-lw .sub-btn { padding: 4px 7px; border-color: transparent; background: transparent; opacity: .55; }
.sched-lw .sub-btn:hover { opacity: 1; border-color: var(--line); }
.checkin-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.checkin-row:last-child { border-bottom: 0; }
.staff-pick { margin: 8px 0; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.staff-pick .field { min-width: 130px; margin-bottom: 0; }
.sched-l .pill { white-space: normal; display: inline-block; margin-top: 3px; }
.chip input[type=checkbox] { margin: 0 4px 0 0; vertical-align: -2px; }
.merch-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; margin: 8px 0 12px; }
.merch-it { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.merch-it.on { border-color: var(--accent); background: var(--accent-soft); }
.merch-it b { min-width: 18px; text-align: center; }
.merch-form .seg { flex-wrap: wrap; }
.cfacts { display: flex; flex-wrap: wrap; gap: 8px; }
.merch-form .row { flex-wrap: wrap; }
.merch-form [data-msave] { flex: 1 1 auto !important; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; width: 100%; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; font-size: 18px; padding: 6px 8px; cursor: pointer; line-height: 1; }
.task.done { opacity: .6; } .task-form textarea { width: 100%; }
.chips[hidden], .sub-form[hidden] { display: none !important; } .team-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .team-head b { flex: 1; }
.deal { padding: 8px 0; border-top: 1px solid var(--line); }
.back-btn { border: 0; background: none; color: var(--accent); font-weight: 600; font-size: 15px; padding: 4px 0 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; } .back-btn:hover { text-decoration: underline; }
.week-board .col { flex: 0 0 236px; display: flex; flex-direction: column; }
.week-board .col.is-today { outline: 2px solid var(--accent); background: var(--accent-soft); }
.week-board .col.past { opacity: .75; }
.week-board .col-body { min-height: 80px; }
.week-board .empty { font-size: 12.5px; color: var(--ink-2); padding: 6px 4px; }
.overdue-col { margin-bottom: 12px; background: var(--red-soft, #fde8e8); }
.overdue-col .col-body { flex-direction: row; flex-wrap: wrap; }
.overdue-col .pcard { flex: 0 1 240px; }
.pcard { display: flex; gap: 8px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 9px 10px; cursor: grab; position: relative; }
.pcard.hot { border-left: 3px solid var(--red, #e5484d); }
.pcard.done { opacity: .55; cursor: default; }
.pcard.done .ptitle { text-decoration: line-through; }
.pcard.dragging { opacity: .4; }
.pcheck input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.ptitle { font-size: 13.5px; font-weight: 600; line-height: 1.3; word-break: break-word; }
.pmeta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11.5px; color: var(--ink-2); margin-top: 3px; }
.pnote { font-size: 12px; color: var(--ink-2); margin-top: 3px; white-space: pre-wrap; }
.pmove { border: 0; background: none; cursor: pointer; font-size: 14px; opacity: .45; padding: 0 2px; }
.pmove:hover { opacity: 1; }
.pquick { margin-top: 8px; border: 1px dashed var(--line); background: transparent; border-radius: 10px; padding: 7px 9px; font-size: 13px; width: 100%; }
.pquick:focus { background: var(--surface); border-style: solid; }
@media (max-width: 700px) { .week-board .col { flex-basis: 82vw; } }
@media (min-width: 1100px) {
  .week-board { overflow-x: visible; }
  .week-board .col { flex: 1 1 0; min-width: 0; }
}
.week-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.week-nav select { width: auto; max-width: 240px; margin-left: auto; }
.ptitle { word-break: normal; overflow-wrap: break-word; hyphens: auto; }
@media (min-width: 1100px) {
  .week-board .col { min-width: 150px; }
  .week-board { overflow-x: auto; }
  .pmove { display: none; }
  .pcard:hover .pmove { display: block; }
  .pcard { padding: 8px; gap: 6px; }
}
@media (max-width: 700px) { .week-nav select { margin-left: 0; max-width: 100%; flex: 1 1 100%; } }
.abs-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.abs-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--surface-2); border-radius: 999px; padding: 4px 6px 4px 10px; font-size: 12.5px; }
.abs-chip button { border: 0; background: none; cursor: pointer; color: var(--ink-2); font-size: 12px; padding: 0 4px; }
.need-list { display: flex; flex-direction: column; gap: 8px; }
.need { border-radius: 14px; padding: 10px 12px; background: var(--surface-2); border-left: 4px solid var(--yellow); }
.need.red { border-left-color: var(--red, #e5484d); background: var(--red-soft, #fde8e8); }
.need-top { display: flex; align-items: center; gap: 12px; }
.need-date { display: flex; flex-direction: column; align-items: center; min-width: 44px; line-height: 1.1; }
.need-date b { font-size: 15px; }
.need-date span { font-size: 12px; color: var(--ink-2); }
.need-who { font-size: 14px; }
.need-br { font-size: 12.5px; color: var(--ink-2); }
.need-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 0 56px; }
.need-chips span { background: var(--surface); border-radius: 8px; padding: 2px 8px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .need-chips { margin-left: 0; } }
.sub-form .chips .chip { padding: 4px 10px; font-size: 13px; flex: 0 0 auto; } .sub-form .chips { gap: 6px; }
.chip input[type=checkbox] { width: auto; height: auto; padding: 0; display: inline-block; } .sub-form .chips label.chip { display: inline-flex; align-items: center; }
/* разбор звонка в стиле PDF-разборов */
.cr-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.cr-head h2 { margin: 2px 0 4px; }
.cr-kicker { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; }
.cr-score { flex: 0 0 auto; width: 76px; height: 76px; border-radius: 18px; display: flex; align-items: baseline; justify-content: center; padding-top: 18px;
  font-size: 30px; font-weight: 800; background: var(--surface-2); font-family: var(--font-display, inherit); }
.cr-score small { font-size: 13px; font-weight: 600; opacity: .6; }
.cr-score.s-good { background: #e3f4ea; color: #157347; } .cr-score.s-mid { background: #fdf3d3; color: #8a6400; } .cr-score.s-bad { background: #fde8e8; color: #b42318; }
.cr-outcome { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--accent); }
.cr-box { border-radius: 12px; padding: 12px 14px; margin: 10px 0; background: var(--surface-2); font-size: 14px; line-height: 1.5; }
.cr-box b { display: block; margin-bottom: 4px; }
.cr-box.green { background: #e9f6ee; border: 1px solid #b7e2c7; } .cr-box.green b { color: #157347; }
.cr-box.blue { background: #ecf2fd; border: 1px solid #bcd0f5; } .cr-box.blue b { color: #2457c5; }
.cr-points { list-style: none; padding: 0; margin: 6px 0; }
.cr-points li { position: relative; padding: 4px 0 4px 18px; font-size: 14px; line-height: 1.45; }
.cr-points li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: #2f9e62; }
.cr-points li.no::before { background: #e8892e; }
.cr-points li.focus::before { background: #3b73e0; }
.dlg { display: flex; flex-direction: column; gap: 8px; }
.dlg-r { border-radius: 12px; padding: 8px 12px; font-size: 14px; line-height: 1.45; max-width: 92%; }
.dlg-r span { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 2px; }
.dlg-r.adm { background: #ecf2fd; border: 1px solid #bcd0f5; } .dlg-r.adm span { color: #2457c5; }
.dlg-r.cli { background: #fff4e8; border: 1px solid #f6cf9f; margin-left: auto; } .dlg-r.cli span { color: #c56a12; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 600; color: var(--ink-2); padding: 6px 8px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.tbl td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--surface-2); }
.focus-box { border: 1px solid #bcd0f5; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cr-box.green { background: #173826; border-color: #24553a; }
  :root:not([data-theme="light"]) .cr-box.blue, :root:not([data-theme="light"]) .dlg-r.adm { background: #1a2a45; border-color: #2c4370; }
  :root:not([data-theme="light"]) .dlg-r.cli { background: #3a2a15; border-color: #5b4220; }
}

.cr-outcome.s-mid { color: #8a6400; } .cr-outcome.s-bad { color: #b42318; } .cr-outcome.s-good { color: #157347; }
.cr-box.amber { background: #fdf6e3; border: 1px solid #f1dfa8; } .cr-box.amber b { color: #8a6400; }
@media (prefers-color-scheme: dark) {
  .cr-box.green { background: rgba(21,115,71,.18); border-color: rgba(63,179,122,.4); } .cr-box.green b { color: #5fd09a; }
  .cr-box.blue { background: rgba(36,87,197,.18); border-color: rgba(100,140,230,.4); } .cr-box.blue b { color: #8fb0f5; }
  .cr-box.amber { background: rgba(184,134,11,.16); border-color: rgba(220,170,40,.4); } .cr-box.amber b { color: #e3b84a; }
  .cr-score.s-good { background: rgba(21,115,71,.25); color: #5fd09a; } .cr-score.s-mid { background: rgba(184,134,11,.22); color: #e3b84a; } .cr-score.s-bad { background: rgba(180,35,24,.25); color: #f08a80; }
  .cr-outcome.s-good { color: #5fd09a; } .cr-outcome.s-mid { color: #e3b84a; } .cr-outcome.s-bad { color: #f08a80; }
}
/* аналитика */
.an-tabs { flex-wrap: wrap; margin: 0 0 14px; }
.an-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 14px; }
.an-card-h { font-weight: 700; margin-bottom: 6px; }
.an-big { font-size: 26px; font-weight: 700; margin-bottom: 6px; } .an-big small { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.an-kv { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.an-kv:last-child { border-bottom: 0; } .an-kv span { color: var(--ink-2); }
.an-fill { display: flex; align-items: center; gap: 8px; min-width: 110px; font-size: 13px; }
.an-fill span { min-width: 38px; font-variant-numeric: tabular-nums; }
.an-fill i { flex: 1; height: 6px; background: var(--surface-2); border-radius: 4px; overflow: hidden; display: block; }
.an-fill i b { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.an-fill.hi i b { background: #1f9d55; } .an-fill.lo i b { background: var(--red); }
.an-card .an-fill { margin-bottom: 8px; } .an-card .an-fill span { display: none; }
.an-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.an-tbl { min-width: 640px; } .an-tbl td.r, .an-tbl th.r { text-align: right; white-space: nowrap; }
.an-tbl tr.an-total td { font-weight: 700; background: var(--surface-2); }
.an-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
@media (max-width: 900px) { .an-two { grid-template-columns: 1fr; } }
.an-chip { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 20px; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.an-chip.bad { background: #fde8e8; color: #b42318; } .an-chip.warn { background: #fdf3d3; color: #8a6400; }
@media (prefers-color-scheme: dark) { .an-chip.bad { background: rgba(180,35,24,.25); color: #f08a80; } .an-chip.warn { background: rgba(184,134,11,.22); color: #e3b84a; } }
.list-row[hidden] { display: none !important; }
/* телефон: Safari не увеличивает страницу при вводе (шрифт полей от 16px), у карточки всегда видна кнопка «Назад» */
@media (max-width: 760px) {
  input, select, textarea { font-size: 16px; }
  .drawer-panel { padding-top: 0; overscroll-behavior: contain; }
  .drawer-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
    margin: 0 -20px 6px; padding: calc(8px + env(safe-area-inset-top)) 14px 8px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .drawer-top .drawer-close { position: static; }
  .drawer-back { border: 0; background: none; color: var(--accent); font-weight: 600; font-size: 16px; padding: 6px 4px; cursor: pointer; }
}
@media (min-width: 761px) { .drawer-back { display: none; } .drawer-top { display: contents; } }
/* предупредил о пропуске, свободные места */
.warn-box { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.warn-head { font-weight: 600; font-size: 14px; margin-bottom: 6px; } .warn-head .small { font-weight: 400; display: block; }
.warn-kid { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin: 4px 0; } .warn-kid b { min-width: 56px; font-size: 14px; }
.warn-chip.off { background: #fde8e8; color: #b42318; border-color: #f5c2bd; text-decoration: line-through; }
.warn-chip.sel { outline: 2px solid var(--accent); }
.warn-chip[disabled] { opacity: .5; }
.warn-note { margin-top: 8px; }
.slots { display: grid; gap: 6px; } .slot-day { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; } .slot-day > b { min-width: 64px; font-size: 13px; }
.chip.slot.hot { background: #fdf3d3; border-color: #f1dfa8; }
@media (prefers-color-scheme: dark) { .warn-chip.off { background: rgba(180,35,24,.25); color: #f08a80; border-color: transparent; } .chip.slot.hot { background: rgba(184,134,11,.22); border-color: transparent; } }
details.warn-box > summary { cursor: pointer; list-style: none; margin: 0; } details.warn-box > summary::-webkit-details-marker { display: none; }
details.warn-box > summary::after { content: "›"; float: right; color: var(--ink-2); transition: transform .15s; } details.warn-box[open] > summary::after { transform: rotate(90deg); }
details.warn-box[open] > summary { margin-bottom: 6px; }
.prog-box { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); margin-bottom: 10px; }
.prog-alt { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; } .prog-alt span { opacity: .55; } .prog-alt span.on { opacity: 1; }
.pill.unpaid-flag { background: #fde8e8; color: #b42318; }
.wl-card { margin-bottom: 10px; }
.wl-group { padding: 10px 0; border-top: 1px solid var(--line); } .wl-group:first-of-type { border-top: 0; }
.wl-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.wl-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } @media (max-width: 700px) { .wl-cols { grid-template-columns: 1fr; } }
.wl-row { display: flex; gap: 6px; align-items: center; padding: 4px 0; font-size: 14px; } .wl-row.click, .wl-row .click { cursor: pointer; }
#wl-form .field, .prog-form .field { min-width: 150px; }
.card .due { font-size: 12px; margin-top: 6px; color: var(--ink-2); } .card .due.yellow { color: #8a6400; font-weight: 600; } .card .due.red { color: #b42318; font-weight: 600; }
.board-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 8px; color: var(--ink-2); }
.rb-kid { padding: 8px 0; border-bottom: 1px solid var(--line); } .rb-kid:last-child { border-bottom: 0; }
.rb-tabs button { padding: 6px 10px; }
.red-box { border: 1px solid #f5c2bd; }
.to-bar { margin-bottom: 6px; } .to-box { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.to-slot { display: flex; gap: 8px; align-items: center; padding: 5px 0; border-top: 1px solid var(--line); font-size: 14px; }
.sd-wrap { max-width: 760px; margin: 0 auto; } .sd-check { display: flex; gap: 10px; align-items: center; cursor: pointer; font-size: 15px; }
.sd-check input { width: 20px; height: 20px; flex: 0 0 auto; } .sd-doc details { margin-top: 6px; }
.legal-text { font-size: 13.5px; line-height: 1.55; max-height: 340px; overflow: auto; padding: 8px 10px; background: var(--surface-2); border-radius: 10px; margin-top: 6px; }
.legal-text h1, .legal-text h2 { font-size: 16px; margin: 0 0 8px; }

/* ---------- «Встречаю детей»: крупные плитки для телефона ---------- */
.meet-open { width: 100%; padding: 14px; font-size: 17px; margin: 10px 0 4px; border-radius: 12px; }
.meet { padding-bottom: 96px; }
.meet-head { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; margin-bottom: 12px; position: sticky; top: 8px; z-index: 5; }
.meet-title { font-family: var(--display); font-size: 17px; line-height: 1.25; }
.meet-count { text-align: center; min-width: 74px; }
.meet-count b { display: block; font-family: var(--display); font-size: 34px; line-height: 1; color: var(--accent); }
.meet-count span { font-size: 13px; color: var(--ink-2); }
.meet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.meet-tile { position: relative; min-height: 92px; padding: 14px 12px 12px; border-radius: 16px; border: 2px solid var(--line);
  background: var(--surface); color: var(--ink); text-align: left; font: inherit; cursor: pointer; display: flex; flex-direction: column;
  justify-content: space-between; gap: 6px; box-shadow: var(--shadow); -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: transform .08s, background .15s, border-color .15s; }
.meet-tile:active { transform: scale(.97); }
.meet-name { font-size: 18px; font-weight: 600; line-height: 1.2; padding-right: 30px; }
.meet-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.meet-tags .pill { font-size: 11px; }
.meet-check { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line);
  display: grid; place-items: center; font-size: 16px; color: transparent; }
.meet-tile.yes { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.meet-tile.yes .meet-check { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--accent); }
.meet-tile.yes .pill { background: rgba(255,255,255,.22); color: inherit; }
.meet-tile.no { border-color: var(--red); background: var(--red-soft); }
.meet-tile.away { opacity: .6; min-height: 70px; }
.meet-tile.away.yes { opacity: 1; }
.meet-tile:disabled { opacity: .5; cursor: default; }
.meet-sub { margin: 20px 2px 10px; font-size: 15px; color: var(--ink-2); }
.meet-foot { position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); padding: 10px 16px;
  background: linear-gradient(transparent, var(--bg) 35%); z-index: 6; }
.meet-done { width: 100%; padding: 16px; font-size: 16px; border-radius: 14px; max-width: 720px; margin: 0 auto; display: block; }
@media (min-width: 761px) { .meet-foot { left: var(--side); bottom: 0; } }
@media (max-width: 380px) { .meet-grid { grid-template-columns: 1fr 1fr; } .meet-name { font-size: 16px; } }
@media (max-width: 760px) { .meet-head { top: 62px; } }

/* ===================================================================
   «Новый дизайн (проба)»: включается в Настройках, класс theme-soft на <html>.
   Выключили — работает прежний вид. Светлый нейтральный фон, белые карточки
   без рамок, крупные цифры, спокойные мягкие цвета, светлые шапка и нижнее меню.
   =================================================================== */
html.theme-soft {
  --bg: #f2f2f5; --surface: #ffffff; --surface-2: #efeff3; --ink: #1d1d22; --ink-2: #8b8b94; --line: #ececf0;
  --accent: #23a26d; --accent-ink: #ffffff; --accent-soft: #e6f6ee;
  --yellow: #e8b21a; --yellow-soft: #fdf4d9; --red: #e5484d; --red-soft: #fdecec;
  --radius: 20px; --shadow: none;
  --display: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --soft-violet: #e9e6fb; --soft-violet-ink: #4b3fb0;
}
@media (prefers-color-scheme: dark) {
  html.theme-soft { --bg: #111114; --surface: #1c1c21; --surface-2: #26262c; --ink: #f1f1f4; --ink-2: #9a9aa3; --line: #2b2b31;
    --accent: #3cc287; --accent-ink: #06210f; --accent-soft: #163327; --yellow-soft: #3a3115; --red-soft: #3b1c1e;
    --soft-violet: #2a2640; --soft-violet-ink: #c9c1ff; }
}
html.theme-soft body { background: var(--bg); color: var(--ink); }
html.theme-soft h2 { font-weight: 700; letter-spacing: -.025em; font-size: 26px; }
html.theme-soft h3, html.theme-soft .now-head h3 { font-weight: 650; font-size: 17px; letter-spacing: -.01em; }
/* шапка и меню: светлые, как в банковских приложениях */
html.theme-soft .topbar { background: var(--surface); color: var(--ink); background-image: none; border-right: 1px solid var(--line); }
html.theme-soft .brand { color: var(--ink); font-weight: 700; }
html.theme-soft .brand span { color: var(--accent); }
html.theme-soft .brand i { background: var(--accent-soft); }
html.theme-soft .topbar .nav button { color: var(--ink-2); }
html.theme-soft .topbar .nav button.active { background: var(--surface-2); color: var(--ink); }
html.theme-soft .topbar #new-client { background: var(--accent); color: #fff; border-radius: 14px; }
html.theme-soft .tabbar { background: var(--surface); border-top: 1px solid var(--line); }
html.theme-soft .tabbar button { color: #a3a3ab; font-weight: 500; }
html.theme-soft .tabbar button.active, html.theme-soft .tabbar button.active svg { color: var(--accent); }
/* карточки: белые, без рамок и теней, крупные скругления, воздух */
html.theme-soft .now, html.theme-soft .panel, html.theme-soft .kpi, html.theme-soft .section, html.theme-soft .list {
  border: 0; box-shadow: none; border-radius: var(--radius); }
html.theme-soft .now { padding: 18px 18px 16px; }
html.theme-soft .now + .now, html.theme-soft section + section { margin-top: 12px; }
html.theme-soft .now-item { border-radius: 16px; padding: 12px 14px; }
html.theme-soft .now.calm { background: var(--accent-soft); }
html.theme-soft .now:has(.now-item.red) { background: var(--red-soft); }
html.theme-soft .now:has(.now-item.red) .now-item.red { background: var(--surface); }
html.theme-soft .list-row { border-bottom-color: var(--line); padding: 14px 16px; }
html.theme-soft .card { border-radius: 16px; box-shadow: none; border: 0; }
html.theme-soft .col { border-radius: 22px; }
/* кнопки: основная зелёная, второстепенные серые без рамки */
html.theme-soft .btn { border: 0; background: var(--surface-2); color: var(--ink); border-radius: 14px; padding: 10px 16px; font-weight: 550; }
html.theme-soft .btn.sm { border-radius: 12px; padding: 7px 13px; }
html.theme-soft .btn.primary { background: var(--accent); color: var(--accent-ink); }
html.theme-soft .btn:hover { filter: brightness(.97); border: 0; }
html.theme-soft .seg { background: transparent; padding: 0; gap: 18px; }
html.theme-soft .seg button { padding: 4px 0; font-size: 20px; font-weight: 700; color: #c4c4cc; background: none; box-shadow: none; }
html.theme-soft .seg button.active { color: var(--ink); background: none; box-shadow: none; }
html.theme-soft input, html.theme-soft select, html.theme-soft textarea { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; }
html.theme-soft :is(.now, .panel, .section, .list, .drawer-panel, .kpi) :is(input, select, textarea) { border-color: transparent; background: var(--surface-2); }
html.theme-soft input:focus, html.theme-soft select:focus, html.theme-soft textarea:focus { background: var(--surface); border-color: var(--accent); }
html.theme-soft .pill { border-radius: 10px; padding: 3px 9px; }
html.theme-soft .alert { border-radius: 16px; padding: 12px 14px; }
html.theme-soft .back-btn { color: var(--ink-2); font-weight: 500; }
html.theme-soft .kpi-value { font-family: var(--font); font-weight: 700; letter-spacing: -.03em; }
html.theme-soft .soft-violet, html.theme-soft .now.tasks-box { background: var(--soft-violet); }
html.theme-soft .now.tasks-box .now-head h3 { color: var(--soft-violet-ink); }
/* второстепенное — одним мягким серым, главное — почти чёрным */
html.theme-soft { --ink-2: #9a9aa3; }
@media (prefers-color-scheme: dark) { html.theme-soft { --ink-2: #8e8e97; } }
html.theme-soft :is(.muted, .note, .meta, .kpi-note, .card .meta, .list-row .small, .now-item .small, .an-kv span, .page-head .muted, label, .field label) { color: var(--ink-2); }
html.theme-soft .small.muted, html.theme-soft .muted.small { font-size: 13px; }
html.theme-soft .now > div:not(.now-head):not(.now-list):not(.now-item):not(.row):not(.alert) { color: var(--ink-2); }
html.theme-soft .field label { font-weight: 450; font-size: 13px; }
html.theme-soft :is(.now, .list-row, .card, .now-item) :is(b, strong) { color: var(--ink); }

/* ---------- быстрый вход по коду ---------- */
.pin-wrap { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; background: var(--surface);
  padding: max(28px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); color: var(--ink); }
.pin-logo { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.pin-logo span { color: var(--accent); }
.pin-mid { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; max-width: 360px; }
.pin-title { font-size: 28px; font-weight: 600; letter-spacing: -.02em; font-family: var(--font); }
.pin-sub { color: var(--ink-2); font-size: 15px; line-height: 1.4; }
.pin-dots { display: flex; gap: 18px; margin-top: 26px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--line); transition: background .12s, transform .12s; }
.pin-dots i.on { background: var(--ink); transform: scale(1.08); }
.pin-dots.shake { animation: pinshake .35s; }
@keyframes pinshake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pin-err { color: var(--red); font-size: 14px; min-height: 20px; }
.pin-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 22px; width: 100%; max-width: 330px; }
.pin-keys button { border: 0; background: none; font: 400 34px var(--font); color: var(--ink); height: 76px; border-radius: 50%;
  cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; display: grid; place-items: center; }
.pin-keys button:active { background: var(--surface-2); }
.pin-keys .pin-link { font-size: 14px; line-height: 1.25; color: var(--ink); }
/* вкладки крупным текстом: в одну строку с прокруткой вбок, без переносов */
html.theme-soft .seg { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; -webkit-overflow-scrolling: touch; gap: 16px; }
html.theme-soft .seg::-webkit-scrollbar { display: none; }
html.theme-soft .seg button { font-size: 18px; white-space: nowrap; flex: 0 0 auto; }
html.theme-soft .an-tabs { margin-bottom: 14px; }
/* журнал: кнопки отметок как мягкие плашки */
html.theme-soft .mark button { border: 0; background: var(--surface-2); border-radius: 12px; padding: 8px 14px; font-size: 14px; font-weight: 550; color: var(--ink); }
html.theme-soft .mark button.on-present { background: var(--accent); color: var(--accent-ink); }
html.theme-soft .mark button.on-absent { background: var(--red); color: #fff; }
html.theme-soft .page-head { margin-bottom: 14px; }
@media (max-width: 760px) { html.theme-soft h2 { font-size: 24px; } html.theme-soft .page-head .muted.small { flex-basis: 100%; } }
html.theme-soft .chip { border: 0; background: var(--surface-2); }
html.theme-soft .chip.day.on, html.theme-soft .chip.on { background: var(--accent); color: var(--accent-ink); }
html.theme-soft .seg { flex-wrap: nowrap !important; }
/* воронка: колонка не длиннее экрана, карточки листаются внутри неё */
html.theme-soft .board { align-items: flex-start; }
html.theme-soft .col { display: flex; flex-direction: column; max-height: min(72vh, 680px); }
html.theme-soft .col-body { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-right: 2px; }
@media (max-width: 760px) { html.theme-soft .col { flex-basis: 84vw; } }

/* чеки 54-ФЗ */
.chip.red { background: #fde8e6; border-color: #f3b5ae; color: #a3271a; cursor: default; }
.chip.green { background: #e6f5ea; border-color: #b3dcbd; color: #1d6b33; cursor: default; }
.fx-list { display: flex; flex-direction: column; gap: 8px; }
.fx-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.fx-item.bad { border-color: #f3b5ae; }
.fx-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 17px; }
.fx-act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.fx-check { display: flex !important; align-items: flex-start; gap: 10px; text-align: left; margin: 6px 0 14px; font-weight: 400; }
.fx-check input { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 2px; }
.chip { white-space: nowrap; }
.meet-open.late { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- аватарки и карточка сотрудника ---------- */
.ava { border-radius: 50%; object-fit: cover; flex: 0 0 auto; display: inline-grid; place-items: center; font-weight: 650; vertical-align: middle; background: var(--surface-2); }
.ava-ini { letter-spacing: .02em; }
.sp-head { display: flex; align-items: center; gap: 16px; margin-bottom: 6px; }
.sp-head h2 { margin-bottom: 4px; }
.sp-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.sp-row:last-of-type { border-bottom: 0; }
.sp-quote { margin-top: 10px; padding: 12px 14px; background: var(--surface-2); border-radius: 14px; line-height: 1.5; }
.sp-quote b { display: block; margin-bottom: 4px; }
.who { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.lrow .who .ava { margin-right: 2px; }
.hello-ava { display: inline-flex; align-items: center; gap: 12px; }

/* ---------- Рабочий стол: сводка, главное слева, виджеты справа ---------- */
.dtiles { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.dtiles::-webkit-scrollbar { display: none; }
.dtile { flex: 0 0 auto; display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center;
  border: 0; border-radius: 16px; padding: 10px 14px; cursor: pointer; text-align: left; font: inherit; min-width: 120px; }
.dtile span { grid-row: 1 / 3; font-size: 22px; }
.dtile b { font-size: 20px; line-height: 1; }
.dtile small { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.dtile.red { background: var(--red-soft); } .dtile.red b { color: var(--red); }
.dtile.yellow { background: var(--yellow-soft); } .dtile.yellow b { color: #8a6a00; }
.desk { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.desk-side .dw + .dw { margin-top: 12px; }
.desk-side .dw > section, .desk-side .dw > details { margin: 0 !important; }
@media (min-width: 1180px) {
  .desk { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
  .desk-side { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; padding-right: 2px; scrollbar-width: thin; }
}
@media (max-width: 760px) {
  .dtile { min-width: 0; padding: 8px 12px; border-radius: 14px; column-gap: 6px; }
  .dtile span { font-size: 18px; } .dtile b { font-size: 17px; } .dtile small { font-size: 11.5px; }
}
.sp-head > div { min-width: 0; flex: 1; }
.sp-head .muted { overflow-wrap: anywhere; line-height: 1.5; }
.drawer-panel .section { overflow-wrap: anywhere; }
/* аватарки в фирменном стиле: бело-зелёный фильтр, зелёная обводка, наклейка с юмором */
.ava-wrap { position: relative; display: inline-block; flex: 0 0 auto; vertical-align: middle; }
.ava-photo { display: block; width: 100%; height: 100%; border-radius: 50%; border: 2px solid #23a26d; box-sizing: border-box;
  background-color: #e6f6ee; background-repeat: no-repeat; background-size: 190% auto; background-position: 50% 9%;
  filter: saturate(1.15) contrast(1.03); }
.ava-stk { position: absolute; right: -6%; bottom: -6%; font-style: normal; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.sp-nick { color: #23a26d; font-weight: 600; margin: -2px 0 4px; }

/* ---------- Расписание: неделя «как постер» ---------- */
.wk-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.wk-nav b { font-size: 16px; min-width: 120px; text-align: center; }
.wk-br { margin-bottom: 14px; }
.wk-poster { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 2.2fr); gap: 16px; align-items: stretch; }
.wk-block { background: var(--surface); border-radius: 22px; padding: 16px; box-shadow: var(--shadow); }
.wk-block h3 { font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.wk-grid { display: grid; gap: 10px; }
.wk5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.wk2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wk-col { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface); display: flex; flex-direction: column; min-height: 100%; }
.wk-col.today { box-shadow: 0 0 0 2px var(--hd); }
.wk-head { all: unset; cursor: pointer; display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 8px; padding: 10px 12px; background: var(--hd); color: #fff; }
.wk-dn { font-size: 22px; font-weight: 800; letter-spacing: .02em; }
.wk-date { justify-self: end; font-size: 12px; opacity: .9; }
.wk-team { grid-column: 1 / -1; font-size: 11px; opacity: .95; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-body { padding: 8px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.wk-cell { all: unset; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 1px 6px; align-items: baseline; padding: 8px 10px;
  border-radius: 12px; background: var(--cb); text-align: center; }
.wk-cell:hover { filter: brightness(.97); }
.wk-cell b { grid-column: 1 / -1; font-size: 15px; }
.wk-age { grid-column: 1 / -1; font-size: 12.5px; color: #3a3a40; }
.wk-fill { grid-column: 1 / -1; font-size: 11px; color: var(--cf); font-weight: 600; }
.wk-bar { grid-column: 1 / -1; display: block; height: 4px; border-radius: 3px; background: rgba(0,0,0,.08); overflow: hidden; margin-top: 2px; }
.wk-bar i { display: block; height: 100%; background: var(--cf); }
.wk-cell.need { box-shadow: inset 0 0 0 2px var(--red); }
.wk-warn { grid-column: 1 / -1; font-size: 11px; color: var(--red); font-weight: 600; }
.wk-empty { color: var(--ink-2); font-size: 12px; text-align: center; padding: 14px 0; }
@media (prefers-color-scheme: dark) { .wk-age { color: var(--ink); } }
@media (max-width: 1100px) { .wk-poster { grid-template-columns: 1fr; } }
/* телефон: дни листаются вбок, по 2 колонки на экран */
@media (max-width: 760px) {
  .wk-block { padding: 12px; border-radius: 18px; }
  .wk-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .wk-grid::-webkit-scrollbar { display: none; }
  .wk-col { flex: 0 0 46%; scroll-snap-align: start; }
}
.wk-block { min-width: 0; } .wk-poster { min-width: 0; }

/* ---------- Команда ---------- */
.tm-sec { background: var(--surface); border-radius: 22px; padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.tm-h { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.tm-h b { display: block; text-transform: uppercase; letter-spacing: .05em; font-size: 15px; }
.tm-h small { color: var(--ink-2); font-size: 13px; }
.tm-tree { display: flex; flex-direction: column; align-items: center; }
.tm-node { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line); }
.tm-node.dark { background: #1d1d22; color: #fff; border-color: #1d1d22; }
.tm-node b { display: block; font-size: 14px; } .tm-node small { display: block; font-size: 12px; opacity: .7; }
.tm-line { display: block; width: 2px; height: 18px; background: var(--line); }
.tm-depts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; width: 100%; padding-top: 12px; border-top: 2px solid var(--line); }
.tm-dept { background: var(--surface-2); border-radius: 18px; padding: 10px; }
.tm-dept-h { display: flex; align-items: center; gap: 8px; font-weight: 700; padding: 4px 6px 10px; }
.tm-dept-h i { width: 8px; height: 8px; border-radius: 50%; } .tm-dept-h span { margin-left: auto; color: var(--ink-2); font-weight: 500; font-size: 12px; }
.tm-person { all: unset; cursor: pointer; display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 14px; padding: 8px 10px; margin-bottom: 6px; width: 100%; box-sizing: border-box; }
.tm-person b { display: block; font-size: 13.5px; } .tm-person small { display: block; font-size: 12px; color: var(--ink-2); }
.tm-dots { display: flex; gap: 3px; } .tm-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.tm-zones { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tm-zone { border-radius: 18px; padding: 14px; background: color-mix(in srgb, var(--zc) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--zc) 22%, transparent); }
.tm-zone-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tm-zone-h > i { width: 8px; height: 8px; border-radius: 50%; background: var(--zc); flex: 0 0 auto; }
.tm-zone-h b { font-size: 15px; } .tm-zone ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.55; }
.tm-stack { margin-left: auto; display: inline-flex; } .tm-stack > * { margin-left: -8px; box-shadow: 0 0 0 2px var(--surface); border-radius: 50%; }
.tm-more { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); font-size: 11px; font-weight: 700; }
.tm-paygrid { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.tm-paygrid .wide { grid-row: span 2; }
.tm-paycard { border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.tm-pay-h { display: flex; align-items: center; font-weight: 700; margin-bottom: 12px; }
.tm-tiles { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 10px; }
.tm-tile { flex: 1 1 120px; border-radius: 16px; padding: 14px 10px; text-align: center; background: var(--accent-soft); }
.tm-tile.alt { background: #e9e6fb; } .tm-tile.warn { background: var(--red-soft); }
.tm-tile b { display: block; font-size: 24px; letter-spacing: -.02em; } .tm-tile small { color: var(--ink-2); font-size: 12px; }
.tm-example { border: 1.5px dashed var(--line); border-radius: 16px; padding: 12px 14px; margin: 10px 0; font-size: 13.5px; }
.tm-example > b { display: block; margin-bottom: 6px; }
.tm-example div { display: flex; justify-content: space-between; border-bottom: 1px dotted var(--line); padding: 4px 0; }
.tm-pay-line { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; margin-bottom: 6px; font-weight: 550; }
.tm-check { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 8px 0; }
.center { text-align: center; }
@media (max-width: 760px) { .tm-paygrid { grid-template-columns: 1fr; } .tm-sec { padding: 14px; } }
