:root {
  --bg: #f6f6f6;
  --card: #ffffff;
  --muted: #6b7280;
  --text: #0b0d00;
  --primary: #0b0d00;
  --primary-highlight: #D0F308;
  --tertiary: #5227ff;
  --border: #e5e7eb;
  --sidebar: #f6f6f6;
  --sidebar-muted: #9ca3af;
  --sidebar-active: #D0F308;
  --pill: #f3f4f6;
  --accent: #D0F308;
  --sidebar-text: #0B0D00;
  --sidebar-hover: #e5e7eb;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-ui: 'Instrument Sans', system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
}

.auth-layout {
  display: flex;
  min-height: 100vh;
}

.auth-left {
  width: 40%;
  min-height: 100vh;
  height: 100vh;
  position: sticky;
  top: 0;
  background: var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 48px;
  overflow: hidden;
}

.auth-left::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(208,243,8,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(82,39,255,0.06) 0%, transparent 50%);
}

.left-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.auth-left .left-content h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 36px;
  font-style: normal;
  font-weight: 400;
  font-synthesis: none;
  color: #fff;
  text-align: center;
  line-height: 1.2;
  max-width: 360px;
  width: 100%;
}

.value-pills {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.value-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px 20px;
}

.value-pill svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.value-pill span {
  font-size: 16px;
  color: rgba(255,255,255,0.75);
  font-weight: 500;
}

.testimonial {
  margin-top: 48px;
  max-width: 320px;
  text-align: center;
  align-self: center;
}

.quote {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-style: italic;
  color: var(--pill);
  line-height: 1.4;
}

.author {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.testimonial-avatar {
  display: block;
  margin: 16px auto 0;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
}

.auth-right {
  position: relative;
  width: 60%;
  min-height: 100vh;
  background: var(--card);
  display: flex;
  flex-direction: column;
}

.auth-right::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.015;
  z-index: 10;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
}

.auth-main,
.auth-footer { position: relative; z-index: 20; }

.signup-header {
  position: sticky;
  top: 0;
  padding: 12px 24px 16px;
  flex-shrink: 0;
  z-index: 30;
  background: var(--card);
}

.signup-header-inner {
  height: 64px;
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(229, 231, 235, 0.6);
  border-radius: 16px;
  padding: 0 16px;
}

.signup-header .logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.signup-header .logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.signup-header .logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.signup-header .logo-text {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 24px;
  color: var(--text);
}

.signup-header .login-link {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.signup-header .login-link a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.signup-header .login-link a:hover {
  text-decoration: underline;
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
}

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

.auth-toggle {
  display: flex;
  background: var(--pill);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 32px;
  width: 100%;
}

.auth-toggle-option {
  width: 50%;
  padding: 10px 0;
  text-align: center;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-radius: 10px;
  border: none;
  background: transparent;
  transition: all 0.2s ease;
  text-decoration: none;
}

.auth-toggle-option.active {
  background: var(--card);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.form-copy {
  margin-bottom: 28px;
  text-align: left;
}

.form-copy h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  font-weight: 400;
}

.form-copy p {
  margin: 8px 0 0;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}

.server-error {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.4;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
}

.server-error strong {
  font-size: 13px;
  font-weight: 700;
  color: #7f1d1d;
}

.server-error span { color: #991b1b; }

.server-success {
  margin-bottom: 14px;
  font-size: 13px;
  color: #166534;
}

.verification-panel {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
  padding: 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}

.verification-panel__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--primary);
  background: var(--pill);
}

.verification-panel__icon svg {
  width: 24px;
  height: 24px;
}

.verification-panel p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.field-group { margin-bottom: 20px; }

.field-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-bottom: 6px;
}

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

.forgot-link {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
}

.forgot-link:hover {
  color: var(--text);
  text-decoration: underline;
}

.field-group input,
.field-group select {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-group input::placeholder { color: var(--sidebar-muted); }

.field-group input:focus,
.field-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11,13,0,0.06);
}

