/* СкайХаб Скайпрог — фирменный стиль */
:root {
  --orange: #F5A623;
  --orange-600: #DB8B0A;
  --orange-50: #FFF5E3;
  --berry: #8C2A6E;
  --berry-700: #6E1F56;
  --berry-50: #F8EEF4;
  --berry-100: #F0DCE8;
  --ink: #18131B;
  --ink-2: #3B3440;
  --muted: #7A7180;
  --line: #ECE5EA;
  --line-2: #F3EEF1;
  --bg: #FBF8F6;
  --card: #FFFFFF;
  --green: #17955A;
  --green-bg: #E5F6EC;
  --green-line: #A9E0C1;
  --yellow: #B98900;
  --yellow-bg: #FFF5D1;
  --yellow-line: #F2D98A;
  --red: #D23B3B;
  --red-bg: #FDECEC;
  --red-line: #F3B5B5;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(24, 19, 27, .04), 0 8px 24px -12px rgba(24, 19, 27, .12);
  --shadow-lg: 0 24px 64px -16px rgba(24, 19, 27, .35);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Unbounded', 'Manrope', system-ui, sans-serif;
  --side: 248px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--berry); }
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot img { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.9); opacity: .6; } }

/* ---------- кнопки и поля ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; font-weight: 700; font-size: 14px; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s;
}
.btn:hover { border-color: #DCD2D8; background: #FDFBFC; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--berry); border-color: var(--berry); color: #fff; }
.btn.primary:hover { background: var(--berry-700); }
.btn.accent { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.btn.accent:hover { background: #F0A010; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--line-2); }
.btn.sm { height: 32px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.btn.icon { width: 40px; padding: 0; }
.btn.sm.icon { width: 32px; }
.btn svg { width: 18px; height: 18px; flex: none; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field small { color: var(--muted); font-size: 12px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 84px; resize: vertical; }
.input:focus { border-color: var(--berry); box-shadow: 0 0 0 4px var(--berry-50); }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px 0; }
.check input { width: 18px; height: 18px; accent-color: var(--berry); }

/* ---------- вход ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-brand {
  position: relative; overflow: hidden; color: #fff; padding: 48px;
  background: radial-gradient(120% 90% at 0% 100%, #B33A8A 0%, var(--berry) 45%, #4E1239 100%);
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-brand h1 { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 3.4vw, 50px); line-height: 1.08; margin: 0; letter-spacing: -.01em; }
.auth-brand h1 em { font-style: normal; color: var(--orange); }
.auth-brand p { max-width: 420px; opacity: .85; font-size: 16px; }
.auth-chevrons { position: absolute; right: -60px; bottom: -40px; width: 420px; opacity: .9; pointer-events: none; }
.auth-badge { display: inline-flex; align-items: center; gap: 10px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); padding: 8px 14px 8px 8px; border-radius: 999px; font-weight: 700; font-size: 13px; width: fit-content; }
.auth-badge img { width: 26px; height: 26px; background: #fff; border-radius: 50%; padding: 3px; }
.auth-form { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card .logo { width: 220px; margin-bottom: 28px; }
.auth-card h2 { font-family: var(--display); font-size: 22px; margin: 0 0 6px; }
.auth-card p.lead { color: var(--muted); margin: 0 0 24px; }
.form-error { color: var(--red); background: var(--red-bg); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; display: none; }
.form-error.show { display: block; }

/* ---------- каркас ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; z-index: 30; height: 100vh; display: flex; flex-direction: column;
  background: #fff; border-right: 1px solid var(--line); padding: 22px 14px 16px;
}
.side .logo { width: 176px; margin: 2px 8px 6px; }
.side .tagline { font-family: var(--display); font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--berry); margin: 0 10px 22px; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; overflow-y: auto; margin: 0 -14px; padding: 0 14px 8px; scrollbar-width: thin; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: 14.5px;
}
.nav a svg { width: 20px; height: 20px; flex: none; color: var(--muted); }
.nav a:hover { background: var(--line-2); }
.nav a.active { background: var(--berry-50); color: var(--berry); }
.nav a.active svg { color: var(--berry); }
.nav a.active::before { content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: linear-gradient(var(--orange), var(--berry)); }
.nav a.soon { opacity: .55; }
.nav .soon-tag { margin-left: auto; white-space: nowrap; flex: none; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: var(--line-2); color: var(--muted); padding: 2px 6px; border-radius: 6px; }
.nav .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center; background: var(--orange); color: var(--ink); font-size: 12px; font-weight: 800; }
.nav-sep { height: 1px; background: var(--line); margin: 12px 8px; }
.side-foot { margin-top: 10px; }
.me-t { min-width: 0; }
.me-t small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--bg); }
.me b { display: block; font-size: 14px; }
.me small { color: var(--muted); font-size: 12px; }
.me .btn { margin-left: auto; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px; flex: none; }
.avatar.sm { width: 22px; height: 22px; font-size: 11px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 14px 28px; background: rgba(251, 248, 246, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top h1 { font-family: var(--display); font-weight: 600; font-size: 21px; margin: 0; letter-spacing: -.01em; }
.top .mark { display: none; width: 30px; }
.top .grow { flex: 1; }
.clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.clock b { font-family: var(--display); font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.clock small { color: var(--muted); font-size: 12px; font-weight: 600; }
.viewing { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px 6px 4px 12px; }
.viewing span { font-size: 12px; color: var(--muted); font-weight: 700; }
.viewing select { border: 0; background: transparent; font-weight: 800; padding: 6px 4px; outline: none; cursor: pointer; }
.bell { position: relative; }
.bell.off::after { content: ''; position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px #fff; }

.content { padding: 24px 28px 60px; max-width: 1280px; width: 100%; }
.push-banner {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px; padding: 14px 16px; border-radius: var(--radius);
  background: linear-gradient(100deg, var(--orange-50), #FFF); border: 1px solid #F8D9A0;
}
.push-banner .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--orange); display: grid; place-items: center; flex: none; }
.push-banner b { display: block; }
.push-banner small { color: var(--ink-2); }
.push-banner .btn { margin-left: auto; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px 10px; }
.card-h h3 { margin: 0; font-size: 15px; font-weight: 800; }
.card-h .sub { color: var(--muted); font-size: 13px; font-weight: 600; }
.card-h .grow { flex: 1; }
.card-b { padding: 6px 18px 18px; }
.pill-count { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--line-2); color: var(--ink-2); font-size: 12px; font-weight: 800; display: inline-grid; place-items: center; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .grow { flex: 1; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg a, .seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--ink-2); text-decoration: none; cursor: pointer; }
.seg .on { background: var(--ink); color: #fff; }

/* ---------- задачи ---------- */
.day-grid { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
.day-left { position: sticky; top: 86px; display: flex; flex-direction: column; gap: 16px; }
.day-right { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.cal { padding: 14px; }
.cal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-h b { font-family: var(--display); font-weight: 600; font-size: 15px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { text-align: center; font-size: 11px; font-weight: 800; color: var(--muted); padding: 4px 0; }
.cal-dow.sun { color: #C9B7C2; }
.cal-day {
  position: relative; aspect-ratio: 1; border: 0; background: transparent; border-radius: 10px; cursor: pointer;
  font-weight: 700; font-size: 13.5px; display: grid; place-items: center; font-variant-numeric: tabular-nums;
}
.cal-day:hover { background: var(--line-2); }
.cal-day.other { color: #C8C0C6; }
.cal-day.sun { color: #CBB9C4; cursor: default; background: repeating-linear-gradient(135deg, transparent 0 4px, #F6F1F4 4px 5px); }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--orange); }
.cal-day.sel { background: var(--berry); color: #fff; }
.cal-day .dots { position: absolute; bottom: 4px; left: 0; right: 0; display: flex; gap: 2px; justify-content: center; }
.cal-day .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--orange); }
.cal-day .dots i.done { background: var(--green); }
.cal-day .dots i.late { background: var(--red); }
.cal-day.sel .dots i { box-shadow: 0 0 0 1px #fff; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 14px; padding: 10px 4px 0; font-size: 12px; color: var(--muted); font-weight: 600; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }

.dropzone { border-radius: 12px; transition: background .12s, box-shadow .12s; }
.dropzone.over { background: var(--orange-50); box-shadow: inset 0 0 0 2px var(--orange); }
.unsorted-zone { min-height: 64px; display: flex; flex-direction: column; gap: 8px; padding: 2px; }
.empty { color: var(--muted); font-size: 14px; text-align: center; padding: 18px 10px; border: 1.5px dashed var(--line); border-radius: 12px; }

.task {
  position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 10px 10px 10px 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; touch-action: auto;
  transition: box-shadow .15s, border-color .15s, background .15s;
}
.task::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--orange); }
.task.owner::before { background: var(--berry); }
.task:hover { box-shadow: var(--shadow); }
.task .grip { cursor: grab; color: #C4B9C0; padding: 2px 0; touch-action: none; user-select: none; display: grid; place-items: center; width: 18px; margin-left: -4px; }
.task .grip svg { width: 16px; height: 16px; }
.task .tb { flex: 1; min-width: 0; cursor: pointer; }
.task .tt { font-weight: 700; word-wrap: break-word; }
.task .td { color: var(--muted); font-size: 13px; margin-top: 2px; white-space: pre-wrap; word-wrap: break-word; max-height: 3.2em; overflow: hidden; }
.task .tm { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 7px; font-size: 12px; font-weight: 700; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.chip.owner { background: var(--berry-50); color: var(--berry); }
.chip.self { background: var(--orange-50); color: #A86A00; }
.chip.time { background: var(--ink); color: #fff; font-variant-numeric: tabular-nums; }
.chip.warn { background: var(--red-bg); color: var(--red); }
.chip.soon { background: var(--orange-50); color: #A86A00; }
.chip.ok { background: var(--green-bg); color: var(--green); }
.chip .avatar { width: 14px; height: 14px; }
.chip i.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.task .comment { margin-top: 6px; font-size: 13px; padding: 6px 9px; border-radius: 8px; background: rgba(255,255,255,.6); }

.stat { display: flex; gap: 4px; flex: none; }
.sbtn {
  width: 32px; height: 32px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; cursor: pointer;
  display: grid; place-items: center; transition: all .12s; padding: 0;
}
.sbtn svg { width: 16px; height: 16px; }
.sbtn.g { color: var(--green); } .sbtn.g:hover { background: var(--green); border-color: var(--green); color: #fff; }
.sbtn.y { color: var(--yellow); } .sbtn.y:hover { background: #F2C230; border-color: #F2C230; color: #fff; }
.sbtn.r { color: var(--red); } .sbtn.r:hover { background: var(--red); border-color: var(--red); color: #fff; }

.task.st-done { background: var(--green-bg); border-color: var(--green-line); }
.task.st-done::before { background: var(--green); }
.task.st-done .tt { color: #0E6B3F; }
.task.st-moved { background: var(--yellow-bg); border-color: var(--yellow-line); }
.task.st-moved::before { background: #E9B200; }
.task.st-canceled { background: var(--red-bg); border-color: var(--red-line); }
.task.st-canceled::before { background: var(--red); }
.task.st-canceled .tt { color: #A42727; }
.task.overdue { border-color: var(--red-line); box-shadow: 0 0 0 3px #FDECEC; }
.task .badge-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; padding: 6px 10px; border-radius: 9px; white-space: nowrap; }
.st-done .badge-st { background: var(--green); color: #fff; }
.st-moved .badge-st { background: #E9B200; color: #fff; }
.st-canceled .badge-st { background: var(--red); color: #fff; }
.badge-st svg { width: 14px; height: 14px; }
.task .more { width: 28px; height: 32px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.task .more:hover { background: var(--line-2); }

.dragging-ghost { position: fixed; z-index: 1000; pointer-events: none; opacity: .95; box-shadow: var(--shadow-lg); transform: rotate(-1.5deg); }
.task.drag-src { opacity: .35; }
body.dragging, body.dragging * { cursor: grabbing !important; user-select: none; }

/* шкала времени */
.timeline { position: relative; }
.slot { display: grid; grid-template-columns: 58px 1fr; min-height: 46px; border-top: 1px solid var(--line-2); }
.slot.hour { border-top-color: var(--line); }
.slot .lbl { padding: 8px 10px 0 0; text-align: right; font-size: 12px; font-weight: 700; color: #B3A9B0; font-variant-numeric: tabular-nums; }
.slot.hour .lbl { color: var(--ink-2); font-size: 13px; }
.slot .zone { position: relative; padding: 5px 0 5px 10px; display: flex; flex-direction: column; gap: 6px; border-left: 1px solid var(--line); }
.slot.past .zone { background: repeating-linear-gradient(135deg, transparent 0 8px, #FBF8FA 8px 9px); }
.slot.off .lbl { color: #D2C9CF; }
.now-line { position: absolute; left: -6px; right: 0; height: 2px; background: var(--red); z-index: 2; pointer-events: none; }
.now-line::before { content: ''; position: absolute; left: -2px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.reg-pill {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; font-size: 13px; font-weight: 600;
  background: repeating-linear-gradient(135deg, #F6EEF3 0 10px, #F9F3F6 10px 20px); color: var(--berry-700); border: 1px dashed #E3CADA; cursor: pointer;
}
.reg-pill b { font-variant-numeric: tabular-nums; }
.reg-pill.done { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-line); }
.reg-pill.due { background: var(--orange-50); color: #9B5F00; border: 1px solid #F8D9A0; animation: glow 1.6s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 4px rgba(245, 166, 35, .18); } }

.tails { border-color: var(--red-line); }
.tails .card-h h3 { color: var(--red); }

/* общие задачи */
.glist { display: flex; flex-direction: column; gap: 8px; }
.gsec { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; color: var(--muted); margin: 18px 2px 8px; }
.legend-inline { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); font-weight: 600; }
.legend-inline span { display: inline-flex; align-items: center; gap: 6px; }
.legend-inline i { width: 4px; height: 16px; border-radius: 2px; display: inline-block; }

/* ---------- регламент ---------- */
.reg-list { display: flex; flex-direction: column; gap: 10px; }
.reg-item {
  display: grid; grid-template-columns: 88px 1fr auto; gap: 16px; align-items: center; padding: 14px 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; position: relative;
}
.reg-item .rt { font-family: var(--display); font-weight: 600; font-size: 22px; font-variant-numeric: tabular-nums; }
.reg-item .rtitle { font-weight: 700; font-size: 15.5px; }
.reg-item .rsub { color: var(--muted); font-size: 13px; margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.reg-item .ract { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.reg-item.done { background: var(--green-bg); border-color: var(--green-line); }
.reg-item.done .rt { color: var(--green); }
.reg-item.due { border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-50); }
.reg-item.due .rt { color: var(--orange-600); }
.reg-item.missed { border-color: var(--red-line); }
.reg-item.missed .rt { color: var(--red); }
.reg-item.waiting .rt { color: #B9AEB6; }
.lock-note { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; margin-top: 14px; }
.lock-note svg { width: 16px; height: 16px; }
.dayoff { text-align: center; padding: 48px 20px; }
.dayoff .big { font-size: 48px; }
.dayoff h3 { font-family: var(--display); font-weight: 600; margin: 8px 0 4px; }
.dayoff p { color: var(--muted); margin: 0; }

/* ---------- журнал ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.tile { padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.tile b { display: block; font-family: var(--display); font-weight: 600; font-size: 26px; font-variant-numeric: tabular-nums; }
.tile span { color: var(--muted); font-size: 13px; font-weight: 700; }
.tile.red b { color: var(--red); } .tile.green b { color: var(--green); } .tile.yellow b { color: var(--yellow); }
.jday { margin-bottom: 18px; }
.jday h4 { margin: 0 0 8px 2px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 800; }
.jrow { display: grid; grid-template-columns: 150px 1fr auto; gap: 14px; align-items: start; padding: 12px 16px; border-top: 1px solid var(--line-2); }
.jrow:first-child { border-top: 0; }
.jrow .who { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.jrow .jt { font-weight: 700; }
.jrow .js { color: var(--muted); font-size: 13px; margin-top: 2px; }
.jrow .jnote { margin-top: 6px; font-size: 13px; background: var(--bg); padding: 6px 9px; border-radius: 8px; }
.jrow .jres { margin-top: 6px; font-size: 13px; color: var(--green); font-weight: 700; }
.rbadge { font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: 8px; white-space: nowrap; }
.rbadge.late, .rbadge.not_done { background: var(--red-bg); color: var(--red); }
.rbadge.canceled { background: var(--red); color: #fff; }
.rbadge.moved { background: var(--yellow-bg); color: var(--yellow); }

/* ---------- команда / настройки ---------- */
.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.ucard { display: flex; align-items: center; gap: 14px; padding: 16px; }
.ucard .avatar { width: 46px; height: 46px; font-size: 18px; }
.ucard b { font-size: 16px; }
.ucard .meta { color: var(--muted); font-size: 13px; }
.ucard .grow { flex: 1; min-width: 0; }
.ucard.off { opacity: .55; }
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.colors label { position: relative; cursor: pointer; }
.colors input { position: absolute; opacity: 0; }
.colors span { display: block; width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(0,0,0,.08); }
.colors input:checked + span { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ink); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.kv:first-child { border-top: 0; }
.kv span { color: var(--muted); }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.help { color: var(--muted); font-size: 13px; line-height: 1.5; }
.help li { margin-bottom: 4px; }

.soon-page { text-align: center; padding: 64px 24px; }
.soon-page img { width: 64px; }
.soon-page h2 { font-family: var(--display); font-weight: 600; margin: 16px 0 8px; }
.soon-page p { color: var(--muted); max-width: 460px; margin: 0 auto; }

/* ---------- диалоги ---------- */
dialog {
  border: 0; padding: 0; border-radius: 20px; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 32px);
  box-shadow: var(--shadow-lg); color: var(--ink);
}
dialog::backdrop { background: rgba(24, 19, 27, .45); backdrop-filter: blur(2px); }
.dlg-h { display: flex; align-items: center; gap: 10px; padding: 18px 20px 6px; }
.dlg-h h3 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 18px; flex: 1; }
.dlg-b { padding: 10px 20px 4px; }
.dlg-f { display: flex; gap: 10px; justify-content: flex-end; padding: 10px 20px 20px; flex-wrap: wrap; }
.dlg-f .left { margin-right: auto; }
.dlg-note { background: var(--bg); border-radius: 12px; padding: 10px 12px; font-size: 13px; color: var(--ink-2); margin-bottom: 14px; }
.mgr-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.mgr-checks label { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px 7px 9px; cursor: pointer; font-weight: 700; font-size: 14px; }
.mgr-checks input { accent-color: var(--berry); }
.mgr-checks label:has(input:checked) { border-color: var(--berry); background: var(--berry-50); }

/* окно напоминаний */
.alert-layer { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; background: rgba(24, 19, 27, .5); backdrop-filter: blur(3px); padding: 16px; }
.alert-box { width: min(520px, 100%); background: #fff; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); animation: pop .25s cubic-bezier(.2,.9,.3,1.3); }
@keyframes pop { from { transform: scale(.9); opacity: 0; } }
.alert-top { display: flex; align-items: center; gap: 14px; padding: 18px 20px; color: #fff; background: linear-gradient(110deg, var(--berry), #B23C86 60%, var(--orange)); }
.alert-top .bellbig { width: 46px; height: 46px; border-radius: 14px; background: rgba(255,255,255,.18); display: grid; place-items: center; animation: ring 1.2s ease-in-out infinite; }
.alert-top .bellbig svg { width: 24px; height: 24px; }
@keyframes ring { 0%, 60%, 100% { transform: rotate(0); } 10% { transform: rotate(14deg); } 20% { transform: rotate(-12deg); } 30% { transform: rotate(8deg); } 40% { transform: rotate(-6deg); } }
.alert-top h3 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 18px; }
.alert-top small { opacity: .85; font-weight: 600; }
.alert-items { max-height: 60vh; overflow: auto; padding: 8px 12px; }
.alert-item { padding: 12px 10px; border-bottom: 1px solid var(--line-2); }
.alert-item:last-child { border-bottom: 0; }
.alert-item .ai-h { display: flex; gap: 10px; align-items: baseline; }
.alert-item .ai-h b { font-family: var(--display); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--berry); }
.alert-item .ai-t { font-weight: 700; }
.alert-item .ai-k { font-size: 12px; color: var(--muted); font-weight: 700; margin: 2px 0 10px; }
.alert-item .ai-a { display: flex; gap: 8px; flex-wrap: wrap; }
.alert-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 20px 16px; color: var(--muted); font-size: 12px; font-weight: 600; }

/* тосты */
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 1100; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast { white-space: pre-line; max-width: 360px; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow-lg); font-size: 14px; animation: slide .25s ease; }
.toast b { display: block; }
.toast.err { background: var(--red); }
.toast.info { background: #fff; color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--berry); }
@keyframes slide { from { transform: translateY(12px); opacity: 0; } }

/* мобильная навигация */
.tabbar { display: none; }

@media (max-width: 1100px) {
  .day-grid { grid-template-columns: 1fr; }
  .day-left { position: static; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 28px 22px 34px; min-height: 230px; }
  .auth-brand p { display: none; }
  .auth-chevrons { width: 260px; }
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .top { padding: 10px 14px; gap: 10px; }
  .top .mark { display: block; }
  .top h1 { font-size: 17px; }
  .clock small { display: none; }
  .clock b { font-size: 15px; }
  .viewing span { display: none; }
  .content { padding: 16px 12px 110px; }
  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: #fff;
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 700; color: var(--muted); text-decoration: none; padding: 4px 0; border-radius: 10px; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.active { color: var(--berry); }
  .reg-item { grid-template-columns: 64px 1fr; }
  .reg-item .rt { font-size: 18px; }
  .reg-item .ract { grid-column: 1 / -1; justify-content: flex-start; }
  .jrow { grid-template-columns: 1fr; gap: 6px; }
  .jrow .rb { order: -1; }
  .slot { grid-template-columns: 48px 1fr; }
  #toasts { left: 12px; right: 12px; bottom: 84px; align-items: stretch; }
  .toast { max-width: none; }
  .push-banner { flex-wrap: wrap; }
  .push-banner .btn { margin-left: 0; width: 100%; }
  .task { flex-wrap: wrap; }
  .task .tb { flex: 1 1 calc(100% - 64px); }
  .task .stat, .task .badge-st { order: 5; margin-left: 18px; }
  .task .stat .sbtn { width: 38px; height: 34px; }
  .legend-inline, .card-h .sub { display: none; }
  .tabbar a.soon { display: none; }
  .slot .zone { padding-left: 6px; }
}

/* ================= СкайХаб: кабинеты, филиалы, команда, журнал действий ================= */
.side .tagline { margin-bottom: 14px; }
.cab { position: relative; margin-bottom: 16px; }
.cab-btn {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 14px; text-align: left;
  border: 1px solid var(--line); background: linear-gradient(120deg, var(--berry-50), #fff 70%); cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.cab-btn:not(:disabled):hover { border-color: var(--berry-100); box-shadow: var(--shadow); }
.cab-btn:disabled { cursor: default; color: inherit; }
.cab-ico { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--berry); color: #fff; }
.cab-ico svg { width: 19px; height: 19px; }
.cab-crm .cab-btn .cab-ico { background: var(--orange); color: var(--ink); }
.cab-t { flex: 1; min-width: 0; line-height: 1.2; }
.cab-t small { display: block; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.cab-t b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cab-chev svg { width: 18px; height: 18px; color: var(--muted); }
.cab-menu {
  position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; width: 290px; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-lg); padding: 6px; animation: pop .15s ease;
}
.cab-opt { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 11px; text-decoration: none; color: var(--ink); }
.cab-opt:hover { background: var(--line-2); }
.cab-opt.on { background: var(--berry-50); }
.cab-opt b { display: block; font-size: 14px; }
.cab-opt small { display: block; font-size: 12px; color: var(--muted); }
.cab-opt > span:nth-child(2) { flex: 1; }
.cab-opt > svg { width: 18px; height: 18px; color: var(--berry); }
.cab-opt[href^="#crm"] .cab-ico { background: var(--orange); color: var(--ink); }
.cab-sep { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 10px 10px 4px; border-top: 1px solid var(--line-2); margin-top: 4px; }

.branch-switch a { white-space: nowrap; }
.branch-switch .on { background: var(--orange); color: var(--ink); }
.branch-chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 12px; background: var(--orange-50); border: 1px solid #F8D9A0; font-weight: 800; color: #8A5600; }
.branch-chip svg { width: 18px; height: 18px; }

.auth-branches { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.auth-branches span { padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); font-weight: 700; font-size: 13px; }

/* CRM филиала */
.crm-head { display: flex; align-items: center; gap: 22px; padding: 16px 18px; margin-bottom: 16px; flex-wrap: wrap;
  background: linear-gradient(110deg, #FFF8EC, #fff 55%); }
.bh-main { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.bh-ico { width: 48px; height: 48px; border-radius: 14px; background: var(--orange); display: grid; place-items: center; }
.bh-ico svg { width: 26px; height: 26px; }
.bh-main small, .bh-col > small { display: block; font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.bh-main h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 22px; }
.bh-col { flex: 1; min-width: 180px; }
.bh-people { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.bh-p { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px 3px 3px; }
.bh-p.more { padding: 3px 10px; color: var(--muted); }
.crm-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.crm-soon { padding: 24px 26px; position: relative; overflow: hidden; }
.crm-soon::after { content: ''; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, var(--berry-50), transparent 70%); pointer-events: none; }
.cs-top { display: flex; align-items: center; gap: 12px; }
.cs-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--berry); color: #fff; }
.cs-ico svg { width: 28px; height: 28px; }
.cs-stage { font-size: 12px; font-weight: 800; color: var(--berry); background: var(--berry-50); padding: 5px 10px; border-radius: 8px; }
.crm-soon h2 { font-family: var(--display); font-weight: 600; font-size: 24px; margin: 16px 0 4px; }
.cs-lead { color: var(--ink-2); margin: 0 0 14px; font-size: 15.5px; }
.cs-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.cs-list li { position: relative; padding-left: 26px; }
.cs-list li::before { content: ''; position: absolute; left: 4px; top: 7px; width: 10px; height: 10px; border-radius: 3px; background: var(--orange); transform: rotate(45deg); }
.cs-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 20px; padding: 10px 12px; border-radius: 12px; background: var(--bg); color: var(--muted); font-size: 13px; font-weight: 600; }
.cs-note svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.rm { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.rm li { display: flex; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 10px; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.rm-n { width: 24px; height: 24px; flex: none; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--line-2); color: var(--ink-2); }
.rm-n svg { width: 14px; height: 14px; }
.rm li.done { color: var(--green); }
.rm li.done .rm-n { background: var(--green); color: #fff; }
.rm li.cur { background: var(--orange-50); color: var(--ink); font-weight: 800; }
.rm li.cur .rm-n { background: var(--orange); color: var(--ink); }

/* команда */
.tgroup { margin-bottom: 26px; }
.tg-h { display: flex; align-items: center; gap: 10px; margin: 0 2px 10px; }
.tg-h > svg { width: 20px; height: 20px; color: var(--berry); }
.tg-h h3 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 17px; }
.tg-h .sub { color: var(--muted); font-size: 13px; font-weight: 600; }
.tg-h .grow { flex: 1; }
.ucard .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 2px; }
.you { font-size: 11px; font-weight: 800; color: var(--muted); background: var(--line-2); border-radius: 6px; padding: 1px 6px; vertical-align: middle; }
.rchip { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 800; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.rchip.r-owner { background: var(--berry); color: #fff; }
.rchip.r-manager { background: var(--berry-50); color: var(--berry); }
.rchip.r-admin { background: var(--orange-50); color: #8A5600; }
.rchip.r-mentor { background: #E8F1FB; color: #1F5F9E; }
.branch-row { display: flex; gap: 8px; margin-bottom: 8px; }
.branch-row .input { min-height: 36px; padding: 6px 10px; }

/* журнал действий */
.input.sel { width: auto; min-height: 40px; padding: 7px 10px; font-weight: 700; }
.owner-toggle { font-weight: 700; font-size: 14px; }
.tiles3 { grid-template-columns: repeat(3, 1fr); }
.tile.berry b { color: var(--berry); }
.arow { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line-2); align-items: start; }
.arow:first-child { border-top: 0; }
.arow.by-owner { background: linear-gradient(90deg, var(--berry-50), transparent 60%); box-shadow: inset 4px 0 0 var(--berry); }
.a-time { font-family: var(--display); font-weight: 600; font-size: 14px; color: var(--ink-2); padding-top: 2px; font-variant-numeric: tabular-nums; }
.a-who { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 14px; }
.owner-flag { font-size: 11.5px; font-weight: 800; color: #fff; background: linear-gradient(100deg, var(--berry), #B23C86); padding: 2px 8px; border-radius: 6px; }
.a-title { margin-top: 4px; font-weight: 700; }
.a-act { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 5px; margin-right: 7px; background: var(--line-2); color: var(--ink-2); vertical-align: 1px; }
.a-act.a-create { background: var(--green-bg); color: var(--green); }
.a-act.a-delete { background: var(--red-bg); color: var(--red); }
.a-act.a-status { background: var(--yellow-bg); color: var(--yellow); }
.a-ch { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.a-ch > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.a-f { color: var(--muted); font-weight: 700; min-width: 90px; }
.a-ch s { color: #A42727; background: var(--red-bg); text-decoration-color: rgba(164, 39, 39, .5); padding: 0 5px; border-radius: 4px; word-break: break-word; }
.a-ch ins { color: #0E6B3F; background: var(--green-bg); text-decoration: none; padding: 0 5px; border-radius: 4px; word-break: break-word; }
.a-ch i { color: var(--muted); font-style: normal; }
.a-area { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.a-area .chip svg { width: 12px; height: 12px; }

/* мобильное меню */
.drawer-bg { display: none; }
.tab-more { cursor: pointer; }

@media (max-width: 1100px) {
  .crm-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell.drawer-open .side {
    display: flex; position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); height: 100%;
    box-shadow: var(--shadow-lg); animation: drawer .2s ease;
  }
  .shell.drawer-open .drawer-bg { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(24, 19, 27, .45); }
  .top { flex-wrap: wrap; }
  .branch-switch { order: 10; width: 100%; display: flex; }
  .branch-switch a { flex: 1; text-align: center; padding: 7px 6px; font-size: 13px; }
  .branch-chip { height: 32px; padding: 0 10px; font-size: 13px; }
  .tiles3 { grid-template-columns: repeat(3, 1fr); }
  .tiles3 .tile b { font-size: 20px; }
  .arow { grid-template-columns: 1fr; gap: 4px; }
  .a-area { flex-direction: row; align-items: center; justify-content: flex-start; flex-wrap: wrap; }
  .a-time { font-size: 12px; }
  .audit-filters .input.sel { flex: 1 1 100%; }
  .crm-soon { padding: 18px; }
  .crm-head { gap: 12px; }
  .cab-menu { width: 100%; }
}
@keyframes drawer { from { transform: translateX(-100%); } }

.cab-crm .nav a { padding: 8px 12px; }
.ucard .meta2 { color: var(--muted); font-size: 13px; margin-top: 3px; word-break: break-word; }
.ucard .meta2 b { color: var(--ink-2); }

/* =================== CRM: клиенты и абонементы (этап 2) =================== */
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.r { text-align: right; }
.gsec.red { color: var(--red); }
.gsec-sub { text-transform: none; letter-spacing: 0; font-weight: 600; margin-left: 8px; }
.stage-note { background: var(--orange-50); border: 1px solid #F8D9A0; border-radius: 12px; padding: 10px 14px; font-size: 13px; color: var(--ink-2); margin-bottom: 14px; max-width: 920px; }
.btn.danger-soft { color: var(--red); }
.btn.danger-soft:hover { background: var(--red-bg); border-color: var(--red-line); }
.input.slim { width: auto; min-height: 38px; padding: 6px 10px; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.money.pos { color: var(--green); }
.money.neg { color: var(--red); }

/* три окна сверху */
.wins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.win { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 10px; cursor: pointer; box-shadow: var(--shadow); transition: box-shadow .15s, border-color .15s, transform .1s; display: flex; flex-direction: column; min-height: 168px; }
.win:hover { transform: translateY(-1px); }
.win::before { content: ''; position: absolute; left: 14px; right: 14px; top: 0; height: 3px; border-radius: 0 0 3px 3px; }
.win-debt::before { background: var(--red); } .win-soon::before { background: var(--orange); } .win-month::before { background: var(--berry); }
.win.on { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(24,19,27,.08); }
.win-h { display: flex; align-items: center; gap: 10px; }
.win-h b { display: block; font-size: 15px; }
.win-h small { color: var(--muted); font-size: 12px; font-weight: 600; }
.win-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 900; flex: none; }
.win-debt .win-ico { background: var(--red-bg); color: var(--red); }
.win-soon .win-ico { background: var(--orange-50); }
.win-month .win-ico { background: var(--berry-50); }
.win-n { margin-left: auto; font-family: var(--display); font-weight: 600; font-size: 26px; font-variant-numeric: tabular-nums; }
.win-debt .win-n { color: var(--red); }
.win-sum { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.win-sum b { color: var(--red); }
.win-list { margin-top: 8px; display: flex; flex-direction: column; flex: 1; }
.win-row { display: flex; justify-content: space-between; gap: 8px; border: 0; background: transparent; padding: 5px 6px; border-radius: 8px; cursor: pointer; text-align: left; font-size: 13.5px; }
.win-row:hover { background: var(--line-2); }
.win-row span { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-row em { font-style: normal; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.win-debt .win-row em { color: var(--red); }
.win-empty { color: var(--muted); font-size: 13px; padding: 6px; }
.win-more { font-size: 12px; font-weight: 800; color: var(--berry); padding: 6px 6px 0; }

/* список клиентов */
.segn { font-style: normal; font-size: 12px; opacity: .6; margin-left: 2px; }
.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 11px; width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.search .input { padding-left: 34px; min-height: 40px; width: 280px; }
.filter-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: #fff; border-radius: 12px; padding: 4px 6px 4px 14px; font-size: 13px; margin-bottom: 12px; }
.filter-chip .btn { color: #fff; }
.filter-chip .btn:hover { background: rgba(255,255,255,.12); }
.table-card { overflow: hidden; }
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 800; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #FDFBFC; }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl.clients tbody tr { cursor: pointer; transition: background .1s; }
.tbl.clients tbody tr:hover { background: var(--orange-50); }
.tbl tr.row-debt td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.tbl td small { display: block; color: var(--muted); font-size: 12px; }
.tbl th.r, .tbl td.r { text-align: right; }
.tbl small.due { color: #A86A00; font-weight: 700; }
.cname { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.cav { --h: 300; width: 34px; height: 34px; border-radius: 11px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: hsl(var(--h) 45% 32%); background: hsl(var(--h) 70% 92%); }
.cav.big { width: 64px; height: 64px; border-radius: 20px; font-size: 22px; font-family: var(--display); }
.abon-tag { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 8px; background: var(--line-2); }
.abon-tag.k-monthly { background: #EAF3FD; color: #1D5FA3; }
.abon-tag.k-term { background: var(--berry-50); color: var(--berry); }
.abon-tag.k-lesson { background: var(--green-bg); color: #0E6B3F; }
.big-empty { margin: 18px; padding: 36px 16px; }

/* карточка клиента */
.client-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.client-main, .client-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.chead { display: flex; gap: 16px; padding: 18px; align-items: flex-start; }
.chead h2 { font-family: var(--display); font-weight: 600; font-size: 22px; margin: 0 0 6px; letter-spacing: -.01em; }
.chead .tm { display: flex; flex-wrap: wrap; gap: 6px; }
.chead .grow { flex: 1; min-width: 0; }
.cmeta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.arch-note { margin-top: 10px; background: var(--red-bg); color: #8E2323; border-radius: 10px; padding: 8px 12px; font-size: 13.5px; }
.visits-empty { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.visits-empty p { flex-basis: 100%; margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.vpill { width: 40px; height: 34px; border-radius: 8px; background: repeating-linear-gradient(135deg, #F3EEF1 0 6px, #F9F6F8 6px 12px); border: 1px dashed #E3D8DF; }
.vpill.past { background: #F1F8F4; border-color: #D3EADC; }
.vpill.now { background: var(--orange-50); border: 1.5px solid var(--orange); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line-2); padding-top: 14px; }
.ctabs .tabs { display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.ctabs .tabs button { display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; padding: 10px 12px 11px; font-weight: 700; color: var(--muted); cursor: pointer; border-radius: 10px 10px 0 0; position: relative; white-space: nowrap; }
.ctabs .tabs button svg { width: 17px; height: 17px; }
.ctabs .tabs button em { font-style: normal; font-size: 11.5px; background: var(--line-2); border-radius: 8px; padding: 1px 7px; color: var(--ink-2); }
.ctabs .tabs button.on { color: var(--berry); }
.ctabs .tabs button.on::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: linear-gradient(90deg, var(--orange), var(--berry)); }
.tab-body { padding: 14px 16px 16px; }
.tab-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.tab-tools .grow { flex: 1; }
.sub-h { margin: 20px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tbl.pays td, .tbl.pays th { padding: 9px 10px; }
.tbl.pays tr.canceled td { opacity: .5; text-decoration: line-through; }
.tbl small.block { display: block; }
.chip.mini { height: 18px; font-size: 10.5px; padding: 0 6px; }
.chip.link { text-decoration: none; color: var(--berry); background: var(--berry-50); }
.chip.link svg { width: 12px; height: 12px; }
.chip.auto { background: #EEF0FF; color: #4B4FC2; }

/* история и журнал действий */
.hist-list { display: flex; flex-direction: column; }
.hist-list.pad { padding: 4px 14px; }
.hist { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.hist:last-child { border-bottom: 0; }
.hico { width: 32px; height: 32px; border-radius: 10px; background: var(--line-2); color: var(--ink-2); display: grid; place-items: center; flex: none; }
.hico svg { width: 16px; height: 16px; }
.hist.e-payment .hico { background: var(--green-bg); color: var(--green); }
.hist.e-payment.a-delete .hico, .hist.e-payment.a-update .hico { background: var(--orange-50); color: #A86A00; }
.hist.e-charge .hico { background: var(--red-bg); color: var(--red); }
.hist.e-abon .hico { background: var(--berry-50); color: var(--berry); }
.hist.e-client.a-archive .hico { background: var(--red); color: #fff; }
.hist.by-owner { background: linear-gradient(90deg, var(--berry-50), transparent 70%); margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: 10px; }
.hb { flex: 1; min-width: 0; }
.ht { font-weight: 600; font-size: 14px; word-wrap: break-word; }
.hm { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.hm .hc { font-weight: 700; }
.hwho { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink-2); }
.hwho i { width: 8px; height: 8px; border-radius: 50%; }
.hwho small { color: var(--muted); font-weight: 600; }
.hwho em { font-style: normal; font-size: 11px; font-weight: 800; background: var(--berry); color: #fff; padding: 1px 7px; border-radius: 6px; }
.hwho.sys { color: var(--muted); }
.when { font-variant-numeric: tabular-nums; }
.diff { border-collapse: collapse; margin-top: 6px; font-size: 13px; background: var(--bg); border-radius: 8px; overflow: hidden; }
.diff td { padding: 4px 10px; vertical-align: top; }
.diff td:first-child { color: var(--muted); font-weight: 700; }
.diff td.a { color: #A42727; text-decoration: line-through; text-decoration-color: rgba(164,39,39,.35); }
.diff td.b { color: #0E6B3F; font-weight: 700; }
.diff td.ar { color: var(--muted); padding: 4px 0; }
.diff i { color: var(--muted); font-weight: 400; }
.card-composer { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.card-composer textarea { min-height: 64px; }
.cmt { padding: 10px 12px; border-radius: 12px; background: var(--bg); margin-bottom: 8px; }
.cmt.by-owner { background: var(--berry-50); }
.cmt-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); }
.cmt-t { margin-top: 4px; white-space: pre-wrap; word-wrap: break-word; }

/* правая колонка карточки */
.balance { padding: 18px; background: linear-gradient(140deg, #fff 40%, var(--green-bg)); }
.balance.neg { background: linear-gradient(140deg, #fff 40%, var(--red-bg)); border-color: var(--red-line); }
.balance small { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.balance .bal { font-family: var(--display); font-weight: 600; font-size: 32px; margin: 4px 0 2px; font-variant-numeric: tabular-nums; color: var(--green); }
.balance.neg .bal { color: var(--red); }
.balance .bal-sub { font-size: 14px; color: var(--ink-2); margin-bottom: 12px; }
.side-block { padding: 14px 16px; }
.sb-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.sb-h h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.sb-h h3 svg { width: 16px; height: 16px; }
.abon-card { border-radius: 12px; padding: 12px; background: var(--line-2); }
.abon-card.k-monthly { background: #EEF5FD; } .abon-card.k-term { background: var(--berry-50); } .abon-card.k-lesson { background: var(--green-bg); }
.abon-card > b { display: block; font-size: 15px; }
.abon-card > small { color: var(--ink-2); font-size: 13px; }
.abon-card .stop { margin-top: 6px; color: var(--muted); padding: 0 8px; }
.kvl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 10px 0 0; font-size: 13.5px; }
.kvl dt { color: var(--muted); }
.kvl dd { margin: 0; text-align: right; font-weight: 700; word-break: break-word; }
.kvl dd small { color: var(--muted); font-weight: 600; }
.note-box { margin-top: 12px; background: var(--orange-50); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; white-space: pre-wrap; }
.past-abons summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--muted); margin-top: 10px; }
.past-abons .pa { padding: 6px 0; border-top: 1px solid var(--line-2); font-size: 13px; }
.past-abons .pa small { display: block; color: var(--muted); }
.max-box { background: repeating-linear-gradient(135deg, #fff 0 14px, #FCFAFB 14px 28px); }

/* задачи CRM */
.ctask { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 10px 10px 12px; }
.ctask .ct-date { width: 66px; flex: none; text-align: center; background: var(--line-2); border-radius: 10px; padding: 6px 4px; }
.ctask .ct-date b { display: block; font-size: 13px; font-variant-numeric: tabular-nums; }
.ctask .ct-date small { font-size: 11px; color: var(--muted); font-weight: 700; }
.ctask .ct-date.today { background: var(--orange-50); color: #9B5F00; }
.ctask .ct-b { flex: 1; min-width: 0; }
.ctask .tt { font-weight: 700; }
.ctask .td { color: var(--muted); font-size: 13px; margin-top: 2px; white-space: pre-wrap; }
.ctask .tm { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ctask .comment { margin-top: 6px; font-size: 13px; }
.ctask.overdue { border-color: var(--red-line); box-shadow: 0 0 0 3px #FDECEC; }
.ctask.overdue .ct-date { background: var(--red-bg); color: var(--red); }
.ctask.st-done { background: var(--green-bg); border-color: var(--green-line); }
.ctask.st-canceled { background: var(--red-bg); border-color: var(--red-line); }
.ctask.st-canceled .tt { text-decoration: line-through; color: #A42727; }

/* абонементы */
.atypes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.atype { padding: 16px; position: relative; overflow: hidden; }
.atype::after { content: ''; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; opacity: .5; }
.atype.k-monthly::after { background: #DCEBFB; } .atype.k-term::after { background: var(--berry-100); } .atype.k-lesson::after { background: #CDEFDB; }
.atype.off { opacity: .55; }
.at-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; position: relative; z-index: 1; }
.at-h b { font-size: 15px; }
.at-price { font-family: var(--display); font-weight: 600; font-size: 24px; margin-top: 10px; font-variant-numeric: tabular-nums; }
.at-price small { font-family: var(--font); font-size: 13px; color: var(--muted); font-weight: 700; margin-left: 4px; }
.at-sub { font-size: 13px; color: var(--berry); font-weight: 700; }
.at-use { margin-top: 10px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.atype.add { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 120px; border: 1.5px dashed var(--line); box-shadow: none; background: transparent; cursor: pointer; font-weight: 800; color: var(--muted); }
.atype.add svg { width: 20px; height: 20px; }
.atype.add:hover { border-color: var(--orange); color: var(--ink); }

/* формы: таблетки-переключатели */
.pills { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.pills label { position: relative; cursor: pointer; }
.pills input { position: absolute; opacity: 0; pointer-events: none; }
.pills span { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); font-weight: 700; font-size: 14px; background: #fff; }
.pills input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.pills input:disabled + span { opacity: .45; cursor: not-allowed; }
.pills input:focus-visible + span { box-shadow: 0 0 0 3px var(--berry-50); }
.reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.reasons label { position: relative; cursor: pointer; }
.reasons input { position: absolute; opacity: 0; }
.reasons span { display: block; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.reasons input:checked + span { border-color: var(--red); background: var(--red-bg); color: #8E2323; font-weight: 800; }
.preview { background: var(--bg); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 12px; }
.preview:empty { display: none; }
.big-input { font-family: var(--display); font-size: 22px; font-weight: 600; }
dialog { width: min(560px, calc(100vw - 24px)); }
.dlg-b { max-height: calc(100vh - 170px); overflow-y: auto; }
.req-c { font-style: normal; }

@media (max-width: 1100px) {
  .client-grid { grid-template-columns: 1fr; }
  .wins { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 860px) {
  .wins { grid-template-columns: 1fr; gap: 10px; }
  .win { min-height: 0; }
  .search, .search .input { width: 100%; }
  .search { flex: 1 1 100%; order: 5; }
  .chead { padding: 14px; gap: 12px; }
  .cav.big { width: 48px; height: 48px; font-size: 17px; border-radius: 15px; }
  .chead h2 { font-size: 18px; }
  .reasons { grid-template-columns: 1fr; }
  .card-composer { flex-direction: column; align-items: stretch; }
  .tbl td, .tbl th { padding: 9px 10px; }
  .ctask { flex-wrap: wrap; }
}
.chead { margin-bottom: 16px; }
@media (max-width: 860px) {
  .tbl .hide-m { display: none; }
  .tbl.clients .cname { min-width: 0; }
  .client-side { order: -1; }
  .client-grid { display: flex; flex-direction: column; align-items: stretch; }
  .kvl dd { text-align: right; }
}

.a-client { font-weight: 700; font-size: 13px; margin-left: 6px; white-space: nowrap; }
.cseg { max-width: 100%; overflow-x: auto; }
.cseg button { white-space: nowrap; }
.bal-note { background: var(--green-bg); border: 1px solid var(--green-line); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 8px; }

/* =================== CRM: финансы (этап 3) =================== */
:root { --ref: #D9730D; --ref-bg: #FFF1E2; --ref-line: #F6CFA2; }
.money.ref { color: var(--ref); }
.btn.f-in { background: var(--green); border-color: var(--green); color: #fff; }
.btn.f-in:hover { background: #12804C; }
.btn.f-out { background: #fff; border-color: var(--red-line); color: var(--red); }
.btn.f-out:hover { background: var(--red-bg); border-color: var(--red); }
.btn.f-out b { font-size: 20px; line-height: 0; margin-top: -2px; }
.btn.f-ref { background: #fff; border-color: var(--ref-line); color: var(--ref); }
.btn.f-ref:hover { background: var(--ref-bg); border-color: var(--ref); }
.fin-add { display: flex; gap: 8px; flex-wrap: wrap; }
.mswitch { display: inline-flex; align-items: center; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 2px; }
.mswitch .btn { height: 36px; width: 36px; }
.ms-label { position: relative; padding: 0 8px; cursor: pointer; min-width: 150px; text-align: center; }
.ms-label b { font-family: var(--display); font-weight: 600; font-size: 16px; }
.ms-label input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.ms-label input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }

.fin-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.fh-total { padding: 18px 20px 14px; position: relative; overflow: hidden; background: linear-gradient(150deg, #fff 45%, #FFF7EA); display: flex; flex-direction: column; }
.fh-total::after { content: ''; position: absolute; right: -60px; top: -70px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(245,166,35,.16), transparent 70%); pointer-events: none; }
.fh-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fh-top small { color: var(--muted); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.fh-cmp { font-size: 12px; font-weight: 800; border-radius: 7px; padding: 2px 7px; }
.fh-cmp.up { background: var(--green-bg); color: var(--green); }
.fh-cmp.down { background: var(--red-bg); color: var(--red); }
.fh-big { font-family: var(--display); font-weight: 600; font-size: 40px; letter-spacing: -.02em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.fh-big.neg { color: var(--red); }
.fh-sub { font-size: 14px; color: var(--ink-2); }
.fh-sub b { font-variant-numeric: tabular-nums; }
.fh-sub small { color: var(--muted); }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 54px; margin: 14px 0 6px; }
.spark i { flex: 1; min-width: 2px; height: var(--h); background: linear-gradient(180deg, var(--orange), #F7C065); border-radius: 3px 3px 1px 1px; position: relative; }
.spark i::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--line); border-radius: 1px; }
.spark i.neg { background: var(--ref); }
.spark i.now { background: linear-gradient(180deg, var(--berry), #B8468F); }
.spark i.fut::after { background: var(--line-2); }
.fh-foot { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: auto; }
.fh-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fh-tile { padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; position: relative; overflow: hidden; }
.fh-tile::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--line); }
.fh-tile small { color: var(--muted); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.fh-tile b { font-family: var(--display); font-weight: 600; font-size: 22px; margin-top: 4px; }
.fh-tile span { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.fh-tile.t-in::before { background: var(--green); } .fh-tile.t-in b { color: var(--green); }
.fh-tile.t-ref::before { background: var(--ref); } .fh-tile.t-ref b { color: var(--ref); }
.fh-tile.t-out::before { background: var(--red); } .fh-tile.t-out b { color: var(--red); }
.fh-tile.t-net::before { background: var(--berry); } .fh-tile.t-net b.neg { color: var(--red); }

.fin-break { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; align-items: start; }
.brow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 2px 12px; align-items: baseline; padding: 7px 0 6px; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.brow .bl { font-weight: 700; min-width: 0; }
.brow .bl small.refx { color: var(--ref); font-weight: 700; font-size: 11.5px; }
.brow.prize .bl small.refx { color: var(--muted); }
.brow em { font-style: normal; color: var(--muted); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.brow b { font-variant-numeric: tabular-nums; text-align: right; }
.brow .bar { grid-column: 1 / -1; height: 5px; border-radius: 4px; background: var(--line-2); overflow: hidden; display: block; margin-top: 3px; }
.brow .bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--orange), #F7C065); }
.brow.prize .bar i { background: #C9BEC5; }
.brow.out .bar i { background: linear-gradient(90deg, var(--red), #EE8A8A); }
.brow.zero { opacity: .45; }
.brow.zero .bar { display: none; }
.brow.total { border-bottom: 0; border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 9px; font-size: 15px; }
.brow.total b { font-family: var(--display); font-weight: 600; }
.brow.total.sub { border-top: 0; margin-top: 0; padding-top: 2px; font-size: 13.5px; color: var(--ink-2); }
.brow.total.sub b { font-family: var(--font); font-weight: 800; }
.exp-m { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.fin-jbar { margin-bottom: 12px; }
.fin-h { margin: 0 6px 0 2px; font-size: 16px; font-weight: 800; }
.fin-del { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.seg .ft-income.on { background: var(--green); } .seg .ft-refund.on { background: var(--ref); } .seg .ft-expense.on { background: var(--red); }
.tbl.fin td, .tbl.fin th { padding: 9px 12px; }
.tbl.fin .c-time { width: 64px; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 700; }
.tbl.fin tr.dayrow td { background: #FBF8F6; padding: 8px 12px; font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.tbl.fin tr.dayrow td { display: table-cell; }
.tbl.fin tr.dayrow .dsum { float: right; display: inline-flex; gap: 12px; text-transform: none; letter-spacing: 0; font-size: 13px; }
.tbl.fin tr.frow { cursor: pointer; transition: background .1s; }
.tbl.fin tr.frow:hover { background: #FDFAF7; }
.tbl.fin tr.frow td:first-child { box-shadow: inset 3px 0 0 var(--green); }
.tbl.fin tr.t-refund td:first-child { box-shadow: inset 3px 0 0 var(--ref); }
.tbl.fin tr.t-expense td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.tbl.fin tr.t-income .famt { color: var(--green); }
.tbl.fin tr.t-refund .famt { color: var(--ref); }
.tbl.fin tr.t-expense .famt { color: var(--red); }
.tbl.fin tr.t-refund { background: linear-gradient(90deg, var(--ref-bg), transparent 55%); }
.tbl.fin tr.deleted { cursor: default; opacity: .55; }
.tbl.fin tr.deleted .famt, .tbl.fin tr.deleted td:nth-child(2) > b, .tbl.fin tr.deleted .flink { text-decoration: line-through; }
.tbl.fin .famt { font-size: 15px; }
.flink { font-weight: 800; color: var(--ink); text-decoration: none; border-bottom: 1px dashed #CFC3CB; }
.flink:hover { color: var(--berry); border-color: var(--berry); }
.fcom { color: var(--muted); }
.ftag { display: inline-block; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 2px 6px; border-radius: 6px; margin-right: 6px; vertical-align: 1px; }
.ftag.ref { background: var(--ref-bg); color: var(--ref); }
.ftag.out { background: var(--red-bg); color: var(--red); }
.tbl small.show-m { display: none; }
.tbl.pays tr.refund td { background: var(--ref-bg); }

/* окно оплаты/возврата/расхода */
dialog.k-refund .dlg-h { box-shadow: inset 0 3px 0 var(--ref); }
dialog.k-expense .dlg-h { box-shadow: inset 0 3px 0 var(--red); }
dialog.k-income .dlg-h { box-shadow: inset 0 3px 0 var(--green); }
.pay-hint { font-size: 13px; color: var(--ink-2); background: var(--bg); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; }
.pay-hint:empty { display: none; }
.pay-hint .warn { color: var(--red); font-weight: 700; }
.cpick { position: relative; }
.cp-box { position: relative; }
.cp-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 4px; max-height: 320px; overflow-y: auto; }
.cp-row { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; padding: 7px 8px; border-radius: 9px; cursor: pointer; text-align: left; }
.cp-row.hi, .cp-row:hover { background: var(--orange-50); }
.cp-row .cav, .cp-sel .cav { width: 30px; height: 30px; font-size: 12px; border-radius: 9px; }
.cp-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cp-t b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-t small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-row em { font-style: normal; font-weight: 800; font-size: 13px; }
.cp-empty { padding: 12px; color: var(--muted); font-size: 13px; text-align: center; }
.cp-sel { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--berry); background: var(--berry-50); border-radius: 12px; padding: 7px 8px 7px 10px; }

@media (max-width: 1100px) {
  .fin-break { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .fin-bar .grow { display: none; }
  .fin-add { width: 100%; display: grid; grid-template-columns: 1fr 1fr 1fr; }
  .fin-add .btn { padding: 0 8px; }
  .mswitch { flex: 1; justify-content: space-between; }
  .ms-label { min-width: 0; }
  .fin-hero { grid-template-columns: 1fr; }
  .fh-big { font-size: 32px; }
  .fh-tile b { font-size: 18px; }
  .fh-tiles { gap: 10px; }
  .fin-break { grid-template-columns: 1fr; gap: 10px; }
  .fin-h { width: 100%; }
  .tbl small.show-m { display: block; }
  .tbl.fin .c-time { width: 48px; padding-right: 4px; }
  .tbl.fin tr.dayrow .dsum { float: none; display: flex; margin-top: 2px; }
}
a.btn { text-decoration: none; color: inherit; }
a.btn.primary { color: #fff; }

/* =====================================================================
   Этап 4 · уроки и регулярные группы
   Цвета типов: пробный — зелёный целиком, отработка — жёлтый, групповой — белый, индивидуальный — фиолетовый.
   Проведён — зелёная неоновая рамка, отменён — красный и перечёркнут.
   ===================================================================== */
:root {
  --t-group: #3B3440; --t-group-bg: #FFFFFF; --t-group-line: #E3DAE0;
  --t-ind: #6A3FD0; --t-ind-bg: #EFE7FF; --t-ind-line: #CDB9FA;
  --t-trial: #FFFFFF; --t-trial-bg: #22B566; --t-trial-line: #179452;
  --t-mk: #5C4300; --t-mk-bg: #FFE27A; --t-mk-line: #EDC437;
  --neon: #19F28C;
}
.ladd { position: relative; }
.ladd-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 25; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 210px; }
.ladd-menu button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; padding: 9px 10px; border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer; text-align: left; }
.ladd-menu button:hover { background: var(--line-2); }
.la-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.la-ico svg { width: 18px; height: 18px; }
.la-group .la-ico { background: #F3EEF1; color: var(--t-group); border: 1px solid var(--t-group-line); }
.la-individual .la-ico { background: var(--t-ind-bg); color: var(--t-ind); }
.la-trial .la-ico { background: var(--t-trial-bg); color: #fff; }
.la-makeup .la-ico { background: var(--t-mk-bg); color: var(--t-mk); }
.lsn-mentor { width: auto; min-height: 40px; max-width: 200px; }
.lsn-bar .ms-label { min-width: 220px; }

/* сводка над календарём */
.lsn-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 10px; }
.ls-tile { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow); min-width: 0; }
.ls-tile small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.ls-tile b { font-family: var(--display); font-weight: 600; font-size: 22px; line-height: 1.25; }
.ls-tile span { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-tile.ok b { color: var(--green); }
.ls-tile.bad b { color: var(--red); }
.ls-tile.warn { border-color: #F6CFA2; background: #FFF8EF; }
.ls-tile.warn b { color: #D9730D; }
.ls-tile .dot { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin: 0 4px 0 2px; vertical-align: 0; }
.dot.t-trial { background: var(--t-trial-bg); } .dot.t-makeup { background: var(--t-mk-line); } .dot.t-individual { background: var(--t-ind); }
.lsn-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 2px 12px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.lsn-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.lsn-legend .lg i { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; }
.lsn-legend .lg svg { width: 14px; height: 14px; }
.lg.t-group i { background: #fff; border: 1px solid var(--t-group-line); color: var(--t-group); }
.lg.t-individual i { background: var(--t-ind-bg); color: var(--t-ind); border: 1px solid var(--t-ind-line); }
.lg.t-trial i { background: var(--t-trial-bg); color: #fff; }
.lg.t-makeup i { background: var(--t-mk-bg); color: var(--t-mk); }
.lg.st-done i { background: #fff; color: var(--green); box-shadow: 0 0 0 2px var(--neon), 0 0 8px var(--neon); }
.lg.st-canceled i { background: var(--red-bg); color: var(--red); }
.lg.st-late i { background: #FFF1E2; color: #D9730D; }

/* сетка дня / недели */
.cal { overflow: hidden; position: relative; }
.cal-scroll { overflow-x: auto; }
.cal-head, .cal-body { display: grid; }
.cal-head { position: sticky; top: 0; z-index: 3; background: #FDFBFC; border-bottom: 1px solid var(--line); }
.cal-dh { border: 0; background: transparent; padding: 10px 6px 8px; cursor: pointer; display: flex; align-items: baseline; justify-content: center; gap: 6px; font-size: 13px; color: var(--ink-2); border-left: 1px solid var(--line-2); }
.cal-dh b { font-weight: 800; }
.cal-dh span { color: var(--muted); font-weight: 700; }
.cal-dh em { font-style: normal; font-size: 11px; font-weight: 800; background: var(--line-2); color: var(--muted); border-radius: 6px; padding: 0 6px; }
.cal-dh em:empty { display: none; }
.cal-dh:hover { background: var(--line-2); }
.cal-dh.today { color: var(--berry); }
.cal-dh.today span { color: #fff; background: var(--berry); border-radius: 7px; padding: 1px 7px; }
.cal.day .cal-dh { justify-content: flex-start; padding-left: 14px; cursor: default; }
.cal-times span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 700; text-align: right; padding: 0 8px 0 0; transform: translateY(-7px); font-variant-numeric: tabular-nums; }
.cal-times span:first-child { transform: none; padding-top: 3px; }
.cal-col { position: relative; border-left: 1px solid var(--line-2); cursor: copy;
  background-image: repeating-linear-gradient(to bottom, var(--line-2) 0 1px, transparent 1px 32px), repeating-linear-gradient(to bottom, #E9E1E6 0 1px, transparent 1px 64px); }
.cal-col.today { background-color: #FFFBF3; }
.cal-col.sun { background-color: #FDFAFB; }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--red); z-index: 2; pointer-events: none; }
.cal-now i { position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.cal-empty { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); background: #fff; border: 1px dashed var(--line); border-radius: 14px; padding: 14px 18px; color: var(--muted); font-size: 14px; text-align: center; max-width: min(420px, 80%); pointer-events: none; }

/* плашка урока */
.lsn { position: absolute; display: flex; flex-direction: column; gap: 1px; text-align: left; overflow: hidden; cursor: pointer;
  border-radius: 10px; padding: 5px 7px 5px 9px; font-size: 12px; line-height: 1.3; color: var(--t-group);
  background: var(--t-group-bg); border: 1px solid var(--t-group-line); box-shadow: inset 3px 0 0 var(--t-group-line), 0 1px 2px rgba(24,19,27,.06);
  transition: transform .08s, box-shadow .15s; z-index: 1; }
.lsn:hover { z-index: 4; transform: translateY(-1px); box-shadow: inset 3px 0 0 currentColor, 0 8px 22px -8px rgba(24,19,27,.35); min-height: fit-content; }
.lsn.t-individual { background: var(--t-ind-bg); border-color: var(--t-ind-line); color: #3B1F8C; box-shadow: inset 3px 0 0 var(--t-ind); }
.lsn.t-trial { background: var(--t-trial-bg); border-color: var(--t-trial-line); color: #fff; box-shadow: inset 3px 0 0 #0E7A41; }
.lsn.t-makeup { background: var(--t-mk-bg); border-color: var(--t-mk-line); color: var(--t-mk); box-shadow: inset 3px 0 0 #C79A00; }
.lsn.st-done { border-color: var(--neon); box-shadow: 0 0 0 2px var(--neon), 0 0 14px rgba(25, 242, 140, .65); }
.lsn.st-done:hover { box-shadow: 0 0 0 2px var(--neon), 0 0 18px rgba(25, 242, 140, .9); }
.lsn.st-canceled { background: var(--red-bg) !important; border-color: var(--red-line) !important; color: var(--red) !important; box-shadow: inset 3px 0 0 var(--red) !important; text-decoration: line-through; opacity: .85; }
.lsn.st-late { border-style: dashed; border-color: #E8892A; }
.lb-h { display: flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.lb-h b { font-weight: 800; }
.lb-ico { width: 16px; height: 16px; display: inline-grid; place-items: center; flex: none; }
.lb-ico svg { width: 15px; height: 15px; }
.lb-st { margin-left: auto; width: 18px; height: 18px; border-radius: 6px; display: grid; place-items: center; flex: none; }
.lb-st svg { width: 12px; height: 12px; }
.st-done .lb-st { background: var(--neon); color: #064D2B; }
.st-canceled .lb-st { background: var(--red); color: #fff; }
.st-late .lb-st { background: #FFF1E2; color: #D9730D; }
.st-late .lb-st svg { width: 14px; height: 14px; }
.lb-t { font-weight: 800; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-t em { font-style: normal; font-weight: 700; opacity: .7; font-size: 11.5px; }
.lb-sub, .lb-topic { opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-topic { font-style: italic; }
.lb-kids { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.lb-kids span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-kids span::before { content: '• '; opacity: .6; }
.lb-kids span.abs { text-decoration: line-through; opacity: .6; }
.lb-kids span.lead::after { content: ' · лид'; opacity: .7; font-size: 11px; }
.lb-m { display: flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 2px; font-weight: 700; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-m svg { width: 13px; height: 13px; flex: none; }
.lsn.compact .lb-kids, .lsn.compact .lb-sub, .lsn.compact .lb-topic { display: none; }
.lsn.compact .lb-m { margin-top: 0; padding-top: 0; }

/* неделя на телефоне — список по дням */
.agenda { display: flex; flex-direction: column; gap: 10px; }
.ag-day { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: var(--shadow); }
.ag-day.today { border-color: var(--orange); }
.ag-h { display: flex; align-items: baseline; gap: 8px; width: 100%; border: 0; background: transparent; padding: 4px 6px 8px; cursor: pointer; text-align: left; }
.ag-h b { font-size: 14px; }
.ag-h span { color: var(--muted); font-size: 13px; font-weight: 700; }
.ag-h em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 800; color: var(--muted); }
.ag-list { display: flex; flex-direction: column; gap: 6px; }
.ag-list .lsn { position: relative; inset: auto; width: 100%; }
.ag-empty { color: var(--muted); font-size: 13px; padding: 0 6px 6px; }

/* месяц */
.month { overflow: hidden; }
.mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mhead span { text-align: center; font-size: 12px; font-weight: 800; color: var(--muted); padding: 10px 0; background: #FDFBFC; border-bottom: 1px solid var(--line); }
.mc { min-height: 132px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mc:nth-child(7n) { border-right: 0; }
.mc.out { background: #FBF9FA; }
.mc.out .mc-h b { color: #C9BFC6; }
.mc.today { background: #FFFBF3; }
.mc-h { display: flex; align-items: center; justify-content: space-between; border: 0; background: transparent; cursor: pointer; padding: 2px 4px; border-radius: 7px; }
.mc-h:hover { background: var(--line-2); }
.mc-h b { font-size: 13px; }
.mc.today .mc-h b { background: var(--berry); color: #fff; border-radius: 7px; padding: 0 6px; }
.mc-h em { font-style: normal; font-size: 11px; font-weight: 800; color: var(--muted); }
.mc-h em.late { color: #D9730D; }
.mchip { display: flex; align-items: center; gap: 4px; width: 100%; min-width: 0; border: 1px solid var(--t-group-line); background: #fff; color: var(--t-group); border-radius: 7px; padding: 2px 5px; font-size: 11.5px; cursor: pointer; text-align: left; }
.mchip i { width: 13px; height: 13px; display: grid; place-items: center; flex: none; }
.mchip i svg { width: 12px; height: 12px; }
.mchip b { font-variant-numeric: tabular-nums; font-weight: 800; }
.mchip span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mchip em { font-style: normal; font-weight: 700; opacity: .65; }
.mchip.t-individual { background: var(--t-ind-bg); border-color: var(--t-ind-line); color: #3B1F8C; }
.mchip.t-trial { background: var(--t-trial-bg); border-color: var(--t-trial-line); color: #fff; }
.mchip.t-makeup { background: var(--t-mk-bg); border-color: var(--t-mk-line); color: var(--t-mk); }
.mchip.st-done { border-color: var(--neon); box-shadow: 0 0 0 1px var(--neon), 0 0 6px rgba(25,242,140,.6); }
.mchip.st-canceled { background: var(--red-bg); border-color: var(--red-line); color: var(--red); text-decoration: line-through; }
.mchip.st-late { border-style: dashed; border-color: #E8892A; }
.mc-more { border: 0; background: transparent; color: var(--berry); font-size: 11.5px; font-weight: 800; cursor: pointer; text-align: left; padding: 2px 4px; }
.mdots { display: flex; flex-wrap: wrap; gap: 3px; }
.mdots i { width: 9px; height: 9px; border-radius: 3px; background: #fff; border: 1px solid #CFC4CB; }
.mdots i.t-trial { background: var(--t-trial-bg); border-color: var(--t-trial-line); }
.mdots i.t-makeup { background: var(--t-mk-bg); border-color: var(--t-mk-line); }
.mdots i.t-individual { background: var(--t-ind-bg); border-color: var(--t-ind); }
.mdots i.st-done { box-shadow: 0 0 0 1.5px var(--neon); }
.mdots i.st-canceled { background: var(--red-bg); border-color: var(--red); }

/* карточка урока */
dialog.lsheet { width: min(520px, calc(100vw - 24px)); overflow: hidden; display: flex; flex-direction: column; }
dialog.lsheet[open] { display: flex; }
.ls-top { display: flex; align-items: center; gap: 8px; padding: 12px 14px 10px 18px; background: #F7F3F5; border-bottom: 1px solid var(--line); }
.ls-top.t-individual { background: var(--t-ind-bg); }
.ls-top.t-trial { background: var(--t-trial-bg); color: #fff; }
.ls-top.t-trial .btn { color: #fff; }
.ls-top.t-makeup { background: var(--t-mk-bg); }
.ls-badge { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; font-size: 14px; }
.ls-badge i { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.75); }
.ls-top.t-trial .ls-badge i { background: rgba(255,255,255,.22); }
.ls-badge svg { width: 18px; height: 18px; }
.ls-st { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 8px; background: rgba(255,255,255,.8); color: var(--ink-2); }
.ls-st svg { width: 13px; height: 13px; }
.ls-st.st-done { background: #062E1B; color: var(--neon); box-shadow: 0 0 10px rgba(25,242,140,.5); }
.ls-st.st-canceled { background: var(--red); color: #fff; }
.ls-st.st-late { background: #FFF1E2; color: #D9730D; }
.ls-body { padding: 14px 18px 4px; overflow-y: auto; }
.ls-body.st-done { box-shadow: inset 0 0 0 2px var(--neon); }
.ls-body.st-canceled .ls-title, .ls-body.st-canceled .ls-when { text-decoration: line-through; color: var(--red); }
.ls-title { margin: 0; font-family: var(--display); font-weight: 600; font-size: 20px; }
.ls-when { color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.ls-when small { color: var(--muted); }
.ls-kv { grid-template-columns: 110px 1fr; margin-top: 12px; }
.ls-kv dd { text-align: left; }
.ls-kv dd small { display: block; font-weight: 600; color: var(--muted); }
.ls-kv dd.red { color: var(--red); }
.ls-topic .input { min-height: 36px; padding: 6px 10px; font-weight: 600; }
.ls-topic small { margin-top: 4px; }
.ls-topic .btn { margin-top: 6px; }
.lk-mentor { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; margin-right: 10px; }
.lk-mentor i, .mdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.ls-kids-h { display: flex; align-items: baseline; gap: 10px; margin: 14px 0 6px; font-size: 13.5px; }
.ls-kids-h span { color: var(--green); font-weight: 700; font-size: 13px; }
.ls-kids-h small { color: var(--muted); font-size: 12px; }
.ls-kids { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ls-kids li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--line-2); font-size: 14px; }
.ls-kids li:first-child { border-top: 0; }
.ls-kids li.abs { background: #FFF7F7; }
.lk-n { color: var(--muted); font-size: 12.5px; width: 20px; flex: none; font-variant-numeric: tabular-nums; }
.lk-att { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 1.5px dashed #CFC4CB; }
.lk-att svg { width: 12px; height: 12px; }
.lk-att.p { border: 0; background: var(--green-bg); color: var(--green); }
.lk-att.a { border: 0; background: var(--red-bg); color: var(--red); }
.lk-name { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.lk-name a { font-weight: 700; color: var(--ink); text-decoration: none; border-bottom: 1px dashed #CFC4CB; }
.lk-name a:hover { color: var(--berry); border-color: var(--berry); }
.chip.mk { background: var(--t-mk-bg); color: var(--t-mk); }
.chip.link { border: 0; cursor: pointer; }
.lk-money { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 13.5px; }
.lk-money.charged { color: var(--ink); }
.lk-money.will { color: var(--ink-2); }
.lk-money.info { color: var(--muted); font-weight: 700; }
.lk-money.info.paid { color: var(--green); }
.lk-money.bad { color: var(--red); font-size: 12.5px; }
.lk-money.free { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.ls-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line-2); }
.ls-actions .btn svg { width: 16px; height: 16px; }
.ls-hist { padding: 0 18px 8px; }
.ls-hist summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--muted); padding: 4px 0; }
.ls-hist .hist { margin-top: 8px; }
.ls-foot { padding: 0 18px 14px; color: var(--muted); font-size: 12px; }

/* провести */
dialog.k-conduct .dlg-h, dialog.k-lesson .dlg-h { box-shadow: inset 0 3px 0 var(--neon); }
dialog.k-lesson.t-trial .dlg-h { box-shadow: inset 0 4px 0 var(--t-trial-bg); }
dialog.k-lesson.t-makeup .dlg-h { box-shadow: inset 0 4px 0 var(--t-mk-line); }
dialog.k-lesson.t-individual .dlg-h { box-shadow: inset 0 4px 0 var(--t-ind); }
dialog.k-lesson.t-group .dlg-h { box-shadow: inset 0 4px 0 var(--ink-2); }
.cd-head { display: flex; align-items: center; gap: 8px; }
.cd-head i { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: #fff; flex: none; }
.cd-head svg { width: 16px; height: 16px; }
.cd-head.t-trial i { background: var(--t-trial-bg); color: #fff; }
.cd-head.t-makeup i { background: var(--t-mk-bg); color: var(--t-mk); }
.cd-head.t-individual i { background: var(--t-ind-bg); color: var(--t-ind); }
.cd-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cd-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; padding: 8px 10px; border-top: 1px solid var(--line-2); }
.cd-row:first-child { border-top: 0; }
.cd-row.abs { background: #FFF7F7; }
.cd-name b { display: block; font-size: 14px; }
.cd-name small { color: var(--muted); font-size: 12px; }
.cd-name small.bad { color: var(--red); }
.cd-att span { height: 34px; padding: 0 10px; gap: 5px; font-size: 13px; }
.cd-att span svg { width: 13px; height: 13px; }
.cd-att input:checked + span.p { background: var(--green); border-color: var(--green); }
.cd-att input:checked + span.a { background: var(--red); border-color: var(--red); }
.cd-reason { grid-column: 1 / -1; min-height: 36px; padding: 6px 10px; }
.cd-task { border: 1.5px dashed var(--berry-100); border-radius: 14px; padding: 12px 12px 0; background: var(--berry-50); margin-bottom: 14px; }
.cd-task-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cd-task-h svg { width: 18px; height: 18px; color: var(--berry); }
.cd-task-h small { color: var(--muted); font-size: 12px; }
.cn-quick span { height: 32px; font-size: 13px; padding: 0 10px; }

/* форма урока */
.ltypes span { gap: 6px; padding: 0 12px; }
.ltypes span i { width: 18px; height: 18px; display: grid; place-items: center; }
.ltypes span i svg { width: 16px; height: 16px; }
.ltypes input:checked + span.lt-trial { background: var(--t-trial-bg); border-color: var(--t-trial-line); }
.ltypes input:checked + span.lt-makeup { background: var(--t-mk-bg); border-color: var(--t-mk-line); color: var(--t-mk); }
.ltypes input:checked + span.lt-individual { background: var(--t-ind); border-color: var(--t-ind); }
.lf-dur { flex: 0 0 96px !important; }
.preview .warn, .help .warn { color: #D9730D; font-weight: 700; }
.sp-chips { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.sp-chip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 12px; padding: 5px 6px 5px 6px; background: #fff; }
.sp-chip .cav { width: 28px; height: 28px; font-size: 11px; border-radius: 9px; }
.sp-n { flex: 1; min-width: 120px; font-weight: 700; font-size: 14px; }
.sp-n a { color: var(--ink); text-decoration: none; }
.sp-abs { flex: 1 1 220px; min-height: 34px; padding: 5px 8px; font-size: 13px; }
.sp-abs.bad { border-color: var(--red-line); color: var(--red); }
.sp-empty { color: var(--muted); font-size: 13px; padding: 6px 2px; }
.sp-add { display: flex; gap: 8px; align-items: flex-start; }
.sp-add .cp-box { flex: 1; }
.sp-add .btn { height: 42px; }
.wdays span { min-width: 46px; justify-content: center; padding: 0 10px; }

/* группы */
.gcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.gcard { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; text-decoration: none; color: var(--ink); transition: transform .08s, box-shadow .15s, border-color .15s; position: relative; overflow: hidden; }
.gcard::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(var(--orange), var(--berry)); }
.gcard.ind::before { background: var(--t-ind); }
.gcard:hover { transform: translateY(-1px); border-color: #DCD2D8; box-shadow: 0 10px 28px -14px rgba(24,19,27,.35); }
.gcard.off { opacity: .6; }
.gc-top { display: flex; align-items: center; justify-content: space-between; }
.gc-time { font-family: var(--display); font-weight: 600; font-size: 22px; font-variant-numeric: tabular-nums; }
.gc-time small { font-size: 14px; color: var(--muted); font-weight: 500; }
.gc-n { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; font-size: 14px; background: var(--line-2); border-radius: 9px; padding: 3px 9px; }
.gc-n svg { width: 16px; height: 16px; color: var(--muted); }
.gc-title { font-weight: 800; font-size: 15px; }
.chip.ind { background: var(--t-ind-bg); color: var(--t-ind); }
.gc-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.gc-kids { color: var(--ink-2); font-size: 13px; line-height: 1.45; min-height: 38px; }
.gc-next { color: var(--muted); font-size: 12px; font-weight: 700; border-top: 1px solid var(--line-2); padding-top: 6px; margin-top: auto; }
.big-ico { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--berry-50); color: var(--berry); }
.big-ico svg { width: 32px; height: 32px; }
.ghead { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; margin-bottom: 16px; }
.gh-ico { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(135deg, var(--orange-50), var(--berry-50)); color: var(--berry); flex: none; }
.ghead.ind .gh-ico { background: var(--t-ind-bg); color: var(--t-ind); }
.gh-ico svg { width: 30px; height: 30px; }
.ghead h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 24px; }
.gh-when { margin: 2px 0 8px; font-size: 15px; }
.gh-when small { color: var(--muted); }
.ghead .tm { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gh-start { text-align: right; flex: none; }
.gh-start small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.gh-start b { font-size: 15px; }
.group-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.seg.sm button { padding: 4px 10px; font-size: 12.5px; }
.gk-list { display: flex; flex-direction: column; }
.gk { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line-2); }
.gk:first-child { border-top: 0; }
.gk .cav { width: 30px; height: 30px; border-radius: 10px; font-size: 12px; }
.gk-t { flex: 1; min-width: 0; }
.gk-t a { font-weight: 700; color: var(--ink); text-decoration: none; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gk-t a:hover { color: var(--berry); }
.gk-t small { color: var(--muted); font-size: 12px; }

/* даты: история и прогноз (группа и карточка клиента) */
.gdates { display: flex; flex-wrap: wrap; gap: 5px; }
.vp { width: 48px; height: 44px; border-radius: 9px; border: 1px solid var(--line); background: #F4F1F3; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; cursor: pointer; font-size: 11px; line-height: 1.15; color: var(--ink-2); position: relative; padding: 0; }
.vp b { font-size: 10.5px; font-weight: 800; opacity: .7; }
.vp span { font-weight: 800; font-variant-numeric: tabular-nums; }
.vp em { font-style: normal; font-size: 9.5px; font-weight: 800; opacity: .8; }
.vp.st-done { background: var(--green-bg); border-color: var(--green-line); color: #0E6B3F; }
.vp.st-canceled { background: #F6F3F5; color: #B7ACB3; text-decoration: line-through; border-style: dashed; }
.vp.st-late { background: #FFF6EA; border: 1.5px dashed #E8892A; color: #B35A00; }
.vp.st-abs { background: var(--red-bg); border-color: var(--red-line); color: var(--red); }
.vp.st-abs.covered { background: linear-gradient(135deg, var(--red-bg) 55%, var(--t-mk-bg) 55%); }
.vp.extra { box-shadow: inset 0 -3px 0 var(--orange); }
.vp.vt-trial { box-shadow: inset 0 -3px 0 var(--t-trial-bg); }
.vp.vt-makeup { box-shadow: inset 0 -3px 0 var(--t-mk-line); }
.vp .vt { position: absolute; top: 2px; right: 2px; width: 11px; height: 11px; }
.vp .vt svg { width: 11px; height: 11px; }
.vp.now { cursor: default; background: transparent; border: 1px dashed var(--orange); color: var(--orange-600); font-size: 14px; }
.vp.now small { font-size: 9.5px; font-weight: 800; }
.vp:not(.now):hover { transform: translateY(-1px); box-shadow: 0 4px 10px -4px rgba(24,19,27,.3); }
.vlegend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12px; color: var(--muted); font-weight: 600; }
.vlegend span { display: inline-flex; align-items: center; gap: 6px; }
.vlegend .vp { width: 18px; height: 14px; border-radius: 4px; cursor: default; }
.vstat { font-size: 13px; color: var(--muted); }
.vstat b { color: var(--ink); font-variant-numeric: tabular-nums; }
.vstat b.ok { color: var(--green); }
.vstat b.bad { color: var(--red); }
.quick .btn svg { width: 16px; height: 16px; }
.lq-makeup:not(:disabled) { border-color: var(--t-mk-line); background: #FFF8DA; color: var(--t-mk); }
.lq-trial:not(:disabled) { border-color: var(--t-trial-line); color: #0E7A41; }
.qn { font-style: normal; background: var(--red); color: #fff; border-radius: 8px; padding: 0 6px; font-size: 11px; }
.cg { position: relative; padding: 8px 34px 8px 0; border-top: 1px solid var(--line-2); }
.cg:first-of-type { border-top: 0; }
.cg-t { display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--ink); flex-wrap: wrap; }
.cg-t b { font-size: 15px; }
.cg-t span { color: var(--ink-2); font-size: 13px; }
.cg-t:hover b { color: var(--berry); }
.cg small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.cg .btn { position: absolute; right: 0; top: 6px; }

/* задачи «Назначить отработку» */
.ctask.mk .ct-b .tt::before { content: '🔁 '; }
.btn.mk-go { background: var(--t-mk-bg); border-color: var(--t-mk-line); color: var(--t-mk); height: 34px; }
.btn.mk-go svg { width: 15px; height: 15px; }
.ctask.auto-closed { opacity: .6; }
.ctask.auto-closed.st-canceled { background: #fff; border-color: var(--line); }

@media (max-width: 1100px) {
  .group-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .hide-m { display: none !important; }
  .lsn-bar { gap: 8px; }
  .lsn-bar .mswitch { order: 1; flex: 1 1 100%; }
  .lsn-bar .ms-label { min-width: 0; }
  .lsn-bar .ms-label b { font-size: 14px; }
  .lsn-mode { order: 2; }
  .lsn-mentor { order: 3; flex: 1; max-width: none; }
  .lsn-bar > .btn.icon { order: 4; }
  .lsn-bar .ladd { order: 5; }
  .lsn-bar > .grow { display: none; }
  .lsn-sum { grid-template-columns: 1fr 1fr; gap: 8px; }
  .ls-tile { padding: 8px 10px; }
  .ls-tile b { font-size: 18px; }
  .lsn-legend { font-size: 11.5px; gap: 4px 10px; }
  .cal.day .cal-head, .cal.day .cal-body { grid-template-columns: 44px minmax(0, 1fr) !important; }
  .mc { min-height: 64px; padding: 3px 2px; }
  .mc-h { padding: 1px 2px; }
  .mc-h b { font-size: 12px; }
  .mhead span { font-size: 11px; }
  .ghead { flex-wrap: wrap; padding: 14px; }
  .gh-start { text-align: left; flex-basis: 100%; }
  .ghead h2 { font-size: 20px; }
  .gcards { grid-template-columns: 1fr; }
  .vp { width: 44px; height: 42px; }
  .ls-kv { grid-template-columns: 92px 1fr; }
  .cd-row { grid-template-columns: 1fr; }
  .sp-add { flex-direction: column; align-items: stretch; }
  dialog.lsheet { max-height: calc(100vh - 16px); }
}
.ls-top .grow, .ls-kids-h .grow { flex: 1; }
.lsn.nokids { opacity: .55; }
.lsn.nokids:hover { opacity: 1; }
.lsn.compact .lb-to { display: none; }
/* регулярные группы — неделя столбцами */
.gboard { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: start; }
.gcol { min-width: 0; }
.gcol-h { padding: 4px 4px 8px; }
.gcol-h b { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.gcol-h span { font-size: 12px; color: var(--muted); font-weight: 600; }
.gcol.today .gcol-h b { color: var(--berry); }
.gcol-b { display: flex; flex-direction: column; gap: 8px; }
.gcol .gcard { padding: 10px 12px 10px 14px; gap: 5px; }
.gcol .gc-time { font-size: 18px; }
.gcol .gc-time small { font-size: 12px; }
.gcol .gc-n { font-size: 13px; padding: 2px 7px; }
.gc-kids { display: flex; flex-direction: column; min-height: 0; font-size: 12.5px; }
.gc-kids span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcard.nokids { opacity: .7; }
@media (max-width: 1200px) {
  .gboard { display: block; }
  .gcol { margin-bottom: 14px; }
  .gcol.empty { display: none; }
  .gcol-h { display: flex; align-items: baseline; gap: 10px; }
  .gcol-b { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
.gcol .gc-time { font-size: 16px; white-space: nowrap; }
.gcol .gc-time small { font-size: 11px; }
@media (max-width: 860px) {
  .lsn-bar .lsn-mode { order: 2; flex: 1; }
  .lsn-bar .lsn-mode button { flex: 1; }
  .lsn-bar .ladd { order: 3; }
  .lsn-bar .lsn-mentor { order: 4; flex: 1 1 100%; }
  .lsn-bar > .btn.icon { display: none; }
  .lsn-sum { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .ls-tile { padding: 6px 8px; border-radius: 12px; }
  .ls-tile small { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ls-tile span { display: none; }
  .ls-tile:nth-child(5) { display: none; }
  .lsn-legend { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .lsn-legend .lg { white-space: nowrap; }
}
.row > * { min-width: 0; }
@media (max-width: 860px) {
  .cd-task .row, dialog.k-lesson .row { flex-wrap: wrap; }
  .cd-task .row > :first-child { flex-basis: 100%; }
}
/* оценки и комментарии ученику (2.3.1) */
.grade { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; font-family: var(--display); font-weight: 600; font-size: 13px; flex: none; }
.g5 { background: #DFF7E9; color: #0E7A41; } .g4 { background: #E6F0FF; color: #1F5FC4; } .g3 { background: #FFF2D6; color: #A86A00; } .g2 { background: var(--red-bg); color: var(--red); }
.lk-com { flex-basis: 100%; font-size: 12.5px; color: var(--ink-2); }
.cd-grade, .cd-com { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cd-lbl { font-size: 12px; font-weight: 700; color: var(--muted); }
.grades span { width: 38px; height: 32px; padding: 0; justify-content: center; font-family: var(--display); font-weight: 600; }
.grades span.g0 { font-family: var(--font); color: var(--muted); }
.grades input:checked + span.g5 { background: #17955A; border-color: #17955A; color: #fff; }
.grades input:checked + span.g4 { background: #2E6FD6; border-color: #2E6FD6; color: #fff; }
.grades input:checked + span.g3 { background: #E6A100; border-color: #E6A100; color: #fff; }
.grades input:checked + span.g2 { background: var(--red); border-color: var(--red); color: #fff; }
.cd-preset { flex: 1 1 260px; min-height: 36px; padding: 6px 10px; font-size: 13.5px; }
.cd-comment { flex-basis: 100%; min-height: 36px; padding: 6px 10px; }
.vp .vg { position: absolute; top: -6px; left: -5px; width: 17px; height: 17px; border-radius: 6px; font-style: normal; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }

/* =====================================================================
   Этап 4а · кабинет наставника: расписание (день / неделя), «Отметьте урок», мои дети, карточка ребёнка
   ===================================================================== */
.mn-hero { display: flex; align-items: center; gap: 16px; padding: 18px 20px; margin-bottom: 14px; border-radius: var(--radius);
  background: linear-gradient(115deg, var(--berry) 0%, #A9397F 55%, var(--orange) 140%); color: #fff; box-shadow: var(--shadow); }
.mn-hero-t { flex: 1; min-width: 0; }
.mn-hero h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 21px; }
.mn-hero p { margin: 4px 0 0; font-size: 14.5px; opacity: .92; }
.mn-hero-n { text-align: center; background: rgba(255,255,255,.16); border-radius: 14px; padding: 8px 14px; flex: none; }
.mn-hero-n b { display: block; font-family: var(--display); font-weight: 600; font-size: 28px; line-height: 1.1; }
.mn-hero-n span { font-size: 12px; font-weight: 700; opacity: .9; }

.mn-late { border: 1.5px dashed #E8892A; background: #FFFAF3; }
.mn-late .card-h h3 { color: #B45A08; }
.mn-late-ico { width: 26px; height: 26px; display: grid; place-items: center; color: #E8892A; }
.mn-late-ico svg { width: 20px; height: 20px; }
.mn-late .card-b { padding-top: 2px; }

.mn-bar { margin-bottom: 12px; }
.mn-bar .ms-label { min-width: 200px; }
.mn-list { display: flex; flex-direction: column; gap: 10px; }

/* карточка урока в расписании наставника: крупная, удобно пальцем */
.mn-lsn { display: grid; grid-template-columns: 62px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; cursor: pointer;
  background: #fff; border: 1px solid var(--t-group-line); box-shadow: inset 4px 0 0 var(--t-group), var(--shadow); transition: transform .08s, box-shadow .15s; }
.mn-lsn:hover { transform: translateY(-1px); }
.mn-lsn:focus-visible { outline: 2px solid var(--berry); outline-offset: 2px; }
.mn-lsn.t-individual { background: var(--t-ind-bg); border-color: var(--t-ind-line); box-shadow: inset 4px 0 0 var(--t-ind), var(--shadow); }
.mn-lsn.t-trial { background: #E9F9F0; border-color: var(--t-trial-line); box-shadow: inset 4px 0 0 var(--t-trial-bg), var(--shadow); }
.mn-lsn.t-makeup { background: #FFF6D6; border-color: var(--t-mk-line); box-shadow: inset 4px 0 0 #C79A00, var(--shadow); }
.mn-lsn.st-done { border-color: var(--neon); box-shadow: 0 0 0 2px var(--neon), 0 0 14px rgba(25, 242, 140, .45); }
.mn-lsn.st-late { border: 1.5px dashed #E8892A; }
.mn-lsn.st-canceled { background: var(--red-bg); border-color: var(--red-line); box-shadow: inset 4px 0 0 var(--red); opacity: .8; }
.mn-lsn.st-canceled .mn-h b { text-decoration: line-through; color: var(--red); }
.mn-time { text-align: center; font-variant-numeric: tabular-nums; }
.mn-time b { display: block; font-family: var(--display); font-weight: 600; font-size: 18px; }
.mn-time span { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.mn-time small { display: block; margin-top: 3px; font-size: 11.5px; font-weight: 800; color: #B45A08; }
.mn-b { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mn-h { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.mn-h b { font-size: 15.5px; }
.mn-ico { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; flex: none; background: #F3EEF1; color: var(--t-group); }
.mn-ico svg { width: 15px; height: 15px; }
.t-individual .mn-ico { background: #fff; color: var(--t-ind); }
.t-trial .mn-ico { background: var(--t-trial-bg); color: #fff; }
.t-makeup .mn-ico { background: var(--t-mk-bg); color: var(--t-mk); }
.mn-type { font-size: 11.5px; font-weight: 800; color: var(--muted); text-transform: lowercase; }
.mn-topic { font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.mn-topic.red { color: var(--red); }
.mn-topic .muted, .mn-lsn .muted { color: var(--muted); }
.mn-kids { display: flex; flex-wrap: wrap; gap: 4px; }
.mn-kc { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 8px; font-size: 12.5px; font-weight: 700; background: rgba(255,255,255,.75); border: 1px solid var(--line); }
.mn-kc svg { width: 11px; height: 11px; }
.mn-kc.p { background: var(--green-bg); border-color: var(--green-line); color: #0E6B3F; }
.mn-kc.a { background: var(--red-bg); border-color: var(--red-line); color: var(--red); text-decoration: line-through; }
.mn-kc.lead { border-style: dashed; }
.mn-kc .grade { width: 18px; height: 18px; font-size: 11px; border-radius: 6px; margin-right: -4px; }
.mn-co { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.mn-co svg { width: 14px; height: 14px; }
.mn-act { display: flex; align-items: center; }
.mn-act .btn svg { width: 15px; height: 15px; }
.mn-done { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; font-size: 13px; padding: 5px 9px; border-radius: 9px; background: #062E1B; color: var(--neon); font-variant-numeric: tabular-nums; }
.mn-done svg { width: 13px; height: 13px; }
.mn-cn { font-size: 12.5px; font-weight: 800; color: var(--red); }

/* неделя */
.mn-week { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; align-items: start; }
.mn-day { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 8px; box-shadow: var(--shadow); }
.mn-day.today { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange), var(--shadow); }
.mn-day.empty { background: transparent; box-shadow: none; border-style: dashed; }
.mn-day-h { display: flex; align-items: baseline; gap: 8px; width: 100%; border: 0; background: transparent; padding: 4px 6px 8px; cursor: pointer; text-align: left; }
.mn-day-h b { font-size: 15px; }
.mn-day-h span { color: var(--muted); font-size: 13px; font-weight: 600; }
.mn-day-h em { margin-left: auto; font-style: normal; font-weight: 800; font-size: 12px; background: var(--line-2); border-radius: 8px; padding: 1px 8px; }
.mn-day.today .mn-day-h b { color: #B45A08; }
.mn-none { color: var(--muted); font-size: 13px; padding: 0 6px 4px; }
.mn-lsn.compact { grid-template-columns: 50px 1fr; padding: 10px 11px; gap: 6px 10px; }
.mn-lsn.compact .mn-act { grid-column: 2; }
.mn-lsn.compact .mn-act:empty { display: none; }
.mn-lsn.compact .mn-done { padding: 3px 8px; font-size: 12px; }
.mn-day.empty { padding: 4px 8px; }
.mn-day.empty .mn-day-h { padding-bottom: 2px; }
.mn-lsn.compact .mn-time b { font-size: 15px; }
.mn-legend { margin-top: 16px; }
.mn-why { margin: 10px 0 0; padding: 8px 10px; background: var(--line-2); border-radius: 10px; }
.mn-age { font-size: 12px; color: var(--muted); font-weight: 600; }
.lk-att.n.fut { border-style: solid; border-color: var(--line); }
.lk-att.n.late { border-color: #E8892A; }

/* мои дети */
.mn-kbar { margin-bottom: 14px; }
.mn-count { color: var(--muted); font-weight: 700; font-size: 13.5px; }
.mn-group { margin-bottom: 14px; }
.mn-group .card-h h3 { font-size: 15px; }
.mn-gday { min-width: 34px; height: 28px; padding: 0 6px; border-radius: 9px; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 800; font-size: 12.5px; }
.mn-gday.o { background: var(--t-trial-bg); }
.mn-gday svg { width: 16px; height: 16px; }
.mn-group .card-b { padding-top: 0; }
.mn-kid { display: grid; grid-template-columns: 38px 1fr auto 46px 56px; gap: 10px; align-items: center; padding: 9px 6px; border-top: 1px solid var(--line-2); text-decoration: none; color: inherit; border-radius: 10px; }
.mn-kid:first-child { border-top: 0; }
.mn-kid:hover { background: #FBF7F9; }
.mn-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 15px; background: var(--berry-50); color: var(--berry); flex: none; }
.mn-av.m { background: #E6F0FF; color: #1F5FC4; }
.mn-av.f { background: #FDE8F2; color: #B03A78; }
.mn-av.big { width: 58px; height: 58px; font-size: 24px; font-family: var(--display); font-weight: 600; }
.mn-kn { min-width: 0; display: flex; flex-direction: column; }
.mn-kn b { font-size: 14.5px; }
.mn-kn small { color: var(--muted); font-size: 12.5px; }
.mn-kn small.mn-lc, .mn-vb small.mn-lc { color: var(--ink-2); }
.mn-kg { display: flex; gap: 3px; }
.mn-kg .grade { width: 22px; height: 22px; font-size: 12px; border-radius: 7px; }
.mn-ks { text-align: center; line-height: 1.1; }
.mn-ks b { display: block; font-family: var(--display); font-weight: 600; font-size: 16px; }
.mn-ks b.ok { color: var(--green); } .mn-ks b.bad { color: var(--red); }
.mn-ks small { font-size: 11px; color: var(--muted); font-weight: 700; }

/* ребёнок */
.mn-back { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; text-decoration: none; margin-bottom: 10px; color: var(--ink-2); }
.mn-back svg { width: 18px; height: 18px; }
.mn-kidhead { display: flex; align-items: center; gap: 16px; padding: 18px 20px; margin-bottom: 14px; }
.mn-kh { min-width: 0; }
.mn-kh h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 21px; }
.mn-kh p { margin: 2px 0 8px; color: var(--muted); font-weight: 600; }
.mn-kgroups { display: flex; flex-wrap: wrap; gap: 6px; }
.mn-tiles { margin-bottom: 14px; }
.mn-kgrid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; align-items: start; }
.mn-vh { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 10px 0 4px; }
.mn-vh:first-child { margin-top: 0; }
.mn-v { display: flex; align-items: flex-start; gap: 9px; padding: 8px 6px; border-top: 1px solid var(--line-2); border-radius: 8px; }
.mn-v.mine { cursor: pointer; }
.mn-v.mine:hover { background: #FBF7F9; }
.mn-v.cn { opacity: .6; }
.mn-v.fut { opacity: .85; }
.mn-v .lk-att, .mn-v .grade { margin-top: 2px; }
.mn-vd { width: 62px; flex: none; line-height: 1.15; }
.mn-vd b { display: block; font-variant-numeric: tabular-nums; }
.mn-vd small { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.mn-vb { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 3px 6px; font-size: 13.5px; }
.mn-vb small { flex-basis: 100%; color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.chip.mn-t-trial { background: var(--t-trial-bg); color: #fff; }
.chip.mn-t-makeup { background: var(--t-mk-bg); color: var(--t-mk); }
.chip.mn-t-individual { background: var(--t-ind-bg); color: var(--t-ind); }
.mn-note-f textarea { min-height: 76px; }
.mn-emptyg { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1.5px dashed var(--line); border-radius: 14px; color: var(--muted); font-size: 13.5px; }
.mn-emptyg svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.mn-emptyg b { color: var(--ink-2); font-weight: 700; }
.mn-note-a { display: flex; align-items: center; gap: 10px; margin: 8px 0 14px; }
.mn-note-a small { flex: 1; color: var(--muted); font-size: 12px; }

@media (max-width: 1100px) {
  .mn-kgrid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .mn-hero { padding: 14px 16px; }
  .mn-hero h2 { font-size: 18px; }
  .mn-hero p { font-size: 13.5px; }
  .mn-bar .mswitch { flex: 1 1 100%; order: 1; }
  .mn-bar .ms-label { min-width: 0; }
  .mn-bar .ms-label b { font-size: 14px; }
  .mn-bar .seg { order: 2; }
  .mn-lsn { grid-template-columns: 52px 1fr; gap: 10px; padding: 11px 12px; }
  .mn-lsn .mn-act { grid-column: 1 / -1; }
  .mn-lsn .mn-act .btn { width: 100%; height: 42px; }
  .mn-lsn .mn-act:empty { display: none; }
  .mn-week { grid-template-columns: 1fr; }
  .mn-kid { grid-template-columns: 36px 1fr 40px 50px; }
  .mn-kid .mn-kg { display: none; }
  .mn-kidhead { padding: 14px; gap: 12px; }
  .mn-av.big { width: 48px; height: 48px; font-size: 20px; }
  .mn-kh h2 { font-size: 18px; }
  .mn-search { flex: 1 1 100%; order: 0; }
  .mn-legend { display: none; }
}
