/* ============================== Floor tab v2 ==============================
   Operations workspace: a 12-column Overview command deck, a systems graph,
   and a tiled terminal workspace. Every selector is scoped to #tab-floor or
   an .fl-* class. Loaded by <link> from the page head. */

#tab-floor { margin: 0; padding: 0; }

#fl-body { display: flex; flex-direction: column; gap: 12px; padding-bottom: 20px; }

/* --- header ------------------------------------------------------------ */

.fl-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fl-head h2 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.fl-sum { color: var(--text-dim); font-size: 13px; flex: 1; min-width: 14ch; }
.fl-sum b { color: var(--text); font-weight: 600; }

.fl-views { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--panel-border); }
.fl-views button { appearance: none; border: 0; background: transparent; cursor: pointer;
  color: var(--text-dim); font: inherit; font-size: 12.5px; font-weight: 600;
  padding: 6px 13px; border-radius: 7px; transition: background .16s var(--ease), color .16s var(--ease); }
.fl-views button:hover { color: var(--text); background: rgba(255,255,255,.04); }
.fl-views button[aria-selected="true"] { color: var(--text); background: var(--grid);
  box-shadow: inset 0 0 0 1px var(--accent-line); }
.fl-views button:focus-visible { outline: none; box-shadow: var(--ring); color: var(--text); }

.fl-sec { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fl-sec > h3 { margin: 0; font-size: 11px; letter-spacing: .6px; text-transform: uppercase;
  color: var(--text-dim); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.fl-sec > h3 .n { color: var(--text); font-variant-numeric: tabular-nums; }

/* --- Overview: 12-column command deck ---------------------------------- */

#fl-overview {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
.fl-deck-kpis { grid-column: 1 / -1; }
.fl-deck-att { grid-column: 1 / -1; }
.fl-deck-sess { grid-column: 1 / span 8; }
.fl-deck-agents { grid-column: 9 / span 4; }
.fl-deck-act { grid-column: 1 / -1; }

#fl-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fl-kpi { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px;
  border-radius: 10px; background: var(--panel); border: 1px solid var(--panel-border);
  min-width: 0; }
.fl-kpi .k { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums;
  letter-spacing: -.03em; line-height: 1.15; color: var(--text); }
.fl-kpi .l { font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  color: var(--text-dim); }
.fl-kpi.active .k { color: var(--good); }
.fl-kpi.waiting .k { color: var(--warn); }
.fl-kpi.ready .k { color: var(--accent); }

/* Attention is a compact action queue, not a large empty card. */
#fl-attention { display: flex; flex-direction: column; gap: 6px; }
.fl-att { display: flex; align-items: center; gap: 10px; padding: 8px 11px;
  border-radius: 10px; background: linear-gradient(180deg, rgba(232,179,57,.12), rgba(232,179,57,.04));
  border: 1px solid rgba(232,179,57,.36); }
.fl-att.urgent { background: linear-gradient(180deg, rgba(232,84,106,.13), rgba(232,84,106,.04));
  border-color: rgba(232,84,106,.42); }
.fl-att .who { flex: none; display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; color: var(--text);
  padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.05);
  border: 1px solid color-mix(in srgb, var(--ac, var(--accent)) 45%, transparent); }
