/* C184 — only five requested visual corrections; baseline C183 (derived from C177).
   1) Consumer corner-control location; 2) Consumer-sized three tabs;
   3) Consumer-weight primary action and common bottom alignment in each auth category;
   4) Recovery inline button proportions; 5) Consumer auth-screen background.
   No card/logo/heading/input/auth/backend changes. */

/* Consumer H277C164 login-screen background, applied only while Forms auth is visible. */
:root[data-theme="dark"] body:has(.forms-auth-shell[data-auth-mode]){
  background:radial-gradient(ellipse at 12% 5%,#17435466,transparent 52%),
             radial-gradient(ellipse at 95% 100%,#173b5b55,transparent 52%),#061522!important;
}
:root[data-theme="light"] body:has(.forms-auth-shell[data-auth-mode]){
  background:#edf7fc!important;
}

/* Corner-control matches Consumer c160-view-toggle geometry and viewport inset. */
.forms-auth-shell[data-auth-mode] > button.forms-portal-theme.forms-login-theme{
  top:clamp(12px,2.2dvh,24px)!important;
  right:clamp(12px,2vw,26px)!important;
  width:36px!important;height:36px!important;
  min-width:36px!important;min-height:36px!important;
  border-radius:11px!important;
}
.forms-auth-shell[data-auth-mode] > button.forms-portal-theme.forms-login-theme svg{
  width:18px!important;height:18px!important;
}

/* Consumer login-modes-c46: total 44px (4px padding + 36px segments). */
.forms-auth-shell[data-auth-type="user"] .forms-auth-card.panel > nav.forms-auth-secondary-tabs{
  height:44px!important;min-height:44px!important;max-height:44px!important;
  padding:4px!important;gap:4px!important;border-radius:12px!important;
  margin-bottom:12px!important;
}
.forms-auth-shell[data-auth-type="user"] .forms-auth-card.panel > nav.forms-auth-secondary-tabs > button{
  height:34px!important;min-height:34px!important;max-height:34px!important;
  padding:0 4px!important;border-radius:8px!important;
  font-size:11px!important;font-weight:650!important;
}

/* Common action slot. Flex layout keeps all existing fields accessible and in order.
   The primary CTA gets remaining free space *above* it, with no absolute overlay. */
.forms-auth-shell[data-auth-type="user"] .forms-auth-card.panel > form#userAuthForm.auth-form{
  display:flex!important;
  flex-direction:column!important;
  flex:1 1 auto!important;
  min-height:0!important;
  margin-bottom:16px!important;
  height:auto!important;
  grid-template-rows:none!important;
  row-gap:12px!important;
  column-gap:0!important;
}
.forms-auth-shell[data-auth-type="user"] .forms-auth-card.panel > form#userAuthForm.auth-form > div{
  flex:0 0 auto!important;
  grid-row:auto!important;
  min-height:0!important;
}
.forms-auth-shell[data-auth-type="user"] .forms-auth-card.panel > form#userAuthForm.auth-form > button[type="submit"]{
  position:static!important;
  grid-row:auto!important;
  align-self:stretch!important;
  flex:0 0 auto!important;
  margin:auto 0 0!important;
  width:100%!important;
  height:52px!important;min-height:52px!important;max-height:52px!important;
  padding:12px 18px!important;
  border-radius:12px!important;
  border:1px solid transparent!important;
  background:#65e6ee!important;
  color:#06232e!important;
  font-size:14px!important;
  font-weight:750!important;
  line-height:1.4!important;
  letter-spacing:.02em!important;
}
/* Permit recovery/registration fields to fit above the common button
   without changing input widths, heights, colors, labels, or semantics. */
.forms-auth-shell[data-auth-type="user"]:is([data-auth-mode="register"],[data-auth-mode="recover"])
 .forms-auth-card.panel > form#userAuthForm.auth-form{
  row-gap:3px!important;
}

/* Recovery code action: compact and aligned to its label, no layout spill. */
.forms-auth-shell[data-auth-type="user"][data-auth-mode="recover"] .forms-c183-recovery-heading{
  gap:8px!important;
  min-height:30px!important;
}
.forms-auth-shell[data-auth-type="user"][data-auth-mode="recover"] .forms-c183-send-code{
  width:auto!important;max-width:48%!important;
  height:30px!important;min-height:30px!important;max-height:30px!important;
  padding:0 10px!important;
  font-size:11px!important;font-weight:700!important;
  border-radius:9px!important;
  white-space:nowrap!important;
}

@media(max-width:700px){
  .forms-auth-shell[data-auth-mode] > button.forms-portal-theme.forms-login-theme{
    top:clamp(12px,2.2dvh,24px)!important;
    right:clamp(12px,2vw,26px)!important;
    width:36px!important;height:36px!important;
    min-width:36px!important;min-height:36px!important;
  }
  .forms-auth-shell[data-auth-type="user"][data-auth-mode="recover"] .forms-c183-send-code{
    padding:0 8px!important;font-size:10px!important;
  }
}
@media(max-height:690px){
  .forms-auth-shell[data-auth-type="user"] .forms-auth-card.panel > form#userAuthForm.auth-form{
    row-gap:6px!important;
  }
  .forms-auth-shell[data-auth-type="user"] .forms-auth-card.panel > form#userAuthForm.auth-form > button[type="submit"]{
    height:44px!important;min-height:44px!important;max-height:44px!important;
  }
  .forms-auth-shell[data-auth-type="user"] .forms-auth-card.panel > nav.forms-auth-secondary-tabs{
    height:40px!important;min-height:40px!important;max-height:40px!important;
  }
  .forms-auth-shell[data-auth-type="user"] .forms-auth-card.panel > nav.forms-auth-secondary-tabs > button{
    height:30px!important;min-height:30px!important;max-height:30px!important;
  }
}

/* Administrator retains its C183 placement and secondary note. */
.forms-auth-shell[data-auth-type="administrator"] .forms-auth-card.panel > form#ownerLoginForm.auth-form > button[type="submit"]{
  font-size:14px!important;font-weight:750!important;line-height:1.4!important;
}
