/* ==========================================================================
   BLACK'BOT — CONSOLE DE GESTION BLACK-OUT RP
   Design system maison. Aucune dépendance CSS externe.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Surfaces — du plus profond au plus élevé */
  --bg-0: #08080a;
  --bg-1: #0d0d10;
  --bg-2: #131317;
  --bg-3: #1a1a1f;
  --bg-4: #232329;

  /* Traits */
  --line-1: rgba(255, 255, 255, 0.06);
  --line-2: rgba(255, 255, 255, 0.10);
  --line-3: rgba(255, 255, 255, 0.16);

  /* Texte */
  --fg-1: #ededf0;
  --fg-2: #9e9ea7;
  --fg-3: #6a6a74;

  /* Marque Black-Out */
  --accent: #e5484d;
  --accent-hi: #f26e72;
  --accent-lo: rgba(229, 72, 77, 0.12);
  --accent-line: rgba(229, 72, 77, 0.32);
  --brand-deep: #8b0000;

  /* Statuts */
  --green: #30a46c;
  --green-lo: rgba(48, 164, 108, 0.12);
  --amber: #f5a524;
  --amber-lo: rgba(245, 165, 36, 0.12);
  --blue: #5b8def;
  --blue-lo: rgba(91, 141, 239, 0.12);
  --violet: #8e7bef;
  --violet-lo: rgba(142, 123, 239, 0.12);

  /* Formes */
  --r-sm: 6px;
  --r-md: 9px;
  --r-lg: 13px;
  --r-full: 999px;

  /* Élévations */
  --sh-1: 0 1px 2px rgba(0, 0, 0, 0.45);
  --sh-2: 0 10px 28px -10px rgba(0, 0, 0, 0.65);
  --sh-3: 0 28px 70px -18px rgba(0, 0, 0, 0.78);

  /* Rythme */
  --sidebar-w: 250px;
  --topbar-h: 58px;
  --gutter: 26px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--fg-1);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  overflow: hidden;
}

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

::selection { background: var(--accent-lo); color: var(--fg-1); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--bg-4);
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: var(--r-full);
}
::-webkit-scrollbar-thumb:hover { background: #32323a; background-clip: content-box; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   3. TYPOGRAPHIE
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 { font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; }
h1 { font-size: 19px; }
h2 { font-size: 15.5px; }
h3 { font-size: 13.5px; }
h4 { font-size: 12.5px; }

.mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  font-size: 0.92em;
  font-variant-numeric: tabular-nums;
}

.num { font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

.eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.muted { color: var(--fg-2); }
.dim { color: var(--fg-3); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.strong { font-weight: 600; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* --------------------------------------------------------------------------
   4. SQUELETTE DE L'APPLICATION
   -------------------------------------------------------------------------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ---- Barre latérale ---- */
.sidebar {
  display: flex;
  flex-direction: column;
  background: var(--bg-1);
  border-right: 1px solid var(--line-1);
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  height: var(--topbar-h);
  padding: 0 18px;
  border-bottom: 1px solid var(--line-1);
  flex-shrink: 0;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: linear-gradient(145deg, var(--accent) 0%, var(--brand-deep) 100%);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  box-shadow: 0 2px 10px rgba(229, 72, 77, 0.28);
  flex-shrink: 0;
}

.brand-text { min-width: 0; }
.brand-name {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.brand-sub { font-size: 10px; color: var(--fg-3); letter-spacing: 0.04em; }

.nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px 8px;
}

.nav-group { margin-bottom: 18px; }
.nav-group > .eyebrow { padding: 0 10px 7px; display: block; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border-radius: var(--r-md);
  color: var(--fg-2);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.13s var(--ease), color 0.13s var(--ease);
  position: relative;
}

.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.85; }
.nav-item:hover { background: var(--bg-2); color: var(--fg-1); }

.nav-item.active {
  background: var(--bg-3);
  color: var(--fg-1);
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 17px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}
.nav-item.active svg { color: var(--accent); opacity: 1; }

.nav-badge {
  margin-left: auto;
  min-width: 19px;
  height: 19px;
  padding: 0 6px;
  border-radius: var(--r-full);
  background: var(--bg-4);
  color: var(--fg-2);
  font-size: 10.5px;
  font-weight: 600;
  display: grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}
.nav-badge.hot { background: var(--accent-lo); color: var(--accent-hi); }

/* ---- Carte utilisateur ---- */
.side-foot {
  border-top: 1px solid var(--line-1);
  padding: 12px;
  flex-shrink: 0;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--r-md);
  transition: background 0.13s var(--ease);
}
.user-card:hover { background: var(--bg-2); }
.user-card img { width: 30px; height: 30px; border-radius: var(--r-md); object-fit: cover; }
.user-meta { min-width: 0; flex: 1; }
.user-name { font-size: 12.5px; font-weight: 600; }
.user-role { font-size: 10.5px; color: var(--fg-3); display: flex; align-items: center; gap: 4px; }

.icon-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  color: var(--fg-3);
  transition: background 0.13s var(--ease), color 0.13s var(--ease);
  flex-shrink: 0;
}
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn:hover { background: var(--bg-3); color: var(--fg-1); }
.icon-btn.danger:hover { background: var(--accent-lo); color: var(--accent-hi); }

