/* =====================================================================
   Concord Web — feuille de style commune (landing + tableau de bord)
   Charte Concord AI : fond quasi noir, vert signal, lignes fines grises,
   typographie technique, titres en minuscules.
   ===================================================================== */
:root {
  --ink: #050607;
  --ink-2: #0b0d0e;
  --ink-3: #15181a;
  --bg: #050607;
  --card: #0b0d0e;
  --card-2: #101315;
  --line: #1f2326;
  --line-2: #171a1c;
  --text: #e9ecea;
  --muted: #9aa19d;
  --soft: #646b67;
  --accent: #7bd87b;
  --accent-2: #5fc35f;
  --accent-ink: #062b0a;
  --accent-soft: rgba(123, 216, 123, .1);
  --mint: #7bd87b;
  --mint-soft: rgba(123, 216, 123, .1);
  --amber: #f2b84b;
  --amber-soft: rgba(242, 184, 75, .1);
  --red: #ff6b6b;
  --red-soft: rgba(255, 107, 107, .1);
  --sky: #7cb7ff;
  --sky-soft: rgba(124, 183, 255, .1);
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: none;
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);
  --sans: 'Geist', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
}
::selection { background: rgba(123, 216, 123, .3); }
a { color: var(--accent); text-decoration: none; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.hidden { display: none !important; }
.dotgrid { background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 22px 22px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent; font: inherit; font-weight: 500; font-size: 13.5px;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .05s;
  white-space: nowrap; user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { background: #8fe58f; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: #33393c; background: var(--ink-3); }
.btn-danger { background: var(--red-soft); color: var(--red); border-color: rgba(255, 107, 107, .25); }
.btn-danger:hover { background: rgba(255, 107, 107, .18); }
.btn-success { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-success:hover { background: #8fe58f; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; }
.btn-icon { width: 34px; padding: 0; }
.btn-block { width: 100%; }

/* ---------- Champs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 500; color: var(--muted); font-family: var(--mono); text-transform: lowercase; }
.field .hint { font-size: 12px; color: var(--soft); }
.input, .textarea {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--ink); font: inherit; color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(123, 216, 123, .12); }
.input::placeholder, .textarea::placeholder { color: #50564f; }
.input-icon { position: relative; }
.input-icon i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--soft); font-size: 13px; }
.input-icon .input { padding-left: 34px; }

/* ---------- Liste déroulante personnalisée (remplace <select>) ---------- */
.cselect { position: relative; }
.cselect-btn {
  width: 100%; height: 40px; padding: 0 36px 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--ink); font: inherit; color: var(--text); text-align: left; cursor: pointer; display: flex; align-items: center; gap: 8px;
  position: relative; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.cselect-btn i { color: var(--accent); }
.cselect-btn .ph { color: #50564f; }
.cselect-btn:after {
  content: '\f107'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; right: 13px; top: 50%;
  transform: translateY(-50%); color: var(--soft); transition: transform .15s;
}
.cselect.open .cselect-btn { border-color: var(--accent); }
.cselect.open .cselect-btn:after { transform: translateY(-50%) rotate(180deg); }
.cselect-menu {
  position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; right: 0; background: var(--card-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 5px; max-height: 260px; overflow-y: auto; display: none;
}
.cselect.open .cselect-menu { display: block; animation: pop .14s ease-out; }
.cselect-opt { padding: 8px 10px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text); }
.cselect-opt i { color: var(--soft); width: 16px; text-align: center; }
.cselect-opt:hover, .cselect-opt.active { background: var(--accent-soft); color: var(--accent); }
.cselect-opt:hover i, .cselect-opt.active i { color: var(--accent); }
.cselect-opt small { color: var(--soft); margin-left: auto; font-size: 11.5px; font-family: var(--mono); }
.cselect.dark .cselect-btn { background: var(--ink-2); }

/* ---------- Pastilles / badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 5px;
  font-size: 11px; font-weight: 500; white-space: nowrap; background: var(--ink-3); color: var(--muted);
  font-family: var(--mono); text-transform: lowercase; border: 1px solid var(--line);
}
.badge i { font-size: 9.5px; }
.badge-accent, .badge-mint { background: var(--accent-soft); color: var(--accent); border-color: rgba(123, 216, 123, .2); }
.badge-amber { background: var(--amber-soft); color: var(--amber); border-color: rgba(242, 184, 75, .22); }
.badge-red { background: var(--red-soft); color: var(--red); border-color: rgba(255, 107, 107, .22); }
.badge-sky { background: var(--sky-soft); color: var(--sky); border-color: rgba(124, 183, 255, .22); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot-online { background: var(--accent); box-shadow: 0 0 0 3px rgba(123, 216, 123, .18); }
.dot-idle { background: var(--amber); }
.dot-offline { background: #3a3f42; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 4px; background: var(--ink-3);
  border: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; color: #b9c0bb; margin: 2px 4px 2px 0;
}

/* ---------- Toasts ---------- */
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast {
  min-width: 260px; max-width: 380px; background: var(--card-2); color: var(--text); border: 1px solid var(--line); border-radius: 9px;
  padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; box-shadow: var(--shadow-lg); animation: slideUp .2s ease-out; font-size: 13.5px;
}
.toast i { margin-top: 2px; }
.toast.success i { color: var(--accent); }
.toast.error i { color: var(--red); }
.toast.info i { color: var(--sky); }
.toast.out { opacity: 0; transform: translateY(8px); transition: all .2s; }

/* ---------- Modales ---------- */
.modal-back {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .7); backdrop-filter: blur(2px); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .15s;
}
.modal {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; width: 100%; max-width: 520px; max-height: calc(100vh - 40px);
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: pop .18s ease-out;
}
.modal.wide { max-width: 860px; }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.modal-head h3 { margin: 0; font-size: 15px; font-weight: 600; flex: 1; display: flex; align-items: center; gap: 10px; }
.modal-head h3 i { color: var(--accent); }
.modal-close { background: none; border: none; color: var(--soft); font-size: 17px; cursor: pointer; width: 32px; height: 32px; border-radius: 7px; }
.modal-close:hover { background: var(--ink-3); color: var(--text); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.confirm-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 12px; background: var(--amber-soft); color: var(--amber); }

@keyframes pop { from { opacity: 0; transform: scale(.98) translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================================
   Marque
   ===================================================================== */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; letter-spacing: -.01em; color: var(--text); text-transform: lowercase; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--ink); border: 1px solid #2a2f32; flex: none;
}
.brand-mark img { width: 15px; height: 15px; display: block; }
.brand small { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--soft); border: 1px solid var(--line); padding: 1px 6px; border-radius: 4px; }

/* =====================================================================
   Tableau de bord
   ===================================================================== */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 30px; }
.login-card h1 { font-size: 22px; margin: 22px 0 4px; font-weight: 600; letter-spacing: -.02em; text-transform: lowercase; }
.login-card p.sub { margin: 0 0 22px; color: var(--muted); }
.demo-box { margin-top: 16px; padding: 11px 13px; border-radius: 8px; background: var(--ink); border: 1px dashed var(--line); font-size: 12.5px; color: var(--muted); }
.demo-box b { font-family: var(--mono); font-weight: 500; color: var(--accent); }
.proto-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-family: var(--mono); color: var(--soft); }

.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; flex: none; background: var(--ink); border-right: 1px solid var(--line); color: var(--muted);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 18px 12px;
}
.sidebar .brand { padding: 2px 8px 18px; }
.side-label { font-size: 10.5px; font-family: var(--mono); text-transform: lowercase; color: var(--soft); padding: 16px 10px 8px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 7px; color: var(--muted); cursor: pointer;
  font-weight: 450; margin-bottom: 2px; transition: background .12s, color .12s; text-transform: lowercase;
}
.nav-item i { width: 18px; text-align: center; font-size: 13.5px; }
.nav-item:hover { background: var(--ink-3); color: var(--text); }
.nav-item.active { background: var(--ink-3); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.nav-item.active i { color: var(--accent); }
.nav-item .count { margin-left: auto; background: var(--accent); color: var(--accent-ink); font-size: 10.5px; font-weight: 700; border-radius: 4px; padding: 0 6px; font-family: var(--mono); }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 14px; }
.user-row { display: flex; align-items: center; gap: 10px; padding: 6px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--ink-3); border: 1px solid var(--line); color: var(--text);
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 11px; flex: none; font-family: var(--mono);
}
.user-row .who { flex: 1; min-width: 0; }
.user-row .who b { display: block; color: var(--text); font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-row .who span { font-size: 11.5px; color: var(--soft); }
.user-row button { background: none; border: none; color: var(--soft); cursor: pointer; width: 30px; height: 30px; border-radius: 7px; }
.user-row button:hover { background: var(--ink-3); color: var(--text); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; display: flex; align-items: center; gap: 14px; padding: 0 28px; background: rgba(5, 6, 7, .85);
  backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line);
}
.topbar h2 { margin: 0; font-size: 16px; font-weight: 600; flex: 1; letter-spacing: -.01em; text-transform: lowercase; }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.live .dot { animation: pulse 2s infinite; }
.menu-toggle { display: none; }
.content { padding: 24px 28px 48px; }

