/* ==========================================================================
   NEURA — Design system
   Palette : encre profonde + accent ambre/électrique (anti "AI purple")
   ========================================================================== */

:root {
  --bg: #0B0E14;
  --bg-2: #0F131C;
  --surface: #151A25;
  --surface-2: #1B2130;
  --line: #232B3A;
  --line-soft: #1C2330;
  --text: #EDF0F6;
  --text-dim: #A3AEBF;
  --text-mute: #6E7991;
  --accent: #FFB020;
  --accent-deep: #E09000;
  --accent-ink: #1A1204;
  --good: #34D399;
  --warn: #FBBF24;
  --bad: #F87171;
  --info: #60A5FA;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.85);
  --shadow-lift: 0 26px 60px -26px rgba(0, 0, 0, 0.95);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: 'Sora', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, strong { font-family: 'Space Grotesk', sans-serif; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }

/* ---------- Fond aurora ---------- */
.aurora {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.aurora .blob {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5;
}
.b1 { width: 520px; height: 520px; background: #3a2a06; top: -180px; left: -120px; }
.b2 { width: 460px; height: 460px; background: #10243a; bottom: -200px; right: 8%; }
.b3 { width: 380px; height: 380px; background: #2a1c0a; top: 42%; right: 30%; opacity: .32; }

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.sidebar {
  position: relative; z-index: 3;
  width: 274px; flex: 0 0 274px;
  background: linear-gradient(180deg, rgba(21,26,37,.94), rgba(11,14,20,.98));
  border-right: 1px solid var(--line-soft);
  padding: 24px 18px;
  display: flex; flex-direction: column; gap: 26px;
  backdrop-filter: blur(14px);
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px;
  background: linear-gradient(145deg, var(--accent), var(--accent-deep));
  color: var(--accent-ink);
  display: grid; place-items: center;
  font-family: 'Space Grotesk'; font-weight: 700; font-size: 1.25rem;
  box-shadow: 0 10px 24px -10px rgba(255,176,32,.65);
}
.brand-txt strong { display: block; font-size: 1.06rem; letter-spacing: -.01em; }
.brand-txt span { font-size: .68rem; color: var(--text-mute); line-height: 1.35; display: block; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px; border-radius: var(--r-sm);
  color: var(--text-dim); font-size: .88rem; font-weight: 400;
  transition: background .25s var(--ease), color .25s var(--ease), transform .18s var(--ease);
  text-align: left; width: 100%;
}
.nav-item i { display: grid; place-items: center; width: 18px; height: 18px; }
.nav-item svg { width: 17px; height: 17px; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item:active { transform: scale(.98); }
.nav-item.is-active {
  background: linear-gradient(90deg, rgba(255,176,32,.16), rgba(255,176,32,.03));
  color: var(--accent); font-weight: 500;
  box-shadow: inset 2px 0 0 var(--accent);
}

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.side-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 15px 16px;
  display: flex; flex-direction: column; gap: 3px;
}
.side-card-lbl { font-size: .67rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-mute); }
.side-card strong { font-size: 1.5rem; color: var(--accent); line-height: 1.1; }
.side-card-sub { font-size: .72rem; color: var(--text-dim); }
.side-note { font-size: .66rem; color: var(--text-mute); line-height: 1.5; }

/* ==========================================================================
   MAIN + TOPBAR
   ========================================================================== */
.main { flex: 1; display: flex; flex-direction: column; position: relative; z-index: 2; min-width: 0; }

.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 30px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(11,14,20,.7);
  backdrop-filter: blur(16px);
  flex-shrink: 0;
}
.topbar-title h1 { font-size: 1.32rem; letter-spacing: -.02em; }
.topbar-title p { font-size: .76rem; color: var(--text-mute); margin-top: 2px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.search-wrap {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 0 15px; height: 42px;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.search-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,176,32,.13); }
.search-wrap i { display: grid; place-items: center; color: var(--text-mute); }
.search-wrap svg { width: 15px; height: 15px; }
.search-wrap input {
  background: none; border: none; outline: none; width: 210px; font-size: .84rem;
}
.search-wrap input::placeholder { color: var(--text-mute); }

.burger { display: none; flex-direction: column; gap: 4px; padding: 8px; }
.burger span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: var(--r-pill);
  font-size: .84rem; font-weight: 500;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease),
              background .25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
}
.btn i { display: grid; place-items: center; }
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(140deg, var(--accent), var(--accent-deep));
  color: var(--accent-ink); font-weight: 600;
  box-shadow: 0 12px 26px -12px rgba(255,176,32,.7);
}
.btn-primary:hover { box-shadow: 0 16px 34px -12px rgba(255,176,32,.85); }
.btn-ghost { border: 1px solid var(--line); color: var(--text-dim); background: var(--surface); }
.btn-ghost:hover { color: var(--text); border-color: var(--text-mute); }
.btn-danger { background: rgba(248,113,113,.14); color: var(--bad); border: 1px solid rgba(248,113,113,.3); }
.btn-danger:hover { background: rgba(248,113,113,.22); }
.btn-sm { height: 34px; padding: 0 13px; font-size: .77rem; }

