/* ==========================================================================
   Ferrari SaaS — premium layer (2026)
   Подключается ПОСЛЕ style.css и перекрывает оформление только там, где нужно:
   сайдбар, шапка и страница «Генератор справок» (класс .pf).
   Бизнес-логика и разметка других разделов не затрагиваются.
   ========================================================================== */

/* ---------- Inter Variable (self-hosted, основной шрифт сайта) ----------
   Один вариативный файл на диапазон 100–900: все начертания согласованы между собой,
   мелкий текст остаётся чётким, «жирный» не выглядит чужим. Кириллица включена. */
@font-face {
  font-family: "InterVar";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-cyrillic-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "InterVar";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "InterVar";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "InterVar";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

/* ---------- Резервный шрифт Manrope (self-hosted) ---------- */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/manrope-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/manrope-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Токены ---------- */
:root {
  --pf-bg: #f6f7f9;
  --pf-bg-soft: #fbfbfd;
  --pf-card: #ffffff;
  --pf-ink: #111827;
  --pf-ink-2: #344054;
  --pf-muted: #667085;
  --pf-muted-2: #98a2b3;
  --pf-line: #eaecf0;
  --pf-line-2: #e4e7ec;
  --pf-sidebar: #0b1220;
  --pf-sidebar-2: #0f172a;
  --pf-accent: #2563eb;
  --pf-accent-ink: #1d4ed8;
  --pf-accent-soft: #eff4ff;
  --pf-accent-ring: rgba(37, 99, 235, .16);
  --pf-ok: #059669;
  --pf-ok-soft: #ecfdf5;
  --pf-warn: #b45309;
  --pf-warn-soft: #fffbeb;
  --pf-err: #dc2626;
  --pf-err-soft: #fef2f2;
  --pf-r-sm: 10px;
  --pf-r: 14px;
  --pf-r-lg: 18px;
  --pf-shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);
  --pf-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .06);
  --pf-shadow-lg: 0 12px 40px rgba(16, 24, 40, .10);
  --pf-ease: cubic-bezier(.22, .61, .36, 1);
  --pf-spring: cubic-bezier(.34, 1.4, .64, 1);
  --pf-t-fast: 140ms;
  --pf-t: 200ms;
  --pf-t-slow: 260ms;
}

body, input, select, textarea, button {
  font-family: "InterVar", "Inter", "Manrope", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
body {
  background: var(--pf-bg); color: var(--pf-ink);
  font-size: 15px; line-height: 1.55;
  font-feature-settings: "cv05" 1, "ss03" 1;   /* аккуратные «а», «l», цифры */
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
/* Типографическая шкала: крупнее и с последовательными весами одного семейства */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.022em; }
h1 { font-size: 32px; line-height: 1.15; }
h2 { font-size: 22px; line-height: 1.25; font-weight: 680; }
h3 { font-size: 17px; line-height: 1.3; font-weight: 660; }
h4 { font-size: 15px; font-weight: 650; }
small, .muted-sm, .pf-hint, .pf-card-hint { font-size: 13.5px; }
label, .pf-label, .pf-field > label { font-size: 13px; font-weight: 520; letter-spacing: .005em; }
.pf-field input, .pf-field select { font-size: 15px; font-weight: 450; }
button, .btn, .pf-btn, .nav-item { font-size: 15px; font-weight: 560; }
.pf-card-title, .pf-step-title, .pf-bank-name { font-size: 16.5px; font-weight: 620; }
.pf-badge, .pf-chip { font-size: 12.5px; font-weight: 560; }
.pf-balance-value { font-weight: 680; }
table, .table-wrap td, .table-wrap th { font-size: 14.5px; }

/* ==========================================================================
   1. Сайдбар
   ========================================================================== */
.sidebar {
  width: 232px; flex: 0 0 232px; padding: 18px 14px 16px;
  background: var(--pf-sidebar) !important;
  background-image: none !important;
  border-right: 1px solid rgba(255, 255, 255, .06) !important;
  box-shadow: none !important;
  gap: 0;
}
.side-logo {
  display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px;
  border-bottom: none !important; font-size: 15px; font-weight: 700; letter-spacing: -.01em; color: #fff;
}
.side-logo .logo-mark { width: 26px; height: 26px; border-radius: 8px; box-shadow: none; }
.side-logo span { color: #fff; }
.side-logo small { display: block; font-size: 11px; font-weight: 500; color: rgba(255, 255, 255, .45); letter-spacing: .04em; text-transform: uppercase; }
#nav { display: flex; flex-direction: column; gap: 2px; flex: 1; margin-top: 10px; }
.pf-nav-group { margin: 14px 0 4px; padding: 0 10px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .38); }
.sidebar .nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  margin: 0; padding: 9px 11px; border-radius: var(--pf-r-sm);
  border: none; background: none; color: rgba(255, 255, 255, .72);
  font-size: 13.5px; font-weight: 550; letter-spacing: -.005em; text-align: left;
  transition: background var(--pf-t-fast) var(--pf-ease), color var(--pf-t-fast) var(--pf-ease);
}
.sidebar .nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sidebar .nav-item:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255, 255, 255, .22) inset; }
.pf-drawer-nav .nav-item:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25) inset; }
.sidebar .nav-item.active {
  background: rgba(255, 255, 255, .11); color: #fff; box-shadow: inset 2px 0 0 #60a5fa;
}
.sidebar .nav-item.active .nav-ico { color: #fff; }
.sidebar .nav-item .nav-ico { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, .55); transition: color var(--pf-t-fast) var(--pf-ease); }
.sidebar .nav-item:hover .nav-ico { color: #fff; }
.sidebar .nav-item svg { width: 18px; height: 18px; }
.sidebar .nav-item .pf-nav-count { margin-left: auto; font-size: 11.5px; font-weight: 600; color: rgba(255, 255, 255, .5); }
.build-tag {
  margin: 0 8px 10px; padding: 0; border: none; font-size: 10.5px; letter-spacing: .03em;
  color: rgba(255, 255, 255, .32) !important; order: 5;
}
.side-user {
  gap: 10px; margin: 0; padding: 12px 10px 4px; border-top: 1px solid rgba(255, 255, 255, .08) !important;
}
.user-avatar {
  width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .12) !important;
  color: #fff; font-size: 13px; font-weight: 700; box-shadow: none;
}
.user-meta strong { font-size: 13px; font-weight: 600; color: #fff; }
.user-meta span { font-size: 11.5px; color: rgba(255, 255, 255, .5); }
.side-user .icon-btn { color: rgba(255, 255, 255, .55); width: 30px; height: 30px; }
.side-user .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }

