/**
 * Login page — two-panel layout (navy hero + form)
 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy: #0d1b2e;
  --navy-mid: #112240;
  --navy-lt: #1a3356;
  --purple-deep: #1f114f;
  --purple-mid: #4c1d95;
  --purple-blue: #1d4ed8;
  --blue: #2e7cf6;
  --blue-glow: #2e7cf630;
  --blue-dark: #1a5fcc;
  --text: #0d1b2e;
  --muted: #6b7a99;
  --border: #dce3f0;
  --bg: #f4f7fc;
  --white: #ffffff;
  --error: #e53e5e;
  --success: #10b981;
  --radius: 12px;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
}

/* Left panel */
.panel-left {
  width: 48%;
  background: linear-gradient(135deg, #1a1148 0%, #51208f 52%, #2142b9 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 56px;
  position: relative;
  overflow: hidden;
}

.panel-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 44px 44px;
}

.panel-left::after {
  content: '';
  position: absolute;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,.32) 0%, rgba(99,102,241,.16) 36%, transparent 72%);
  top: -180px;
  right: -160px;
  pointer-events: none;
}

.orb-bottom {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.28) 0%, rgba(139,92,246,.12) 44%, transparent 72%);
  bottom: -240px;
  left: -160px;
  pointer-events: none;
}

.brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
}

.brand-logo {
  display: block;
  text-decoration: none;
}

.brand-logo-img {
  display: block;
  height: 36px;
  width: auto;
}

.hero-content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 48px 0;
  max-width: 560px;
  width: 100%;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: #d1d5ff;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 6px 12px;
  border-radius: 100px;
  width: fit-content;
  margin-bottom: 24px;
}

.hero-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.7); }
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.hero-highlight {
  background: linear-gradient(90deg, #60a5fa 0%, #a78bfa 50%, #d8b4fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  font-size: 1rem;
  color: #d9d6f5;
  line-height: 1.65;
  max-width: 500px;
  margin-bottom: 24px;
  text-align: left;
}

.stack-wrap {
  margin-bottom: 26px;
  text-align: left;
}

.stack-title {
  font-size: .66rem;
  color: rgba(255,255,255,.55);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  margin-bottom: 10px;
}

.stack-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.stack-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.88);
  border-radius: 999px;
  padding: 4px 9px 4px 6px;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.stack-icon:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.3);
}

.stack-logo {
  width: 14px;
  height: 14px;
  display: block;
  fill: currentColor;
}

.stack-name {
  font-size: .65rem;
  line-height: 1;
  color: rgba(255,255,255,.86);
}

