:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --success: #10b981;
    --error: #ef4444;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --focus-ring: rgba(79, 70, 229, 0.25);
  }
  
  * { box-sizing: border-box; margin: 0; padding: 0; }
  
  body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #e0e7ff 0%, #f8fafc 100%);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
  }
  
  .container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 440px;
    animation: fadeIn 0.4s ease-out;
  }
  
  @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
  
  h2 { text-align: center; margin-bottom: 0.4rem; font-weight: 700; font-size: 1.6rem; color: var(--text); }
  .subtitle { text-align: center; color: var(--text-light); font-size: 0.9rem; margin-bottom: 1.5rem; }
  
  #indicacao-info {
    text-align: center;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    min-height: 1.2em;
    padding: 0.4rem;
    border-radius: 6px;
    background: #f1f5f9;
    transition: all 0.3s;
  }
  
  .form-group { margin-bottom: 1.25rem; position: relative; }
  label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.4rem; color: var(--text); }
  
  input[type="text"], input[type="tel"], input[type="password"] {
    width: 100%; padding: 0.8rem 1rem;
    border: 1.5px solid var(--border); border-radius: 10px;
    font-size: 0.95rem; transition: all 0.2s ease;
    background: #fafafa;
  }
  input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); background: #fff; }
  input.valid { border-color: var(--success); background: #f0fdf4; }
  input.invalid { border-color: var(--error); background: #fef2f2; }
  
  .error-message, .success-message {
    font-size: 0.75rem; margin-top: 0.25rem; min-height: 1rem;
    display: flex; align-items: center; gap: 0.3rem;
  }
  .error-message { color: var(--error); }
  .success-message { color: var(--success); }
  
  .checkbox-group { display: flex; align-items: flex-start; gap: 0.6rem; margin-bottom: 1.5rem; font-size: 0.875rem; color: var(--text-light); }
  .checkbox-group input { margin-top: 0.2rem; accent-color: var(--primary); width: 16px; height: 16px; cursor: pointer; }
  .checkbox-group label { margin: 0; cursor: pointer; }
  
  button {
    width: 100%; padding: 0.9rem; background: var(--primary); color: white; border: none;
    border-radius: 10px; font-weight: 600; font-size: 1rem; cursor: pointer;
    transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    margin-top: 0.5rem;
  }
  button:hover:not(:disabled) { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79,70,229,0.3); }
  button:active:not(:disabled) { transform: translateY(0); }
  button:disabled { background: var(--text-light); cursor: not-allowed; transform: none; }
  
  .spinner {
    width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite;
  }
  @keyframes spin { to { transform: rotate(360deg); } }
  
  @media (max-width: 480px) {
    .container { padding: 1.5rem; }
    h2 { font-size: 1.4rem; }
  }

  .redirect-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
  }
  .redirect-link a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
  }
  .redirect-link a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
  }