/**
 * Authentication Styles for AlgoPaca (Login & Sign Up)
 * Sleek Cyberpunk/Dark Glassmorphic Trading Desk Theme
 */

.auth-body {
  /* One accent for everything interactive on the auth surface: focus rings, the
     primary CTA, the modal chrome. Copper (--copper) stays the app-wide brand
     colour elsewhere; mixing the two inside a single dialog read as a bug. */
  --auth-accent: #f7b731;
  --auth-accent-deep: #e58e26;
  --auth-accent-rgb: 247, 183, 49;

  /* One rounding scale, softest to tightest: pill controls, soft surfaces,
     tight insets. Every radius below picks from these three. */
  --auth-r-control: 9999px;
  --auth-r-surface: 1.5rem;
  --auth-r-inset: 0.85rem;

  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  padding: 1.25rem;
  padding-top: calc(max(1.25rem, env(safe-area-inset-top)) + 3rem);
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
  background: var(--ink);
  position: relative;
  overflow-x: hidden;
  touch-action: manipulation;
}

.auth-top-bar {
  position: absolute;
  top: max(1.25rem, env(safe-area-inset-top));
  right: max(1.5rem, env(safe-area-inset-right));
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.auth-top-bar .lang-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.auth-top-bar select.lang-select {
  background-color: var(--panel-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%238a9ba8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(212, 137, 76, 0.35);
  border-radius: var(--radius-sm, 0.5rem);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.76rem;
  min-height: 2.25rem;
  padding: 0.38rem 1.45rem 0.38rem 1.65rem;
  outline: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.auth-top-bar select.lang-select:hover {
  border-color: var(--copper);
  background-color: var(--panel);
}

.auth-top-bar select.lang-select:focus-visible {
  border-color: var(--copper);
  background-color: var(--panel);
  box-shadow: 0 0 0 3px rgba(212, 137, 76, 0.28);
}

.auth-top-bar select.lang-select.hidden-select {
  display: none !important;
}

.auth-top-bar .lang-switcher .nice-select {
  background-color: var(--panel-bg);
  background-image: none !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(212, 137, 76, 0.35);
  border-radius: var(--radius-sm, 0.5rem);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.76rem;
  min-height: 2.25rem;
  height: 2.25rem;
  line-height: 2.25rem;
  padding-left: 1.75rem;
  padding-right: 1.45rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.auth-top-bar .lang-switcher .nice-select:hover,
.auth-top-bar .lang-switcher .nice-select:focus,
.auth-top-bar .lang-switcher .nice-select.open {
  border-color: var(--copper);
  background-color: var(--panel);
  box-shadow: 0 0 0 3px rgba(212, 137, 76, 0.28);
}

.auth-top-bar .lang-switcher .nice-select .nice-select-dropdown {
  top: calc(100% + 6px);
  bottom: auto;
  right: 0;
  left: auto;
  min-width: 130px;
  max-width: calc(100vw - 1.5rem);
  transform-origin: top right;
  border-color: rgba(212, 137, 76, 0.35);
}

.auth-top-bar select.lang-select option {
  background: var(--panel-bg);
  color: var(--text);
}

.auth-container {
  width: 100%;
  max-width: 520px;
  position: relative;
  z-index: 10;
  margin: auto;
  transition: max-width 0.3s ease;
}

.auth-container.has-showcase,
.auth-body:has(.auth-showcase-panel) .auth-container {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 0;
}

@media (min-width: 1060px) {
  .auth-body {
    justify-content: center;
    padding: 1.25rem 1.5rem;
  }

  .auth-container.has-showcase,
  .auth-body:has(.auth-showcase-panel) .auth-container {
    width: 100%;
    max-width: 1720px;
    margin: 0 auto;
    min-height: calc(100vh - 4rem);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(400px, 460px);
    gap: 2rem;
    align-items: start;
    background: var(--panel-bg);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid var(--line-soft);
    border-radius: 2rem;
    padding: 2.25rem 2.25rem;
    box-shadow:
      0 32px 80px rgba(0, 0, 0, 0.75),
      0 0 50px rgba(212, 137, 76, 0.1),
      inset 0 1px 0 var(--line-soft);
  }

  .auth-container.has-showcase .auth-showcase-panel {
    order: 1;
    grid-column: 1;
    grid-row: 1;
  }

  .auth-container.has-showcase .auth-card {
    order: 2;
    grid-column: 2;
    grid-row: 1;
    background: var(--panel);
    border: 1px solid rgba(247, 183, 49, 0.25);
    border-radius: 1.6rem;
    box-shadow:
      0 28px 70px rgba(0, 0, 0, 0.75),
      0 0 45px rgba(247, 183, 49, 0.12),
      inset 0 1px 0 var(--line-soft);
    padding: 2.5rem 2.25rem 2.25rem;
    position: sticky;
    top: 2rem;
  }
}

@media (min-width: 1440px) {
  .auth-body {
    padding: 1.75rem 2.5rem;
  }

  .auth-container.has-showcase,
  .auth-body:has(.auth-showcase-panel) .auth-container {
    grid-template-columns: minmax(0, 1fr) minmax(430px, 480px);
    gap: 2.5rem;
    padding: 2.5rem 2.75rem;
  }
}

/* Form Card */
.auth-card {
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--panel);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--line-soft);
  border-radius: 1.5rem;
  padding: 2.25rem 2.25rem 2rem;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 var(--line-soft);
  overflow: hidden;
}

/* Brand Capsule Pill */
.auth-brand-wrap,
.auth-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 1.05rem 0.45rem 0.55rem;
  background: var(--surface-soft);
  border: 1px solid var(--line-soft);
  border-radius: 9999px;
  text-decoration: none;
  width: fit-content;
  margin-bottom: 1.6rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
}

.auth-brand-wrap:focus-visible,
.auth-brand-pill:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
}

