/* ============================================================
   BabyCo — Milestone Tracker
   ============================================================ */

.ms-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 20px 80px;
}

.ms-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.ms-lang {
  display: inline-flex;
  border: 1.5px solid var(--border-medium);
  border-radius: 50px;
  overflow: hidden;
}

.ms-lang a {
  padding: 8px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
}

.ms-lang a.is-active {
  background: var(--brand-primary);
  color: #fff;
}

.ms-babies {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ms-babies-label {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  font-weight: 600;
}

.ms-baby-chip {
  padding: 7px 14px;
  border-radius: 50px;
  border: 1.5px solid rgba(107, 172, 186, 0.3);
  background: var(--white);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.ms-baby-chip.is-active {
  background: rgba(107, 172, 186, 0.14);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* Progress */
.ms-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.ms-progress-bar {
  flex: 1;
  height: 10px;
  background: rgba(107, 172, 186, 0.15);
  border-radius: 50px;
  overflow: hidden;
}

.ms-progress-bar span {
  display: block;
  height: 100%;
  background: var(--brand-primary);
  border-radius: 50px;
  transition: width var(--transition-smooth);
}

.ms-progress-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-primary);
  white-space: nowrap;
}

.ms-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--brand-primary);
  font-weight: 600;
  text-decoration: none;
}

.ms-login:hover {
  text-decoration: underline;
}

/* List */
.ms-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ms-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
}

.ms-item.is-now {
  border-left-color: var(--brand-secondary);
  background: #fffafc;
}

.ms-item.is-done {
  border-left-color: #1f9d6b;
  background: #f4fbf8;
}

.ms-item-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 200px;
}

.ms-check {
  font-size: 1.25rem;
  color: var(--text-tertiary);
}

.ms-item.is-done .ms-check {
  color: #1f9d6b;
}

.ms-name {
  display: block;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.96rem;
}

.ms-typical {
  display: block;
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

.ms-item-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ms-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1f805a;
}

.ms-mark-form input[type="date"] {
  padding: 7px 9px;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-xs);
  font-family: inherit;
  font-size: 0.82rem;
}

.ms-mark {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border: none;
  border-radius: 50px;
  background: var(--brand-primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
}

.ms-mark:hover {
  background: var(--brand-secondary);
}

.ms-undo {
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.ms-undo:hover {
  color: #d23a66;
}

.ms-act {
  display: inline-flex;
}

.ms-cta-row {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.ms-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
}

.ms-cta-ghost {
  background: rgba(107, 172, 186, 0.1);
  color: var(--brand-primary);
  border: 1.5px solid rgba(107, 172, 186, 0.3);
}

.ms-cta-ghost:hover {
  background: rgba(107, 172, 186, 0.18);
}

@media (max-width: 560px) {
  .ms-controls { justify-content: center; }
  .ms-item-side { width: 100%; justify-content: flex-end; }
}
