/* ═══ Досье · стили слоя сайта (аккаунты, история, шаринг) ═══════════════════
   Editorial Blueprint: те же токены (:root в index.html) — бумага, чернила,
   один синий акцент, mono-кикеры, plate-уголки. */

/* атрибут hidden ОБЯЗАН побеждать любые display-правила ниже (.site-done,
   .company-fields и т.п. задают display и иначе «просвечивают») */
[hidden] { display: none !important; }

/* ── карточки-вьюхи (вход/регистрация/сброс/история) ── */
.site-wrap { padding: 72px 24px 96px; display: flex; justify-content: center; }
.site-wrap--wide { display: block; max-width: 860px; margin: 0 auto; }
.site-card {
  width: 100%; max-width: 440px; background: var(--card);
  border: 1px solid var(--line); border-radius: 6px; padding: 34px 36px 30px;
  position: relative; box-shadow: 14px 14px 0 -6px rgba(31, 60, 255, .08);
}
.site-card::before, .site-card::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border: 1.5px solid var(--ink-900); opacity: .4; pointer-events: none;
}
.site-card::before { top: -7px; left: -7px; border-right: 0; border-bottom: 0; }
.site-card::after { bottom: -7px; right: -7px; border-left: 0; border-top: 0; }

.site-kicker {
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .22em;
  text-transform: uppercase; color: var(--ink-500); margin-bottom: 10px;
}
.site-h2 { font-family: var(--disp); font-size: 30px; font-weight: 600; margin-bottom: 14px; }
.site-h3 { font-family: var(--disp); font-size: 23px; font-weight: 600; margin-bottom: 12px; }
.site-sub { font-size: 14.5px; color: var(--ink-500); margin-bottom: 18px; }

/* ── формы ── */
.site-form { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.site-form label {
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--ink-500);
}
.site-form input {
  height: 48px; padding: 0 14px; font: 15.5px var(--sans); color: var(--ink-900);
  background: #fff; border: 1px solid var(--line); border-radius: 4px;
  transition: border-color .15s, box-shadow .15s;
}
.site-form input:focus { outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-wash); }
.site-form .btn { height: 50px; font-size: 15.5px; margin-top: 4px; }
.site-form .btn.busy { opacity: .6; pointer-events: none; }
.site-form .btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.site-form .btn:disabled:hover { background: var(--brand); }
.site-err { display: none; font-size: 13.5px; color: var(--bad);
  background: var(--bad-wash); border-left: 3px solid var(--bad);
  padding: 9px 12px; border-radius: 0 3px 3px 0; }
.site-err.show { display: block; }

.site-links { margin-top: 18px; font-size: 14px; color: var(--ink-500);
  display: flex; gap: 10px; flex-wrap: wrap; }
.site-links span { color: var(--ink-300); }
.site-linkbtn { background: none; border: none; color: var(--brand-600);
  font-size: 14px; padding: 0; }
.site-linkbtn:hover { text-decoration: underline; }

.site-done { margin-top: 16px; display: flex; gap: 14px; align-items: flex-start;
  background: var(--ok-wash); border-left: 3px solid var(--ok);
  padding: 14px 16px; border-radius: 0 3px 3px 0; font-size: 14.5px; }
.site-done__mark { color: var(--ok); font-size: 20px; font-weight: 700; line-height: 1.2; }
.site-resend { margin-top: 14px; font-size: 14px; color: var(--ink-700);
  background: var(--warn-wash); border-left: 3px solid var(--warn);
  padding: 12px 14px; border-radius: 0 3px 3px 0; }

/* ── шапка: аккаунт-блок ── */
.acct { display: inline-flex; align-items: center; gap: 18px; }
.acct > a { font-size: 14px; color: var(--ink-700); }
.acct .acct-cta { color: var(--brand-600); font-weight: 600; }
.acct-user { position: relative; display: inline-flex; }
.acct-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--line); border-radius: 4px;
  padding: 6px 12px; font-family: var(--mono); font-size: 12px; color: var(--ink-700);
  max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.acct-btn:hover { border-color: var(--brand); color: var(--ink-900); }
