/*
 * Экраны действующего владельца: Главная, Выплаты, Договор, Профиль,
 * страница пункта, «Помощь», «Данные для договора».
 * Чей файл: исполнитель экранов владельца (js/app.js — экраны, points.js,
 * docs.js, fill.js, changes.js, charts.js, help.js).
 * Подключён в index.html после owner.css. Оболочку (прокрутка, шапки, нижняя
 * панель, подэкраны, шторки) не менять — она в owner.css.
 *
 * Вид N1 (static/css/n1.css, vhod.css приложения): карточки r24, строки от
 * 56 с волоском от начала текста, шкала 30/22/17/15/13, цифры tabular-nums,
 * один лаймовый акцент на экран, без эффектов нажатия.
 */

/* ── общее: строки, группы, цифры ─────────────────────────────────────── */
.row { min-height: 56px; padding: 10px 16px; }
.row.with-ic { min-height: 64px; }
.row .ic { width: 40px; height: 40px; border-radius: 12px; }
.row .ic svg.i { width: 22px; height: 22px; }
.row.with-ic + .row.with-ic::before { left: 70px; }
.row .grow > .t-c, .row .grow > .t-g { margin-top: 2px; }
.row .r .t-t, .row .r.t-t, .row .r .t-b, .row .r.t-b { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.row .chev { display: flex; align-items: center; }
.grp, .card { border-radius: 24px; }
.sec { padding: 24px 4px 12px; }
.stats .v { font-weight: 700; }
.amount, .stats .v, .cur-amt .num, .lact-sum, .row .r { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.hair-x { height: 1px; margin: 0 16px; background: var(--hair); transform: scaleY(.5); }
/* узкий телефон (320): плитка меньше, сумма справа 15 — названию месяца и
   статусу остаётся место, «4 123 505 ₸» целиком */
@media (max-width: 359.98px) {
  .row { padding-left: 12px; padding-right: 12px; gap: 10px; }
  .row.with-ic > .ic { width: 32px; height: 32px; border-radius: 10px; }
  .row.with-ic > .ic svg.i { width: 18px; height: 18px; }
  .row.with-ic + .row.with-ic::before { left: 54px; }
  .row .r .t-t, .row .r.t-t { font-size: 15px; line-height: 20px; }
  .pf .grp.nav .nav-row + .nav-row::before { left: 52px; }
}

/* ── скелеты: плашки по форме, данные проявляются на их месте (n1-sk-in) ── */
.sk-amt { display: inline-block; width: 62%; max-width: 240px; height: 40px; border-radius: 12px; vertical-align: middle; }
.sk-meta { display: inline-block; width: 44%; max-width: 180px; height: 16px; border-radius: 8px; }
.sk-v { display: inline-block; width: 56px; height: 22px; border-radius: 8px; vertical-align: middle; }
.sk-in { animation: n1SkIn .32s cubic-bezier(.22, 1, .36, 1); }
@keyframes n1SkIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sk-in { animation: none; } }

/* ── пустые состояния и ошибки (как N1: 3D, заголовок, подпись, одна кнопка) ── */
.n1-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 20px 24px; text-align: center; }
.n1-empty img { display: block; width: 120px; height: 120px; margin: 0 0 6px; object-fit: contain; pointer-events: none; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .4)); }
.n1-empty .t-h2, .n1-empty .t-t { text-wrap: balance; overflow-wrap: anywhere; }
.n1-empty .t-g { max-width: 380px; margin: 0; text-wrap: balance; overflow-wrap: anywhere; }
.n1-empty .btn { margin-top: 14px; min-width: 200px; }
.n1-empty.in-grp { padding: 24px 20px; }
.n1-empty.in-grp img { width: 96px; height: 96px; }
.sheet .n1-empty { background: transparent; }

