/* myteam.css — /myteam onboarding wizard (myteam.js). Prefix mt-. Uses app.css tokens. */
.mt-root { max-width: 640px; margin: 8px auto 24px; display: grid; gap: 20px; min-width: 0; color: var(--ink); }
.mt-root * { min-width: 0; }


/* step indicator */
.mt-steps { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; justify-content: center; gap: 8px; counter-reset: none; }
.mt-step { display: flex; align-items: center; gap: 8px; }
.mt-step + .mt-step::before { content: ""; width: 32px; height: 2px; background: var(--line-strong); border-radius: 2px; }
.mt-step.mt-done + .mt-step::before { background: var(--red); }
.mt-step-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px 6px; border-radius: 8px; font: 700 14px/1.2 var(--font); color: var(--muted); }
button.mt-step-btn { cursor: pointer; color: var(--ink); }
button.mt-step-btn:hover { background: var(--line); }
.mt-step-n { width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; background: var(--line); color: var(--grey); flex: none; }
.mt-current .mt-step-btn { color: var(--ink); }
.mt-current .mt-step-n { background: var(--red); color: #fff; box-shadow: 3px 3px 0 -1px var(--bg), 3px 3px 0 1px var(--red); }
.mt-done .mt-step-n { background: var(--ink); color: #fff; }

/* card */
.mt-card { padding: 32px 36px; border-top: 4px solid var(--red); }
.mt-head { margin-bottom: 22px; }
.mt-title { font-size: clamp(22px, 3vw, 28px); letter-spacing: -.01em; margin: 6px 0 8px; overflow-wrap: anywhere; }
.mt-sub { margin: 0; font-size: 15.5px; }

.mt-form { display: grid; gap: 10px; }
.mt-form input, .mt-form select { width: 100%; }
.mt-form > .field { margin-top: 4px; }
.mt-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mt-hint { font-size: 13px; color: var(--muted); line-height: 1.45; margin: 0; font-weight: 400; }
.mt-label { margin: 6px 0 0; font-size: 13.5px; font-weight: 700; color: var(--grey); }
.mt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mt-actions .btn { margin: 0; }
.mt-foot { margin-top: 12px; }
.mt-foot .btn-red { margin-right: 4px; }
.mt-msg { margin: 4px 0 0; font-size: 14px; }
.mt-msg:empty { display: none; }
.mt-msg[data-kind=error] { color: var(--err); font-weight: 600; }
.mt-msg[data-kind=busy], .mt-msg[data-kind=info] { color: var(--grey); }
.mt-msg[data-kind=ok] { color: var(--ok); font-weight: 600; }
.mt-note { margin: 0 0 8px; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: var(--radius-s); font-size: 14.5px; color: var(--grey); }

/* step 1: team cards */
.mt-teams { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 12px; }
.mt-team { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; background: #fff; transition: border-color .15s; }
.mt-team:hover { border-color: var(--line-strong); }
.mt-team-top { display: flex; align-items: center; gap: 12px; }
.mt-team-mark { width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; }
.mt-team-names { flex: 1; }
.mt-team-name { font-size: 18px; margin: 0 0 4px; overflow-wrap: anywhere; }
.mt-team-facts { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; }

/* step 2: people rows */
.mt-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mt-person { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px; background: var(--bg); display: grid; gap: 6px; }
.mt-person.mt-bad { border-color: var(--err); background: #fff7f7; }
.mt-person-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.mt-person input, .mt-person select { width: 100%; background: #fff; }
.mt-x { align-self: end; margin-bottom: 2px; color: var(--muted); }
.mt-row-err { margin: 0; color: var(--err); font-size: 13.5px; font-weight: 600; }
.mt-done { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; font-size: 14.5px; }
.mt-done li { display: flex; align-items: baseline; gap: 8px; overflow-wrap: anywhere; }
.mt-done-mark { width: 20px; height: 20px; flex: none; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: var(--line); color: var(--grey); }
.mt-done-added .mt-done-mark { background: var(--ok); color: #fff; }
.mt-invite { margin: 0 0 18px; padding: 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius-s); background: var(--bg); display: grid; gap: 10px; }
.mt-invite-title { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
.mt-invite-item { display: grid; gap: 8px; }
.mt-invite-item + .mt-invite-item { padding-top: 10px; border-top: 1px solid var(--line); }
.mt-invite-text { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; font-size: 14px; overflow-wrap: anywhere; }

@media (max-width: 640px) {
  .mt-root { gap: 16px; margin-top: 0; }
  .mt-card { padding: 20px 16px; }
  .mt-step + .mt-step::before { width: 14px; }
  .mt-step-btn { padding: 4px 2px; gap: 6px; font-size: 13px; }
  .mt-person-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .mt-person-grid > label:first-child { grid-column: 1 / -1; }
  .mt-person { position: relative; }
  .mt-x { position: absolute; top: 4px; right: 4px; margin: 0; padding: 6px 8px; }
  .mt-two { grid-template-columns: 1fr; }
  .mt-foot .btn { flex: 1 1 auto; }
}
@media (max-width: 360px) {
  .mt-step-l { display: none; }
  .mt-current .mt-step-l { display: inline; }
}
