/* Личный кабинет клиента — тот же язык, что и CRM (app.css): серая подложка, белые карточки,
   чёрные таблетки-кнопки, лаймовый акцент. Компьютер: меню слева. Телефон: шапка + нижняя панель. */
body.portal { background: var(--bg); }
.boot { padding: 40px; }
.portal .logo { padding: 0 10px 18px; }
.portal .logo .wm span { color: var(--lime-deep); margin: 0 1px; }

/* каркас */
.p-shell { grid-template-columns: 248px minmax(0, 1fr); }
.p-side a { font-size: 14.5px; }
.p-side-foot { margin-top: auto; display: grid; gap: 10px; }
.p-side-foot .me { margin-top: 0; }
.p-side-foot .me b { font-size: 13px; line-height: 1.2; }
.p-side-foot .me .small { line-height: 1.25; }
.p-side-foot .btn.link { justify-self: start; padding-left: 12px; color: var(--ink-3); }
.p-col { min-width: 0; }
.p-top { display: none; }
.p-main { padding: 22px clamp(16px, 2.6vw, 34px) 60px; max-width: 1180px; display: grid; gap: 14px; align-content: start; }
.p-main .panel + .panel { margin-top: 0; }
.p-main .head { margin-bottom: 0; }
.p-main .head p { max-width: 720px; }
.p-main .tabs { margin-bottom: 0; }
.p-langs { flex: none; display: inline-flex; gap: 2px; background: var(--soft); border-radius: 999px; padding: 3px; justify-self: start; }
.p-langs button { border: 0; background: none; border-radius: 999px; padding: 4px 10px; font-weight: 700; font-size: 12px; cursor: pointer; color: var(--ink-3); }
.p-langs button.on { background: var(--ink); color: #fff; }
.p-tabbar { display: none; }

/* приветствие и герой */
.p-hello h1 { font-size: 30px; margin-bottom: 4px; }
.p-hero { background: var(--lime); color: var(--lime-ink); border-radius: var(--r); padding: 24px 26px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; box-shadow: var(--shadow); }
.p-hero h2 { font-size: 26px; letter-spacing: -.03em; color: var(--ink); margin: 6px 0 8px; line-height: 1.15; }
.p-hero p { margin: 0 0 16px; max-width: 560px; }
.p-eyebrow { font: 700 12px var(--sans); text-transform: uppercase; letter-spacing: .06em; opacity: .8; }
.p-ring { --p: 0; width: 120px; height: 120px; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: radial-gradient(closest-side, var(--lime) 74%, transparent 75% 100%), conic-gradient(var(--ink) calc(var(--p) * 1%), rgba(18,18,17,.12) 0); }
.p-ring b { font-size: 26px; letter-spacing: -.03em; color: var(--ink); line-height: 1; }
.p-ring span { font-size: 11px; font-weight: 700; }

/* плитки */
.p-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.p-kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.p-kpis .kpi { min-height: 112px; align-content: start; }
.p-kpis .kpi .bar { margin: 4px 0 2px; }
.p-val-sm { font-size: 20px !important; white-space: normal !important; line-height: 1.2 !important; }
.p-two { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.p-stack { display: grid; gap: 14px; align-content: start; }
.p-h { margin-bottom: 10px; }
.p-h h2 { margin: 0 !important; }

/* путь по делу */
.p-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 8), minmax(0, 1fr)); gap: 6px; counter-reset: s; }
.p-steps li { display: grid; gap: 6px; justify-items: start; align-content: start; font-size: 12.5px; font-weight: 600; color: var(--ink-4); position: relative; padding-top: 2px; }
.p-steps li i { font-style: normal; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--soft-2); color: var(--ink-3); font-size: 12px; font-weight: 800; }
.p-steps li::after { content: ''; position: absolute; left: 32px; right: 4px; top: 16px; height: 2px; background: var(--line); }
.p-steps li:last-child::after { display: none; }
.p-steps li.done { color: var(--ink-2); } .p-steps li.done i { background: var(--ink); color: var(--lime); } .p-steps li.done::after { background: var(--ink); }
.p-steps li.cur { color: var(--ink); } .p-steps li.cur i { background: var(--lime); color: var(--lime-ink); box-shadow: 0 0 0 3px var(--ink); }

.p-dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.p-dates div { display: grid; }
.p-manager .row { margin: 8px 0 4px; }
.p-manager p { margin: 4px 0 12px; }

