:root {
  color-scheme: light;
  --teams: #5b5fc7;
  --teams-dark: #464775;
  --teams-soft: #e8e8f8;
  --blue: #0f6cbd;
  --green: #107c10;
  --orange: #ca5010;
  --red: #d13438;
  --teal: #038387;
  --ink: #242424;
  --muted: #616161;
  --subtle: #8a8886;
  --line: #e1dfdd;
  --line-strong: #d1d1d1;
  --canvas: #f5f5f5;
  --panel: #ffffff;
  --hover: #f0f0f0;
  --selected: #e8e8f8;
  --shadow: 0 8px 24px rgba(0,0,0,.14);
  --topbar: 52px;
  --rail: 72px;
  --mobile-nav: 78px;
  font-family: "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--canvas); color: var(--ink); }
body { overflow: hidden; font-size: 14px; letter-spacing: 0; }
button, input, textarea { font: inherit; letter-spacing: 0; }
button { color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.app-shell { height: 100dvh; display: grid; grid-template: var(--topbar) minmax(0,1fr) / var(--rail) minmax(0,1fr); overflow: hidden; }
.top-bar { grid-column: 1 / 3; z-index: 30; display: grid; grid-template-columns: var(--rail) 230px minmax(280px,650px) minmax(260px,1fr); align-items: center; min-width: 0; padding-right: 14px; color: #fff; background: var(--teams); box-shadow: 0 1px 0 rgba(0,0,0,.15); }
.brand-button { width: var(--rail); height: var(--topbar); display: grid; place-items: center; padding: 0; border: 0; background: var(--teams-dark); }
.brand-button img { width: 32px; height: 32px; border-radius: 8px; }
.top-title { min-width: 0; padding: 0 16px; }
.top-title strong, .top-title span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-title strong { font-size: 14px; font-weight: 650; }
.top-title span { margin-top: 2px; color: #e7e7f5; font-size: 11px; }
.global-search { height: 34px; display: grid; grid-template-columns: 20px minmax(0,1fr) auto; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid rgba(255,255,255,.42); border-radius: 5px; background: #fff; color: var(--muted); }
.global-search svg { width: 16px; height: 16px; }
.global-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.global-search kbd { padding: 2px 5px; border: 1px solid var(--line); border-radius: 3px; background: #f5f5f5; color: var(--subtle); font: 10px "Segoe UI", sans-serif; }
.top-actions { min-width: 0; display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.top-actions > button { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 5px; background: transparent; color: #fff; }
.top-actions > button:hover { background: rgba(255,255,255,.13); }
.top-actions svg { width: 18px; }
.desktop-profile span, .mobile-profile span { width: 30px; height: 30px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: #fff; color: var(--teams); font-size: 11px; font-weight: 700; }
.desktop-profile img, .mobile-profile img { width: 100%; height: 100%; display: block; object-fit: cover; }
.mobile-profile { display: none; }

.app-rail { grid-row: 2; display: flex; flex-direction: column; align-items: stretch; min-height: 0; padding: 6px 0 7px; background: #f0f0f0; border-right: 1px solid var(--line); overflow-y: auto; }
.app-rail button { position: relative; min-height: 54px; display: grid; place-items: center; gap: 1px; padding: 5px 3px; border: 0; background: transparent; color: #616161; }
.app-rail button::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: transparent; }
.app-rail button:hover { background: #e7e7e7; }
.app-rail button.active { color: var(--teams); background: #e8e8f1; }
.app-rail button.active::before { background: var(--teams); }
.app-rail button span { position: relative; width: 24px; height: 24px; display: grid; place-items: center; }
.app-rail button svg { width: 20px; height: 20px; stroke-width: 1.8; }
.app-rail button em { font-size: 10px; font-style: normal; }
.app-rail button b, .mobile-nav button b { position: absolute; top: -5px; right: -8px; min-width: 16px; height: 16px; padding: 0 4px; display: grid; place-items: center; border: 2px solid #f0f0f0; border-radius: 9px; background: var(--red); color: #fff; font-size: 9px; line-height: 1; }
.rail-spacer { flex: 1; min-height: 8px; }

.workspace { grid-column: 2; grid-row: 2; min-width: 0; min-height: 0; overflow: hidden; background: var(--canvas); }
.app-page { height: 100%; min-width: 0; min-height: 0; display: none; flex-direction: column; overflow: hidden; }
.app-page.active { display: flex; }
.page-header { flex: 0 0 72px; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: #fff; }
.page-header > div:first-child { min-width: 0; }
.page-header h1 { margin: 0; font-size: 24px; font-weight: 650; }
.page-header p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-actions button, .calendar-toolbar button, .file-tabs button { height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 600; }
.header-actions button:hover, .calendar-toolbar button:hover, .file-tabs button:hover { background: var(--hover); }
.header-actions button.primary { border-color: var(--teams); background: var(--teams); color: #fff; }
.header-actions button.primary:hover { background: var(--teams-dark); }
.header-actions svg { width: 16px; height: 16px; }

.split-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 338px minmax(0,1fr); }
.list-pane { min-width: 0; min-height: 0; overflow-y: auto; border-right: 1px solid var(--line); background: #fff; }
.detail-pane { min-width: 0; min-height: 0; overflow-y: auto; background: #fff; }
.segment-control { min-height: 52px; display: flex; align-items: center; gap: 4px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.segment-control button { height: 30px; padding: 0 10px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 12px; }
.segment-control button:hover { background: var(--hover); }
.segment-control button.active { background: var(--selected); color: var(--teams-dark); font-weight: 650; }
.segment-control.small { min-height: auto; padding: 0; border: 0; }
.segment-control.small button { height: 28px; }
.pane-search, .apps-search { display: grid; grid-template-columns: 18px minmax(0,1fr); align-items: center; gap: 7px; margin: 12px; padding: 0 9px; height: 34px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; }
.pane-search svg, .apps-search svg { width: 15px; color: var(--muted); }
.pane-search input, .apps-search input { min-width: 0; border: 0; outline: 0; background: transparent; font-size: 12px; }
.list-section-title { height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; color: var(--muted); }
.list-section-title strong { font-size: 11px; text-transform: uppercase; }
.list-section-title button { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: var(--muted); }
.list-section-title svg { width: 15px; }

.feed-item, .chat-item { position: relative; width: 100%; min-height: 72px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; gap: 10px; align-items: start; padding: 11px 12px; border: 0; border-bottom: 1px solid #ededed; background: #fff; text-align: left; }
.feed-item:hover, .chat-item:hover { background: #f7f7f7; }
.feed-item.active, .chat-item.active { background: var(--selected); }
.feed-item.unread::before, .chat-item.unread::before { content: ""; position: absolute; left: 4px; top: 32px; width: 4px; height: 4px; border-radius: 50%; background: var(--teams); }
.feed-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--teams-soft); color: var(--teams); }
.feed-icon svg { width: 17px; }
.feed-copy, .chat-copy { min-width: 0; }
.feed-copy strong, .feed-copy span, .feed-copy small, .chat-copy strong, .chat-copy span, .chat-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-copy strong, .chat-copy strong { font-size: 13px; font-weight: 650; }
.feed-copy span, .chat-copy span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.feed-copy small, .chat-copy small { margin-top: 3px; color: var(--subtle); font-size: 11px; }
.feed-item time, .chat-item time { color: var(--subtle); font-size: 10px; white-space: nowrap; }
.avatar { position: relative; flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 700; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar::after { content: ""; position: absolute; right: 0; bottom: 0; width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; background: #6b6b6b; }
.avatar.available::after { background: #6bb700; }
.avatar.busy::after, .avatar.in-a-meeting::after, .avatar.do-not-disturb::after { background: var(--red); }
.avatar.away::after { background: #f2c811; }
.unread-pill { min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 5px; border-radius: 9px; background: var(--teams); color: #fff; font-size: 10px; font-weight: 700; }

.activity-detail-empty, .empty-state { height: 100%; display: grid; place-items: center; padding: 30px; text-align: center; color: var(--muted); }
.empty-state > div { max-width: 360px; }
.empty-state svg { width: 42px; height: 42px; color: var(--teams); stroke-width: 1.4; }
.empty-state h2 { margin: 12px 0 5px; color: var(--ink); font-size: 18px; }
.empty-state p { margin: 0; line-height: 1.5; font-size: 12px; }
.activity-card { max-width: 760px; margin: 34px auto; padding: 0 24px; }
.mobile-detail-back { display: none; }
.detail-kicker { display: flex; align-items: center; gap: 8px; color: var(--teams); font-size: 12px; font-weight: 650; }
.detail-kicker svg { width: 18px; }
.activity-card h2 { margin: 13px 0 6px; font-size: 25px; }
.activity-card .detail-context { color: var(--muted); font-size: 12px; }
.activity-card blockquote { margin: 22px 0; padding: 18px; border-left: 3px solid var(--teams); background: #f7f7fb; font-size: 15px; line-height: 1.6; }
.detail-actions { display: flex; gap: 8px; margin-top: 18px; }
.detail-actions button { height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; font-size: 12px; font-weight: 600; }
.detail-actions button:first-child { border-color: var(--teams); background: var(--teams); color: #fff; }
.detail-actions svg { width: 15px; }

.conversation-pane, .channel-pane { display: flex; flex-direction: column; }
.conversation-header, .channel-header { flex: 0 0 62px; display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: #fff; }
.conversation-header .identity, .channel-header .identity { min-width: 0; flex: 1; }
.conversation-header strong, .conversation-header small, .channel-header strong, .channel-header small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-header strong, .channel-header strong { font-size: 14px; }
.conversation-header small, .channel-header small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.conversation-actions { display: flex; align-items: center; gap: 4px; }
.conversation-actions button { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--muted); }
.conversation-actions button:hover { background: var(--hover); color: var(--teams); }
.conversation-actions svg { width: 18px; }
.message-stream { flex: 1; min-height: 0; overflow-y: auto; padding: 18px max(18px,8%); background: #fff; }
.message { display: flex; gap: 9px; margin: 0 0 16px; }
.message.me { justify-content: flex-end; }
.message.system { justify-content: center; }
.message-body { max-width: min(640px,75%); }
.message-author { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.message-author strong { font-size: 12px; }
.message-author time { color: var(--subtle); font-size: 10px; }
.message-bubble { padding: 9px 12px; border-radius: 6px; background: #f3f3f3; font-size: 13px; line-height: 1.45; white-space: pre-wrap; }
.message.me .message-bubble { background: var(--teams-soft); }
.message.system .message-bubble { color: var(--muted); background: #f7f7f7; font-size: 11px; }
.composer { flex: 0 0 auto; margin: 0 14px 14px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.07); }
.composer textarea { width: 100%; min-height: 55px; max-height: 120px; resize: none; padding: 11px 12px; border: 0; outline: 0; background: transparent; font-size: 13px; }
.composer-toolbar { height: 38px; display: flex; align-items: center; gap: 3px; padding: 0 6px; border-top: 1px solid var(--line); }
.composer-toolbar button { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--muted); }
.composer-toolbar button:hover { background: var(--hover); }
.composer-toolbar button.send { margin-left: auto; background: var(--teams); color: #fff; }
.composer-toolbar svg { width: 16px; }

.team-group { border-bottom: 1px solid var(--line); }
.team-title { width: 100%; min-height: 48px; display: grid; grid-template-columns: 32px minmax(0,1fr) 24px; gap: 9px; align-items: center; padding: 8px 12px; border: 0; background: #fff; text-align: left; }
.team-title:hover { background: var(--hover); }
.team-mark { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 6px; color: #fff; font-size: 10px; font-weight: 700; }
.team-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.team-title svg { width: 15px; color: var(--muted); }
.channel-list { padding: 0 0 6px 48px; }
.channel-list button { width: 100%; min-height: 34px; display: grid; grid-template-columns: 16px minmax(0,1fr) auto; gap: 7px; align-items: center; padding: 5px 10px 5px 0; border: 0; background: #fff; color: var(--muted); text-align: left; }
.channel-list button:hover { color: var(--ink); }
.channel-list button.active { color: var(--teams-dark); font-weight: 650; }
.channel-list svg { width: 13px; }
.channel-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.channel-list b { min-width: 17px; height: 17px; display: grid; place-items: center; border-radius: 9px; background: var(--teams); color: #fff; font-size: 9px; }
.channel-tabs { display: flex; gap: 18px; height: 42px; padding: 0 16px; border-bottom: 1px solid var(--line); background: #fff; }
.channel-tabs button { position: relative; border: 0; background: transparent; color: var(--muted); font-size: 12px; }
.channel-tabs button.active { color: var(--ink); font-weight: 650; }
.channel-tabs button.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--teams); }
.channel-resource-list, .channel-notes { flex: 1; min-height: 0; overflow-y: auto; padding: 18px; background: #fff; }
.channel-resource-list .section-heading { margin-bottom: 10px; }
.channel-resource-list .section-heading button, .channel-notes button { height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; font-size: 11px; font-weight: 650; }
.channel-resource-list .section-heading svg, .channel-notes button svg { width: 15px; }
.resource-row { width: 100%; min-height: 58px; display: grid; grid-template-columns: 34px minmax(0,1fr) 20px; gap: 10px; align-items: center; padding: 8px 4px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; }
.resource-row:hover { background: var(--hover); }
.resource-row > span { min-width: 0; }
.resource-row strong, .resource-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resource-row strong { font-size: 12px; }
.resource-row small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.resource-row > svg { width: 16px; color: var(--subtle); }
.channel-notes { display: grid; align-content: start; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; background: #f7f7f7; }
.channel-notes section { grid-column: 1 / 3; padding: 18px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.channel-notes section > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 6px; background: var(--teams-soft); color: var(--teams); }
.channel-notes section svg { width: 19px; }
.channel-notes h2 { margin: 12px 0 5px; font-size: 18px; }
.channel-notes h3 { margin: 0 0 8px; font-size: 14px; }
.channel-notes p { color: var(--muted); line-height: 1.55; }
.channel-notes section p { margin: 0 0 14px; }
.channel-notes article { padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.channel-notes article p { min-height: 66px; margin: 0 0 12px; font-size: 12px; }
.channel-notes article small { color: var(--subtle); }
.post-stream { padding: 18px max(18px,8%); overflow-y: auto; }
.channel-post { max-width: 760px; margin: 0 auto 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.post-author { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 9px; align-items: start; padding: 12px 12px 7px; }
.post-author .avatar { width: 34px; height: 34px; font-size: 11px; }
.post-author strong, .post-author small { display: block; }
.post-author strong { font-size: 12px; }.post-author small { color: var(--muted); font-size: 10px; }.post-author time { color: var(--subtle); font-size: 10px; }
.post-copy { padding: 0 12px 12px; }.post-copy h3 { margin: 4px 0 5px; font-size: 14px; }.post-copy p { margin: 0; color: #424242; font-size: 12px; line-height: 1.55; }
.post-footer { display: flex; align-items: center; gap: 16px; min-height: 36px; padding: 0 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.post-footer button { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: transparent; color: inherit; }.post-footer svg { width: 14px; }

.calendar-toolbar { flex: 0 0 48px; display: flex; align-items: center; gap: 6px; padding: 7px 20px; border-bottom: 1px solid var(--line); background: #fff; }
.calendar-toolbar button { height: 30px; padding: 0 9px; }
.calendar-toolbar button:first-child, .calendar-toolbar button:nth-child(3) { width: 30px; padding: 0; }
.calendar-toolbar span { flex: 1; }
.calendar-toolbar button.active { background: var(--selected); color: var(--teams-dark); }
.calendar-toolbar svg { width: 14px; }
.calendar-week { flex: 0 0 62px; display: grid; grid-template-columns: repeat(7,1fr); border-bottom: 1px solid var(--line); background: #fff; }
.day-cell { display: grid; place-items: center; align-content: center; gap: 2px; border-right: 1px solid #f0f0f0; color: var(--muted); }
.day-cell:last-child { border-right: 0; }
.day-cell strong { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); font-size: 13px; }
.day-cell span { font-size: 10px; text-transform: uppercase; }
.day-cell.today strong { background: var(--teams); color: #fff; }
.calendar-content { flex: 1; min-height: 0; display: grid; grid-template-columns: 260px minmax(0,1fr); overflow: hidden; }
.calendar-summary { padding: 16px; border-right: 1px solid var(--line); background: #fff; overflow-y: auto; }
.calendar-summary h2 { margin: 0; font-size: 16px; }.calendar-summary p { margin: 4px 0 15px; color: var(--muted); font-size: 11px; }
.summary-block { padding: 12px 0; border-top: 1px solid var(--line); }.summary-block strong { display: block; font-size: 24px; }.summary-block span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.agenda-list { min-height: 0; padding: 10px 20px 30px; overflow-y: auto; }
.agenda-heading { margin: 8px 0 10px; color: var(--muted); font-size: 11px; font-weight: 650; text-transform: uppercase; }
.agenda-item { position: relative; width: 100%; min-height: 76px; display: grid; grid-template-columns: 92px 4px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 8px 10px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; }
.agenda-item:hover { background: #fafafa; }.agenda-item time { font-size: 11px; line-height: 1.4; }.agenda-color { align-self: stretch; border-radius: 2px; background: var(--teams); }.agenda-color.blue { background: var(--blue); }.agenda-color.green { background: var(--green); }.agenda-color.orange { background: var(--orange); }
.agenda-copy { min-width: 0; }.agenda-copy strong, .agenda-copy span, .agenda-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.agenda-copy strong { font-size: 13px; }.agenda-copy span { margin-top: 3px; color: var(--muted); font-size: 11px; }.agenda-copy small { margin-top: 3px; color: var(--subtle); font-size: 10px; }
.join-button { height: 30px; padding: 0 11px; border: 1px solid var(--teams); border-radius: 4px; background: #fff; color: var(--teams); font-size: 11px; font-weight: 650; }
.agenda-item.next { background: #f7f7fc; }

.calls-content { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(300px,36%) minmax(0,1fr); overflow: hidden; }
.speed-dial, .recent-calls { min-height: 0; padding: 18px 20px; overflow-y: auto; background: #fff; }.speed-dial { border-right: 1px solid var(--line); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }.section-heading h2 { margin: 0; font-size: 16px; }.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }.section-heading > button { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; }.section-heading svg { width: 15px; }
.speed-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }.speed-card { min-height: 104px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; text-align: left; }.speed-card:hover { border-color: #b8b8b8; background: #fafafa; }.speed-card strong, .speed-card span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.speed-card strong { margin-top: 9px; font-size: 12px; }.speed-card span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.call-row { min-height: 61px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto auto; gap: 10px; align-items: center; padding: 10px 8px; border-bottom: 1px solid var(--line); }.call-copy { min-width: 0; }.call-copy strong, .call-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.call-copy strong { font-size: 12px; }.call-copy span { margin-top: 3px; color: var(--muted); font-size: 10px; }.call-row.missed .call-copy span { color: var(--red); }.call-row time { color: var(--subtle); font-size: 10px; white-space: nowrap; }.call-row button { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--teams); }.call-row button:hover { background: var(--hover); }.call-row svg { width: 16px; }

.file-tabs { flex: 0 0 46px; display: flex; align-items: end; gap: 18px; padding: 0 20px; border-bottom: 1px solid var(--line); background: #fff; }.file-tabs button { position: relative; height: 45px; padding: 0 2px; border: 0; background: transparent; color: var(--muted); }.file-tabs button.active { color: var(--ink); }.file-tabs button.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--teams); }
.file-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0,1fr) 300px; overflow: hidden; }.file-layout > section { min-width: 0; overflow-y: auto; background: #fff; }.file-table-head, .file-row { width: 100%; display: grid; grid-template-columns: minmax(220px,2fr) 120px 150px minmax(150px,1fr) 36px; gap: 10px; align-items: center; padding: 0 16px; }.file-table-head { position: sticky; z-index: 2; top: 0; height: 38px; border-bottom: 1px solid var(--line); background: #fafafa; color: var(--muted); font-size: 10px; }.file-row { min-height: 56px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; }.file-row:hover { background: #f7f7f7; }.file-row.active { background: var(--selected); }.file-name { min-width: 0; display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 10px; align-items: center; }.file-icon { width: 32px; height: 34px; display: grid; place-items: center; border-radius: 3px; color: #fff; font-size: 9px; font-weight: 700; }.file-name strong, .file-name span, .file-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.file-name strong { display: block; font-size: 12px; }.file-name span { display: none; color: var(--muted); font-size: 10px; }.file-row > span { color: var(--muted); font-size: 11px; }.file-row > i { color: #f2c811; }.file-row > i svg { width: 15px; fill: currentColor; }
.file-preview { min-height: 0; padding: 18px; border-left: 1px solid var(--line); background: #fafafa; overflow-y: auto; }.preview-document { min-height: 260px; display: grid; place-items: center; align-content: center; padding: 24px; border: 1px solid var(--line); border-radius: 6px; background: #fff; text-align: center; }.preview-document .file-icon { width: 54px; height: 60px; font-size: 12px; }.preview-document h2 { margin: 14px 0 5px; font-size: 15px; }.preview-document p { margin: 0; color: var(--muted); font-size: 11px; }.preview-meta { margin-top: 16px; }.preview-meta div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 11px; }.preview-meta span { color: var(--muted); }.preview-meta strong { text-align: right; }

.apps-search { flex: 0 0 38px; width: min(520px,calc(100% - 40px)); margin: 16px 20px 5px; }.featured-apps { flex: 1; min-height: 0; padding: 14px 20px 30px; overflow-y: auto; }.app-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: 10px; }.app-card { min-height: 86px; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 11px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 6px; background: #fff; text-align: left; }.app-card:hover { border-color: #b8b8b8; box-shadow: 0 2px 8px rgba(0,0,0,.06); }.app-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; color: #fff; }.app-icon svg { width: 21px; }.app-copy { min-width: 0; }.app-copy strong, .app-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.app-copy strong { font-size: 12px; }.app-copy span { margin-top: 4px; color: var(--muted); font-size: 10px; }.app-card b { min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 10px; background: var(--red); color: #fff; font-size: 10px; }

.mobile-nav { display: none; }
.profile-view, .utility-view { position: fixed; z-index: 80; inset: 0; overflow-y: auto; background: var(--canvas); }.profile-view > header, .utility-view > header { position: sticky; z-index: 3; top: 0; height: 52px; display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; align-items: center; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.98); }.profile-view > header button, .utility-view > header button { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; }.profile-view > header svg, .utility-view > header svg { width: 18px; }.profile-view > header h2, .utility-view > header h2 { margin: 0; text-align: center; font-size: 15px; }
.profile-hero { padding: 26px 20px; background: #fff; border-bottom: 1px solid var(--line); }.profile-hero-inner { max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: 86px minmax(0,1fr) auto; gap: 18px; align-items: center; }.profile-hero .avatar { width: 82px; height: 82px; font-size: 20px; }.profile-hero h1 { margin: 0; font-size: 26px; }.profile-hero p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }.profile-hero .status-line { display: inline-flex; align-items: center; gap: 6px; margin-top: 9px; color: var(--green); font-size: 12px; }.profile-hero .status-line::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }.profile-hero-actions { display: flex; gap: 8px; }.profile-hero-actions button { height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; font-size: 11px; }.profile-hero-actions svg { width: 15px; }
.profile-notice { max-width: 760px; margin: 14px auto 0; padding: 9px 11px; border-left: 3px solid var(--orange); background: #fff4ce; color: #6a4b00; font-size: 11px; line-height: 1.45; }
.profile-body { max-width: 760px; margin: 14px auto 36px; background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }.profile-section { padding: 16px 18px; border-bottom: 1px solid var(--line); }.profile-section:last-child { border-bottom: 0; }.profile-section h3 { margin: 0 0 11px; font-size: 14px; }.profile-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px 22px; }.profile-field small, .profile-field strong { display: block; }.profile-field small { color: var(--muted); font-size: 10px; }.profile-field strong { margin-top: 3px; overflow-wrap: anywhere; font-size: 12px; line-height: 1.4; }.org-row { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }.org-row:first-of-type { border-top: 0; }.org-row strong, .org-row span { display: block; }.org-row strong { font-size: 12px; }.org-row span { margin-top: 2px; color: var(--muted); font-size: 10px; }.org-row button { height: 30px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; font-size: 10px; }

.utility-body { max-width: 780px; margin: 18px auto 40px; background: #fff; border: 1px solid var(--line); }.utility-hero { padding: 22px; color: #fff; background: var(--teams-dark); }.utility-hero .app-icon { margin-bottom: 12px; background: rgba(255,255,255,.18) !important; }.utility-hero h1 { margin: 0; font-size: 24px; }.utility-hero p { margin: 7px 0 0; color: #e1e1ef; line-height: 1.5; }.utility-section { padding: 18px 20px; border-bottom: 1px solid var(--line); }.utility-section h3 { margin: 0 0 10px; font-size: 14px; }.utility-section p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }.detail-info-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }.detail-info-grid div { padding: 11px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }.detail-info-grid small, .detail-info-grid strong { display: block; }.detail-info-grid small { color: var(--muted); font-size: 10px; }.detail-info-grid strong { margin-top: 3px; overflow-wrap: anywhere; font-size: 12px; }

.sheet-layer { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; }.sheet-scrim { position: absolute; inset: 0; border: 0; background: rgba(0,0,0,.42); }.action-sheet { position: relative; width: min(480px,100%); max-height: min(680px,calc(100dvh - 40px)); overflow-y: auto; border-radius: 8px; background: #fff; box-shadow: var(--shadow); }.sheet-head { display: flex; align-items: center; justify-content: space-between; min-height: 54px; padding: 0 16px; border-bottom: 1px solid var(--line); }.sheet-head h2 { margin: 0; font-size: 17px; }.sheet-head button { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 4px; background: transparent; }.sheet-head svg { width: 17px; }.sheet-body { padding: 16px; }.sheet-body label { display: block; margin: 12px 0 5px; color: var(--muted); font-size: 11px; }.sheet-body input, .sheet-body textarea { width: 100%; min-height: 36px; padding: 8px 9px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; }.sheet-body textarea { min-height: 96px; resize: vertical; }.sheet-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }.sheet-actions button { height: 34px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; font-size: 12px; font-weight: 600; }.sheet-actions button.primary { border-color: var(--teams); background: var(--teams); color: #fff; }.quick-actions { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }.quick-actions button { min-height: 86px; display: grid; place-items: center; align-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 11px; }.quick-actions button:hover { background: var(--hover); }.quick-actions svg { width: 21px; color: var(--teams); }
.call-stage { padding: 30px 18px; text-align: center; }.call-stage .avatar { width: 72px; height: 72px; margin: 0 auto; font-size: 19px; }.call-stage h2 { margin: 13px 0 3px; }.call-stage p { margin: 0; color: var(--muted); }.call-controls { display: flex; justify-content: center; gap: 12px; margin-top: 26px; }.call-controls button { width: 46px; height: 46px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #f0f0f0; }.call-controls button.end { background: var(--red); color: #fff; }.call-controls svg { width: 19px; }
.toast { position: fixed; z-index: 120; left: 50%; bottom: 22px; max-width: min(420px,calc(100% - 32px)); padding: 9px 14px; border-radius: 4px; background: #242424; color: #fff; font-size: 11px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translate(-50%,8px); transition: opacity .18s ease, transform .18s ease; }.toast.show { opacity: 1; transform: translate(-50%,0); }

.fi {
  width: 20px;
  height: 20px;
  display: inline-block;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: var(--fi-r) center / contain no-repeat;
  mask: var(--fi-r) center / contain no-repeat;
}
.active > span > .fi,
.active > .fi,
.app-rail button.active .fi,
.mobile-nav button.active .fi,
.composer-toolbar .send .fi,
.header-actions .primary .fi,
.detail-actions button:first-child .fi {
  -webkit-mask-image: var(--fi-f);
  mask-image: var(--fi-f);
}

@media (max-width: 980px) and (min-width: 768px) {
  .top-bar { grid-template-columns: var(--rail) 190px minmax(240px,1fr) 240px; }
  .split-layout { grid-template-columns: 300px minmax(0,1fr); }
  .calendar-content { grid-template-columns: 220px minmax(0,1fr); }
  .file-layout { grid-template-columns: minmax(0,1fr); }
  .file-preview { display: none; }
  .file-table-head, .file-row { grid-template-columns: minmax(200px,2fr) 100px 120px minmax(120px,1fr) 30px; }
}

.quick-views button {
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #fff;
  color: #424242;
  font-size: 13px;
}
.quick-views button:hover { background: var(--hover); }
.quick-views button.active { border-color: #c7c7e7; background: var(--selected); color: var(--teams-dark); font-weight: 600; }
.quick-views .fi { width: 14px; height: 14px; }
.list-section-title { height: 30px; padding: 0 10px; }
.list-section-title strong { font-size: 11px; font-weight: 600; text-transform: none; }
.list-section-title .fi { width: 14px; height: 14px; }
.combined-section-title { margin-top: 5px; border-top: 1px solid var(--line); }

.feed-item, .chat-item { min-height: 70px; grid-template-columns: 40px minmax(0,1fr) auto; gap: 11px; padding: 11px 12px; }
.feed-copy strong, .chat-copy strong { font-size: 14px; font-weight: 600; }
.feed-copy span, .chat-copy span { font-size: 13px; }
.feed-copy small, .chat-copy small { font-size: 12px; }
.avatar { width: 40px; height: 40px; font-size: 12px; }
.draft-label { color: #b14600; font-size: 11px; }
.empty-state.compact { min-height: 58px; height: auto; padding: 10px; }

.team-group { border-bottom: 0; }
.team-title { min-height: 42px; grid-template-columns: 28px minmax(0,1fr) 20px; gap: 8px; padding: 6px 10px; }
.team-mark { width: 28px; height: 28px; border-radius: 4px; }
.team-title strong { font-size: 12px; }
.team-title .fi { width: 14px; height: 14px; }
.channel-list { padding: 0 0 4px 41px; }
.channel-list button { min-height: 30px; grid-template-columns: 14px minmax(0,1fr) auto; padding-right: 9px; }
.channel-list .fi { width: 13px; height: 13px; }
.channel-list span { font-size: 11px; }
.combined-team-list { padding-bottom: 16px; }

.teams-hub-segment {
  flex: 0 0 auto;
  gap: 8px;
  padding: 10px 14px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.teams-hub-segment button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
}
.teams-hub-segment button svg,
.teams-hub-segment button .fi {
  width: 18px;
  height: 18px;
}
.teams-hub-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.teams-hub-panel[hidden] { display: none !important; }
.teams-hub-panel .teams-layout,
.teams-hub-panel .teams-calls-content {
  flex: 1;
  min-height: 0;
}
.team-scope-control { border-bottom: 1px solid var(--line); }

@media (min-width: 768px) {
  .teams-hub-segment { display: none; }
  [data-teams-hub-panel="calls"] { display: none !important; }
  .teams-hub-calls-only { display: none !important; }
}

.conversation-header, .channel-header { flex-basis: 56px; padding: 7px 12px; }
.conversation-header strong, .channel-header strong { font-size: 13px; }
.conversation-actions button { width: 32px; height: 32px; }
.conversation-actions .fi { width: 19px; height: 19px; }
.message-stream { padding: 16px max(16px, 7%); }
.message { margin-bottom: 13px; }
.message-bubble { padding: 9px 12px; border-radius: 6px; font-size: 14px; line-height: 1.45; }
.composer { margin: 0 12px 12px; border-radius: 5px; }
.composer textarea { min-height: 52px; font-size: 15px; }
.composer-toolbar { height: 36px; }
.composer-toolbar .fi { width: 17px; height: 17px; }
.channel-tabs { height: 39px; padding: 0 14px; gap: 16px; }
.channel-tabs button { font-size: 11px; }
.channel-tabs .fi { width: 15px; height: 15px; }
.post-stream { padding: 14px max(14px, 7%); }
.channel-post { border-radius: 4px; }

.app-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.app-card { min-height: 64px; grid-template-columns: 34px minmax(0,1fr) auto; padding: 9px 8px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.app-card:hover { border-color: var(--line); background: var(--hover); box-shadow: none; }
.app-icon { width: 32px; height: 32px; border-radius: 6px; }
.app-icon .fi { width: 18px; height: 18px; }
.app-copy strong { font-size: 12px; }
.app-copy span { margin-top: 2px; font-size: 10px; }

.profile-view, .utility-view { animation: page-enter .2s cubic-bezier(.2,.8,.2,1); }
.profile-view > header, .utility-view > header { height: 48px; }
.profile-view > header h2, .utility-view > header h2 { font-size: 14px; font-weight: 600; }
.profile-view > header .fi, .utility-view > header .fi { width: 19px; height: 19px; }
.profile-body { margin-top: 12px; }
.utility-body { margin-top: 14px; border-radius: 4px; overflow: hidden; }
.participant-list { display: flex; flex-wrap: wrap; gap: 7px; }
.participant-list span { height: 30px; display: inline-flex; align-items: center; gap: 6px; padding: 0 9px; border: 1px solid var(--line); border-radius: 4px; font-size: 11px; }
.participant-list .fi { width: 15px; height: 15px; color: var(--muted); }
.recap-chip { padding: 4px 7px; border-radius: 4px; background: #e7f4e4; color: #0b6a0b; font-size: 10px; font-weight: 600; }
.recap-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.recap-grid article { padding: 11px; border: 1px solid var(--line); border-radius: 4px; }
.recap-grid small { color: var(--teams-dark); font-weight: 700; }
.recap-grid p { margin-top: 7px; }
.document-surface { min-height: 180px; display: grid; place-items: center; align-content: center; padding: 20px; border: 1px solid var(--line); background: #fafafa; text-align: center; }
.document-surface strong, .document-surface span { display: block; }
.document-surface span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.document-surface p { margin-top: 16px; }
.settings-list { padding: 0; }
.settings-list > button, .download-row { width: 100%; min-height: 58px; display: grid; grid-template-columns: 26px minmax(0,1fr) 18px; gap: 10px; align-items: center; padding: 8px 16px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; }
.settings-list > button:hover, .download-row:hover { background: var(--hover); }
.settings-list > button > .fi:first-child { color: var(--teams); }
.settings-list .fi, .download-row > .fi { width: 18px; height: 18px; }
.settings-list strong, .settings-list small, .download-row strong, .download-row small { display: block; }
.settings-list strong, .download-row strong { font-size: 12px; }
.settings-list small, .download-row small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.download-row { grid-template-columns: 34px minmax(0,1fr) 18px; padding-left: 0; padding-right: 0; }
.download-list .section-heading > button { width: auto; padding: 0 9px; }
.action-sheet { animation: sheet-enter .18s cubic-bezier(.2,.8,.2,1); }

@keyframes page-enter {
  from { opacity: .4; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes sheet-enter {
  from { opacity: .4; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 980px) and (min-width: 768px) {
  .top-bar { grid-template-columns: var(--rail) 104px minmax(260px, 1fr) 180px; }
  .split-layout { grid-template-columns: 292px minmax(0,1fr); }
}

@media (max-width: 767px) {
  :root {
    --topbar: 52px;
    --mobile-nav-pad-bottom: 48px;
    --mobile-nav: calc(52px + var(--mobile-nav-pad-bottom) + env(safe-area-inset-bottom, 0px));
  }
  body { overflow: hidden; background: #fff; }
  .app-rail { display: none; }
  .brand-button, .desktop-profile, .top-actions > .desktop-profile, .global-search kbd { display: none; }
  .mobile-profile { width: 40px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; }
  .mobile-profile span { width: 34px; height: 34px; color: #fff; background: var(--teams); }
  .top-bar {
    position: fixed;
    z-index: 50;
    inset: 0 0 auto;
    height: var(--topbar);
    grid-template-columns: 44px minmax(0,1fr) 40px 40px;
    padding: 0 8px;
    color: var(--ink);
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: none;
  }
  .top-title { padding-left: 8px; }
  .top-title strong { font-size: 20px; font-weight: 700; }
  .top-title span { display: none; }
  .global-search { grid-column: 3; width: 38px; height: 38px; box-shadow: none; padding: 0; border: 0; background: transparent; }
  .global-search input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .global-search .fi { width: 23px; height: 23px; }
  .top-actions { display: contents; }
  .top-actions > button { display: none; }
  .top-actions > button[data-action="new"] { grid-column: 4; width: 38px; height: 38px; display: grid; color: var(--ink); }
  .top-actions > button[data-action="new"] .fi { width: 24px; height: 24px; }
  .app-shell { padding-top: var(--topbar); padding-bottom: var(--mobile-nav); height: 100dvh; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
  .workspace { flex: 1; min-height: 0; overflow: hidden; position: relative; background: #fff; }
  .app-page {
    display: none !important;
    position: absolute;
    inset: 0;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden;
    flex-direction: column;
    background: #fff;
  }
  .app-page.active { display: flex !important; }
  .app-page .page-header { position: static; flex-shrink: 0; z-index: 1; }
  .segment-control { position: static; top: auto; z-index: auto; background: #fff; }
  .quick-views { position: static; top: auto; }
  .calendar-toolbar, .file-tabs, .apps-search, .channel-tabs { position: static; top: auto; }
  .app-page[data-page="activity"] .activity-layout {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: static;
  }
  .app-page[data-page="activity"] .activity-layout .list-pane {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  .app-page[data-page="activity"] #activityFilters {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
  }
  .app-page[data-page="activity"] .feed-list { padding-bottom: 16px; }
  .app-page[data-page="chat"] .chat-layout {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: static;
  }
  .app-page[data-page="chat"]:not(.detail-open) .chat-sidebar.list-pane {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .app-page[data-page="chat"].detail-open .conversation-pane {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  .app-page[data-page="chat"].detail-open .conversation-header { position: static; flex-shrink: 0; }
  .app-page[data-page="chat"].detail-open .message-stream { flex: 1; min-height: 0; overflow-y: auto; }
  .app-page[data-page="chat"].detail-open .composer { flex-shrink: 0; margin-top: auto; }
  .app-page[data-page="activity"].detail-open .activity-card {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 16px 24px;
  }
  .app-page[data-page="calendar"] .calendar-toolbar,
  .app-page[data-page="calendar"] .calendar-week { flex-shrink: 0; }
  .app-page[data-page="apps"] .apps-search { flex-shrink: 0; margin: 10px 14px; width: auto; }
  .app-page[data-page="files"] .file-tabs { flex-shrink: 0; }
  .app-page[data-page="calendar"],
  .app-page[data-page="calls"],
  .app-page[data-page="files"],
  .app-page[data-page="apps"] {
    overflow: hidden;
  }
  .app-page[data-page="calendar"] .calendar-content,
  .app-page[data-page="calls"] .calls-content,
  .app-page[data-page="calls"] .desktop-calls-content,
  .app-page[data-page="files"] .file-layout,
  .app-page[data-page="apps"] .featured-apps {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .top-bar { height: var(--topbar); }
  .mobile-profile span { width: 34px; height: 34px; font-size: 12px; }
  .page-header { flex-basis: 68px; min-height: 68px; padding: 12px 16px; }
  .page-header h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
  .page-header p { font-size: 13px; margin-top: 2px; }
  .app-page[data-page="activity"] .page-header p { display: none; }
  .app-page[data-page="activity"] .header-actions [data-activity-filter] { display: none; }
  .header-actions button .fi { display: inline-block; }
  .chat-sidebar .combined-section-title,
  .chat-sidebar .combined-team-list { display: none !important; }
  .teams-hub-segment { position: static; flex-shrink: 0; z-index: auto; background: #fff; }
  .teams-hub-header .page-header, .app-page[data-page="teams"] > .page-header { flex-shrink: 0; }
  .teams-hub-panel[data-teams-hub-panel="calls"] { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
  .teams-hub-panel[data-teams-hub-panel="calls"]:not([hidden]) { display: flex !important; }
  .team-scope-control { display: none; }
  .teams-hub-panel .teams-calls-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: block;
  }
  .app-page[data-page="teams"] { height: 100% !important; min-height: 0; overflow: hidden; }
  .app-page[data-page="teams"].active { display: flex; flex-direction: column; }
  .app-page[data-page="teams"] .teams-hub-panel[data-teams-hub-panel="teams"] { flex: 1; min-height: 0; overflow: hidden; }
  .app-page[data-page="teams"]:not(.detail-open) .teams-layout { height: 100%; min-height: 0; overflow: hidden; }
  .app-page[data-page="teams"]:not(.detail-open) .team-sidebar.list-pane {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  .app-page[data-page="teams"].detail-open .teams-hub-segment { display: none; }
  .app-page[data-page="teams"].detail-open .split-layout.show-detail .list-pane { display: none !important; }
  .app-page.detail-open .channel-pane {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  .app-page.detail-open .channel-header,
  .app-page.detail-open .channel-tabs {
    position: static;
    top: auto;
    flex-shrink: 0;
  }
  .app-page.detail-open .post-stream {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 10px 12px 0;
  }
  .app-page.detail-open .post-stream .channel-post { flex-shrink: 0; }
  .app-page.detail-open .post-stream .composer {
    margin-top: auto;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: #fff;
    padding-bottom: 8px;
  }
  .split-layout { position: relative; display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
  .split-layout .list-pane { min-height: 0; transform: none; opacity: 1; transition: none; }
  .split-layout:not(.show-detail) .detail-pane { display: none !important; visibility: hidden; pointer-events: none; }
  .split-layout.show-detail .list-pane { display: none !important; transform: none; opacity: 1; pointer-events: none; }
  .split-layout.show-detail .detail-pane {
    position: absolute;
    inset: 0;
    z-index: 4;
    min-height: 0;
    height: 100%;
    display: flex !important;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: none;
  }
  .app-page.detail-open > .page-header { display: none; }
  .app-page.detail-open { height: 100% !important; min-height: 0; overflow: hidden; }
  .app-page.detail-open .split-layout { height: 100%; min-height: 0; }
  .app-page.detail-open .split-layout .detail-pane { height: 100%; min-height: 0; }
  .pane-search { height: 36px; margin: 12px 14px 8px; }
  .pane-search input, .apps-search input { font-size: 15px; }
  .quick-views { padding: 0 14px 12px; gap: 8px; }
  .quick-views button { height: 34px; padding: 0 12px; font-size: 14px; }
  .list-section-title { height: 36px; padding: 0 14px; }
  .list-section-title strong { font-size: 13px; }
  .chat-sidebar .pane-search { position: static; background: #fff; }
  .feed-item, .chat-item { min-height: 78px; grid-template-columns: 48px minmax(0,1fr) auto; gap: 12px; padding: 14px 16px; }
  .feed-item .avatar, .chat-item .avatar { width: 48px; height: 48px; font-size: 14px; }
  .post-author {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    padding: 14px 16px 8px;
  }
  .post-author .avatar { width: 40px; height: 40px; font-size: 12px; }
  .post-author strong { font-size: 15px; line-height: 1.25; }
  .post-author small { margin-top: 2px; font-size: 12px; line-height: 1.3; }
  .post-author time { align-self: start; padding-top: 2px; font-size: 11px; white-space: nowrap; }
  .call-row { grid-template-columns: 40px minmax(0,1fr) auto 30px; }
  .call-row .avatar { width: 40px; height: 40px; font-size: 12px; }
  .message:not(.me) .avatar { width: 36px; height: 36px; font-size: 11px; flex-shrink: 0; }
  .channel-header .team-mark, .channel-header .mobile-detail-back, .channel-header .conversation-actions,
  .conversation-header .avatar, .conversation-header .mobile-detail-back, .conversation-header .conversation-actions { flex-shrink: 0; }
  .feed-copy strong, .chat-copy strong { font-size: 17px; line-height: 1.25; }
  .feed-copy span, .chat-copy span { margin-top: 4px; font-size: 15px; line-height: 1.35; }
  /* Mobile list stays 2-line like real Teams — hide role/title row */
  .feed-copy small, .chat-copy small { display: none; }
  .feed-item time, .chat-item time { font-size: 12px; }
  .unread-pill { min-width: 20px; height: 20px; font-size: 11px; }
  .team-title { min-height: 52px; }
  .team-title strong { font-size: 15px; }
  .channel-list button { min-height: 40px; }
  .channel-list span { font-size: 15px; }
  .conversation-header, .channel-header { position: static; flex-basis: 58px; flex-shrink: 0; }
  .conversation-header strong, .channel-header strong { font-size: 16px; }
  .conversation-header small, .channel-header small {
    font-size: 12px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .conversation-header .mobile-detail-back, .channel-header .mobile-detail-back { width: 32px; height: 38px; }
  .conversation-header .mobile-detail-back .fi, .channel-header .mobile-detail-back .fi,
  .activity-card .mobile-detail-back .fi { width: 23px; height: 23px; }
  .conversation-header .avatar { width: 36px; height: 36px; }
  .message-stream { min-height: 0; flex: 1; padding: 14px 12px; }
  .message-bubble { font-size: 16px; line-height: 1.45; }
  .message-author strong { font-size: 13px; }
  .composer { position: relative; bottom: auto; margin: 0 8px 8px; flex-shrink: 0; }
  .composer textarea { font-size: 16px; }
  .channel-tabs { flex-shrink: 0; height: 40px; }
  .channel-tabs button { font-size: 14px; }
  .calendar-toolbar { flex-shrink: 0; }
  .calendar-toolbar button:nth-last-child(-n+2) { display: none; }
  .calendar-week { flex-shrink: 0; }
  .calendar-content { display: block; }
  .calendar-summary { display: grid; grid-template-columns: repeat(3,1fr); border-bottom: 1px solid var(--line); }
  .calendar-summary > h2, .calendar-summary > p { display: none; }
  .agenda-list { padding: 8px 14px 20px; }
  .teams-calls-content .speed-dial { border-bottom: 8px solid var(--canvas); }
  .teams-calls-content .speed-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .speed-card .avatar { width: 40px; height: 40px; }
  .file-tabs { flex-shrink: 0; padding: 0 14px; }
  .file-table-head { display: none; }
  .file-row { min-height: 65px; grid-template-columns: minmax(0,1fr) 24px; padding: 8px 14px; }
  .file-row > .file-meta { display: none; }
  .file-preview { display: none; }
  .conversation-actions button:nth-child(3) { display: none; }
  .activity-card { width: 100%; margin: 0; }
  .mobile-detail-back { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; }
  .mobile-nav {
    position: fixed;
    z-index: 55;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: start;
    min-height: var(--mobile-nav);
    padding: 10px 4px calc(var(--mobile-nav-pad-bottom) + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,.98);
  }
  .mobile-nav button { position: relative; min-width: 0; display: grid; place-items: center; align-content: start; gap: 4px; padding-top: 2px; border: 0; background: transparent; color: #616161; }
  .mobile-nav button span { position: relative; width: 28px; height: 28px; display: grid; place-items: center; }
  .mobile-nav button .fi { width: 24px; height: 24px; }
  .mobile-nav button em { font-size: 11px; font-weight: 500; font-style: normal; }
  .mobile-nav button.active { color: var(--teams); }
  .mobile-nav button b { border-color: #fff; }
  .sheet-layer { place-items: end center; padding: 0; }
  .action-sheet { width: 100%; max-height: 88dvh; border-radius: 8px 8px 0 0; padding-bottom: env(safe-area-inset-bottom); animation: mobile-sheet-enter .22s cubic-bezier(.2,.8,.2,1); }
  .quick-actions { grid-template-columns: repeat(3,1fr); }
  .toast { bottom: calc(var(--mobile-nav) + 10px); }
  .profile-view, .utility-view { padding-bottom: env(safe-area-inset-bottom); animation: mobile-page-enter .24s cubic-bezier(.2,.8,.2,1); }
  .app-grid { grid-template-columns: 1fr; }
  .app-card { min-height: 68px; grid-template-columns: 40px minmax(0,1fr) auto; }
  .app-copy strong { font-size: 15px; }
  .app-copy span { font-size: 12px; }
  .agenda-copy strong { font-size: 15px; }
  .agenda-item time { font-size: 12px; }
  .call-copy strong { font-size: 15px; }
  .call-copy span { font-size: 12px; }
  .speed-card strong { font-size: 13px; }
  .speed-card span { font-size: 11px; }
  .mobile-nav {
    height: auto;
    align-items: start;
  }
  .mobile-nav button { gap: 4px; padding-top: 2px; align-content: start; }
  .profile-hero { padding: 18px 16px; }
  .profile-hero-inner { grid-template-columns: 68px minmax(0,1fr); }
  .profile-hero .avatar { width: 66px; height: 66px; }
  .profile-hero h1 { font-size: 21px; }
  .profile-body { margin-top: 8px; }
  .utility-body { margin-top: 0; }
  .utility-hero { padding: 18px 16px; }
  .recap-grid { grid-template-columns: 1fr; }
  .detail-info-grid { grid-template-columns: 1fr 1fr; }
  .action-sheet { animation: mobile-sheet-enter .22s cubic-bezier(.2,.8,.2,1); }
}

@keyframes mobile-page-enter {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
@keyframes mobile-sheet-enter {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