.auth-brand-wrap:hover,
.auth-brand-pill:hover {
  background: rgba(247, 183, 49, 0.08);
  border-color: rgba(247, 183, 49, 0.4);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), 0 0 20px rgba(247, 183, 49, 0.15);
}

.auth-brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  filter: drop-shadow(0 0 8px rgba(212, 137, 76, 0.4));
  transition: transform 0.2s ease;
}

.auth-brand-wrap:hover .auth-brand-logo,
.auth-brand-pill:hover .auth-brand-logo {
  transform: scale(1.06) rotate(-2deg);
}

.auth-brand-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.auth-brand-title {
  font-family: var(--ui), sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.auth-brand-eyebrow,
.auth-brand-badge {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--auth-accent) 45%, var(--text));
  background: rgba(247, 183, 49, 0.12);
  border: 1px solid rgba(247, 183, 49, 0.25);
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  margin: 0;
}

/* Header & Hierarchy */
.auth-header {
  text-align: left;
  margin-bottom: 1.75rem;
  padding-top: 0;
  border-top: none;
}

.auth-header h1 {
  font-family: var(--ui), sans-serif;
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.auth-header p {
  color: #8b99ad;
  font-size: 0.88rem;
  margin: 0;
  max-width: 36ch;
  line-height: 1.55;
  text-wrap: pretty;
}

/* 100% Free & Zero Commission Highlight Banner */
.auth-free-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  margin-top: 1.15rem;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(247, 183, 49, 0.06) 100%);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 0.85rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.auth-free-banner-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-free-banner-icon svg {
  width: 14px;
  height: 14px;
}

.auth-free-banner-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.auth-free-banner-title {
  font-family: var(--ui), sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: #4ade80;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.auth-free-banner-desc {
  font-size: 0.69rem;
  color: #94a3b8;
  line-height: 1.35;
  margin: 0;
}

/* Alert Message Banner */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.8rem 1rem;
  border-radius: 1rem;
  font-size: 0.82rem;
  line-height: 1.4;
  margin-bottom: 1.25rem;
  font-family: var(--ui);
  scroll-margin-top: 1.5rem;
  animation: authFadeIn 0.25s ease-out;
}

.auth-alert[hidden] {
  display: none;
}

.auth-alert-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

.auth-alert.is-error {
  background: rgba(227, 93, 93, 0.15);
  border: 1px solid rgba(227, 93, 93, 0.45);
  color: var(--error-soft, #ffd7d7);
}

.auth-alert.is-success {
  background: rgba(63, 191, 143, 0.15);
  border: 1px solid rgba(63, 191, 143, 0.45);
  color: var(--buy);
}

.auth-alert.is-info {
  background: color-mix(in srgb, var(--copper) 12%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--copper) 40%, transparent);
  color: var(--text);
}

/* Escape hatch shown when an active session is detected */
.auth-switch-account {
  margin: -0.75rem 0 1.25rem;
  text-align: left;
  font-size: 0.8rem;
}

.auth-switch-account[hidden] {
  display: none;
}

/* Form Layout */
.auth-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 1.25rem;
  scroll-margin-top: 1.5rem;
}

/* Extra air ahead of the primary action */
.auth-form > .btn-auth-submit {
  margin-top: 0.65rem;
}

/* Skip-link target */
.auth-form:focus {
  outline: none;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a9bb2;
  font-weight: 600;
  /* Flush with the card edge so the label shares a left edge with the heading
     and body copy. The old 0.6rem inset aligned with nothing: the input's text
     starts at 3.05rem, past the icon. */
  padding: 0;
}

