/* maintenance (mt-) + team profiles editor (tm-team-). Theme variables only. */

/* ---------- nav badge ---------- */
.mt-badge.urgent { background: var(--danger); }

/* ---------- summary strip ---------- */
.mt-stats { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; margin-bottom: 14px; }
.mt-stat { background: var(--white); border: 1px solid var(--sand); border-radius: var(--radius); padding: 8px 10px; text-align: center; display: flex; flex-direction: column; justify-content: center; min-height: 64px; }
.mt-stat strong { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; line-height: 1.1; }
.mt-stat small { color: var(--muted); font-size: .8rem; line-height: 1.2; }
.mt-stat.warn { background: var(--warn-bg); border-color: var(--warn); }
.mt-stat.bad { background: var(--danger-bg); border-color: var(--danger); }
.mt-stat.bad strong { color: var(--danger); }

/* ---------- board ---------- */
.mt-filter { display: none; width: 100%; margin-bottom: 12px; }
.mt-filter button { flex: 1; padding: 6px 6px; font-size: .95rem; }
.mt-n { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 11px; background: var(--white); color: var(--navy); font-size: .82rem; line-height: 1.5; }
.mt-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.mt-colh { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.mt-none { text-align: center; color: var(--muted); padding: 24px 8px; border: 1px dashed var(--sand); border-radius: var(--radius); }
.mt-card { padding: 14px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; border-left: 5px solid var(--sand); }
.mt-card.urgent { border-left-color: var(--danger); background: var(--danger-bg); }
.mt-card.overdue { box-shadow: 0 0 0 2px var(--danger), var(--shadow); }
.mt-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.mt-loc { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.15; overflow-wrap: anywhere; }
.mt-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.mt-body { display: flex; gap: 10px; align-items: flex-start; }
.mt-desc-wrap { flex: 1; min-width: 0; }
.mt-desc { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mt-desc.open { display: block; overflow: visible; }
.mt-more { min-height: 40px; }
.mt-thumb { flex: none; width: 76px; height: 76px; padding: 0; border: 1px solid var(--sand); border-radius: 10px; overflow: hidden; background: var(--sand-light); cursor: zoom-in; }
.mt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mt-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }
.mt-etarow { display: flex; gap: 6px; flex-wrap: wrap; }
.mt-eta { display: inline-block; padding: 3px 12px; border-radius: var(--radius-pill); background: var(--sky-bg); color: var(--teal); font-size: .92rem; font-weight: 600; }
.mt-eta.txt { background: var(--sand-light); color: var(--navy); font-weight: 400; }
.mt-eta.late { background: var(--danger-bg); color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.mt-line { font-size: .92rem; overflow-wrap: anywhere; }
.mt-line b { color: var(--muted); font-weight: 600; margin-right: 4px; }
.mt-int { background: var(--sand-light); border-radius: 8px; padding: 6px 10px; }
.mt-actions { display: flex; gap: 8px; margin-top: 4px; }
.mt-actions .btn { flex: 1; min-height: 56px; font-size: 1.1rem; }
.mt-actions .btn.big { width: auto; }
.mt-actions2 { display: flex; gap: 6px; flex-wrap: wrap; }
.mt-actions2 .btn { flex: 1 1 auto; min-height: 48px; }

/* ---------- dialogs ---------- */
.mt-dsub { margin: 0 0 12px; overflow-wrap: anywhere; }
.mt-lbl { font-size: .9rem; color: var(--muted); margin: 0 0 4px; }
.mt-etas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.mt-etabtn { min-height: 52px; border-radius: var(--radius); border: 1px solid var(--teal); background: var(--white); color: var(--teal); padding: 6px 8px; }
.mt-etabtn[aria-pressed="true"] { background: var(--teal); color: var(--cream); }
.mt-etaprev { min-height: 1.4em; margin: -4px 0 12px; font-weight: 600; color: var(--teal); }
.mt-gnote { margin: 8px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--sky-bg); color: var(--teal); }
.mt-pri { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.mt-pri label { position: relative; }
.mt-pri input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.mt-pri span { display: inline-flex; align-items: center; min-height: 48px; padding: 6px 18px; border-radius: var(--radius-pill); border: 1px solid var(--teal); color: var(--teal); background: var(--white); }
.mt-pri input:checked + span { background: var(--teal); color: var(--cream); }
.mt-pri input:focus-visible + span { outline: 2px solid var(--sky); outline-offset: 2px; }
.mt-photoarea { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.mt-pimg { width: 96px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--sand); }
.mt-lightbox { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 10px; }

/* ---------- history ---------- */
.mt-histbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.mt-histbar .input { flex: 1; min-width: 220px; }
.mt-hlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; align-items: start; }
.mt-hcard { padding: 14px; display: flex; flex-direction: column; gap: 8px; border-left: 5px solid var(--success); }
.mt-hcard.cancelled { border-left-color: var(--sand); opacity: .92; }
.mt-times { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .92rem; color: var(--muted); }
.mt-times b { color: var(--navy); }
.mt-fix { background: var(--ok-bg); border-radius: 8px; padding: 8px 10px; }

/* ---------- phone ---------- */
@media (max-width: 760px) {
  .mt-stats { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .mt-stat { padding: 6px 4px; min-height: 58px; }
  .mt-stat strong { font-size: 1.25rem; }
  .mt-stat small { font-size: .72rem; }
  .mt-filter { display: flex; }
  .mt-filter button { padding: 6px 2px; font-size: .85rem; white-space: nowrap; }
  .mt-board { display: block; }
  .mt-board[data-f="new"] .mt-col:not([data-s="new"]),
  .mt-board[data-f="acknowledged"] .mt-col:not([data-s="acknowledged"]),
  .mt-board[data-f="in_progress"] .mt-col:not([data-s="in_progress"]) { display: none; }
  .mt-colh { display: none; }
  .mt-actions .btn { min-height: 60px; }
  .mt-actions2 .btn { min-height: 52px; }
  .mt-hlist { grid-template-columns: 1fr; }
  .mt-histbar .seg { width: 100%; }
  .mt-histbar .seg button { flex: 1; padding: 6px 4px; }
  .mt-etas { grid-template-columns: repeat(2, 1fr); }
  .screen-h .btn { flex: 1 1 auto; }
}

/* ---------- team profiles editor (Island > Team) ---------- */
.tm-team-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.tm-team-wrap.tm-team-open { grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); }
.tm-team-note { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--radius); background: var(--sky-bg); color: var(--navy); }
.tm-team-dept { margin-bottom: 18px; }
.tm-team-dept h4 { margin: 0 0 8px; font-family: var(--font-display); font-weight: 400; font-size: var(--fs-h3); color: var(--teal); }
.tm-team-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tm-team-open .tm-team-cards { grid-template-columns: 1fr; }
.tm-team-card { display: flex; gap: 12px; padding: 12px; align-items: flex-start; }
.tm-team-card.hidden { opacity: .72; border-style: dashed; }
.tm-team-card.on { outline: 2px solid var(--teal); }
.tm-team-ph { flex: none; width: 84px; height: 84px; aspect-ratio: 1; border-radius: 50%; }
.tm-team-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.tm-team-info h5 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: var(--fs-h3); }
.tm-team-role { color: var(--muted); }
.tm-team-bio { margin: 0; font-size: .9rem; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tm-team-card .xp-btns { margin-top: 6px; }
.tm-team-card .btn.sm, .tm-team-main .xp-ph .btn.sm { min-height: 48px; }
.tm-team-edgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 1200px) { .tm-team-edgrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.tm-team-photoarea { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.tm-team-thumb { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 1px solid var(--sand); }
.tm-team-thumb.none { display: grid; place-items: center; background: var(--sand-light); color: var(--muted); font-size: .8rem; }
.tm-team-pv { display: flex; flex-direction: column; gap: 14px; }
.tm-team-pvcard { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--sand); border-radius: var(--radius); background: var(--white); }
.tm-team-pvph { flex: none; width: 64px; height: 64px; aspect-ratio: 1; border-radius: 50%; }
.tm-team-pvprofile { text-align: center; }
.tm-team-pvprofile .tm-team-pvph { width: 140px; height: 140px; margin: 0 auto 8px; }
.tm-team-pvprofile h2 { margin-bottom: 2px; }
.tm-team-pvprofile .isl-body { text-align: left; margin-top: 8px; }
.tm-team-fact { font-size: .95rem; }
.tm-team-fact b { color: var(--muted); font-weight: 600; margin-right: 4px; }
@media (max-width: 900px) {
  .tm-team-wrap.tm-team-open { grid-template-columns: minmax(0, 1fr); }
  .tm-team-wrap.tm-team-open .tm-team-main { display: none; }
}
@media (max-width: 480px) {
  .tm-team-cards { grid-template-columns: 1fr; }
}
