/* Anonymous entry: customer and admin login, registration, password reset and e-mail verification.
   One system: the header and the content share one centred column (--auth-max); login keeps the hero and
   card, every other screen is a focused card whose h1 is the only title. The signed-in workspace is untouched.
   R6 (redesign V6.2): card frame (12px like the focused cards of V6.2), title (--text-2xl on phones), hover line and phone hero
   sizes come from the V6.2 tokens. Kept on purpose: the white --background (T15-1), the 88% header (portal-topbar-opaque) and the 2px accent focus
   ring, which keeps 5.7:1 against white where the global #93b4ff ring has 2.06:1. */
body.auth-screen{--auth-max:1080px;--auth-gutter:clamp(16px,4vw,40px);--auth-control:max(40px,var(--control-height));--background:#fff}
body.auth-screen .portal-sidebar,body.auth-screen .nav-scrim{display:none}
body.auth-screen .app-frame{display:flex;flex-direction:column;min-height:100vh;min-height:100dvh;margin-left:0}

/* Header: logo and entry switch aligned to the content column edges. */
body.auth-screen .portal-topbar.auth-entry-header{position:relative;z-index:1;flex:0 0 auto;flex-wrap:wrap;height:auto;min-height:64px;padding:var(--space-2) max(var(--auth-gutter),calc((100% - var(--auth-max)) / 2 + var(--auth-gutter)));gap:var(--space-1) var(--space-4);border-bottom:1px solid var(--line);background:rgb(255 255 255 / 88%)}
.auth-entry-brand{display:inline-flex;align-items:center;min-width:0;min-height:44px;border-radius:var(--radius-sm)}
.auth-entry-brand img{display:block;width:240px;max-width:100%;height:auto;mix-blend-mode:multiply;filter:brightness(1.012)} /* D2 (K9-ORCH-354): the 3:1 logo stays legible, at most half its 600 px file; D2b: its opaque 253 to 254 background turns white (brightness) and blends into the header (multiply) */
.auth-entry-tools{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:var(--space-2) var(--space-3);min-width:0;margin-left:auto}
.auth-entry-tools a{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:0 var(--space-3);border:1px solid var(--line);border-radius:var(--radius-control);background:var(--surface);color:var(--ink-2);font-size:var(--text-sm);font-weight:600;line-height:1.3;text-align:center}
.auth-entry-tools a:hover{border-color:var(--accent-line);background:var(--accent-soft);color:var(--accent-hover)}
.auth-entry-tools .customer-locale-switch{gap:var(--space-2);color:var(--muted);font-size:var(--text-xs)}
.auth-entry-tools .customer-locale-switch select{min-height:36px;max-width:148px;border-radius:var(--radius-control);font-size:var(--text-sm)}

/* Content column */
body.auth-screen .workspace{width:100%;max-width:var(--auth-max);flex:1 0 auto;padding:clamp(var(--space-5),4vh,40px) var(--auth-gutter) 0}
body.auth-screen .page-heading{max-width:440px;margin:0 auto var(--space-4)}
body.auth-screen .workspace[data-screen="auth/login"]>.page-heading{display:none}
body.auth-screen .workspace>:is(.notice,.product-refresh-banner){max-width:640px;margin-inline:auto}
body.auth-screen .workspace-footer{color:var(--muted)}
body.auth-screen .portal-toast{left:50%}
body.auth-screen :where(a,button,input,select):focus-visible{outline:2px solid var(--accent);outline-offset:3px}

/* Login landing: hero and card */
.auth-entry-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,420px);align-items:center;gap:clamp(24px,5vw,64px);min-width:0;padding-block:clamp(0px,3vh,32px)}
.auth-entry-intro{min-width:0;max-width:520px}
.auth-entry-eyebrow{margin:0 0 var(--space-2);color:var(--accent-hover);font-size:var(--text-xs);font-weight:700;letter-spacing:.1em;line-height:1.4;text-transform:uppercase}
.auth-entry-intro h1{max-width:16ch;margin:0 0 var(--space-3);color:var(--navy);font-size:clamp(28px,3.4vw,40px);font-weight:750;letter-spacing:-.03em;line-height:1.1;overflow-wrap:break-word}
.auth-entry-lead{max-width:46ch;margin:0 0 var(--space-4);color:var(--muted);font-size:var(--text-lg);line-height:1.5}
.auth-entry-team{max-width:46ch;margin:0 0 var(--space-4);color:var(--ink-2)}
.auth-entry-steps{display:grid;max-width:440px;margin:0 0 var(--space-4);padding:0;list-style:none}
.auth-entry-steps li{display:flex;align-items:center;gap:var(--space-3);min-width:0;padding:var(--space-2) 0;border-top:1px solid var(--line);color:var(--ink);line-height:1.4;overflow-wrap:anywhere}
.auth-entry-steps li:last-child{border-bottom:1px solid var(--line)}
.auth-entry-steps li>span:first-child{display:inline-grid;flex:0 0 28px;width:28px;height:28px;place-items:center;border-radius:var(--radius-sm);background:var(--accent-soft);color:var(--accent-hover);font-size:var(--text-xs);font-weight:700;font-variant-numeric:tabular-nums}
.auth-entry-intro>.notice{max-width:520px;margin:0}

