/* Preserve [hidden] attribute even when CSS sets display */
[hidden] { display: none !important; }

/* ---------- Theme ---------- */
:root {
  --bg: #0f172a;
  --bg-soft: #111c33;
  --panel: #16223e;
  --panel-2: #1c2a4d;
  --line: #2a3960;
  --text: #e6edf7;
  --muted: #94a3b8;
  --accent: #6366f1;
  --accent-2: #818cf8;
  --ok: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 6px 18px rgba(0,0,0,.35);
  --radius: 10px;

  /* Stage colors */
  --st-new: #64748b;
  --st-approach: #3b82f6;
  --st-msg1: #8b5cf6;
  --st-msg2: #a855f7;
  --st-engage: #f59e0b;
  --st-positive: #10b981;
  --st-archived: #475569;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(180deg, #0b1224 0%, #0f172a 100%);
  color: var(--text);
  display: flex;
  flex-direction: column;
}

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { font-size: 18px; margin: 0; letter-spacing: .3px; }
.brand .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px var(--accent);
}
.meta { color: var(--muted); font-size: 12px; margin-left: 8px; }

.controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; flex: 1; justify-content: flex-end; }

#searchInput {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius);
  width: 320px;
  max-width: 100%;
  outline: none;
  transition: border-color .15s;
}
#searchInput:focus { border-color: var(--accent); }

.quick-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .15s;
}
.chip:hover { background: var(--panel-2); border-color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip .count {
  background: rgba(255,255,255,.1);
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  min-width: 18px;
  text-align: center;
}
.chip.danger { color: var(--muted); }

.actions { display: flex; gap: 6px; align-items: center; }

.stages-picker { position: relative; }
.stages-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 240px;
  box-shadow: 0 14px 40px rgba(0,0,0,.5);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stages-menu .stage-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
}
.stages-menu .stage-item input[type="checkbox"] {
  cursor: pointer;
  accent-color: #6366f1;
}
.stages-menu .stages-menu-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.stages-menu .stages-menu-actions button {
  flex: 1;
  font-size: 12px;
  padding: 6px 10px;
}
.btn {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  transition: all .15s;
}
.btn:hover { background: var(--panel-2); border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger.ghost { background: transparent; color: var(--danger); border-color: rgba(239,68,68,.4); }
.btn.danger.ghost:hover { background: rgba(239,68,68,.12); }
.btn.ghost { background: transparent; }

/* ---------- Board ---------- */
.board {
  flex: 1;
  display: flex;
  gap: 14px;
  padding: 16px 16px 24px;
  overflow-x: auto;
  overflow-y: hidden;
  align-items: flex-start;
  scrollbar-width: thin;
  scrollbar-color: rgba(99,102,241,0.5) rgba(255,255,255,0.05);
}

/* Scrollbar horizontale en HAUT du board, synchronisée par JS.
   La native (en bas du board) reste en fallback. */
.board-scroll-top {
  margin: 8px 16px 0;
  height: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(99,102,241,0.5) rgba(255,255,255,0.05);
}
.board-scroll-top::-webkit-scrollbar { height: 12px; }
.board-scroll-top::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
}
.board-scroll-top::-webkit-scrollbar-thumb {
  background: rgba(99,102,241,0.5);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.board-scroll-top::-webkit-scrollbar-thumb:hover {
  background: rgba(99,102,241,0.8);
  background-clip: padding-box;
}
#boardScrollTopInner { height: 1px; }

.board::-webkit-scrollbar {
  height: 12px;
}

.board::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
}

.board::-webkit-scrollbar-thumb {
  background: rgba(99,102,241,0.5);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.board::-webkit-scrollbar-thumb:hover {
  background: rgba(99,102,241,0.8);
  background-clip: padding-box;
}

.column {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: 320px;
  min-width: 320px;
  max-height: calc(100vh - 110px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.col-head {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
.col-head::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--col-color, var(--accent));
}
.col-head h2 {
  font-size: 13px;
  margin: 0;
  font-weight: 600;
  letter-spacing: .2px;
}
.col-head .count-pill {
  margin-left: auto;
  background: rgba(255,255,255,.08);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--muted);
}
.col-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 60px;
}
.col-list.drag-over { background: rgba(99,102,241,.08); }