.acct-btn i { font-style: normal; font-size: 9px; color: var(--ink-400); }
.acct-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex: none; }
.acct-drop {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px;
  background: var(--card); border: 1px solid var(--line); border-radius: 4px;
  box-shadow: 0 10px 28px rgba(10, 15, 28, .14);
  display: none; flex-direction: column; padding: 6px 0; z-index: 60;
}
.acct-user.open .acct-drop { display: flex; }
.acct-drop a { padding: 9px 16px; font-size: 14px; color: var(--ink-800); }
.acct-drop a:hover { background: var(--brand-wash); text-decoration: none; }
@media (max-width: 620px) { .header nav { display: flex !important; gap: 14px; }
  .header nav a:not(.acct a) { display: none; } }

/* ── история проверок ── */
.hist-head { margin-bottom: 26px; }
.hist-list { display: flex; flex-direction: column; gap: 12px; }
.hist-card {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: 5px;
  padding: 16px 20px; cursor: pointer;
  transition: border-color .15s, transform .12s, box-shadow .15s;
}
.hist-card:hover { border-color: var(--brand);
  box-shadow: 6px 6px 0 -2px var(--brand-wash); }
.hist-card.is-err { opacity: .65; cursor: default; }
.hist-name { font-family: var(--disp); font-size: 18px; font-weight: 600; }
.hist-meta { font-size: 11.5px; color: var(--ink-500); margin-top: 3px; }
.hist-mode { text-transform: uppercase; letter-spacing: .1em; }
.hist-side { display: flex; align-items: center; gap: 16px; flex: none; }
.hist-stamp {
  display: inline-flex; align-items: baseline; gap: 7px;
  border: 1.5px solid var(--stamp); color: var(--stamp);
  border-radius: 3px; padding: 4px 10px; transform: rotate(-1.2deg);
}
.hist-stamp b { font-family: var(--mono); font-size: 16px; }
.hist-stamp i { font-style: normal; font-family: var(--mono); font-size: 10px;
  letter-spacing: .08em; text-transform: uppercase; }
.hist-run { font-family: var(--mono); font-size: 12px; color: var(--warn); }
.hist-errmark { font-family: var(--mono); font-size: 12px; color: var(--bad); }
.hist-actions { display: inline-flex; gap: 8px; }
.hist-act {
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-500);
  background: none; border: 1px solid var(--line); border-radius: 3px; padding: 5px 10px;
}
.hist-act:hover { color: var(--brand-600); border-color: var(--brand); text-decoration: none; }
.hist-del:hover { color: var(--bad); border-color: var(--bad); }
.hist-empty { text-align: center; padding: 48px 0; color: var(--ink-500); }
@media (max-width: 620px) { .hist-card { flex-direction: column; align-items: flex-start; } }

/* ── панель действий в отчёте ── */
.ract {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; margin-bottom: 22px; padding: 12px 16px;
  background: var(--card); border: 1px dashed var(--line); border-radius: 5px;
}
.ract__label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-500); }
.ract__btns { display: inline-flex; gap: 10px; flex-wrap: wrap; }
.ract-btn {
  font-family: var(--mono); font-size: 12.5px; color: var(--ink-800);
  background: none; border: 1px solid var(--line); border-radius: 4px; padding: 8px 14px;
  transition: border-color .15s, color .15s;
}
.ract-btn:hover { color: var(--brand-600); border-color: var(--brand); text-decoration: none; }

