/* Rewio cabinet — design system (tokens mirror landing/index.html). */

/* --- fonts (same files as the landing) --- */
@font-face { font-family:'Onest'; font-weight:400; font-display:swap; src:url(fonts/onest-400-latin.woff2) format('woff2'); unicode-range:U+0000-00FF,U+2000-206F,U+2122,U+2212; }
@font-face { font-family:'Onest'; font-weight:400; font-display:swap; src:url(fonts/onest-400-cyrillic.woff2) format('woff2'); unicode-range:U+0301,U+0400-045F,U+0490-0491,U+2116; }
@font-face { font-family:'Onest'; font-weight:500; font-display:swap; src:url(fonts/onest-500-latin.woff2) format('woff2'); unicode-range:U+0000-00FF,U+2000-206F,U+2122,U+2212; }
@font-face { font-family:'Onest'; font-weight:500; font-display:swap; src:url(fonts/onest-500-cyrillic.woff2) format('woff2'); unicode-range:U+0301,U+0400-045F,U+0490-0491,U+2116; }
@font-face { font-family:'Onest'; font-weight:600; font-display:swap; src:url(fonts/onest-600-latin.woff2) format('woff2'); unicode-range:U+0000-00FF,U+2000-206F,U+2122,U+2212; }
@font-face { font-family:'Onest'; font-weight:600; font-display:swap; src:url(fonts/onest-600-cyrillic.woff2) format('woff2'); unicode-range:U+0301,U+0400-045F,U+0490-0491,U+2116; }
@font-face { font-family:'Onest'; font-weight:700; font-display:swap; src:url(fonts/onest-700-latin.woff2) format('woff2'); unicode-range:U+0000-00FF,U+2000-206F,U+2122,U+2212; }
@font-face { font-family:'Onest'; font-weight:700; font-display:swap; src:url(fonts/onest-700-cyrillic.woff2) format('woff2'); unicode-range:U+0301,U+0400-045F,U+0490-0491,U+2116; }
@font-face { font-family:'Onest'; font-weight:800; font-display:swap; src:url(fonts/onest-800-latin.woff2) format('woff2'); unicode-range:U+0000-00FF,U+2000-206F,U+2122,U+2212; }
@font-face { font-family:'Onest'; font-weight:800; font-display:swap; src:url(fonts/onest-800-cyrillic.woff2) format('woff2'); unicode-range:U+0301,U+0400-045F,U+0490-0491,U+2116; }
@font-face { font-family:'JetBrains Mono'; font-weight:400; font-display:swap; src:url(fonts/jetbrainsmono-400-latin.woff2) format('woff2'); unicode-range:U+0000-00FF,U+2000-206F; }
@font-face { font-family:'JetBrains Mono'; font-weight:500; font-display:swap; src:url(fonts/jetbrainsmono-500-latin.woff2) format('woff2'); unicode-range:U+0000-00FF,U+2000-206F; }

:root{
  --accent:#2563EB; --accent-hover:#1D4ED8; --accent-light:#EFF6FF;
  --bg:#FAFAF8; --bg-card:#FFFFFF;
  --text:#1A2332; --text-secondary:#5A6B7F; --text-muted:#8A9BB0;
  --border:#E5E7EB;
  --green:#10B981; --green-light:#ECFDF5;
  --red:#EF4444; --red-light:#FEF2F2;
  --radius:12px; --radius-sm:8px; --radius-lg:16px;
  --shadow-sm:0 1px 3px rgba(16,28,48,.06);
  --shadow-md:0 4px 16px rgba(16,28,48,.08);
  --shadow-lg:0 12px 40px rgba(16,28,48,.12);
  --mono:'JetBrains Mono',ui-monospace,monospace;
  --sans:'Onest',-apple-system,BlinkMacSystemFont,sans-serif;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:var(--sans);
  color:var(--text);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  line-height:1.55;
}
a{color:var(--accent);text-decoration:none}
a:hover{color:var(--accent-hover)}

/* --- brand --- */
.brand{display:inline-flex;align-items:center;gap:10px;font-weight:700;color:var(--text)}
.brand:hover{color:var(--text)}
.brand-mark{width:32px;height:32px;border-radius:9px;display:block;flex:none}
.brand-name{font-size:19px;letter-spacing:-.02em}