/* Column color modifiers via data-stage-key */
.column[data-stage-key^="new"] .col-head::before { background: var(--st-new); }
.column[data-stage-key^="approach"] .col-head::before { background: var(--st-approach); }
.column[data-stage-key^="1er"] .col-head::before { background: var(--st-msg1); }
.column[data-stage-key^="2eme"] .col-head::before { background: var(--st-msg2); }
.column[data-stage-key^="engag"] .col-head::before { background: var(--st-engage); }
.column[data-stage-key^="replied"] .col-head::before { background: var(--st-positive); }
.column[data-stage-key="archived"] .col-head::before { background: var(--st-archived); }

/* ---------- Cards ---------- */
.card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: grab;
  transition: transform .12s, box-shadow .12s, border-color .12s;
  position: relative;
}
.card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-1px); }
.card:active { cursor: grabbing; }
.card.dragging { opacity: .35; }
.card-name { font-weight: 600; font-size: 14px; margin: 0 0 2px; }
.card-headline { color: var(--muted); font-size: 12px; margin: 0 0 6px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 11px; color: var(--muted); }
.card-meta .pill {
  background: rgba(255,255,255,.06);
  padding: 1px 6px;
  border-radius: 999px;
}
.card-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.badge.call { background: rgba(99,102,241,.18); color: var(--accent-2); }
.badge.due-today { background: rgba(245,158,11,.18); color: var(--warn); }
.badge.overdue { background: rgba(239,68,68,.18); color: var(--danger); }
.badge.scheduled { background: rgba(16,185,129,.15); color: var(--ok); }
.badge.notes { background: rgba(255,255,255,.08); color: var(--muted); }
.badge.question { background: rgba(245,158,11,.18); color: var(--warn); }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--accent-2);
  text-decoration: none;
  font-size: 11px;
  margin-left: auto;
}
.card-link:hover { color: #fff; }

/* ---------- Modal ---------- */
[hidden] { display: none !important; }

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  width: 700px;
  max-width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.modal-head {
  display: flex;
  align-items: flex-start;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-head p { margin: 4px 0 0; font-size: 13px; }
.icon-btn {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  margin-left: auto;
  padding: 4px 8px;
}
.icon-btn:hover { color: #fff; }

.modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px 20px; }
.section { margin-bottom: 18px; }
.section h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 0 0 8px;
  font-weight: 600;
}

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.grid2 label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.grid2 input, .grid2 select, textarea {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
}
.grid2 input:focus, .grid2 select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.checkbox-row { flex-direction: row !important; align-items: center; gap: 8px !important; color: var(--text) !important; font-size: 13px !important; align-self: end; }

textarea { width: 100%; resize: vertical; min-height: 80px; }

/* ---------- @mention notes ---------- */
.notes-wrap { position: relative; }

/* Calque de surbrillance derrière le textarea : mêmes métriques exactes pour
   que le texte coloré se superpose pile au texte saisi. */
.notes-wrap #mClientNotes,
.notes-highlight {
  font-size: 13px;
  font-family: inherit;
  line-height: 1.5;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  letter-spacing: normal;
}
.notes-wrap #mClientNotes {
  position: relative;
  z-index: 2;
  background: transparent;
  color: transparent;
  caret-color: var(--text);
}
.notes-highlight {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  border-color: transparent;
  background: var(--bg-soft);
  color: var(--text);
  overflow: hidden;
  pointer-events: none;
}
.notes-highlight .mention {
  color: var(--accent-2);
  background: rgba(99,102,241,.18);
  border-radius: 4px;
  padding: 0 2px;
  font-weight: 600;
}
/* Mention @Client (admin → client) : ambre, pour la distinguer de @Team_Hub. */
.notes-highlight .mention-client {
  color: var(--warn);
  background: rgba(245,158,11,.18);
}
.mention-hint { margin: 6px 2px 0; }
.mention-hint code, .mention-menu strong { color: var(--accent-2); }
.mention-menu {
  position: absolute;
  z-index: 30;
  margin: 2px 0 0;
  padding: 4px;
  list-style: none;
  min-width: 220px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.mention-menu li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.mention-menu li span { font-size: 11px; color: var(--muted); }
.mention-menu li:hover, .mention-menu li.active { background: var(--panel-2); }

.contacts { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.contacts a { color: var(--accent-2); text-decoration: none; }
.contacts a:hover { text-decoration: underline; }
.contacts .row { display: flex; gap: 10px; align-items: center; }
.contacts .row .lbl { color: var(--muted); width: 70px; font-size: 11px; text-transform: uppercase; }

.kv { margin: 0; display: grid; grid-template-columns: 130px 1fr; gap: 4px 12px; font-size: 13px; }
.kv dt { color: var(--muted); font-size: 12px; }
.kv dd { margin: 0; }

.history { list-style: none; padding: 0; margin: 0; max-height: 140px; overflow-y: auto; }
.history li { padding: 4px 0; font-size: 12px; color: var(--muted); border-bottom: 1px dashed var(--line); }
.history li:last-child { border-bottom: 0; }
.history time { color: var(--accent-2); margin-right: 6px; }

.modal-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 0 0 12px 12px;
}
.spacer { flex: 1; }

.muted { color: var(--muted); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: var(--shadow);
  z-index: 200;
  animation: toast-in .2s ease;
}
.toast.success { border-color: var(--ok); }
.toast.error { border-color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--panel-2); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--line); }

