/* Team: members, roles, groups, notices, chat, today, riding teams · Notification centre */
.tm-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 0 0 14px; scrollbar-width: none; }
.tm-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; text-decoration: none; font-weight: 700; font-size: 14px; color: var(--ink2); border-bottom: 2px solid transparent; white-space: nowrap; }
.tm-tabs a.on { color: var(--ink); border-bottom-color: var(--clay); } .tm-tabs a .ico { width: 17px; height: 17px; }
.tm-tabs em { font: 600 10px var(--f-mono); font-style: normal; background: var(--clay); color: var(--green); border-radius: 99px; padding: 0 6px; } .tm-tabs em:empty { display: none; }
.tm-body { display: flex; flex-direction: column; gap: 14px; }
.tm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.tm-kpis .kpi b { font-size: 24px; }
.tm-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 10px; }
.tm-mem { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.tm-mem.off { opacity: .7; } .tm-mem.removed { opacity: .45; }
.tm-av { position: relative; width: 44px; height: 44px; border-radius: 16px 16px 6px 6px; background: var(--rc); color: #fff; display: grid; place-items: center; font: 700 15px var(--f-head); flex: none; }
.tm-av .dot { position: absolute; inset-inline-end: -3px; bottom: -3px; border: 2px solid var(--panel); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #2E9E5B; flex: none; }
.tm-info { min-width: 0; } .tm-info b { display: block; font-size: 15.5px; overflow-wrap: anywhere; } .tm-info > small { color: var(--mute); font-size: 12.5px; overflow-wrap: anywhere; }
.tm-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; } .tm-tags .pill { display: inline-flex; align-items: center; gap: 4px; } .tm-tags .ico { width: 12px; height: 12px; }
.role-tag { display: inline-block; font: 700 11px var(--f-mono); padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--rc) 18%, transparent); color: var(--ink); border: 1px solid color-mix(in srgb, var(--rc) 55%, transparent); }
.tm-seen { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: end; }
.pill.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--straw); }
.tm-scope { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tm-matrix th, .tm-matrix td { text-align: center; } .tm-matrix th:first-child, .tm-matrix td:first-child { text-align: start; }
.tm-matrix tbody tr { cursor: default; } .lv { font-size: 15px; } .lv-write { color: var(--ok); } .lv-read { color: var(--info); } .lv-none { color: var(--mute); }
.tm-levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 8px; }
.tm-lv { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: var(--panel2); }
.tm-lv b { font-size: 14px; } .tm-lv .seg button { padding: 5px 8px; font-size: 12px; }
.tm-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.tm-grp { border-top: 4px solid var(--gc); } .tm-grp .actions { margin-top: 8px; } .tm-logo { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; }
.tm-notices { display: flex; flex-direction: column; gap: 10px; }
.tm-notice.pinned { border-inline-start: 4px solid var(--clay); } .tm-notice.unread { box-shadow: 0 0 0 2px color-mix(in srgb, var(--clay) 30%, transparent); }
.tm-notice.warn { background: var(--straw-bg); } .tm-notice.bad { border-color: var(--bad); }
.tm-notice footer { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; } .tm-notice footer small { flex: 1; min-width: 200px; }
/* chat */
.tm-chat { display: grid; grid-template-columns: 280px minmax(0, 1fr); height: calc(100vh - 230px); min-height: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.tm-chans { border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; } .tm-chans > .actions { padding: 10px; border-bottom: 1px solid var(--line); }
.tm-chans > div[data-chans] { overflow-y: auto; flex: 1; }
.tm-ch { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: start; cursor: pointer; font: inherit; }
.tm-ch:hover { background: var(--panel2); } .tm-ch.on { background: color-mix(in srgb, var(--clay) 14%, var(--panel)); }
.tm-ch span { flex: 1; min-width: 0; } .tm-ch b { display: block; font-size: 14.5px; } .tm-ch small { display: block; color: var(--mute); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-ch em { font: 700 10px var(--f-mono); font-style: normal; background: var(--clay); color: var(--green); border-radius: 99px; padding: 1px 7px; }
.tm-conv { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.tm-conv > header { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); } .tm-conv > header small { margin-inline-start: auto; }
.tm-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--panel2); }
.tm-msg { max-width: min(78%, 560px); align-self: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 8px 12px; }
.tm-msg.me { align-self: flex-end; background: var(--green); color: var(--oat); border-color: var(--green); border-radius: 14px 14px 4px 14px; }
:root[data-theme="dark"] .tm-msg.me { background: #1F3A2C; border-color: #2B4237; }
.tm-msg small { display: flex; gap: 6px; align-items: center; font-size: 11.5px; opacity: .75; } .tm-msg p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.tm-msg .mention { color: var(--clay); } .tm-msg.me .mention { color: #FFD3B5; }
.tm-del { border: 0; background: transparent; color: inherit; cursor: pointer; margin-inline-start: auto; font-size: 15px; line-height: 1; opacity: .6; }
.tm-ref { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 13px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--sage) 45%, transparent); text-decoration: none; color: inherit; }
.tm-ref .ico { width: 14px; height: 14px; }
.tm-compose { position: relative; display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.tm-compose textarea { flex: 1; min-width: 0; resize: none; max-height: 140px; }
.tm-attach { width: 100%; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; } .tm-attach button { border: 0; background: transparent; cursor: pointer; color: var(--mute); font-size: 16px; }
.tm-mention { position: absolute; bottom: 100%; inset-inline-start: 50px; background: var(--panel); border: 1px solid var(--line2); border-radius: 8px; box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 200px; z-index: 5; }
.tm-mention button { border: 0; background: transparent; text-align: start; padding: 8px 12px; cursor: pointer; font: 600 14px var(--f-head); color: var(--ink); display: flex; align-items: center; gap: 6px; } .tm-mention button:hover { background: var(--panel2); }
.center { text-align: center; }
/* today */
.tm-today { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; } .tm-today .wide { grid-column: 1 / -1; }
.tm-ho span { min-width: 0; } .tm-ho small { white-space: normal; }
/* notification centre */
.nt-day { font: 600 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); margin: 14px 0 6px; }
.nt-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.nt-item:last-child { border-bottom: 0; } .nt-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; background: transparent; }
.nt-item.unread .nt-dot { background: var(--clay); } .nt-item.unread b { font-weight: 800; }
.nt-item.bad .nt-dot { background: var(--bad); } .nt-item.warn.unread .nt-dot { background: var(--straw); }
.nt-main { flex: 1; min-width: 0; text-decoration: none; display: flex; flex-direction: column; gap: 1px; } .nt-main span { color: var(--ink2); font-size: 14px; overflow-wrap: anywhere; } .nt-main small { color: var(--mute); font-size: 12px; }
.nt-acts { display: flex; gap: 2px; } .nt-ch { display: flex; flex-direction: column; gap: 6px; }
.note.pri-urgent b::before { content: '● '; color: var(--bad); } .icon-btn.bell.urgent { color: var(--bad); }
@media (max-width: 760px) {
  .tm-mem { grid-template-columns: auto minmax(0, 1fr); } .tm-seen { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; text-align: start; }
  .tm-scope { grid-template-columns: 1fr; }
  .tm-chat { grid-template-columns: 1fr; height: calc(100vh - 200px); } .tm-chat .tm-conv { display: none; } .tm-chat.has-ch .tm-chans { display: none; } .tm-chat.has-ch .tm-conv { display: flex; }
  .tm-msg { max-width: 88%; } .tm-lv { flex-direction: column; align-items: flex-start; }
}
@media (min-width: 761px) { .tm-conv > header .only-m { display: none; } }