/* ---------- Сайдбар-рейл: сворачивается до иконок, разворачивается по наведению ---------- */
.app { --side-w: 232px; }
.app.side-collapsed { --side-w: 68px; }
.sidebar { width: var(--side-w) !important; flex: 0 0 var(--side-w) !important; transition: width var(--pf-t) var(--pf-ease), flex-basis var(--pf-t) var(--pf-ease); overflow: hidden; }
.app.side-collapsed .sidebar { padding-left: 10px; padding-right: 10px; }
.side-logo { position: relative; }
.side-logo-text, .sidebar .nav-item > span:not(.nav-ico):not(.pf-nav-count), .pf-nav-group, .build-tag { transition: opacity var(--pf-t-fast) var(--pf-ease); }
.app.side-collapsed .side-logo-text,
.app.side-collapsed .sidebar .nav-item > span:not(.nav-ico):not(.pf-nav-count),
.app.side-collapsed .pf-nav-group,
.app.side-collapsed .build-tag,
.app.side-collapsed .user-meta { opacity: 0; width: 0; overflow: hidden; white-space: nowrap; }
.app.side-collapsed .sidebar .nav-item { justify-content: center; padding: 10px 0; }
.app.side-collapsed .pf-nav-group { margin: 10px 0 2px; height: 1px; }
.app.side-collapsed .side-user { justify-content: center; }
.app.side-collapsed .side-pin { display: none; }
.side-pin { margin-left: auto; width: 28px; height: 28px; color: rgba(255,255,255,.45); }
.side-pin:hover { color: #fff; background: rgba(255,255,255,.1); }
.app.side-pinned .side-pin { color: #fff; background: rgba(255,255,255,.12); }
.sidebar .nav-item .nav-ico { flex-shrink: 0; }
.sidebar .nav-item { position: relative; }
.app.side-collapsed .sidebar .nav-item:hover::after {
  content: attr(data-label); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  background: #101828; color: #fff; padding: 6px 10px; border-radius: 8px; font-size: 12px; font-weight: 600;
  white-space: nowrap; z-index: 60; box-shadow: var(--pf-shadow-lg); pointer-events: none;
}

/* ---------- Мобильная панель и ящик ---------- */
.pf-mobilebar { display: none; }
.pf-drawer { position: fixed; inset: 0; z-index: 90; }
.pf-drawer[hidden] { display: none; }
.pf-drawer::before { content: ""; position: absolute; inset: 0; background: rgba(16, 24, 40, .45); backdrop-filter: blur(2px); animation: pf-fade var(--pf-t) var(--pf-ease) both; }
.pf-drawer-panel {
  position: absolute; inset: 0 auto 0 0; width: min(320px, 86vw); background: var(--pf-sidebar);
  display: flex; flex-direction: column; padding: 16px 14px; animation: pf-slide-in var(--pf-t-slow) var(--pf-ease) both;
  box-shadow: var(--pf-shadow-lg);
}
.pf-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 14px; }
.pf-drawer-head .side-logo { padding: 0; }
.pf-drawer-head .icon-btn { color: rgba(255,255,255,.7); }
.pf-drawer-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.pf-drawer-nav .nav-item { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 10px; border: none; background: none; color: rgba(255,255,255,.75); font-size: 14px; font-weight: 550; text-align: left; }
.pf-drawer-nav .nav-item.active { background: rgba(255,255,255,.12); color: #fff; }
.pf-drawer-nav .pf-nav-group { display: block; }
.pf-drawer-user { border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; display: flex; align-items: center; gap: 10px; }
.pf-drawer-user .user-avatar { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.pf-drawer-user .user-meta strong { display: block; font-size: 13px; color: #fff; }
.pf-drawer-user .user-meta span { font-size: 11.5px; color: rgba(255,255,255,.5); }
@keyframes pf-slide-in { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes pf-fade { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================================================
   2. Контент и шапка
   ========================================================================== */
.content { padding: 0; max-width: none; flex: 1; min-width: 0; }
.pf { padding: 26px 32px 120px; max-width: 1140px; margin: 0 auto; animation: pf-page-in var(--pf-t-slow) var(--pf-ease) both; }
.pf-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.pf-head h1 { font-size: 30px; line-height: 1.15; font-weight: 700; letter-spacing: -.03em; color: var(--pf-ink); }
.pf-head p { margin-top: 6px; font-size: 14px; color: var(--pf-muted); max-width: 46ch; }
.pf-balance {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
  padding: 12px 16px; border-radius: var(--pf-r); background: var(--pf-card);
  border: 1px solid var(--pf-line); box-shadow: var(--pf-shadow);
}
.pf-balance-ico {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(140deg, #eef4ff, #e7ecff); color: var(--pf-accent);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .10);
}
.pf-balance-ico svg { width: 18px; height: 18px; }
.pf-balance-value { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; color: var(--pf-ink); font-variant-numeric: tabular-nums; }
.pf-balance-label { font-size: 12px; color: var(--pf-muted); }
.pf-balance.bump { animation: pf-bump 420ms var(--pf-spring); }

/* ---------- Stepper ---------- */
.pf-stepper {
  display: flex; align-items: center; gap: 6px; margin-bottom: 20px; padding: 12px 14px;
  background: var(--pf-card); border: 1px solid var(--pf-line); border-radius: var(--pf-r); box-shadow: var(--pf-shadow-xs);
  overflow-x: auto; scrollbar-width: none;
}
.pf-stepper::-webkit-scrollbar { display: none; }
.pf-step { display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: 10px; white-space: nowrap; transition: background var(--pf-t) var(--pf-ease); }
.pf-step-num {
  width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700; background: var(--pf-bg); color: var(--pf-muted-2);
  border: 1px solid var(--pf-line); transition: all var(--pf-t) var(--pf-ease);
}
.pf-step-title { font-size: 13.5px; font-weight: 600; color: var(--pf-muted-2); transition: color var(--pf-t) var(--pf-ease); }
.pf-step.active { background: var(--pf-accent-soft); }
.pf-step.active .pf-step-num { background: var(--pf-accent); border-color: var(--pf-accent); color: #fff; box-shadow: 0 0 0 4px var(--pf-accent-ring); }
.pf-step.active .pf-step-title { color: var(--pf-accent-ink); }
.pf-step.done .pf-step-num { background: var(--pf-ok-soft); border-color: transparent; color: var(--pf-ok); }
.pf-step.done .pf-step-title { color: var(--pf-ink-2); }
.pf-step-line { flex: 1 1 auto; min-width: 12px; height: 1px; background: var(--pf-line-2); position: relative; overflow: hidden; }
.pf-step-line span { position: absolute; inset: 0; width: 0; background: var(--pf-ok); transition: width var(--pf-t-slow) var(--pf-ease); }
.pf-step-line.done span { width: 100%; }

/* ---------- Карточки-секции ---------- */
.pf-card {
  background: var(--pf-card); border: 1px solid var(--pf-line); border-radius: var(--pf-r-lg);
  box-shadow: var(--pf-shadow-xs); margin-bottom: 14px;
  transition: box-shadow var(--pf-t) var(--pf-ease), border-color var(--pf-t) var(--pf-ease);
}
.pf-card:hover { box-shadow: var(--pf-shadow); }
.pf-card.is-active { border-color: #dbe6ff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .06), var(--pf-shadow); }
.pf-card.is-done .pf-card-num { background: var(--pf-ok-soft); color: var(--pf-ok); border-color: transparent; }
.pf-card.is-done .pf-card-num svg { width: 13px; height: 13px; }
.pf-card-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 0; }
.pf-card-num {
  width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--pf-bg); border: 1px solid var(--pf-line); color: var(--pf-muted);
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.pf-card-title { font-size: 16px; font-weight: 650; letter-spacing: -.01em; color: var(--pf-ink); }
.pf-card-hint { font-size: 12.5px; color: var(--pf-muted); margin-top: 2px; }
.pf-card-head-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pf-card + .pf-card { margin-top: 14px; }
.pf-card-body { padding: 14px 20px 20px; }
.pf-card-head + .pf-card-body { border-top: 1px solid transparent; }

/* ---------- Бейджи ---------- */
.pf-badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; background: var(--pf-bg); color: var(--pf-muted); border: 1px solid var(--pf-line);
}
.pf-badge svg { width: 12px; height: 12px; }
.pf-badge.ok { background: var(--pf-ok-soft); color: var(--pf-ok); border-color: transparent; }
.pf-badge.accent { background: var(--pf-accent-soft); color: var(--pf-accent-ink); border-color: transparent; }
.pf-badge.warn { background: var(--pf-warn-soft); color: var(--pf-warn); border-color: transparent; }

/* ---------- Инфо-строки ---------- */
.pf-info { display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px; border-radius: var(--pf-r-sm); background: var(--pf-bg-soft); border: 1px solid var(--pf-line); font-size: 12.5px; color: var(--pf-ink-2); }
.pf-info svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; color: var(--pf-muted); }
.pf-info.ok svg { color: var(--pf-ok); }
.pf-info.warn svg { color: var(--pf-warn); }
.pf-info + .pf-info { margin-top: 8px; }

/* ---------- Поля ---------- */
.pf-grid { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pf-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pf-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pf-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pf-field > label, .pf-label {
  margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .01em; color: var(--pf-muted); text-transform: none;
}
.pf-control { position: relative; display: flex; align-items: center; }
.pf-control > svg { position: absolute; right: 12px; width: 16px; height: 16px; color: var(--pf-muted-2); pointer-events: none; }
.pf-field input, .pf-field select {
  width: 100%; padding: 11px 13px; font-size: 14.5px; font-weight: 500; color: var(--pf-ink);
  background: var(--pf-bg-soft); border: 1px solid var(--pf-line); border-radius: var(--pf-r-sm);
  transition: border-color var(--pf-t-fast) var(--pf-ease), box-shadow var(--pf-t-fast) var(--pf-ease), background var(--pf-t-fast) var(--pf-ease);
  appearance: none;
}
.pf-field select { padding-right: 34px; cursor: pointer; }
.pf-field input::placeholder { color: var(--pf-muted-2); font-weight: 400; }
.pf-field input:hover, .pf-field select:hover { border-color: var(--pf-line-2); background: #fff; }
.pf-field input:focus, .pf-field select:focus {
  outline: none; background: #fff; border-color: var(--pf-accent); box-shadow: 0 0 0 4px var(--pf-accent-ring);
}
.pf-field input:disabled, .pf-field select:disabled { opacity: .55; cursor: not-allowed; background: var(--pf-bg); }
.pf-field input[aria-invalid="true"] { border-color: var(--pf-err); box-shadow: 0 0 0 4px rgba(220, 38, 38, .12); }
.pf-hint { font-size: 12px; color: var(--pf-muted); }
.pf-err-text { font-size: 12px; color: var(--pf-err); display: none; align-items: center; gap: 5px; }
.pf-field.invalid .pf-err-text { display: flex; }

/* ---------- Банки ---------- */
.pf-banks { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); }
.pf-bank {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 13px 14px;
  background: var(--pf-card); border: 1px solid var(--pf-line); border-radius: var(--pf-r);
  cursor: pointer; text-align: left; color: var(--pf-ink);
  transition: border-color var(--pf-t-fast) var(--pf-ease), background var(--pf-t-fast) var(--pf-ease),
    box-shadow var(--pf-t-fast) var(--pf-ease), transform var(--pf-t-fast) var(--pf-spring);
}
.pf-bank:hover { border-color: #d0d5dd; box-shadow: var(--pf-shadow-xs); transform: translateY(-1px); }
.pf-bank:active { transform: scale(.985); }
.pf-bank:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--pf-accent-ring); border-color: var(--pf-accent); }
.pf-bank[aria-pressed="true"] { border-color: var(--pf-accent); background: var(--pf-accent-soft); box-shadow: 0 0 0 1px var(--pf-accent) inset; }
.pf-bank-mark {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand, #1e3a5f) 12%, #fff); color: var(--brand, #1e3a5f);
  font-size: 11.5px; font-weight: 750; letter-spacing: -.02em;
}
.pf-bank-name { font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.pf-bank-check {
  margin-left: auto; width: 20px; height: 20px; flex-shrink: 0; border-radius: 50%;
  border: 1.5px solid var(--pf-line-2); display: grid; place-items: center; background: #fff;
  transition: all var(--pf-t-fast) var(--pf-spring);
}
.pf-bank-check svg { width: 12px; height: 12px; opacity: 0; transform: scale(.6); transition: all var(--pf-t-fast) var(--pf-spring); color: #fff; }
.pf-bank[aria-pressed="true"] .pf-bank-check { background: var(--pf-accent); border-color: var(--pf-accent); animation: pf-pop 260ms var(--pf-spring); }
.pf-bank[aria-pressed="true"] .pf-bank-check svg { opacity: 1; transform: scale(1); }
.pf-bank[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Переключатель «без заверения» ---------- */
.pf-switch-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--pf-line); border-radius: var(--pf-r-sm); background: var(--pf-bg-soft); cursor: pointer; transition: border-color var(--pf-t-fast), background var(--pf-t-fast); }
.pf-switch-row:hover { border-color: var(--pf-line-2); background: #fff; }
.pf-switch-row:focus-within { border-color: var(--pf-accent); box-shadow: 0 0 0 4px var(--pf-accent-ring); }
.pf-switch-row { position: relative; }
.pf-switch-row input {
  position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; opacity: 0;
  pointer-events: none; border: none; box-shadow: none; background: none;
}
.pf-switch {
  width: 38px; height: 22px; border-radius: 999px; background: #d0d5dd; flex-shrink: 0; position: relative;
  transition: background var(--pf-t) var(--pf-ease);
}
.pf-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .2);
  transition: transform var(--pf-t) var(--pf-spring);
}
.pf-switch-row input:checked ~ .pf-switch { background: var(--pf-accent); }
.pf-switch-row input:checked ~ .pf-switch::after { transform: translateX(16px); }
.pf-switch-row input:focus-visible ~ .pf-switch { box-shadow: 0 0 0 4px var(--pf-accent-ring); }
.pf-switch-text strong { display: block; font-size: 13.5px; font-weight: 600; }
.pf-switch-text span { font-size: 12px; color: var(--pf-muted); }

/* ---------- Зарплата ---------- */
.pf-salary { display: grid; gap: 14px; }
.pf-salary-value { display: flex; align-items: baseline; gap: 10px; }
.pf-salary-value b { font-size: 30px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--pf-ink); }
.pf-salary-value span { font-size: 13px; color: var(--pf-muted); }
.pf-salary input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; cursor: pointer; border: none; padding: 0;
}
.pf-salary input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--pf-accent) var(--pf-fill, 0%), var(--pf-line-2) var(--pf-fill, 0%));
}
.pf-salary input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: #fff;
  border: 2px solid var(--pf-accent); box-shadow: 0 2px 6px rgba(16, 24, 40, .18);
  transition: transform var(--pf-t-fast) var(--pf-ease), box-shadow var(--pf-t-fast) var(--pf-ease);
}
.pf-salary input[type="range"]:hover::-webkit-slider-thumb { transform: scale(1.08); }
.pf-salary input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.16); box-shadow: 0 0 0 8px var(--pf-accent-ring); }
.pf-salary input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: var(--pf-line-2); }
.pf-salary input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--pf-accent); }
.pf-salary input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--pf-accent); }
.pf-salary-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-salary-presets .preset,
.pf-salary-presets button {
  padding: 6px 11px; border-radius: 999px; border: 1px solid var(--pf-line); background: var(--pf-bg-soft);
  font-size: 12.5px; font-weight: 600; color: var(--pf-ink-2); transition: all var(--pf-t-fast) var(--pf-ease);
}
.pf-salary-presets button:hover { border-color: var(--pf-accent); color: var(--pf-accent); background: #fff; }
.pf-salary-presets button.on { background: var(--pf-accent-soft); border-color: var(--pf-accent); color: var(--pf-accent-ink); }
.pf-salary-scale { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--pf-muted-2); font-variant-numeric: tabular-nums; }
.pf-salary-input { max-width: 190px; }

