/* Утверждённые стартовые экраны, 08.11.2026. Только область авторизации. */
html body.auth-required #app .auth-simple {
  --welcome-text:#f8faff; --welcome-muted:#bbc2db;
  --welcome-bg:radial-gradient(ellipse at 0 0,rgba(106,43,207,.72) 0%,rgba(66,25,117,.40) 26%,rgba(29,14,49,.12) 52%,transparent 72%),#0d0b1c;
  --welcome-primary:linear-gradient(150deg,#9344ff,#5909d9); --welcome-border:#807aa9;
  --welcome-secondary:transparent;
  box-sizing:border-box; width:100%; max-width:none; min-height:100svh; min-height:100dvh;
  margin:0; padding: max(28px,env(safe-area-inset-top)) 20px max(28px,env(safe-area-inset-bottom));
  display:flex; flex-direction:column; align-items:center; justify-content:flex-start; gap:0;
  background:var(--welcome-bg); color:var(--welcome-text); overflow:hidden;
  isolation:isolate; border:0; border-radius:0;
}
html[data-theme="light"] body.auth-required #app .auth-simple {
  --welcome-text:#153c2e; --welcome-muted:#718b83;
  --welcome-bg:linear-gradient(155deg,#ffffff 0%,#f1fbf6 28%,#c6ecdb 63%,#86d0b2 100%);
  --welcome-primary:linear-gradient(150deg,#0dd5a0,#008254); --welcome-border:#b8e6d5; --welcome-secondary:#ffffff99;
}
html[data-theme="exclusive"] body.auth-required #app .auth-simple {
  --welcome-bg:radial-gradient(ellipse at 0 0,#155ce8,transparent 80%),#041333;
  --welcome-primary:linear-gradient(145deg,#6aefb5,#008651); --welcome-border:#4388dc; --welcome-muted:#c1d0ef;
}
html body.auth-required #app .auth-simple .auth-welcome-head {width:min(100%,440px);margin:0;padding:0;display:block;text-align:center;}
html body.auth-required #app .auth-simple .auth-welcome-logo {margin:0; width:100%;height:auto;line-height:1; font-size:inherit;}
.auth-welcome-wordmark {display:block;width:100%;aspect-ratio:2144 / 400;background:linear-gradient(#fff 0%,#e3e5ed 100%);mask:url('assets/advokat-iq-wordmark-dark.png') center / 100% auto no-repeat;-webkit-mask:url('assets/advokat-iq-wordmark-dark.png') center / 100% auto no-repeat;position:relative;}
.auth-welcome-wordmark::after {content:'';position:absolute;inset:0;background:linear-gradient(#a13dff,#4d08bd);clip-path:inset(0 0 0 76%);}
html[data-theme="exclusive"] .auth-simple .auth-welcome-wordmark::after {background:linear-gradient(#53e8a1,#00824b);}
html[data-theme="light"] .auth-simple .auth-welcome-wordmark {mask:none;-webkit-mask:none;background:url('assets/advokat-iq-wordmark-light.png') center / 100% auto no-repeat;mix-blend-mode:multiply;aspect-ratio:2144 / 400;}
html[data-theme="light"] .auth-simple .auth-welcome-wordmark::after {display:none;}
html body.auth-required #app .auth-simple .auth-welcome-head p {margin:18px 0 0;color:var(--welcome-muted);font-size:clamp(14px,4.1vw,21px);font-weight:400;line-height:1.4;}
html body.auth-required #app .auth-simple button:focus-visible,html body.auth-required #app .auth-simple a:focus-visible {outline:3px solid var(--welcome-muted);outline-offset:4px;}
html body.auth-required #app .auth-simple-form {overflow:visible;justify-content:flex-end;gap:clamp(16px,3dvh,28px);padding-bottom:max(24px,calc(env(safe-area-inset-bottom) + 16px));}
html body.auth-required #app .auth-simple-form .auth-head {margin-top:0;flex-shrink:0;}
html body.auth-required #app.screen .auth-screen.auth-simple.auth-simple-form > .auth-card {flex-shrink:0;width:min(100%,440px);box-sizing:border-box;margin:0;padding:0;background:transparent !important;border:0 !important;border-radius:0 !important;box-shadow:none !important;backdrop-filter:none;}
html body.auth-required #app .auth-simple-form .auth-security {display:none;}
html body.auth-required #app .auth-simple-form .auth-submit {background:var(--welcome-primary);color:#fff;}

.auth-simple .sr-only {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}

/* Вход и регистрация сразу на фоне темы, без общей плашки. */
html body.auth-required #app .auth-simple-form .auth-tabs {background:none !important; border:0 !important; border-radius:0; box-shadow:none !important; padding:0; gap:12px;}
html body.auth-required #app .auth-simple-form .auth-tabs::before,
html body.auth-required #app .auth-simple-form .auth-tabs::after,
html body.auth-required #app.screen .auth-screen.auth-simple.auth-simple-form > .auth-card::before,
html body.auth-required #app.screen .auth-screen.auth-simple.auth-simple-form > .auth-card::after {content:none; display:none;}

/* Согласованные мягкие тени: форма букв остаётся плоской. */
html body.auth-required #app .auth-simple .auth-welcome-logo {filter:drop-shadow(0 4px 5px rgba(0,0,0,.45));}
html body.auth-required #app .auth-simple .auth-welcome-head p {text-shadow:0 2px 4px rgba(0,0,0,.55);}
html[data-theme="light"] body.auth-required #app .auth-simple .auth-welcome-logo {filter:drop-shadow(0 4px 4px rgba(12,82,59,.26));}
html[data-theme="light"] body.auth-required #app .auth-simple .auth-welcome-head p {text-shadow:0 2px 3px rgba(12,82,59,.22);}

/* На Desktop вся композиция авторизации на 60px выше; поток сохраняет прокрутку. */
@media (min-width: 1024px) {
  html body.auth-required #app .auth-simple-form {
    padding-bottom: calc(max(24px, calc(env(safe-area-inset-bottom) + 16px)) + 60px);
  }
}
/* Регистрация 10.11.2026: юрисдикция — плашка в стиле полей ввода. «Выбрать» серое полупрозрачное, как подсказки;
   по нажатию плашка плавно вытягивается вниз со списком стран. */
html body.auth-required #app .auth-simple .auth-card header > h2:last-child {margin-bottom:var(--space-5);}
html body.auth-required #app .auth-simple .auth-jurisdiction {
  --jur-text:var(--welcome-text,var(--text));
  position:relative; overflow:hidden;
  border:1px solid var(--line); border-radius:var(--radius-md);
  background:color-mix(in srgb,var(--text) 4%,var(--panel));
  transition:border-color .2s ease,box-shadow .2s ease;
}
html body.auth-required #app .auth-simple .auth-jurisdiction.open {border-color:color-mix(in srgb,var(--accent) 60%,transparent);box-shadow:0 12px 28px rgba(0,0,0,.22);}
html body.auth-required #app .auth-simple .auth-jurisdiction.invalid {border-color:#ff6b7a;}
html body.auth-required #app .auth-simple .auth-jurisdiction-toggle {
  all:unset; box-sizing:border-box; width:100%;
  /* Высота как у полей ввода (их рамка 1px входит в высоту): общее правило кнопок держит 44px с !important. */
  min-height:calc(var(--space-9) - 2px) !important;
  padding:0 var(--space-4) 0 var(--space-5);
  display:flex; align-items:center; justify-content:space-between; gap:var(--space-3);
  cursor:pointer; color:var(--jur-text);
  font-size:max(16px,var(--text-md)); font-weight:var(--weight-regular); line-height:var(--leading-normal);
}
html body.auth-required #app .auth-simple .auth-jurisdiction-toggle:focus-visible {outline:none;}
html body.auth-required #app .auth-simple .auth-jurisdiction:has(.auth-jurisdiction-toggle:focus-visible) {border-color:color-mix(in srgb,var(--accent) 60%,transparent);}
html body.auth-required #app .auth-simple .auth-jurisdiction-value.is-empty {color:color-mix(in srgb,var(--jur-text) 42%,transparent);}
html body.auth-required #app .auth-simple .auth-jurisdiction-chevron {width:20px;height:20px;flex:none;color:color-mix(in srgb,var(--jur-text) 55%,transparent);transition:transform .25s ease;}
html body.auth-required #app .auth-simple .auth-jurisdiction.open .auth-jurisdiction-chevron {transform:rotate(180deg);}
html body.auth-required #app .auth-simple .auth-jurisdiction-panel {display:grid;grid-template-rows:0fr;transition:grid-template-rows .28s cubic-bezier(.2,.8,.2,1);}
html body.auth-required #app .auth-simple .auth-jurisdiction.open .auth-jurisdiction-panel {grid-template-rows:1fr;}
html body.auth-required #app .auth-simple .auth-jurisdiction-options {min-height:0;overflow:hidden;display:grid;gap:4px;padding:0 6px;opacity:0;transition:opacity .2s ease,padding .28s ease;}
html body.auth-required #app .auth-simple .auth-jurisdiction.open .auth-jurisdiction-options {opacity:1;padding:6px;border-top:1px solid color-mix(in srgb,var(--jur-text) 10%,transparent);}
html body.auth-required #app .auth-simple .auth-jurisdiction-options [role="option"] {
  all:unset; box-sizing:border-box; min-height:48px; padding:0 var(--space-4);
  display:flex; align-items:center; gap:var(--space-4); border-radius:calc(var(--radius-md) - 4px);
  color:var(--jur-text); font-size:max(16px,var(--text-md)); cursor:pointer;
  transition:background-color .15s ease;
}
html body.auth-required #app .auth-simple .auth-jurisdiction-options [role="option"]:hover,
html body.auth-required #app .auth-simple .auth-jurisdiction-options [role="option"]:focus-visible {background:color-mix(in srgb,var(--jur-text) 8%,transparent);}
html body.auth-required #app .auth-simple .auth-jurisdiction-options [role="option"][aria-selected="true"] {background:color-mix(in srgb,var(--accent) 16%,transparent);}
html body.auth-required #app .auth-simple .auth-jurisdiction-code {
  min-width:34px; height:24px; display:grid; place-items:center; border-radius:999px;
  font-size:12px; font-weight:700; letter-spacing:.04em;
  color:color-mix(in srgb,var(--jur-text) 75%,transparent); background:color-mix(in srgb,var(--jur-text) 10%,transparent);
}
html body.auth-required #app .auth-simple .auth-jurisdiction-name {flex:1;}
html body.auth-required #app .auth-simple .auth-jurisdiction-check {width:18px;height:18px;color:var(--accent);opacity:0;}
html body.auth-required #app .auth-simple [aria-selected="true"] > .auth-jurisdiction-check {opacity:1;}
html body.auth-required #app .auth-simple .auth-jurisdiction-error {color:#ff8a96;font-size:var(--text-xs);}
html[data-theme="light"] body.auth-required #app .auth-simple .auth-jurisdiction-error {color:#c62f3f;}
@media (prefers-reduced-motion: reduce) {
  html body.auth-required #app .auth-simple :is(.auth-jurisdiction-panel,.auth-jurisdiction-options,.auth-jurisdiction-chevron) {transition:none;}
}