/* --- auth layout: centered card --- */
.auth{
  min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;
  padding:32px 20px;
  background:
    radial-gradient(60rem 40rem at 50% -10%, #EFF3FE 0%, rgba(239,243,254,0) 60%),
    var(--bg);
}
.auth-card{
  width:100%;max-width:420px;background:var(--bg-card);
  border:1px solid var(--border);border-radius:var(--radius-lg);
  box-shadow:var(--shadow-lg);padding:40px 36px;
}
.auth-head{display:flex;flex-direction:column;align-items:center;text-align:center;margin-bottom:28px}
.auth-head .brand{margin-bottom:22px}
.auth h1{font-size:24px;font-weight:700;letter-spacing:-.02em;margin:0 0 6px}
.auth .sub{color:var(--text-secondary);font-size:14.5px;margin:0;max-width:32ch}
.auth-foot{margin-top:22px;text-align:center;color:var(--text-secondary);font-size:14px}

/* --- form --- */
.field{margin-bottom:16px}
.field label{display:block;font-size:13px;font-weight:600;color:var(--text);margin-bottom:7px}
.input{
  width:100%;height:44px;padding:0 14px;font:inherit;font-size:15px;color:var(--text);
  background:#fff;border:1px solid var(--border);border-radius:var(--radius-sm);
  transition:border-color .15s, box-shadow .15s;
}
.input::placeholder{color:var(--text-muted)}
.input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px rgba(37,99,235,.14)}
.hint{font-size:12.5px;color:var(--text-muted);margin-top:7px}
.field-error{font-size:12.5px;color:var(--red);margin-top:7px}
.input.is-invalid{border-color:var(--red)}
.input.is-invalid:focus{border-color:var(--red);box-shadow:0 0 0 3px rgba(239,68,68,.14)}

/* password field with show/hide eye */
.pw-wrap{position:relative}
.pw-wrap .input{padding-right:44px}
.pw-toggle{
  position:absolute;right:4px;top:0;height:44px;width:38px;padding:0;
  display:flex;align-items:center;justify-content:center;
  background:none;border:0;cursor:pointer;color:var(--text-muted);
}
.pw-toggle:hover{color:var(--text-secondary)}
.pw-toggle .eye-off{display:none}
.pw-toggle.is-on .eye-on{display:none}
.pw-toggle.is-on .eye-off{display:flex}