/* ---------- Кнопки ---------- */
.pf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 20px; border: 1px solid transparent; border-radius: var(--pf-r-sm);
  font-size: 14.5px; font-weight: 650; letter-spacing: -.005em; cursor: pointer;
  background: linear-gradient(180deg, #2f6bf0, #2563eb); color: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08), inset 0 1px 0 rgba(255, 255, 255, .16);
  transition: transform var(--pf-t-fast) var(--pf-spring), background var(--pf-t-fast) var(--pf-ease),
    box-shadow var(--pf-t-fast) var(--pf-ease), opacity var(--pf-t-fast) var(--pf-ease);
}
.pf-btn svg { width: 17px; height: 17px; }
.pf-btn:hover:not(:disabled) { background: var(--pf-accent-ink); box-shadow: 0 6px 18px rgba(37, 99, 235, .26); transform: translateY(-1px); }
.pf-btn:active:not(:disabled) { transform: translateY(0) scale(.99); }
.pf-btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--pf-accent-ring); }
.pf-btn:disabled { opacity: .6; cursor: not-allowed; box-shadow: none; }
.pf-btn.ghost { background: #fff; color: var(--pf-ink-2); border-color: var(--pf-line-2); box-shadow: none; }
.pf-btn.ghost:hover:not(:disabled) { background: var(--pf-bg-soft); color: var(--pf-ink); box-shadow: var(--pf-shadow-xs); }
.pf-btn.ok { background: var(--pf-ok); }
.pf-btn.err { background: var(--pf-err); }
.pf-btn .pf-spin {
  width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff; animation: pf-spin 700ms linear infinite;
}
.pf-btn.link { background: none; border: none; box-shadow: none; color: var(--pf-accent); padding: 4px 2px; font-weight: 600; }
.pf-btn.link:hover { background: none; color: var(--pf-accent-ink); text-decoration: underline; box-shadow: none; transform: none; }

/* ---------- Sticky action bar ---------- */
.pf-sticky {
  position: fixed; left: 232px; right: 0; bottom: 0; z-index: 40;
  padding: 12px 32px; background: rgba(255, 255, 255, .86); backdrop-filter: blur(10px) saturate(140%);
  border-top: 1px solid var(--pf-line); box-shadow: 0 -6px 24px rgba(16, 24, 40, .05);
  animation: pf-bar-in var(--pf-t-slow) var(--pf-ease) both;
}
.pf-sticky-inner { max-width: 1140px; margin: 0 auto; display: flex; align-items: center; gap: 16px; }
.pf-sticky-status { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--pf-ink-2); min-width: 0; }
.pf-sticky-status .pf-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pf-muted-2); flex-shrink: 0; }
.pf-sticky-status.ready .pf-dot { background: var(--pf-ok); box-shadow: 0 0 0 4px var(--pf-ok-soft); }
.pf-sticky-meta { display: flex; align-items: center; gap: 14px; margin-left: auto; font-size: 12.5px; color: var(--pf-muted); }
.pf-sticky-meta b { color: var(--pf-ink); font-variant-numeric: tabular-nums; }
.pf-chips { display: flex; align-items: center; gap: 6px; overflow: hidden; max-width: 320px; }
.pf-chip {
  padding: 3px 9px; border-radius: 999px; background: var(--pf-bg); border: 1px solid var(--pf-line);
  font-size: 11.5px; font-weight: 600; color: var(--pf-ink-2); white-space: nowrap;
}
.pf-chip.more { background: none; border-style: dashed; color: var(--pf-muted); }
.pf-sticky .pf-btn { padding: 11px 20px; }