.grid { display: grid; gap: 14px; }
.grid-kpi { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head h3 { margin: 0; font-size: 13.5px; font-weight: 600; flex: 1; display: flex; align-items: center; gap: 9px; text-transform: lowercase; }
.card-head h3 i { color: var(--accent); font-size: 12px; }
.card-body { padding: 16px 18px; }
.card-body.flush { padding: 0; }

.kpi { padding: 16px; }
.kpi .k-icon { display: none; }
.kpi .k-val { font-size: 28px; font-weight: 600; letter-spacing: -.03em; line-height: 1; font-family: var(--mono); }
.kpi .k-lbl { font-size: 12px; color: var(--muted); margin-top: 8px; text-transform: lowercase; }
.kpi.hot .k-val { color: var(--accent); }
.kpi.warn .k-val { color: var(--amber); }

.row-item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-2); }
.row-item:last-child { border-bottom: none; }
.row-item.click { cursor: pointer; transition: background .12s; }
.row-item.click:hover { background: var(--card-2); }
.row-main { flex: 1; min-width: 0; }
.row-main b { font-weight: 500; }
.row-main .meta { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-id { font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--accent); background: var(--accent-soft); padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.kind-icon {
  width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex: none;
  background: var(--ink-3); border: 1px solid var(--line); color: var(--muted); font-size: 13px; position: relative;
}
.kind-icon .dot { position: absolute; right: -3px; bottom: -3px; border: 2px solid var(--card); width: 11px; height: 11px; }
.overlap-box { margin-top: 8px; padding: 8px 10px; border-radius: 7px; background: var(--amber-soft); border: 1px solid rgba(242, 184, 75, .2); color: #f5cf86; font-size: 12.5px; }
.overlap-box i { margin-right: 6px; color: var(--amber); }

.feed-item { display: flex; gap: 12px; padding: 10px 18px; }
.feed-icon { width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center; flex: none; font-size: 11px; background: var(--ink-3); border: 1px solid var(--line); color: var(--muted); }
.feed-item .txt { font-size: 13px; }
.feed-item .when { font-size: 11px; color: var(--soft); font-family: var(--mono); }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.tabs { display: inline-flex; background: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.tab { padding: 6px 12px; border-radius: 6px; cursor: pointer; font-weight: 500; font-size: 12.5px; color: var(--muted); border: none; background: none; font-family: inherit; text-transform: lowercase; }
.tab.active { background: var(--ink-3); color: var(--accent); }
.tab:hover:not(.active) { color: var(--text); }

.agent-card { padding: 16px; }
.agent-card .top { display: flex; gap: 12px; align-items: center; }
.agent-card .name { font-weight: 500; font-family: var(--mono); font-size: 13px; word-break: break-all; }
.agent-card .summary { font-size: 12.5px; color: var(--muted); margin: 12px 0; min-height: 36px; }
.kv { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; padding: 5px 0; border-top: 1px dashed var(--line); color: var(--muted); }
.kv b { color: var(--text); font-weight: 500; }

.empty { text-align: center; padding: 40px 20px; color: var(--soft); font-family: var(--mono); font-size: 12.5px; }
.empty i { font-size: 22px; margin-bottom: 10px; display: block; color: #33393c; }

/* Fil de messages */
.msg-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 14px; min-height: 560px; }
.thread-item { padding: 12px 16px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.thread-item:hover { background: var(--card-2); }
.thread-item.active { background: var(--ink-3); box-shadow: inset 2px 0 0 var(--accent); }
.thread-item .who { font-size: 12.5px; font-weight: 500; display: flex; gap: 6px; align-items: center; }
.thread-item .prev { font-size: 12.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bubbles { padding: 18px; display: flex; flex-direction: column; gap: 12px; max-height: 470px; overflow-y: auto; }
#threadPane .bubbles { flex: 1; }
.bubble { max-width: 78%; padding: 10px 13px; border-radius: 10px; background: var(--ink-3); border: 1px solid var(--line); align-self: flex-start; }
.bubble.me { align-self: flex-end; background: var(--accent-soft); border-color: rgba(123, 216, 123, .25); }
.bubble .b-meta { font-size: 10.5px; color: var(--soft); margin-bottom: 3px; font-family: var(--mono); }
.bubble .b-text { white-space: pre-wrap; word-wrap: break-word; }
.composer { border-top: 1px solid var(--line); padding: 14px 16px; }

/* Détail de tâche */
.detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; }
.detail-cell { background: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; }
.detail-cell span { display: block; font-size: 10.5px; font-family: var(--mono); color: var(--soft); text-transform: lowercase; }
.detail-cell b { font-size: 13px; font-weight: 500; word-break: break-all; }
.timeline { position: relative; padding-left: 22px; }
.timeline:before { content: ''; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 1px; background: var(--line); }
.tl-item { position: relative; margin-bottom: 14px; }
.tl-item:before { content: ''; position: absolute; left: -19px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--card); border: 2px solid var(--accent); }
.tl-item.superseded { opacity: .5; }
.tl-item.superseded .tl-text { text-decoration: line-through; }
.tl-head { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tl-text { margin-top: 4px; white-space: pre-wrap; }
.section-title { font-size: 11px; font-family: var(--mono); color: var(--soft); text-transform: lowercase; margin: 22px 0 10px; }
.section-title:before { content: '// '; color: var(--accent); }
.evidence { border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; margin-bottom: 10px; background: var(--ink); }
.evidence ul { margin: 4px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); }

.code-block {
  position: relative; background: var(--ink); border: 1px solid var(--line); color: #cfe9cf; border-radius: 9px; padding: 14px 16px; font-family: var(--mono);
  font-size: 12px; white-space: pre-wrap; word-break: break-all; margin-bottom: 10px; line-height: 1.6;
}
.code-block .copy {
  position: absolute; top: 8px; right: 8px; background: var(--ink-3); border: 1px solid var(--line); color: var(--muted); border-radius: 5px;
  padding: 4px 9px; font-size: 11px; cursor: pointer; font-family: var(--mono);
}
.code-block .copy:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.alert { padding: 11px 14px; border-radius: 9px; font-size: 13px; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.alert-warn { background: var(--amber-soft); color: #f5cf86; border: 1px solid rgba(242, 184, 75, .2); }
.alert-info { background: var(--ink-3); color: var(--muted); border: 1px solid var(--line); }
table.tbl { width: 100%; border-collapse: collapse; }
table.tbl th { text-align: left; font-size: 11px; font-family: var(--mono); text-transform: lowercase; color: var(--soft); padding: 10px 18px; border-bottom: 1px solid var(--line); font-weight: 400; }
table.tbl td { padding: 12px 18px; border-bottom: 1px solid var(--line-2); font-size: 13px; vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: none; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(6, 43, 10, .3); border-top-color: var(--accent-ink); border-radius: 50%; animation: spin .7s linear infinite; }
.loading-page { padding: 60px; text-align: center; color: var(--soft); }

/* Barre de prototype (landing + app) */
.proto-bar { background: var(--ink-2); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; text-align: center; padding: 8px 16px; font-family: var(--mono); }
.proto-bar b { color: var(--text); font-weight: 500; }

@media (max-width: 1280px) { .grid-kpi { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1024px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .msg-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; left: -260px; z-index: 100; transition: left .2s; }
  .sidebar.open { left: 0; box-shadow: var(--shadow-lg); }
  .menu-toggle { display: inline-flex; }
  .content { padding: 18px 14px 40px; }
  .topbar { padding: 0 14px; }
  .grid-kpi { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
  .live span { display: none; }
}
