/* Shared authentication shell. Login, signup and both recovery pages use the
   same geometry and state vocabulary so moving between them never feels like
   entering another product. */
[data-app],[data-split],[data-authpane]{background:#FCEBDE}
[data-authpane]{padding:10px clamp(18px,4cqw,56px)!important}
[data-authcard]{width:100%;max-width:460px;margin:0 auto}
[data-authmobilebar]{display:contents}
[data-authmobilebrand]{display:none}
[data-authmobilebrand]>span>span{color:#9B3B18!important}
[data-authback]{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:8px 0;color:#6A5047;font-size:.84rem;font-weight:670}
[data-authback]:is(:hover,:focus-visible){color:#311D1C}
[data-authtitle]{margin:10px 0 0;font-size:2rem;font-weight:820;line-height:1.08;letter-spacing:-.03em}
[data-authintro]{margin:7px 0 0;max-width:44ch;color:#6A5047;font-size:.9rem;line-height:1.5}

[data-authpane] [data-form]{display:flex;flex-direction:column;gap:8px!important;margin-top:11px!important}
[data-fieldgroup]{display:flex;flex-direction:column;gap:5px}
[data-fieldhead]{display:flex;align-items:center;justify-content:space-between;gap:10px;opacity:1!important}
[data-fieldlabel],
[data-fieldhead]>label{
  color:#6A5047;font:640 .75rem/1.35 'Geist',system-ui,sans-serif;
  letter-spacing:normal;text-transform:none;
}
[data-fieldhelp]{color:#6A5047;font-size:.75rem;line-height:1.45}
[data-fieldhelp-legacy]{color:#6A5047;font-size:.69rem;line-height:1.45}
[data-authpane] [data-field]{
  width:100%;min-height:46px;padding:11px 14px!important;
  border:1px solid rgba(49,29,28,.3)!important;border-radius:12px!important;
  background:#FFFDF9!important;color:#311D1C;font-size:1rem;
  box-shadow:0 1px 2px rgba(49,29,28,.04)!important;
  transition:border-color .16s ease,box-shadow .16s ease;
}
[data-authpane] [data-field]:hover{border-color:rgba(49,29,28,.48)!important}
[data-authpane] [data-field]:focus{outline:none;border-color:#EA6029!important;box-shadow:0 0 0 3px rgba(234,96,41,.16)!important}
[data-authpane] [data-field][aria-invalid="true"]{border-color:#9B3B18!important;box-shadow:0 0 0 3px rgba(155,59,24,.12)!important}
[data-passwordwrap]{position:relative;display:block}
[data-passwordwrap] [data-field]{padding-right:102px!important}
[data-eye]{
  position:absolute;top:50%;right:6px;transform:translateY(-50%);
  display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:6px 10px;
  border:1px solid rgba(49,29,28,.2)!important;border-radius:10px!important;
  background:transparent;color:#6A5047!important;font:700 .75rem/1 'Geist',system-ui,sans-serif!important;
  letter-spacing:normal!important;text-transform:none!important;opacity:1!important;cursor:pointer;
}
[data-eye]:is(:hover,:focus-visible){border-color:#EA6029!important;background:rgba(49,29,28,.055);color:#311D1C}

[data-formerror]{
  margin:0;padding:9px 11px;border:1px solid rgba(155,59,24,.22);border-radius:10px;
  background:rgba(196,68,28,.075);color:#9B3B18;font-size:.78rem;font-weight:620;line-height:1.45;
}
[data-formerror][hidden]{display:none}
@keyframes rf-auth-shake{0%,100%{transform:none}25%{transform:translateX(-4px)}50%{transform:translateX(3px)}75%{transform:translateX(-2px)}}
[data-bad],[data-badbox]{animation:rf-auth-shake .28s ease}

[data-authpane] [data-prim]{
  min-height:46px!important;border-color:#EA6029!important;border-radius:10px!important;
  background:#EA6029!important;color:#311D1C!important;
  box-shadow:0 5px 14px rgba(234,96,41,.2)!important;
}
[data-authpane] [data-prim]:is(:hover,:focus-visible){
  border-color:#F37847!important;background:#F37847!important;
  box-shadow:0 11px 26px rgba(234,96,41,.25)!important;
}
[data-authpane] [data-prim]:active{transform:none!important;box-shadow:0 3px 10px rgba(234,96,41,.18)!important}
[data-authpane] [data-prim]:disabled{cursor:wait;opacity:.68;transform:none!important;box-shadow:none!important}

[data-authdivider]{display:flex;align-items:center;gap:12px;margin:8px 0}
[data-authdivider]>span:not(:first-child):not(:last-child){color:#6A5047!important;font-family:'Geist',system-ui,sans-serif!important;font-size:.75rem!important;font-weight:640!important;letter-spacing:normal!important;text-transform:none!important;opacity:1!important}
[data-socialstack]{display:grid;grid-template-columns:1fr;gap:8px}
/* Регистрация через провайдера — тоже акцепт оферты (Соглашение, п. 1.2): человек видит это в момент действия. */
[data-socnote]{margin:2px 0 0;font-size:.72rem;line-height:1.45;letter-spacing:-.01em;color:#6A5047;text-align:center;white-space:nowrap}
[data-socnote] a{color:#9B3B18;font-weight:650;text-decoration:underline;text-underline-offset:2px}
[data-socnote] a:hover{color:#B94319}
[data-provider]{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;height:46px!important;padding:0 18px;border-radius:10px!important;color:#fff;font-size:.875rem;font-weight:680;cursor:pointer;transition:filter .16s ease,transform .16s ease,box-shadow .16s ease}
[data-provider]:hover{filter:brightness(1.04);transform:translateY(-1px);box-shadow:0 8px 22px rgba(49,29,28,.14)}
[data-provider]:active{transform:none}
[data-provider="yandex"]{gap:16px!important;border-color:#000!important;background:#000!important;font-family:"Helvetica Neue",Arial,sans-serif!important;font-size:14px!important;font-weight:500!important}
[data-provider="vk"]{border-color:#006BE6!important;background:#006BE6!important;font-family:"Geist",system-ui,sans-serif!important;font-weight:620!important}
[data-provider-icon]{display:grid;place-items:center;width:24px!important;height:24px!important;flex:0 0 auto}
[data-provider="yandex"] [data-provider-icon]{overflow:hidden;border-radius:50%}
[data-provider-icon] svg{display:block;width:24px!important;height:24px!important}

[data-authfooter]{display:flex;flex-direction:column;gap:4px;margin-top:6px}
[data-authfooter] p{margin:0;color:#6A5047!important;opacity:1!important}
[data-authfooter] a{color:#B94319}
[data-authfooter] a:hover{color:#9B3B18}
[data-legallinks]{margin-top:0;padding:0;font:620 .75rem/1.45 'Geist',system-ui,sans-serif;color:#6A5047;text-align:left}
[data-legallinks] a{display:inline-flex;align-items:center;min-height:32px;color:#6A5047;text-decoration:none;text-decoration-thickness:1px;text-underline-offset:4px;transition:color .16s ease}
[data-legallinks] a:is(:hover,:focus-visible){color:#9B3B18;text-decoration:underline}

[data-checks]{border-radius:14px!important}
[data-checks] a{color:#9B3B18!important;font-weight:650;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
[data-checks] a:is(:hover,:focus-visible){color:#B94319!important}
[data-passgroup]{gap:6px!important}
[data-passmeter]{gap:4px!important;margin:0!important}
[data-passmeter]:not([data-active]){display:none!important}
[data-passmeter] i{background:rgba(49,29,28,.16)!important;transition:background-color .16s ease}
[data-passmeter][data-level="1"] [data-filled]{background:#C4441C!important}
[data-passmeter][data-level="2"] [data-filled]{background:#E0A21C!important}
[data-passmeter][data-level="3"] [data-filled]{background:#297047!important}
[data-strength]{min-height:.9em;color:#6A5047!important;font-size:.72rem!important;opacity:1!important}
[data-strength]:empty{display:none}
[data-authpane] input[type="checkbox"]{cursor:pointer}

[data-authbrand]{gap:11px!important}
[data-authbrand] img{width:31px!important;height:39px!important}
[data-authbrand] span{font-size:1.02rem!important}
[data-foxpane]{isolation:isolate}
[data-foxpane]::before{
  content:"";position:absolute;z-index:0;inset:0;pointer-events:none;
  background:repeating-linear-gradient(135deg,rgba(252,235,222,.064) 0 1px,transparent 1px 15px);
}
[data-authbrand],[data-foxstage],[data-foxtext]{z-index:1}
[data-foxstage] canvas{position:relative;z-index:1}
[data-foxtext]{width:100%;max-width:none!important}
[data-foxtext]>p:first-child{font-size:.75rem!important;letter-spacing:normal!important;text-transform:none!important;white-space:nowrap}
[data-foxtext]>p:last-child{max-width:none;font-size:clamp(1.3rem,1.85cqw,1.62rem)!important}
[data-foxtext]>p:last-child>span{display:block;white-space:nowrap}
/* The warm light stays beyond the corner, clear of the logo and fox. */
[data-foxwash]{position:absolute;inset:0;background-image:radial-gradient(circle at -12% -16%,rgba(234,96,41,.14),transparent 38%),radial-gradient(circle at 86% 82%,rgba(252,235,222,.08),transparent 42%);pointer-events:none}
[data-foxglow]{position:absolute;left:-270px;top:-270px;width:min(52cqw,520px);aspect-ratio:1;border-radius:50%;background:rgba(234,96,41,.22);filter:blur(90px);pointer-events:none}

@media(forced-colors:active){[data-foxpane]::before{display:none}}

[data-loginclose],[data-loginhelpclose],[data-helpclose]{width:40px!important;height:40px!important;border-radius:10px!important}
[data-recoverytoggle],[data-noemail],[data-forgot],[data-forgotedit]{position:relative;display:inline-flex;align-items:center;min-height:0;padding:1px 0!important;color:#B94319!important;font-size:.78rem!important;font-weight:700;line-height:1.35;text-decoration:none;opacity:1!important}
[data-recoverytoggle]::after,[data-noemail]::after,[data-forgot]::after,[data-forgotedit]::after{content:"";position:absolute;inset:-7px -5px}
[data-recoverytoggle]:is(:hover,:focus-visible),[data-noemail]:is(:hover,:focus-visible),[data-forgot]:is(:hover,:focus-visible),[data-forgotedit]:is(:hover,:focus-visible){color:#9B3B18!important}
[data-authstate]{padding:12px 0}
[data-authstatehead]{display:flex;align-items:center;gap:10px}
[data-authstatehead] [data-authtitle]{margin:0}
[data-authstateicon]{display:grid;place-items:center;width:28px;height:28px;flex:0 0 auto;color:#B94319}
[data-authstateicon] svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
[data-authstateactions]{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:14px}

/* Dialogs follow the same dense rhythm and primary-action language as the
   page forms. Expanded pseudo hit areas keep text actions easy to press
   without making the visible rows look vertically inflated. */
[data-logindialoghead],[data-loginhelphead],[data-helpdialog-head]{padding:18px 18px 7px!important}
[data-logindialogbody],[data-loginhelpbody],[data-helpdialog-body]{padding:0 18px 18px!important}
[data-login2fapane]{gap:8px!important}
[data-logincodeboxes]{margin:0!important}
[data-loginrecoveryactions]{gap:3px!important}
[data-login2fasubmit],[data-loginhelpaction],[data-helpaction]{
  min-height:46px!important;padding:10px 18px!important;
  border:1px solid #EA6029!important;border-radius:10px!important;
  background:#EA6029!important;color:#311D1C!important;
  font-size:.875rem!important;font-weight:760!important;
  box-shadow:0 5px 14px rgba(234,96,41,.2)!important;
  transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease;
}
[data-loginhelpaction],[data-helpaction]{margin-top:12px!important}
[data-login2fasubmit]:is(:hover,:focus-visible),[data-loginhelpaction]:is(:hover,:focus-visible),[data-helpaction]:is(:hover,:focus-visible){
  border-color:#F37847!important;background:#F37847!important;color:#311D1C!important;
  box-shadow:0 11px 26px rgba(234,96,41,.25)!important;
}
[data-login2fasubmit]:active,[data-loginhelpaction]:active,[data-helpaction]:active{transform:none!important;box-shadow:0 3px 10px rgba(234,96,41,.18)!important}
[data-login2fasubmit]:disabled{cursor:wait;opacity:.68;transform:none!important;box-shadow:none!important}

@container (min-width:900px){
  [data-authpane]{justify-content:center!important}
}
@container (max-width:899px){
  [data-authpane]{justify-content:flex-start!important;padding-top:20px!important;padding-bottom:28px!important}
  [data-authmobilebar]{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}
  [data-authmobilebrand]{display:inline-flex;align-items:center;gap:8px;color:#311D1C;font-size:.82rem;font-weight:760;letter-spacing:.035em}
  [data-authmobilebrand] img{width:23px;height:29px;object-fit:contain}
  [data-authback]{min-height:44px;padding:10px 0}
  [data-authtitle]{margin-top:4px;font-size:1.8rem}
  [data-eye]{min-height:40px}
  [data-legallinks] a{min-height:40px}
}
@container (max-width:420px){
  [data-authpane]{padding-inline:16px!important}
  [data-authmobilebrand]>span{font-size:.78rem}
  [data-authback]{font-size:.8rem}
}

@media(prefers-reduced-motion:reduce){[data-bad],[data-badbox]{animation:none}}

/* Password reveal remains a compact control with a complete touch target. */
@media(pointer:coarse){[data-eye]{min-width:44px;min-height:44px!important}[data-checks] label,[data-authpane] label:has(input[type=checkbox]){min-height:44px}}
@media(max-width:600px){[data-authpane]{padding-bottom:calc(16px + env(safe-area-inset-bottom))!important}}

/* Phone refinements keep the desktop form geometry intact. */
@media(max-width:620px){
  html:is([data-product-page="login"],[data-product-page="signup"]) [data-eye]{
    top:1px!important;bottom:1px!important;right:3px!important;transform:none!important;
    min-height:44px!important;padding:0 10px!important;border:0!important;
  }
  /* Each consent row carries its own equal top and bottom padding, so the
     space from the frame to the text is the same above the first row and
     below the last one however many lines the text wraps to. 12+20.4+12 keeps
     a one-line row at the 44px tap target without centring it. */
  html[data-product-page="signup"] [data-checks]{gap:0!important;padding-block:0!important}
  html[data-product-page="signup"] [data-checks] label{box-sizing:border-box;min-height:44px;padding-block:12px;align-items:flex-start}
  /* The owner removed the line under the provider buttons on phones
     (Phase 2.13); the desktop sentence is unchanged. */
  [data-socnote]{display:none}
}
