/* Shared guest shell. Form contracts, captcha and passkeys stay in the core. */
.hw-auth-v2 {
  --auth-bg: var(--bg, #FAFBFF);
  --auth-surface: var(--bg-elevated, #fff);
  --auth-fg: var(--fg-strong, #2B4358);
  --auth-muted: var(--fg-muted, #5D616E);
  --auth-border: var(--border, #E5E8ED);
  --auth-error: color-mix(in srgb, var(--status-error, #D64545) 70%, var(--auth-fg));
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--auth-bg);
  color: var(--auth-fg);
}
.hw-auth-v2, .hw-auth-v2 :is(h1, p, a, label, input, select, button) {
  font-family: var(--font-sans) !important;
}
.hw-auth-v2-header, .hw-auth-v2-footer {
  width: calc(100% - 80px);
  max-width: 1200px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.hw-auth-v2-header { min-height: 96px; padding-right: 40px; border-bottom: 1px solid var(--auth-border); }
.hw-auth-v2-header a, .hw-auth-v2-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--auth-fg); font-size: 14px; }
.hw-auth-v2-header img { width: 180px; height: auto; }
.hw-auth-v2-logo-dark { display: none; }
.dark-mode .hw-auth-v2-logo-light { display: none; }
.dark-mode .hw-auth-v2-logo-dark { display: block; }
.hw-auth-v2-layout {
  width: calc(100% - 80px);
  max-width: 1040px;
  margin: auto;
  padding-block: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: 80px;
  align-items: start;
}
.hw-auth-v2--register .hw-auth-v2-layout { max-width: 1200px; grid-template-columns: minmax(220px, 1fr) minmax(0, 740px); gap: 60px; }
.hw-auth-v2-intro { padding-top: 36px; max-width: 360px; }
.hw-auth-v2-intro p { color: var(--auth-muted); font-size: 16px; line-height: 1.65; }
.hw-auth-v2-intro .hw-auth-v2-caption { font-size: 13px; margin-bottom: 18px; }
.hw-auth-v2-intro .hw-auth-v2-title { color: var(--auth-fg); font-size: clamp(32px, 3vw, 44px); line-height: 1.15; font-weight: 700; letter-spacing: -.025em; margin-bottom: 24px; }
.hw-auth-v2-title span { color: var(--hw-brand-yellow); }
.hw-auth-v2 .hw-auth-form { display: block; min-width: 0; padding: 0; background: transparent; }
.hw-auth-v2 .hw-auth-form .card-wrapper { width: 100%; max-width: none; margin: 0; }
.hw-auth-v2 .hw-auth-form .card { width: 100%; min-width: 0; border: 1px solid var(--auth-border); border-radius: var(--r-lg, 16px); box-shadow: none; background: var(--auth-surface); overflow: visible; }
.hw-auth-v2 .hw-auth-form .card::before, .hw-auth-v2 .hw-auth-form .card::after { content: none; }
.hw-auth-v2 .hw-auth-form .card-header { border: 0; background: transparent; padding: 30px 30px 22px; text-align: left; }
.hw-auth-v2 .card-header h1 { font-size: 30px; line-height: 1.2; margin: 0; color: var(--auth-fg); }
.hw-auth-v2 .hw-auth-form .card-body { padding: 0 30px 30px; }
.hw-auth-v2 .hw-auth-form .card-footer { background: transparent; padding: 20px 30px; border-top: 1px solid var(--auth-border); }
.hw-auth-v2 .card-footer a { display: inline-flex; min-height: 44px; align-items: center; }
.hw-auth-v2 .form-group { margin-bottom: 22px; }
.hw-auth-v2 label { color: var(--auth-fg); font-size: 14px; margin-bottom: 8px; }
.hw-auth-v2 .form-control { min-height: 48px; font-size: 16px; color: var(--auth-fg); background-color: var(--auth-surface); border: 1.5px solid var(--auth-muted); border-radius: var(--r-sm, 8px); padding: 10px 12px; }
.hw-auth-v2 .form-control:focus { border-color: var(--auth-fg); }
.hw-auth-v2 .form-select { appearance: auto; background-image: none; }
.dark-mode .hw-auth-v2 { color-scheme: dark; }
.hw-auth-v2 .form-control:is(.is-invalid, [aria-invalid="true"]), .hw-auth-v2 .was-validated .form-control:invalid { border: 2px solid var(--auth-error); }
.hw-auth-v2 :is(.invalid-feedback, .invalid-tooltip) { color: var(--auth-error); font-size: 13px; font-weight: 600; line-height: 1.5; }
.hw-auth-v2 .alert-danger { color: var(--auth-error); background: var(--auth-surface); border: 1px solid var(--auth-error); }
.hw-auth-v2 .btn { min-height: 48px; font-size: 14px; white-space: normal; }
.hw-auth-v2 .hw-rail-lang { margin-top: 16px; gap: 18px; }
.hw-auth-v2 .hw-rail-lang-item { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.hw-auth-v2 .hw-text-devider { font-size: 18px; color: var(--auth-fg); margin-top: 28px !important; margin-bottom: 20px !important; }
.hw-auth-v2 .hw-auth-form .form-check { padding-top: 4px; padding-bottom: 4px; }
.hw-auth-v2 .hw-auth-form .form-check-input { width: 20px; height: 20px; }
/* The core leaves an empty column where the language control used to be. */
.hw-auth-v2--register #authRegisterForm > .row:has(select[name="salutation"]) > .col-md:not(:has(.form-group)) { display: none; }
.hw-auth-v2 .hw-newsletter-list-selection .form-check { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; column-gap: 12px; padding-left: 0; }
.hw-auth-v2 .hw-newsletter-list-selection .form-check-input { float: none; margin: 2px 0 0; }
.hw-auth-v2 .hw-newsletter-list-selection .form-check-label { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.hw-auth-v2-footer { padding-block: 16px; border-top: 1px solid var(--auth-border); color: var(--auth-muted); font-size: 12px; flex-wrap: wrap; }
.hw-auth-v2-footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
.hw-auth-v2-footer a { font-size: 12px; text-decoration: underline; }
/* Flash messages share the form column; an empty wrapper occupies no space. */
.hw-auth-v2 .hw-auth-form > .hw-alerting-wrapper { width: 100%; max-width: none; margin: 0; }
.hw-auth-v2 .hw-alerting-wrapper > .alert { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 20px; }
.hw-auth-v2 .hw-alerting-wrapper .alert-content { flex: 1; min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 721px) {
  .hw-auth-v2--register .row > .col-md { flex: 0 0 50%; width: 50%; }
  .hw-auth-v2--register #authRegisterForm > .row:has(select[name="salutation"]) > .col-md:has(select[name="salutation"]) { flex-basis: 100%; width: 100%; }
}
@media (max-width: 1000px) {
  .hw-auth-v2-layout { display: block; max-width: 440px; }
  .hw-auth-v2--register .hw-auth-v2-layout { max-width: 740px; }
  .hw-auth-v2-intro { display: none; }
}
@media (max-width: 720px) {
  .hw-auth-v2-header, .hw-auth-v2-footer, .hw-auth-v2-layout { width: calc(100% - 40px); }
  .hw-auth-v2-header { min-height: 88px; padding-right: 44px; flex-wrap: wrap; gap: 0 16px; padding-block: 10px; }
  .hw-auth-v2-header img { width: 148px; }
  .hw-auth-v2-header a { font-size: 12px; }
  .hw-auth-v2-layout { display: block; padding-block: 28px; margin-block: 0 auto; }
  .hw-auth-v2-intro { display: none; }
  .hw-auth-v2 .hw-auth-form .card { border: 0; border-radius: 0; background: transparent; }
  .hw-auth-v2 .hw-auth-form .card-header { padding: 0 0 24px; }
  .hw-auth-v2 .hw-auth-form .card-body { padding: 0 0 24px; }
  .hw-auth-v2 .hw-auth-form .card-footer { padding: 20px 0; text-align: left; }
  .hw-auth-v2 .card-header h1 { font-size: 28px; }
  .hw-auth-v2--register .row > [class*="col-md"] { flex: 0 0 100%; width: 100%; }
}
