* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(160deg, #f7f2dc 0%, #f7f2dc 45%, #eaf3df 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2.25rem 1rem;
}

.signup-card {
  background: #fff;
  padding: 2.1rem 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid #d7d2b5;
  text-align: center;
  max-width: 430px;
  width: 100%;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.auth-top {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.2rem;
}

.icon-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: #005b35;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
}

.icon-btn:hover {
  background: rgba(0, 91, 53, .12);
}

.lang-icon-btn {
  border: 1px solid #d7d2b5;
  background: #fff;
}

.logo {
  width: 75%;
  margin-bottom: 1rem;
}

.logo img {
  width: 100%;
  height: auto;
}

h2 {
  margin: 0 0 1.35rem;
  color: #333;
}

.form-container {
  width: 100%;
  max-width: 300px;
  min-width: 0;
}

form {
  width: 100%;
}

form input {
  width: 100%;
  min-width: 0;
  padding: 0.75rem;
  margin-bottom: 0;
  border: 2.5px solid #bdbdbd;
  border-style: solid;
  border-radius: 6px;
  font-size: 1rem;
}

form input:focus {
  outline: none;
  border-color: #bdbdbd;
  box-shadow: none;
}

.input-wrap {
  position: relative;
  margin-bottom: 0.9rem;
  min-width: 0;
}

.input-wrap input {
  padding-right: 2rem;
}

.input-wrap.with-toggle input {
  padding-right: 3.1rem;
}

.valid-indicator {
  position: absolute;
  right: 0.65rem;
  top: 0;
  bottom: 0;
  margin: auto 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
}

.input-wrap.with-toggle .valid-indicator {
  right: 3.1rem;
}

.valid-indicator.ok {
  color: #0a6b43;
}

.phone-field {
  flex: 1;
  min-width: 0;
}

.phone-field input {
  margin-bottom: 0;
}

.password-feedback {
  margin: -0.35rem 0 0.9rem;
  text-align: left;
  font-size: 0.82rem;
  color: #555;
  line-height: 1.35;
}

.password-feedback.ok {
  color: #005b35;
}

.password-feedback.bad {
  color: #004225;
}

.pw-toggle {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  width: 2.65rem;
  border: none;
  border-left: 1px solid #d6d6d6;
  background: #fff;
  border-radius: 0 5px 5px 0;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  color: #444;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pw-toggle:hover {
  background: rgba(0, 0, 0, 0.03);
}

.pw-toggle i {
  display: block;
  line-height: 1;
  pointer-events: none;
}

.form-error {
  background: #edf5e6;
  border: 1px solid #b9cba8;
  color: #004225;
  border-radius: 6px;
  font-size: 0.9rem;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.9rem;
  text-align: left;
}

.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  text-align: left;
  font-size: 0.9rem;
  color: #222;
  margin-bottom: 1rem;
}

.terms-row input[type="checkbox"] {
  width: auto;
  margin: 0.15rem 0 0;
}

.terms-row a {
  color: #005b35;
  font-weight: 700;
  text-decoration: none;
}

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

form button:not(.pw-toggle) {
  width: 100%;
  padding: 0.75rem;
  background: #005b35;
  color: white;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

form button:hover {
  background: #005b35;
}

.phone-input {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
}

.country-code {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  

  gap: 0.25rem;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  height: 42px;
  background-color: #eee;
  white-space: nowrap;
}

.country-code img {
  width: 24px;
  height: auto;
}

.phone-number,
#phone {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}

.phone-number {
  display: inline-block;
  white-space: nowrap;
}

.phone-input input {
  flex: 1;
  min-width: 0;
  padding: 0.75rem;
  border: 2.5px solid #bdbdbd;
  border-style: solid;
  border-radius: 6px;
  font-size: 1rem;
  margin-bottom: 0;
}

#countryCode {
    text-align: center;
}



.login-link {
  margin-top: 1.1rem;
  font-size: 0.9rem;
}

.login-link a {
  color: #005b35;
  text-decoration: none;
  font-weight: 700;
}

.login-link a:hover {
  text-decoration: underline;
}

.terms-link {
  margin-top: 0.4rem;
  font-size: 0.85rem;
}

.terms-link a {
  color: #666;
  text-decoration: none;
}

.terms-link a:hover {
  text-decoration: underline;
}

#countryCode {
    padding: 0;
    
}

@media (max-width: 640px) {
  .container {
    align-items: flex-start;
    padding: 1.2rem 0.8rem;
  }

  .signup-card {
    padding: 1.35rem 1rem;
    border-radius: 10px;
  }

  .form-container {
    max-width: none;
  }

  .logo {
    width: 68%;
    margin-bottom: 0.65rem;
  }

  h2 {
    font-size: 1.28rem;
    margin-bottom: 1rem;
  }

  .country-code {
    padding-inline: 0.55rem;
  }
}

@media (max-width: 360px) {
  .phone-input {
    gap: 0.35rem;
  }

  .country-code {
    padding-inline: 0.45rem;
    font-size: 0.92rem;
  }
}
