/* Ганита — фирменный стиль A (brand/brand/kit/A). Раскладка «Стандарт». */
:root {
  --bg: #eef2f3; --card: #ffffff; --side: #f8fbfc;
  --ink: #101e23; --ink-2: #2f3e43; --muted: #4a585d; --faint: #68767a;
  --line: #e3e7e8; --line-2: #cfd5d7;
  --acc: #0e5a6e; --acc-h: #094c5d; --acc-2: #e2eef1; --acc-3: #bfdbe2; --hl: #eef5f7;
  --mark: #e8a23a; --mark-ink: #925c07; --mark-line: #b07212; --mark-2: #fdf1dc;
  --ok: #08795e; --ok-bg: #e0f3ec; --bad: #b4312b; --bad-bg: #fbe7e5;
  --seg: #e3eaec; --hov: #eaf1f2; --house: #bccbd0;
  --font: "Geologica", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.23, 1, .32, 1);
  --r: 14px;
  --shadow: 0 1px 2px rgba(16, 30, 35, .05), 0 6px 20px -10px rgba(16, 30, 35, .14);
  /* планеты: контраст не ниже 4.5:1 на белом */
  --p0: #b4501a; --p1: #56607a; --p2: #b4312b; --p3: #17744b; --p4: #876200;
  --p5: #a3367a; --p6: #3b4fb8; --p7: #5a5c68; --p8: #6f6355; --pL: var(--acc);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  font: 14.5px/1.5 var(--font); color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; min-height: 100vh;
}
::selection { background: var(--acc-3); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 6px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); }
small { font-size: 12.5px; }
h1, h2, h3, h4 { letter-spacing: -.015em; }

