/* =====================================================
   RESET
===================================================== */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
  color: #182230;
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

/* =====================================================
   PAGE LAYOUT — two panels
===================================================== */

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* =====================================================
   LEFT PANEL — BRAND
===================================================== */

.auth-brand-panel {
  background: linear-gradient(160deg, #111827 0%, #1c2942 100%);
  color: #ffffff;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-brand-panel .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand-panel .brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: #111827;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.auth-brand-panel .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.auth-brand-panel .brand-text strong {
  font-size: 17px;
}

.auth-brand-panel .brand-text span {
  margin-top: 4px;
  font-size: 11px;
  color: #9aa5b3;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.auth-brand-message h1 {
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -1px;
  margin: 0 0 16px;
}

.auth-brand-message p {
  max-width: 420px;
  color: #b7bfca;
  font-size: 15px;
  margin: 0;
}

.auth-brand-footer {
  color: #7a8393;
  font-size: 12px;
}

/* =====================================================
   RIGHT PANEL — FORM
===================================================== */

.auth-form-panel {
  background: #f5f7fa;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.auth-form-wrapper {
  width: 100%;
  max-width: 440px;
}

.auth-form-header {
  margin-bottom: 28px;
}

.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: #687381;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
}

.auth-form-header h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.8px;
  color: #101722;
}

.auth-form-header p {
  margin: 8px 0 0;
  color: #697482;
  font-size: 14px;
}

/* =====================================================
   MESSAGE
===================================================== */

.auth-message {
  margin-bottom: 20px;
  padding: 13px 15px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
}

.auth-message.error {
  background: #fff0f1;
  border: 1px solid #ffd1d5;
  color: #b4232e;
}

.auth-message.success {
  background: #edf9f2;
  border: 1px solid #c9ecd7;
  color: #167342;
}

/* =====================================================
   FORM
===================================================== */

#registerForm {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 7px;
  color: #394452;
  font-size: 12px;
  font-weight: 700;
}

.form-group label span {
  color: #d63939;
}

.form-group input,
.form-group select {
  width: 100%;
  min-height: 47px;
  padding: 0 14px;
  border: 1px solid #d8dee5;
  border-radius: 9px;
  background: #ffffff;
  color: #1b2531;
  outline: none;
  font-size: 14px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.form-group input::placeholder {
  color: #a3abb5;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #7b8795;
  box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.08);
}

.form-group input.invalid,
.form-group select.invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.07);
}

.field-error {
  display: block;
  margin-top: 6px;
  min-height: 14px;
  color: #dc3545;
  font-size: 11.5px;
  font-weight: 600;
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: #8a94a1;
  font-size: 11px;
}

/* ---- Phone group ---- */

.phone-input-group {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
}

/* ---- Password group ---- */

.password-input-group {
  position: relative;
}

.password-input-group input {
  padding-right: 44px;
}

.toggle-password {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  font-size: 16px;
  padding: 8px;
  color: #8a94a1;
}

.password-strength {
  display: flex;
  gap: 5px;
  margin-top: 8px;
}

.password-strength span {
  height: 4px;
  flex: 1;
  border-radius: 999px;
  background: #e3e7ec;
  transition: background 0.2s ease;
}

.password-strength span.weak {
  background: #dc3545;
}

.password-strength span.medium {
  background: #f0a500;
}

.password-strength span.strong {
  background: #198754;
}

/* ---- Terms checkbox ---- */

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.checkbox-label input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.custom-checkbox {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  margin-top: 1px;
  border: 1px solid #c7ced6;
  border-radius: 5px;
  background: #ffffff;
  position: relative;
}

.checkbox-label input:checked + .custom-checkbox {
  background: #111827;
  border-color: #111827;
}

.checkbox-label input:checked + .custom-checkbox::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.checkbox-text {
  color: #626d7a;
  font-size: 12.5px;
  line-height: 1.6;
}

.checkbox-text a {
  color: #283342;
  font-weight: 700;
  text-decoration: underline;
}

.checkbox-text strong {
  color: #d63939;
}

/* ---- Submit button ---- */

.primary-action {
  min-height: 50px;
  border: 0;
  border-radius: 9px;
  background: #111827;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 5px 15px rgba(17, 24, 39, 0.13);
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.primary-action:hover {
  background: #202938;
  transform: translateY(-1px);
}

.primary-action:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.button-arrow {
  font-size: 15px;
}

/* ---- Switch to login ---- */

.auth-switch {
  margin-top: 24px;
  text-align: center;
  color: #697482;
  font-size: 13px;
}

.auth-switch a {
  color: #111827;
  font-weight: 700;
  text-decoration: underline;
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 960px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    padding: 32px 24px;
  }

  .auth-brand-message h1 {
    font-size: 30px;
  }

  .auth-brand-message p {
    display: none;
  }

  .auth-brand-footer {
    display: none;
  }
}

@media (max-width: 480px) {
  .auth-form-panel {
    padding: 32px 18px;
  }

  .phone-input-group {
    grid-template-columns: 1fr;
  }
}