/* ── гостевая плашка / баннер шаринга ── */
.guest-cta {
  margin: 18px auto 0; max-width: 660px; text-align: left;
  background: var(--ink-900); color: var(--ink-100); border-radius: 5px;
  padding: 16px 20px; font-size: 14.5px; line-height: 1.55;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  box-shadow: 10px 10px 0 -4px rgba(31, 60, 255, .16);
}
.guest-cta b { color: #fff; }
.guest-cta__btn { height: 42px; padding: 0 20px; font-size: 14px; line-height: 42px;
  color: #fff !important; }
.guest-cta__btn:hover { text-decoration: none; }
.guest-cta__login { color: var(--brand-300); font-size: 13.5px; }
#report-root .guest-cta { max-width: none; margin: 0 0 22px; }

.shared-banner {
  margin-bottom: 22px; padding: 12px 16px; font-size: 14px;
  background: var(--brand-wash); border-left: 3px solid var(--brand);
  border-radius: 0 4px 4px 0; color: var(--ink-800);
}
.shared-banner__tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--brand-600);
  border: 1px solid var(--brand-300); border-radius: 3px;
  padding: 2px 7px; margin-right: 10px;
}

/* ── модалки ── */
.site-modal-back {
  position: fixed; inset: 0; z-index: 200; background: rgba(10, 15, 28, .55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.site-modal {
  position: relative; width: 100%; max-width: 520px; max-height: 86vh; overflow: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  padding: 28px 30px 26px;
}
.site-modal__x {
  position: absolute; top: 12px; right: 12px; width: 32px; height: 32px;
  background: none; border: 1px solid var(--line); border-radius: 4px;
  color: var(--ink-500); font-size: 13px;
}
.site-modal__x:hover { color: var(--bad); border-color: var(--bad); }

.share-list { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 4px; }
.share-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.share-url {
  flex: 1; min-width: 220px; height: 46px; padding: 0 12px; font-size: 13px;
  color: var(--ink-900); background: #fff; border: 1px solid var(--brand-300);
  border-radius: 4px;
}
.share-copy-btn { height: 46px; font-size: 14px; padding: 0 18px; }
.share-revoke {
  height: 46px; padding: 0 12px; background: none; font-family: var(--mono);
  font-size: 12px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink-500);
}
.share-revoke:hover { color: var(--bad); border-color: var(--bad); }
.share-exp { font-size: 10.5px; color: var(--ink-400); flex-basis: 100%; }

/* ── регистрация: широкая карточка, сетка 2 колонки, всё на одном экране ── */
.site-wrap--reg { padding: 44px 24px 72px; }
.site-card--wide { max-width: 760px; padding: 30px 38px 26px; }
.reg-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.reg-form .span2, .reg-form .site-err, .reg-form .btn { grid-column: 1 / -1; }
.company-fields { display: contents; }        /* поля юрлица живут в той же сетке */

/* переключатель физлицо/юрлицо с иконками */
.atype { display: flex; gap: 10px; margin: 6px 0 18px; }
.atype-btn {
  flex: 1; height: 52px; display: inline-flex; align-items: center; justify-content: center;
  gap: 10px; background: none; border: 1px solid var(--line); border-radius: 4px;
  font-family: var(--mono); font-size: 13px; color: var(--ink-500);
  transition: border-color .15s, color .15s, background .15s;
}
.atype-btn svg { width: 19px; height: 19px; flex: none; }
.atype-btn:hover { border-color: var(--ink-400); color: var(--ink-800); }
.atype-btn.active { border-color: var(--brand); color: var(--brand-600);
  background: var(--brand-wash); }

/* согласия (оферта / персональные данные) */
.consent { display: flex !important; flex-direction: row !important;
  gap: 10px; align-items: flex-start; cursor: pointer;
  font-family: var(--sans) !important; font-size: 13px !important;
  letter-spacing: 0 !important; text-transform: none !important;
  color: var(--ink-700) !important; line-height: 1.5; }
.consent input[type="checkbox"] { width: 17px; height: 17px; flex: none;
  margin-top: 2px; accent-color: var(--brand); cursor: pointer; }
.consent a { text-decoration: underline; }

/* подсказки по компаниям (тот же /api/search, светлая версия дропдауна) */
.reg-suggest-holder { position: relative; }
.reg-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40;
  background: #fff; border: 1px solid var(--line); border-radius: 4px;
  box-shadow: 0 14px 34px rgba(10, 15, 28, .16); overflow: hidden;
}
.reg-suggest__item {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 9px 14px; border-bottom: 1px dotted var(--line); cursor: pointer;
}
.reg-suggest__item:last-child { border-bottom: none; }
.reg-suggest__item:hover { background: var(--brand-wash); }
.rs-name { display: block; font-size: 14px; color: var(--ink-900);
  font-weight: 500; text-transform: none; letter-spacing: 0; }