/* ---------- Тултип ---------- */
.pf-tip { position: relative; display: inline-flex; align-items: center; }
.pf-tip > svg { width: 15px; height: 15px; color: var(--pf-muted-2); cursor: help; }
.pf-tip-body {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translate(-50%, 4px);
  width: max-content; max-width: 260px; padding: 9px 11px; border-radius: 10px;
  background: #101828; color: #fff; font-size: 12px; line-height: 1.45; font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity var(--pf-t-fast) var(--pf-ease), transform var(--pf-t-fast) var(--pf-ease);
  z-index: 30; box-shadow: var(--pf-shadow-lg);
}
.pf-tip:hover .pf-tip-body, .pf-tip:focus-within .pf-tip-body { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Пустые состояния ---------- */
.pf-empty { display: grid; place-items: center; gap: 10px; padding: 34px 16px; text-align: center; color: var(--pf-muted); }
.pf-empty svg { width: 26px; height: 26px; color: var(--pf-muted-2); }
.pf-empty b { font-size: 14px; color: var(--pf-ink-2); font-weight: 620; }
.pf-empty span { font-size: 12.5px; }

/* ---------- Анимации ---------- */
@keyframes pf-page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pf-bar-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pf-pop { 0% { transform: scale(.75); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes pf-bump { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes pf-spin { to { transform: rotate(360deg); } }
@keyframes pf-shake { 10%, 90% { transform: translateX(-1px); } 30%, 70% { transform: translateX(2px); } 50% { transform: translateX(-2px); } }
.pf-shake { animation: pf-shake 320ms var(--pf-ease); }

/* ==========================================================================
   3. Прочее: глобальные мелочи под новую систему
   ========================================================================== */
.toast { border-radius: 12px !important; font-weight: 550; box-shadow: var(--pf-shadow-lg) !important; }
.pf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ==========================================================================
   4. Адаптив
   ========================================================================== */
@media (max-width: 1280px) {
  .pf { padding: 22px 24px 116px; }
  .pf-sticky { padding: 12px 24px; }
  .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .sidebar { width: 208px; flex-basis: 208px; }
  .pf-sticky { left: 208px; }
  .pf-head h1 { font-size: 26px; }
  .pf-banks { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
@media (max-width: 860px) {
  .app { flex-direction: column; }
  .sidebar { display: none !important; }
  .pf-mobilebar {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px;
    background: var(--pf-sidebar); color: #fff; position: sticky; top: 0; z-index: 50;
  }
  .pf-mobilebar .icon-btn { color: #fff; }
  .pf-mobilebar-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; letter-spacing: -.01em; }
  .pf-mobilebar-brand .logo-mark { width: 22px; height: 22px; border-radius: 7px; }
  .pf-mobilebar-balance { margin-left: auto; font-size: 12px; font-weight: 600; color: rgba(255,255,255,.72); }
  .pf { padding: 18px 16px 132px; }
  .pf-head { flex-direction: column; gap: 14px; }
  .pf-head h1 { font-size: 23px; }
  .pf-balance { width: 100%; }
  .pf-grid, .pf-grid.cols-3, .pf-grid.cols-2 { grid-template-columns: 1fr; }
  .pf-sticky { left: 0; padding: 10px 14px; bottom: 0; }
  .pf-sticky-inner { flex-wrap: wrap; gap: 10px; }
  .pf-sticky-meta { order: 3; margin-left: 0; }
  .pf-sticky .pf-btn { width: 100%; order: 4; }
}
@media (max-width: 860px) {
  /* тяжёлые админ-редакторы прокручиваются внутри рабочей области, а не всей страницей */
  #view { overflow-x: auto; }
  .studio-grid { grid-template-columns: 1fr !important; }
  .studio-right { position: static !important; }
  .pf-stepper { gap: 2px; padding: 10px; }
  .pf-step:not(.active) .pf-step-title { display: none; }
  .sidebar { mask-image: linear-gradient(90deg, #000 92%, transparent); }
  .sidebar .nav-item { padding: 9px 10px; }
}
@media (max-width: 560px) {
  .pf-banks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-bank { flex-direction: column; align-items: flex-start; gap: 8px; }
  .pf-bank-check { position: absolute; top: 10px; right: 10px; }
  .pf-salary-value b { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  .pf, .pf-sticky, .pf-bank, .pf-bank-check, .pf-btn, .pf-step-num { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   5. Мелкие правки страниц админки под новый шрифт и отсутствие overflow
   ========================================================================== */
/* «Конструктор печати»: правая колонка 560px вылезала за окно на 1440 */
.studio-grid { grid-template-columns: minmax(0, 1fr) minmax(320px, 460px) !important; }
.studio-right, .studio-preview, .stamp-preview, .stamp-inline { max-width: 100%; min-width: 0; }
.studio-preview .stamp-preview { min-height: 320px; }
@media (max-width: 1200px) { .studio-grid { grid-template-columns: 1fr !important; } }
/* длинные таблицы админки не должны растягивать страницу */
#view { min-width: 0; }
.table-wrap { max-width: 100%; }

/* ==========================================================================
   6. Типографическая шкала (финальный слой — перекрывает стили компонентов)
   Один вариативный Inter: мелкий текст чёткий, жирный — то же семейство.
   ========================================================================== */
.pf-head h1 { font-size: 32px; letter-spacing: -.024em; }
.pf-head p { font-size: 15px; line-height: 1.55; }
.pf-card-title { font-size: 16.5px; font-weight: 620; letter-spacing: -.012em; }
.pf-card-hint { font-size: 13.5px; line-height: 1.5; }
.pf-card-num { font-size: 12.5px; font-weight: 620; }
.pf-step-title { font-size: 14px; font-weight: 560; }
.pf-step-num { font-size: 12px; font-weight: 620; }
.pf-field > label, .pf-label { font-size: 13px; font-weight: 520; }
.pf-field input, .pf-field select, .pf-field textarea { font-size: 15px; font-weight: 450; }
.pf-hint { font-size: 13px; }
.pf-info { font-size: 13.5px; line-height: 1.5; }
.pf-badge { font-size: 12.5px; font-weight: 560; }
.pf-chip { font-size: 12.5px; }
.pf-btn { font-size: 15px; font-weight: 580; }
.pf-btn.link { font-size: 13.5px; }
.pf-balance-value { font-size: 24px; font-weight: 680; }
.pf-balance-label { font-size: 12.5px; font-weight: 480; }
.pf-bank-name { font-size: 14.5px; font-weight: 580; }
.pf-bank-mark { font-size: 12px; font-weight: 700; }
.pf-salary-value b { font-size: 32px; font-weight: 680; }
.pf-salary-value span { font-size: 13.5px; }
.pf-salary-scale { font-size: 12.5px; }
.pf-salary-presets button, .pf-salary-presets .preset { font-size: 13px; font-weight: 560; }
.pf-tip-body { font-size: 12.5px; line-height: 1.5; }
.pf-empty b { font-size: 15px; }
.pf-empty span { font-size: 13.5px; }
.pf-sticky-status { font-size: 14px; }
.pf-sticky-meta { font-size: 13px; }
.sidebar .nav-item { font-size: 14px; font-weight: 540; }
.side-logo { font-size: 15.5px; }
.user-meta strong { font-size: 13.5px; }
.user-meta span { font-size: 12.5px; }
.pf-mobilebar-brand { font-size: 15px; }
.pf-mobilebar-balance { font-size: 12.5px; }
/* прочие разделы (таблицы, карточки, заголовки страниц) */
.page-head h2 { font-size: 22px; font-weight: 680; letter-spacing: -.018em; }
.page-head p { font-size: 14px; }
.card { font-size: 15px; }
.btn { font-size: 15px; font-weight: 560; }
.btn-sm { font-size: 13.5px; font-weight: 540; }
label { font-size: 13px; font-weight: 520; }
input, select, textarea { font-size: 15px; }
.table-wrap td, .table-wrap th { font-size: 14.5px; }
.muted, .muted-sm { font-size: 13.5px; }
.step-label, .cp-check { font-size: 13.5px; }

/* --- размеры полей: перекрываем слой style.css (там 13.5px и моноширинный номер) --- */
.pf-field input:not([type=checkbox]):not([type=range]),
.pf-field select, .pf-field textarea,
input:not([type=checkbox]):not([type=range]):not([type=color]),
select, textarea,
input[type=number] {
  font-size: 15px !important;
  font-family: "InterVar", "Inter", "Manrope", system-ui, sans-serif !important;
  font-variant-numeric: tabular-nums;
}
.pf-salary input[type="range"] { accent-color: var(--pf-accent); }
input[type=search], input[type=text], input[type=number] { letter-spacing: 0; }

/* ---------- Поля только для формы Тинькофф (паспорт и ИНН сотрудника) ---------- */
.pf-tinkoff {
  margin: 16px 0 4px;
  padding: 14px 16px 16px;
  border: 1px solid #f0d77a;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffdf2 0%, #fff9e2 100%);
}
.pf-tinkoff-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  color: #6b5300;
}
.pf-tinkoff-head svg { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 1px; }
.pf-tinkoff-head strong { display: block; font-size: 14px; color: #3f3200; }
.pf-tinkoff-head span span { display: block; font-size: 12.5px; color: #7a6a33; margin-top: 2px; }
.pf-tinkoff .pf-field label { color: #6b5300; }

/* Подсказка под банками: где заполнять паспорт и ИНН для Тинькофф */
.pf-tinkoff-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #f0d77a;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffdf2 0%, #fff9e2 100%);
  color: #6b5300;
  font-size: 13.5px;
}
.pf-tinkoff-note svg { width: 20px; height: 20px; flex: 0 0 20px; color: #b8860b; }
.pf-tinkoff-note strong { display: block; color: #3f3200; }
.pf-tinkoff-note > span { flex: 1 1 auto; }
.pf-tinkoff-note > span span { display: block; color: #7a6a33; font-size: 12.5px; }
.pf-tinkoff-note[hidden] { display: none; }