/* ---- Zone principale ---- */
.main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-0);
}

.topbar {
  height: var(--topbar-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line-1);
  background: var(--bg-0);
}

.topbar h1 { font-size: 15px; }
.topbar-sub { font-size: 11.5px; color: var(--fg-3); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 31px;
  padding: 0 9px 0 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--bg-1);
  color: var(--fg-3);
  font-size: 12.5px;
  transition: border-color 0.13s var(--ease), background 0.13s var(--ease);
}
.search-trigger:hover { border-color: var(--line-3); background: var(--bg-2); }
.search-trigger svg { width: 14px; height: 14px; }

kbd {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  color: var(--fg-3);
  line-height: 1.4;
}

.view-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.view {
  padding: 24px var(--gutter) 56px;
  max-width: 1480px;
  animation: viewIn 0.22s var(--ease);
}

@keyframes viewIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   5. COMPOSANTS
   -------------------------------------------------------------------------- */

/* ---- Boutons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 32px;
  padding: 0 13px;
  border-radius: var(--r-md);
  font-size: 12.5px;
  font-weight: 550;
  border: 1px solid transparent;
  transition: background 0.13s var(--ease), border-color 0.13s var(--ease), color 0.13s var(--ease), transform 0.08s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(0.5px); }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn:disabled { opacity: 0.45; pointer-events: none; }

.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 1px 10px rgba(229, 72, 77, 0.22); }
.btn-primary:hover { background: var(--accent-hi); }

.btn-default { background: var(--bg-3); color: var(--fg-1); border-color: var(--line-2); }
.btn-default:hover { background: var(--bg-4); border-color: var(--line-3); }

.btn-ghost { color: var(--fg-2); }
.btn-ghost:hover { background: var(--bg-2); color: var(--fg-1); }

.btn-danger { color: var(--accent-hi); border-color: var(--accent-line); background: var(--accent-lo); }
.btn-danger:hover { background: rgba(229, 72, 77, 0.2); }

.btn-sm { height: 27px; padding: 0 10px; font-size: 11.5px; border-radius: var(--r-sm); }
.btn-sm svg { width: 13px; height: 13px; }
.btn-lg { height: 37px; padding: 0 17px; font-size: 13.5px; }
.btn-block { width: 100%; }

/* ---- Cartes / panneaux ---- */
.card {
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-1);
}
.card-head h2, .card-head h3 { flex: 1; min-width: 0; }
.card-head .sub { font-size: 11.5px; color: var(--fg-3); font-weight: 400; }
.card-body { padding: 16px; }
.card-body.flush { padding: 0; }
.card-foot { padding: 12px 16px; border-top: 1px solid var(--line-1); display: flex; gap: 8px; }