.rs-meta { display: block; font-size: 10.5px; color: var(--ink-500);
  margin-top: 2px; letter-spacing: .03em; }

@media (max-width: 620px) {
  .reg-form { grid-template-columns: 1fr; }
  .site-card--wide { padding: 26px 22px; }
}

/* ── шапка: баланс проверок ── */
.acct-bal {
  font-size: 11.5px; color: var(--brand-600); border: 1px solid var(--brand-300);
  border-radius: 3px; padding: 4px 9px; white-space: nowrap;
}
.acct-bal:hover { background: var(--brand-wash); text-decoration: none; }

/* ── тарифы: чернильный прейскурант ──
   Одна плита в языке hero (blueprint-сетка + синяя аврора), три тарифа-колонки
   с пунктирными разделителями; средний — бумажная карточка «наклеена» на плиту. */
#view-billing .site-wrap--wide { max-width: 980px; }

.bill-balance { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin: 2px 0 26px; font-size: 12px; color: var(--ink-500);
  letter-spacing: .08em; text-transform: uppercase; }
.bb-label { color: var(--ink-500); }
.bb-lead { flex: 1; min-width: 40px; border-bottom: 1px dotted rgba(10, 15, 28, .3);
  transform: translateY(-3px); }
.bb-val b { font-size: 15px; color: var(--ink-900); }
.bb-dot { color: var(--ink-300); }

.bill-note { margin: 14px 0 22px; padding: 12px 16px; font-size: 14px;
  background: var(--brand-wash); border-left: 3px solid var(--brand);
  border-radius: 0 4px 4px 0; }

.bill-plate {
  position: relative; display: grid; grid-template-columns: 1fr 1.08fr 1fr;
  background: var(--ink-900); border-radius: 6px; overflow: visible;
  padding: 34px 8px 30px; margin-top: 30px;
  box-shadow: 0 2px 0 0 var(--ink-900), 22px 22px 0 -8px rgba(31, 60, 255, .12);
}
.bill-plate::before { content: ""; position: absolute; inset: 0; border-radius: 6px;
  background:
    radial-gradient(52% 78% at 82% 0%, rgba(31, 60, 255, .35), transparent 60%),
    radial-gradient(40% 55% at 4% 100%, rgba(31, 60, 255, .15), transparent 60%);
  pointer-events: none; }
