/* КонтролМед: стиль по образцу отчёта по звонкам, одобренного клиентом (шаблон D:\5_ПРОЕКТЫ КЛИЕНТОВ\КонтролМед) */
:root {
  --bg: #E8EDF5; --text: #0E1C2F; --muted: #5B6B83; --soft: #8695AB; --line: #CFD8E6; --line2: #E4E9F2;
  --blue: #104FCD; --blue-dark: #0B3CA3; --blue-soft: #E3ECFF;
  --side: #0E1C2F; --side-line: rgba(255,255,255,.08); --side-group: rgba(255,255,255,.45);
  --green: #1E9A62; --green-soft: #DDF3E7; --red: #CF4B37; --red-dark: #A33A28; --amber: #C88617;
  --card-shadow: 0 1px 2px rgba(11,28,51,.06), 0 6px 18px rgba(11,28,51,.07);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); text-decoration: underline; }
button, select, input, textarea { font: inherit; }

.layout { display: flex; min-height: 100vh; }
.side { flex: none; width: 248px; height: 100vh; position: sticky; top: 0; overflow-y: auto; background: var(--side);
  border-right: 1px solid var(--side-line); display: flex; flex-direction: column; }
.side-top { display: flex; flex-direction: column; gap: 16px; padding: 20px 16px 16px; border-bottom: 1px solid var(--side-line); }
.side-top img { display: block; height: 30px; width: auto; margin-left: 10px; }
.clinic { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; background: rgba(255,255,255,.06); color: #fff; }
.clinic-badge { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; background: var(--blue);
  color: #fff; font-weight: 700; font-size: 13px; }
.clinic-name { font-weight: 600; font-size: 14px; line-height: 1.3; }
.clinic select { width: 100%; background: transparent; color: #fff; border: 1px solid var(--side-line); border-radius: 6px; padding: 4px; }
.clinic select option { color: var(--text); }
.nav { padding: 12px 8px; flex: 1; }
.nav-group { color: var(--side-group); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px;
  color: rgba(255,255,255,.85); font-size: 14px; }
.nav svg, .nav-set svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.nav-t { flex: 1; min-width: 0; }
.nav a:hover { background: rgba(255,255,255,.12); text-decoration: none; color: #fff; }
.nav a.on { background: var(--blue); color: #fff; }
.nav a.dev { color: rgba(255,255,255,.45); }
.nav a.dev.on { color: #fff; }
.nav .cnt { font-size: 12px; font-weight: 600; min-width: 22px; text-align: center; padding: 0 6px; border-radius: 999px;
  background: rgba(255,255,255,.14); }
.nav a.on .cnt { background: rgba(255,255,255,.25); }
.side-bottom { padding: 12px 18px 18px; border-top: 1px solid var(--side-line); color: rgba(255,255,255,.6); font-size: 13px; }
.side-bottom a { color: rgba(255,255,255,.85); }
.nav-set { display: flex; align-items: center; gap: 10px; padding: 6px 0 10px; font-size: 14px; }
.side-bottom form { display: inline; }
.side-bottom button { background: none; border: 0; padding: 0; color: rgba(255,255,255,.85); cursor: pointer; }

.mainwrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.main { flex: 1; min-width: 0; padding: 28px 32px 48px; }
.clinic-name small { display: block; font-size: 12px; font-weight: 400; color: rgba(255,255,255,.55); }

/* ---- Отчёт «Звонки» в кабинете: оформление шаблона дизайнера (22.11.2026) ---- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 32px;
  background: #fff; border-bottom: 1px solid #DDE4EE; }
.crumb { flex: 1; min-width: 0; color: #5B6B83; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.period { display: flex; align-items: center; gap: 10px; color: #5B6B83; font-size: 14px; }
.period select { height: 34px; min-width: 240px; padding: 0 10px; border: 1px solid #CFD8E6; border-radius: 6px; background: #fff; color: #0E1C2F; font-size: 15px; }
.burger { display: none; width: 40px; height: 40px; border: 1px solid #CFD8E6; border-radius: 8px; background: #fff; }
.burger svg { width: 20px; height: 20px; fill: none; stroke: #0E1C2F; stroke-width: 2; stroke-linecap: round; }
.mask { display: none; }
.ph1 { font-size: 32px; line-height: 1.2; font-weight: 800; margin: 0 0 8px; letter-spacing: -.01em; }
.pnote { max-width: 760px; margin: 0 0 20px; color: #5B6B83; font-size: 16px; line-height: 1.55; }
.muted-t { color: #5B6B83; }

.otiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 20px; }
.otile { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; background: #fff; border: 1px solid #CFD8E6; border-radius: 10px;
  box-shadow: 0 1px 2px rgba(11,28,51,.06), 0 6px 18px rgba(11,28,51,.07); color: #0E1C2F; }
.otile:hover { text-decoration: none; border-color: #104FCD; color: #0E1C2F; }
.otile .ol { color: #5B6B83; font-size: 14px; font-weight: 600; }
.otile b { font-size: 32px; line-height: 1.15; font-weight: 800; font-variant-numeric: tabular-nums; }
.otile .os { color: #5B6B83; font-size: 13px; line-height: 1.45; }
.otile.hi { background: #104FCD; border-color: #104FCD; color: #fff; }
.otile.hi .ol, .otile.hi .os { color: #D6E3FF; }
.otile.hi:hover { color: #fff; }

.ogrid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.ocol { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rcard { background: #fff; border: 1px solid #CFD8E6; border-radius: 10px; box-shadow: 0 1px 2px rgba(11,28,51,.06), 0 6px 18px rgba(11,28,51,.07);
  overflow: hidden; margin-bottom: 16px; }
.ocol > .rcard, .cgrid > .rcard { margin-bottom: 0; }
.rcard-h { display: flex; flex-direction: column; gap: 4px; padding: 14px 20px; border-bottom: 1px solid #D9E1EC; background: #F2F5FA; }
.rcard-h b { font-size: 17px; font-weight: 700; }
.rcard-h span { color: #5B6B83; font-size: 14px; line-height: 1.5; }
.rcard-b { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.rtext-b p, .rtext { margin: 0; font-size: 15px; line-height: 1.65; color: #33425A; }
.finding { border-top: 1px solid #EEF1F6; }
.finding:first-of-type { border-top: 0; }
.finding summary { display: flex; align-items: center; gap: 12px; padding: 14px 20px; cursor: pointer; list-style: none; }
.finding summary::-webkit-details-marker { display: none; }
.finding .fn { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #E7EFFF; color: #104FCD;
  font-size: 13px; font-weight: 600; }
.finding[open] { background: #FAFBFD; }
.finding[open] .fn { background: #104FCD; color: #fff; }
.finding .fh { flex: 1; font-weight: 700; font-size: 16px; }
.finding .fa { color: #8695AB; font-size: 13px; transition: transform .15s; }
.finding[open] .fa { transform: rotate(180deg); }
.finding .fb { display: flex; flex-direction: column; gap: 10px; padding: 0 20px 18px 56px; font-size: 15px; line-height: 1.65; color: #33425A; }
.finding .fb p { margin: 0; }
.otask { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid #DDE4EE; color: #0E1C2F; }
.otask:hover { background: #F6F8FC; text-decoration: none; color: #0E1C2F; }
.otask > i { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.otask-t { flex: 1; display: flex; flex-direction: column; }
.otask-t b { font-size: 15px; }
.otask-t span { font-size: 13px; color: #5B6B83; }
.otask-n { min-width: 40px; padding: 0 10px; border: 1px solid; border-radius: 13px; text-align: center; font-size: 16px; font-weight: 700; line-height: 26px;
  font-variant-numeric: tabular-nums; }
.otask-a { color: #8695AB; }
.odonut { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-top: 1px solid #EEF1F6; }
.odonut:first-of-type { border-top: 0; }
.donut { flex: none; display: grid; place-items: center; width: 120px; height: 120px; border-radius: 50%; }
.donut > div { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 88px; height: 88px; border-radius: 50%;
  background: #fff; line-height: 1.1; }
.donut b { font-size: 20px; font-weight: 600; }
.donut span { font-size: 12px; color: #5B6B83; }
.donut.sm { width: 96px; height: 96px; }
.donut.sm > div { width: 70px; height: 70px; }
.donut.sm b { font-size: 18px; }
.donut-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.legend { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 160px; }
.legend strong { font-size: 14px; font-weight: 600; }
.legend > span { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.legend i { flex: none; width: 8px; height: 8px; border-radius: 2px; }
.legend em { flex: 1; font-style: normal; color: #33425A; }
.legend b { font-weight: 600; font-variant-numeric: tabular-nums; }
.legend small { width: 36px; text-align: right; color: #8695AB; font-size: 14px; font-variant-numeric: tabular-nums; }

.cgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; align-items: start; margin-bottom: 16px; }
.rbar { display: grid; grid-template-columns: minmax(110px, 42%) minmax(40px, 1fr) minmax(44px, auto); gap: 12px; align-items: center; font-size: 14px; }
.rbar-k { color: #33425A; }
.rbar-t { height: 8px; border-radius: 4px; background: #EEF1F6; overflow: hidden; }
.rbar-t i { display: block; height: 100%; border-radius: 4px; }
.rbar-v { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rbar-v b { font-weight: 600; }
.rbar-v small { color: #8695AB; font-size: 13px; }

.rtable-wrap { overflow-x: auto; }
.rtable { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.rtable th { padding: 10px 14px; background: #E9EEF6; border-bottom: 1px solid #CFD8E6; text-align: left; font-size: 13px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: #44536B; }
.rtable td { padding: 10px 14px; border-bottom: 1px solid #DDE4EE; vertical-align: middle; }
.rtable .r { text-align: right; }
.rtable .strong { font-weight: 600; color: #0E1C2F; }
.rtable .small { font-size: 14px; color: #33425A; }
.rtable tr.sep td { border-top: 2px solid #B9C5D6; }
.rtable .dayl { font-weight: 600; color: #44536B; white-space: nowrap; }
.sbadge { display: inline-block; padding: 0 8px; border: 1px solid; border-radius: 4px; font-weight: 600; line-height: 22px; }
.rfoot { padding: 12px 20px; font-size: 14px; line-height: 1.5; color: #5B6B83; }
.how { font-size: 15px; line-height: 1.65; color: #33425A; }
.how h3 { font-size: 17px; margin: 14px 0 6px; color: #0E1C2F; }
.how ul { margin: 0; padding-left: 20px; }

/* списки пациентов */
.list-card { overflow: visible; }
.lfilters { padding: 16px 20px 10px; border-bottom: 1px solid #DDE4EE; display: flex; flex-direction: column; gap: 10px; }
.lrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lrow input[type=search] { flex: 1 1 260px; height: 36px; padding: 0 12px; border: 1px solid #CFD8E6; border-radius: 6px; font-size: 14px; }
.lselects { display: contents; }
.lselects select { flex: 0 1 200px; height: 36px; padding: 0 8px; border: 1px solid #CFD8E6; border-radius: 6px; background: #fff; font-size: 14px; color: #0E1C2F; }
.lselects select.on { border-color: #104FCD; background: #E3ECFF; color: #0B3CA3; font-weight: 600; }
.lreset { height: 36px; padding: 0 12px; border: 1px solid #CFD8E6; border-radius: 6px; background: #fff; color: #104FCD; cursor: pointer; }
.lchips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip2 { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid #CFD8E6; border-radius: 14px; background: #fff;
  color: #0E1C2F; font-size: 13px; cursor: pointer; }
.chip2 i { width: 8px; height: 8px; border-radius: 50%; }
.chip2 b { font-weight: 600; }
.chip2.on { background: #104FCD; border-color: #104FCD; color: #fff; }
.lcount { padding: 10px 20px; font-size: 14px; color: #5B6B83; }
.lhead, .lrow2 { display: grid; grid-template-columns: 150px minmax(0, 1.4fr) 200px 64px minmax(0, 1fr); gap: 14px; padding: 12px 20px; }
.lhead { background: #E9EEF6; border-top: 1px solid #CFD8E6; border-bottom: 1px solid #CFD8E6; font-size: 13px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: #44536B; }
.srt { border: 0; background: none; color: #44536B; cursor: pointer; padding: 0 2px; }
.srt.on { color: #104FCD; }
.lrow2 { width: 100%; border: 0; border-bottom: 1px solid #DDE4EE; background: #fff; text-align: left; cursor: pointer; color: #0E1C2F; font-size: 14px; align-items: start; }
.lrow2:hover { background: #F6F8FC; }
.lrow2.sel { background: #E7EFFF; box-shadow: inset 3px 0 0 #104FCD; }
.lc1, .lc2, .lc3 { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lc1 b { font-weight: 600; }
.lc1 span { display: flex; align-items: center; gap: 6px; color: #5B6B83; }
.lc1 span i { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.lc1 small, .lc2 small { color: #8695AB; font-size: 13px; }
.lc2 b { font-weight: 700; }
.lc2 span { color: #33425A; }
.clip2, .clip3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clip2 { -webkit-line-clamp: 2; }
.clip3 { -webkit-line-clamp: 3; }
.lc3 { align-items: flex-start; }
.tag { display: inline-block; padding: 1px 8px; border: 1px solid; border-radius: 4px; font-size: 12px; font-weight: 600; line-height: 18px; }
.lmoney { font-size: 13px; color: #5B6B83; }
.mpill { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #E3ECFF; color: #0B3CA3; font-size: 12px; font-weight: 600; }
.mpill.done { background: #DDF3E7; color: #0F6B42; }
.lc4 { display: flex; justify-content: center; }
.sc { display: grid; place-items: center; width: 38px; height: 38px; border: 2px solid; border-radius: 50%; font-weight: 700; font-size: 14px; }
.sc.big { width: 52px; height: 52px; font-size: 18px; }
.lc5 { display: flex; gap: 8px; align-items: flex-start; }
.act { flex: 1; padding: 8px 10px; border: 1px solid #B7CDFA; border-radius: 6px; background: #F3F7FF; color: #0B3CA3; font-size: 13px; line-height: 1.45; }
.chev { color: #8695AB; padding-top: 8px; }
.lempty { padding: 24px 20px; color: #5B6B83; }
.lpager { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; font-size: 14px; color: #5B6B83; }
.lpager:empty { display: none; }
.pg { display: flex; gap: 6px; }
.pg button { min-width: 32px; height: 32px; border: 1px solid #D6DEEA; border-radius: 6px; background: #fff; cursor: pointer; }
.pg button.on { border-color: #104FCD; color: #104FCD; font-weight: 600; }
.pg button:disabled { opacity: .4; cursor: default; }

/* разбор пациента - панель справа */
.det-mask { position: fixed; inset: 0; z-index: 40; background: rgba(14,28,47,.35); }
.det { position: fixed; z-index: 41; top: 0; right: 0; width: min(720px, 100vw); height: 100vh; overflow-y: auto; background: #fff;
  box-shadow: -12px 0 40px rgba(11,28,51,.2); }
.dtop { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; padding: 12px 24px; background: #fff;
  border-bottom: 1px solid #DDE4EE; color: #5B6B83; font-size: 14px; }
.dnav { display: flex; gap: 6px; }
.dnav button { height: 32px; padding: 0 10px; border: 1px solid #D6DEEA; border-radius: 6px; background: #fff; cursor: pointer; font-size: 14px; }
.dnav button:disabled { opacity: .4; cursor: default; }
.dhead { display: flex; justify-content: space-between; gap: 16px; padding: 18px 24px 8px; }
.dhead h3 { margin: 0 0 8px; font-size: 20px; line-height: 1.3; }
.dtags { display: flex; flex-wrap: wrap; gap: 6px; }
.dscore { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #5B6B83; font-size: 12px; }
.dtabs { display: flex; gap: 4px; padding: 0 24px; border-bottom: 1px solid #DDE4EE; }
.dtabs button { padding: 10px 12px; border: 0; border-bottom: 2px solid transparent; background: none; color: #5B6B83; cursor: pointer; font-size: 14px; margin-bottom: -1px; }
.dtabs button.on { color: #104FCD; border-bottom-color: #104FCD; font-weight: 600; }
.dbody { padding: 18px 24px 40px; font-size: 15px; line-height: 1.6; color: #33425A; }
.dbody h4 { margin: 18px 0 4px; font-size: 14px; color: #0E1C2F; }
.dbody p { margin: 0; }
.dbody ul { margin: 0; padding-left: 20px; }
.dact { padding: 12px 14px; border: 1px solid #B7CDFA; border-radius: 8px; background: #F3F7FF; }
.dact span { font-size: 13px; font-weight: 700; color: #0B3CA3; text-transform: uppercase; letter-spacing: .04em; }
.dact p { margin: 4px 0 0; color: #0B3CA3; }
.dmark { margin-top: 12px; padding: 12px 14px; border: 1px solid #DDE4EE; border-radius: 8px; background: #FAFBFD; font-size: 14px; }
.dmark form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dmark select, .dmark input[type=text], .dmark input[type=datetime-local] { height: 34px; padding: 0 8px; border: 1px solid #CFD8E6; border-radius: 6px; background: #fff; }
.dmark input[type=text] { flex: 1; min-width: 160px; }
.dhist { margin-top: 8px; color: #5B6B83; font-size: 13px; }
.dmeta { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin-top: 14px; font-size: 14px; }
.dmeta span { color: #5B6B83; }
.dmeta b { font-weight: 600; color: #0E1C2F; }
.dmeta b.bad { color: #A33A28; }
.dbad { margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: #FBE1DC; color: #9A2D1C; font-size: 14px; }
.dtalk { padding: 14px 0; border-bottom: 1px solid #EEF1F6; }
.dtalk-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.dtalk-h span:last-child { color: #5B6B83; font-size: 14px; }
.dshould { margin: 8px 0; padding: 8px 10px; border-radius: 6px; background: #FBECCF; color: #7A5006; font-size: 14px; }
.ditems { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.dit { display: grid; grid-template-columns: 18px minmax(120px, 170px) 44px minmax(0, 1fr); gap: 8px; font-size: 14px; }
.dit i { font-style: normal; font-weight: 700; }
.ditsc { color: #5B6B83; font-variant-numeric: tabular-nums; }
.ditn q { display: block; margin-top: 2px; color: #5B6B83; font-style: italic; }
.devs { display: flex; flex-direction: column; gap: 8px; }
.dev { display: grid; grid-template-columns: 10px 140px 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.dev i { width: 8px; height: 8px; border-radius: 50%; }
.dev em { font-style: normal; color: #5B6B83; }
.dev em.bad { color: #A33A28; }
body.det-open { overflow: hidden; }
.page-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 18px; }
h1 { font-size: 24px; line-height: 1.25; margin: 0; }
.updated { color: var(--muted); font-size: 13px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--text); font-size: 14px; }
.chip:hover { text-decoration: none; border-color: var(--blue); }
.chip.on { background: var(--blue); border-color: var(--blue); color: #fff; }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.tile { background: #fff; border-radius: 10px; box-shadow: var(--card-shadow); padding: 14px 16px; }
.tile b { display: block; font-size: 26px; line-height: 1.2; }
.tile span { color: var(--muted); font-size: 13px; }

.card { background: #fff; border-radius: 10px; box-shadow: var(--card-shadow); padding: 16px 18px; margin-bottom: 12px; }
.task-top { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--blue-soft); color: var(--blue-dark); }
.pill.urgent { background: #FBE3DE; color: var(--red-dark); }
.pill.today { background: #FDF1DC; color: #7A5006; }
.pill.new { background: var(--green-soft); color: #0F6B42; }
.pill.st { background: #F2F5FA; color: var(--muted); }
.task-text { font-size: 15px; margin: 0 0 6px; }
.task-reason { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.task-links { font-size: 14px; margin-bottom: 10px; }
.task-links a { margin-right: 14px; }
.mark { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid var(--line2); padding-top: 10px; }
.mark select, .mark input[type=text], .mark input[type=datetime-local] { border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; background: #fff; }
.mark input[type=text] { flex: 1; min-width: 160px; }
.btn { background: var(--blue); color: #fff; border: 0; border-radius: 6px; padding: 6px 14px; cursor: pointer; font-weight: 600; }
.btn:hover { background: var(--blue-dark); }
.history { font-size: 13px; color: var(--muted); margin-top: 8px; }
.empty { color: var(--muted); padding: 24px 0; }
.msg { background: var(--green-soft); color: #0F6B42; border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; }

.table-wrap { overflow-x: auto; }
table.tl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tl td, table.tl th { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line2); vertical-align: top; }
table.tl th { color: var(--muted); font-weight: 600; font-size: 13px; }
.talk-text { white-space: pre-wrap; font-size: 13px; color: var(--muted); max-height: 220px; overflow: auto; background: #F7F9FC; border-radius: 6px; padding: 8px; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--side); }
.login { width: 100%; max-width: 360px; background: #fff; border-radius: 12px; padding: 28px 24px; box-shadow: 0 12px 48px rgba(11,28,51,.24); }
.login img { height: 34px; margin-bottom: 18px; }
.login label { display: block; font-size: 14px; color: var(--muted); margin: 12px 0 4px; }
.login input { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; }
.login .btn { width: 100%; margin-top: 18px; padding: 10px; }
.login .err { color: var(--red-dark); font-size: 14px; margin-top: 10px; }

/* ---- Разделы кабинета (02.12.2026) ---- */
h2 { font-size: 16px; line-height: 1.3; margin: 0 0 12px; }
h2.mt { margin-top: 22px; }
.main > h2 { margin: 22px 0 12px; }
.card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.card-h h2 { margin: 0; }
.card-h a { font-size: 14px; white-space: nowrap; }
.page-head { align-items: flex-end; }
.page-head .updated { margin-top: 2px; }

.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 3px; gap: 2px; }
.seg a { padding: 5px 12px; border-radius: 6px; color: var(--muted); font-size: 14px; }
.seg a:hover { text-decoration: none; color: var(--text); }
.seg a.on { background: var(--blue); color: #fff; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs a { flex: none; padding: 9px 12px; color: var(--muted); font-size: 14px; font-weight: 600; border-bottom: 2px solid transparent;
  margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--blue); border-bottom-color: var(--blue); }
.tabs .cnt { display: inline-block; min-width: 22px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: #DCE3EE;
  color: var(--text); font-size: 12px; text-align: center; }
.tabs a.on .cnt { background: var(--blue-soft); color: var(--blue-dark); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border-radius: 10px; box-shadow: var(--card-shadow); padding: 14px 16px; min-width: 0; }
.kpi-l { color: var(--muted); font-size: 13px; line-height: 1.3; }
.kpi-v { font-size: 30px; font-weight: 700; line-height: 1.2; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi-v small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.kpi-v.neg { color: var(--red-dark); }
.kpi-d { font-size: 13px; font-weight: 600; margin-top: 2px; }
.kpi-d span, .kpi-n { color: var(--soft); font-weight: 400; font-size: 13px; }
.kpi-d.pos { color: #0F6B42; }
.kpi-d.neg { color: var(--red-dark); }

.hero { padding: 18px 20px; margin-bottom: 16px; }
.hero-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 10px 24px; margin-bottom: 12px; }
.hero-l { color: var(--muted); font-size: 14px; }
.hero-v { font-size: 40px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hero-sum { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); margin-top: 10px; }
.hero-top .hero-sum { margin-top: 0; }
.hero-sum b { color: var(--text); margin-left: 4px; }
.hero-note { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.hero-note.lead { font-size: 14px; margin: -6px 0 16px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; background: var(--soft); }
.dot.good, .segbar .good { background: #1E9A62; }
.dot.wait, .segbar .wait { background: #E0A021; }
.dot.lost, .segbar .lost { background: #CF4B37; }
.segbar { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; background: #EEF2F8; }
.segbar.big { height: 16px; border-radius: 8px; }
.segbar i { display: block; min-width: 3px; }
.hero .segbar { height: 18px; border-radius: 9px; }

.grid2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.grid2 > .card { margin-bottom: 12px; }

/* столбцы по дням */
.cols-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.cols-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }
.cols { display: flex; align-items: stretch; gap: 6px; height: 200px; padding-top: 18px; border-bottom: 1px solid var(--line2);
  margin-bottom: 24px; }
.cols.dense { gap: 3px; }
.col { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; outline: none; cursor: default; }
.col-bar { position: relative; flex: 1; display: flex; flex-direction: column-reverse; align-items: center; gap: 2px; }
.col-bar i { display: block; flex-shrink: 0; width: 100%; max-width: 24px; min-height: 2px; }
.col-bar i:last-child { border-radius: 4px 4px 0 0; }
.col-total { order: 99; flex-shrink: 0; font-size: 11px; color: var(--muted); line-height: 14px; }
.col-x { position: absolute; left: 0; right: 0; bottom: -20px; text-align: center; font-size: 11px; color: var(--soft); }
.col.we .col-x { color: var(--red); }
.col-tip { display: none; position: absolute; z-index: 5; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  width: max-content; max-width: 220px; background: var(--text); color: #fff; font-size: 12px; line-height: 1.4; padding: 6px 8px;
  border-radius: 6px; pointer-events: none; }
.col:hover .col-tip, .col:focus .col-tip { display: block; }
.col:first-child .col-tip { left: 0; transform: none; }
.col:last-child .col-tip { left: auto; right: 0; transform: none; }

/* горизонтальные полосы */
.hbars { display: grid; gap: 8px; }
.hb { display: grid; grid-template-columns: minmax(0, 44%) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 14px; }
.hb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-t { height: 10px; background: #EEF2F8; border-radius: 0 5px 5px 0; }
.hb-t i { display: block; height: 100%; background: var(--blue); border-radius: 0 4px 4px 0; min-width: 2px; }
.hb-n { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 24px; text-align: right; }

.stack { display: flex; gap: 2px; height: 14px; min-width: 120px; }
.stack i { display: block; height: 100%; }
.stack i:last-child { border-radius: 0 4px 4px 0; }

.filters-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.filters-row select, .filters-row input[type=search] { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; background: #fff; }
.filters-row input[type=search] { width: 200px; }
.card.flush { padding: 4px 6px; }
table.tl tr.muted td { color: var(--muted); }
table.tl tr.total td { font-weight: 700; border-bottom: 0; }
.sub { color: var(--soft); font-size: 13px; }
.nowrap { white-space: nowrap; }
th.w40 { width: 26%; }
.pill.good { background: var(--green-soft); color: #0F6B42; }
.pill.dev { background: #EDE7FB; color: #4B2FA6; }

.mini-task { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line2); color: var(--text); font-size: 14px; }
.card-h + .mini-task { border-top: 0; padding-top: 0; }
.mini-task:hover { text-decoration: none; color: var(--blue-dark); }
.mini-task .pill { flex: none; margin-top: 1px; }

.soon-card { max-width: 760px; }
.soon-lead { margin: 12px 0 8px; }
.soon-list { margin: 0; padding-left: 20px; }
.soon-list li { margin-bottom: 6px; }

@media (max-width: 960px) {
  .layout { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; }
  .nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; }
  .nav-group { display: none; }
  .nav a { padding: 6px 10px; }
  .nav svg { width: 16px; height: 16px; }
  .main { padding: 18px 16px 40px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: 1fr; }
  .table-wrap table.tl { min-width: 720px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .kpi-v { font-size: 24px; }
  .hero-v { font-size: 32px; }
  .cols { gap: 2px; }
  .col-total { display: none; }
  .page-head .seg { width: 100%; }
  .seg a { flex: 1; text-align: center; }
  .hb { grid-template-columns: minmax(0, 50%) minmax(0, 1fr) auto; }
}

/* узкие экраны: меню выезжает слева, как в отчёте */
@media (max-width: 960px) {
  .layout { flex-direction: row; }
  .side { position: fixed; z-index: 50; top: 0; left: -260px; width: 248px; height: 100vh; transition: left .2s; }
  .nav { display: block; padding: 12px 8px; }
  .nav-group { display: block; }
  body.menu-open .side { left: 0; }
  body.menu-open .mask { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(14,28,47,.4); }
  .burger { display: grid; place-items: center; }
  .topbar { padding: 8px 16px; }
  .ogrid { grid-template-columns: minmax(0, 1fr); }
  .cgrid { grid-template-columns: minmax(0, 1fr); }
  .lhead { display: none; }
  .lrow2 { grid-template-columns: minmax(0, 1fr) 44px; gap: 8px 12px; }
  .lc1 { grid-column: 1; flex-direction: row; flex-wrap: wrap; gap: 4px 10px; }
  .lc2 { grid-column: 1 / -1; }
  .lc3 { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .lc4 { grid-column: 2; grid-row: 1; }
  .lc5 { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .main { padding: 20px 12px 40px; }
  .ph1 { font-size: 26px; }
  .period label { display: none; }
  .period select { min-width: 0; max-width: 200px; }
  .crumb { font-size: 14px; }
  .otiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .otile { padding: 14px; }
  .otile b { font-size: 24px; }
  .rbar { grid-template-columns: minmax(90px, 40%) minmax(30px, 1fr) auto; }
  .lselects select { flex: 1 1 100%; }
  .dhead, .dbody, .dtop { padding-left: 16px; padding-right: 16px; }
  .dnav button { padding: 0 8px; font-size: 13px; }
  .dmeta { grid-template-columns: 110px 1fr; }
  .dit { grid-template-columns: 18px minmax(0, 1fr) 40px; }
  .ditn { grid-column: 2 / -1; }
  .dev { grid-template-columns: 10px 1fr; }
}