/* ══ ГЛАВНАЯ ══════════════════════════════════════════════════════════
   Телефон: деньги первыми (видны на первом экране и на 320), под ними
   короткая плашка «Что сделать», итоги, «Мои пункты», графики. Колонки
   .hm-l/.hm-r/.hm-b растворяются, порядок — order. Компьютер — сетка ниже. */
.hm-filters { padding-bottom: 12px; }
.hm { display: flex; flex-direction: column; gap: 12px; }
.hm-l, .hm-r, .hm-b { display: contents; }
.hm .hm-l > *, .hm .hm-r > *, .hm .hm-b > * { margin-top: 0; }
.hm #hero { order: 1; margin-top: 30px; }
.hm .n1-empty { order: 1; }
.hm .hm-todo { order: 2; }
.hm #totals { order: 3; }
.hm .hm-pts { order: 4; }
.hm #chartCard { order: 5; }
.hm #pointsCard { order: 6; }
.hm #hoursCard { order: 7; }
.hm #weekCard { order: 8; }
.hm-pts .sec { padding-top: 12px; }

/* «Что сделать»: плашки 64 одна под другой, вся плашка — ссылка */
/* и на главной новых партнёров (.first-home): там карточки стояли вплотную, Тим, 05.11.2026 */
.hm-todo [data-k], .first-home [data-k="contractCard"], .first-home [data-k="todo"] { display: flex; flex-direction: column; gap: 8px; }
.hm-todo [data-k]:empty, .first-home [data-k="contractCard"]:empty, .first-home [data-k="todo"]:empty { display: none; }
.hm-todo [data-k="contractCard"]:not([hidden]) + [data-k="todo"]:not(:empty),
.first-home [data-k="contractCard"]:not([hidden]) + [data-k="todo"]:not(:empty) { margin-top: 8px; }
.ccard.plq { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; min-height: 64px; margin: 0; padding: 10px 14px 10px 12px; color: #fff; text-decoration: none; }
.ccard.plq.attn { background: var(--card); box-shadow: inset 0 0 0 1px rgba(178, 254, 18, .2); }
.ccard.plq .ccard-art { width: 44px; height: 44px; }
.ccard.plq .ccard-tx .t-t { font: 600 15px/20px var(--font); letter-spacing: -.23px; }
.ccard.plq .ccard-tx .t-c { margin-top: 2px; font-variant-numeric: tabular-nums; }
.ccard.plq .ccard-ic { width: 40px; height: 40px; border-radius: 12px; }
.ccard.plq .ccard-ic.amb { width: 44px; height: 44px; border-radius: 14px; }
.ccard.plq .chev { flex: none; display: flex; color: var(--chev); }
.ccard.plq .chev svg.i { width: 18px; height: 18px; }
.ccard.plq.amb { padding-left: 12px; }
.plq-ok .row { min-height: 56px; }
.plq-ok .row .ic { width: 32px; height: 32px; border-radius: 16px; }
.plq-ok .row .ic svg.i { width: 18px; height: 18px; }

/* подпись главной карточки: итог прошлого месяца в первые дни месяца */
.hero-prev { display: inline; }
.hero-prev .num { color: #fff; font-weight: 600; white-space: nowrap; }
.hero .meta .sk-meta { margin-top: 4px; }

/* фильтры на узком телефоне: обе пилюли в ряд, без значков слева */
.hm-filters .pill { flex: 0 1 auto; min-width: 0; }
@media (max-width: 359.98px) {
  .hm-filters .pill > svg.i:first-child { display: none; }
  .hm-filters .pill { padding: 0 12px; gap: 6px; }
}

/* ══ ВЫПЛАТЫ ══ */
/* статусы в строках спокойные: лаймовый на экране — только главная кнопка или
   карточка; «оплачен» читается по плитке с галочкой, «ждёт» — янтарным */
.row .t-c > .lime { color: var(--grey); }
.pay-r { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.pay-r > * { margin-top: 0; }
.pay-r > section > .sec { padding-top: 12px; }
.cur-amt .num { font-weight: 700; }

/* ══ ПРОФИЛЬ (как профиль N1) ══
   Шапка: круг инициалов, имя 22/28, форма собственности. Ниже карточки r24
   со строками: значок 24 без плитки, название 17, значение справа, стрелка.
   Волосок от начала текста. */
.pf { display: flex; flex-direction: column; }
.pf-l, .pf-r { display: contents; }
.pf-who { order: 1; }
.pf-acts { order: 2; margin-top: 20px; }
.pf-pts { order: 3; }
.pf-req { order: 4; }
.pf-in { order: 5; margin-top: 24px; }
.pf-out { order: 6; margin-top: 24px; }
.pf-who { display: flex; align-items: center; gap: 16px; padding: 8px 4px 0; min-width: 0; }
.pf-ava { flex: none; width: 72px; height: 72px; border-radius: 36px; display: grid; place-items: center; background: var(--card); color: var(--lime); font: 600 24px/1 var(--font); letter-spacing: -.3px; outline: 2px dashed rgba(178, 254, 18, .55); outline-offset: 3px; }
.pf-who-tx { min-width: 0; }
.pf-name { overflow-wrap: anywhere; text-wrap: balance; }
.pf-legal { margin-top: 2px; overflow-wrap: anywhere; }
.pf-note { padding: 8px 4px 0; }
.grp.nav .nav-row { gap: 16px; min-height: 56px; }
.grp.nav .nav-row + .nav-row::before { left: 56px; }
.nav-ic { flex: none; display: grid; place-items: center; width: 24px; height: 24px; color: var(--lime); }
.nav-ic svg.i { width: 24px; height: 24px; }
.nav-ic.amber { color: var(--amber); }
.nav-ic.off { color: var(--grey2); }
.nav-val { color: var(--grey); font: 400 15px/20px var(--font); letter-spacing: -.23px; white-space: nowrap; }
.nav-val .t-t { color: #fff; }
.nav-val .copyable { color: var(--grey); }
button.nav-row { font: inherit; }
/* логин (до 64 знаков) подписью под «Логин», целиком с переносом, а не справа в строке */
.nav-row[data-row="login"] .copyable { color: var(--grey); overflow-wrap: anywhere; }

/* ══ ПОЛЯ ВВОДА (вид N1, vhod.css) ══════════════════════════════════════
   Одиночное поле: 56, r24, #2f2f2f на фоне экрана (#383838 в шторке и в
   карточке). Ошибка — красная строка под полем. Вход и регистрация (.login) —
   у своего исполнителя, их не трогаем. */
.fill-box:not(.login *) { height: 56px; padding: 0 14px 0 16px; border-radius: 24px; background: var(--card); }
.fill-box:not(.login *):focus-within { box-shadow: inset 0 0 0 1.5px #5a5a5a; }
.fill-box.err:not(.login *), .fill-box.err:not(.login *):focus-within { box-shadow: inset 0 0 0 1.5px var(--red); }
.fill-box.warn:not(.login *) { box-shadow: inset 0 0 0 1.5px var(--amber); }
.fill-box.area:not(.login *) { height: auto; padding: 14px 16px; }
.fill-input:not(.login *) { height: 44px; }
.fill-input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 1000px var(--card) inset; caret-color: var(--lime); }
.sheet .fill-box:not(.login *), .card .fill-box:not(.login *), .chg-early .fill-box { background: var(--card2); }
.sheet .fill-input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px var(--card2) inset; }
.fill-hint:not(.login *) { margin: 8px 16px 0; }
.fill-hint.err:not(.login *) { font: 400 15px/20px var(--font); letter-spacing: -.23px; }
/* старое поле шторок (.inp: пароль, «Не согласен») — тот же вид */
.inp { height: 56px; border-radius: 24px; padding: 0 8px 0 16px; }
.inp:focus-within { box-shadow: inset 0 0 0 1.5px #5a5a5a; }
.inp.area { border-radius: 24px; padding: 14px 16px; }
.field .lb { padding: 0 4px 8px; font: 400 15px/20px var(--font); letter-spacing: -.23px; color: var(--grey); }
.form-err { color: var(--red); }
.fl-s { display: none; }

/* «Данные для договора»: группы одной карточкой r24, строки 56, подпись
   слева 92 px, волосок от начала текста. Длинное (счёт, «в лице …») и всё на
   узком экране — подписью над вводом внутри той же строки. */
.fill-form > .fill-sec { padding: 24px 4px 10px; }
.fill-form > .fill-sec:first-child { padding-top: 4px; }
.fill-card { background: var(--card); border-radius: 24px; overflow: hidden; }
.fill-card > .fill-f { position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr); column-gap: 12px; align-items: center; margin: 0; padding: 0 16px; }
.fill-card > .fill-f + .fill-f, .fill-card > .fill-gen + .fill-f { margin-top: 0; }
.fill-card > * + .fill-f::before, .fill-card > * + .fill-gen::before { content: ""; position: absolute; left: 16px; right: 0; top: 0; height: 1px; background: var(--hair); transform: scaleY(.5); transform-origin: top; }
.fill-card .fill-lbl { grid-column: 1; margin: 0; padding: 10px 0; font: 400 15px/20px var(--font); letter-spacing: -.23px; color: var(--grey); overflow-wrap: anywhere; }
.fill-card .fl-s { display: inline; }
.fill-card .fl-f { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fill-card .fill-box:not(.login *) { grid-column: 2; height: 56px; padding: 0; border-radius: 0; background: transparent; box-shadow: none; }
.fill-card .fill-input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px var(--card) inset; }
.fill-card > .fill-f > :not(.fill-lbl):not(.fill-box) { grid-column: 2; }
.fill-card .fill-hint:not(.login *), .fill-card .fill-pend, .fill-card .fill-note { margin: -6px 0 12px; }
.fill-card .fill-chg { grid-column: 1 / -1 !important; justify-self: start; margin: 0 0 14px; }
.fill-card .fill-seg { margin: 6px 0; background: var(--card2); }
.fill-card > .fill-f:has(.fill-box.err) .fill-lbl { color: var(--red); }
.fill-card > .fill-f:has(.fill-box.warn) .fill-lbl { color: var(--amber); }
/* строка в фокусе: тонкая полоска слева вместо рамки поля */
.fill-card > .fill-f:focus-within::after { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: #5a5a5a; }
.fill-card > .fill-f:has(.fill-box.err):focus-within::after { background: var(--red); }
/* подпись над вводом: счёт (20 знаков + банк), «в лице …», руководитель после подписи */
.fill-card > .fill-f[data-f="bank_account"], .fill-card > .fill-f[data-f="signer_gen"], .fill-card > .fill-f.chg-signer-ro { grid-template-columns: minmax(0, 1fr); padding-top: 10px; }
.fill-card > .fill-f[data-f="bank_account"] .fill-lbl, .fill-card > .fill-f[data-f="signer_gen"] .fill-lbl { padding: 0; font: 400 13px/18px var(--font); letter-spacing: -.08px; }
.fill-card > .fill-f[data-f="bank_account"] .fl-s, .fill-card > .fill-f[data-f="signer_gen"] .fl-s { display: none; }
.fill-card > .fill-f[data-f="bank_account"] .fl-f, .fill-card > .fill-f[data-f="signer_gen"] .fl-f { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
.fill-card > .fill-f[data-f="bank_account"] > *, .fill-card > .fill-f[data-f="signer_gen"] > *, .fill-card > .fill-f.chg-signer-ro > * { grid-column: 1 !important; }
.fill-card > .fill-f[data-f="bank_account"] .fill-box, .fill-card > .fill-f[data-f="signer_gen"] .fill-box { height: 44px; }
.fill-card > .fill-f.chg-signer-ro { padding-bottom: 2px; }
.fill-card > .fill-f.chg-signer-ro .fill-note { margin: 0 0 10px; }
.fill-card > .fill-gen { position: relative; margin: 0; padding: 12px 16px; border-radius: 0; background: transparent; }
.fill-card-sk .fill-box { display: flex; align-items: center; }
@media (max-width: 359.98px) {
  .fill-card > .fill-f { grid-template-columns: minmax(0, 1fr); padding-top: 10px; }
  .fill-card > .fill-f > * { grid-column: 1 !important; }
  .fill-card .fill-lbl { padding: 0; font: 400 13px/18px var(--font); letter-spacing: -.08px; }
  .fill-card .fl-s { display: none; }
  .fill-card .fl-f { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
  .fill-card .fill-box:not(.login *) { height: 44px; }
}

/* ══ ДОГОВОР, ПУНКТ, ПОМОЩЬ, ШТОРКИ ══ */
.doc-hero .doc-state { text-wrap: balance; }
.doc-note, .doc-stale, .doc-preview, .doc-warn, .arch-banner { border-radius: 20px; }
.lact-card { border-radius: 24px; }
.pt-row { min-height: 72px; }
/* в шторке (#2f2f2f) карточки и группы на тон светлее, иначе сливаются */
.sheet .grp, .sheet .card:not(.n1-empty), .sheet .cal { background: var(--card2); }
.sheet .grp .row .ic, .sheet .card .row .ic { background: #444; }
.sheet .presets button { background: var(--card2); }
.sheet .stats > div + div::before { background: #555; }
.sheet .row + .row::before { background: #555; }

/* ══ КОМПЬЮТЕР (от 1024) ══════════════════════════════════════════════
   Боковое меню, своя прокрутка и центр до 1440 даёт основа (owner.css).
   Здесь — раскладка содержимого: сетка карточек вместо одной колонки. */
@media (min-width: 1024px) {
  .hm-filters { padding-bottom: 16px; }
  .hm { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .hm-l, .hm-r { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  /* 3D главной карточки выходит за её верх — правая колонка встаёт вровень */
  .hm #hero { margin-top: 26px; }
  .hm-r { padding-top: 26px; }
  .hm-l > .n1-empty:first-child ~ * { margin-top: 0; }
  .hm-b { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
  .hm .hm-b > *, .hm .hm-l > *, .hm .hm-r > * { grid-column: auto; }
  .hm-b:empty { display: none; }
  .hm .hm-todo .sec, .hm .hm-pts .sec { padding-top: 8px; }
  .hm-todo [data-k="contractCard"]:not([hidden]) + [data-k="todo"]:not(:empty) { margin-top: 8px; }
  .pay-r { margin-top: 0; }
  .pay-r > section > .sec { padding-top: 8px; }
  .pf { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: start; }
  .pf-l, .pf-r { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  .pf-who { padding: 20px; background: var(--card); border-radius: 24px; }
  .pf-ava { background: var(--card2); }
  .pf-acts, .pf-in, .pf-out { margin-top: 0; }
  .pf-r .sec { padding-top: 8px; }
  .pf-pts .sec { padding-top: 8px; }
  /* «Данные для договора» на компьютере: подпись шире */
  .fill-card > .fill-f { grid-template-columns: 132px minmax(0, 1fr); }
}
@media (min-width: 1280px) {
  .hm { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}
/* наведение и фокус (мышь и клавиатура; на телефоне — нет) */
@media (hover: hover) and (pointer: fine) {
  a.ccard.plq:hover { background: #343434; }
  a.ccard.plq.attn:hover { background: #343434; }
  .grp.nav a.nav-row:hover, .grp.nav button.nav-row:hover, .pt-row:hover { background: rgba(255, 255, 255, .03); }
  .fill-card > .fill-f:hover { background: rgba(255, 255, 255, .02); }
}
a.ccard.plq:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.pf-out:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
