:root {
  --primary: #00BDAE;
  --primary-dark: #009B8E;
  --secondary: #64748b;
  --success: #22c55e;
  --danger: #ef4444;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #00BDAE, #008B80);
  color: var(--gray-700);
  min-height: 100vh;
  line-height: 1.5;
}

.registration-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.form-card {
  background: white;
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 500px;
  padding: 2rem;
  margin: 1rem;
}

.form-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.logo-container {
  margin-bottom: 1.5rem;
}

.logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

.logo:hover {
  transform: scale(1.05);
}

.form-header h1 {
  color: var(--gray-900);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.form-header p {
  color: var(--gray-500);
  font-size: 0.875rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.input-wrapper {
  position: relative;
}

.input-wrapper i:not(.toggle-password) {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  z-index: 1;
}

.input-wrapper input,
.input-wrapper select {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  border: 1px solid var(--gray-200);
  border-radius: 0.75rem;
  font-size: 0.875rem;
  color: var(--gray-700);
  background: white;
  transition: all 0.2s ease-in-out;
}

.input-wrapper input:focus,
.input-wrapper select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 189, 174, 0.1);
}

.input-wrapper label {
  position: absolute;
  left: 2.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  transition: all 0.2s;
  pointer-events: none;
  font-size: 0.875rem;
}

.input-wrapper input:focus + label,
.input-wrapper input:not(:placeholder-shown) + label {
  transform: translateY(-130%) translateX(-1.75rem);
  font-size: 0.75rem;
  color: var(--primary);
}

.doc-selector .toggle-group {
  display: inline-flex;
  background: var(--gray-100);
  padding: 0.25rem;
  border-radius: 0.5rem;
  position: relative;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  transition: all 0.2s ease-in-out;
}

.doc-selector .doc-label {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
  display: block;
}

.toggle-group input[type="radio"] {
  display: none;
}

.toggle-group label {
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: var(--gray-500);
  position: relative;
  z-index: 1;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-group input[type="radio"]:checked + label {
  color: white;
}

.toggle-group .slider {
  position: absolute;
  top: 0.25rem;
  left: 0.25rem;
  height: calc(100% - 0.5rem);
  z-index: 0;
  background: var(--primary);
  border-radius: 0.375rem;
  transition: 0.3s;
  width: calc(50% - 0.25rem);
}

.toggle-group input[type="radio"]:nth-of-type(2):checked ~ .slider {
  transform: translateX(100%);
}

.phone-group .phone-inputs {
  display: flex;
  gap: 1rem;
}

.phone-group .ddd {
  width: 100px;
}

.phone-group .number {
  flex: 1;
}

.toggle-password {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  cursor: pointer;
  transition: color 0.2s;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.email-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 0.75rem;
  margin-top: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 10;
  overflow: hidden;
}

.suggestion {
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background 0.2s;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.suggestion:hover {
  background: var(--gray-50);
}

.form-message {
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 0.75rem;
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.form-message.success {
  display: block;
  background-color: var(--success);
  color: white;
}

.form-message.error {
  display: block;
  background-color: var(--danger);
  color: white;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.submit-btn {
  width: 100%;
  padding: 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0.75rem;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.submit-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

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

.form-footer {
  margin-top: 1.5rem;
  text-align: center;
  color: var(--gray-500);
  font-size: 0.875rem;
}

.form-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

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

@media (max-width: 640px) {
  .registration-container {
    padding: 0.5rem;
  }
  
  .form-card {
    margin: 0.5rem;
    padding: 1.5rem;
    border-radius: 1rem;
  }
  
  .form-header h1 {
    font-size: 1.25rem;
  }
  
  .form-header p {
    font-size: 0.8rem;
  }
  
  .logo {
    width: 60px;
    height: 60px;
  }
  
  .phone-group .phone-inputs {
    flex-direction: row;
    gap: 0.5rem;
  }
  
  .phone-group .ddd {
    width: 80px;
  }
  
  .input-wrapper input,
  .input-wrapper select {
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    font-size: 0.9rem;
  }
  
  .toggle-group label {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }
  
  .submit-btn {
    padding: 0.875rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 360px) {
  .form-card {
    padding: 1rem;
    margin: 0.25rem;
  }
  
  .logo {
    width: 50px;
    height: 50px;
  }
  
  .form-header h1 {
    font-size: 1.1rem;
  }
  
  .phone-group .ddd {
    width: 70px;
  }
  
  .input-wrapper input,
  .input-wrapper select {
    padding: 0.7rem 1rem 0.7rem 2.25rem;
    font-size: 0.85rem;
  }
}