.fl-att .who i { width: 6px; height: 6px; border-radius: 50%; background: var(--ac, var(--accent)); }
.fl-att .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fl-att .ttl { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-att .sub { font-size: 11.5px; color: var(--text-dim); line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-att .acts { flex: none; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.fl-att button { font-size: 12px; padding: 5px 11px; }
.fl-quiet { padding: 8px 12px; border-radius: 10px; background: var(--panel);
  border: 1px solid var(--panel-border); color: var(--text-dim); font-size: 12.5px; }
.fl-quiet b { color: var(--good); font-weight: 600; }

/* Two-column live-session board inside the 8-col span. */
#fl-sessions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fl-card { display: flex; align-items: stretch; gap: 0; min-width: 0;
  border-radius: 11px; background: var(--panel); border: 1px solid var(--panel-border);
  border-left: 3px solid var(--ac, var(--accent)); overflow: hidden; }
.fl-card-main { appearance: none; border: 0; background: transparent; color: var(--text);
  font: inherit; cursor: pointer; text-align: left; flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 10px; padding: 10px 11px;
  transition: background .16s var(--ease); }
.fl-card-main:hover { background: rgba(255,255,255,.03); }
.fl-card-main:focus-visible { outline: none; box-shadow: var(--ring); }
.fl-card .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fl-card .line1 { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.fl-card .nm { font-size: 13px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-card .src { font-size: 11px; color: var(--text-dim); flex: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 18ch; }
.fl-card .task { font-size: 12px; color: var(--text-dim); line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-card .when { flex: none; font-size: 11px; color: var(--text-dim);
  font-variant-numeric: tabular-nums; }
.fl-card-act { flex: none; align-self: center; margin-right: 8px; font-size: 11.5px;
  padding: 5px 10px; }

/* Compact agent rail. */
#fl-agents { display: flex; flex-direction: column; gap: 8px; }
.fl-agent { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px;
  border-radius: 11px; background: var(--panel); border: 1px solid var(--panel-border);
  border-left: 3px solid var(--ac, var(--accent)); }
.fl-agent .top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fl-agent .nm { font-size: 13px; font-weight: 650; color: var(--text); flex: 1;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-agent .cnt { font-size: 11.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.fl-agent .q { display: flex; gap: 10px; font-size: 11px; color: var(--text-dim);
  font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.fl-agent .q span { display: inline-flex; align-items: center; gap: 5px; }
.fl-agent .q i { display: block; width: 32px; height: 5px; border-radius: 3px;
  background: var(--grid); overflow: hidden; position: relative; }
.fl-agent .q i b { position: absolute; inset: 0 auto 0 0; border-radius: 3px; }

.fl-st { display: inline-flex; align-items: center; gap: 5px; flex: none;
  font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px; border: 1px solid transparent; }
.fl-st i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.fl-st.active { color: var(--good); background: rgba(62,207,142,.12); border-color: rgba(62,207,142,.32); }
.fl-st.waiting { color: var(--warn); background: rgba(232,179,57,.13); border-color: rgba(232,179,57,.36); }
.fl-st.ready { color: var(--accent); background: rgba(91,140,255,.12); border-color: rgba(91,140,255,.30); }
.fl-st.stale { color: var(--text-dim); background: rgba(139,147,167,.10); border-color: rgba(139,147,167,.28); }
.fl-st.unknown, .fl-st.idle, .fl-st.off { color: var(--text-dim);
  background: rgba(139,147,167,.08); border-color: rgba(139,147,167,.22); }
.fl-st.active i { animation: fl-pulse 2.2s ease-in-out infinite; }
@keyframes fl-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* Recent-activity timeline. */
#fl-activity { display: flex; flex-direction: column; gap: 0;
  border-radius: 11px; background: var(--panel); border: 1px solid var(--panel-border);
  overflow: hidden; }
.fl-tl { list-style: none; margin: 0; padding: 4px 0; }
.fl-tl li { display: grid; grid-template-columns: 14px 1fr auto; gap: 8px 10px;
  align-items: start; padding: 7px 12px; font-size: 12.5px; }
.fl-tl li + li { border-top: 1px solid rgba(255,255,255,.03); }
.fl-tl .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 4px;
  background: var(--ac, var(--text-dim)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac, var(--text-dim)) 18%, transparent); }
.fl-tl .ttl { color: var(--text); font-weight: 600; }
.fl-tl .sub { color: var(--text-dim); font-size: 11.5px; }
.fl-tl .when { color: var(--text-dim); font-size: 11px; font-variant-numeric: tabular-nums;
  white-space: nowrap; }
#fl-activity .fl-quiet { border: 0; border-radius: 0; background: transparent; }

/* --- details sheet ------------------------------------------------------ */

#fl-scrim { position: fixed; inset: 0; background: rgba(6,8,13,.62); z-index: 60;
  opacity: 0; pointer-events: none; transition: opacity .2s var(--ease); }
#fl-scrim.open { opacity: 1; pointer-events: auto; }
#fl-sheet { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw);
  z-index: 61; background: var(--panel); border-left: 1px solid var(--panel-border);
  box-shadow: -24px 0 60px -30px #000; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .24s var(--ease); }
#fl-sheet.open { transform: none; }
#fl-sheet .sh-head { display: flex; align-items: flex-start; gap: 10px; padding: 16px 16px 12px;
  border-bottom: 1px solid var(--panel-border); }
#fl-sheet .sh-head h3 { margin: 0; font-size: 15px; flex: 1; min-width: 0; line-height: 1.35; }
#fl-sheet .sh-body { flex: 1; overflow: auto; padding: 14px 16px; display: flex;
  flex-direction: column; gap: 14px; }
#fl-sheet .sh-foot { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 16px;
  border-top: 1px solid var(--panel-border); background: rgba(255,255,255,.015); }
.fl-x { appearance: none; border: 1px solid var(--panel-border); background: transparent;
  color: var(--text-dim); width: 28px; height: 28px; border-radius: 8px; cursor: pointer;
  font-size: 15px; line-height: 1; flex: none; }
.fl-x:hover { color: var(--text); border-color: var(--accent-line); }
.fl-x:focus-visible { outline: none; box-shadow: var(--ring); }
.fl-facts { display: grid; grid-template-columns: max-content 1fr; gap: 7px 14px;
  font-size: 12.5px; align-items: baseline; }
.fl-facts dt { color: var(--text-dim); }
.fl-facts dd { margin: 0; color: var(--text); overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums; }
.fl-note { font-size: 12.5px; color: var(--text-dim); line-height: 1.5; margin: 0; }

.fl-obs { display: flex; flex-direction: column; gap: 8px; }
.fl-obs .cap { display: flex; align-items: center; gap: 8px; font-size: 11.5px;
  font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--text-dim); }