/* ── каркас ── */
.app { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.side {
  background: var(--side); border-right: 1px solid var(--line); padding: 18px 14px;
  display: flex; flex-direction: column; gap: 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side-top { display: flex; align-items: center; justify-content: space-between; }
.logo { display: inline-flex; align-items: center; padding: 2px 6px; border-radius: 8px; }
.logo img { display: block; height: 30px; width: auto; }
.side .side-close { display: none; }
.new {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px;
  background: var(--acc); color: #fff; border: 0; border-radius: 10px; padding: 10px; font-weight: 600;
  transition: transform .16s var(--ease), background .15s ease;
}
.new:active { transform: scale(.97); }
@media (hover: hover) { .new:hover { background: var(--acc-h); } }
.side-h { font-size: 12px; font-weight: 600; color: var(--muted); margin: 4px 8px -8px; letter-spacing: 0; }
.people { display: grid; gap: 2px; }
.people .empty-note { font-size: 13px; color: var(--muted); margin: 0 8px; }
.person { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 32px 8px 8px; border-radius: 10px; transition: background .12s ease; }
.person > button.pick { all: unset; position: absolute; inset: 0; border-radius: 10px; cursor: pointer; }
.person > button.pick:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; }
.person .av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 12px; color: var(--acc); background: var(--acc-2); }
.person b { font-weight: 600; font-size: 14px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person[aria-current="true"] { background: var(--acc-2); }
.person[aria-current="true"] .av { background: var(--acc); color: #fff; }
.person .rm { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); z-index: 1; border: 0; background: none; color: var(--faint); width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; opacity: 0; transition: opacity .12s ease, background .12s ease; }
.person .rm svg { width: 15px; height: 15px; }
.person:focus-within .rm { opacity: 1; }
@media (hover: hover) {
  .person:not([aria-current="true"]):hover { background: var(--hov); }
  .person:hover .rm { opacity: 1; }
  .person .rm:hover { background: rgba(16, 30, 35, .07); color: var(--ink); }
}
@media (hover: none) { .person .rm { opacity: 1; } }
.side .foot { margin-top: auto; display: grid; gap: 2px; }
.side .foot button { display: flex; gap: 10px; align-items: center; border: 0; background: none; padding: 10px 8px; border-radius: 8px; color: var(--ink-2); text-align: left; }
@media (hover: hover) { .side .foot button:hover { background: var(--hov); } }
.badge { background: var(--mark); color: #2b1a02; border-radius: 10px; font-size: 11px; padding: 0 7px; font-weight: 700; margin-left: auto; }
.scrim { display: none; }

.main { padding: 22px 32px 64px; min-width: 0; max-width: 1480px; width: 100%; }
.mtop { display: none; }
.head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.head-txt { min-width: 0; }
.head h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin: 0; overflow-wrap: anywhere; }
.head .sub { color: var(--muted); font-size: 13.5px; }
.head .acts { margin-left: auto; display: flex; gap: 8px; }

/* ── кнопки ── */
.btn {
  display: inline-flex; gap: 8px; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--card);
  border-radius: 10px; padding: 8px 12px; font-weight: 600; font-size: 13.5px; min-height: 38px;
  transition: border-color .15s ease, background .15s ease, transform .16s var(--ease);
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }
@media (hover: hover) { .btn:hover:not(:disabled) { border-color: var(--line-2); } }
.btn.primary { background: var(--acc); border-color: var(--acc); color: #fff; }
@media (hover: hover) { .btn.primary:hover:not(:disabled) { background: var(--acc-h); border-color: var(--acc-h); } }
.btn.ghost { background: transparent; }
.icon-btn { border: 0; background: none; padding: 7px; border-radius: 8px; color: var(--muted); display: inline-grid; place-items: center; transition: background .12s ease; }
@media (hover: hover) { .icon-btn:hover { background: var(--hov); color: var(--ink); } }

/* ── форма рождения ── */
.formcard { margin-bottom: 18px; }
.formcard-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.formcard h2 { font-size: 18px; font-weight: 700; margin: 0; }
.formcard-h p { margin: 2px 0 0; font-size: 13.5px; }
.fgrid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .75fr) minmax(0, .55fr) minmax(0, 1.6fr); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; position: relative; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.field input, .field select {
  width: 100%; min-width: 0; padding: 9px 11px; min-height: 40px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--card);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input::placeholder { color: #8a979b; }
.field input:focus, .field select:focus { border-color: var(--acc); outline: none; box-shadow: 0 0 0 3px var(--acc-2); }
.field input[aria-invalid="true"] { border-color: var(--bad); }
.row3 { display: grid; grid-template-columns: 1fr 1fr .8fr; gap: 10px; max-width: 520px; }
.manual { margin: -2px 0 10px; font-size: 13.5px; }
.manual summary { cursor: pointer; color: var(--muted); margin-bottom: 8px; width: max-content; }
.manual small { display: block; margin-top: -4px; }
#tzHint button { border: 0; background: none; padding: 0; color: var(--acc); text-decoration: underline; font-size: inherit; }
.form-error { color: var(--bad); background: var(--bad-bg); border-radius: 9px; padding: 9px 12px; margin: 4px 0 12px; font-size: 13.5px; }
.form-acts { display: flex; gap: 8px; }
.form-acts .btn { min-width: 160px; min-height: 42px; }
.check { display: flex; gap: 8px; align-items: center; cursor: pointer; font-size: 14px; min-height: 40px; }
.check input { width: 17px; height: 17px; accent-color: var(--acc); margin: 0; }
.stepper { display: flex; }
.stepper input { text-align: center; border-radius: 0; border-left: 0; border-right: 0; }
.step { border: 1px solid var(--line-2); background: var(--side); width: 38px; font-size: 18px; line-height: 1; color: var(--ink-2); transition: background .12s ease; }
.step:first-child { border-radius: 9px 0 0 9px; }
.step:last-child { border-radius: 0 9px 9px 0; }
@media (hover: hover) { .step:hover { background: var(--hov); } }

/* поиск города */
.city-list {
  position: absolute; top: 68px; left: 0; right: 0; z-index: 30; margin: 0; padding: 4px; min-width: 260px;
  list-style: none; background: var(--card); border: 1px solid var(--line-2); border-radius: 10px;
  box-shadow: 0 12px 32px -12px rgba(16, 30, 35, .3); max-height: 300px; overflow: auto;
}
.city-list li { padding: 8px 10px; border-radius: 7px; cursor: pointer; }
.city-list li[aria-selected="true"] { background: var(--acc-2); }
@media (hover: hover) { .city-list li:hover { background: var(--acc-2); } }
.city-list .c-name { font-weight: 600; }
.city-list .c-reg { color: var(--muted); font-size: 12.5px; display: block; }
.city-list .c-none { color: var(--muted); cursor: default; }
.city-picked { color: var(--muted); font-size: 12px; }

/* ── разделы ── */
.segs { display: inline-flex; background: var(--seg); border-radius: 12px; padding: 4px; margin-bottom: 18px; position: relative; max-width: 100%; }
.segs .tab { position: relative; z-index: 1; border: 0; background: none; padding: 8px 18px; border-radius: 9px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: color .2s ease, transform .16s var(--ease); }
.segs .tab:active { transform: scale(.97); }
.segs .tab[aria-selected="true"] { color: var(--ink); }
.segs .pill { position: absolute; top: 4px; bottom: 4px; left: 4px; border-radius: 9px; background: var(--card); box-shadow: 0 1px 2px rgba(16, 30, 35, .08), 0 2px 8px -2px rgba(16, 30, 35, .12); }
.segs.ready .pill { transition: left .26s var(--ease), width .26s var(--ease); }
.segs .short { display: none; }
.content { min-width: 0; transition: opacity .15s ease; }
.tabpane { animation: fadein .15s ease-out both; }
@keyframes fadein { from { opacity: 0; } }

.subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.subtab {
  border: 1px solid var(--line-2); background: var(--card); border-radius: 999px; padding: 6px 14px; min-height: 36px;
  font-weight: 600; font-size: 13.5px; color: var(--muted); transition: background .15s ease, border-color .15s ease, color .15s ease, transform .16s var(--ease);
}
.subtab:active { transform: scale(.97); }
.subtab[aria-selected="true"] { background: var(--acc); border-color: var(--acc); color: #fff; }
@media (hover: hover) { .subtab:not([aria-selected="true"]):hover { color: var(--ink); border-color: #b3c0c4; } }

/* панель Варшапхалы */
.vbar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-end; padding: 14px 18px 2px; }
.vbar .field { margin-bottom: 12px; }
.v-year { width: 160px; } .v-month { width: 170px; }
.v-here { margin-bottom: 12px; }
.v-city { flex: 1 1 260px; max-width: 420px; }

/* ── карточки ── */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; min-width: 0; margin-bottom: 16px; }
.card h3 { margin: 0 0 14px; font-size: 15px; font-weight: 600; display: flex; justify-content: space-between; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; }
.card h3 > .muted { font-weight: 400; font-size: 12.5px; letter-spacing: 0; }
.grid-chart { display: grid; grid-template-columns: minmax(0, 470px) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.grid-chart > .card, .grid-chart .stack > .card { margin-bottom: 0; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.grid-2 > .card, .grid-2 .stack > .card { margin-bottom: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ключевые показатели */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.kpi { border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; min-width: 0; }
.kpi small { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.kpi b { display: block; font-size: 16.5px; font-weight: 600; margin-top: 1px; overflow-wrap: anywhere; }
.kpi span { display: block; font-size: 12.5px; color: var(--muted); }
.kpi.key { background: var(--acc-2); border-color: transparent; }
.kpi.key b { color: var(--acc); }

/* периоды «сейчас» */
.dasha { display: grid; gap: 10px; }
.dasha .lvl { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.dasha .lvl small { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.dasha .lvl b { font-weight: 600; }
.dasha .lvl > span { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.track { height: 8px; border-radius: 4px; background: var(--seg); overflow: hidden; margin-top: 3px; }
.track i { display: block; height: 100%; border-radius: 4px; background: var(--acc); box-shadow: inset -3px 0 0 var(--mark); }

/* сводка (Разное) */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 0; }
.fact { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.fact dt { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.fact dd { margin: 0; font-weight: 600; }
.fact dd small { font-weight: 400; color: var(--muted); }
.fact.key { background: var(--acc-2); border-color: transparent; }
.fact.key dd { color: var(--acc); font-size: 16.5px; }

/* ── карта ── */
.chart-tools { display: flex; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; justify-content: space-between; }
.chart-tools select { padding: 7px 30px 7px 12px; min-height: 36px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--card); font-weight: 600; font-size: 13.5px; }
.chart-tools small { color: var(--muted); }
.chart-svg { width: 100%; height: auto; display: block; max-width: 440px; margin: 0 auto; }
.chart-svg text { font-family: var(--font); }
.chart-svg .cell { fill: var(--card); stroke: var(--house); stroke-width: 1.2; }
.chart-svg .cell.lagna { fill: var(--acc-2); }
.chart-svg .center { fill: var(--side); stroke: var(--house); }
.chart-svg .sign-no, .chart-svg .sign-lbl { fill: var(--faint); font-size: 11px; font-weight: 600; }
.chart-svg .pl { font-size: 19px; font-weight: 600; }
.chart-svg.south .pl { font-size: 21px; }
.chart-svg.south .pl.dense { font-size: 16px; }
.chart-svg .pl tspan.r { font-size: 12px; }
.chart-svg .pl tspan.deg { font-weight: 400; font-size: 12.5px; fill: var(--muted); }
.chart-svg .ctitle { font-size: 13px; font-weight: 600; fill: var(--ink); }
.chart-svg .csub { font-size: 11px; fill: var(--faint); }
.chart-svg .muntha { fill: var(--mark-2); fill-opacity: .7; stroke: var(--mark-line); stroke-width: 1.5; stroke-dasharray: 4 3; }
.chart-svg path.ni { stroke: var(--house); stroke-width: 1.2; fill: none; }
.chart-svg .ni-bg { fill: var(--card); stroke: var(--house); stroke-width: 1.2; }
.chart-svg path.ni.ni-lagna { fill: var(--acc-2); }
.c0 { fill: var(--p0); } .c1 { fill: var(--p1); } .c2 { fill: var(--p2); } .c3 { fill: var(--p3); } .c4 { fill: var(--p4); }
.c5 { fill: var(--p5); } .c6 { fill: var(--p6); } .c7 { fill: var(--p7); } .c8 { fill: var(--p8); } .cL { fill: var(--pL); }
.t0 { color: var(--p0); } .t1 { color: var(--p1); } .t2 { color: var(--p2); } .t3 { color: var(--p3); } .t4 { color: var(--p4); }
.t5 { color: var(--p5); } .t6 { color: var(--p6); } .t7 { color: var(--p7); } .t8 { color: var(--p8); } .tL { color: var(--pL); }

/* ── таблицы ── */
.tbl-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 8px 10px; border-bottom: 1px solid #edf0f1; vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.num, .tbl th.num { text-align: right; }
.tbl td.nowrap { white-space: nowrap; }
.tbl tbody tr { transition: background .12s ease; }
@media (hover: hover) { .tbl tbody tr:hover td { background: var(--side); } }
.tbl tr.hl td { background: var(--hl); }
.tbl tr.hl td:first-child { box-shadow: inset 3px 0 0 var(--mark); }
.tbl tr.sub td { font-size: 13px; }
.tbl .pname { font-weight: 600; }
.tbl tr.clickable { cursor: pointer; }
@media (hover: hover) { .tbl tr.clickable:hover td { background: var(--hov); } }
.tbl tr.past td { opacity: .55; }
.tbl.av td.num, .tbl.av th.num { text-align: center; padding: 7px 4px; }
.good-n { color: var(--ok); font-weight: 700; }
.bad-n { color: var(--bad); }
.tbl-wrap.tall { max-height: 440px; overflow-y: auto; }
.tag { display: inline-block; font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 999px; background: var(--hov); color: var(--muted); white-space: nowrap; }
.tag.good { background: var(--ok-bg); color: var(--ok); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }
.tag.acc { background: var(--acc-2); color: var(--acc); }
.bar { position: relative; height: 6px; background: var(--seg); border-radius: 3px; min-width: 60px; margin-top: 5px; overflow: hidden; }
.bar > i { position: absolute; inset: 0 auto 0 0; background: var(--acc); border-radius: 3px; }
.caret { display: inline-block; width: 14px; color: var(--faint); transition: transform .16s var(--ease); }
.open > td .caret { transform: rotate(90deg); }

/* транзиты */
.tr-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.tr-controls .field { margin: 0; width: 140px; }
.tr-controls .field:nth-child(2) { width: 96px; }
.tr-step { display: flex; gap: 4px; flex-wrap: wrap; }
.tr-step .btn { padding: 7px 10px; font-size: 13px; }
.tr-controls small { flex-basis: 100%; }
.tr-year { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; }
.tr-year .btn { padding: 2px 10px; min-height: 30px; }

/* йоги */
.ytools { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 12px; }
.ytools select { padding: 7px 30px 7px 12px; min-height: 36px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--card); font-weight: 600; font-size: 13.5px; max-width: 100%; }
.ytbl td { vertical-align: top; }
.ytbl .yname b { font-weight: 600; white-space: nowrap; }
.ytbl .yname small { display: block; color: var(--muted); font-size: 12px; }
.ytbl .yeff { min-width: 200px; }
.ytbl .ycond { min-width: 240px; color: var(--ink-2); }
.ytbl .ynote { color: var(--mark-ink); font-size: 12.5px; margin-top: 3px; }
@media (max-width: 760px) {
  .ytbl thead { display: none; }
  .ytbl tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .ytbl tbody tr:last-child { border-bottom: 0; }
  .ytbl td { border: 0; padding: 0; min-width: 0; }
  .ytbl .yeff, .ytbl .ycond { grid-column: 1 / -1; min-width: 0; }
  .ytbl .ycond { font-size: 13px; color: var(--muted); }
  .ytools select { min-height: 44px; flex: 1 1 160px; }
}
.yogas { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.yoga { border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; }
.yoga b { font-weight: 600; }
.yoga p { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.yoga-pl { margin-top: 3px; font-size: 13px; }
.yoga-note { color: var(--mark-ink) !important; }
.yoga-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.yoga-nav .tag { text-decoration: none; font-size: 12.5px; padding: 4px 11px; }
.card[id^="yg-"] { scroll-margin-top: 20px; }
.note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }

/* ── диалог настроек ── */
.dlg { border: 0; padding: 0; border-radius: 16px; background: var(--card); color: var(--ink); width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: 0 24px 64px -16px rgba(16, 30, 35, .35); }
.dlg[open] { animation: dlg-in .2s var(--ease) both; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.dlg::backdrop { background: rgba(16, 30, 35, .4); }
.dlg-inner { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px 0; }
.dlg-head h2 { font-size: 18px; font-weight: 700; margin: 0; }
.dlg-note { padding: 0 20px; margin: 6px 0 4px; font-size: 13.5px; }
#settingsBody { overflow: auto; padding: 4px 20px 8px; }
.set-group { margin-top: 16px; }
.set-group h4 { font-size: 13.5px; font-weight: 600; color: var(--acc); margin: 0 0 6px; }
.set-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.set-item label { font-size: 14px; }
.set-item .hint { display: block; font-size: 12px; color: var(--muted); }
.set-item select { width: 100%; padding: 8px 10px; min-height: 40px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--card); }
.set-item.changed label::after { content: " •"; color: var(--mark-line); font-weight: 700; }
.dlg-foot { display: flex; justify-content: space-between; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--line); }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 60; box-shadow: var(--shadow); animation: toast-in .2s var(--ease) both; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 6px); } }
.loading { opacity: .55; pointer-events: none; }

/* ── адаптив ── */
@media (max-width: 1180px) {
  .grid-chart { grid-template-columns: 1fr; }
  .grid-chart > .card:first-child { max-width: 560px; width: 100%; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  .fgrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .f-name, .f-city { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .side {
    position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 50; box-shadow: 0 0 40px rgba(16, 30, 35, .2);
    transform: translateX(-102%); transition: transform .26s var(--ease), visibility 0s linear .26s; visibility: hidden;
  }
  .side.open { transform: none; visibility: visible; transition: transform .26s var(--ease); }
  .side .side-close { display: inline-grid; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(16, 30, 35, .35); animation: fadein .2s ease-out both; }
  .main { padding: 14px 16px 48px; }
  .mtop { display: flex; justify-content: space-between; align-items: center; margin: 0 0 16px; }
  .mtop .logo { padding-left: 0; }
  .mtop .logo img { height: 27px; }
  .head .acts { margin-left: 0; }
  .btn, .icon-btn { min-height: 44px; min-width: 44px; }
  .segs { display: flex; }
  .segs .tab { flex: 1; padding: 8px 6px; min-height: 44px; }
  .segs .long { display: none; } .segs .short { display: inline; }
  .subtab { min-height: 40px; }
  .chart-tools select { min-height: 44px; }
  .person { padding-right: 44px; }
  .person .rm { width: 40px; height: 40px; }
  .side .foot button { min-height: 44px; }
  .person { min-height: 48px; }
  .dasha .lvl { grid-template-columns: 92px minmax(0, 1fr); }
  .dasha .lvl > span { grid-column: 2; margin-top: -6px; }
  .card { padding: 14px; }
  .vbar { padding: 12px 14px 0; }
  .tr-step .btn { min-height: 40px; }
}
@media (max-width: 560px) {
  .fgrid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 10px; }
  .row3 { grid-template-columns: 1fr 1fr; }
  .row3 .field:last-child { grid-column: 1 / -1; }
  .form-acts .btn { width: 100%; }
  .head h1 { font-size: 21px; }
  .head .acts { width: 100%; }
  .head .acts .btn { flex: 1; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .set-item { grid-template-columns: 1fr; gap: 4px; }
  .v-year, .v-month { width: calc(50% - 8px); }
  .v-city { flex-basis: 100%; max-width: none; }
  .tr-controls .field { width: calc(50% - 5px); }
  .tr-controls .field:nth-child(2) { width: calc(50% - 5px); }
}
@media (prefers-reduced-motion: reduce) {
  .tabpane, .dlg[open], .toast, .scrim { animation: none; }
  .segs.ready .pill, .side { transition: none; }
  .btn:active, .new:active, .subtab:active, .segs .tab:active { transform: none; }
}