.auth-label-hint {
  font-size: 0.65rem;
  color: color-mix(in srgb, var(--auth-accent) 45%, var(--text));
  text-transform: none;
  letter-spacing: normal;
  flex-shrink: 0;
  font-weight: 500;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.auth-input-icon {
  position: absolute;
  left: 1.2rem;
  width: 17px;
  height: 17px;
  color: #5d6e82;
  pointer-events: none;
  transition: color 0.2s ease;
}

.auth-input {
  width: 100%;
  min-height: 3.35rem;
  background: var(--input-bg);
  /* 0.12 left the pill's edge at 1.3:1 against the card - effectively
     invisible. The field is still identified mainly by its darker fill and
     its label; this just gives the boundary a readable edge. */
  border: 1px solid var(--line);
  border-radius: var(--auth-r-control);
  color: var(--text);
  font-family: var(--ui), sans-serif;
  font-size: 0.95rem;
  padding: 0.8rem 1.25rem 0.8rem 3.05rem;
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-input::placeholder {
  /* 4.6:1 against the #0d141f field. The old #505f72 sat at 2.8:1, and the
     placeholder is the only place the expected format is shown. */
  color: #6f8098;
}

.auth-input:focus {
  border-color: var(--auth-accent);
  background: var(--input-bg);
  box-shadow:
    0 0 0 3px rgba(var(--auth-accent-rgb), 0.24),
    0 0 20px rgba(var(--auth-accent-rgb), 0.12),
    inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.auth-input.has-error {
  border-color: var(--sell);
  box-shadow: 0 0 0 3px rgba(227, 93, 93, 0.22);
}

.auth-input.has-success {
  border-color: var(--buy);
}

.auth-input-wrapper:focus-within .auth-input-icon {
  color: var(--auth-accent);
}

.auth-field-error {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--error-soft, #ffd7d7);
}

.auth-field-error[hidden] {
  display: none;
}

.auth-field-hint {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--muted);
}

.auth-field-hint.is-success {
  color: var(--buy);
}

.auth-field-hint.is-error {
  color: var(--error-soft, #ffd7d7);
}

.auth-field-hint[hidden] {
  display: none;
}

.auth-caps-hint {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--warn);
}

.auth-caps-hint[hidden] {
  display: none;
}

/* Password Toggle */
.auth-input-wrapper.has-toggle .auth-input {
  padding-right: 3.1rem;
}

.pw-toggle-btn {
  position: absolute;
  right: 0.45rem;
  background: transparent;
  border: none;
  color: #728296;
  cursor: pointer;
  padding: 0;
  width: 2.45rem;
  height: 2.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  min-height: 2.45rem;
  min-width: 2.45rem;
  transition: color 0.15s ease, background 0.15s ease;
}

.pw-toggle-btn:hover {
  color: var(--text);
  background: var(--surface-soft);
  transform: none;
}

.pw-toggle-btn:focus-visible {
  outline: 2px solid var(--auth-accent);
  outline-offset: 1px;
  color: var(--text);
}

.pw-toggle-btn.is-active {
  color: var(--auth-accent);
}

.pw-toggle-btn svg {
  width: 17px;
  height: 17px;
  pointer-events: none;
  flex-shrink: 0;
}

.pw-toggle-btn svg[hidden],
.pw-toggle-btn [hidden] {
  display: none !important;
}

/* Password Strength Indicator */
/* Feedback on the field above it, so it stays inside that field's visual
   group: quieter than the input, never a panel of its own. */
.strength-meter {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.2rem;
  padding: 0.65rem 0.8rem;
  background: color-mix(in srgb, var(--panel-bg) 62%, var(--ink));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm, 0.5rem);
}

.strength-meter[hidden] {
  display: none;
}

.strength-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.strength-score-label {
  font-weight: 600;
  transition: color 0.2s ease;
}

.strength-score-label[data-score="0"],
.strength-score-label[data-score="1"] {
  color: var(--sell);
}

.strength-score-label[data-score="2"] {
  color: var(--warn);
}

.strength-score-label[data-score="3"] {
  color: color-mix(in srgb, var(--buy) 70%, var(--warn) 30%);
}

.strength-score-label[data-score="4"] {
  color: var(--buy);
}

.strength-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  height: 4px;
}

.strength-bar-segment {
  height: 100%;
  background: var(--surface-soft);
  border-radius: 2px;
  transition: background 0.25s ease;
}

.strength-meter[data-score="1"] .strength-bar-segment:nth-child(1) {
  background: var(--sell);
}

.strength-meter[data-score="2"] .strength-bar-segment:nth-child(-n+2) {
  background: var(--warn);
}

.strength-meter[data-score="3"] .strength-bar-segment:nth-child(-n+3) {
  background: #72d6a4;
}

.strength-meter[data-score="4"] .strength-bar-segment:nth-child(-n+4) {
  background: var(--buy);
}

.strength-tips-label {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--muted);
}

.strength-rules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.65rem;
  margin: 0;
  list-style: none;
  padding: 0;
}

.rule-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--muted);
  transition: color 0.2s ease;
}

.rule-icon {
  width: 12px;
  height: 12px;
  color: var(--muted);
  flex-shrink: 0;
}

.rule-icon .rule-done {
  display: none;
}

.rule-item.is-valid {
  color: var(--buy);
}

.rule-item.is-valid .rule-icon {
  color: var(--buy);
}

.rule-item.is-valid .rule-pending {
  display: none;
}

.rule-item.is-valid .rule-done {
  display: inline;
}

/* Row options (Remember me, etc.) */
.auth-row-options {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.15rem 0 0.15rem;
}

.auth-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  cursor: pointer;
  user-select: none;
  font-family: var(--ui);
  color: var(--text);
  min-height: 2.5rem;
}

.auth-checkbox-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding-top: 0.15rem;
}

.auth-checkbox-hint {
  font-size: 0.7rem;
  color: var(--muted);
}

.auth-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 0.15rem;
  background: var(--input-bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.auth-checkbox:checked {
  background: var(--auth-accent);
  border-color: var(--auth-accent);
}

.auth-checkbox:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #101823;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.auth-checkbox:focus-visible {
  box-shadow: 0 0 0 3px rgba(var(--auth-accent-rgb), 0.4);
}

.auth-forgot-btn {
  background: none;
  border: none;
  padding: 0.35rem 0;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
  min-height: 2.5rem;
}

