html {
  box-sizing: border-box;
}

body {
  box-sizing: border-box;
  margin: 0;
}
#page-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  z-index: -1;
}

body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background-size: cover;
  background-position: center;
  height: 100dvh;
}

/* center form */
.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100dvh;
  width: 100%;
}

/* card */
.login-card {
  width: 360px;
  padding: 40px;
  text-align: center;

  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);

  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* logo */
.logo {
  width: 250px;
  margin-bottom: 10px;
}

/* heading */
.login-card h2 {
  margin-bottom: 25px;
  color: #2b5d6b;
}

/* inputs */
.login-card input {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;

  border: none;
  border-radius: 8px;

  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.1);

  font-size: 14px;
}

/* button */
.login-card button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;

  background: #4fa3c4;
  color: white;
  font-weight: 600;
  font-size: 15px;

  cursor: pointer;
  transition: 0.2s;
}

.login-card button:hover {
  background: #3b8fb0;
}

/* bottom links */
.legal {
  margin-top: 20px;
  font-size: 12px;
  color: #4a6a78;
}

.legal a {
  color: #4a6a78;
  text-decoration: none;
}

.legal a:hover {
  text-decoration: underline;
}
.signup {
  margin-top: 15px;
  font-size: 14px;
  color: #4a6a78;
}

.signup a {
  color: #4fa3c4;
  font-weight: 600;
  text-decoration: none;
}

.signup a:hover {
  text-decoration: underline;
}

.form-result {
  font-size: 14px;
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 6px;
}

.form-result.error {
  background: #ffe6e6;
  color: #c62828;
}

.form-result.success {
  background: #e6ffea;
  color: #1b5e20;
}

.loader {
  position: fixed;
  margin: auto;
  z-index: 100;
  height: 100vh;
  background-color: white;
  width: 100%;
}
.button-margin {
  margin-bottom: 15px;
}

/* FIX intl-tel-input layout */

/* ===== FIX PHONE INPUT CLEAN ===== */
.iti {
  width: 100%;
  margin-bottom: 15px;
}

/* make phone input identical to other inputs */
.iti input.iti__tel-input {
  width: 100%;
  padding: 12px;
  padding-left: 110px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.1);
  font-size: 14px;
}

/* flag container */
/* .iti__country-container {
  left: 10px;
} */

/* FIX background + alignment */
.iti__selected-country,
.iti__selected-country-primary {
  height: 100%;
  border-radius: 6px !important;
  padding:  0 5px !important;
  background: transparent !important;
  display: flex;
  align-items: center;
}

/* FIX text color (was white on white) */
.iti__selected-dial-code {
  color: #333;
  font-weight: 500;
  margin-left: 6px;
}

/* FIX arrow visibility */
.iti__arrow {
  border-top-color: #333;
}

/* /////////////////////////// */

@media screen and (max-width: 600px) {
  .login-card {
    width: 70%;
  }
  body {
    height: 100dvh;
    overflow: hidden;
  }
  #page-background {
    position: fixed;
    height: 250dvh;
    bottom: 0;
    left: 0;
    top: auto;
  }
  /* fix mobile dropdown width */
  .iti--fullscreen-popup.iti--container {
    width: 100% !important;
    max-width: 360px !important; /* match your input width */
    left: 50% !important;
    transform: translateX(-50%) !important;
    right: auto !important;
  }

  /* ensure dropdown content fits inside */
  .iti__dropdown-content {
    width: 100% !important;
    border-radius: 10px;
    overflow: hidden;
  }

  /* fix search input width */
  .iti__search-input {
    width: 100%;
    box-sizing: border-box;
  }
}