.icon-btn {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text-mute);
  transition: background .22s var(--ease), color .22s var(--ease), transform .18s var(--ease);
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.danger:hover { background: rgba(248,113,113,.14); color: var(--bad); }

/* ==========================================================================
   ZONE DE CONTENU
   ========================================================================== */
.scroll-area { flex: 1; overflow-y: auto; padding: 26px 30px 70px; }
.scroll-area::-webkit-scrollbar { width: 9px; }
.scroll-area::-webkit-scrollbar-thumb { background: var(--line); border-radius: 9px; border: 3px solid var(--bg); }

.view { display: none; }
.view.is-active { display: block; animation: fadeUp .42s var(--ease); }

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

/* ---------- KPI ---------- */
.kpi-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 22px;
}
.kpi {
  position: relative;
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 19px 20px 17px;
  display: flex; flex-direction: column; gap: 6px;
  overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.kpi::after {
  content: ''; position: absolute; top: 0; left: 20px; right: 20px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,176,32,.5), transparent);
}
.kpi:hover { transform: translateY(-3px); border-color: #2E3850; box-shadow: var(--shadow-lift); }
.kpi-lbl { font-size: .715rem; color: var(--text-mute); letter-spacing: .01em; }
.kpi-val { font-size: 1.72rem; letter-spacing: -.03em; line-height: 1.15; }
.kpi:first-child .kpi-val { color: var(--accent); }
.kpi-sub {
  display: flex; align-items: center; gap: 6px;
  font-size: .7rem; color: var(--text-dim); margin-top: 3px;
}
.kpi-sub i { display: grid; place-items: center; color: var(--text-mute); }
.kpi-sub svg { width: 12px; height: 12px; }

/* ---------- Panels ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  margin-bottom: 20px;
}
.panel-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 18px;
}
.panel-head h2 { font-size: 1rem; letter-spacing: -.01em; }
.panel-head p { font-size: .72rem; color: var(--text-mute); margin-top: 3px; }
.panel-intro { text-align: left; }
.panel-intro h2 { font-size: 1.12rem; margin-bottom: 6px; }
.panel-intro p { font-size: .82rem; color: var(--text-dim); }

.split { display: grid; grid-template-columns: 1.45fr 1fr; gap: 16px; align-items: start; }
.split .panel { margin-bottom: 20px; }

/* ---------- Graphique ---------- */
.chart { display: flex; align-items: flex-end; gap: 10px; height: 216px; padding-top: 14px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 9px; height: 100%; justify-content: flex-end; }
.bar-track { width: 100%; height: 100%; display: flex; align-items: flex-end; }
.bar {
  width: 100%; border-radius: 9px 9px 4px 4px;
  background: linear-gradient(180deg, var(--accent), rgba(224,144,0,.28));
  min-height: 4px; position: relative;
  transform-origin: bottom;
  animation: grow .7s var(--ease) backwards;
  transition: filter .25s var(--ease);
}
.bar:hover { filter: brightness(1.18); }
.bar.is-zero { background: var(--line); }
@keyframes grow { from { transform: scaleY(0); opacity: .3; } to { transform: scaleY(1); opacity: 1; } }
.bar-col span { font-size: .68rem; color: var(--text-mute); }
.bar-val { font-size: .63rem; color: var(--text-dim); font-family: 'Space Grotesk'; }

/* ---------- Feed ---------- */
.feed { list-style: none; display: flex; flex-direction: column; }
.feed li {
  display: flex; gap: 12px; padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
  animation: fadeUp .45s var(--ease) backwards;
}
.feed li:last-child { border-bottom: none; }
.feed-dot {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--accent);
}
.feed-dot svg { width: 15px; height: 15px; }
.feed-dot.is-projet { color: var(--info); }
.feed-txt { min-width: 0; }
.feed-txt strong {
  display: block; font-size: .82rem; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.feed-txt span { font-size: .72rem; color: var(--text-mute); }
.feed-date { margin-left: auto; font-size: .66rem; color: var(--text-mute); white-space: nowrap; }

/* ---------- Watch (projets à surveiller) ---------- */
.watch { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 13px; }
.watch-item {
  background: var(--surface-2); border: 1px solid var(--line-soft);
  border-radius: var(--r-md); padding: 14px 15px;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.watch-item:hover { transform: translateY(-2px); border-color: #333D53; }
.watch-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.watch-top strong { font-size: .84rem; }
.watch-client { font-size: .7rem; color: var(--text-mute); }
.progress { height: 6px; background: var(--line); border-radius: 6px; overflow: hidden; }
.progress i {
  display: block; height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  transition: width .8s var(--ease);
}
.watch-foot { display: flex; justify-content: space-between; font-size: .68rem; color: var(--text-mute); }

/* ---------- Toolbar / filtres ---------- */
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 18px; flex-wrap: wrap;
}
.filters { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  height: 34px; padding: 0 15px; border-radius: var(--r-pill);
  border: 1px solid var(--line); color: var(--text-dim);
  font-size: .78rem; background: var(--surface);
  transition: all .22s var(--ease);
}
.chip:hover { color: var(--text); border-color: #384357; }
.chip:active { transform: scale(.96); }
.chip.is-active {
  background: var(--accent); color: var(--accent-ink);
  border-color: var(--accent); font-weight: 600;
}
.count { font-size: .76rem; color: var(--text-mute); }

/* ---------- Cartes ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(292px, 1fr)); gap: 14px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  display: flex; flex-direction: column; gap: 13px;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
  animation: fadeUp .4s var(--ease) backwards;
}
.card:hover { transform: translateY(-3px); border-color: #343F55; box-shadow: var(--shadow-lift); }

.card-top { display: flex; align-items: flex-start; gap: 12px; }
.avatar {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 13px;
  display: grid; place-items: center;
  font-family: 'Space Grotesk'; font-weight: 600; font-size: .95rem;
  background: var(--surface-2); color: var(--accent); border: 1px solid var(--line);
}
.card-head-txt { min-width: 0; flex: 1; }
.card-head-txt strong { display: block; font-size: .93rem; letter-spacing: -.01em; }
.card-head-txt span { font-size: .73rem; color: var(--text-mute); }
.card-actions { display: flex; gap: 2px; margin-left: auto; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--r-pill);
  font-size: .67rem; font-weight: 500; letter-spacing: .02em;
  border: 1px solid transparent; white-space: nowrap;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.b-prospect { background: rgba(96,165,250,.1); color: var(--info); border-color: rgba(96,165,250,.24); }
.b-actif, .b-production { background: rgba(52,211,153,.1); color: var(--good); border-color: rgba(52,211,153,.24); }
.b-client, .b-developpement { background: rgba(255,176,32,.11); color: var(--accent); border-color: rgba(255,176,32,.26); }
.b-cadrage, .b-brouillon { background: rgba(163,174,191,.09); color: var(--text-dim); border-color: var(--line); }
.b-envoyé { background: rgba(96,165,250,.1); color: var(--info); border-color: rgba(96,165,250,.24); }
.b-accepté { background: rgba(255,176,32,.11); color: var(--accent); border-color: rgba(255,176,32,.26); }
.b-payé, .b-livré { background: rgba(52,211,153,.1); color: var(--good); border-color: rgba(52,211,153,.24); }
.b-late { background: rgba(248,113,113,.1); color: var(--bad); border-color: rgba(248,113,113,.26); }

.card-rows { display: flex; flex-direction: column; gap: 7px; }
.row { display: flex; align-items: center; gap: 9px; font-size: .775rem; color: var(--text-dim); }
.row i { display: grid; place-items: center; color: var(--text-mute); flex: 0 0 15px; }
.row svg { width: 14px; height: 14px; }
.row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.card-note {
  font-size: .75rem; color: var(--text-mute); line-height: 1.55;
  padding-top: 11px; border-top: 1px solid var(--line-soft);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding-top: 12px; border-top: 1px solid var(--line-soft);
}
.money { font-family: 'Space Grotesk'; font-size: .95rem; font-weight: 500; color: var(--accent); }

/* ---------- Table devis ---------- */
.table-wrap {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
}
.table { width: 100%; border-collapse: collapse; }
.table thead th {
  text-align: left; font-family: 'Space Grotesk'; font-size: .68rem;
  text-transform: uppercase; letter-spacing: .09em; color: var(--text-mute);
  padding: 14px 16px; background: var(--bg-2); border-bottom: 1px solid var(--line);
  font-weight: 500;
}
.table th.num, .table td.num { text-align: right; font-family: 'Space Grotesk'; }
.table tbody td {
  padding: 14px 16px; font-size: .82rem; color: var(--text-dim);
  border-bottom: 1px solid var(--line-soft);
}
.table tbody tr { transition: background .22s var(--ease); animation: fadeUp .35s var(--ease) backwards; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: none; }
.table td strong { color: var(--text); font-weight: 500; font-size: .83rem; }
.table td.num { color: var(--text); }
.td-actions { display: flex; gap: 2px; justify-content: flex-end; }

/* ---------- Empty state ---------- */
.empty {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 60px 24px; text-align: center;
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r-lg);
}
.empty-ico {
  width: 56px; height: 56px; border-radius: 18px;
  display: grid; place-items: center; background: var(--surface-2); color: var(--text-mute);
}
.empty-ico svg { width: 24px; height: 24px; }
.empty h3 { font-size: .98rem; }
.empty p { font-size: .8rem; color: var(--text-mute); max-width: 340px; }

/* ---------- Skeleton ---------- */
.skel {
  height: 156px; border-radius: var(--r-lg);
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.4s infinite linear;
}
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* ==========================================================================
   MODALE
   ========================================================================== */
.modal-backdrop, .confirm-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(5, 7, 11, .78);
  backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-backdrop.is-open, .confirm-backdrop.is-open { display: flex; animation: fade .22s var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: 100%; max-width: 560px; max-height: 90dvh;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lift);
  display: flex; flex-direction: column;
  animation: pop .34s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: none; } }

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 19px 22px; border-bottom: 1px solid var(--line-soft);
}
.modal-head h2 { font-size: 1.04rem; }
.modal-body { padding: 20px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; }
.modal-foot {
  padding: 16px 22px; border-top: 1px solid var(--line-soft);
  display: flex; justify-content: flex-end; gap: 10px;
}