.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  height:44px;padding:0 20px;font:inherit;font-size:15px;font-weight:600;
  border:1px solid transparent;border-radius:var(--radius-sm);cursor:pointer;
  transition:background .15s, border-color .15s, color .15s, transform .05s;
}
.btn:active{transform:translateY(1px)}
.btn-primary{background:var(--accent);color:#fff}
.btn-primary:hover{background:var(--accent-hover);color:#fff}
.btn-block{width:100%}
.btn-ghost{background:transparent;color:var(--text-secondary);border-color:var(--border)}
.btn-ghost:hover{background:#F5F6F8;color:var(--text)}
.btn-danger{background:transparent;color:var(--red);border-color:transparent}
.btn-danger:hover{background:var(--red-light)}
.btn-sm{height:34px;padding:0 12px;font-size:13.5px}

/* success / notice states */
.notice{display:flex;flex-direction:column;align-items:center;text-align:center;padding:8px 0}
.notice .badge-ico{width:56px;height:56px;border-radius:50%;display:grid;place-items:center;margin-bottom:18px;background:var(--green-light);color:var(--green)}
.notice h2{font-size:20px;font-weight:700;margin:0 0 8px}
.notice p{color:var(--text-secondary);font-size:14.5px;margin:0 0 6px;max-width:34ch}
.hidden{display:none!important}

/* --- app shell (keys page) --- */
.topbar{
  height:64px;background:rgba(255,255,255,.85);backdrop-filter:saturate(180%) blur(12px);
  border-bottom:1px solid var(--border);position:sticky;top:0;z-index:20;
}
.topbar-in{max-width:920px;margin:0 auto;height:100%;padding:0 24px;display:flex;align-items:center;justify-content:space-between}
.user{display:flex;align-items:center;gap:14px;font-size:14px;color:var(--text-secondary)}
.user .email{font-weight:500;color:var(--text)}

.wrap{max-width:920px;margin:0 auto;padding:26px 24px 80px}
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:6px}
.page-head h1{font-size:26px;font-weight:700;letter-spacing:-.02em;margin:0}
.page-sub{color:var(--text-secondary);font-size:14.5px;margin:0 0 26px}
.page-sub b{color:var(--text);font-weight:600}

/* docs call-to-action */
.docs-cta{display:flex;align-items:center;gap:14px;background:var(--accent-light);border:1px solid #D9E4FD;border-radius:var(--radius);padding:13px 16px;margin-top:12px}
.docs-cta .ico{flex:none;width:34px;height:34px;border-radius:9px;background:#fff;display:grid;place-items:center;color:var(--accent)}
.docs-cta .txt{flex:1;font-size:14px;color:var(--text);line-height:1.45}
.docs-cta .btn{flex:none}
/* amber twin of the strip — same geometry, warmer palette */
.ai-cta{background:var(--orange-light,#FFFBEB);border-color:#FDE68A}
.ai-cta .ico{color:#D97706}
.btn-amber{background:#D97706;color:#fff}
.btn-amber:hover{background:#B45309;color:#fff}
@media(max-width:600px){.docs-cta{flex-wrap:wrap}.docs-cta .txt{flex:1 1 100%;order:2}.docs-cta .ico{order:1}.docs-cta .btn{order:3;width:100%}}

/* page footer — report a problem */
.page-foot{margin-top:20px;text-align:center;font-size:13.5px;color:var(--text-muted)}
.page-foot .link-btn{margin-left:10px}
.link-btn{background:none;border:none;font:inherit;font-weight:500;color:var(--text-secondary);cursor:pointer;text-decoration:underline;text-underline-offset:2px;text-decoration-color:var(--border);padding:0}
.link-btn:hover{color:var(--accent);text-decoration-color:var(--accent)}
textarea.input{height:auto;min-height:120px;padding:12px 14px;resize:vertical;line-height:1.5}

/* --- key cards --- */
.keys{display:flex;flex-direction:column;gap:12px}
.key{
  background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);
  box-shadow:var(--shadow-sm);padding:16px 20px;display:flex;flex-direction:column;gap:10px;
  transition:box-shadow .15s, border-color .15s;
}
.key:hover{box-shadow:var(--shadow-md)}
.key.revoked{opacity:.6}
.key-row{display:flex;align-items:center;gap:12px}
.key-row .secret{flex:1;margin-top:0}
.key-main{min-width:0;flex:1}
.key-name{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:15px;margin-bottom:2px}
.key-name .kn{font-weight:600}
.key-date{font-size:13px;color:var(--text-muted);font-weight:400}
.key-prefix{font-family:var(--mono);font-size:13px;color:var(--text-secondary);background:#F6F7F9;border:1px solid var(--border);border-radius:6px;padding:2px 8px}
.key-actions{display:flex;gap:8px;flex:none}

.badge{font-size:11.5px;font-weight:600;padding:3px 9px;border-radius:100px;letter-spacing:.01em}
.badge-scope{background:var(--accent-light);color:var(--accent)}
.badge-ro{background:#F5F3FF;color:var(--purple,#8B5CF6)}
.badge-active{background:var(--green-light);color:var(--green)}
.badge-revoked{background:#F3F4F6;color:var(--text-muted)}

.empty{text-align:center;padding:56px 20px;color:var(--text-secondary)}
.empty svg{color:var(--text-muted);margin-bottom:14px}

/* key field — light, laconic; holds the masked/revealed key + copy */
.secret{
  display:flex;align-items:center;gap:8px;margin-top:12px;min-width:0;
  background:#F5F6F8;border:1px solid var(--border);border-radius:var(--radius-sm);
  padding:6px 6px 6px 14px;
}
/* key value: flex row so only the middle shrinks — revealed truncates with a
   middle ellipsis, masked simply clips dots. Monospace => mask width == key
   width, so the field never overflows (no horizontal scrollbar). */
.secret code,.keycode{font-family:var(--mono);font-size:13.5px;color:var(--text);flex:1;min-width:0;display:flex;align-items:center;letter-spacing:.02em;line-height:1.5}
.keycode .k-lead,.keycode .k-tail{flex:none;white-space:nowrap}
.keycode .k-mid{flex:0 1 auto;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.keycode .k-mid.dots{color:var(--text-muted);text-overflow:clip}
.key-row .secret,.secret.interactive{cursor:pointer;transition:border-color .15s}
.key-row .secret code,.secret.interactive code{user-select:none}
.key-row .secret:hover,.secret.interactive:hover{border-color:#C9D6EF}
.key-row .secret:hover code,.secret.interactive:hover code{color:var(--accent)}
.btn-copy{background:#fff;border-color:var(--border);color:var(--text-secondary);flex:none;min-width:118px}
.btn-copy .lbl{display:inline-block}
.btn-copy:hover{background:#fff;border-color:var(--accent);color:var(--accent)}
.btn-danger-solid{background:var(--red);color:#fff}
.btn-danger-solid:hover{background:#DC2626}

/* --- modal --- */
/* flex (not grid place-items:center) so the modal fills the available width up
   to max-width instead of shrinking to its content — otherwise a nowrap key
   would blow the modal past the viewport and the ellipsis would never trigger. */
/* overflow-y:auto + modal margin:auto => the sheet centres when it fits and scrolls
   inside the overlay when it's taller than the viewport (mobile). Background stays
   locked via body.modal-open. */
.overlay{position:fixed;inset:0;background:rgba(15,25,35,.45);backdrop-filter:blur(2px);display:flex;align-items:center;justify-content:center;padding:20px;z-index:50;overflow-y:auto}
.modal{width:100%;max-width:440px;margin:auto;background:#fff;border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);padding:28px;transition:max-width .22s ease}
.modal.wide{max-width:640px}
/* create flow keeps one height — only the width animates */
#create-modal{min-height:366px;display:flex;flex-direction:column;justify-content:center}
.modal h3{font-size:19px;font-weight:700;margin:0 0 6px}
.modal .sub{color:var(--text-secondary);font-size:14px;margin:0 0 20px}
.modal-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:22px}
.seg{display:flex;gap:8px}
.seg input{position:absolute;opacity:0;pointer-events:none}
.seg label{flex:1;text-align:center;padding:11px;border:1px solid var(--border);border-radius:var(--radius-sm);font-size:13.5px;font-weight:600;color:var(--text-secondary);cursor:pointer;transition:.15s}
.seg input:checked+label{border-color:var(--accent);background:var(--accent-light);color:var(--accent)}
.warn{display:flex;gap:9px;background:var(--orange-light,#FFFBEB);border:1px solid #FDE68A;color:#92620A;font-size:13px;border-radius:var(--radius-sm);padding:10px 12px;margin-top:16px}

/* toast */
.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%) translateY(20px);opacity:0;background:var(--text);color:#fff;font-size:13.5px;font-weight:500;padding:11px 18px;border-radius:100px;box-shadow:var(--shadow-lg);transition:.25s;z-index:60;pointer-events:none}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* Жёлтая полоса через всю ширину — предупреждение о режиме страницы, а не
   украшение. Сейчас её не носит ни одна страница: плашка превью уехала вместе
   с промоушеном. Оставлена ради следующего её носителя — просмотра кабинета
   глазами клиента, где сказать «это чужой аккаунт» обязательно. */
.stub-flag{text-align:center;font-size:12.5px;font-weight:500;color:#92620A;background:#FEF3C7;border-bottom:1px solid #FDE68A;padding:6px 12px}
.stub-flag b{font-weight:700}

/* --- tariff info line — plain, muted; own row above the page head, centered in the
   gap between the topbar and the "Create key" button. The button stays on the
   heading level (page-head is a normal row). --- */
.plan-line-row{display:flex;justify-content:flex-end;margin-bottom:20px}
.plan-line{
  border:0;background:none;font:inherit;font-size:13px;line-height:1.4;
  color:var(--text-muted);cursor:pointer;padding:0;text-align:right;
  transition:color .15s;
}
.plan-line:hover{color:var(--text-secondary)}
.plan-line #pb-badge{font-weight:600;color:var(--text-secondary)}

/* --- subscription panel (modal sheet) --- */
/* Шире остальных модалок: в лист тарифа встают три карточки пакетов рядом, и
   на 560px они выходили узкими колонками, где каждая плашка площадки — своя
   строка. На 800px карточка получает 240px, а ряду из трёх есть чем дышать. */
.plan-sheet{max-width:800px;position:relative;padding:30px 30px 26px}
/* «Изменить количество объектов» — тот же лист без карточек и периодов;
   на 800px он выглядит пустым, поэтому сужается. */
.plan-sheet.narrow{max-width:560px}
.sheet-close{position:absolute;top:16px;right:16px;width:34px;height:34px;display:grid;place-items:center;border:0;background:none;color:var(--text-muted);cursor:pointer;border-radius:8px}
.sheet-close:hover{background:#F5F6F8;color:var(--text)}

.billing-toggle{position:relative;display:flex;width:max-content;gap:4px;background:#F1F3F6;border-radius:100px;padding:4px;margin:6px auto 22px}
/* touch-action+tap-highlight: иначе на тач-экране первый тап уходит в эмуляцию
   :hover и кнопка «не нажимается с первого раза», плюс мигает серым */
.bt-opt{position:relative;z-index:1;display:inline-flex;align-items:center;gap:6px;border:0;background:none;font:inherit;font-size:13.5px;font-weight:600;color:var(--text-secondary);padding:8px 16px;border-radius:100px;cursor:pointer;transition:color .2s;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
/* фон активного периода — едущая подложка (позицию ставит moveBillingThumb) */
.bt-opt.active{color:var(--text)}
.bt-thumb{position:absolute;top:4px;bottom:4px;left:0;width:0;border-radius:100px;background:#fff;box-shadow:var(--shadow-sm);pointer-events:none;transition:transform .28s cubic-bezier(.4,0,.2,1),width .28s cubic-bezier(.4,0,.2,1)}
.billing-toggle.no-anim .bt-thumb{transition:none}
@media(prefers-reduced-motion:reduce){.bt-thumb{transition:none}}
.bt-save{font-size:11px;font-weight:700;color:var(--green)}

.pm-readout{display:flex;justify-content:center;gap:30px;text-align:center;margin-bottom:14px}
.pm-rb{width:132px}
.pm-rb:last-child{width:172px}
.pm-rl{font-size:12.5px;color:var(--text-secondary);margin-bottom:6px;min-height:2.6em;line-height:1.3;display:flex;align-items:flex-end;justify-content:center}
.pm-rv{font-family:var(--mono);font-size:26px;font-weight:800;color:var(--text);line-height:1.1;white-space:nowrap}
.pm-rv.accent{color:var(--accent)}
/* monthly figure: the middle grey. Since the green line carries the whole
   period, the per-month price is context, not the answer — but it is still a
   price, so it keeps the size and steps back only in colour. */
.pm-rv.muted{color:var(--text-secondary)}
/* struck old (undiscounted) price under the current one — mirror of landing */
.pm-was{min-height:20px;margin-top:4px;font-family:var(--mono);font-size:15px;color:var(--text-secondary);white-space:nowrap;position:relative;display:inline-block}
.pm-was:not(:empty)::after{content:"";position:absolute;left:-3px;right:-3px;top:50%;height:2px;background:var(--red);transform:rotate(8deg)}

.pm-slider{width:100%;margin:4px 0 6px;accent-color:var(--accent);cursor:pointer;-webkit-appearance:none;appearance:none;height:6px;border-radius:999px;background:var(--border);outline:none}
.pm-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:22px;height:22px;border-radius:50%;background:var(--accent);border:3px solid #fff;box-shadow:var(--shadow-sm);cursor:pointer}
.pm-slider::-moz-range-thumb{width:22px;height:22px;border-radius:50%;background:var(--accent);border:3px solid #fff;box-shadow:var(--shadow-sm);cursor:pointer}
/* подписи ступеней под ползунком — как на лендинге; позиции ставит layoutTicks() */
.pm-ticks{position:relative;height:16px;margin-bottom:2px;font-family:var(--mono);font-size:11px;color:var(--text-secondary)}
.pm-ticks span{position:absolute;left:0;transform:translateX(-50%);white-space:nowrap;cursor:pointer;transition:color .2s}
.pm-ticks span.active{color:var(--accent);font-weight:600}
/* место под строку резервируем всегда (на «Месяц» экономии нет) */
.pm-save{text-align:center;font-size:13px;font-weight:600;color:var(--green);margin:9px 0 0;min-height:20px}
.pm-save[hidden]{display:none}

/* Количество объектов — поле ввода на месте показателя, теми же цифрами того
   же размера, что и две цены рядом. Пунктирная рамка отличает его от них: это
   единственное в ряду, что меняется руками. Стрелки браузера убраны — они
   уводят на единицу там, где шаг задаёт ползунок. */
.pm-count{width:100%;height:34px;margin-top:10px;padding:0 4px;text-align:center;background:var(--bg);
  border:1px dashed var(--border);border-radius:8px;outline:none;
  appearance:textfield;-moz-appearance:textfield;transition:border-color .15s,box-shadow .15s}
.pm-count::-webkit-outer-spin-button,
.pm-count::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.pm-count:hover{border-color:var(--text-secondary)}
.pm-count:focus{border-style:solid;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-light)}

/* paywall summary — tariff+objects, then monthly price on the next line
   (.notice p is more specific, so qualify with .notice to win) */
.notice .pm-pay-plan{font-size:15px;font-weight:600;color:var(--text);margin:0 0 2px}
.notice .pm-pay-price{font-family:var(--mono);font-size:15px;color:var(--accent);margin:0 0 12px}
.notice .pm-pay-price:empty{display:none}

.tariff-cards{display:flex;gap:14px;margin:22px 0 6px}
.tariff-card{flex:1;text-align:left;padding:18px 18px 16px;background:var(--bg);border:1.5px solid var(--border);border-radius:14px;cursor:pointer;transition:border-color .2s,background .2s,box-shadow .2s}
@media(hover:hover){.tariff-card:hover{border-color:var(--text-secondary)}}
.tariff-card{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.tariff-card.active{border-color:var(--accent);background:var(--accent-light);box-shadow:var(--shadow-sm)}
.tariff-card:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.tc-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.tc-name{font-size:17px;font-weight:700;color:var(--text)}
.tariff-card.active .tc-name{color:var(--accent)}
.tc-radio{width:20px;height:20px;border-radius:50%;border:2px solid var(--border);flex-shrink:0;position:relative}
.tariff-card.active .tc-radio{border-color:var(--accent)}
.tariff-card.active .tc-radio::after{content:"";position:absolute;inset:3px;border-radius:50%;background:var(--accent)}
.tc-desc{font-size:14.5px;color:var(--text-secondary);line-height:1.5;margin:0}
/* Наполнение карточек — как на главной: у пакета с явным списком площадки
   стоят плашками (их состав и есть весь ответ), у пакета «все площадки»
   плашек было бы двадцать, и там строка текста. */
.tc-pills{display:flex;flex-wrap:wrap;gap:7px}
.platform-tag{font-size:13px;font-weight:500;color:var(--text-secondary);background:#fff;
  border:1px solid var(--border);border-radius:100px;padding:5px 12px;white-space:nowrap}
.tariff-card.active .platform-tag{border-color:#D9E4FD}
/* «Включает добавление новых площадок» — это ПРЕИМУЩЕСТВО пакета, а не сноска
   к нему: тем же тёмным и полужирным, что на главной. Серым оно читалось как
   мелкий шрифт договора. */
.tc-desc-new{display:block;margin-top:8px;color:var(--text);font-weight:500}

.pm-contacts{display:flex;flex-direction:column;gap:10px;margin:4px 0 6px}
/* Строка «связаться по почте» под кнопками — та же подача, что и .page-foot. */
.pm-foot{margin:2px 0 8px;text-align:center;font-size:13.5px;color:var(--text-muted)}

/* На телефоне одиннадцати подписям в одну строку места нет — раскладываем
   через одну в два ряда, как на лендинге. Прежде «1 000» пряталась целиком:
   ступень была, а имени у неё не было, пока на неё не встанешь. */
@media(max-width:560px){
  .pm-ticks{height:30px}
  .pm-ticks span:nth-child(even){top:14px}
}

/* lock background scroll while the subscription panel is open (mobile) */
body.modal-open{overflow:hidden}

@media(max-width:560px){
  /* topbar is cramped: keep the two actions, drop the email so it doesn't crowd the logo */
  .user .email{display:none}
  /* keep title + create button on one row (beat the generic .page-head column
     stack that comes later in the file — need higher specificity) */
  .wrap .page-head-keys{flex-direction:row;align-items:center;gap:12px}
  .wrap .page-head-keys h1{flex:1;min-width:0;font-size:22px}
  .wrap .page-head-keys #btn-new{flex:none;padding:0 14px}
  .tariff-cards{flex-direction:column}
  .pm-readout{gap:14px}
  .pm-rb,.pm-rb:last-child{width:auto;flex:1}
  .pm-rv{font-size:20px}
  .pm-was{font-size:13px}
  .pm-count{height:30px;font-size:20px}
  .pm-ticks{font-size:10px}
  /* шкала выходит на поля модалки — на телефоне длина шкалы важнее полей */
  .pm-slider-wrap{margin-left:-18px;margin-right:-18px}
  /* Кнопки листа в столбик: «Доплатить и перейти» рядом с «Закрыть» помещается
     впритык, а на узких телефонах уже не помещается вовсе. Обратный порядок —
     главная кнопка сверху, под большим пальцем. */
  .modal-actions{flex-direction:column-reverse;gap:8px}
  .modal-actions .btn{width:100%}
}

@media(max-width:560px){
  .auth-card{padding:32px 22px}
  .key{flex-direction:column;align-items:stretch;gap:14px}
  .key-actions{justify-content:flex-end}
  .page-head{flex-direction:column;align-items:stretch}
  /* key stays on one line (middle-ellipsis); the revoke button wraps below it */
  .key-row{flex-wrap:wrap;row-gap:10px}
  .key-row .secret{flex:1 1 100%}
  .key-row .btn-danger{margin-left:auto}
}

/* ============================================================================
   PROFILE PAGE (profile.html) — «Профиль · Подписка · Поддержка».
   Lived inline while the page was a preview; moved here on promotion, as-is
   except for two rules that did not survive the move:
     · the dev state switcher (.dev-bar) died with the mock;
     · `.topbar{position:relative}` is gone — the header is `position:sticky`,
       which is already a positioned ancestor for the collapsed nav panel, and
       re-declaring it as `relative` would have unstuck the header on EVERY page.
   ========================================================================== */

/* --- header navigation ----------------------------------------------------
   Одно меню на весь кабинет, на каждой странице: оно отвечает «где я и куда
   ещё можно», и страница без него заставляет клиента искать выход назад.
   Пункт — кнопка с рамкой, тот же вид, что у остальных кнопок кабинета
   (`.btn-ghost.btn-sm`); активный подсвечен акцентом.
   Ниже 860px пять рамок в строку уже не помещаются — сворачивается в бургер. */
.nav{display:flex;align-items:center;gap:8px}
.nav-item{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;height:34px;padding:0 12px;
  font:inherit;font-size:13.5px;font-weight:600;color:var(--text-secondary);
  background:transparent;border:1px solid var(--border);border-radius:var(--radius-sm);
  cursor:pointer;white-space:nowrap;text-decoration:none;
  transition:background .15s,border-color .15s,color .15s;
  -webkit-tap-highlight-color:transparent;
}
/* иконка тусклее подписи: она помогает найти пункт глазами, а не спорит с ним */
.nav-item svg{flex:none;opacity:.75}
.nav-item.active svg{opacity:1}
.nav-item:hover{background:#F5F6F8;color:var(--text)}
.nav-item.active{color:var(--accent);background:var(--accent-light);border-color:#D9E4FD}
/* not --text-muted: at that weight it reads as a disabled item, not a link */
.nav-item.logout{color:var(--text-secondary)}
.nav-item.logout:hover{color:var(--red);background:var(--red-light);border-color:#FECACA}

.burger{display:none;width:38px;height:38px;border:1px solid var(--border);background:#fff;border-radius:10px;
  cursor:pointer;color:var(--text);align-items:center;justify-content:center;-webkit-tap-highlight-color:transparent}
.burger:hover{border-color:#C9D6EF}
.burger .bx{display:none}
.burger.open .bl{display:none}
.burger.open .bx{display:block}

@media(max-width:800px){
  .burger{display:flex}
  .nav{position:absolute;top:100%;left:0;right:0;display:none;flex-direction:column;align-items:stretch;gap:6px;
    background:#fff;border-bottom:1px solid var(--border);box-shadow:var(--shadow-md);padding:10px;z-index:40}
  .nav.open{display:flex}
  .nav-item{height:44px;padding:0 14px;font-size:15px;border-radius:10px;justify-content:flex-start}
}

/* --- cards ---------------------------------------------------------------- */
.card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);
  box-shadow:var(--shadow-sm);padding:20px 22px;margin-bottom:14px}
.card-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:4px}
.card-title{font-size:15px;font-weight:700;margin:0}
.card-sub{color:var(--text-secondary);font-size:13.5px;margin:0 0 16px;line-height:1.5}
.card-sub:last-child{margin-bottom:0}

/* email headline — the "whose cabinet is this" line that left the topbar */
.me{display:flex;align-items:center;gap:14px;margin-bottom:2px}
.me-ava{width:46px;height:46px;flex:none;border-radius:50%;background:var(--accent-light);color:var(--accent);
  display:grid;place-items:center;font-size:19px;font-weight:700;text-transform:uppercase}
.me-mail{font-size:19px;font-weight:700;letter-spacing:-.01em;word-break:break-all;line-height:1.25}
.me-note{font-size:13px;color:var(--text-muted);margin-top:2px}

/* key–value rows */
.kv{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 0;border-top:1px solid var(--border)}
.kv:first-of-type{border-top:0}
.kv-k{font-size:13.5px;color:var(--text-secondary);flex:none}
.kv-v{font-size:14px;font-weight:600;text-align:right;word-break:break-word}
.kv-v.mono{font-family:var(--mono);font-weight:500;font-size:13.5px}
/* NB: not `.empty` — style.css already owns that name (the "no keys yet" block,
   padding:56px), and reusing it here inflated every blank row to 160px. */
.kv-v.is-blank{color:var(--text-muted);font-weight:500}
.kv-actions{display:flex;gap:8px;flex:none}
/* У одной строки есть кнопка, у остальных нет — при `space-between` её значение
   стоит посреди строки, а соседние прижаты к правому краю, и колонка значений
   выглядит рваной. Сетка резервирует место под кнопку в каждой строке, и
   значения встают в одну колонку. Класс висит на ВСЕХ трёх карточках профиля
   («Вход», «Реквизиты», «Об аккаунте»): колонка значений одна на страницу, а не
   своя в каждой карточке — иначе соседние карточки разъезжаются между собой.

   Значение стоит ПО ЦЕНТРУ своей колонки, а не по правому краю: прижатое
   вправо, оно читалось как приклеенное к кнопке, а в строках без кнопки — к
   краю карточки.

   Ширина колонки подписей фиксированная, и это обязательное условие центровки:
   каждая строка — своя сетка, и при `auto` центр колонки значений считался бы
   от длины ЭТОЙ подписи. «Организация» и «Куда присылать счёт» разъехались бы
   на полсотни пикселей — то есть центрирование дало бы ту же рваную колонку,
   от которой сетка здесь и заведена. */
.kv-cols .kv{display:grid;grid-template-columns:180px 1fr minmax(96px,auto);
  column-gap:16px;align-items:center}
.kv-cols .kv-v{text-align:center}
.kv-cols .kv-actions{grid-column:3;justify-content:flex-end}

/* --- subscription hero ---------------------------------------------------- */
/* title sits on the optical middle of the two-line price block on the right */
.plan-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}
.plan-name{font-size:22px;font-weight:700;letter-spacing:-.02em;margin:0 0 4px}
.plan-meta{font-size:14px;color:var(--text-secondary);margin:0}
.plan-price{text-align:right;flex:none}
.plan-price .pp-main{font-family:var(--mono);font-size:22px;font-weight:800;line-height:1.15}
/* period rides on the same line as the sum, in the page's usual muted note style */
.plan-price .pp-per{font-family:var(--sans);font-size:13px;font-weight:500;color:var(--text-secondary);margin-left:7px}
.plan-price .pp-sub{font-size:12.5px;color:var(--text-secondary);margin-top:3px}
.plan-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:20px}
.pg-cell{background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-sm);padding:12px 14px}
.pg-l{font-size:12px;color:var(--text-secondary);margin-bottom:5px}
.pg-v{font-size:15px;font-weight:700}
.pg-v small{font-weight:500;color:var(--text-secondary);font-size:13px}
.plan-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}

/* alert strips: expiry, excess objects, cancelled renewal */
.strip{display:flex;align-items:flex-start;gap:11px;border-radius:var(--radius-sm);padding:12px 14px;
  font-size:13.5px;line-height:1.5;margin-bottom:14px}
.strip svg{flex:none;margin-top:1px}
.strip-warn{background:#FFFBEB;border:1px solid #FDE68A;color:#92620A}
.strip-danger{background:var(--red-light);border:1px solid #FECACA;color:#B42318}
.strip-info{background:var(--accent-light);border:1px solid #D9E4FD;color:#1E40AF}
.strip b{font-weight:700}
.strip .btn{margin-left:auto;flex:none}

/* platform chips — одна строка, «ещё N» в её же конце (сколько влезло, считает
   fitSources(): ширины чипов зависят от названий и заранее не известны) */
.chips{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-top:2px}
.chip{font-size:12.5px;font-weight:500;color:var(--text-secondary);background:var(--bg);
  border:1px solid var(--border);border-radius:100px;padding:4px 11px;white-space:nowrap}
.chips-more{font-size:12.5px;color:var(--accent);background:none;border:0;font:inherit;cursor:pointer;
  font-weight:600;padding:4px 4px;white-space:nowrap}
.chips-more:hover{color:var(--accent-hover)}

/* --- plan sheet ----------------------------------------------------------- */
/* what today's payment actually is, right above the button that takes it */
.pm-charge{display:flex;align-items:baseline;justify-content:center;gap:8px;flex-wrap:wrap;
  margin:18px 0 0;padding:12px;background:var(--bg);border:1px solid var(--border);
  border-radius:var(--radius-sm);text-align:center}
.pm-charge-l{font-size:13px;color:var(--text-secondary)}
.pm-charge-v{font-family:var(--mono);font-size:17px;font-weight:800;color:var(--text)}
/* «за 6 месяцев» рядом с суммой — обычным весом: жирным набрана цена, а срок
   при ней только подпись. */
.pm-charge-per{font-weight:400}
/* две строки: сегодняшний платёж и следующий. Слитые в одну они читаются
   как одна сумма с двумя датами, поэтому строка вторая, а не «·» третье */
.pm-charge-n{font-size:12.5px;color:var(--text-muted);flex-basis:100%;line-height:1.55}
/* Строка-подсказка про свой набор площадок — под рядом карточек. */
.pm-plus-hint{margin:10px 0 0;font-size:13px;line-height:1.55;color:var(--text-muted);text-align:center}
/* И ссылка на почту, и кнопка, раскрывающая третий тариф, набраны одинаково:
   тёмным с подчёркиванием. Синий здесь читался как единственное, на что можно
   нажать, хотя нажимаемых мест два и вес у них одинаковый. */
.pm-plus-hint a,
.pm-plus-hint .linklike{color:var(--text-secondary);text-decoration:underline;text-underline-offset:2px}
.pm-plus-hint a:hover,
.pm-plus-hint .linklike:hover{color:var(--accent)}
/* Кнопка, которая выглядит ссылкой: нажатие меняет экран, а не ведёт по
   адресу, поэтому это button — с клавиатуры и скринридером она и должна
   читаться кнопкой. */
.linklike{background:none;border:0;padding:0;font:inherit;color:var(--accent);cursor:pointer;
  text-decoration:underline;text-underline-offset:2px}
.linklike:hover{color:var(--accent-hover,var(--accent));text-decoration-thickness:2px}
.linklike:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:3px}

/* While the sheet waits for the server's price the numbers on screen are the
   previous answer, so they are dimmed and the pay button is off: the browser
   quotes nothing of its own, not even for the half-second in between. */
#pm-choose.is-waiting .pm-readout,
#pm-choose.is-waiting .pm-charge,
#pm-choose.is-waiting .pm-save{opacity:.5;transition:opacity .12s}
/* the one thing that can stop a downgrade: more objects than the new tariff holds */
.pm-block{display:flex;gap:9px;margin:12px 0 0;padding:11px 13px;border-radius:var(--radius-sm);
  background:#FFFBEB;border:1px solid #FDE68A;color:#92620A;font-size:13px;line-height:1.5}

/* --- support -------------------------------------------------------------- */
/* cards whose heading is followed straight by content (no .card-sub) need the
   breathing room the subtitle used to provide */
.contact-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:16px 0 6px}
#sp-form{margin-top:16px}
.contact{display:flex;align-items:center;gap:11px;padding:14px;background:var(--bg);border:1px solid var(--border);
  border-radius:var(--radius-sm);transition:.18s}
.contact:hover{border-color:#C9D6EF;background:#fff;box-shadow:var(--shadow-sm)}
.contact .ci{width:34px;height:34px;flex:none;border-radius:9px;display:grid;place-items:center;
  background:#fff;border:1px solid var(--border);color:var(--accent)}
.contact .cl{font-size:14px;font-weight:600;color:var(--text);line-height:1.3}
.contact .cs{font-size:12.5px;color:var(--text-muted)}

/* --- misc ----------------------------------------------------------------- */
.inline-hint{font-size:12.5px;color:var(--text-muted);margin-top:7px}
.inline-hint.ok{color:var(--green)}
.inline-hint.err{color:var(--red)}
.foot-links{display:flex;gap:18px;flex-wrap:wrap;justify-content:center;margin-top:22px;
  font-size:13px;color:var(--text-muted)}
.foot-links a{color:var(--text-secondary);text-decoration:underline;text-underline-offset:2px;
  text-decoration-color:var(--border)}

@media(max-width:640px){
  .plan-grid{grid-template-columns:1fr 1fr}
  .contact-grid{grid-template-columns:1fr}
  .kv{flex-direction:column;align-items:flex-start;gap:8px}
  /* Колонок на узком экране нет — строка складывается в столбик, как везде.
     `align-items` переопределяется вместе с `display`: правило `.kv-cols .kv`
     выше специфичнее, чем `.kv` в этом медиа-запросе, и без этой строки
     карточки с колонками оставались отцентрованными, а соседние — нет. */
  .kv-cols .kv{display:flex;align-items:flex-start}
  .kv-v{text-align:left}
  .plan-price{text-align:left}
}

/* Действие внутри строки-плашки: «Оплатить» и «Отменить счёт» стоят рядом и
   ведут в разные стороны, поэтому у них своя рамка — лёгкая, чтобы не спорить
   по весу с настоящими кнопками листа. */
.strip-act{
  display:inline-block; padding:3px 10px; border:1px solid currentColor;
  border-radius:6px; font-size:13px; line-height:1.4; text-decoration:none;
}
.strip-act:hover{ text-decoration:none; opacity:.75; }