.auth-text-link {
  color: var(--copper);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease, text-decoration 0.15s ease;
}

.auth-text-link:hover {
  color: var(--copper-deep);
  text-decoration: underline;
}

.auth-text-link:focus-visible {
  outline: 2px solid var(--auth-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Inline notice (paper-trading disclosure) */
.auth-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.25rem 0 0.25rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(212, 137, 76, 0.22);
  border-left: 3px solid var(--copper);
  border-radius: var(--radius-sm, 0.5rem);
  background: var(--panel-bg);
  color: #94a3b8;
  font-size: 0.76rem;
  line-height: 1.45;
  text-wrap: pretty;
}

.auth-notice-icon {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  margin-top: 2px;
  color: var(--copper);
}

/* Small footnote directly under a submit button */
.auth-form-note {
  margin: -0.45rem 0 0;
  text-align: center;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #8492a6;
}

/* Action Buttons */
.btn-auth-submit {
  width: 100%;
  min-height: 3.35rem;
  background: linear-gradient(135deg, var(--auth-accent) 0%, var(--auth-accent-deep) 100%);
  color: #0c1219;
  font-family: var(--ui), sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  border: none;
  border-radius: var(--auth-r-control);
  /* A lift, not a light source. The old 24px/0.4 glow bled past the card and
     implied lighting nothing else in the dialog obeyed. */
  box-shadow:
    0 6px 16px rgba(230, 142, 38, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1), filter 0.18s ease, opacity 0.15s ease;
}

.btn-auth-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow:
    0 10px 24px rgba(230, 142, 38, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  filter: brightness(1.06);
}

.btn-auth-submit:active:not(:disabled) {
  transform: translateY(0);
  box-shadow:
    0 3px 10px rgba(230, 142, 38, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-auth-submit:focus-visible {
  outline: 2px solid var(--auth-accent);
  outline-offset: 3px;
}

.btn-auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(12, 18, 25, 0.3);
  border-top-color: #0c1219;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}

/* Card Footer & Navigation Switch */
.auth-switch {
  text-align: center;
  font-size: 0.84rem;
  color: #8b99ad;
  margin-top: 1.35rem;
  padding-top: 0;
}

.auth-switch .auth-text-link {
  color: color-mix(in srgb, var(--auth-accent) 45%, var(--text));
  font-weight: 600;
}

/* Animations */
@keyframes authFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-alert,
  .auth-brand-logo,
  .auth-input,
  .pw-toggle-btn,
  .btn-auth-submit,
  .strength-bar-segment,
  .rule-item,
  .strength-score-label,
  .auth-showcase-panel,
  .showcase-engine-panel,
  .auth-modal-backdrop,
  .auth-modal-dialog,
  .pillar-card::before,
  .pillar-card::after,
  .pillar-icon-box,
  .engine-tab-indicator,
  .pulse-dot {
    animation: none;
    transition: none;
  }

  .auth-brand-wrap:hover .auth-brand-logo,
  .btn-auth-submit:hover:not(:disabled),
  .stat-pill:hover,
  .pillar-card:hover,
  .showcase-action-btn:hover {
    transform: none;
  }

  .btn-spinner {
    animation: none;
    border-top-color: transparent;
  }
}

/* Note: Consolidated Mobile & Tablet Responsiveness is at the bottom of the stylesheet */

/* Forgot Password Modal */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  /* A phone in landscape is shorter than the dialog; without this the submit
     button is unreachable because the page behind is scroll-locked. */
  overflow-y: auto;
  overscroll-behavior: contain;
}

.auth-modal[hidden] {
  display: none;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 16, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: authBackdropFade 0.25s ease-out;
}

.auth-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: auto;
  background: var(--panel);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(var(--auth-accent-rgb), 0.22);
  border-radius: var(--auth-r-surface);
  padding: 2rem;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.8),
    0 0 50px rgba(var(--auth-accent-rgb), 0.1),
    inset 0 1px 0 var(--line-soft);
  z-index: 101;
  animation: authModalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-modal-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--auth-r-inset);
  background: rgba(var(--auth-accent-rgb), 0.12);
  border: 1px solid rgba(var(--auth-accent-rgb), 0.28);
  color: var(--auth-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px rgba(var(--auth-accent-rgb), 0.14);
  margin-bottom: 1.25rem;
}

/* Sits on the badge's optical centre line: 2rem card padding + (44px badge
   - 36px button) / 2. Previously it floated 12px higher and tipped the whole
   top row. */
