@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* =====================================================
   PREMIUM REGISTRATION PAGE
   ===================================================== */

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  height: 100dvh;
  background: #0f172a;
  overflow: hidden;
  position: relative;
}

/* Animated Background Orbs */
.reg-bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

.reg-bg-orb--1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #0d9488 0%, transparent 70%);
  top: -200px;
  left: -100px;
  animation: orb-float-1 20s ease-in-out infinite;
}

.reg-bg-orb--2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #6366f1 0%, transparent 70%);
  bottom: -150px;
  right: -100px;
  animation: orb-float-2 25s ease-in-out infinite;
}

.reg-bg-orb--3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #ec4899 0%, transparent 70%);
  top: 50%;
  left: 50%;
  animation: orb-float-3 18s ease-in-out infinite;
}

@keyframes orb-float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, 40px) scale(1.1); }
  66% { transform: translate(-30px, 60px) scale(0.95); }
}

@keyframes orb-float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-50px, -30px) scale(1.05); }
  66% { transform: translate(40px, -50px) scale(0.9); }
}

@keyframes orb-float-3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.3); }
}

/* Main Wrapper */
.reg-wrapper {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 44% 56%;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
}

/* =====================================================
   LEFT BRAND PANEL
   ===================================================== */

.reg-brand {
  background: linear-gradient(160deg, #0d9488 0%, #0f766e 40%, #134e4a 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  height: 100dvh;
}

.reg-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.reg-brand::after {
  content: '';
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.reg-brand__inner {
  position: relative;
  z-index: 1;
  padding: 3rem 2.5rem;
  max-width: 480px;
}

/* Language Selector */
.language-selector-wrapper.login-language-selector {
  position: absolute !important;
  top: 20px !important;
  right: calc(56% + 20px) !important;
  z-index: 100;
}

/* Logo */
.reg-brand__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2.5rem;
}

.reg-brand__logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.reg-brand__logo-text {
  font-size: 18px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.5px;
}

/* Brand Content */
.reg-brand__title {
  font-size: 2.25rem;
  font-weight: 800;
  color: white;
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 1rem;
}

.reg-brand__subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Feature Cards */
.reg-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 2rem;
}

.reg-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.reg-feature:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.reg-feature__icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #5eead4;
}

.reg-feature__title {
  font-size: 13px;
  font-weight: 600;
  color: white;
  margin-bottom: 2px;
}

.reg-feature__desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.4;
}

/* Social Proof */
.reg-social-proof {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 2rem;
  padding: 16px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.reg-social-proof__avatars {
  display: flex;
}

.reg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  border: 2px solid rgba(13, 148, 136, 0.8);
  margin-left: -8px;
}

.reg-avatar:first-child {
  margin-left: 0;
}

.reg-avatar--count {
  background: #1e293b;
  font-size: 10px;
  font-weight: 700;
}

.reg-social-proof__text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  line-height: 1.4;
}

.reg-social-proof__text strong {
  color: white;
}

/* Trust Badges */
.reg-trust {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.reg-trust__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.reg-trust__item i {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.4);
}

.reg-trust__divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.15);
}

/* =====================================================
   RIGHT FORM PANEL
   ===================================================== */

.reg-form-panel {
  background: white;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

.reg-form-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem;
}

.reg-form-scroll::-webkit-scrollbar {
  width: 5px;
}

.reg-form-scroll::-webkit-scrollbar-track {
  background: #f8fafc;
}

.reg-form-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.reg-form-scroll::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.reg-form-wrapper {
  width: 100%;
  max-width: 460px;
  margin: auto 0;
}

/* Form Header */
.reg-form-header {
  text-align: center;
  margin-bottom: 2rem;
}

.reg-form-header__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #f0fdfa, #ccfbf1);
  color: #0d9488;
  font-size: 12px;
  font-weight: 600;
  border-radius: 100px;
  margin-bottom: 16px;
  border: 1px solid #99f6e4;
}

.reg-form-header__badge i {
  font-size: 14px;
}

.reg-form-header__title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.reg-form-header__subtitle {
  font-size: 0.9rem;
  color: #94a3b8;
  margin: 0;
}