.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: .735rem; color: var(--text-dim); font-weight: 500; letter-spacing: .01em; }
.field input, .field select, .field textarea {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 11px 13px; font-size: .85rem;
  outline: none; width: 100%;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,176,32,.12);
}
.field textarea { resize: vertical; min-height: 78px; font-family: inherit; }
.field select { appearance: none; cursor: pointer; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field-err { font-size: .7rem; color: var(--bad); display: none; }
.field.has-err input, .field.has-err select, .field.has-err textarea { border-color: var(--bad); }
.field.has-err .field-err { display: block; }

.range-row { display: flex; align-items: center; gap: 14px; }
.range-row input[type=range] { flex: 1; accent-color: var(--accent); }
.range-out {
  font-family: 'Space Grotesk'; font-size: .9rem; color: var(--accent);
  min-width: 48px; text-align: right;
}

.recap {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px; font-size: .8rem;
}
.recap-line { display: flex; justify-content: space-between; color: var(--text-dim); }
.recap-line.total {
  border-top: 1px solid var(--line); padding-top: 9px; margin-top: 3px;
  color: var(--accent); font-family: 'Space Grotesk'; font-size: .95rem; font-weight: 600;
}

/* ---------- Confirmation ---------- */
.confirm {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 26px; max-width: 420px; width: 100%;
  display: flex; flex-direction: column; gap: 11px;
  animation: pop .3s var(--ease);
}
.confirm h3 { font-size: 1.04rem; }
.confirm p { font-size: .83rem; color: var(--text-dim); line-height: 1.55; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 9px; }

/* ---------- Toasts ---------- */
.toasts {
  position: fixed; bottom: 22px; right: 22px; z-index: 120;
  display: flex; flex-direction: column; gap: 9px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-left: 3px solid var(--good);
  border-radius: var(--r-sm); padding: 12px 16px;
  font-size: .8rem; box-shadow: var(--shadow-lift);
  animation: slideIn .34s var(--ease);
  max-width: 320px;
}
.toast.is-err { border-left-color: var(--bad); }
.toast i { display: grid; place-items: center; color: var(--good); }
.toast.is-err i { color: var(--bad); }
.toast svg { width: 15px; height: 15px; }
@keyframes slideIn { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
.toast.is-out { animation: slideOut .3s var(--ease) forwards; }
@keyframes slideOut { to { opacity: 0; transform: translateX(26px); } }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 80;
    transform: translateX(-100%);
    transition: transform .38s var(--ease);
    box-shadow: var(--shadow-lift);
  }
  .sidebar.is-open { transform: none; }
  .burger { display: flex; }
  .main { width: 100%; }
  .search-wrap { display: none; }
  .topbar { padding: 14px 18px; }
  .scroll-area { padding: 18px 18px 70px; }
  .topbar-title h1 { font-size: 1.14rem; }
}

@media (max-width: 680px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .search-wrap { display: none; }
  .card-grid { grid-template-columns: 1fr; }
  .watch { grid-template-columns: 1fr; }
  .table thead th:nth-child(3), .table tbody td:nth-child(3),
  .table thead th:nth-child(6), .table tbody td:nth-child(6) { display: none; }
  #quick-add span { display: none; }
  #quick-add { padding: 0 14px; }
  .toasts { left: 18px; right: 18px; bottom: 18px; }
  .toast { max-width: none; }
  .field-row { grid-template-columns: 1fr; }
  .chart { height: 176px; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