/* документы */
.p-doc { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 10px; border-radius: 14px; transition: background .15s, box-shadow .15s; }
.p-doc + .p-doc { margin-top: 2px; }
.p-doc.s-missing, .p-doc.s-rejected, .p-doc.s-expired { background: #fff6f3; }
.p-doc.s-check { background: #fffaf0; }
.p-doc.drop { box-shadow: inset 0 0 0 2px var(--ink); background: var(--lime); }
.p-doc.compact { padding: 9px 8px; }
.p-doc-title { font-weight: 600; line-height: 1.35; }
.p-doc-meta { margin-top: 4px; gap: 6px 10px; }
.p-doc-meta:empty { display: none; }
.p-files { word-break: break-all; }
.p-note { margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: var(--red-bg); color: var(--red); font-size: 13px; }
.p-info:empty { display: none; }
.p-info { margin-top: 4px; color: var(--ink-3); }
.p-doc-act { padding-top: 1px; }
.p-group { font: 700 12px var(--sans); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin: 14px 10px 6px; }
.p-group:first-child { margin-top: 0; }
.p-empty { text-align: center; color: var(--ink-3); padding: 34px; font-size: 15px; }
.p-file { display: block; padding: 8px 0; font-weight: 600; }

/* карточки (анкеты, услуги) */
.p-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.p-card, .p-offer { display: flex; flex-direction: column; gap: 8px; }
.p-card h2, .p-offer h3 { margin: 0 !important; }
.p-card p, .p-offer p { margin: 0; }
.p-card.hot { box-shadow: inset 0 0 0 2px var(--lime-deep), var(--shadow); }
.p-card-ic { font-size: 28px; }
.p-card > .row, .p-offer-foot { margin-top: auto; padding-top: 6px; flex-wrap: nowrap; }
.p-offer-foot { flex-wrap: wrap; row-gap: 8px; }
.p-offer-foot .chip { white-space: nowrap; }
.p-offer.rec { box-shadow: inset 0 0 0 2px var(--lime-deep), var(--shadow); }
.p-ic { width: 38px; height: 38px; border-radius: 12px; background: var(--soft); display: grid; place-items: center; font-size: 19px; flex: none; }
.p-ic.big { width: 46px; height: 46px; font-size: 23px; border-radius: 14px; }
.p-offer-mini { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.p-offer-mini:first-of-type { border-top: 0; }
.p-offer-mini b { font-size: 13.5px; }
.p-sec { margin: 8px 0 -4px !important; font-size: 17px; }
.p-line { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.p-line:last-child { border-bottom: 0; }
.red { color: var(--red); }

/* модальное окно и уведомления */
.p-modal { position: fixed; inset: 0; background: rgba(18,18,17,.35); display: grid; place-items: center; padding: 16px; z-index: 50; }
.p-modal-card { width: min(520px, 100%); display: grid; gap: 12px; }
.p-modal-card h2 { margin: 0 !important; }
.p-modal-card p { margin: 0; }
.p-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 600; z-index: 60; box-shadow: var(--shadow); transition: opacity .4s; max-width: calc(100% - 32px); text-align: center; }
.p-toast.bad { background: var(--red); }
.p-toast.out { opacity: 0; }

/* вход */
.p-login { min-height: 100vh; display: grid; align-content: start; justify-items: center; padding: 18px 16px 40px; gap: 6vh; }
.p-login-top { width: min(1100px, 100%); display: flex; align-items: center; justify-content: space-between; }
.p-login-top .logo { padding: 0; }
.p-login-card { width: min(440px, 100%); display: grid; gap: 14px; text-align: center; padding: 34px 28px; justify-items: center; }
.p-login-card h1 { font-size: 26px; }
.p-login-card p { margin: 0; }
.p-lock { width: 64px; height: 64px; border-radius: 20px; background: var(--lime); display: grid; place-items: center; font-size: 30px; }
.p-login-box { display: grid; gap: 12px; justify-items: center; width: 100%; }
.p-big { min-height: 50px; padding: 12px 22px; font-size: 15px; }
.p-code { font-size: 30px; letter-spacing: 12px; text-align: center; max-width: 280px; min-height: 60px; font-weight: 800; }
.p-err { color: var(--red); margin: 0; font-weight: 600; }
.p-err:empty { display: none; }
.p-lead { color: var(--ink-2); }

/* планшет */
@media (max-width: 1100px) {
  .p-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-two { grid-template-columns: minmax(0, 1fr); }
}
/* телефон: шапка сверху, меню снизу */
@media (max-width: 860px) {
  .p-shell { display: block; }
  .p-side { display: none !important; }
  .p-top { display: flex; align-items: center; gap: 8px; padding: 12px 14px; position: sticky; top: 0; background: rgba(236,235,231,.92); backdrop-filter: blur(10px); z-index: 20; }
  .p-top .logo { padding: 0; font-size: 18px; }
  .p-top .logo b { display: none; }
  .p-main { padding: 6px 12px 96px; gap: 12px; }
  .p-hello h1 { font-size: 24px; }
  .p-hero { grid-template-columns: minmax(0, 1fr); padding: 20px; }
  .p-hero h2 { font-size: 21px; }
  .p-ring { display: none; }
  .p-kpis, .p-kpis.three { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .p-kpis .kpi { min-height: 0; padding: 12px 14px; }
  .p-kpis .kpi .val { font-size: 24px; }
  .p-steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .p-steps li { grid-template-columns: 28px 1fr; align-items: center; gap: 10px; padding: 4px 0; }
  .p-steps li::after { left: 13px; top: 32px; width: 2px; height: 12px; right: auto; }
  .p-doc { grid-template-columns: 26px minmax(0, 1fr); }
  .p-doc-act { grid-column: 2; }
  .p-tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); background: var(--ink); border-radius: 22px; padding: 6px; z-index: 30; box-shadow: 0 8px 30px rgba(0,0,0,.18); }
  .p-tabbar a { color: rgba(255,255,255,.62); text-decoration: none; display: grid; justify-items: center; gap: 1px; padding: 7px 2px; border-radius: 16px; font-size: 10.5px; font-weight: 700; position: relative; }
  .p-tabbar a i { font-style: normal; font-size: 17px; line-height: 1.1; }
  .p-tabbar a.on { background: var(--lime); color: var(--lime-ink); }
  .p-tabbar em { position: absolute; top: 2px; right: 18%; font: 700 10px/16px var(--sans); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--terra); color: #fff; text-align: center; }
  .p-cards { grid-template-columns: minmax(0, 1fr); }
  .p-code { font-size: 26px; letter-spacing: 9px; }
}
.p-contact { font-size: 18px; text-align: center; max-width: 320px; min-height: 54px; width: 100%; }
.p-login-box .btn.link { margin-top: 6px; }