.auth-modal-close {
  position: absolute;
  top: calc(2rem + 4px);
  right: 1.5rem;
  /* A dismiss control should not out-shout the title. Ghost by default; the
     surface only appears on hover/focus. */
  background: transparent;
  border: 1px solid transparent;
  color: #8a9bb2;
  cursor: pointer;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: var(--auth-r-control);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 10;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.auth-modal-close svg {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  /* currentColor, so the button's own state drives the icon. */
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  fill: none !important;
  display: block !important;
  pointer-events: none;
}

.auth-modal-close:hover,
.auth-modal-close:focus-visible {
  color: var(--text, #f8fafc);
  background: var(--surface-soft);
  border-color: var(--line-soft);
}

.auth-modal-close:focus-visible {
  outline: 2px solid var(--auth-accent);
  outline-offset: 2px;
}

/* Spacing below snaps to a 4px grid (0.5/1/1.5rem) instead of the previous
   ad-hoc 1.35/1.25/0.65/0.35 mix. */
.auth-modal-header {
  margin-bottom: 1.5rem;
  /* Keep the heading clear of the close button on narrow dialogs. */
  padding-right: 2.5rem;
}

.auth-modal-header h2 {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text, #f8fafc);
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

.auth-modal-desc {
  color: var(--muted, #94a3b8);
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0;
}

.auth-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.auth-modal-actions .btn-auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-modal-cancel-btn {
  background: transparent;
  border: none;
  color: var(--muted, #94a3b8);
  font-family: var(--ui);
  font-size: 0.88rem;
  font-weight: 500;
  /* Full-width 44px target: on touch it is the reliable way out, since the
     corner X is a small hit area. */
  min-height: 44px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: var(--auth-r-control);
  transition: color 0.15s ease, background 0.15s ease;
}

.auth-modal-cancel-btn:hover {
  color: var(--text, #f8fafc);
  background: var(--surface-soft);
}

.auth-modal-cancel-btn:focus-visible {
  outline: 2px solid var(--auth-accent);
  outline-offset: 2px;
}

.btn-submit-icon {
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.btn-auth-submit:hover .btn-submit-icon {
  transform: translateX(2px) translateY(-2px);
}

@keyframes authBackdropFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes authModalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ==========================================================================
   Features Showcase Panel Styles (Trading Desk Information & Capabilities)
   ========================================================================== */

/* Deliberately flatter and cooler than .auth-card: no copper glow, a plain
   neutral border and a shallower shadow, so the wider column still reads as
   the background layer of the page. */
.auth-showcase-panel {
  height: 100%;
  position: relative;
  background: color-mix(in srgb, var(--panel-bg) 58%, var(--ink));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line-soft);
  border-radius: 1.75rem;
  padding: 2.35rem 2.5rem 2.25rem;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 1.85rem;
  overflow: hidden;
  animation: authFadeIn 0.35s ease-out;
}

.auth-showcase-panel::before {
  display: none;
}

.showcase-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.showcase-eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8c9cb0;
  background: var(--surface-soft);
  border: 1px solid var(--line-soft);
  border-radius: 9999px;
  padding: 0.28rem 0.85rem;
  margin-bottom: 0.95rem;
  box-shadow: none;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f7b731;
  box-shadow: 0 0 6px rgba(247, 183, 49, 0.6);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
    box-shadow: 0 0 10px #f7b731;
  }
}

.showcase-heading {
  font-family: var(--ui), sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.showcase-desc {
  font-size: 0.84rem;
  line-height: 1.6;
  color: #64748b;
  margin: 0;
  max-width: 68ch;
  text-wrap: pretty;
}

/* Key Stats Strip - Subdued */
.showcase-stats-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: #718096;
  background: var(--surface-soft);
  border: 1px solid var(--line-soft);
  border-radius: 9999px;
  padding: 0.4rem 0.85rem;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.stat-pill:hover {
  border-color: rgba(247, 183, 49, 0.3);
  background-color: rgba(247, 183, 49, 0.06);
  color: var(--auth-accent);
  transform: translateY(-1px);
}

.stat-icon {
  width: 13px;
  height: 13px;
  color: #8c9cb0;
  flex-shrink: 0;
}

/* 5 Strategy Engines Module - Subdued */
.showcase-engines-module {
  background: color-mix(in srgb, var(--panel-bg) 55%, var(--ink));
  border: 1px solid var(--line-soft);
  border-radius: 1.25rem;
  padding: 1.5rem 1.6rem;
  box-shadow: none;
  position: relative;
  overflow: hidden;
}

.showcase-engines-module::before {
  display: none;
}

.engines-module-header {
  margin-bottom: 1.15rem;
}

.engines-module-title {
  font-family: var(--ui);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0 0 0.25rem;
}

.engines-module-sub {
  font-size: 0.78rem;
  color: #5d6b7d;
  margin: 0;
  line-height: 1.45;
}

.showcase-engine-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 4px 0.55rem 4px;
  margin: -4px -4px calc(1rem - 4px) -4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-padding: 4px;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 2.25rem), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 2.25rem), transparent 100%);
}

.showcase-engine-tabs::-webkit-scrollbar {
  display: none;
}

.engine-tab-btn {
  position: relative;
  background: color-mix(in srgb, var(--panel-bg) 65%, var(--ink));
  border: 1px solid var(--line-soft);
  border-radius: 9999px;
  color: #8da2b5;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  padding: 0.42rem 0.95rem 0.48rem;
  min-height: 2.3rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  flex-shrink: 0;
  scroll-snap-align: start;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  user-select: none;
}

/* Built-in recessed track at the bottom of every pill */
.engine-tab-btn::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  height: 2.5px;
  background: var(--line-soft);
  border-radius: 0 0 9999px 9999px;
  transition: background 0.2s ease;
  pointer-events: none;
  z-index: 1;
}

/* Status Indicator Dot inside pill */
.engine-tab-indicator {
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: #475569;
  box-shadow: 0 0 0 1px var(--line-soft);
  transition: all 0.22s ease;
  flex-shrink: 0;
  position: relative;
  z-index: 3;
}

