/* RESET */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: #f6f8f7 !important;
}

/* REMOVE OLD BACKGROUNDS */
body,
#layoutAuthentication,
[class*="gbsfd"] {
  background-image: none !important;
  background: #f6f8f7 !important;
}

/* LAYOUT */
.reg-page-wrap {
  display: flex;
  min-height: 100vh;
}

/* LEFT */
.reg-left {
  width: 360px;
  background: linear-gradient(180deg, #062a3a, #041e2c);
  color: #fff;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.logo { width: 150px; margin-bottom: 30px; }

.reg-left-headline {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 10px;
}

.reg-left-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 30px;
}

.reg-left-feature {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.reg-left-feature-icon {
  width: 20px;
  height: 20px;
  background: rgba(45,184,122,0.2);
  color: #2db87a;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.reg-left-footer {
  font-size: 14px;
  color: rgba(255,255,255,0.3);
}

/* RIGHT */
.reg-right {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 50px;
}

.reg-form-wrap {
  width: 100%;
  max-width: 520px;
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* TOP */
.reg-top-link {
  text-align: right;
  font-size: 14px;
  margin-bottom: 15px;
}

.reg-top-link a {
  color: #2db87a;
  text-decoration: none;
}

/* FORM */
.reg-title { font-size: 18px; font-weight: 600; }
.reg-subtitle { font-size: 14px; color: #777; margin-bottom: 20px; }

.reg-form-row {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.reg-form-row.cols-2 {
  grid-template-columns: 1fr 1fr;
}

/* INPUT */
.form-control,
.phone-input-field,
.country-code {
  height: 44px;
  border-radius: 10px;
  border: 1px solid #dde3e0;
  padding: 0 14px;
  background: #fff;
  font-size: 16px;
}

.form-control:focus,
.phone-input-field:focus,
.country-code:focus {
  border-color: #2db87a;
  box-shadow: 0 0 0 3px rgba(45,184,122,0.15);
}

/* PHONE */
.phone-wrapper {
  display: flex;
  gap: 10px;
}

.country-code {
  width: 120px;
}

.phone-input-field {
  flex: 1;
}

/* PASSWORD */

/* Strength bar base */
.reg-strength-bar {
  height: 4px;
  background: #e5ebe8;
  border-radius: 3px;
  margin-top: 6px;
  overflow: hidden;
}

.reg-strength-fill {
  height: 100%;
  width: 0%;
  transition: 0.3s;
}

/* Strength colors */
.reg-strength-fill.weak {
  width: 30%;
  background: red;
}

.reg-strength-fill.medium {
  width: 65%;
  background: orange;
}

.reg-strength-fill.strong {
  width: 100%;
  background: green;
}

/* BUTTON */
#btnCreatePatientAccount {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(90deg, #2db87a, #3a7bd5);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  justify-content: center; 
}

#btnCreatePatientAccount:disabled {
  opacity: 0.5;
}

.password-wrapper {
    position: relative;
}

.password-wrapper .form-control {
    padding-right: 45px;
}

/* Custom field — matches login page */
.custom-field {
    border-radius: 12px !important;
    padding: 12px 14px !important;
    border: 1px solid #d6dbe1 !important;
    background: #f8fafc !important;
}

.custom-field:focus {
    border-color: #17a2b8 !important;
    box-shadow: 0 0 0 2px rgba(23,162,184,0.15) !important;
    background: #fff !important;
}

/* Eye icon — matches login page */
.toggle-eye {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    z-index: 10;
    font-size: 1rem;
    line-height: 1;
    user-select: none;
    min-width: 24px;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-eye:hover {
    color: #000;
}

/* Hide default browser password eye */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

input[type="password"]::-webkit-credentials-auto-fill-button {
    display: none !important;
}

/* Safari — hide native password reveal eye */
input[type="password"]::-webkit-strong-password-auto-fill-button {
    display: none !important;
}
input[type="password"]::-webkit-reveal {
    display: none !important;
}

/* Chrome / Edge */
input[type="password"]::-webkit-inner-spin-button,
input[type="password"]::-webkit-outer-spin-button {
    display: none;
}
/* Password mismatch hint */
.pw-mismatch-hint {
    font-size: 12px;
    color: #e74c3c;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* =========================
   PHONE INPUT STYLING
========================= */

.iti {
    width: 100%;
}

.iti__flag-container {
    left: 0;
}

.iti--separate-dial-code .iti__selected-flag {
    background: #fff;
    border-right: 1px solid #e1e5ea;
    padding: 0 14px;
    border-radius: 12px 0 0 12px;
    height: 100%;
}

.iti__selected-flag:hover {
    background: #fff;
}

.iti__country-container {
    border-radius: 12px 0 0 12px;
}

.iti__selected-dial-code {
    font-size: 16px;
    color: #333;
    margin-left: 8px;
}

.iti input,
.iti input[type="tel"] {
    width: 100%;
    height: 52px;
    border: 1px solid #dfe3e8;
    border-radius: 12px;
    padding-left: 120px !important;
    font-size: 16px;
    color: #333;
    background: #fff;
    transition: all 0.2s ease;
}

.iti input:focus {
    border-color: #2db87a;
    box-shadow: 0 0 0 4px rgba(45,184,122,0.12);
    outline: none;
}

/* Dropdown */
.iti__country-list {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    font-size: 14px;
}

/* Mobile */
@media (max-width: 600px) {
    .iti input,
    .iti input[type="tel"] {
        height: 48px;
        font-size: 15px;
        padding-left: 110px !important;
    }

    .iti__selected-dial-code {
        font-size: 15px;
    }
}

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

/* Tablet — hide left panel */
@media (max-width: 900px) {
  .reg-left {
    display: none;
  }

  .reg-right {
    padding: 30px 24px;
    align-items: flex-start;
  }

  .reg-form-wrap {
    max-width: 100%;
  }
}

/* Mobile */
@media (max-width: 600px) {
  body {
    background: #fff !important;
  }

  .reg-right {
    padding: 20px 16px;
  }

  .reg-form-wrap {
    padding: 20px 16px;
    border-radius: 12px;
    box-shadow: none;
    max-width: 100%;
  }

  /* Stack 2-col rows */
  .reg-form-row.cols-2 {
    grid-template-columns: 1fr;
  }

  .reg-form-row {
    gap: 12px;
    margin-bottom: 12px;
  }

  /* Prevent iOS zoom on input focus */
  .form-control,
  .phone-input-field,
  .country-code {
    font-size: 16px;
  }

  /* intlTelInput full width */
  .iti {
    width: 100%;
  }

  .reg-title {
    font-size: 20px;
  }

  .reg-subtitle {
    font-size: 13px;
    margin-bottom: 16px;
  }

  .reg-top-link {
    text-align: right;
    margin-bottom: 18px;
  }

  #btnCreatePatientAccount {
    height: 46px;
    font-size: 14px;
  }

  #passwordStrengthLabel {
    font-size: 11px;
  }

  .reg-agree-row label {
    font-size: 12px;
  }
}

/* Very small screens */
@media (max-width: 360px) {
  .reg-right {
    padding: 16px 12px;
  }

  .reg-form-wrap {
    padding: 16px 12px;
  }

  .reg-title {
    font-size: 18px;
  }

  .form-control,
  .phone-input-field,
  .country-code {
    height: 42px;
  }
}