/* ============================================================
   Secondary pages: team, schedule, media, inbox, settings
   ============================================================ */

/* ---------------- team ---------------- */
.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.person {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 0 18px 20px;
  overflow: hidden;
  text-align: center;
}
.person-cover {
  justify-self: stretch;
  height: 74px;
  margin: 0 -18px -44px;
  background:
    radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--accent-2) 70%, transparent), transparent 60%),
    radial-gradient(circle at 90% 30%, rgba(246, 163, 109, 0.7), transparent 55%),
    var(--smoke);
}
.person .avatar {
  margin-bottom: 8px;
  --card-ring: rgba(255, 255, 255, 0.9);
}
.person h3 {
  font-size: 17px;
  font-weight: 600;
}
.person p {
  color: var(--muted);
  font-size: 13.5px;
}
.person-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--faint);
}
.person-meta i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}
.person-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.person.fresh .avatar {
  animation: freshPop 1s var(--spring) 0.3s both;
}
.empty {
  grid-column: 1 / -1;
  padding: 40px;
  text-align: center;
  color: var(--muted);
}

/* ---------------- schedule ---------------- */
.month-week,
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.month-week {
  margin-bottom: 8px;
}
.month-week span {
  text-align: center;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}
.month-grid {
  position: relative;
}
.month-grid .pill {
  border-radius: 18px;
  background: var(--solid);
  box-shadow: 0 14px 28px -14px rgba(0, 0, 0, 0.6);
}
.mday {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  height: clamp(54px, 5.6vw, 76px);
  border-radius: 18px;
  background: var(--card-2);
  overflow: hidden;
  transition:
    color 0.35s,
    background-color 0.35s,
    transform 0.4s var(--spring);
  animation: popIn 0.5s var(--spring) both;
  animation-delay: calc(var(--base, 0ms) + 300ms + var(--d) * 14ms);
}
.mday:hover {
  transform: scale(1.05);
}
.mday b {
  font-size: 17px;
  font-weight: 500;
}
.mday[aria-pressed='true'] {
  background: transparent;
  color: var(--on-solid);
}
.mday.today b {
  color: var(--accent-deep);
  font-weight: 700;
}
.mday.today[aria-pressed='true'] b {
  color: var(--accent-2);
}
.mday .dots {
  display: flex;
  gap: 3px;
  height: 5px;
}
.mday .dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.mday .dots i.peach {
  background: var(--peach);
}
.mday .dots i.blue {
  background: var(--blue);
}
.mday .dots i.violet {
  background: var(--violet);
}
.timeline {
  position: relative;
  display: grid;
  gap: 14px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 61px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: var(--line-2);
}
.timeline li {
  display: grid;
  grid-template-columns: 46px 14px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  animation: rise 0.55s var(--ease-out) both;
  animation-delay: calc(var(--i) * 80ms);
}
.timeline li.fresh {
  animation: freshPop 0.9s var(--spring) both;
}
.tl-time {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.tl-dot {
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--card);
}
.timeline li.peach .tl-dot {
  background: var(--peach);
}
.timeline li.blue .tl-dot {
  background: var(--blue);
}
.timeline li.violet .tl-dot {
  background: var(--violet);
}
.tl-card {
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--card-2);
}
.tl-card strong,
.tl-card small {
  display: block;
}
.tl-card small {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12.5px;
}
.timeline .tl-empty {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 10px;
  padding: 30px 10px;
  color: var(--muted);
  text-align: center;
}
.timeline:has(.tl-empty)::before {
  display: none;
}

/* ---------------- media ---------------- */
.card.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.media-grid .video {
  width: auto;
}

