*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #ffffff;
  color: #1a1a1a;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.header {
  padding: 20px 32px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.header-logo svg {
  display: block;
}

/* ── Main Content ── */
.page-content {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px 60px;
}

.login-card {
  width: 100%;
  max-width: 460px;
}

.login-title {
  font-size: 22px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 20px;
  letter-spacing: -0.2px;
}

/* ── Tabs ── */
.tab-group {
  display: flex;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #555;
  background: #ffffff;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.1px;
}

.tab-btn.active {
  background: #f0f0f0;
  color: #1a1a1a;
  font-weight: 600;
}

.tab-btn:not(:last-child) {
  border-right: 1px solid #d0d0d0;
}

/* ── Phone Input ── */
.phone-input-row {
  display: flex;
  align-items: center;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 16px;
  background: #ffffff;
  transition: border-color 0.15s;
}

.phone-input-row:focus-within {
  border-color: #1a1a1a;
}

.country-select-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 13px 12px;
  background: none;
  border: none;
  border-right: 1px solid #d0d0d0;
  cursor: pointer;
  color: #1a1a1a;
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
}

.country-select-btn:hover {
  background: #f5f5f5;
}

.flag-emoji {
  font-size: 18px;
  line-height: 1;
}

.chevron-icon {
  width: 12px;
  height: 12px;
  color: #666;
}

.phone-number-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 13px 14px;
  font-size: 15px;
  color: #1a1a1a;
  background: transparent;
  font-family: inherit;
}

.phone-number-input::placeholder {
  color: #aaa;
}

/* ── Email Input (hidden by default) ── */
.email-input-wrap {
  margin-bottom: 16px;
  display: none;
}

.email-input-wrap.active {
  display: block;
}

.email-input {
  width: 100%;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  padding: 13px 14px;
  font-size: 15px;
  color: #1a1a1a;
  font-family: inherit;
  outline: none;
  background: #ffffff;
  transition: border-color 0.15s;
}

.email-input:focus {
  border-color: #1a1a1a;
}

.email-input::placeholder {
  color: #aaa;
}

/* ── Next Button ── */
.next-btn {
  width: 100%;
  padding: 14px;
  background: #1f3a5f;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: background 0.15s;
  font-family: inherit;
  margin-bottom: 16px;
}

.next-btn:hover {
  background: #162d4a;
}

.next-btn:active {
  background: #0f2034;
}

/* ── Disclaimer ── */
.disclaimer {
  font-size: 12px;
  color: #666;
  line-height: 1.5;
  margin-bottom: 0;
}

.disclaimer a {
  color: #1f3a5f;
  text-decoration: underline;
}

.disclaimer a:hover {
  color: #162d4a;
}

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 32px 0 0;
  display: none;
}

/* ── Footer ── */
.footer {
  padding: 24px 32px 32px;
  border-top: 1px solid #e8e8e8;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.footer-nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #555;
  text-decoration: none;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.15s;
}

.footer-nav-link:hover {
  color: #1a1a1a;
}

.footer-nav-icon {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.footer-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-legal {
  font-size: 12px;
  color: #888;
  line-height: 1.6;
}

.footer-legal p {
  margin: 0;
}

.allyant-badge {
  height: 56px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

/* ── Country Dropdown ── */
.country-dropdown {
  position: fixed;
  z-index: 100;
  background: #fff;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  min-width: 260px;
  max-height: 300px;
  overflow-y: auto;
  display: none;
}

.country-dropdown.open {
  display: block;
}

.country-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  color: #1a1a1a;
  transition: background 0.1s;
}

.country-option:hover {
  background: #f5f5f5;
}

.country-option-flag {
  font-size: 20px;
  line-height: 1;
}

.country-option-name {
  flex: 1;
}

.country-option-dial {
  color: #888;
  font-size: 13px;
}

.country-select-wrap {
  position: relative;
}

@media (max-width: 600px) {
  .header {
    padding: 16px 20px;
  }

  .footer {
    padding: 20px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .footer-nav {
    gap: 4px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