/* Form Sections */
.reg-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.reg-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid #f1f5f9;
}

.reg-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Fields */
.reg-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reg-field__label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 8px;
}

.reg-field__badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  background: #f0fdfa;
  color: #0d9488;
  border: 1px solid #ccfbf1;
}

.reg-field__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.reg-field__icon {
  position: absolute;
  left: 14px;
  font-size: 16px;
  color: #94a3b8;
  pointer-events: none;
  transition: color 0.2s;
  z-index: 1;
}

.reg-field__input,
.reg-field__select {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 44px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  color: #0f172a;
  background: #fafbfc;
  transition: all 0.2s ease;
  outline: none;
}

.reg-field__input::placeholder {
  color: #94a3b8;
}

.reg-field__input:hover,
.reg-field__select:hover {
  border-color: #cbd5e1;
  background: white;
}

.reg-field__input:focus,
.reg-field__select:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.08);
  background: white;
}

.reg-field__input:focus ~ .reg-field__icon,
.reg-field__input:focus + .reg-field__icon {
  color: #0d9488;
}

.reg-field__input-wrap:focus-within .reg-field__icon {
  color: #0d9488;
}

.reg-field__select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.reg-field__hint {
  font-size: 12px;
  color: #94a3b8;
}

.reg-field__toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: all 0.2s;
  z-index: 1;
}

.reg-field__toggle:hover {
  color: #0d9488;
  background: #f0fdfa;
}

.reg-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Billing Toggle */
.reg-billing-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
  gap: 0;
}

.reg-billing__radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.reg-billing__option {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  transition: all 0.3s ease;
}

.reg-billing__radio:checked + .reg-billing__option {
  color: #0f172a;
  background: white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.reg-billing__save {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  background: #dcfce7;
  color: #15803d;
  border-radius: 100px;
}

/* Trial Notice */
.reg-trial-notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(135deg, #f0fdfa 0%, #ecfdf5 100%);
  border: 1px solid #a7f3d0;
  border-radius: 14px;
  margin-bottom: 20px;
}

.reg-trial-notice__icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  background: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
}

.reg-trial-notice strong {
  display: block;
  font-size: 14px;
  color: #065f46;
  margin-bottom: 2px;
}

.reg-trial-notice span {
  font-size: 12px;
  color: #047857;
  line-height: 1.4;
}

/* Submit Button */
.reg-submit {
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
  margin-bottom: 20px;
}

.reg-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.4);
}

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

.reg-submit i {
  font-size: 18px;
  transition: transform 0.3s;
}

.reg-submit:hover i {
  transform: translateX(4px);
}

/* Sign In Link */
.reg-signin {
  text-align: center;
  font-size: 14px;
  color: #64748b;
  margin-bottom: 16px;
}

.reg-signin a {
  color: #0d9488;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.reg-signin a:hover {
  color: #0f766e;
  text-decoration: underline;
}

/* Form Trust */
.reg-form-trust {
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.reg-form-trust i {
  font-size: 12px;
  color: #cbd5e1;
}

/* Alerts */
.alert {
  border-radius: 12px;
  padding: 12px 16px;
  border: none;
  font-size: 13px;
  margin-bottom: 16px;
}

.alert-info {
  background: #f0fdfa;
  color: #0d9488;
  border: 1px solid #ccfbf1;
}

.alert-danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.alert-success {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

/* =====================================================
   LANGUAGE SELECTOR — Premium (matches header style)
   ===================================================== */

.topbar__lang { position: relative; }

.topbar__lang-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 40px; cursor: pointer;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(10px); color: rgba(255,255,255,0.9);
  font-size: 0.85rem; font-weight: 600; user-select: none;
  transition: all 0.2s ease;
}
.topbar__lang-btn:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.25); }
.topbar__lang-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(13,148,136,0.3); }