/* Dynamic Live Progress Bar */
.engine-tab-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2.5px;
  background: linear-gradient(90deg, #f59e0b 0%, #f7b731 55%, #fef08a 100%);
  box-shadow: 0 0 10px rgba(247, 183, 49, 0.95), 0 -1px 3px rgba(247, 183, 49, 0.4);
  transform-origin: 0% 50%;
  transform: scaleX(0);
  opacity: 0;
  pointer-events: none;
  border-radius: 9999px;
  z-index: 2;
}

/* Hover State */
.engine-tab-btn:hover {
  background: rgba(247, 183, 49, 0.06);
  border-color: rgba(247, 183, 49, 0.35);
  color: var(--auth-accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 12px rgba(247, 183, 49, 0.08);
  z-index: 2;
}

.engine-tab-btn:hover::before {
  background: rgba(247, 183, 49, 0.18);
}

.engine-tab-btn:hover .engine-tab-indicator {
  background: #f7b731;
  box-shadow: 0 0 6px rgba(247, 183, 49, 0.5);
}

/* Focus Visible */
.engine-tab-btn:focus-visible {
  outline: 2px solid #f7b731;
  outline-offset: 2px;
  border-color: rgba(247, 183, 49, 0.85);
  z-index: 3;
}

/* Active State */
.engine-tab-btn.is-active {
  background: linear-gradient(180deg, rgba(247, 183, 49, 0.14) 0%, rgba(247, 183, 49, 0.04) 100%);
  border-color: rgba(247, 183, 49, 0.65);
  color: color-mix(in srgb, var(--auth-accent) 55%, var(--text));
  font-weight: 600;
  transform: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), 0 0 16px rgba(247, 183, 49, 0.12), inset 0 1px 0 var(--line-soft);
  z-index: 2;
}

.engine-tab-btn.is-active::before {
  background: rgba(247, 183, 49, 0.15);
}

.engine-tab-btn.is-active:hover {
  border-color: rgba(247, 183, 49, 0.85);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 20px rgba(247, 183, 49, 0.2), inset 0 1px 0 var(--line-soft);
}

.engine-tab-btn.is-active .engine-tab-indicator {
  background: #f7b731;
  box-shadow: 0 0 8px rgba(247, 183, 49, 0.85);
  animation: engineDotGlow 2.5s ease-in-out infinite;
}

.engine-tab-btn.is-active .engine-tab-progress {
  opacity: 1;
  animation: engineTabProgress 4.5s linear forwards;
}

.showcase-engines-module.is-paused .engine-tab-btn.is-active .engine-tab-progress,
.showcase-engines-module:hover .engine-tab-btn.is-active .engine-tab-progress,
.showcase-engines-module:focus-within .engine-tab-btn.is-active .engine-tab-progress {
  animation-play-state: paused;
}

@keyframes engineTabProgress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes engineDotGlow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(247, 183, 49, 0.6);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 9px rgba(247, 183, 49, 0.95);
    transform: scale(1.18);
  }
}

/* Engine Panels */
.showcase-engine-panels {
  min-height: 140px;
}

.showcase-engine-panel {
  display: none;
  animation: enginePanelFade 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.showcase-engine-panel.is-active {
  display: block;
}

@keyframes enginePanelFade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.engine-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.engine-tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8c9cb0;
  background: var(--surface-soft);
  border: 1px solid var(--line-soft);
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
}

.engine-status-chip {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: #10b981;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
  opacity: 0.85;
}

.status-dot-pulse {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

/* Distinguished by the serif face rather than by size, so it stays clearly
   subordinate to the module heading it lives under. */
.engine-panel-title {
  font-family: var(--display);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin: 0 0 0.3rem;
}

.engine-panel-desc {
  font-size: 0.78rem;
  line-height: 1.5;
  color: #64748b;
  margin: 0 0 0.8rem;
}

.engine-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.engine-feature-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-family: var(--mono);
  color: #8c9cb0;
  background: var(--surface-soft);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 0.25rem 0.55rem;
}

.engine-feature-badge svg {
  width: 12px;
  height: 12px;
  color: #8c9cb0;
  flex-shrink: 0;
}

/* Institutional Core Pillars Grid - Subdued */
.showcase-pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

/* Icon sits on its own row above the copy, so long titles get the card's full
   width instead of wrapping into a narrow column beside the icon. */
.pillar-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  isolation: isolate;
  overflow: hidden;
  background: color-mix(in srgb, var(--panel-bg) 55%, var(--ink));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md, 0.85rem);
  padding: 1.2rem 1.2rem 1.3rem;
  box-shadow: none;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.pillar-card::before,
.pillar-card::after {
  display: none;
}

.pillar-card:hover {
  border-color: rgba(247, 183, 49, 0.25);
  transform: translateY(-2px);
}

.pillar-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line-soft);
  color: #8c9cb0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.pillar-card:hover .pillar-icon-box {
  border-color: rgba(247, 183, 49, 0.4);
  color: color-mix(in srgb, var(--auth-accent) 55%, var(--text));
}

.pillar-icon-box svg {
  width: 17px;
  height: 17px;
}

.pillar-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pillar-title {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: #94a3b8;
  text-wrap: balance;
  margin: 0;
}

