/* =========================
   AUTH PAGES (Login + Register)
   ========================= */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
}

.auth-card h1 {
  font-size: 1.5rem;
  margin: 0 0 0.25rem;
  text-align: center;
}

.auth-card .subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.auth-card .btn {
  width: 100%;
  margin-top: 0.5rem;
}

.auth-card .auth-footer {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-card .auth-footer a {
  color: var(--text);
  font-weight: 500;
}

/* Two-column row for name fields */
.form-row {
  display: flex;
  gap: 0.75rem;
}

.form-row .form-group {
  flex: 1;
}

/* Country picker */
.country-picker {
  position: relative;
}

.country-search {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.country-search:focus {
  border-color: var(--primary);
}

.country-search.has-value {
  padding-left: 2.5rem;
}

.country-picker .selected-flag {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.15rem;
  line-height: 1;
  pointer-events: none;
}

.country-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 50;
}

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

.country-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s;
}

.country-option:hover,
.country-option.highlighted {
  background: var(--bg);
}

.country-option .flag {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.country-dropdown .no-results {
  padding: 0.75rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Field availability hints */
.field-hint {
  display: block;
  font-size: 0.8rem;
  margin-top: 0.25rem;
  min-height: 1.2em;
}

.field-hint.taken {
  color: #ef4444;
}

.field-hint.available {
  color: #22c55e;
}

.field-hint.checking {
  color: var(--text-muted);
}

/* Password strength indicator */
.password-strength {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.strength-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width 0.3s, background-color 0.3s;
}

.strength-label {
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.password-rules {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.password-rules li {
  padding: 0.1rem 0;
  padding-left: 1.2rem;
  position: relative;
}

.password-rules li::before {
  content: "\2022";
  position: absolute;
  left: 0.2rem;
  color: var(--text-muted);
}

.password-rules li.pass {
  color: #22c55e;
}

.password-rules li.pass::before {
  content: "\2713";
  color: #22c55e;
}

.password-rules li.fail {
  color: #ef4444;
}

.password-rules li.fail::before {
  content: "\2717";
  color: #ef4444;
}

@media (max-width: 480px) {
  .auth-card { padding: 1.5rem 1.25rem; }
  .form-row { flex-direction: column; gap: 0; }
}