/* Shared card: login card and focused cards use the same frame, title, controls and link row. */
:is(.auth-entry-card,.product-auth){position:relative;width:100%;min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow)}
:is(.auth-entry-card,.product-auth)::before{position:absolute;inset:0 0 auto;height:3px;background:var(--accent);content:""}
.auth-entry-card{justify-self:end}
.auth-entry-card>.panel-body,.product-auth{padding:var(--space-6)}
.product-auth{max-width:440px;margin:0 auto}
.product-auth-wide{max-width:640px}
:is(.auth-entry-card h2,.product-auth>h1){margin:0 0 var(--space-1);color:var(--navy);font-size:var(--text-3xl);font-weight:700;letter-spacing:-.02em;line-height:1.25}
:is(.auth-entry-card>.panel-body>.muted,.product-auth-lead){margin:0 0 var(--space-4);color:var(--muted);font-size:var(--text-sm);line-height:1.5}
:is(.auth-entry-card,.product-auth) .notice{margin:0 0 var(--space-3)}
:is(.auth-entry-card,.product-auth) .field :is(input:not([type=checkbox]):not([type=radio]),select){min-height:var(--auth-control)}
:is(.auth-entry-card,.product-auth) form>.cluster:last-child>.btn-primary{flex:1 1 100%;min-height:var(--auth-control);font-size:var(--text-md)}
.product-auth-actions{display:grid}
.product-auth-actions>.btn{min-height:var(--auth-control);font-size:var(--text-md)}
.product-auth-links{gap:var(--space-1) var(--space-4);margin-top:var(--space-4);padding-top:var(--space-3);border-top:1px solid var(--line-soft);font-size:var(--text-sm);line-height:1.4}
.product-auth-links a{display:inline-flex;align-items:center;min-height:28px;font-weight:500}
.notice .product-auth-links{margin-top:var(--space-2);padding-top:0;border-top:0}
.product-auth-hint{margin:0;color:var(--muted);font-size:var(--text-sm);line-height:1.4}
.product-auth-guest{margin-top:var(--space-2)}
form.stack>.product-auth-hint{margin-top:calc(-1 * var(--space-2))}
.grid-2>.product-auth-hint{align-self:end;padding-bottom:var(--space-3)}

/* Registration groups */
.product-auth-wide form.stack{gap:var(--space-4)}
.product-auth-group{display:grid;gap:var(--space-3);min-width:0}
.product-auth-group+.product-auth-group{padding-top:var(--space-3);border-top:1px solid var(--line-soft)}
.product-auth-group>*{margin-block:0}
.product-auth-group>legend{float:left;width:100%;margin-bottom:calc(-1 * var(--space-1));color:var(--navy);font-size:var(--text-md);font-weight:650}
.product-auth-group .product-price-note{font-size:var(--text-sm)}

@media(max-width:820px){
 .auth-entry-layout{grid-template-columns:minmax(0,1fr);gap:var(--space-6);max-width:440px;margin-inline:auto;padding-block:0}
 .auth-entry-card{order:-1;justify-self:stretch}
 .auth-entry-intro,.auth-entry-steps{max-width:none}
 .auth-entry-intro h1{max-width:none;font-size:clamp(var(--text-3xl),6vw,var(--text-display))}
 :is(.auth-entry-card h2,.product-auth>h1){font-size:var(--text-2xl)}
 .auth-entry-lead{font-size:var(--text-md)}
}
@media(max-width:699px){
 body.auth-screen .portal-topbar.auth-entry-header{min-height:56px;padding-block:6px;column-gap:var(--space-2)}
 .auth-entry-brand img{width:168px}
 .auth-entry-tools{gap:var(--space-2)}
 .auth-entry-tools a{min-height:44px;padding-inline:var(--space-2)}
 .auth-entry-tools .customer-locale-switch>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .auth-entry-tools .customer-locale-switch select{field-sizing:content;min-height:44px;max-width:124px}
 .auth-entry-card>.panel-body,.product-auth{padding:var(--space-5)}
 .product-auth-links a{min-height:44px}
 .product-auth .check-row{min-height:44px}
 .grid-2>.product-auth-hint{margin-top:calc(-1 * var(--space-2));padding-bottom:0}
}
@media(max-width:380px){
 .auth-entry-brand img{width:144px}
 .auth-entry-card>.panel-body,.product-auth{padding:var(--space-4)}
}
/* K9-ORCH-354 B1: tlačidlo Zobraziť a skryť heslo (web/password-visibility.js) vpravo v poli hesla; obal je mimo label, ciele 44 px na mobile. */
.password-field{position:relative;min-width:0;margin:0 0 var(--space-3)}
.password-field>.field{margin:0}
.password-field>.field>.input{padding-right:48px}
:where(.stack,.grid-2,.grid-3)>.password-field{margin-block:0}
.password-toggle{position:absolute;right:4px;bottom:2px;display:inline-flex;align-items:center;justify-content:center;width:36px;height:32px;padding:0;border:0;border-radius:var(--radius-control);background:transparent;color:var(--muted);cursor:pointer}
.password-toggle:hover{background:var(--surface-2);color:var(--ink)}
.password-toggle[aria-pressed="true"]{color:var(--accent)}
.password-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
@media(max-width:699px){.password-toggle{bottom:0;width:44px;height:44px}}
/* PR-27a (PROTO-01/PLAN.md, mapa A61): Nemám prístup v kroku overovacieho kódu (web/views-auth.js). */
.auth-no-access{margin-top:var(--space-3);font-size:var(--text-sm);color:var(--ink-2)}
.auth-no-access>summary{cursor:pointer;color:var(--accent);font-weight:600}
/* PR-26a (PROTO-01/PLAN.md, mapa A62): priebežné pravidlá nového hesla (web/password-rules.js). */
.password-rules{display:grid;gap:2px;margin:0;padding:0;list-style:none;color:var(--muted);font-size:var(--text-sm)}
.password-rules>li::before{content:'\25CB  '}
.password-rules>li[data-met="true"]{color:var(--ink-2)}
.password-rules>li[data-met="true"]::before{content:'\2713  ';color:var(--accent)}
