/* Вход в кабинет и страница кабинета — как окна заявки на сайте: светлый фон, поля-линии,
   заголовок широким TikTok Sans, красная кнопка. Своя таблица: главная и остальные
   страницы подключают разные общие стили. */

/* кнопка в шапке: вошли — голова закрашена */
.acc-btn.is-in svg circle { fill: currentColor; }

/* ---------- окно ---------- */
.acc-dlg { width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 16px; background: var(--bg); color: var(--ink); overflow: auto; }
.acc-dlg::backdrop { background: rgb(10 10 10 / .4); }
.acc-dlg[open] { animation: acc-in 200ms var(--ease); }
@keyframes acc-in { from { opacity: 0; transform: translateY(12px); } }
.acc-x { position: absolute; top: 12px; right: 12px; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 999px; background: none; color: var(--ink); cursor: pointer; transition: background 150ms var(--ease); }
.acc-x:hover { background: rgb(18 20 24 / .06); }
.acc-x svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }
.acc-body { padding: 32px; }

/* ---------- шаги ---------- */
.acc-step { display: grid; gap: 16px; }
.acc-title { padding-right: 48px; font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: 125%; font-size: 24px; line-height: 1.15; }
.acc-lead { font-size: 16px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.acc-lead b { font-weight: 600; color: var(--ink); }
.acc-ctl { display: grid; gap: 4px; margin-top: 8px; }
.acc-label { font-size: 14px; font-weight: 500; line-height: 20px; color: var(--muted); }
.acc-input { width: 100%; height: 48px; padding: 0; border: 0; border-bottom: 1px solid var(--muted); border-radius: 0; background: transparent; color: var(--ink); font: inherit; font-size: 18px; }
.acc-input:focus { outline: none; border-bottom-color: var(--ink); box-shadow: inset 0 -1px 0 var(--ink); }
.acc-input[aria-invalid="true"] { border-bottom-color: var(--red); box-shadow: inset 0 -1px 0 var(--red); }
.acc-code { height: 64px; font-size: 32px; font-weight: 600; letter-spacing: .4em; font-variant-numeric: tabular-nums; }
.acc-code::placeholder { color: var(--line); }
.acc-err { display: block; min-height: 0; font-size: 14px; font-weight: 500; line-height: 20px; color: var(--red); }
.acc-err:empty { display: none; }
.acc-send { width: 100%; margin-top: 8px; }
/* на главной своя таблица стилей: у её .btn нет выравнивания по центру и сброса рамки */
.acc-dlg .btn, .acc-page .btn { justify-content: center; border: 0; font-family: inherit; cursor: pointer; }

/* демо: письма нет — код прямо в окне */
.acc-demo { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border: 1px dashed var(--muted); border-radius: 12px; font-size: 14px; line-height: 20px; }
.acc-demo svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linejoin: round; }
.acc-demo-code { font-weight: 700; letter-spacing: .08em; font-variant-numeric: tabular-nums; }

/* вход или регистрация — переключатель-капсула */
.acc-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); }
.acc-mode { min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; transition: background 150ms var(--ease), color 150ms var(--ease); }
.acc-mode:hover { color: var(--ink); }
.acc-mode[aria-pressed="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 2px rgb(18 20 24 / .08); }
.acc-mode:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* пароль с кнопкой «показать» */
.acc-pass { position: relative; display: block; }
.acc-pass .acc-input { padding-right: 52px; }
.acc-eye { position: absolute; right: -10px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; transition: color 150ms var(--ease), background 150ms var(--ease); }
.acc-eye:hover { color: var(--ink); background: rgb(18 20 24 / .06); }
.acc-eye:focus-visible { outline: 2px solid var(--red); outline-offset: 0; }
.acc-eye svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.acc-hint { font-size: 14px; line-height: 20px; color: var(--muted); }
.acc-note { font-size: 14px; line-height: 20px; color: var(--muted); }
/* почта для менеджера паролей на шагах без поля почты — не видна и не в фокусе */
.acc-vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; opacity: 0; pointer-events: none; }
.btn[aria-busy] { cursor: progress; opacity: .7; }

/* новый кабинет: согласие на обработку ПДн — без предустановленной галочки */
.acc-new { font-size: 14px; line-height: 20px; }
.acc-consent { position: relative; display: flex; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 20px; cursor: pointer; }
.acc-consent a { text-decoration: underline; text-underline-offset: 3px; }
.acc-consent input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.acc-box { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--muted); border-radius: 6px; color: transparent; transition: background 150ms var(--ease), border-color 150ms var(--ease); }
.acc-box svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.acc-consent input:checked + .acc-box { background: var(--ink); border-color: var(--ink); color: #fff; }
.acc-consent input:focus-visible + .acc-box { outline: 2px solid var(--red); outline-offset: 3px; }
.acc-consent input[aria-invalid="true"] + .acc-box { border-color: var(--red); }

.acc-links, .acc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.acc-link { min-height: 44px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 15px; font-weight: 500; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; cursor: pointer; transition: color 150ms var(--ease), text-decoration-color 150ms var(--ease); }
.acc-link:hover { color: var(--red); text-decoration-color: currentColor; }
.acc-link:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.acc-danger { color: var(--red); }

.acc-done { justify-items: start; }
.acc-done-ic { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; }
.acc-done-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- страница кабинета ---------- */
.acc-page { padding: 144px 0 128px; }
.acc-head h1, .acc-sec h2 { font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); }
.acc-head h1 { font-size: clamp(40px, 7vw, 96px); line-height: .98; letter-spacing: -.01em; }
.acc-page-login { display: grid; justify-items: center; }
.acc-card { width: min(100%, 480px); padding: 32px; border: 1px solid var(--line); border-radius: 16px; }
.acc-head { display: grid; gap: 16px; }
.acc-who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; font-size: 18px; overflow-wrap: anywhere; }
.acc-proto { margin-top: 24px; max-width: 64ch; font-size: 14px; line-height: 20px; color: var(--muted); }
.acc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
.acc-sec { display: grid; align-content: start; justify-items: start; gap: 16px; padding: 32px; border-radius: 16px; background: var(--surface); }
.acc-sec.acc-wide { grid-column: 1 / -1; }
.acc-sec h2 { font-size: 24px; line-height: 1.15; font-stretch: 125%; }
.acc-sec p { max-width: 56ch; font-size: 16px; line-height: 1.5; color: var(--muted); }
.acc-sec .acc-big { font-size: 20px; font-weight: 600; color: var(--ink); }
.acc-arrow { font-weight: 600; color: var(--red); }
.acc-arrow::after { content: " →"; }
.acc-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; font-size: 15px; line-height: 1.4; }
.acc-dl dt { color: var(--muted); }
.acc-dl dd { overflow-wrap: anywhere; }
/* профиль: телефон и смена пароля */
.acc-form { display: grid; gap: 12px; width: 100%; }
.acc-form[hidden] { display: none; }
.acc-form .acc-ctl { margin-top: 0; }
.acc-btn-s { height: 48px; padding: 0 24px; }
.acc-saved { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink); }
.acc-saved svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 999px) { .acc-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 599px) {
  .acc-body, .acc-card { padding: 24px 16px; }
  .acc-card { border: 0; padding: 0; }
  .acc-page { padding: 112px 0 96px; }
  .acc-sec { padding: 24px 16px; }
  .acc-code { font-size: 28px; letter-spacing: .3em; }
}
@media (prefers-reduced-motion: reduce) { .acc-dlg[open] { animation: none; } }