.card-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--bg-3);
  color: var(--fg-2);
  flex-shrink: 0;
}
.card-icon svg { width: 15px; height: 15px; }
.card-icon.red { background: var(--accent-lo); color: var(--accent-hi); }
.card-icon.green { background: var(--green-lo); color: var(--green); }
.card-icon.amber { background: var(--amber-lo); color: var(--amber); }
.card-icon.blue { background: var(--blue-lo); color: var(--blue); }
.card-icon.violet { background: var(--violet-lo); color: var(--violet); }

/* ---- Grilles ---- */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1fr) 340px; }
.g-side { grid-template-columns: 300px minmax(0, 1fr); }

.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 16px; }

/* ---- KPI ---- */
.kpi {
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  padding: 15px 16px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.15s var(--ease);
}
.kpi:hover { border-color: var(--line-2); }
.kpi::after {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2) 30%, var(--line-2) 70%, transparent);
}
.kpi-label { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--fg-3); font-weight: 500; }
.kpi-label svg { width: 13px; height: 13px; }
.kpi-value { font-size: 27px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: 7px; line-height: 1; }
.kpi-foot { margin-top: 8px; font-size: 11.5px; color: var(--fg-3); display: flex; align-items: center; gap: 5px; }
.kpi-delta { font-weight: 600; font-variant-numeric: tabular-nums; }
.kpi-delta.up { color: var(--green); }
.kpi-delta.down { color: var(--accent-hi); }

/* ---- Badges & pastilles ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--bg-3);
  color: var(--fg-2);
  border: 1px solid var(--line-1);
  white-space: nowrap;
}
.badge.red { background: var(--accent-lo); color: var(--accent-hi); border-color: var(--accent-line); }
.badge.green { background: var(--green-lo); color: var(--green); border-color: rgba(48, 164, 108, 0.3); }
.badge.amber { background: var(--amber-lo); color: var(--amber); border-color: rgba(245, 165, 36, 0.3); }
.badge.blue { background: var(--blue-lo); color: var(--blue); border-color: rgba(91, 141, 239, 0.3); }
.badge.violet { background: var(--violet-lo); color: var(--violet); border-color: rgba(142, 123, 239, 0.3); }

.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fg-3); flex-shrink: 0; }
.dot.green { background: var(--green); }
.dot.red { background: var(--accent); }
.dot.amber { background: var(--amber); }
.dot.blue { background: var(--blue); }
.dot.live { box-shadow: 0 0 0 0 rgba(48, 164, 108, 0.6); animation: pulse 2.4s infinite; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(48, 164, 108, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(48, 164, 108, 0); }
  100% { box-shadow: 0 0 0 0 rgba(48, 164, 108, 0); }
}

/* ---- Formulaires ---- */
.field { display: block; }
.field + .field { margin-top: 14px; }
.label {
  display: block;
  font-size: 11.5px;
  font-weight: 550;
  color: var(--fg-2);
  margin-bottom: 6px;
}
.hint { font-size: 11px; color: var(--fg-3); margin-top: 5px; line-height: 1.5; }
.hint code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  background: var(--bg-3);
  padding: 1px 4px;
  border-radius: 3px;
  color: var(--fg-2);
}

.input, .select, .textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 8px 11px;
  font-size: 13px;
  color: var(--fg-1);
  transition: border-color 0.13s var(--ease), background 0.13s var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--fg-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-3); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent-line);
  background: var(--bg-1);
  box-shadow: 0 0 0 3px var(--accent-lo);
}
.textarea { resize: vertical; min-height: 78px; line-height: 1.6; }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236a6a74' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
  cursor: pointer;
}
.select option { background: var(--bg-2); color: var(--fg-1); }

.input-icon { position: relative; }
.input-icon svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--fg-3);
  pointer-events: none;
}
.input-icon .input { padding-left: 32px; }

/* Interrupteur */
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track {
  width: 34px;
  height: 19px;
  border-radius: var(--r-full);
  background: var(--bg-4);
  border: 1px solid var(--line-2);
  position: relative;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease);
  flex-shrink: 0;
}
.switch-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--fg-2);
  transition: transform 0.16s var(--ease), background 0.16s var(--ease);
}
.switch input:checked + .switch-track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(15px); background: #fff; }
.switch-label { font-size: 12.5px; font-weight: 500; }