.bill-plate::after { content: ""; position: absolute; inset: 0; border-radius: 6px;
  background-image:
    linear-gradient(rgba(120, 150, 255, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 150, 255, .09) 1px, transparent 1px);
  background-size: 40px 40px; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 95% 95% at 50% 20%, #000 25%, transparent 82%);
  mask-image: radial-gradient(ellipse 95% 95% at 50% 20%, #000 25%, transparent 82%); }

.bill-tier { position: relative; z-index: 1; padding: 10px 30px 6px;
  display: flex; flex-direction: column; color: var(--ink-100); }
.bill-tier + .bill-tier { border-left: 1px dashed rgba(151, 168, 255, .28); }

.bt-kicker { font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--brand-300); margin-bottom: 14px; }
.bt-credits { font-family: var(--disp); font-size: 17px; color: #fff; line-height: 1; }
.bt-credits b { font-size: 46px; font-weight: 600; letter-spacing: -.02em; }
.bt-tagline { font-size: 13px; color: var(--ink-300); margin: 10px 0 18px; min-height: 40px; }
.bt-rows { margin-bottom: 20px; }
.bt-row { display: flex; align-items: baseline; gap: 10px; padding: 7px 0;
  font-size: 11.5px; letter-spacing: .04em; color: var(--ink-300); }
.bt-row i { flex: 1; border-bottom: 1px dotted rgba(151, 168, 255, .35);
  transform: translateY(-3px); }
.bt-row .bt-price { font-size: 17px; color: #fff; }
.bt-buy {
  margin-top: auto; height: 48px; width: 100%; border-radius: 4px;
  font: 600 14.5px var(--sans); cursor: pointer;
  background: transparent; color: #fff; border: 1px solid rgba(151, 168, 255, .55);
  transition: border-color .15s, background .15s, transform .1s;
}
.bt-buy:hover { border-color: var(--brand-300); background: rgba(31, 60, 255, .18); }
.bt-buy:disabled { opacity: .4; cursor: not-allowed; }

/* средний тариф — бумажная карточка поверх плиты */
.bill-tier.featured {
  background: var(--card); color: var(--ink-800); border-radius: 5px;
  margin: -52px 6px -12px; padding: 30px 30px 26px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(5, 8, 18, .5);
}
.bill-tier.featured + .bill-tier { border-left: none; }
.bill-tier.featured::before, .bill-tier.featured::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border: 1.5px solid var(--ink-900); opacity: .4; pointer-events: none; }
.bill-tier.featured::before { top: 7px; left: 7px; border-right: 0; border-bottom: 0; }
.bill-tier.featured::after { bottom: 7px; right: 7px; border-left: 0; border-top: 0; }
.bill-tier.featured .bt-kicker { color: var(--brand-600); }
.bill-tier.featured .bt-credits { color: var(--ink-900); }
.bill-tier.featured .bt-tagline { color: var(--ink-500); }
.bill-tier.featured .bt-row { color: var(--ink-500); }
.bill-tier.featured .bt-row i { border-color: rgba(10, 15, 28, .3); }
.bill-tier.featured .bt-row .bt-price { color: var(--ink-900); }
.bill-tier.featured .bt-buy.primary {
  background: var(--brand); border: none; color: #fff; box-shadow: 0 2px 0 0 #0C123F; }
.bill-tier.featured .bt-buy.primary:hover { background: var(--brand-600); }
.bill-tier.featured .bt-buy.primary:active { transform: translateY(2px); box-shadow: none; }
.bt-stamp {
  position: absolute; top: 16px; right: 16px; transform: rotate(4deg);
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--brand-600);
  border: 1.5px solid var(--brand); border-radius: 3px; padding: 4px 9px;
  background: rgba(31, 60, 255, .06);
}

.bill-incl { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin: 20px 2px 0; font-size: 10.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-500); }

.bill-payrow { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px;
  color: var(--ink-700); padding: 8px 0; border-bottom: 1px dotted var(--line); }
.bill-payrow .ok { color: var(--ok); }
.bill-payrow .bad { color: var(--bad); }

/* тарифы на лендинге (#pricing): та же плита, запас сверху под featured-карточку */
.section-sub { max-width: 640px; color: var(--ink-500); font-size: 15.5px;
  margin: 14px 0 0; }
#pricing .bill-plate { margin-top: 72px; }

@media (max-width: 760px) {
  .bill-plate { grid-template-columns: 1fr; padding: 22px 18px; gap: 6px; }
  .bill-tier { padding: 20px 6px; }
  .bill-tier + .bill-tier { border-left: none;
    border-top: 1px dashed rgba(151, 168, 255, .28); }
  .bill-tier.featured { margin: 8px -6px; }
  .bill-tier.featured + .bill-tier { border-top: none; }
  .bt-tagline { min-height: 0; }
}

/* ── тост ── */
#site-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px);
  z-index: 300; max-width: min(480px, 90vw);
  background: var(--ink-900); color: #fff; font-size: 14px;
  padding: 12px 20px; border-radius: 4px; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
  box-shadow: 0 12px 32px rgba(10, 15, 28, .3);
}
#site-toast.show { opacity: 1; transform: translate(-50%, 0); }
#site-toast.bad { background: var(--crit); }

@media (prefers-reduced-motion: reduce) {
  #site-toast, .hist-card, .ract-btn { transition: none; }
}