.fl-view { position: relative; overflow: hidden; border-radius: 10px;
  background: #0b0e14; border: 1px solid var(--panel-border); min-height: 190px; }
.fl-view.control { border-color: var(--good);
  box-shadow: 0 0 0 1px var(--good), 0 0 22px -8px var(--good); }
.fl-view .xterm { position: absolute; left: 0; bottom: 0; }
.fl-view .xterm-viewport { overflow: hidden !important; }
.fl-ctl { display: flex; align-items: center; gap: 8px; font-size: 12px;
  padding: 7px 11px; border-radius: 9px; }
.fl-ctl.ro { color: var(--text-dim); background: rgba(139,147,167,.09);
  border: 1px solid rgba(139,147,167,.24); }
.fl-ctl.on { color: var(--good); background: rgba(62,207,142,.11);
  border: 1px solid rgba(62,207,142,.38); font-weight: 600; }
.fl-ctl span { flex: 1; min-width: 0; }

/* --- topology ----------------------------------------------------------- */

#fl-topology { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fl-map-bar { display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; }
.fl-map-sum { font-size: 12px; color: var(--text-dim); }
.fl-map-sum b { color: var(--text); font-weight: 600; }
.fl-map { border-radius: 12px; background: #0d1118; border: 1px solid var(--panel-border);
  overflow: hidden; position: relative; min-height: 280px; }
#fl-svg { display: block; width: 100%; height: auto; }
#fl-svg text { font-family: inherit; }
.fl-hub { cursor: default; }
.fl-hub .ring { fill: none; stroke: var(--text-dim); stroke-width: 2.4; }
.fl-hub.active .ring, .fl-hub.working .ring { stroke: var(--good); }
.fl-hub.waiting .ring { stroke: var(--warn); }
.fl-hub.ready .ring { stroke: var(--accent); }
.fl-hub .disc { fill: #141a26; stroke: var(--panel-border); stroke-width: 1; }
.fl-hub .ht { fill: var(--text); font-size: 12px; font-weight: 700; }
.fl-hub .hs { fill: var(--text-dim); font-size: 9.5px; }
.fl-sbox { cursor: pointer; }
.fl-sbox rect { fill: #161b28; stroke: var(--panel-border); }
.fl-sbox text { fill: var(--text); font-size: 11.5px; font-weight: 500; }
.fl-sbox text.sm { fill: var(--text-dim); font-size: 9.5px; font-weight: 400; }
.fl-sbox .dot { fill: var(--text-dim); }
.fl-sbox.active .dot { fill: #3ecf8e; }
.fl-sbox.waiting .dot { fill: #e8b339; }
.fl-sbox:hover rect { fill: #1b2231; }
.fl-sbox.waiting rect { stroke: rgba(232,179,57,.55); }
.fl-sbox.active rect { stroke: rgba(62,207,142,.45); }
.fl-sbox:focus-visible rect { stroke: var(--accent); stroke-width: 2; }
.fl-own { fill: none; stroke: #3a4258; stroke-width: 1.15; stroke-dasharray: 3 3; opacity: .85; }
.fl-edge { fill: none; stroke: var(--ac, #8b93a7); stroke-width: 1.7; opacity: .8; }
.fl-edge.live { opacity: 1; stroke-dasharray: 6 5; animation: fl-dash 1.6s linear infinite; }
@keyframes fl-dash { to { stroke-dashoffset: -22; } }
.fl-el { fill: var(--text-dim); font-size: 10px; }
.fl-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-dim); }
.fl-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 5px; vertical-align: middle; }
.fl-legend .w { background: var(--good); }
.fl-legend .a { background: var(--warn); }
.fl-legend .own { background: transparent; border: 1.5px dashed #6a7388; border-radius: 0;
  height: 0; width: 14px; }
.fl-legend .e { background: var(--text-dim); border-radius: 1px; height: 2px; width: 14px; }

/* Focus isolation: one hub's sessions and connected relationships stay, the rest recede. */
#fl-svg.iso .fl-hub, #fl-svg.iso .fl-sbox, #fl-svg.iso .fl-own, #fl-svg.iso .fl-edge, #fl-svg.iso .fl-el {
  opacity: .18; }
#fl-svg.iso .fl-hub.on, #fl-svg.iso .fl-sbox.on, #fl-svg.iso .fl-own.on,
#fl-svg.iso .fl-edge.on, #fl-svg.iso .fl-el.on { opacity: 1; }

/* --- terminals tiled workspace ----------------------------------------- */

#fl-terminals { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fl-term-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fl-term-hint { font-size: 12px; color: var(--text-dim); flex: 1; min-width: 16ch; }
#fl-panes { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px; align-items: stretch; }
.fl-pane { display: flex; flex-direction: column; min-width: 0; position: relative;
  border-radius: 10px; overflow: hidden; background: var(--panel);
  border: 1px solid var(--panel-border); grid-column: span 6; }
.fl-pane[data-size="compact"] { grid-column: span 4; --fl-h: 220px; }
.fl-pane[data-size="standard"] { grid-column: span 6; --fl-h: 300px; }
.fl-pane[data-size="wide"] { grid-column: span 8; --fl-h: 320px; }
.fl-pane[data-size="tall"] { grid-column: span 6; --fl-h: 440px; }
.fl-pane[data-size="hero"] { grid-column: span 12; --fl-h: 520px; }
.fl-pane.control { border-color: var(--good);
  box-shadow: 0 0 0 1px var(--good), 0 0 24px -10px var(--good); }
.fl-pane.dragging { opacity: .58; }
.fl-pane.drop-before { box-shadow: -3px 0 0 var(--accent); }
.fl-pane.drop-after { box-shadow: 3px 0 0 var(--accent); }
.fl-pane .ph { display: flex; align-items: center; gap: 7px; padding: 6px 8px 6px 10px;
  font-size: 12px; background: #0e131c; border-bottom: 1px solid var(--panel-border);
  cursor: grab; user-select: none; touch-action: none; }
.fl-pane .ph:active { cursor: grabbing; }
.fl-pane.control .ph { background: #102018; }
.fl-pane .ph .ro-tag { font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-dim); border: 1px solid var(--panel-border); border-radius: 999px;
  padding: 2px 7px; white-space: nowrap; }
.fl-pane .ph .ro-tag.on { color: var(--good); border-color: rgba(62, 207, 142, .5);
  background: rgba(62, 207, 142, .12); }
.fl-pane .ph b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-weight: 600; pointer-events: none; }
.fl-pane .ph .tb { display: flex; align-items: center; gap: 4px; flex: none; }
.fl-pane .fl-view { border: 0; border-radius: 0; height: var(--fl-h, 300px); min-height: 0; }
.fl-pane .fl-view.control { box-shadow: none; }
.fl-grip { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px;
  cursor: nwse-resize; touch-action: none; background:
    linear-gradient(135deg, transparent 50%, rgba(139,147,167,.55) 50%, rgba(139,147,167,.55) 58%, transparent 58%,
      transparent 70%, rgba(139,147,167,.55) 70%, rgba(139,147,167,.55) 78%, transparent 78%); }
.fl-grip:focus-visible { outline: none; box-shadow: var(--ring); }

.fl-empty { padding: 18px 16px; border-radius: 12px; background: var(--panel);
  border: 1px dashed var(--panel-border); color: var(--text-dim); font-size: 13px;
  text-align: center; line-height: 1.6; grid-column: 1 / -1; }

#fl-tray { display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 8px 10px; border-radius: 10px; background: var(--panel);
  border: 1px dashed var(--panel-border); }
#fl-tray[hidden] { display: none; }
.fl-tray-lab { font-size: 11.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  color: var(--text-dim); margin-right: 4px; }

.fl-mini { appearance: none; border: 1px solid var(--panel-border); background: transparent;
  color: var(--text-dim); font: inherit; font-size: 11.5px; font-weight: 600;
  padding: 4px 9px; border-radius: 7px; cursor: pointer; flex: none; }
.fl-mini:hover { color: var(--text); border-color: var(--accent-line); }
.fl-mini:focus-visible { outline: none; box-shadow: var(--ring); }
.fl-mini.go { color: var(--good); border-color: rgba(62,207,142,.42); }
.fl-mini.warn { color: var(--bad); border-color: rgba(232,84,106,.42); }

.fl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* End-session confirmation. Separate from Close; never shown as a tile chrome default. */
#fl-end { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center;
  justify-content: center; background: rgba(6,8,13,.62); padding: 16px; }
#fl-end[hidden] { display: none; }
.fl-end-card { width: min(440px, 100%); background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: 14px; padding: 18px 18px 14px; box-shadow: 0 24px 60px -28px #000; }
.fl-end-card h3 { margin: 0 0 8px; font-size: 15px; }
.fl-end-card p { margin: 0 0 8px; font-size: 13px; color: var(--text-dim); line-height: 1.5; }
.fl-end-card .who { color: var(--text); font-weight: 650; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
#fl-end-err { color: var(--bad); font-size: 12.5px; }
.fl-end-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* --- breakpoints -------------------------------------------------------- */

@media (max-width: 980px) {
  .fl-deck-sess, .fl-deck-agents { grid-column: 1 / -1; }
  #fl-sessions { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .fl-head h2 { font-size: 16px; }
  .fl-views { width: 100%; }
  .fl-views button { flex: 1; padding: 7px 4px; }
  .fl-att { flex-direction: column; align-items: stretch; gap: 8px; }
  .fl-att .acts { justify-content: flex-start; }
  .fl-att .acts button { flex: 1; }
  .fl-card .when { display: none; }
  #fl-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #fl-panes { grid-template-columns: 1fr; }
  .fl-pane, .fl-pane[data-size="compact"], .fl-pane[data-size="standard"],
  .fl-pane[data-size="wide"], .fl-pane[data-size="tall"], .fl-pane[data-size="hero"] {
    grid-column: 1 / -1; }
  .fl-pane .ph { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 6px; }
  .fl-pane .ph > .fl-st { grid-column: 1; }
  .fl-pane .ph > b { grid-column: 2; }
  .fl-pane .ph > .ro-tag { grid-column: 3; }
  .fl-pane .ph > .tb { grid-column: 1 / -1; justify-content: flex-end; }

  #fl-sheet { width: 100vw; top: auto; height: 88vh; border-left: 0;
    border-top: 1px solid var(--panel-border); border-radius: 16px 16px 0 0;
    transform: translateY(100%); }
  #fl-sheet.open { transform: none; }
}

/* Mobile Overview order: attention → KPIs → live sessions → agents → activity. */
@media (max-width: 620px) {
  #fl-overview { display: flex; flex-direction: column; }
  .fl-deck-att { order: 1; }
  .fl-deck-kpis { order: 2; }
  .fl-deck-sess { order: 3; }
  .fl-deck-agents { order: 4; }
  .fl-deck-act { order: 5; }
  /* Browser-style chrome stays fully operable on a phone: identity and
     control state occupy the first row, while all four actions get a
     dedicated, evenly divided toolbar instead of being clipped. */
  .fl-pane .ph {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 6px 8px;
    padding: 8px;
  }
  .fl-pane .ph .tb {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }
  .fl-pane .ph .tb .fl-mini { width: 100%; padding-inline: 5px; }
  .fl-card { flex-wrap: wrap; }
  .fl-card-main { flex: 1 0 100%; }
  .fl-card-act { margin: -2px 10px 9px auto; }
}

@media (prefers-reduced-motion: reduce) {
  .fl-edge.live { animation: none; stroke-dasharray: none; }
  .fl-st.active i { animation: none; }
  .fl-card-main, #fl-sheet, #fl-scrim, .fl-views button { transition: none; }
}