/* Case à cocher */
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12.5px; }
.check input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }

/* ---- Onglets internes ---- */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line-1);
  margin-bottom: 20px;
}
.tab {
  padding: 8px 13px;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--fg-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.13s var(--ease), border-color 0.13s var(--ease);
}
.tab:hover { color: var(--fg-1); }
.tab.active { color: var(--fg-1); border-bottom-color: var(--accent); }

/* ---- Segments ---- */
.segments {
  display: inline-flex;
  padding: 2px;
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  gap: 2px;
}
.segment {
  padding: 4px 11px;
  border-radius: var(--r-sm);
  font-size: 11.5px;
  font-weight: 550;
  color: var(--fg-3);
  transition: background 0.13s var(--ease), color 0.13s var(--ease);
}
.segment:hover { color: var(--fg-1); }
.segment.active { background: var(--bg-4); color: var(--fg-1); }

/* ---- Listes ---- */
.list { display: flex; flex-direction: column; }
.list-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line-1);
  transition: background 0.11s var(--ease);
}
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: var(--bg-2); }
.list-row.clickable { cursor: pointer; }

.avatar { width: 30px; height: 30px; border-radius: var(--r-md); object-fit: cover; flex-shrink: 0; background: var(--bg-3); }
.avatar.sm { width: 22px; height: 22px; border-radius: var(--r-sm); }
.avatar.lg { width: 38px; height: 38px; }

/* ---- États vides & chargement ---- */
.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--fg-3);
}
.empty-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-lg);
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  color: var(--fg-3);
}
.empty-icon svg { width: 17px; height: 17px; }
.empty-title { font-size: 13px; font-weight: 550; color: var(--fg-2); }
.empty-text { font-size: 12px; margin-top: 3px; max-width: 320px; margin-inline: auto; line-height: 1.55; }
.empty .btn { margin-top: 14px; }

.skeleton {
  background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg-3) 50%, var(--bg-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
  border-radius: var(--r-sm);
  height: 11px;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid var(--line-3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   6. SURCOUCHES (toasts, modales, tiroir, palette)
   -------------------------------------------------------------------------- */
.toasts {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 270px;
  max-width: 380px;
  padding: 11px 14px 11px 12px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--fg-3);
  border-radius: var(--r-md);
  box-shadow: var(--sh-3);
  font-size: 12.5px;
  pointer-events: auto;
  animation: toastIn 0.24s var(--ease);
}
.toast.out { animation: toastOut 0.18s var(--ease) forwards; }
.toast svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }
.toast.ok { border-left-color: var(--green); }
.toast.ok svg { color: var(--green); }
.toast.err { border-left-color: var(--accent); }
.toast.err svg { color: var(--accent-hi); }
.toast.info { border-left-color: var(--blue); }
.toast.info svg { color: var(--blue); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(18px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(18px) scale(0.97); }
}

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 6, 0.62);
  backdrop-filter: blur(2px);
  z-index: 200;
  animation: fadeIn 0.16s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  position: fixed;
  z-index: 210;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 40px));
  max-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-3);
  animation: modalIn 0.2s var(--ease);
  overflow: hidden;
}
.modal.wide { width: min(820px, calc(100vw - 40px)); }
@keyframes modalIn {
  from { opacity: 0; transform: translate(-50%, -48%) scale(0.97); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.modal-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--line-1);
  flex-shrink: 0;
}
.modal-body { padding: 17px; overflow-y: auto; flex: 1; }
.modal-foot {
  padding: 13px 17px;
  border-top: 1px solid var(--line-1);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

/* Tiroir latéral */
.drawer {
  position: fixed;
  z-index: 210;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(480px, 100vw);
  display: flex;
  flex-direction: column;
  background: var(--bg-1);
  border-left: 1px solid var(--line-2);
  box-shadow: var(--sh-3);
  animation: drawerIn 0.24s var(--ease);
}
@keyframes drawerIn {
  from { transform: translateX(100%); }
  to { transform: none; }
}
.drawer-head {
  padding: 15px 17px;
  border-bottom: 1px solid var(--line-1);
  display: flex;
  align-items: flex-start;
  gap: 11px;
  flex-shrink: 0;
}
.drawer-body { flex: 1; overflow-y: auto; padding: 17px; }
.drawer-foot { padding: 13px 17px; border-top: 1px solid var(--line-1); display: flex; gap: 8px; flex-shrink: 0; }

/* Palette de commandes */
.palette {
  position: fixed;
  z-index: 220;
  top: 14vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(580px, calc(100vw - 32px));
  background: var(--bg-1);
  border: 1px solid var(--line-3);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-3);
  overflow: hidden;
  animation: modalIn 0.18s var(--ease);
}
.palette-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-1);
  font-size: 14.5px;
  color: var(--fg-1);
}
.palette-input::placeholder { color: var(--fg-3); }
.palette-list { max-height: 46vh; overflow-y: auto; padding: 6px; }
.palette-section { padding: 9px 10px 4px; }
.palette-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--fg-2);
  text-align: left;
}
.palette-item svg { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.8; }
.palette-item .sub { margin-left: auto; font-size: 11px; color: var(--fg-3); }
.palette-item.sel { background: var(--bg-3); color: var(--fg-1); }
.palette-item.sel svg { color: var(--accent); opacity: 1; }