/* Every description occupies exactly five lines: shorter copy reserves the
   space via min-height so the three cards stay level, longer copy is clamped
   so it cannot push one card taller than the others. */
.pillar-desc {
  --pillar-desc-lines: 5;
  font-size: 0.74rem;
  line-height: 1.55;
  color: #556579;
  text-wrap: pretty;
  margin: 0;
  min-height: calc(var(--pillar-desc-lines) * 1.55em);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--pillar-desc-lines);
  line-clamp: var(--pillar-desc-lines);
  overflow: hidden;
}

/* Trust Badges & Action Links */
.showcase-footer-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-soft);
}

.showcase-links-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.showcase-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--copper);
  background: rgba(212, 137, 76, 0.12);
  border: 1px solid rgba(212, 137, 76, 0.35);
  border-radius: var(--radius-sm, 0.5rem);
  padding: 0.52rem 0.95rem;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.showcase-action-btn:hover {
  background: rgba(212, 137, 76, 0.22);
  border-color: var(--copper);
  color: var(--copper);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(212, 137, 76, 0.25);
}

.showcase-action-btn:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}

.showcase-action-btn.secondary {
  background: var(--surface-soft);
  border-color: var(--line-soft);
  color: var(--text);
  box-shadow: none;
}

.showcase-action-btn.secondary:hover {
  background: var(--line-soft);
  border-color: rgba(212, 137, 76, 0.4);
  color: var(--text);
  transform: translateY(-1px);
}

.showcase-action-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.showcase-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.trust-badge svg {
  width: 13px;
  height: 13px;
  color: var(--buy);
  flex-shrink: 0;
}

/* ==========================================================================
   Responsive Breakpoints & Mobile Optimization
   ========================================================================== */

/* Tablet & Medium Screens (<= 1059px) */
@media (max-width: 1059px) {
  .auth-showcase-panel {
    padding: 1.75rem 1.5rem 1.5rem;
  }

  .showcase-heading {
    font-size: 1.3rem;
  }

  .showcase-pillars-grid {
    gap: 0.75rem;
  }

  .pillar-card {
    padding: 1rem 0.95rem 1.05rem;
  }
}

/* Phablets & Small Tablets (<= 720px) */
@media (max-width: 720px) {


  .showcase-pillars-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .pillar-card {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
  }

  .pillar-icon-box {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 8px;
  }

  .pillar-icon-box svg {
    width: 17px;
    height: 17px;
  }

  .pillar-title {
    font-size: 0.9rem;
  }

  .pillar-desc {
    min-height: 0;
    display: block;
    overflow: visible;
    font-size: 0.74rem;
    line-height: 1.45;
  }
}

