/* Стиль «мятная глина с сиреневым». Мятный — Excel, сиреневый — AI. */
:root {
  --ink: #2C5A41; --ink-strong: #1F4A33; --ink-lil: #33235E; --lil-text: #5B43A6;
  --mint-num: #3E9A66; --lil-num: #7B5FC9; --ground: #EDF1ED; --danger: #A3402E;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { overflow-x: hidden; }
body {
  font-family: 'Nunito', system-ui, sans-serif; color: var(--ink); font-size: 16px; line-height: 1.4;
  background: linear-gradient(160deg, #F2F4F1, #E5E6EA) fixed; min-height: 100vh; overflow-x: hidden; position: relative;
}
a { color: inherit; }
h1, h2, h3 { margin: 0; }
button, input, select { font: inherit; color: inherit; }
code { background: #fff; padding: 2px 6px; border-radius: 6px; }

.card { border-radius: 30px; background: linear-gradient(145deg, #FFFFFF, #EEF2EE);
  box-shadow: 14px 16px 30px rgba(120,140,125,.35), -10px -10px 22px #FFFFFF, inset 2px 2px 0 #FFFFFF, inset -2px -3px 6px rgba(150,170,155,.25); }
.mint { background: linear-gradient(145deg, #C5EBCF, #9DD6AE); color: var(--ink-strong);
  box-shadow: 14px 16px 30px rgba(90,150,110,.4), -8px -8px 18px #FFFFFF, inset 2px 2px 0 rgba(255,255,255,.7), inset -3px -4px 8px rgba(60,130,85,.3); }
.lil { background: linear-gradient(145deg, #E2D6F9, #B9A1E8); color: var(--ink-lil);
  box-shadow: 14px 16px 30px rgba(120,95,190,.38), -8px -8px 18px #FFFFFF, inset 2px 2px 0 rgba(255,255,255,.75), inset -3px -4px 8px rgba(110,80,180,.3); }
.inset { background: var(--ground); box-shadow: inset 4px 4px 10px rgba(120,140,125,.3), inset -4px -4px 10px #FFFFFF; }
.blob { position: fixed; border-radius: 50%; z-index: 0; pointer-events: none; }
.blob.mint { background: radial-gradient(circle at 30% 26%, #D4F2DB, #93D1A6 72%); box-shadow: 16px 22px 30px rgba(90,140,105,.35), inset -6px -8px 14px rgba(50,120,75,.3); }
.blob.lil { background: radial-gradient(circle at 30% 26%, #EDE4FC, #B49BE6 72%); box-shadow: 16px 22px 30px rgba(120,95,190,.35), inset -6px -8px 14px rgba(100,70,170,.3); }

.shell { position: relative; z-index: 1; max-width: 1440px; margin: 0 auto; padding: 32px 48px 64px; display: flex; flex-direction: column; gap: 24px; }
.topbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 18px 12px 28px; border-radius: 999px; }
.logo { font-weight: 900; font-size: 19px; letter-spacing: .04em; text-decoration: none; white-space: nowrap; }
.logo .g { color: var(--mint-num); } .logo .l { color: var(--lil-num); }
.funnel { display: flex; gap: 4px; padding: 5px; border-radius: 999px; font-weight: 800; }
.funnel button { border: 0; background: none; padding: 9px 12px; border-radius: 999px; cursor: pointer; min-height: 40px; }
.funnel button[aria-pressed=true] { background: linear-gradient(145deg, #FFFFFF, #EEF2EE); box-shadow: 4px 5px 10px rgba(120,140,125,.35), -3px -3px 8px #FFFFFF; }
.funnel button.ai { color: var(--lil-text); }
nav { display: flex; gap: 0; flex-wrap: wrap; font-weight: 700; flex: 1; font-size: 15.5px; }
nav a { text-decoration: none; padding: 11px 8px; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; }
nav a:hover { background: rgba(255,255,255,.7); }
nav a[aria-current=page] { background: linear-gradient(145deg, #C5EBCF, #9DD6AE); color: var(--ink-strong); box-shadow: 6px 7px 14px rgba(90,150,110,.4), inset 2px 2px 0 rgba(255,255,255,.7); }
.badge-test { font-size: 12px; font-weight: 800; padding: 6px 10px; border-radius: 999px; background: #FFF4D6; color: #6B4E00; white-space: nowrap; }

.grid { display: grid; gap: 24px; }
.grid > * { min-width: 0; }
.g-hero { grid-template-columns: 5fr 3fr; }
.g-three { grid-template-columns: 4fr 5fr 3fr; align-items: start; }
.g-two { grid-template-columns: 1fr 1fr; }
@media (max-width: 1100px) { .g-hero, .g-three, .g-two { grid-template-columns: 1fr; } .shell { padding: 20px 16px 48px; } .topbar { border-radius: 30px; } }
.pad { padding: 24px 28px; }
.label { font-size: 15px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.muted { opacity: .85; font-size: 15px; }
.big { font-weight: 900; font-size: 110px; line-height: 1; color: var(--mint-num); text-shadow: 3px 4px 0 #fff, 6px 9px 14px rgba(90,150,110,.35); }
.num { font-weight: 900; font-size: 54px; line-height: 1.2; }
.chips { display: flex; gap: 12px; flex-wrap: wrap; }
.chip { flex: 1 1 180px; padding: 12px 18px; border-radius: 20px; }
.chip b { font-weight: 900; font-size: 30px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 18px; border-radius: 18px; text-decoration: none; font-size: 17px; cursor: pointer; border: 0; width: 100%; text-align: left; }
.row b { font-weight: 800; }
.row:hover { filter: brightness(1.03); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.count { padding: 4px 14px; border-radius: 999px; font-weight: 900; }
.bar { height: 16px; border-radius: 999px; padding: 3px; display: flex; }
.bar > i { border-radius: 999px; min-width: 12px; background: linear-gradient(145deg, #B9E6C5, #7CC694); display: block; }
.bar.ai > i { background: linear-gradient(145deg, #E2D6F9, #B49BE6); }
.ring { width: 150px; height: 150px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center;
  box-shadow: 12px 16px 26px rgba(100,130,130,.4), -8px -8px 18px #fff, inset -6px -8px 14px rgba(60,100,110,.25), inset 4px 4px 8px rgba(255,255,255,.8); }
.ring > div { width: 78px; height: 78px; border-radius: 50%; background: #EEF2EE; box-shadow: inset 6px 6px 14px rgba(120,140,125,.4), inset -5px -5px 12px #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.dot { width: 16px; height: 16px; border-radius: 50%; flex: none; display: inline-block; }

.btn { border: 0; cursor: pointer; padding: 12px 22px; border-radius: 999px; font-weight: 800; min-height: 44px; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.plain { background: linear-gradient(145deg, #FFFFFF, #EEF2EE); box-shadow: 6px 7px 14px rgba(120,140,125,.35), -4px -4px 10px #fff; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 700; }
.field input, .field select, .toolbar > input, .toolbar > select { border: 0; border-radius: 16px; padding: 11px 16px; min-height: 44px; background: var(--ground);
  box-shadow: inset 4px 4px 10px rgba(120,140,125,.3), inset -4px -4px 10px #fff; font-weight: 700; min-width: 0; }
h1.title { font-weight: 900; font-size: 34px; }
.tablebox { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 16px; }
th { text-align: left; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; padding: 10px 12px; white-space: nowrap; }
td { padding: 11px 12px; border-top: 1px solid rgba(44,90,65,.14); vertical-align: top; }
td:first-child { white-space: nowrap; }
td.n, th.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.click { cursor: pointer; } tr.click:hover td { background: rgba(255,255,255,.6); }
tfoot td { font-weight: 900; border-top: 2px solid rgba(44,90,65,.4); }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 800; background: #E3F3E7; white-space: nowrap; }
.tag.ai { background: #EAE1FB; color: var(--ink-lil); } .tag.lost { background: #EDEDED; color: #4A4A4A; } .tag.warn { background: #FFF1D0; color: #6B4E00; } .tag.open { background: #DDF3FF; color: #124C6B; }
.empty { padding: 28px; text-align: center; font-weight: 700; }
.ai-text { color: var(--lil-text); }

.modal { position: fixed; inset: 0; z-index: 10; background: rgba(40,60,50,.35); display: flex; align-items: flex-start; justify-content: center; padding: 32px 16px; overflow-y: auto; }
.modal[hidden] { display: none; }
.modal-box { position: relative; width: min(1040px, 100%); padding: 28px 32px; }
.close { position: absolute; right: 18px; top: 14px; border: 0; background: none; font-size: 34px; line-height: 1; cursor: pointer; width: 44px; height: 44px; border-radius: 50%; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 18px 0 14px; }
.tabs button { border: 0; background: none; padding: 9px 16px; border-radius: 999px; font-weight: 800; cursor: pointer; min-height: 40px; }
.tabs button[aria-selected=true] { background: linear-gradient(145deg, #C5EBCF, #9DD6AE); color: var(--ink-strong); }
.msg { max-width: 78%; padding: 9px 14px; border-radius: 16px; background: #fff; white-space: pre-wrap; word-break: break-word; }
.msg.me { align-self: flex-end; background: #DDF2E3; }
.msg.sys { align-self: center; background: none; font-size: 13px; opacity: .8; max-width: 100%; text-align: center; }
.msg small { display: block; font-size: 12px; opacity: .75; margin-bottom: 2px; }
.chatbox { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; padding: 16px; border-radius: 20px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 20px; }
.kv div span { display: block; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; font-weight: 800; opacity: .85; }
.print-only { display: none; }
@media print {
  body { background: #fff; } .blob, .topbar, .toolbar, .no-print { display: none !important; }
  .card { box-shadow: none; background: #fff; } .shell { padding: 0; } .print-only { display: block; }
}
:focus-visible { outline: 3px solid #5B43A6; outline-offset: 2px; }

/* ---------- 0.4.0: канбан, карточка сделки, формы ---------- */
.badge-test { border: 0; cursor: pointer; min-height: 36px; }
.badge-test.ok { background: #DDF2E3; color: var(--ink-strong); cursor: default; }
.kanban { display: flex; gap: 14px; overflow-x: auto; padding: 4px 4px 14px; align-items: stretch; }
.kcol { flex: 1 0 205px; max-width: 320px; border-radius: 24px; padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; min-height: 240px; }
.kcol.over { outline: 3px dashed var(--mint-num); outline-offset: -3px; }
.khead { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 16px; }
.khead b { font-weight: 900; }
.kcards { display: flex; flex-direction: column; gap: 10px; max-height: 68vh; overflow-y: auto; padding: 2px 4px 8px 2px; }
.kcard { display: flex; flex-direction: column; gap: 5px; padding: 12px 14px; border-radius: 18px; text-decoration: none; cursor: grab; font-size: 15px;
  background: linear-gradient(145deg, #FFFFFF, #F1F6F2); border-left: 6px solid #9DD6AE; box-shadow: 5px 6px 12px rgba(120,140,125,.3), -3px -3px 8px #fff; }
.kcard.ai { border-left-color: #B9A1E8; }
.kcard:hover { filter: brightness(1.02); transform: translateY(-1px); }
.kcard b { font-weight: 800; }
.kcol.kend { flex: 0 0 150px; min-height: 0; background: none; box-shadow: none; padding: 0; gap: 12px; }
.kdrop { flex: 1; border-radius: 22px; border: 3px dashed #9DD6AE; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 900; text-align: center; padding: 14px; min-height: 100px; color: var(--ink-strong); }
.kdrop small { font-weight: 700; font-size: 12px; opacity: .8; }
.kdrop.lost { border-color: #C9C9C9; color: #4A4A4A; }
.kdrop.over { background: #DDF2E3; } .kdrop.lost.over { background: #EDEDED; }

.stagebar { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0 6px; }
.stagebar .st { border: 0; cursor: pointer; flex: 1 1 auto; padding: 10px 14px; min-height: 44px; border-radius: 999px; font-weight: 800; font-size: 14.5px; background: var(--ground);
  box-shadow: inset 3px 3px 8px rgba(120,140,125,.3), inset -3px -3px 8px #fff; white-space: nowrap; }
.stagebar .st.on { background: linear-gradient(145deg, #C5EBCF, #9DD6AE); color: var(--ink-strong); box-shadow: 4px 5px 10px rgba(90,150,110,.35); }
.stagebar.ai .st.on { background: linear-gradient(145deg, #E2D6F9, #B9A1E8); color: var(--ink-lil); box-shadow: 4px 5px 10px rgba(120,95,190,.35); }
.stagebar .st.cur { outline: 3px solid var(--ink); outline-offset: 1px; }
.stagebar .st.lost.on { background: #DADADA; color: #333; box-shadow: none; }
.stagebar .st.lost { color: #5A5A5A; }

.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px 18px; padding: 20px 22px; border-radius: 24px; margin: 14px 0; }
.formgrid .span { grid-column: 1 / -1; }
.formgrid .field input, .formgrid .field select, .formgrid .field textarea, .field textarea { background: #fff; box-shadow: inset 2px 2px 6px rgba(120,140,125,.28); border: 0; border-radius: 16px; padding: 11px 16px; min-height: 44px; font: inherit; font-weight: 700; color: inherit; width: 100%; }
.field textarea { resize: vertical; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14.5px; margin-right: 12px; min-height: 32px; cursor: pointer; white-space: nowrap; }
.chk input { width: 20px; height: 20px; min-height: 0 !important; padding: 0 !important; box-shadow: none !important; accent-color: var(--mint-num); flex: none; }
.notice { padding: 12px 18px; border-radius: 16px; background: #FFF1D0; color: #6B4E00; font-weight: 800; margin: 10px 0; }
.notice.bad { background: #FBE3DD; color: var(--danger); }
.flash { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 30; padding: 13px 24px; border-radius: 999px; font-weight: 800; background: var(--ink-strong); color: #fff; box-shadow: 0 10px 24px rgba(30,60,45,.4); max-width: 90vw; }
.flash.bad { background: var(--danger); }
.flash[hidden] { display: none; }
.link { border: 0; background: none; padding: 4px 6px; cursor: pointer; text-decoration: underline; font-weight: 700; }
h2.sect { font-size: 20px; font-weight: 900; margin: 22px 0 8px; }

/* ---------- 0.5.0: этапы и цвета как в Битриксе ---------- */
.kanban { gap: 8px; }
.kcol { flex: 0 0 196px; max-width: none; padding: 0 0 10px; border-radius: 18px; gap: 6px; background: rgba(255,255,255,.45); box-shadow: inset 2px 2px 6px rgba(120,140,125,.18); }
.khead { padding: 9px 22px 9px 12px; font-size: 14px; border-radius: 12px 0 0 12px; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); }
.khead b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.khead span { font-weight: 800; opacity: .9; }
.ksum { text-align: center; font-weight: 900; font-size: 17px; padding-top: 4px; }
.kadd { border: 0; background: none; cursor: pointer; font-size: 22px; font-weight: 700; line-height: 1; min-height: 36px; margin: 0 8px; border-radius: 12px; color: var(--ink); }
.kadd:hover { background: #fff; }
.kcards { padding: 2px 8px 8px; }
.kcard { border-left-width: 0; padding: 10px 12px; font-size: 14.5px; }
.kcol.kend { flex: 0 0 150px; background: none; box-shadow: none; }
.stagebar { gap: 3px; flex-wrap: nowrap; overflow-x: auto; padding: 3px; }
.stagebar .st { flex: 1 0 auto; padding: 9px 20px 9px 14px; font-size: 13.5px; border-radius: 8px 0 0 8px; box-shadow: none; background: #E3E8E4; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); }
.stagebar .st.on, .stagebar.ai .st.on { box-shadow: none; }
.stagebar .st.cur { outline: 0; font-weight: 900; text-decoration: underline; }
.stagebar .st.won.on { background: #7BD500; color: #1F2A24; } .stagebar .st.lost.on { background: #ff5752; color: #fff; }
.kendrow { display: flex; gap: 12px; }
.kendrow .kdrop { flex: 1; min-height: 64px; flex-direction: row; gap: 10px; padding: 10px; }
.kdrop.won { border-color: #7BD500; } .kdrop.lost { border-color: #ff8a86; color: var(--danger); }
.kcol { flex-basis: 172px; min-height: 180px; }
.kcards { max-height: 60vh; }
.kendrow { position: sticky; bottom: 10px; z-index: 2; }
.kendrow .kdrop { background: rgba(255,255,255,.92); box-shadow: 0 6px 16px rgba(60,90,70,.25); }
.stagebar { flex-wrap: wrap; overflow: visible; row-gap: 5px; }
.stagebar .st { flex: 0 1 auto; }
.kendrow { display: none; position: fixed; left: 48px; right: 48px; bottom: 16px; z-index: 5; }
body[data-dragging=excel] .kendrow[data-f=excel], body[data-dragging=ai] .kendrow[data-f=ai] { display: flex; }
.kendrow .kdrop { min-height: 84px; font-size: 18px; }

/* ---------- 0.6.0: сайт на всю ширину, карточки в две колонки ---------- */
body { font-size: 15px; }
.shell { max-width: none; padding: 16px 20px 48px; gap: 16px; }
.topbar { padding: 8px 14px 8px 22px; }
.pad { padding: 18px 22px; }
h1.title { font-size: 28px; }
.big { font-size: 88px; } .num { font-size: 44px; }
table { font-size: 14.5px; } td { padding: 8px 10px; } th { padding: 8px 10px; font-size: 12px; }
.row { font-size: 15.5px; padding: 10px 16px; }
.kcol { flex: 1 0 150px; }
.kcard { font-size: 13.5px; }
.kendrow { left: 20px; right: 20px; }
.modal { padding: 20px 16px; }
.modal-box { width: min(1500px, 100%); padding: 22px 26px; }
.cardgrid { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 20px; align-items: start; margin-top: 10px; }
.cardgrid > * { min-width: 0; }
@media (max-width: 900px) { .cardgrid { grid-template-columns: 1fr; } }
.side { display: flex; flex-direction: column; gap: 14px; }
.panel { background: var(--ground); border-radius: 22px; padding: 14px 18px; box-shadow: inset 3px 3px 8px rgba(120,140,125,.25), inset -3px -3px 8px #fff; }
.ptitle { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.ptitle .link { text-transform: none; letter-spacing: 0; font-size: 14px; }
.frow { padding: 7px 0; border-top: 1px solid rgba(44,90,65,.12); }
.frow > span { display: block; font-size: 12px; font-weight: 800; opacity: .8; letter-spacing: .03em; }
.frow > div { font-weight: 700; word-break: break-word; }
.frow.big > div { font-size: 28px; font-weight: 900; }
.panel .frow:first-of-type { border-top: 0; }
.cname { font-size: 19px; font-weight: 900; }
.main h2.sect:first-of-type { margin-top: 14px; }
.tline { display: flex; flex-direction: column; gap: 4px; border-left: 3px solid #C5EBCF; padding-left: 14px; }
.tline span { display: inline-block; width: 92px; opacity: .8; font-size: 13.5px; }
.stagebar .st { flex: 1 1 auto; text-align: left; }
.frow.lead > div { font-size: 28px; font-weight: 900; }
.stagebar .st { flex: 0 1 auto; }
.kcol { flex: 1 1 0; min-width: 118px; }
.khead { padding: 8px 16px 8px 9px; font-size: 12.5px; }
.kcards { padding: 2px 5px 8px; } .kcard { padding: 9px 9px; }
.ksum { font-size: 15px; }
.khead { align-items: center; min-height: 44px; }
.khead b { white-space: normal; overflow: visible; line-height: 1.15; }

/* ---------- 0.6.2: этапы в мятно-сиреневой палитре ---------- */
.khead, .stagebar .st.on { color: var(--ink-strong) !important; }
.stagebar.ai .st.on, .kcol[data-funnel-key=ai] .khead { color: var(--ink-lil) !important; }
.stagebar .st.won.on { background: linear-gradient(145deg, #C5EBCF, #7FC995); color: var(--ink-strong); }
.stagebar .st.lost.on { background: #DADADA; color: #333; }
.kdrop.won { border-color: #7FC995; } .kdrop.lost { border-color: #C9C9C9; color: #4A4A4A; }

/* ---------- 0.6.3: поля по бокам, главная как раньше ---------- */
.shell { padding: 16px 40px 48px; }
.kendrow { left: 40px; right: 40px; }
body[data-screen=home] .shell { max-width: 1440px; }
@media (max-width: 900px) { .shell { padding: 12px 12px 40px; } }
[hidden] { display: none !important; }

/* ---------- 0.7.1: воздух между рядами главной ---------- */
#view { display: flex; flex-direction: column; gap: 24px; }
#view > * { min-width: 0; }

/* ---------- 0.8.0: вкладки в карточке сделки ---------- */
.dealtabs { margin: 12px 0 14px; padding: 5px; border-radius: 999px; background: var(--ground); box-shadow: inset 3px 3px 8px rgba(120,140,125,.25), inset -3px -3px 8px #fff; display: inline-flex; }
.dealtabs button { padding: 9px 22px; }
.dealtabs button[aria-selected=true] { background: linear-gradient(145deg, #FFFFFF, #EEF2EE); box-shadow: 4px 5px 10px rgba(120,140,125,.35), -3px -3px 8px #FFFFFF; }
.panehead { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 6px 0 12px; }
.panehead h2.sect { margin: 0; }
.panehead > :last-child { margin-left: auto; }
.tabpane { min-height: 240px; }

/* ---------- 0.9.0: форма урока со справочниками ---------- */
.pick { display: flex; gap: 8px; flex-wrap: wrap; }
.pick .chk { background: #fff; border-radius: 999px; padding: 8px 16px; min-height: 44px; margin: 0; box-shadow: inset 2px 2px 6px rgba(120,140,125,.28); }
.pick .chk:has(input:checked) { background: linear-gradient(145deg, #C5EBCF, #9DD6AE); box-shadow: 4px 5px 10px rgba(90,150,110,.35); }
.multi { background: #fff; border-radius: 16px; box-shadow: inset 2px 2px 6px rgba(120,140,125,.28); }
.multi summary { cursor: pointer; padding: 11px 16px; min-height: 44px; font-weight: 700; list-style: none; }
.multi summary::after { content: '▾'; float: right; }
.multi[open] summary::after { content: '▴'; }
.multilist { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 2px 14px; padding: 8px 16px 14px; max-height: 300px; overflow-y: auto; border-top: 1px solid rgba(44,90,65,.12); }
.multilist .chk { white-space: normal; margin: 0; align-items: flex-start; font-weight: 600; }
.formsub { font-size: 13px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; border-top: 1px solid rgba(44,90,65,.15); padding-top: 12px; margin-top: 4px; }
.formgrid .field .chk input, .field .chk input { width: 20px; height: 20px; min-height: 0; padding: 0; box-shadow: none; flex: none; background: none; border-radius: 4px; }
.multilist .chk { display: flex; gap: 8px; }
.pick .chk { display: inline-flex; gap: 8px; }
.multilist .chk.was { opacity: .55; }
.multilist .chk.was small { font-weight: 600; white-space: nowrap; }

/* ---------- 0.9.2: список уроков в одну строку ---------- */
td.clipcell { max-width: 320px; }
.clip { display: flex; align-items: baseline; gap: 6px; }
.clip span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clip .link { flex: none; padding: 0 2px; font-size: 13px; }
.clip.open { display: block; }
.clip.open span { white-space: normal; overflow: visible; display: block; }

/* ---------- 1.0-подготовка: финансы и аналитика ---------- */
.periodbar { align-items: flex-end; gap: 10px; }
.periodbar .funnel button { padding: 8px 14px; min-height: 38px; font-size: 14px; }
.periodbar .field input { min-height: 40px; padding: 8px 12px; }
.hbar { display: grid; grid-template-columns: minmax(120px, 34%) 1fr auto; gap: 10px; align-items: center; padding: 5px 0; }
.hbar .hl { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .bar { height: 14px; }
.hbar .hv { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mchart { display: flex; align-items: flex-end; gap: 8px; height: 220px; padding: 6px 4px 0; }
.mcol { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.mval { font-size: 12.5px; font-weight: 800; }
.mstack { width: 100%; max-width: 54px; display: flex; flex-direction: column; border-radius: 10px 10px 4px 4px; overflow: hidden; gap: 2px; min-height: 2px; box-shadow: 4px 5px 10px rgba(90,150,110,.3); }
.mstack i { display: block; background: linear-gradient(145deg, #B9E6C5, #7CC694); min-height: 0; }
.mstack i.ai { background: linear-gradient(145deg, #E2D6F9, #B49BE6); }
.mlab { font-size: 11.5px; text-align: center; line-height: 1.15; opacity: .85; height: 28px; }
.panel .tablebox table { font-size: 14px; }
.paidcell { display: flex; align-items: center; gap: 6px; }
.paiddate { border: 0; border-radius: 12px; padding: 6px 10px; background: var(--ground); box-shadow: inset 2px 2px 6px rgba(120,140,125,.28); font: inherit; font-weight: 700; color: inherit; min-height: 36px; }

/* вход по коду и режим «как видит преподаватель» (0.11.0) */
.login { max-width: 440px; margin: 12vh auto 0; padding: 32px 30px; border-radius: 34px; position: relative; z-index: 2; }
.login[hidden] { display: none; }
.login .logo { display: inline-block; margin-bottom: 8px; }
.login .title { margin: 6px 0 18px; }
.login form { gap: 14px; }
.login .btn { justify-content: center; }
.login #login-msg { min-height: 1.4em; margin: 12px 0 0; color: var(--danger); font-weight: 700; }
.badge-test.user { cursor: pointer; }
.notice.viewas { background: #EFE8FC; color: var(--lil-num); }

/* номер клиента — щелчок копирует «номер имя» для поиска в мессенджере */
.cnum { cursor: copy; border-bottom: 1px dashed currentColor; border-radius: 2px; }
.cnum:hover, .cnum:focus-visible { background: #E3F3E7; outline: none; }