/* --------------------------------------------------------------------------
   7. VUES SPÉCIFIQUES
   -------------------------------------------------------------------------- */

/* ---- Kanban ---- */
.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 14px;
  align-items: start;
}

.column {
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 260px);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.column.drop { border-color: var(--accent-line); background: var(--bg-2); }

.column-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-1);
  flex-shrink: 0;
}
.column-title { font-size: 12.5px; font-weight: 600; }
.column-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--fg-3);
  font-variant-numeric: tabular-nums;
  background: var(--bg-3);
  padding: 1px 7px;
  border-radius: var(--r-full);
}
.column-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow-y: auto;
  min-height: 120px;
}

.task {
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  padding: 11px 12px;
  cursor: pointer;
  transition: border-color 0.13s var(--ease), background 0.13s var(--ease), transform 0.13s var(--ease);
}
.task:hover { border-color: var(--line-3); background: var(--bg-3); }
.task.dragging { opacity: 0.4; transform: rotate(1.5deg); }
.task-title { font-size: 12.8px; font-weight: 550; line-height: 1.4; }
.task-desc {
  font-size: 11.5px;
  color: var(--fg-3);
  margin-top: 4px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.task-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 7px; }
.task-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--line-1);
  font-size: 10.5px;
  color: var(--fg-3);
}
.task-thumb {
  width: 100%;
  height: 74px;
  object-fit: cover;
  border-radius: var(--r-sm);
  margin-top: 9px;
  border: 1px solid var(--line-1);
}

.tag-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* ---- Graphique ---- */
.chart { width: 100%; height: 160px; display: block; overflow: visible; }
.chart-legend { display: flex; gap: 16px; font-size: 11.5px; color: var(--fg-3); }
.chart-legend span { display: flex; align-items: center; gap: 6px; }

/* ---- Flux d'activité ---- */
.feed-item {
  display: flex;
  gap: 11px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-1);
}
.feed-item:last-child { border-bottom: none; padding-bottom: 0; }
.feed-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--bg-3);
  color: var(--fg-2);
}
.feed-mark svg { width: 13px; height: 13px; }
.feed-text { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.45; }
.feed-time { font-size: 10.5px; color: var(--fg-3); white-space: nowrap; }