/* Mobile Devices (<= 640px) */
@media (max-width: 640px) {
  .auth-body {
    padding-top: calc(max(0.75rem, env(safe-area-inset-top)) + 2.75rem);
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
    padding-left: max(0.85rem, env(safe-area-inset-left));
    padding-right: max(0.85rem, env(safe-area-inset-right));
  }

  .auth-top-bar {
    top: max(0.75rem, env(safe-area-inset-top));
    right: max(0.85rem, env(safe-area-inset-right));
  }

  .auth-top-bar select.lang-select,
  .auth-top-bar .lang-switcher .nice-select {
    font-size: 0.74rem;
    min-height: 2.15rem;
    height: 2.15rem;
    line-height: 2.15rem;
    padding-left: 1.55rem;
    padding-right: 1.35rem;
  }

  .auth-container {
    max-width: 100%;
  }

  .auth-container.has-showcase,
  .auth-body:has(.auth-showcase-panel) .auth-container {
    gap: 1.35rem;
  }

  .auth-card {
    padding: 1.6rem 1.25rem 1.4rem;
    border-radius: 1rem;
  }

  .auth-brand-wrap {
    margin-bottom: 0.9rem;
    gap: 0.65rem;
  }

  .auth-brand-logo {
    width: 32px;
    height: 32px;
  }

  .auth-brand-title {
    font-size: 1.1rem;
  }

  .auth-header {
    margin-bottom: 1.35rem;
    padding-top: 0.9rem;
  }

  .auth-header h1 {
    font-size: 1.5rem;
  }

  .auth-header p {
    font-size: 0.84rem;
  }

  .auth-form {
    gap: 0.95rem;
  }

  .auth-label {
    font-size: 0.66rem;
  }

  .auth-input {
    min-height: 2.85rem;
    font-size: 1rem; /* 16px to prevent iOS auto-zoom */
    padding: 0.6rem 0.8rem 0.6rem 2.45rem;
  }

  .auth-input-wrapper.has-toggle .auth-input {
    padding-right: 2.95rem;
  }

  .auth-notice {
    padding: 0.6rem 0.75rem;
    font-size: 0.73rem;
  }

  .auth-showcase-panel {
    padding: 1.45rem 1.15rem 1.35rem;
    border-radius: 1rem;
    gap: 1.15rem;
  }

  .showcase-eyebrow-badge {
    font-size: 0.64rem;
    padding: 0.25rem 0.65rem;
    white-space: normal;
  }

  .showcase-heading {
    font-size: 1.22rem;
    line-height: 1.28;
    margin-bottom: 0.45rem;
  }

  .showcase-desc {
    font-size: 0.84rem;
    line-height: 1.5;
  }

  .showcase-footer-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding-top: 1rem;
  }

  .showcase-links-group {
    flex-direction: column;
    gap: 0.55rem;
    width: 100%;
  }

  .showcase-action-btn {
    justify-content: center;
    width: 100%;
    min-height: 2.7rem;
    font-size: 0.78rem;
    padding: 0.55rem 1rem;
  }

  .showcase-trust-badges {
    justify-content: center;
    gap: 0.65rem 1rem;
    flex-wrap: wrap;
  }

  .trust-badge {
    font-size: 0.7rem;
  }

  .auth-modal {
    padding: 1rem;
  }

  .auth-modal-dialog {
    padding: 1.5rem;
    border-radius: 1.25rem;
    width: 100%;
    max-width: 100%;
  }

  /* 44px touch target, still centred on the 40px badge: 1.5rem - 2px. */
  .auth-modal-close {
    top: calc(1.5rem - 2px);
    right: 1rem;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .auth-modal-icon-badge {
    width: 40px;
    height: 40px;
    margin-bottom: 1rem;
  }

  .auth-modal-header {
    margin-bottom: 1.25rem;
    padding-right: 3rem;
  }

  .auth-modal-header h2 {
    font-size: 1.25rem;
  }

  .auth-modal-desc {
    font-size: 0.86rem;
  }

  .auth-modal-actions {
    gap: 0.5rem;
    margin-top: 1.25rem;
  }

  .auth-modal-cancel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* Smartphones Portrait (<= 520px) */
@media (max-width: 520px) {
  .auth-row-options {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }

  .auth-checkbox-label {
    min-height: 44px;
    padding: 0.15rem 0;
    gap: 0.6rem;
  }

  .auth-checkbox-hint {
    font-size: 0.68rem;
  }

  .auth-forgot-btn {
    align-self: flex-start;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0;
    font-size: 0.78rem;
  }

  .strength-rules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem 0.5rem;
  }

  .rule-item {
    font-size: 0.65rem;
    gap: 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .showcase-stats-strip {
    gap: 0.35rem;
  }

  .stat-pill {
    font-size: 0.68rem;
    padding: 0.28rem 0.55rem;
    gap: 0.35rem;
  }

  .stat-icon {
    width: 13px;
    height: 13px;
  }

  .showcase-engines-module {
    padding: 1.1rem 0.9rem;
  }

  .engines-module-title {
    font-size: 1.05rem;
  }

  .engines-module-sub {
    font-size: 0.77rem;
  }

  .showcase-engine-tabs {
    gap: 0.35rem;
    padding-bottom: 0.45rem;
  }

  .engine-tab-btn {
    font-size: 0.72rem;
    padding: 0.38rem 0.75rem 0.44rem;
    min-height: 2.25rem;
  }

  .engine-panel-head {
    gap: 0.45rem;
    margin-bottom: 0.45rem;
  }

  .engine-tag {
    font-size: 0.64rem;
    padding: 0.15rem 0.45rem;
  }

  .engine-status-chip {
    font-size: 0.64rem;
  }

  .engine-panel-title {
    font-size: 0.98rem;
    margin-bottom: 0.3rem;
  }

  .engine-panel-desc {
    font-size: 0.8rem;
    line-height: 1.48;
    margin-bottom: 0.75rem;
  }

  .engine-badges-row {
    gap: 0.35rem;
  }

  .engine-feature-badge {
    font-size: 0.68rem;
    padding: 0.25rem 0.5rem;
    gap: 0.3rem;
  }

  .engine-feature-badge svg {
    width: 12px;
    height: 12px;
  }
}

/* Compact Smartphones (<= 380px, e.g., iPhone SE / Mini) */
@media (max-width: 380px) {
  .auth-body {
    padding-left: max(0.6rem, env(safe-area-inset-left));
    padding-right: max(0.6rem, env(safe-area-inset-right));
    padding-top: calc(max(0.5rem, env(safe-area-inset-top)) + 2.5rem);
  }

  .auth-top-bar {
    top: max(0.5rem, env(safe-area-inset-top));
    right: max(0.6rem, env(safe-area-inset-right));
  }

  .auth-card {
    padding: 1.35rem 0.95rem 1.2rem;
    border-radius: 0.85rem;
  }

  .auth-brand-logo {
    width: 30px;
    height: 30px;
  }

  .auth-brand-title {
    font-size: 1.05rem;
  }

  .auth-header h1 {
    font-size: 1.34rem;
  }

  .auth-header p {
    font-size: 0.8rem;
  }

  .auth-input {
    padding-left: 2.25rem;
    font-size: 0.95rem;
  }

  .auth-input-icon {
    left: 0.75rem;
  }

  .auth-showcase-panel {
    padding: 1.25rem 0.9rem 1.15rem;
    border-radius: 0.85rem;
    gap: 1rem;
  }

  .showcase-engines-module {
    padding: 0.95rem 0.75rem;
  }

  .pillar-card {
    padding: 0.8rem 0.85rem;
    gap: 0.65rem;
  }

  .auth-modal-dialog {
    padding: 1.25rem 1rem;
  }

  .auth-modal-close {
    top: calc(1.25rem - 2px);
    right: 0.75rem;
  }
}


