/* Auth — Swiftqash brand split layout */

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

html, body {
  margin: 0;
  height: 100%;
}

.reg-page {
  --ink: #f4f6ff;
  --muted: rgba(255, 255, 255, 0.72);
  --line: rgba(255, 255, 255, 0.18);
  --field: rgba(255, 255, 255, 0.1);
  --primary: #4543b8;
  --primary-dark: #3533a0;
  --primary-soft: #5b8cff;
  --amber: #ffb400;
  --paper: transparent;
  --page: #2c2a7a;
  --brand:
    linear-gradient(160deg, rgba(255, 180, 0, 0.16) 0%, transparent 42%),
    linear-gradient(145deg, #3a38a8 0%, #4543b8 48%, #2c2a7a 100%);
  margin: 0;
  height: 100vh;
  overflow: hidden;
  font-family: "Inter", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--brand);
  background-attachment: fixed;
}

.reg-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.05fr);
  height: 100%;
  align-items: stretch;
}

/* —— Brand rail —— */
.reg-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 2rem 2.25rem 2.1rem;
  color: #fff;
  background: transparent;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  animation: regBrandIn 0.55s ease both;
}

.reg-brand::after {
  content: "";
  position: absolute;
  width: 18rem;
  height: 18rem;
  right: -6rem;
  bottom: -5rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 180, 0, 0.28), transparent 68%);
  pointer-events: none;
}

.reg-brand > * {
  position: relative;
  z-index: 1;
}

.reg-brand-logo {
  display: inline-block;
  text-decoration: none;
}

.reg-brand-logo img {
  height: 2rem;
  width: auto;
  display: block;
}

.reg-brand-copy {
  max-width: 22rem;
  margin: 3.5rem 0 auto;
  animation: regCopyIn 0.65s 0.08s ease both;
}

.reg-brand-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 3.6vw, 2.65rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.reg-lead {
  margin: 0.9rem 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.45;
  max-width: 18.5rem;
}

.reg-brand-foot {
  margin: 2rem 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  font-weight: 600;
}

.reg-brand-foot a {
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.reg-brand-foot a:hover {
  color: var(--amber);
}

/* —— Form side —— */
.reg-main {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 2rem 1.5rem;
  animation: regMainIn 0.55s 0.12s ease both;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.reg-main::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.reg-panel {
  width: 100%;
  max-width: 440px;
}

.reg-sponsor {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1.35rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.reg-sponsor::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--amber);
  flex-shrink: 0;
}

.reg-sponsor strong {
  color: var(--amber);
  font-weight: 800;
}

.reg-section {
  margin: 0 0 1.25rem;
}

.reg-section-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.reg-section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-alert {
  margin: 0 0 1rem;
  padding: 0.7rem 0.85rem;
  border: 0;
  border-radius: 4px;
  border-left: 3px solid #e11d48;
  background: #fff1f3;
  color: #be123c;
  font-size: 0.86rem;
  font-weight: 600;
}

.auth-alert.is-success {
  border-left-color: #059669;
  background: #ecfdf5;
  color: #047857;
}

.field {
  margin-bottom: 0.85rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
}

.form-control {
  display: block;
  width: 100%;
  height: 2.85rem;
  padding: 0 0.9rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--field);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: none;
  appearance: none;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.42);
  font-weight: 500;
  opacity: 1;
}

.form-control:focus {
  outline: none;
  border-color: var(--amber);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 3px rgba(255, 180, 0, 0.2);
}

.name-row {
  display: flex;
  gap: 0.65rem;
}

.name-row .field {
  flex: 1 1 0;
  min-width: 0;
  margin-bottom: 0.85rem;
}

.contact-row {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 0.65rem;
}

.contact-row .field {
  margin-bottom: 0.85rem;
}

.country-picker {
  position: relative;
}

.country-picker-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  height: 2.85rem;
  padding: 0 0.9rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--field);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.country-picker-toggle:focus {
  outline: none;
  border-color: var(--amber);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 3px rgba(255, 180, 0, 0.2);
}

.country-picker-toggle .country-flag,
.country-picker-toggle .country-iso {
  display: none;
}

.country-picker-toggle .country-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-picker-toggle i {
  color: var(--amber);
  font-size: 1.1rem;
}