.stack-icon.shopify .stack-logo { color: #96bf48; }
.stack-icon.bigcommerce .stack-logo { color: #ffffff; }
.stack-icon.amazon .stack-logo { color: #ff9900; }
.stack-icon.google .stack-logo { color: #4285f4; }
.stack-icon.meta .stack-logo { color: #0081fb; }
.stack-icon.mailchimp .stack-logo { color: #ffe01b; }
.stack-icon.etsy .stack-logo { color: #f56400; }
.stack-icon.paypal .stack-logo { color: #009cde; }
.stack-icon.woo .stack-logo { color: #7f54b3; }
.stack-icon.wix .stack-logo { color: #faad00; }

.stack-more {
  font-size: .65rem;
  color: rgba(255,255,255,.58);
  font-weight: 600;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 460px;
  margin-right: auto;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.1);
  border-radius: 11px;
  padding: 12px;
  backdrop-filter: blur(8px);
}

.stat-num {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: .68rem;
  color: #d6dbff;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Right panel */
.panel-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
}

/* Long register form: start from top so the submit control stays reachable; avoid vertical centering clipping perception */
.panel-right--register {
  align-items: flex-start;
  align-self: stretch;
}

.form-card {
  width: 100%;
  max-width: 420px;
}

.register-form-card {
  max-width: 760px;
}

.form-header {
  margin-bottom: 32px;
}

.form-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.form-header p {
  font-size: .9rem;
  color: var(--muted);
}

.form-header p a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}

.form-header p a:hover {
  text-decoration: underline;
}

.alert-error {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fef2f4;
  border: 1px solid #fbd0d7;
  color: var(--error);
  font-size: .85rem;
  font-weight: 500;
  padding: 12px 14px;
  border-radius: 9px;
  margin-bottom: 24px;
}

/* Third-party buttons */
.thirdparty-title {
  margin-bottom: 8px;
  text-align: center;
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
}

.thirdparty-wrap {
  margin-bottom: 24px;
}

.form-card.authentication .thirdparty-button .btn {
  display: flex;
  align-items: center;
  border-radius: 9px;
  border: 1px solid var(--border);
  padding: 11px 14px;
  font-size: .9rem;
}

.form-card.authentication .thirdparty-button .btn:hover {
  border-color: #b0bdd8;
  background: #fafbfe;
}

.form-card.authentication .thirdparty-wrap .thirdparty-button .btn,
.form-card.authentication .thirdparty-wrap .thirdparty-button .btn:hover,
.form-card.authentication .thirdparty-wrap .thirdparty-button a.btn {
  color: var(--text) !important;
  text-decoration: none !important;
}

.form-card.authentication .thirdparty-wrap .thirdparty-button .thirdparty-message {
  white-space: nowrap;
}

/* Login-only provider button polish */
.form-card.authentication:not(.register-form-card) .thirdparty-wrap #thirdparty-container {
  gap: 10px;
}

.form-card.authentication:not(.register-form-card) .thirdparty-wrap .thirdparty-button .btn {
  border-radius: 11px;
  padding: 8px 12px;
  min-height: 50px;
  box-shadow: 0 4px 14px rgba(28, 49, 88, 0.10);
}

.form-card.authentication:not(.register-form-card) .thirdparty-wrap .thirdparty-button .btn:hover {
  box-shadow: 0 6px 16px rgba(28, 49, 88, 0.14);
}

.form-card.authentication:not(.register-form-card) .thirdparty-wrap .thirdparty-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
}

.form-card.authentication:not(.register-form-card) .thirdparty-wrap .thirdparty-message {
  font-size: .95rem;
}

.register-form-card .thirdparty-wrap .thirdparty-button .btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 54px;
  padding-left: 10px;
  padding-right: 10px;
}

.register-form-card .thirdparty-wrap .thirdparty-button .thirdparty-icon {
  position: relative;
  left: 0;
  flex: 0 0 38px;
}

.register-form-card .thirdparty-wrap .thirdparty-button .thirdparty-message {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: block;
  width: max-content;
  max-width: calc(100% - 112px);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 0 !important;
}

.form-card .thirdparty-wrap .thirdparty-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  flex-shrink: 0;
  display: block;
  background-repeat: no-repeat;
  background-color: #fff;
}

.form-card .thirdparty-wrap #thirdparty-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 500;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Form fields */
.field {
  margin-bottom: 18px;
}

label {
  display: block;
  font-size: .83rem;
  font-weight: 600;
  color: #3a4a6b;
  margin-bottom: 6px;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.input-icon svg {
  width: 16px;
  height: 16px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 11px 40px 11px 40px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-size: .9rem;
  color: var(--text);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
  outline: none;
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-glow);
}

input::placeholder {
  color: #b0bdd8;
}

.input-invalid {
  border-color: #f2a1b1 !important;
  box-shadow: 0 0 0 3px rgba(229, 62, 94, 0.12);
}

.form-error {
  margin-top: 6px;
  font-size: .78rem;
  color: var(--error);
  font-weight: 500;
}

.toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  padding: 2px;
}

.toggle-pw:hover {
  color: var(--text);
}

.toggle-pw svg {
  width: 16px;
  height: 16px;
}

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.forgot-link {
  font-size: .82rem;
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}

.forgot-link:hover {
  text-decoration: underline;
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.remember-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.remember-row label {
  margin: 0;
  font-size: .85rem;
  font-weight: 400;
  color: var(--muted);
  cursor: pointer;
}

.btn-primary {
  width: 100%;
  padding: 13px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s, box-shadow .15s, transform .1s;
  letter-spacing: -0.01em;
}

/* Register page loads partials/head → normalize.ejs sets button { padding: 0 !important; line-height: 1 !important }, which strips primary CTA height */
.form-card.authentication button.btn-primary {
  min-height: 50px;
  padding: 14px 18px !important;
  line-height: 1.3 !important;
  box-sizing: border-box;
}

.btn-primary:hover {
  background: var(--blue-dark);
  box-shadow: 0 4px 16px rgba(46,124,246,.35);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary svg {
  width: 16px;
  height: 16px;
}

.btn-primary-reset {
  min-height: 46px;
  padding: 12px 16px;
  border-radius: 10px;
}

.footer-links {
  margin-top: 28px;
  text-align: center;
  font-size: .8rem;
  color: var(--muted);
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--blue);
}

.footer-links span {
  margin: 0 6px;
}

.register-disclaimer {
  margin-top: 14px;
  text-align: center;
  font-size: .76rem;
  line-height: 1.5;
  color: var(--muted);
}

@media (max-width: 860px) {
  .panel-left {
    display: none;
  }
  .panel-right {
    padding: 32px 24px;
  }

  .register-form-card {
    max-width: 680px;
  }
}

@media (max-width: 1260px) {
  .panel-left {
    padding: 40px 36px;
  }

  .hero-title {
    font-size: 2.4rem;
  }

  .stack-name {
    display: none;
  }

  .stack-icon {
    padding: 5px;
  }
}

/* --- Email confirmation (post-registration) --- */
.hero-content--confirmation {
  padding-top: 32px;
  padding-bottom: 32px;
}

.hero-title--confirmation {
  margin-bottom: 18px;
}

.email-confirmation-card {
  max-width: 420px;
  display: flex;
  flex-direction: column;
  min-height: 360px;
}

.email-confirmation-top {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.confirm-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #e0edff;
  color: var(--blue-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}

.confirm-icon svg {
  width: 28px;
  height: 28px;
}

.confirm-heading {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.confirm-subtext {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 6px;
}

.confirm-email {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  word-break: break-all;
  margin-bottom: 22px;
}

.confirm-callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  padding: 14px 16px;
  background: #f0f4ff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.confirm-callout-icon {
  flex-shrink: 0;
  color: var(--blue);
  display: flex;
}

.confirm-callout-icon svg {
  width: 20px;
  height: 20px;
}

.confirm-callout-text {
  font-size: .85rem;
  color: #3a4a6b;
  line-height: 1.5;
  font-weight: 500;
}

.btn-outline {
  width: 100%;
  padding: 13px 18px;
  min-height: 50px;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  letter-spacing: -0.01em;
  transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-outline:hover:not(:disabled) {
  border-color: #b0bdd8;
  background: #fafbfe;
}

.btn-outline:focus-visible {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-glow);
}

.btn-outline:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.btn-outline-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
}

.btn-outline-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: confirm-spin 0.75s linear infinite;
}

.btn-outline.is-loading .btn-outline-label {
  opacity: 0.85;
}

.btn-outline.is-success {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.08);
  color: #047857;
}

.btn-outline-success {
  display: none;
  color: var(--success);
}

.btn-outline-success svg {
  width: 18px;
  height: 18px;
}

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

.confirm-support {
  margin-top: auto;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: .8rem;
  color: var(--muted);
}

.confirm-support a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.confirm-support a:hover {
  color: var(--blue);
}

/* Generic notice state (e.g. WooCommerce duplicate store) */
.email-confirmation-top.confirm-notice-wrap {
  align-items: stretch;
  text-align: left;
}

.confirm-notice-title {
  text-align: left;
  margin-bottom: 16px;
}

.confirm-notice-body {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.65;
  width: 100%;
}

.confirm-notice-body a {
  color: var(--blue);
  font-weight: 500;
  text-decoration: none;
}

.confirm-notice-body a:hover {
  text-decoration: underline;
}

.text-left {
  text-align: left;
}
