/* day pages (0.36 layout pass): Dashboard, Mat Control, Alerts & Requests, Messages, Brackets, Bouts & Timing,
   the bout window and the bout-sheet QR page */

/* ---------------------------------------------------------------- Dashboard */
.dash .page-head h1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dash .page-head h1 .help-wrap { margin-left: 0; }
.dash-sub { margin: 4px 0 0; }
.dash-inbox .card-head { flex-wrap: wrap; }
.dash-inbox .card-head h2 { white-space: nowrap; }
.dash-quick .dq-more { display: none; }
.dash-quick .more { position: relative; }
.dash-quick .more-btn.dash-screens { gap: 6px; font-weight: 500; letter-spacing: 0; line-height: 1.2; padding-left: 13px; padding-right: 13px; }
/* live mats: on deck / in the hole on two lines at 12–13px, so the names aren't cut */
.lm-meta { font-size: 12.5px; }
.lm-meta small, .lm-w small { font-size: 12px; }
.lm-name { font-size: 14px; }
.lm-state { font-size: 11.5px; padding: 2px 8px; }
.lm-next { font-size: 13px; color: #475467; margin-top: 8px; padding-top: 6px; }
.lm-up { white-space: normal; padding: 3px 0; line-height: 1.35; }
.lm-up + .lm-up { margin-top: 3px; }
.lm-up small { font-size: 12px; }
.lm-up-k { font-size: 12px; min-width: 0; margin: 0 6px 0 0; letter-spacing: .03em; }
.lm-up-n { color: var(--ink); }
.lm-up-t { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #344054; }
/* latest results: the round only shows on a phone (two lines there) */
.feed-rd, .feed-br { display: none; }

@media (max-width: 640px) {
  .dash-quick { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; justify-content: stretch; }
  .dash-quick > .btn-start { grid-column: 1 / -1; }
  .dash-quick > .dq-rest { display: none; }
  .dash-quick .dq-more { display: block; }
  .dash-quick > a.btn-primary, .dash-quick > .btn:not(.btn-start) { justify-content: center; }
  .dash-quick .more-pop { right: 0; left: auto; }
  .dash-quick .dq-more-btn { min-width: 44px; font-size: 18px; }
  /* "113 · Cons R2 · 9:55 PM · Mat 2" then "Winner def. Loser" and the score */
  .feed li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; padding: 8px 2px; }
  .feed-wt { order: 1; font-size: 13px; }
  .feed-rd { display: inline; order: 2; }
  .feed-time { order: 3; }
  .feed-mat { order: 4; }
  .feed-rd, .feed-time, .feed-mat { color: var(--muted); font-size: 12.5px; }
  .feed-rd::before, .feed-time::before, .feed-mat:not(:empty)::before { content: '· '; }
  .feed-br { display: block; order: 5; flex-basis: 100%; height: 0; }
  .feed-body { order: 6; flex: 1 1 0; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .feed-body small { display: none; }
  .feed-res { order: 7; font-size: 14px; }
}

/* ---------------------------------------------------------------- Mat Control */
.mc-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.mc-title h1 { margin: 0; white-space: nowrap; flex: none; }
.mc-bm-pill { display: inline-flex; align-items: center; gap: 6px; max-width: min(320px, 100%); border: 1px solid #f5c27a; background: #fffaf0; color: #7a4b00; border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 13px; cursor: pointer; min-width: 0; }
.mc-bm-pill b { flex: none; }
.mc-bm-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mc-bm-pill svg.ic { width: 14px; height: 14px; flex: none; }
.mc-bm-pill.alert { background: #fef3c7; border-color: #f59e0b; }
.mc-bm-pill:hover { border-color: #d97706; }
/* on a laptop the title, the board-message pill (it shrinks) and the buttons share one row */
@media (min-width: 1100px) {
  .mc-page .page-head { flex-wrap: nowrap; }
  .mc-page .mc-title { flex: 1 1 auto; flex-wrap: nowrap; }
  .mc-page .head-actions { flex: none; flex-wrap: nowrap; }
}
.mc-set { position: relative; }
.mc-set-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; width: 380px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid #e4e7ec; border-radius: 12px; box-shadow: 0 8px 24px rgba(16, 24, 40, .14); padding: 14px 16px; display: grid; gap: 10px; }
.mc-set-pop[hidden] { display: none; }
.mc-set-h { font-weight: 800; font-size: 16px; }
.mc-set-pop .sw-row { margin: 0; }
.mc-set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.mc-set-row select { max-width: 60%; }
.mc-set-msg { display: grid; gap: 8px; border-top: 1px solid var(--line2); padding-top: 12px; }
.mc-set-msg input { width: 100%; }
.mc-set-msg .row { gap: 8px; }
.mc-set-pop .mc-more { margin: 0; }
/* each mat card: the same two header rows (name · LIVE · message, then Medical · Break · Scoreboard · Close mat) */
.mc-mat-head { flex-wrap: nowrap; margin-bottom: 4px; min-height: 30px; }
.mc-mat-head b { flex: 0 0 auto; }
.mc-sp { flex: 1; }
.mc-mat-head .pill.live { font-size: 11px; }
.mc-mat { container-type: inline-size; }
.mc-mat-tools { display: flex; gap: 4px; align-items: center; padding: 0 0 8px; margin-bottom: 2px; border-bottom: 1px solid var(--line2); flex-wrap: wrap; }
.mc-mat-tools .btn { font-size: 13px; min-height: 30px; padding: 4px 9px; }
.mc-sb { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); text-decoration: none; padding: 4px; white-space: nowrap; }
.mc-sb:hover { color: var(--brand); }
.mc-card > .mc-ctl { display: flex; flex-direction: row; gap: 6px; align-self: center; grid-row: 1 / span 4; }
.mc-ctl .btn { font-size: 13px; min-height: 32px; padding: 4px 10px; gap: 5px; white-space: nowrap; }
.mc-slot-label { font-size: 11px; }
/* a narrow mat card (three mats across, a small laptop): the two buttons stack */
@container (max-width: 360px) { .mc-card > .mc-ctl { flex-direction: column; } .mc-ctl .btn { min-height: 28px; padding: 3px 8px; } .mc-sb { font-size: 0; gap: 0; } .mc-sb svg.ic { font-size: 14px; } }
@media (max-width: 640px) {
  .mc-page .page-head { align-items: flex-start; }
  .mc-set { position: static; }
  .mc-set-pop { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; max-width: none; max-height: calc(100vh - 80px); overflow: auto; }
  .mc-bm-pill { max-width: 100%; }
  .mc-page .head-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .mc-page .head-actions > .btn, .mc-page .mc-set > .btn { width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; padding-left: 8px; padding-right: 8px; }
  .mc-card:has(> .mc-ctl) { grid-template-columns: minmax(0, 1fr); }
  .mc-mats .mc-card > .mc-ctl { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 6px; flex-direction: row; }
}
/* tablets and phones: a tap on the bout offers Move up / Take off (and the mats to send it to) */
@media (pointer: coarse) { .admin-body .mc-card > .mc-ctl { display: none; } }

/* ---------------------------------------------------------------- Alerts & Requests */
.al-link { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: #1d4ed8; background: #eef4ff; border: 1px solid #cfdcff; border-radius: 999px; padding: 1px 9px; margin-left: 4px; white-space: nowrap; vertical-align: 1px; }
.al-link svg.ic { width: 13px; height: 13px; }
.al-note { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.al-note.ok { color: #067647; display: flex; align-items: center; gap: 4px; }
.al-note.ok svg.ic { width: 13px; height: 13px; }
.al-table td.actions { white-space: nowrap; }
.al-table td.actions .al-rest { display: inline-flex; gap: 6px; margin-right: 6px; }
.al-table td.actions .more { display: none; }
@media (max-width: 640px) {
  .al-page .page-head .head-actions { width: 100%; }
  .al-table.m-cards tr { gap: 4px 8px; }
  .al-table.m-cards td.al-kind { order: -2; }
  .al-table.m-cards td.al-time { order: -1; color: var(--muted); font-size: 13px; }
  .al-table.m-cards td.al-body { flex: 1 1 100%; font-size: 15px; line-height: 1.45; }
  .al-table.m-cards td.al-body .req-text { margin-top: 4px; }
  .al-table.m-cards td.al-body .al-link { margin: 4px 0 0; white-space: normal; }
  .al-table.m-cards td.actions { justify-content: flex-start; align-items: center; }
  .al-table.m-cards td.actions .al-rest { display: none; }
  .al-table.m-cards td.actions .more { display: inline-block; order: 2; }
  .al-table.m-cards td.actions .more-pop { left: 0; right: auto; }
  .al-table.m-cards td.actions .btn { min-height: 40px; }
  .al-table.m-cards tr.flag-request { border-left: 4px solid #b42318; }
  .al-table.m-cards tr.flag-call { border-left: 4px solid var(--warn); }
  .al-table.m-cards tr.flag-penalty, .al-table.m-cards tr.flag-result, .al-table.m-cards tr.flag-medical { border-left: 4px solid var(--danger); }
  .audit-log td:nth-child(2) { display: none; }
  .audit-log { table-layout: auto; width: 100%; }
  .audit-log colgroup { display: none; }
}

/* ---------------------------------------------------------------- Messages */
.chat-back { display: none; }
.msg-handled { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: #067647; background: #ecfdf3; border: 1px solid #abefc6; border-radius: 999px; padding: 2px 10px; margin-top: -2px; }
.msg-handled svg.ic { width: 13px; height: 13px; }
.msg-handled.open { color: #b54708; background: #fffaeb; border-color: #fedf89; }
.ck-handled { color: #067647; display: inline-flex; align-items: center; gap: 4px; }
.ck-handled svg.ic { width: 12px; height: 12px; }
@media (max-width: 640px) {
  .chat-layout { display: block; height: auto; min-height: 0; }
  .chat-layout .chat-list { overflow: visible; }
  .chat-layout:not(.open) .chat-main { display: none; }
  .chat-layout.open .chat-list { display: none; }
  .msg-page.chat-open .page-head { display: none; }
  .chat-layout.open .chat-main { height: calc(100dvh - 92px); min-height: 360px; margin: -8px -4px 0; }
  .chat-head { justify-content: flex-start; gap: 10px; flex-wrap: wrap; padding: 10px 12px; }
  .chat-head > b { flex: 1; min-width: 0; }
  .chat-head > span { flex-basis: 100%; margin-left: 96px; margin-top: -8px; }
  .chat-back { display: inline-flex; align-items: center; background: none; border: 0; padding: 6px 4px; font: inherit; font-weight: 700; color: var(--brand); cursor: pointer; }
  .chat-layout .chat-quick { flex-wrap: nowrap; overflow-x: auto; }
  .chat-layout .chat-quick .btn { white-space: nowrap; flex: none; }
  .chat-item { min-height: 52px; }
}

/* ---------------------------------------------------------------- Bouts & Timing */
.bt-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: -4px 0 12px; }
.bt-stat b { font-size: 26px; }
.bt-stat small { font-size: 12.5px; color: var(--muted); }
.bt-quick input { width: 150px; }
@media (max-width: 900px) { .bt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .bt-stats { gap: 8px; }
  .bt-stat { padding: 10px 12px; }
  .bt-stat b { font-size: 21px; }
  .bt-page .page-head .head-actions { width: 100%; }
  .bt-quick { flex: 1; }
  .bt-quick input { flex: 1; width: auto; min-width: 0; }
  .bt-table.m-cards td.bt-w { flex: 1 1 100%; font-size: 15px; }
  .bt-table.m-cards td.bt-w.win { font-weight: 700; }
  .bt-table.m-cards td.bt-st { order: 1; }
  .bt-table.m-cards td.bt-mat, .bt-table.m-cards td.bt-res { order: 2; font-size: 13px; }
  .bt-table.m-cards td.bt-w2::before { content: 'vs '; color: var(--muted); font-size: 12px; font-weight: 600; }
  .bt-hist.m-cards td[data-label=""]::before { content: none; }
}

/* ---------------------------------------------------------------- Brackets (head table only — print, public and coach
   brackets keep their own sizes): the bracket fills the width with 13px+ names */
/* Bouts & Brackets (0.41): one header (title, one line, the Enter result box), four tabs, the four numbers on Bouts and Pace */
.bb-page .bt-stats { margin-top: 0; }
.bb-line1 { display: none; margin: 0 0 12px; font-size: 13.5px; color: var(--muted); }
.bb-line1 b { color: var(--ink); }
.bb-pick { display: none; }
.bb-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.bb-tools .bb-which { display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 15px; }
.bb-tools .bb-which b { font-size: 18px; }
.bb-tools .bb-which .hb-desc { font-size: 15px; }
.bb-tools .row { display: flex; gap: 8px; flex-wrap: wrap; }
.hb-brackets .chip.active.undrawn { color: #fff; }
.hb-brackets .bracket-wrap .bracket { --gap: 34px; --cell-h: 74px; }
.hb-brackets .bracket-wrap .br-grid > .br-col { flex: 1 1 0; width: auto; min-width: 190px; }
.hb-brackets .bracket-wrap .bb { font-size: 13px; border-radius: 7px; }
.hb-brackets .bracket-wrap .bb-name { font-size: 13.5px; }
.hb-brackets .bracket-wrap .bb-team { font-size: 12px; }
.hb-brackets .bracket-wrap .bb-meta { font-size: 12px; padding: 2px 7px; min-height: 18px; }
.hb-brackets .bracket-wrap .bb-line { min-height: 24px; padding: 3px 7px; gap: 6px; }
.hb-brackets .bracket-wrap .bb-seed { font-size: 11px; padding: 0 4px; }
.hb-brackets .bracket-wrap .bb-dot { width: 8px; height: 8px; }
.hb-brackets .bracket-wrap .br-col-title { font-size: 12px; margin-bottom: 6px; }
.hb-brackets .bracket-wrap .br-section-title { font-size: 13px; }
.hb-brackets .bracket-wrap .bb.champion .bb-line { min-height: 30px; }
.hb-brackets .bracket-wrap .br-place { gap: var(--gap, 34px); }
.hb-brackets .bracket-wrap .br-place > div { width: calc((100% - 3 * 34px) / 4); min-width: 190px; }
.hb-brackets .bracket-wrap .pool-grid th, .hb-brackets .bracket-wrap .pool-grid td { font-size: 13px; }
.hb-brackets .bracket-wrap .pool-grid .pg-name > span { font-size: 12px; }
.hb-brackets .bracket-wrap .pool-round { width: 230px; }

@media (max-width: 640px) {
  .bb-page .bt-stats { display: none; }
  .bb-line1 { display: block; }
  /* the four tabs fit a 360 px phone: tighter padding and type, no fade at the edge */
  .tabs.bb-tabs { gap: 0; -webkit-mask-image: none; mask-image: none; }
  .tabs.bb-tabs .tab { padding-left: 5px; padding-right: 5px; font-size: 13px; }
  .bb-chips { display: none; }
  .bb-pick { display: block; width: 100%; margin-bottom: 12px; }
  .bb-pick select { width: 100%; }
  .bb-tools .bb-which { flex: 1 1 100%; }
  .bb-tools .row { width: 100%; gap: 6px; }
  .bb-tools .row .btn { flex: 1 1 auto; min-height: 44px; padding-left: 6px; padding-right: 6px; font-size: 13.5px; white-space: nowrap; text-align: center; justify-content: center; }
}

@media (max-width: 374px) { .tabs.bb-tabs .tab { padding-left: 4px; padding-right: 4px; font-size: 12.5px; } }

/* ---------------------------------------------------------------- the bout window: one score box, Save in the footer */
.result-form .rf-score input { width: 130px; font-variant-numeric: tabular-nums; }
.rf-score-note { margin: 4px 0 8px; color: var(--muted); min-height: 1.4em; }
.rf-score-note b { color: var(--ink); }
.rf-score-note.bad { color: #b42318; }
.modal-foot .btn-quiet-danger + .btn { margin-left: 0; }

/* ---------------------------------------------------------------- bout sheet QR page: one score box */
.qr-score { flex: 1; }
.qr-score input { font-size: 22px; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.qr-score-note { margin: 6px 0 0; color: var(--muted); }
.qr-score-note b { color: var(--ink); }
.qr-score-note.bad { color: #b42318; }
@media (max-width: 640px) {
  .chat-item { position: relative; padding-right: 30px; }
  .chat-item::after { content: '›'; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #98a2b3; font-size: 22px; }
  .chat-item .badge { margin-left: auto; }
}

/* ---- Dashboard: the Getting ready "Next: …" button wraps inside its card on a phone */
.ready-head .ready-next { white-space: normal; text-align: left; max-width: 100%; min-width: 0; line-height: 1.3; height: auto; }
@media (max-width: 640px) { .ready-head .ready-next { margin-left: 0; flex: 1 1 100%; justify-content: flex-start; } }

/* ---- Bouts & Timing → Pace: the Mats heading and its note stack on a phone */
.pace-mats > .card-head { gap: 4px 16px; }
@media (max-width: 640px) { .pace-mats > .card-head { flex-direction: column; align-items: flex-start; } }

/* ---- Mat Control: the one line under the title; "Print N new bout sheets" gets the whole row on a phone */
.mc-titlebox { min-width: 0; }
.mc-titlebox > .page-sub { margin: 2px 0 0; }
@media (min-width: 1100px) { .mc-page .mc-titlebox { flex: 1 1 auto; } }
@media (max-width: 640px) {
  .mc-page .mc-titlebox { width: 100%; }
  .mc-page .head-actions > .mc-print { grid-column: 1 / -1; white-space: normal; overflow: visible; }
}

/* ---- Messages (N3): the To do strip, the conversations that need you, and action cards inside a conversation */
.mx-page .chat-layout { height: calc(100vh - 196px); }
.mx-page.has-strip .chat-layout { height: calc(100vh - 270px); }
.mx-strip { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--warn, #d97706); border-radius: 10px; padding: 7px 12px; margin: 14px 0 12px; min-height: 46px; }
.mx-strip-h { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #b54708; white-space: nowrap; }
.mx-strip-h svg.ic { width: 15px; height: 15px; }
.mx-strip-h .badge { margin-left: 0; }
.mx-strip-items { flex: 1 1 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.mx-al { flex: 1 1 300px; min-width: 0; display: flex; align-items: center; gap: 8px; }
.mx-al .pill { flex: none; }
.mx-al-t { flex: 1 1 auto; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere; line-height: 1.25; } /* names use the room and wrap to two lines before they are cut */
.mx-al .btn, .mx-al .more { flex: none; }
.mx-tm { display: none; }
.mx-more { flex: none; font-weight: 700; }
.mx-page .chat-list > * { flex: none; }
.mx-page .chat-item .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-page .chat-item > b { white-space: nowrap; }
.mx-page .chat-item.has-action { background: #fff6f5; border-color: #fecdca; }
.mx-page .chat-item.has-action.k-mat { border-left-color: #2563eb; }
.mx-page .chat-item.has-action.k-team { border-left-color: #16a34a; }
.mx-page .chat-item.active { border-color: var(--brand); background: #f3f7ff; }
.mx-page .chat-item.active.has-action { background: #fff1ef; }
.mx-page .chat-item.quiet { flex-direction: row; align-items: center; padding: 7px 12px; gap: 8px; min-height: 0; }
.mx-page .chat-item.quiet .small { margin-left: auto; color: var(--muted); }
.mx-r { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; }
.mx-page .chat-item b .badge, .mx-page .chat-group .badge { margin-left: 0; }
.mx-flag { background: #fee4e2; color: #b42318; font-size: 10.5px; font-weight: 800; border-radius: 999px; padding: 1px 8px; white-space: nowrap; letter-spacing: .01em; }
.mx-flag.i { display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; }
.mx-flag.i svg.ic { width: 13px; height: 13px; }
.mx-pv { color: #b42318; font-weight: 600; }
.mx-page .chat-group.action { color: #b42318; }
.mx-page .tab .badge, .mx-page .tab-n { margin-left: 4px; }
.mx-card { align-self: flex-start; width: min(640px, 88%); background: #fff6f5; border: 1px solid #fecdca; border-left: 4px solid #b42318; border-radius: 12px; padding: 10px 14px 12px; box-shadow: 0 1px 2px rgba(16,24,40,.06); }
.mx-card.call { background: #fffaf0; border-color: #fedf89; border-left-color: var(--warn, #d97706); }
.mx-card-k { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #b42318; }
.mx-card.call .mx-card-k { color: #b54708; }
.mx-card-k svg.ic { width: 13px; height: 13px; }
.mx-card-k .mx-t { margin-left: auto; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); font-size: 11.5px; }
.mx-card-h { margin-top: 4px; font-size: 15px; }
.mx-card-h .pill { vertical-align: 1px; }
.mx-card-s { color: var(--muted); font-size: 13px; margin-top: 2px; }
.mx-card-q { margin-top: 6px; font-style: italic; }
.mx-card-a { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mx-quiet { align-self: flex-start; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12.5px; color: var(--muted); }
.mx-quiet svg.ic { width: 13px; height: 13px; color: rgb(6, 118, 71); flex: none; }
.mx-quiet b { color: rgb(6, 118, 71); font-weight: 700; }
.mx-reply { flex-basis: 100%; }
@media (max-width: 640px) {
  .mx-strip { flex-wrap: wrap; gap: 6px 10px; padding: 8px 10px; margin: 8px 0 10px; }
  .mx-strip-items { flex: 1 1 100%; flex-direction: column; flex-wrap: nowrap; gap: 0; order: 3; }
  .mx-al { flex: none; padding: 6px 0; border-top: 1px solid var(--line2); flex-wrap: wrap; }
  .mx-al-t { display: block; -webkit-line-clamp: unset; line-clamp: unset; flex: 1 1 100%; order: 2; }
  .mx-al .pill { order: 1; }
  .mx-tm { display: inline; order: 1; margin-left: auto; }
  .mx-al .btn { order: 3; }
  .mx-al .more { order: 4; }
  .mx-strip .mx-more { margin-left: auto; }
  .mx-page .chat-item { padding-right: 30px; }
  .mx-page .chat-item.quiet { min-height: 44px; padding-right: 30px; }
  .mx-card { width: 100%; }
  .mx-card-a .btn { flex: 1 1 auto; min-height: 40px; }
  .mx-page .chat-layout, .mx-page.has-strip .chat-layout { height: auto; }
  .mx-page.chat-open .na-tabs, .mx-page.chat-open .mx-strip { display: none; }
  .mx-page .chat-thread { padding: 12px 10px; }
  .mx-page .bubble { max-width: 88%; }
}

/* ---- Stop the server (N2): the System line in the menu, and the card at the bottom of Data & Backups */
.side nav .nav-stop { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; border-radius: 7px; padding: 4px 10px; color: #f97066; font: inherit; font-weight: 500; text-align: left; cursor: pointer; }
.side nav .nav-stop:hover { background: rgba(255,255,255,.06); }
.side nav .nav-stop svg.ic { width: 17px; height: 17px; opacity: .9; }
.side.open nav .nav-stop { grid-column: 1 / -1; }
@media (pointer: coarse) { .admin-body .side nav .nav-stop { min-height: 40px; } }
.stop-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-color: #fecdca; }
.stop-card h2 { margin-bottom: 2px; }
.stop-card p { margin: 0; }
.stop-card .btn { flex: none; }
@media (max-width: 640px) { .stop-card { flex-direction: column; align-items: stretch; } }

/* Bouts & Timing: the Expected column (N17) */
.bt-table td.bt-exp { white-space: nowrap; }
@media (max-width: 640px) { .bt-table.m-cards td.bt-exp { order: 2; font-size: 13px; } }
@media (max-width: 640px) {
  .mx-page .page-head { position: relative; }
  .mx-page .page-head .head-actions { position: absolute; top: 0; right: 0; width: auto; }
  .mx-page .page-head h1, .mx-page .page-head .page-sub { padding-right: 48px; }
}