.country-picker-menu {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  background: #3533a0;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 16px 40px rgba(16, 14, 64, 0.35);
  overflow: hidden;
}

.country-picker.open .country-picker-menu {
  display: block;
}

.country-picker-menu input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 0.9rem;
  outline: none;
  font-family: inherit;
  font-weight: 600;
  background: transparent;
  color: #fff;
}

.country-picker-menu input::placeholder {
  color: rgba(255, 255, 255, 0.42);
  font-weight: 500;
  opacity: 1;
}

.country-list {
  max-height: 220px;
  overflow-y: auto;
}

.country-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.9rem;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  color: #fff;
}

.country-option .country-iso {
  display: none;
}

.country-option:hover,
.country-option.active {
  background: rgba(255, 255, 255, 0.1);
}

.country-option .opt-code {
  margin-left: auto;
  color: var(--amber);
  font-weight: 800;
  font-size: 0.82rem;
}

.phone-box {
  display: flex;
  align-items: stretch;
  height: 2.85rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--field);
  overflow: hidden;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.phone-box:focus-within {
  border-color: var(--amber);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 3px rgba(255, 180, 0, 0.2);
}

.phone-box .phone-code {
  display: flex;
  align-items: center;
  padding: 0 0.8rem;
  font-weight: 800;
  color: var(--amber);
  background: rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  border: 0;
  border-right: 1px solid var(--line);
}

.phone-box .form-control {
  border: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  height: 100%;
}

.phone-box .form-control:focus {
  box-shadow: none;
}

.password-field {
  position: relative;
}

.password-field .form-control {
  padding-right: 2.85rem;
}

.toggle-password {
  position: absolute;
  right: 0.1rem;
  bottom: 0;
  height: 2.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 0.7rem;
  cursor: pointer;
}

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

.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0.15rem 0 1.15rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.auth-check input {
  margin-top: 0.2rem;
  accent-color: var(--amber);
}

.auth-check a {
  color: var(--amber);
  font-weight: 800;
}

.btn-reg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 3.05rem;
  border: 0;
  border-radius: 4px;
  background: linear-gradient(135deg, #ffc933 0%, var(--amber) 55%, #e09a00 100%);
  color: #1f2448;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(255, 180, 0, 0.28);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-reg:hover {
  filter: brightness(1.05);
  color: #1f2448;
  transform: translateY(-1px);
}

.btn-reg:disabled {
  opacity: 0.65;
  cursor: wait;
  filter: none;
  transform: none;
}

.reg-foot {
  display: none;
  margin: 1.25rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.reg-foot a {
  color: var(--amber);
  font-weight: 800;
  text-decoration: none;
}

.reg-foot a:hover {
  text-decoration: underline;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.1rem 0 1.15rem;
  font-size: 0.88rem;
}

.auth-row .auth-check {
  margin: 0;
}

.auth-row a {
  color: var(--amber);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

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

@keyframes regBrandIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: none; }
}

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

@keyframes regMainIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .reg-page {
    height: auto;
    min-height: 100vh;
    overflow: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .reg-page::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }

  .reg-shell {
    grid-template-columns: 1fr;
    height: auto;
  }

  .reg-brand {
    position: relative;
    top: auto;
    height: auto;
    min-height: auto;
    padding: 1.35rem 1.25rem 1.5rem;
  }

  .reg-brand-copy {
    margin: 1.35rem 0 0;
    max-width: none;
  }

  .reg-brand-copy h1 {
    font-size: clamp(1.7rem, 7vw, 2.1rem);
  }

  .reg-lead {
    max-width: none;
    font-size: 0.95rem;
  }

  .reg-brand-foot {
    display: none;
  }

  .reg-brand::after {
    width: 12rem;
    height: 12rem;
    right: -3rem;
    bottom: -4rem;
  }

  .reg-main {
    height: auto;
    overflow: visible;
    align-items: flex-start;
    padding: 1.35rem 1.15rem 2rem;
  }

  .reg-foot {
    display: block;
  }
}

@media (max-width: 520px) {
  .name-row,
  .contact-row {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .auth-row {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reg-brand,
  .reg-brand-copy,
  .reg-main,
  .btn-reg {
    animation: none;
    transition: none;
  }
}