/* ---------- Empty state ---------- */
.empty-col {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 14px 6px;
  font-style: italic;
}

/* ---------- Login ---------- */
.login-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0b1224 0%, #1a1c3a 100%);
  z-index: 50;
  padding: 20px;
}
.login-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  width: 380px;
  max-width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.login-brand .dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 16px var(--accent);
}
.login-brand h1 { font-size: 20px; margin: 0; }
.login-sub { font-size: 13px; margin: 0 0 24px; }
.login-screen form { display: flex; flex-direction: column; gap: 14px; }
.login-screen label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.login-screen input {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
.login-screen input:focus { border-color: var(--accent); }
.btn.block { width: 100%; padding: 11px; font-weight: 600; margin-top: 8px; }
.login-error {
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.4);
  color: #fca5a5;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  margin: 0;
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 0;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  overflow-x: auto;
}
.tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 14px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  white-space: nowrap;
  transition: all .15s;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ---------- Stage badge in modal ---------- */
.stage-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(99,102,241,.15);
  color: var(--accent-2);
  border: 1px solid rgba(99,102,241,.3);
}

/* ---------- Markers grid ---------- */
.markers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.marker {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
}
.marker .lbl {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.marker .val {
  color: var(--text);
  font-weight: 600;
  margin-top: 2px;
}

/* ---------- Conversation chat ---------- */
.conv-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.conv-tab {
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
}
.conv-tab:hover { color: var(--text); border-color: var(--accent); }
.conv-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.conv-tab.disabled {
  opacity: .35;
  pointer-events: none;
}

.conv-pane {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  max-height: 420px;
  overflow-y: auto;
}

.msg {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
  max-width: 85%;
}
.msg.them { align-self: flex-start; }
.msg.us { align-self: flex-end; margin-left: auto; }
.msg-meta {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 3px;
  padding: 0 4px;
}
.msg.us .msg-meta { text-align: right; }
.msg-bubble {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.msg.them .msg-bubble {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-top-left-radius: 4px;
}
.msg.us .msg-bubble {
  background: var(--accent);
  color: #fff;
  border-top-right-radius: 4px;
}
.conv-empty { text-align: center; color: var(--muted); padding: 30px 10px; font-size: 13px; }

.small { font-size: 11px; }

/* ---------- Quick links in modal head ---------- */
.lead-quick {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 12px;
}
.lead-quick a {
  color: var(--accent-2);
  text-decoration: none;
}
.lead-quick a:hover { text-decoration: underline; }

/* ---------- Client filter (admin) ---------- */
.client-filter {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.client-filter:focus { outline: none; border-color: var(--accent); }

.client-pill {
  background: rgba(99,102,241,.15) !important;
  color: var(--accent-2) !important;
  border: 1px solid rgba(99,102,241,.3);
  text-transform: lowercase;
}

.sender-pill {
  background: rgba(34,197,94,.12) !important;
  color: #86efac !important;
  border: 1px solid rgba(34,197,94,.3);
}

/* ---------- Admin modal ---------- */
.admin-modal { width: 720px; }
.admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}
.admin-row {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
}
.admin-row-main { flex: 1; min-width: 0; }
.admin-row-main code { background: rgba(255,255,255,.06); padding: 1px 5px; border-radius: 4px; font-size: 11px; word-break: break-all; }
.admin-row-actions { display: flex; gap: 6px; }
.btn.small { padding: 5px 10px; font-size: 12px; }

.webhook-url {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--accent-2);
  margin: 0;
  word-break: break-all;
  white-space: pre-wrap;
}

/* ---------- Loader ---------- */
.loader {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
  #searchInput { width: 100%; }
  .controls { width: 100%; justify-content: flex-start; }
  .grid2 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .modal { max-height: 95vh; }
}
