/* ============================================================
   BabyCo — Auth pages (login / register)
   ============================================================ */

.auth-wrap {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 20px 64px;
  background:
    radial-gradient(1200px 500px at 50% -10%, var(--bg-secondary), transparent 70%),
    var(--bg-primary);
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-floating);
  padding: 40px 36px;
}

.auth-card-head {
  text-align: center;
  margin-bottom: 28px;
}

.auth-title {
  font-family: "Playfair Display", serif;
  font-size: 1.9rem;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.auth-sub {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.auth-field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.auth-field .req {
  color: var(--brand-secondary);
  margin-left: 2px;
}

.auth-field input {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.auth-field input::placeholder {
  color: var(--text-tertiary);
}

.auth-field input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(107, 172, 186, 0.18);
}

.auth-field.has-error input {
  border-color: #e0567f;
}

.auth-error {
  font-size: 0.82rem;
  color: #d23a66;
}

.auth-hint {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

/* Password input with show/hide button */
.auth-input-group {
  position: relative;
}

.auth-input-group input {
  padding-right: 46px;
}

.auth-toggle-pw {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-xs);
  font-size: 0.95rem;
  line-height: 1;
}

.auth-toggle-pw:hover {
  color: var(--brand-primary);
}

.auth-section-label {
  margin-top: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border-light);
  padding-top: 18px;
}

.auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  cursor: pointer;
}

.auth-checkbox input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--brand-secondary);
}

.auth-checkbox a {
  color: var(--brand-primary);
  text-decoration: underline;
}

.auth-submit {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
  cursor: pointer;
}

.auth-alt {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-alt a {
  color: var(--brand-primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-alt a:hover {
  text-decoration: underline;
}

.auth-alert {
  background: #fdecf1;
  border: 1px solid #f3b9cd;
  color: #b32a55;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.auth-alert.is-success {
  background: #e9f6f1;
  border-color: #b6e0d0;
  color: #1f7a5a;
}

/* ============================================================
   Account page
   ============================================================ */

.account-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 120px 20px 80px;
}

.account-head {
  margin-bottom: 24px;
}

.account-head .auth-title {
  text-align: left;
}

.account-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lifted);
  padding: 28px 28px;
  margin-bottom: 24px;
  scroll-margin-top: 100px;
}

.account-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.account-card-title i {
  color: var(--brand-primary);
}

.account-empty {
  color: var(--text-tertiary);
  font-size: 0.92rem;
  margin-bottom: 18px;
}

.auth-hint-inline {
  font-weight: 400;
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

/* Baby rows */
.baby-row {
  position: relative;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px 18px 14px;
  margin-bottom: 16px;
  background: var(--bg-secondary);
}

.baby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.baby-form select,
.account-card select {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.baby-form select:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(107, 172, 186, 0.18);
}

.baby-due {
  margin-top: 12px;
  font-size: 0.82rem;
}

/* Size recommendation */
.size-rec {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(107, 172, 186, 0.1);
  border: 1px solid rgba(107, 172, 186, 0.28);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-primary);
}

.size-rec-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 10px;
  background: var(--brand-primary);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
}

.size-rec-text {
  flex: 1;
  min-width: 160px;
}

.size-rec-range {
  color: var(--text-secondary);
}

.size-rec-link {
  color: var(--brand-primary);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.size-rec-link:hover {
  text-decoration: underline;
}

.size-rec-empty {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.baby-actions {
  margin-top: 14px;
}

.baby-save {
  cursor: pointer;
}

.baby-delete-form {
  position: absolute;
  top: 12px;
  right: 12px;
}

.baby-delete {
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-xs);
  font-size: 0.95rem;
}

.baby-delete:hover {
  color: #d23a66;
  background: rgba(210, 58, 102, 0.08);
}

.baby-add {
  margin-top: 8px;
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-md);
  padding: 4px 18px;
}

.baby-add summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand-primary);
  padding: 12px 0;
  list-style: none;
}

.baby-add summary::-webkit-details-marker {
  display: none;
}

.baby-add[open] summary {
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.baby-add .baby-form {
  padding-bottom: 16px;
}

.account-logout {
  text-align: center;
  margin-top: 8px;
}

.account-logout-link {
  color: var(--text-secondary);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.92rem;
}

.account-logout-link:hover {
  color: #d23a66;
}

@media (max-width: 560px) {
  .baby-grid {
    grid-template-columns: 1fr;
  }
  .account-card {
    padding: 22px 18px;
  }
}

/* Nav account chip / menu */
.nav-account {
  position: relative;
}

.nav-account-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

@media (max-width: 560px) {
  .auth-card {
    padding: 32px 22px;
  }
  .auth-title {
    font-size: 1.6rem;
  }
}