/* ---------------- inbox ---------------- */
.card.inbox {
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
  gap: 18px;
  height: min(680px, calc(100vh - 260px));
  min-height: 460px;
  padding: 14px;
}
.threads {
  display: grid;
  align-content: start;
  gap: 6px;
  overflow: auto;
}
.thread {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 20px;
  text-align: left;
  transition:
    background-color 0.25s,
    transform 0.4s var(--spring);
  animation: rise 0.5s var(--ease-out) both;
  animation-delay: calc(var(--i) * 60ms + 200ms);
}
.thread:hover {
  background: var(--card-2);
}
.thread.on {
  background: var(--solid);
  color: var(--on-solid);
}
.thread-txt {
  flex: 1;
  min-width: 0;
}
.thread-txt strong,
.thread-txt small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.thread-txt small {
  margin-top: 2px;
  font-size: 12.5px;
  opacity: 0.65;
}
.thread-side {
  flex-shrink: 0;
  display: grid;
  justify-items: end;
  gap: 4px;
  font-size: 11.5px;
  opacity: 0.8;
}
.thread-side em {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-style: normal;
  font-weight: 700;
  background: var(--peach);
  color: #2a1609;
  animation: popIn 0.5s var(--spring);
}
.convo {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: 24px;
  background: var(--card-2);
  overflow: hidden;
}
.convo-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.convo-head strong,
.convo-head small {
  display: block;
}
.convo-head small {
  color: var(--muted);
  font-size: 12.5px;
}
.bubbles {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
}
.bubble-row {
  display: grid;
  justify-items: start;
  gap: 3px;
  max-width: 76%;
  animation: rise 0.45s var(--ease-out) both;
  animation-delay: calc(var(--i) * 50ms);
}
.bubble-row.me {
  align-self: flex-end;
  justify-items: end;
}
.bubble-row.fresh {
  animation: bubbleIn 0.6s var(--spring) both;
}
.bubble-row.me.fresh {
  transform-origin: bottom right;
}
@keyframes bubbleIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.6);
  }
}
.msg {
  padding: 11px 15px;
  border-radius: 20px 20px 20px 6px;
  font-size: 14.5px;
  line-height: 1.42;
  background: var(--soft-2);
}
.bubble-row.me .msg {
  border-radius: 20px 20px 6px 20px;
  background: linear-gradient(140deg, var(--accent), var(--accent-deep));
  color: #fff;
}
.bubble-row small {
  font-size: 11.5px;
  color: var(--faint);
  padding: 0 6px;
}
.msg.typing {
  display: flex;
  gap: 4px;
  padding: 15px 16px;
}
.msg.typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing 1.2s ease-in-out infinite;
}
.msg.typing i:nth-child(2) {
  animation-delay: 0.15s;
}
.msg.typing i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes typing {
  0%,
  60%,
  100% {
    transform: none;
    opacity: 0.4;
  }
  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}
.composer {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
}
.composer input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  outline: 0;
  background: var(--soft-2);
  box-shadow: inset 0 0 0 1px var(--edge-card);
  transition: box-shadow 0.25s;
}
.composer input:focus {
  box-shadow:
    inset 0 0 0 1.5px var(--accent),
    0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
.btn.send {
  width: 46px;
  height: 46px;
  padding: 0;
}
.btn.send:disabled {
  opacity: 0.4;
}

/* ---------------- settings ---------------- */
.set {
  display: grid;
  align-content: start;
  gap: 6px;
}
.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.set-row.col {
  flex-direction: column;
  align-items: stretch;
}
.set-row strong,
.set-row small {
  display: block;
}
.set-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}
.swatches {
  display: flex;
  gap: 10px;
}
.swatch-btn {
  width: 34px;
  height: 34px;
  padding: 4px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px transparent;
  transition:
    box-shadow 0.3s,
    transform 0.4s var(--spring);
}
.swatch-btn:hover {
  transform: scale(1.12);
}
.swatch-btn.on {
  box-shadow: inset 0 0 0 2px var(--ink);
}
.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) var(--v), var(--line-2) var(--v));
  outline-offset: 6px;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.3),
    0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent);
  cursor: grab;
  transition: transform 0.3s var(--spring);
}
.range::-webkit-slider-thumb:active {
  transform: scale(1.2);
}
.range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}
.profile-row {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 8px;
}
.field {
  flex: 1;
  min-width: 180px;
  display: grid;
  gap: 6px;
}
.field span {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}
.field input {
  height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  outline: 0;
  background: var(--soft-2);
  box-shadow: inset 0 0 0 1px var(--edge-card);
  transition: box-shadow 0.25s;
}
.field input:focus {
  box-shadow:
    inset 0 0 0 1.5px var(--accent),
    0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
.field input[readonly] {
  color: var(--muted);
}

@media (max-width: 860px) {
  .card.inbox {
    grid-template-columns: 1fr;
    height: auto;
  }
  .threads {
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 1fr);
    overflow-x: auto;
  }
  .convo {
    height: 520px;
  }
}
@media (max-width: 720px) {
  .mday {
    height: 46px;
    border-radius: 12px;
  }
  .mday b {
    font-size: 14px;
  }
  .month-grid,
  .month-week {
    gap: 4px;
  }
  .set-row {
    flex-wrap: wrap;
  }
}
