* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #f3f2ee;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #111;
  -webkit-font-smoothing: antialiased;
}

.screen {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 20px 22px 40px;
  display: flex;
  flex-direction: column;
}

.back {
  background: none;
  border: 0;
  font-size: 26px;
  line-height: 1;
  padding: 6px 0;
  cursor: pointer;
  align-self: flex-start;
  color: #111;
}

h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 16px 0 24px;
}

.field-label {
  display: block;
  font-size: 15px;
  margin: 10px 0 8px;
  color: #1a1a1a;
}

.phone-row {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 10px;
}

.country {
  position: relative;
  background: #fff;
  border: 1px solid #d9d9d5;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 52px;
  cursor: pointer;
  user-select: none;
  padding: 0 8px;
}
.country:focus { outline: none; border-color: #111; }

.flag { display: inline-flex; border-radius: 50%; overflow: hidden; width: 28px; height: 28px; }
.flag svg { border-radius: 50%; }
.dial { font-size: 15px; color: #111; font-weight: 500; }
.chev { color: #333; font-size: 16px; }

.country-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid #d9d9d5;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  list-style: none;
  padding: 6px;
  margin: 0;
  z-index: 20;
  display: none;
}
.country-menu.open { display: block; }
.country-menu li {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.country-menu li:hover, .country-menu li:focus { background: #f3f2ee; outline: none; }
.flag-sm { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; overflow: hidden; }
.flag-sm svg { border-radius: 50%; }
.c-name { font-size: 15px; color: #111; }
.c-dial { font-size: 14px; color: #555; }

input[type="tel"],
input[type="password"],
input[type="text"] {
  width: 100%;
  height: 52px;
  border: 1px solid #d9d9d5;
  background: #fff;
  border-radius: 10px;
  padding: 0 44px 0 16px;
  font-size: 16px;
  color: #111;
  outline: none;
}

input:focus { border-color: #111; }

.password-row { position: relative; }

.eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: #333;
  cursor: pointer;
  padding: 6px;
}

.trouble {
  font-size: 14px;
  color: #333;
  margin: 14px 0 0;
}
.trouble a {
  color: #0a7d3f;
  font-weight: 600;
  text-decoration: underline;
}

.form-msg {
  min-height: 20px;
  font-size: 14px;
  margin-top: 14px;
}
.form-msg.error { color: #b00020; }
.form-msg.success { color: #0a7d3f; }

.submit {
  margin-top: auto;
  height: 56px;
  border-radius: 999px;
  border: 0;
  background: #111;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, opacity .15s ease;
}
.submit:disabled {
  background: #cfcecb;
  color: #6f6f6c;
  cursor: not-allowed;
}

.signup {
  text-align: center;
  margin: 18px 0 0;
  font-size: 15px;
}
.signup a { color: #0a7d3f; font-weight: 700; text-decoration: none; }

form { display: flex; flex-direction: column; flex: 1; }

/* App notice modal */
.app-notice {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}
.app-notice.open { display: flex; }
.app-notice-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px 22px 18px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}
.app-notice-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #eaf6ef;
  color: #0a7d3f;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.app-notice-text {
  font-size: 16px;
  color: #111;
  margin: 6px 0 18px;
  line-height: 1.4;
}
.app-notice-ok {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
