/* ===== PowerSpell · Login / Register / Cabinet =====
   Uses the tokens from app.css (--ps-ink, --ps-blue, --ps-navy …). */
.ps-acc, .ps-cab { --acc: #6c9bff; --acc-deep: #2457d6; --card-shadow: 0 12px 34px rgba(13, 27, 58, .08); font-family: inherit; color: var(--ps-ink); }

/* ---------- Auth shell ---------- */
/* Контейнер = ширина контента шапки (MudContainer Large: 1280 − 2×24). Две равные половины. */
.ps-acc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: 1232px; margin: 0 auto; min-height: calc(100vh - var(--ps-appbar-h)); background: var(--ps-bg); box-shadow: 0 0 0 100vmax var(--ps-bg); clip-path: inset(0 -100vmax); }
.ps-acc__aside { min-width: 0; background: #0a1430; color: #e8eefb; display: flex; justify-content: center; }
.ps-acc__aside-in { width: 100%; max-width: 520px; box-sizing: border-box; padding: 56px 40px; display: flex; flex-direction: column; justify-content: center; gap: 28px; }
.ps-acc__eyebrow { font-size: 14px; font-weight: 700; color: var(--acc); letter-spacing: .06em; }
.ps-acc__title { margin: 12px 0 0; font-size: 40px; line-height: 1.15; font-weight: 800; }
.ps-acc__lead { margin: 14px 0 0; font-size: 17px; line-height: 1.65; color: #a9b9da; }
.ps-acc__main { min-width: 0; padding: 48px 40px; display: flex; align-items: center; justify-content: center; }
.ps-acc__card { background: #fff; border-radius: 24px; padding: 36px; box-shadow: 0 20px 50px rgba(13, 27, 58, .10); width: 100%; max-width: 480px; box-sizing: border-box; }
.ps-acc__h2 { margin: 0; font-size: 28px; font-weight: 800; }
.ps-acc__sub { margin: 8px 0 22px; font-size: 15px; color: var(--ps-muted); }
.ps-acc__alert { margin-bottom: 16px; padding: 12px 16px; border-radius: 12px; background: #fdecea; color: #a12a1b; font-size: 14.5px; font-weight: 600; }
.ps-acc__foot { margin-top: 22px; padding-top: 20px; border-top: 1px solid #e3e9f4; display: flex; flex-direction: column; gap: 10px; text-align: center; font-size: 15px; color: var(--ps-muted); }

.ps-acc__bullets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.ps-acc__bullets li { display: flex; align-items: center; gap: 14px; font-size: 16.5px; font-weight: 600; }
.ps-acc__bullets svg { flex: none; width: 40px; height: 40px; padding: 9px; box-sizing: border-box; border-radius: 12px; background: rgba(108, 155, 255, .16); color: var(--acc); }
.ps-acc__steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.ps-acc__steps li { counter-increment: s; position: relative; padding-left: 48px; display: flex; flex-direction: column; gap: 2px; }
.ps-acc__steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; background: rgba(108, 155, 255, .16); color: var(--acc); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.ps-acc__steps b { font-size: 16px; }
.ps-acc__steps span { font-size: 14px; line-height: 1.55; color: #a9b9da; }

.ps-acc__hint { display: none; }
.ps-acc__aside { scroll-margin-top: calc(var(--ps-appbar-h) + 8px); }

/* ---------- Video ---------- */
.ps-vid { margin: 0; background: #14285a; border: 1px solid #243f73; border-radius: 20px; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, .30); }
.ps-vid__ph { aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #14285a, #0f1d44); }
.ps-vid__play { width: 72px; height: 72px; border-radius: 50%; background: var(--acc); color: #071026; display: flex; align-items: center; justify-content: center; }
.ps-vid__el { display: block; width: 100%; aspect-ratio: 16/9; background: #000; }
.ps-vid__cap { padding: 14px 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; align-items: center; color: #e8eefb; }
.ps-vid__title { font-weight: 700; font-size: 15px; }
.ps-vid__note { font-size: 12.5px; color: #7f93bc; }

/* ---------- Form ---------- */
.ps-form { display: flex; flex-direction: column; gap: 12px; }
.ps-form__cols { display: flex; flex-wrap: wrap; gap: 12px; }
.ps-form__cols > .ps-field { flex: 1 1 180px; }
.ps-form__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; font-size: 14.5px; }
.ps-field { position: relative; display: block; background: #fff; border: 1.5px solid #d5deee; border-radius: 14px; padding: 10px 16px 8px; min-height: 44px; }
.ps-field label { display: block; font-size: 12px; font-weight: 600; color: var(--ps-muted); }
.ps-field input { border: 0; outline: 0; width: 100%; font: inherit; font-size: 16px; color: var(--ps-ink); background: transparent; padding: 4px 0 0; }
.ps-field:focus-within { border-color: var(--acc-deep); box-shadow: 0 0 0 4px rgba(36, 87, 214, .14); }
.ps-field:has(input.invalid) { border-color: #d64545; }
.ps-field__err { display: block; margin-top: 4px; font-size: 12.5px; font-weight: 600; color: #c0392b; }
.validation-message { font-size: 12.5px; font-weight: 600; color: #c0392b; }

.ps-check { display: inline-flex; gap: 10px; align-items: center; color: var(--ps-muted); font-size: 14.5px; cursor: pointer; }
.ps-check input { width: 18px; height: 18px; flex: none; accent-color: var(--acc-deep); }
.ps-check--terms { align-items: flex-start; line-height: 1.5; }
.ps-check--terms input { margin-top: 3px; }

.ps-btn-main { display: flex; align-items: center; justify-content: center; min-height: 56px; border-radius: 14px; background: var(--acc-deep); color: #fff; font: inherit; font-weight: 800; font-size: 17px; border: 0; width: 100%; cursor: pointer; text-decoration: none; }
.ps-btn-main:hover { filter: brightness(1.08); }
.ps-btn-main:disabled { opacity: .6; cursor: default; }
.ps-btn-main--sm { min-height: 44px; width: auto; padding: 0 22px; font-size: 15px; }
.ps-link { color: var(--acc-deep); font-weight: 600; }
.ps-link:hover { text-decoration: underline; }
.ps-link--strong { font-weight: 700; }

/* segmented control (account type) */
.ps-seg { display: flex; background: #eaeff8; border-radius: 14px; padding: 4px; gap: 4px; margin-bottom: 8px; }
.ps-seg__opt { flex: 1; position: relative; cursor: pointer; }
.ps-seg__opt input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ps-seg__opt span { display: block; text-align: center; padding: 12px 8px; border-radius: 11px; font-weight: 600; font-size: 15px; color: var(--ps-muted); }
.ps-seg__opt input:checked + span { background: #fff; color: var(--ps-ink); font-weight: 700; box-shadow: 0 2px 8px rgba(13, 27, 58, .10); }
.ps-seg__opt input:focus-visible + span { outline: 3px solid rgba(36, 87, 214, .4); }
.ps-org { display: none; flex-direction: column; gap: 12px; }
.ps-reg:has(.ps-seg__opt input[value="Organization"]:checked) .ps-org { display: flex; }

/* password checklist */
.ps-rules { list-style: none; margin: 0; padding: 2px 4px 6px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.ps-rules li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: #6c7fa8; }
.ps-rules i { width: 18px; height: 18px; border-radius: 50%; background: #eaeff8; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 11px; font-weight: 800; }
.ps-rules li.is-ok { color: #0b7a5a; }
.ps-rules li.is-ok i { background: #d8f5e8; }
.ps-rules li.is-ok i::before { content: "✓"; }

/* ---------- Cabinet ---------- */
.ps-cab { max-width: 1320px; margin: 0 auto; padding: 28px 24px 56px; display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; background: var(--ps-bg); }
body:has(.ps-cab) { background: var(--ps-bg); }
.ps-cab__side { flex: 0 0 260px; max-width: 100%; box-sizing: border-box; background: #fff; border-radius: 22px; padding: 14px; box-shadow: var(--card-shadow); display: flex; flex-direction: column; gap: 4px; position: sticky; top: calc(var(--ps-appbar-h) + 16px); }
.ps-cab__who { display: flex; align-items: center; gap: 12px; padding: 8px 10px 14px; border-bottom: 1px solid #e7ecf6; margin-bottom: 6px; }
.ps-cab__avatar { width: 40px; height: 40px; border-radius: 50%; background: #1c3269; color: var(--acc); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.ps-cab__name { font-weight: 700; font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
.ps-cab__nav { display: flex; flex-direction: column; gap: 4px; }
.ps-cab__item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 44px; box-sizing: border-box; border-radius: 12px; font: inherit; font-size: 15px; font-weight: 600; color: #44557d; background: none; border: 0; width: 100%; text-align: left; cursor: pointer; text-decoration: none; }
.ps-cab__item:hover { background: #f1f5fc; }
.ps-cab__item.is-on { background: rgba(36, 87, 214, .10); color: var(--acc-deep); font-weight: 700; }
.ps-cab__logout { border-top: 1px solid #e7ecf6; margin-top: 8px; padding-top: 8px; }
.ps-cab__main { flex: 1 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }

.ps-cab-hero { border-radius: 26px; background: linear-gradient(120deg, #0a1430 0%, #14307a 100%); color: #e8eefb; padding: 36px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; }
.ps-cab-hero__text { flex: 1 1 320px; min-width: 0; }
.ps-cab-hero h1 { margin: 10px 0 0; font-size: 40px; line-height: 1.15; font-weight: 800; }
.ps-cab-hero p { margin: 14px 0 0; font-size: 17px; line-height: 1.65; color: #b9c8e8; max-width: 480px; }
.ps-cab-hero__btns { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; }
.ps-btn-accent, .ps-btn-ghost { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 24px; border-radius: 14px; font-weight: 800; font-size: 16px; text-decoration: none; box-sizing: border-box; }
.ps-btn-accent { background: var(--acc); color: #071026; }
.ps-btn-ghost { border: 1.5px solid rgba(255, 255, 255, .3); color: #e8eefb; font-weight: 700; }
.ps-ring { flex: 0 0 auto; margin: 0 auto; width: 190px; height: 190px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: conic-gradient(var(--acc) var(--ring, 100%), rgba(255, 255, 255, .12) 0); }
.ps-ring__in { width: 156px; height: 156px; border-radius: 50%; background: #10265f; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ps-ring__num { font-size: 56px; font-weight: 800; line-height: 1; }
.ps-ring__lbl { font-size: 15px; color: #b9c8e8; margin-top: 4px; }

.ps-cab-warn { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 20px; border-radius: 18px; background: #fff4dc; color: #7a4a00; font-weight: 600; }
.ps-cab-warn span { flex: 1 1 240px; }

.ps-cab-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.ps-act { flex: 1 1 220px; display: flex; gap: 14px; align-items: center; padding: 18px 20px; border-radius: 18px; background: #fff; color: var(--ps-ink); border: 1.5px solid #d5deee; box-shadow: 0 10px 26px rgba(13, 27, 58, .07); text-decoration: none; box-sizing: border-box; }
.ps-act b { display: block; font-weight: 800; font-size: 16px; }
.ps-act small { display: block; font-size: 13.5px; color: var(--ps-muted); margin-top: 2px; }
.ps-act__ic { flex: none; width: 44px; height: 44px; border-radius: 12px; background: #eaf0ff; color: var(--acc-deep); display: flex; align-items: center; justify-content: center; }
.ps-act--primary { background: var(--acc-deep); color: #fff; border: 0; }
.ps-act--primary small { color: #cfe0ff; }
.ps-act--primary .ps-act__ic { background: rgba(255, 255, 255, .18); color: #fff; }
.ps-act:hover { transform: translateY(-2px); transition: transform .15s; }

.ps-cab-card { background: #fff; border-radius: 22px; padding: 26px 28px; box-shadow: var(--card-shadow); box-sizing: border-box; }
.ps-cab-card h2 { margin: 0 0 6px; font-size: 22px; font-weight: 800; }
.ps-cab-empty { margin: 12px 0; color: var(--ps-muted); }
.ps-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 16px 0; border-top: 1px solid #e7ecf6; }
.ps-row__main { flex: 2 1 200px; min-width: 0; }
.ps-row__main b { display: block; font-size: 16px; }
.ps-row__main code { display: block; margin-top: 2px; font-size: 13.5px; color: var(--ps-muted); font-family: ui-monospace, Menlo, Consolas, monospace; }
.ps-row__cell { flex: 1 1 120px; font-size: 14.5px; }
.ps-row__muted { color: #44557d; }
.ps-row--order { padding: 12px 0; }
.ps-row__inv { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.ps-btn-line { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1.5px solid #d5deee; font-weight: 700; font-size: 14px; color: var(--acc-deep); text-decoration: none; box-sizing: border-box; }
.ps-btn-soft { margin-top: 8px; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 12px; background: #eaf0ff; color: var(--acc-deep); font-weight: 800; font-size: 15px; text-decoration: none; }
.ps-chip { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.ps-chip--ok { background: #d8f5e8; color: #0b7a5a; }
.ps-chip--warn { background: #fff0d0; color: #8a5200; }
.ps-chip--bad { background: #fde3e0; color: #a12a1b; }

.ps-cab-two { display: flex; flex-wrap: wrap; gap: 24px; }
.ps-cab-two__wide { flex: 2 1 420px; min-width: 0; }
.ps-cab-video { flex: 1 1 280px; min-width: 0; border-radius: 22px; background: #0a1430; color: #e8eefb; padding: 22px; display: flex; flex-direction: column; gap: 14px; box-sizing: border-box; }
.ps-cab-video .ps-vid { box-shadow: none; }
.ps-link-accent { margin-top: auto; font-weight: 700; color: var(--acc); text-decoration: none; }
.ps-cab-help { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.ps-cab-help b { display: block; font-size: 18px; font-weight: 800; }
.ps-cab-help span { display: block; margin-top: 4px; color: var(--ps-muted); font-size: 15px; }

/* ---------- Mobile ---------- */
@media (max-width: 959px) {
  .ps-acc__hint { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 12px 14px; border-radius: 14px; background: #eaf0ff; color: var(--acc-deep); font-size: 14.5px; line-height: 1.4; text-decoration: none; }
  .ps-acc__hint svg { flex: none; width: 30px; height: 30px; padding: 6px; box-sizing: border-box; border-radius: 50%; background: var(--acc-deep); color: #fff; }
  .ps-acc__hint span:first-of-type { flex: 1; }
  .ps-acc__hint span:last-child { font-weight: 800; font-size: 18px; }
  .ps-acc { grid-template-columns: 1fr; box-shadow: none; clip-path: none; }
  .ps-acc__main { order: -1; padding: 24px 16px; }
  .ps-acc__aside-in { padding: 40px 24px; }
  .ps-acc__title { font-size: 32px; }
  .ps-acc__card { padding: 24px 20px; }
  .ps-cab { padding: 16px; gap: 16px; }
  .ps-cab__side { flex-basis: 100%; position: static; flex-direction: column; }
  .ps-cab__nav { flex-direction: row; overflow-x: auto; scroll-snap-type: x proximity; gap: 6px; padding-bottom: 4px; }
  .ps-cab__nav .ps-cab__item { flex: none; width: auto; white-space: nowrap; scroll-snap-align: start; }
  .ps-cab-hero { padding: 24px; }
  .ps-cab-hero h1 { font-size: 32px; }
  .ps-cab-card { padding: 20px; }
}
@media (max-width: 480px) {
  .ps-ring { width: 160px; height: 160px; }
  .ps-ring__in { width: 130px; height: 130px; }
  .ps-ring__num { font-size: 46px; }
}

/* ---------- Header: login link (replaces search + green trial button) ---------- */
.ps-login { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; box-sizing: border-box; border-radius: 12px; border: 1.5px solid var(--ps-line); color: var(--ps-blue); font-weight: 700; font-size: .95rem; text-decoration: none; white-space: nowrap; background: #fff; }
.ps-login:hover { background: #f1f6ff; border-color: #b9ccef; }
.ps-login--block { display: flex; justify-content: center; margin-bottom: 12px; }
button.ps-login { font-family: inherit; cursor: pointer; }   /* «Ելք» — кнопка, выглядит как ссылка входа */
.ps-login--out { width: 100%; }
.ps-appbar__actions .ps-login--out { width: auto; }

/* Header (desktop only ≥1180px, same breakpoint as .ps-nav): trial button after the menu + login link.
   Below 1180px both are hidden — the burger opens the drawer, which has "Մուտք" and the trial button. */
.ps-nav-cta, .ps-login--bar { display: none !important; }
@media (min-width: 1180px) {
  .ps-nav-cta { display: inline-flex !important; flex: none; }
  .ps-login--bar { display: inline-flex !important; }
}

/* Mobile drawer: a closed drawer must be fully off-screen. Its width (340px) now equals MudDrawer's Width,
   so the closed "slide out" distance matches the real width (before, 340px vs 240px left a visible strip). */
.mud-drawer.ps-drawer { width: 340px !important; max-width: 86vw; }
.mud-drawer.ps-drawer.mud-drawer--closed { visibility: hidden; transition: transform .2s ease, visibility 0s linear .25s; }
