:root {
  /* Primary palette */
  --blue-50: #EEF4FF;
  --blue-100: #D9E6FF;
  --blue-200: #B3CDFF;
  --blue-300: #80ABFF;
  --blue-400: #4F8CFF;
  --blue-500: #2B6FE6;
  --blue-600: #1A56C4;
  --blue-700: #13429E;

  /* Neutral palette */
  --gray-50: #F8F9FB;
  --gray-100: #F1F3F7;
  --gray-200: #E2E6ED;
  --gray-300: #C8CED9;
  --gray-400: #9AA2B1;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  /* Accents */
  --accent-green: #10B981;
  --accent-amber: #F59E0B;
  --accent-violet: #8B5CF6;
  --accent-rose: #F43F5E;

  /* Surfaces */
  --surface-primary: #FAFAFB;
  --surface-card: #FFFFFF;
  --surface-dark: #0B1120;
  --surface-dark-card: #131C2E;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
  --shadow-xl: 0 16px 50px rgba(0,0,0,0.12);
  --shadow-blue: 0 4px 20px rgba(79,140,255,0.25);

  /* Typography */
  --font-main: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

  /* Spacing */
  --space-section-desktop: 100px;
  --space-section-mobile: 50px;
  --container-width: 1140px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

/* ============ RESET & BASE ============ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-main);
  color: var(--gray-800);
  background: var(--surface-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.signup {
    padding: 140px 0 60px;
}

.auth-container {
    position: relative;
    z-index: 1;
    background: #ffffff;
    border: 1px solid var(--gray-200, #e2e6ed);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 32px rgba(17, 24, 39, 0.07);
    width: 100%;
    max-width: 500px;
    margin: auto;
    padding: 40px;
    animation: cardIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

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

.auth-title {
    text-align: center;
    color: var(--gray-900, #111827);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 8px;
}

.auth-subtitle {
    text-align: center;
    color: var(--gray-500, #6b7280);
    font-size: 14px;
    margin-bottom: 28px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--gray-700, #374151);
    margin-bottom: 6px;
    font-size: 13px;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--gray-200, #e2e6ed);
    border-radius: var(--radius-sm, 8px);
    font-size: 14px;
    color: var(--gray-900, #111827);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--blue-400, #4f8cff);
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.12);
}

.form-group .hint {
    font-size: 12px;
    color: #666;
    margin-top: 6px;
}

.consent-group {
    margin-top: 10px;
}

.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #444;
    line-height: 1.4;
}

.consent-label input {
    margin-top: 2px;
}

.password-requirements {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.password-requirements .requirement {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.password-requirements .requirement:last-child {
    margin-bottom: 0;
}

.password-requirements .requirement.met {
    color: #28a745;
}

.password-requirements .requirement.unmet {
    color: #666;
}

.btn-primary {
    width: 100%;
    padding: 11px 20px;
    background: var(--blue-400, #4f8cff);
    color: white;
    border: none;
    border-radius: var(--radius-sm, 8px);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(79, 140, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--blue-500, #2b6fe6);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(79, 140, 255, 0.3);
}

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

.btn-primary:disabled {
    background: var(--gray-300, #c8ced9);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 11px 14px;
    border-radius: var(--radius-sm, 8px);
    margin-bottom: 18px;
    font-size: 13px;
    display: none;
    line-height: 1.5;
}

.error-message.show {
    display: block;
}

.success-message {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
    padding: 11px 14px;
    border-radius: var(--radius-sm, 8px);
    margin-bottom: 18px;
    font-size: 13px;
    display: none;
    line-height: 1.5;
}

.success-message.show {
    display: block;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-100, #f1f3f7);
}

.auth-footer p {
    color: var(--gray-500, #6b7280);
    font-size: 13px;
}

.auth-footer a {
    color: var(--blue-500, #2b6fe6);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.terms-text {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-top: 16px;
    line-height: 1.5;
}

.terms-text a {
    color: #1da1f2;
    text-decoration: none;
}

.spinner {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

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

.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400, #9aa2b1);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: color 0.2s, background 0.2s;
}

.password-toggle:hover {
    color: var(--gray-700, #374151);
    background: var(--gray-100, #f1f3f7);
}

.free-tier-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.free-tier-badge h3 {
    font-size: 14px;
    margin-bottom: 4px;
}

.free-tier-badge p {
    font-size: 12px;
    opacity: 0.9;
}

@media (max-width: 989px) {
    .signup {
        padding: 120px 0 50px;
    }
    .auth-container {
        padding: 40px 25px;
    }
}