* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 50%, #a5d6a7 100%);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  padding: clamp(20px, 4vw, 40px) 0;
}

body::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(0, 140, 58, 0.12) 0%, transparent 55%),
    radial-gradient(circle at 80% 20%, rgba(0, 166, 81, 0.12) 0%, transparent 55%);
  pointer-events: none;
}

.register-container {
  display: flex;
  max-width: 1040px;
  width: min(96vw, 1040px);
  margin: clamp(12px, 3vw, 24px);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  position: relative;
  z-index: 1;
}

.register-left {
  background: linear-gradient(135deg, #008c3a 0%, #00a651 100%);
  color: white;
  padding: clamp(40px, 5vw, 60px) clamp(28px, 4vw, 46px);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
}

.register-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.12) 0%, transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 55%);
  pointer-events: none;
}

.register-logo {
  width: clamp(88px, 16vw, 128px);
  height: clamp(88px, 16vw, 128px);
  background: rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: clamp(24px, 5vw, 36px);
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.register-logo img {
  width: clamp(58px, 12vw, 90px);
  height: clamp(58px, 12vw, 90px);
  object-fit: contain;
}

.register-welcome h1 {
  font-size: clamp(20px, 4.8vw, 28px);
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.35;
}

.register-welcome p {
  font-size: clamp(13px, 3.8vw, 16px);
  opacity: 0.92;
  margin-bottom: 10px;
  font-weight: 500;
}

.register-benefits {
  margin-top: clamp(20px, 4vw, 32px);
  text-align: left;
  width: min(320px, 90%);
  display: grid;
  gap: 12px;
}

.register-benefits li {
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  opacity: 0.95;
}

.register-benefits i {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.9);
}

.register-right {
  background: rgba(255, 255, 255, 0.97);
  padding: clamp(28px, 4.5vw, 60px) clamp(24px, 4.5vw, 54px);
  flex: 1.15;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.register-header {
  margin-bottom: clamp(24px, 4vw, 36px);
}

.register-header h2 {
  font-size: clamp(22px, 5.5vw, 30px);
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 8px;
}

.register-header p {
  color: #4a5568;
  font-size: 15px;
}

.form-feedback {
  display: none;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 18px;
}

.form-feedback.error {
  background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
  color: white;
}

.form-feedback.success {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
}

.register-form {
  display: grid;
  gap: 18px;
}

.register-form .form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 640px) {
  .register-form .form-row {
    grid-template-columns: 1fr;
  }
}

.register-form .full-width {
  grid-column: 1 / -1;
}

.register-form label {
  display: block;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 8px;
  font-size: 14px;
}

.register-form input,
.register-form select,
.register-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.9);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.register-form input:focus,
.register-form select:focus,
.register-form textarea:focus {
  outline: none;
  border-color: #008c3a;
  box-shadow: 0 0 0 4px rgba(0, 140, 58, 0.12);
  background: white;
}

.register-form textarea {
  min-height: 90px;
  resize: vertical;
}

.field-hint,
.password-advice {
  font-size: 12.5px;
  color: #6c757d;
  margin-top: 6px;
  line-height: 1.5;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: clamp(12px, 3vw, 20px);
}

.register-btn {
  width: 100%;
  background: linear-gradient(135deg, #008c3a 0%, #00a651 100%);
  color: white;
  border: none;
  padding: clamp(12px, 3.5vw, 16px);
  border-radius: 12px;
  font-size: clamp(14px, 4.5vw, 16px);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 6px 20px rgba(0, 140, 58, 0.35);
}

.register-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  box-shadow: none;
}

.register-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 140, 58, 0.45);
}

.back-to-login {
  text-align: center;
  font-size: 14px;
}

.back-to-login a {
  color: #008c3a;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-to-login a:hover {
  color: #006c2c;
  text-decoration: underline;
}

.terms-note {
  font-size: 12.5px;
  color: #6b7280;
  line-height: 1.6;
}

@media (max-width: 860px) {
  .register-container {
    flex-direction: column;
  }
  .register-left, .register-right {
    width: 100%;
  }
  .register-left {
    padding: 32px 24px;
  }
  .register-right {
    padding: 32px 24px 40px;
  }
}

@media (max-width: 420px) {
  .register-container {
    margin: 0;
    min-height: 100vh;
    border-radius: 0;
  }
  .register-right {
    padding: 28px 20px 40px;
  }
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rotate 0.8s linear infinite;
  margin-right: 8px;
}

@keyframes rotate {
  to { transform: rotate(360deg); }
}