/* ---- Aperçu Discord (studio embed) ---- */
.discord-preview {
  background: #313338;
  border-radius: var(--r-md);
  padding: 16px;
  font-family: 'Inter', sans-serif;
}
.discord-msg { display: flex; gap: 14px; }
.discord-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--brand-deep); flex-shrink: 0; display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 14px; }
.discord-author { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.discord-name { font-size: 14px; font-weight: 600; color: #f2f3f5; }
.discord-bot-tag { background: #5865f2; color: #fff; font-size: 9.5px; font-weight: 600; padding: 1px 4px; border-radius: 3px; letter-spacing: 0.02em; }
.discord-ts { font-size: 11px; color: #949ba4; }

.embed {
  border-left: 4px solid var(--brand-deep);
  background: #2b2d31;
  border-radius: 4px;
  padding: 12px 16px 14px 12px;
  max-width: 432px;
  margin-top: 6px;
}
.embed-author { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.embed-author img { width: 22px; height: 22px; border-radius: 50%; }
.embed-author span { font-size: 13px; font-weight: 600; color: #f2f3f5; }
.embed-title { font-size: 15px; font-weight: 600; color: #f2f3f5; margin-bottom: 7px; line-height: 1.35; }
.embed-desc { font-size: 13.5px; color: #dbdee1; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.embed-desc strong { font-weight: 700; color: #f2f3f5; }
.embed-fields { display: grid; gap: 9px; margin-top: 9px; }
.embed-fields.inline { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.embed-field-name { font-size: 13px; font-weight: 600; color: #f2f3f5; margin-bottom: 2px; }
.embed-field-value { font-size: 13px; color: #dbdee1; line-height: 1.45; }
.embed-image { width: 100%; border-radius: 4px; margin-top: 12px; }
.embed-thumb { width: 72px; height: 72px; border-radius: 4px; object-fit: cover; float: right; margin-left: 12px; }
.embed-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 11.5px; color: #949ba4; }

/* ---- Chat IA ---- */
.chat { display: flex; flex-direction: column; height: 100%; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.bubble { max-width: 78%; font-size: 13px; line-height: 1.62; }
.bubble.me {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  padding: 9px 13px;
  border-radius: var(--r-lg) var(--r-lg) 4px var(--r-lg);
}
.bubble.ai { align-self: flex-start; max-width: 88%; }
.bubble-head { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.bubble-body {
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  padding: 12px 14px;
  border-radius: 4px var(--r-lg) var(--r-lg) var(--r-lg);
}
.bubble-body > *:first-child { margin-top: 0; }
.bubble-body > *:last-child { margin-bottom: 0; }
.bubble-body p { margin: 7px 0; }
.bubble-body h1, .bubble-body h2, .bubble-body h3 { margin: 13px 0 6px; font-size: 13.5px; color: var(--accent-hi); }
.bubble-body ul, .bubble-body ol { margin: 7px 0 7px 18px; }
.bubble-body li { margin: 3px 0; }
.bubble-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  background: var(--bg-0);
  padding: 1.5px 5px;
  border-radius: 4px;
  border: 1px solid var(--line-1);
}
.bubble-body pre {
  background: var(--bg-0);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  padding: 12px;
  overflow-x: auto;
  margin: 9px 0;
}
.bubble-body pre code { background: none; border: none; padding: 0; font-size: 11.5px; line-height: 1.6; }
.bubble-body a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.bubble-body table { width: 100%; border-collapse: collapse; margin: 9px 0; font-size: 12px; }
.bubble-body th, .bubble-body td { border: 1px solid var(--line-2); padding: 6px 9px; text-align: left; }
.bubble-body th { background: var(--bg-3); font-weight: 600; }

.chat-compose { border-top: 1px solid var(--line-1); padding: 13px 16px; flex-shrink: 0; }
.chat-input-wrap { display: flex; gap: 9px; align-items: flex-end; }
.chat-input {
  flex: 1;
  resize: none;
  max-height: 140px;
  min-height: 38px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 9px 12px;
  font-size: 13px;
  line-height: 1.5;
}
.chat-input:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-lo); }

.typing { display: flex; gap: 4px; padding: 4px 0; }
.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fg-3);
  animation: bounce 1.1s infinite;
}
.typing i:nth-child(2) { animation-delay: 0.16s; }
.typing i:nth-child(3) { animation-delay: 0.32s; }
@keyframes bounce {
  0%, 60%, 100% { transform: none; opacity: 0.45; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* ---- Bandeau non connecté ---- */
.gate {
  height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.gate-card {
  width: min(390px, 100%);
  text-align: center;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: 36px 30px;
  box-shadow: var(--sh-3);
}
.gate-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--accent), var(--brand-deep));
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  font-weight: 800;
  font-size: 21px;
  color: #fff;
  box-shadow: 0 8px 26px rgba(229, 72, 77, 0.3);
}

/* ---- Divers ---- */
.sep { height: 1px; background: var(--line-1); margin: 16px 0; }
.scrollable { overflow-y: auto; }
.banner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.banner-opt {
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  overflow: hidden;
  aspect-ratio: 16 / 7;
  background: var(--bg-2);
  transition: border-color 0.13s var(--ease);
}
.banner-opt img { width: 100%; height: 100%; object-fit: cover; }
.banner-opt:hover { border-color: var(--line-3); }
.banner-opt.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-lo); }

.notes-area {
  min-height: 190px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.65;
}

/* ---- Grille de permissions ---- */
.matrix-wrap { overflow-x: auto; }
.matrix { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 900px; }
.matrix th, .matrix td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-1);
  text-align: center;
  vertical-align: middle;
  font-size: 12px;
}
.matrix thead th {
  position: sticky;
  top: 0;
  background: var(--bg-1);
  z-index: 2;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-3);
  line-height: 1.35;
  padding-bottom: 11px;
}
.matrix th:first-child, .matrix td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: var(--bg-1);
  z-index: 1;
  min-width: 230px;
  border-right: 1px solid var(--line-1);
}
.matrix thead th:first-child { z-index: 3; }
.matrix tbody tr:hover td { background: var(--bg-2); }
.matrix tbody tr.locked td { opacity: 0.72; }
.matrix tbody tr.inactive td:first-child .role-name { color: var(--fg-3); }
.matrix input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
}
.matrix input[type="checkbox"]:disabled { cursor: not-allowed; }
.role-name { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.role-swatch { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.role-meta { font-size: 10.5px; color: var(--fg-3); margin-top: 2px; padding-left: 17px; }
.matrix .row-tools { display: flex; gap: 4px; justify-content: center; }
.link-btn { font-size: 10.5px; color: var(--fg-3); text-decoration: underline; text-underline-offset: 2px; }
.link-btn:hover { color: var(--fg-1); }

/* ---- Organigramme (arbre à connecteurs) ---- */
.tree-wrap { overflow-x: auto; padding: 6px 4px 10px; }
.tree {
  --tree: rgba(255, 255, 255, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: max-content;
  margin: 0 auto;
}
.tree-row { display: flex; justify-content: center; align-items: flex-start; }

/* Lien vertical entre deux niveaux, avec étiquette optionnelle */
.tree-link {
  position: relative;
  width: 2px;
  height: 34px;
  background: var(--tree);
}
.tree-link .tree-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 3px 9px;
  border-radius: var(--r-full);
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-2);
  white-space: nowrap;
}

/* Un nœud = zone haute (connecteur) + carte + zone basse (connecteur) */
.tn {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 236px;
  padding: 0 8px;
  position: relative;
}
.tn-top, .tn-bot { position: relative; width: 100%; height: 26px; }

/* Technique des demi-segments : chaque nœud dessine sa moitié de barre + sa tige. */
.tn-top::before, .tn-top::after, .tn-bot::before, .tn-bot::after {
  content: '';
  position: absolute;
  width: 50%;
  height: 100%;
  box-sizing: border-box;
}
.tn-top::before { top: 0; right: 50%; border-top: 2px solid var(--tree); }
.tn-top::after  { top: 0; left: 50%; border-top: 2px solid var(--tree); border-left: 2px solid var(--tree); }
.tn:first-child > .tn-top::before { border-top-color: transparent; }
.tn:first-child > .tn-top::after  { border-top-left-radius: 10px; }
.tn:last-child  > .tn-top::before { border-right: 2px solid var(--tree); border-top-right-radius: 10px; }
.tn:last-child  > .tn-top::after  { border-top-color: transparent; border-left-color: transparent; }
.tn:only-child  > .tn-top::before { border-top-color: transparent; border-right-color: transparent; border-radius: 0; }
.tn:only-child  > .tn-top::after  { border-top-color: transparent; border-left-color: var(--tree); border-radius: 0; }

.tn-bot::before { bottom: 0; right: 50%; border-bottom: 2px solid var(--tree); }
.tn-bot::after  { bottom: 0; left: 50%; border-bottom: 2px solid var(--tree); border-left: 2px solid var(--tree); }
.tn:first-child > .tn-bot::before { border-bottom-color: transparent; }
.tn:first-child > .tn-bot::after  { border-bottom-left-radius: 10px; }
.tn:last-child  > .tn-bot::before { border-right: 2px solid var(--tree); border-bottom-right-radius: 10px; }
.tn:last-child  > .tn-bot::after  { border-bottom-color: transparent; border-left-color: transparent; }
.tn:only-child  > .tn-bot::before { border-bottom-color: transparent; border-right-color: transparent; border-radius: 0; }
.tn:only-child  > .tn-bot::after  { border-bottom-color: transparent; border-left-color: var(--tree); border-radius: 0; }

/* Carte de grade */
.tn-card {
  --role: #6a6a74;
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 14px 14px 13px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--sh-1);
  transition: transform 0.16s var(--ease), border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.tn-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--role);
}
.tn-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 50% -20%, color-mix(in srgb, var(--role) 22%, transparent), transparent 60%);
  pointer-events: none;
}
.tn-card:hover { transform: translateY(-2px); border-color: var(--line-3); box-shadow: var(--sh-2); }
.tn-card.root {
  border-color: color-mix(in srgb, var(--role) 55%, var(--line-2));
  box-shadow: 0 14px 34px -14px color-mix(in srgb, var(--role) 70%, transparent);
}
.tn-card > * { position: relative; z-index: 1; }
.tn-name { font-weight: 700; font-size: 13px; letter-spacing: -0.01em; line-height: 1.3; }
.tn-card.root .tn-name { font-size: 14.5px; }
.tn-count { font-size: 10.5px; color: var(--fg-3); margin-top: 3px; font-variant-numeric: tabular-nums; }