.topbar__lang-flag {
  width: 22px; height: 22px; object-fit: cover;
  border-radius: 50%; border: 2px solid rgba(255,255,255,0.2); flex-shrink: 0;
}
.topbar__lang-text { white-space: nowrap; letter-spacing: -0.01em; }
.topbar__lang-chevron { font-size: 0.6rem; color: rgba(255,255,255,0.6); transition: transform 0.25s; margin-left: 2px; }
.topbar__lang-btn[aria-expanded="true"] .topbar__lang-chevron { transform: rotate(180deg); }

.topbar__lang-dropdown {
  position: absolute; top: calc(100% + 10px); left: 0;
  list-style: none; margin: 0; padding: 8px;
  min-width: 220px; max-height: 420px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: rgba(0,0,0,.12) transparent;
  background: white; border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.08);
  opacity: 0; visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transform-origin: top left;
  transition: all 0.2s cubic-bezier(.4,0,.2,1);
  z-index: 1000;
}
.topbar__lang-dropdown::-webkit-scrollbar { width: 5px; }
.topbar__lang-dropdown::-webkit-scrollbar-track { background: transparent; margin: 10px 0; }
.topbar__lang-dropdown::-webkit-scrollbar-thumb { background: rgba(0,0,0,.10); border-radius: 10px; }
.topbar__lang-dropdown::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,.20); }
.topbar__lang-dropdown.is-open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.topbar__lang-header {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px 6px; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: #94a3b8; pointer-events: none;
}
.topbar__lang-header i { font-size: 0.82rem; opacity: 0.6; }
.topbar__lang-divider { height: 1px; margin: 4px 12px; background: #e2e8f0; }

.topbar__lang-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  transition: all 0.15s ease; position: relative;
}
.topbar__lang-item:hover { background: rgba(13,148,136,0.06); }
.topbar__lang-item:active { transform: scale(0.98); }
.topbar__lang-item.is-active { background: rgba(13,148,136,0.08); }
.topbar__lang-item.is-active .topbar__lang-item-native { color: #0d9488; font-weight: 600; }

.topbar__lang-item-flag {
  width: 28px; height: 28px; object-fit: cover; border-radius: 50%;
  border: 2px solid #e2e8f0; flex-shrink: 0; transition: border-color 0.15s;
}
.topbar__lang-item.is-active .topbar__lang-item-flag { border-color: rgba(13,148,136,0.3); }

.topbar__lang-item-text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.topbar__lang-item-native { font-size: 0.88rem; font-weight: 500; line-height: 1.3; color: #0f172a; }
.topbar__lang-item-eng { font-size: 0.72rem; color: #94a3b8; line-height: 1.2; }

.topbar__lang-item-check {
  font-size: 1rem; color: #0d9488; opacity: 0;
  transform: scale(0.5); transition: all 0.2s; margin-left: auto;
}
.topbar__lang-item.is-active .topbar__lang-item-check { opacity: 1; transform: scale(1); }

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 1024px) {
  .reg-brand__inner {
    padding: 2rem;
  }

  .reg-brand__title {
    font-size: 1.75rem;
  }

  .reg-features {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body {
    height: auto;
    overflow: auto;
  }

  .reg-wrapper {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .reg-brand {
    display: none;
    height: auto;
  }

  .reg-form-panel {
    height: auto;
    overflow: visible;
  }

  .reg-form-scroll {
    overflow-y: visible;
  }

  .language-selector-wrapper.login-language-selector {
    display: none;
  }

  body {
    background: white;
  }

  .reg-bg-orb {
    display: none;
  }

  .reg-form-panel {
    min-height: 100dvh;
  }

  .reg-form-scroll {
    padding: 1.5rem;
    align-items: flex-start;
    padding-top: 2rem;
  }
}

@media (max-width: 480px) {
  .reg-field-row {
    grid-template-columns: 1fr;
  }

  .reg-form-header__title {
    font-size: 1.5rem;
  }

  .reg-form-scroll {
    padding: 1.25rem;
    padding-top: 1.5rem;
  }

  .reg-submit {
    height: 48px;
    font-size: 14px;
  }
}

/* =====================================================
   LANGUAGE SWITCHER
   ===================================================== */

.lang-switch select {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0; height: 0;
}

/* Old flag-select classes removed — now using topbar__lang-* above */
