/* Login / Sign up page */
.auth-section { background: var(--primary-tint); padding: 24px 0 48px; }
.auth-wrap { width: min(1100px, var(--container-w)); margin-inline: auto; display: grid; gap: 0; }

/* brand panel (hidden on small screens) */
.auth-brand { display: none; }

.auth-card { padding: 22px 18px; box-shadow: var(--shadow-md); max-width: 560px; margin-inline: auto; }
.auth-panel { min-width: 0; display: flex; align-items: center; justify-content: center; }
.auth-panel .auth-card { width: 100%; }
@media (min-width: 640px) { .auth-card { padding: 32px; } .auth-section { padding: 40px 0 64px; } }

/* tabs */
.auth-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-bottom: 24px; background: var(--primary-light); border-radius: 12px; }
.auth-tab {
  position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; border: 0; background: transparent; border-radius: 9px;
  font-weight: 700; color: var(--primary-deep); transition: color .25s;
}
.auth-tab.is-active { color: var(--brand-navy); }
.auth-tab:not(.is-active):hover { color: var(--primary-dark); }
.auth-tab-ink {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px);
  background: #fff; border-radius: 9px; box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease);
}
.auth-tabs[data-active="signup"] .auth-tab-ink { transform: translateX(100%); }

.auth-pane.is-active { animation: rise .45s var(--ease) both; }
.auth-title { font-size: clamp(1.4rem, 4vw, 1.75rem); margin-bottom: 4px; }
.auth-sub { color: var(--ink-soft); margin-bottom: 20px; }
.auth-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 20px; }
.auth-row .check { min-height: 44px; align-items: center; }
.auth-link { color: var(--primary-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.auth-link:hover { color: var(--brand-navy); }
.auth-row .auth-link:only-child { margin-left: auto; }
.auth-row .auth-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; }
.auth-switch { margin: 20px 0 0; text-align: center; color: var(--ink-soft); font-size: .92rem; }
.auth-switch a { color: var(--primary-dark); font-weight: 700; display: inline-block; padding: 8px 4px; }
.auth-switch a:hover { text-decoration: underline; }
.field label.check { display: flex; margin: 0; font-weight: 400; }
.field:has(> .check) { margin-bottom: 20px; }

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

.toggle-pass.is-on { color: var(--primary-dark); background: var(--primary-light); }

/* password strength */
.pw-meter { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.pw-bars { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pw-bars span { height: 6px; border-radius: 6px; background: var(--line); transition: background .3s, transform .3s var(--ease); transform-origin: left; }
.pw-label { min-width: 120px; text-align: right; font-size: .8rem; font-weight: 600; color: var(--ink-faint); }
.pw-meter.lvl-1 .pw-bars span:nth-child(-n+1) { background: var(--accent-strong); }
.pw-meter.lvl-2 .pw-bars span:nth-child(-n+2) { background: #E08A00; }
.pw-meter.lvl-3 .pw-bars span:nth-child(-n+3) { background: #4DA85F; }
.pw-meter.lvl-4 .pw-bars span:nth-child(-n+4) { background: var(--ok); }
.pw-meter.lvl-1 .pw-label { color: var(--accent-strong); }
.pw-meter.lvl-2 .pw-label { color: var(--warn); }
.pw-meter.lvl-3 .pw-label, .pw-meter.lvl-4 .pw-label { color: var(--ok); }

/* split layout from 960px */
@media (min-width: 960px) {
  .auth-section { padding: 56px 0 80px; }
  .auth-wrap { grid-template-columns: 5fr 6fr; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg); background: #fff; border: 1px solid var(--line); }
  .auth-panel { padding: 40px; }
  .auth-card { border: 0; box-shadow: none; padding: 0; max-width: 480px; background: transparent; }
  .auth-brand {
    position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center;
    padding: 48px 44px; color: #fff;
    background: var(--brand-navy);
  }
  .auth-brand-inner { position: relative; z-index: 1; }
  .auth-logo { height: 64px; width: auto; border-radius: 6px; margin-bottom: 28px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
  .auth-brand h2 { color: #fff; font-size: 1.75rem; }
  .auth-brand p { color: rgba(255,255,255,.85); margin-bottom: 28px; }
  .auth-benefits { display: grid; gap: 18px; }
  .auth-benefits li { display: flex; gap: 14px; align-items: flex-start; animation: rise .7s var(--ease) both; animation-delay: var(--d, 0ms); }
  .auth-benefit-icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.14); color: #fff; }
  .auth-benefits strong { display: block; font-family: var(--font-head); }
  .auth-benefits small { display: block; font-size: .85rem; color: rgba(255,255,255,.78); line-height: 1.45; }
  .auth-shape { position: absolute; border-radius: 50%; z-index: 0; }
  .auth-shape-a { width: 320px; height: 320px; right: -110px; top: -100px; background: rgba(8,152,204,0.30); animation: float 9s ease-in-out infinite; }
  .auth-shape-b { width: 240px; height: 240px; left: -80px; bottom: -80px; background: rgba(239,28,36,0.20); animation: float 11s ease-in-out infinite reverse; }
  .auth-shape-c { width: 90px; height: 90px; right: 10%; top: 9%; border: 2px solid rgba(255,255,255,.25); animation: float 7s ease-in-out infinite; }
}