.tn-avatars { display: flex; justify-content: center; margin-top: 11px; }
.tn-avatars img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--bg-1);
  background: var(--bg-3);
  margin-left: -8px;
  object-fit: cover;
}
.tn-avatars img:first-child { margin-left: 0; }
.tn-avatars .more {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--bg-1);
  background: var(--bg-4);
  margin-left: -8px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--fg-2);
}
.tn-names { font-size: 11.5px; color: var(--fg-2); margin-top: 7px; line-height: 1.45; }
.tn-vacant {
  margin-top: 11px;
  font-size: 11px;
  color: var(--fg-3);
  font-style: italic;
  padding: 6px 0;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-sm);
}

/* Éditeur */
.org-edit-level {
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  padding: 13px 14px;
}
.org-edit-level + .org-edit-level { margin-top: 10px; }
.org-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.org-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 27px;
  padding: 0 6px 0 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  font-size: 12px;
  font-weight: 550;
}
.org-chip .icon-btn { width: 20px; height: 20px; }
.org-chip .icon-btn svg { width: 12px; height: 12px; }

/* --------------------------------------------------------------------------
   8. RESPONSIVE
   -------------------------------------------------------------------------- */
.mobile-only { display: none; }

@media (max-width: 1280px) {
  .g-main { grid-template-columns: minmax(0, 1fr); }
  .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .board { grid-template-columns: repeat(2, minmax(240px, 1fr)); }
}

@media (max-width: 980px) {
  .g4, .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-side { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .mobile-only { display: inline-flex; }
  .tn { width: 200px; }
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 258px;
    z-index: 250;
    transform: translateX(-100%);
    transition: transform 0.24s var(--ease);
  }
  .sidebar.open { transform: none; }
  .g2, .g3, .g4, .g5 { grid-template-columns: minmax(0, 1fr); }
  .board { grid-template-columns: minmax(0, 1fr); }
  .column { max-height: none; }
  .drawer { width: 100vw; }
  .toasts { left: 16px; right: 16px; bottom: 16px; }
  .toast { min-width: 0; max-width: none; }
}