.field-group input.input-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.08);
}

.field-error {
  font-size: 12px;
  color: #ef4444;
  margin-top: 4px;
  display: none;
}

.field-error.visible { display: block; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.phone-input-row {
  display: grid;
  grid-template-columns: minmax(104px, 112px) 1fr;
  gap: 8px;
}

.phone-country-picker {
  position: relative;
  min-width: 0;
}

.phone-country-button {
  width: 100%;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 10px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  background: var(--bg);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.phone-country-button:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11,13,0,0.06);
}

.phone-country-flag {
  width: 22px;
  height: 16px;
  flex-shrink: 0;
  display: block;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(11,13,0,0.08);
}

.phone-country-dial {
  white-space: nowrap;
  line-height: 1;
}

.phone-country-caret {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: 0.7;
}

.phone-country-list {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 80;
  width: 112px;
  max-height: 236px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 16px 36px rgba(11,13,0,0.14);
}

.phone-country-option {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.phone-country-option:hover,
.phone-country-option:focus-visible,
.phone-country-option[aria-selected="true"] {
  outline: none;
  background: var(--pill);
}

.phone-number-input { min-width: 0; }

.team-size-group label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-bottom: 6px;
}

.team-size-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.team-size-card {
  padding: 14px 12px;
  border: 0.5px solid var(--border);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  background: var(--card);
  transition: all 0.2s ease;
  font: inherit;
  width: 100%;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}

.team-size-card:hover:not(.selected) {
  border-color: #d1d5db;
  background: #fafafa;
}

.team-size-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
  background: var(--bg);
}

.team-size-card.team-flash {
  border-color: #ef4444;
}

.team-size-num {
  display: block;
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--text);
  line-height: 1.2;
}

.team-size-sub {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.password-wrap { position: relative; }

.password-wrap input { padding-right: 44px; }

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

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

.password-toggle svg {
  width: 20px;
  height: 20px;
}

.submit-btn {
  margin-top: 8px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: var(--accent);
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.submit-btn:hover {
  background: #1a1d00;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(11,13,0,0.15);
}

.submit-icon svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease;
}

.submit-btn:hover .submit-icon svg { transform: translateX(3px); }

.submit-btn.loading {
  pointer-events: none;
  opacity: 0.85;
}

.submit-btn.shake { animation: shake 0.3s; }

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(208,243,8,0.3);
  border-top-color: #D0F308;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.auth-bottom-link {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
}

.auth-bottom-link .forgot-link {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
}

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

.auth-bottom-link span { color: var(--sidebar-muted); }

.auth-bottom-link a:not(.forgot-link) {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-bottom-link a:not(.forgot-link):hover { text-decoration: underline; }

.auth-legal-notice {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  color: var(--sidebar-muted);
}

.auth-legal-notice a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.auth-legal-notice a:hover {
  color: var(--text);
  text-decoration: underline;
}

.auth-oauth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}

.auth-oauth-divider-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-oauth-divider-text {
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-transform: lowercase;
}

.auth-oauth-wrap {
  margin-top: 16px;
}

.auth-oauth-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.auth-oauth-google:hover {
  border-color: #d1d5db;
  background: var(--bg);
}

.auth-oauth-google:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 13, 0, 0.06);
}

.auth-oauth-google-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}

.auth-footer {
  padding: 24px 32px;
  margin-top: auto;
}

.auth-footer p {
  margin: 0;
  font-size: 12px;
  color: var(--sidebar-muted);
}

@media (max-width: 640px) {
  .auth-left { display: none; }
  .auth-right { width: 100%; }
}

@media (max-width: 768px) {
  .signup-header {
    padding: 12px 24px 16px;
  }
}

@media (max-width: 480px) {
  .signup-header {
    padding: 12px 16px 14px;
  }
  .auth-main { padding: 24px 20px; }
  .auth-container,
  .auth-toggle { width: 100%; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

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