/* =====================================================================
   Ash Kopion Bank — couleurs de la corpo :
   rouge #A01212 · noir #161616 · ardoise #1E2A33 · olive #4A5A32 · flamme #E25822
   Deux thèmes : sombre (par défaut) et clair. Toutes les couleurs passent par ces variables.
   ===================================================================== */
:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0d0d;
  --bg2: #121212;
  --card: #161616;            /* noir Ash Kopion */
  --card2: #1E2A33;           /* ardoise */
  --line: #262626;
  --hair: rgba(255, 255, 255, .05);
  --hover: rgba(255, 255, 255, .035);
  --text: #f2eeec;
  --muted: #8f8a88;
  --accent: #A01212;          /* rouge Ash Kopion */
  --accent-ink: #ffffff;      /* texte posé sur l'accent */
  --accent-soft: rgba(226, 88, 34, .14);
  --accent2: #E25822;         /* flamme : liens, icônes, montants clés */
  --pos: #9cb46a;             /* olive #4A5A32 éclairci pour rester lisible sur noir */
  --neg: #ff5a4f;
  --warn: #f0a640;
  --bar: #1E2A33;             /* barres « inactives » des graphiques */
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .7);
  --glass: rgba(13, 13, 13, .88);
  --card-grad: linear-gradient(160deg, rgba(255, 255, 255, .025), rgba(255, 255, 255, 0) 40%);
  --radius: 22px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eeebe8;
  --bg2: #f7f5f3;
  --card: #ffffff;
  --card2: #f1eeeb;
  --line: #e4dfdb;
  --hair: rgba(22, 22, 22, .07);
  --hover: rgba(22, 22, 22, .035);
  --text: #161616;
  --muted: #6f6a67;
  --accent: #A01212;
  --accent-ink: #ffffff;
  --accent-soft: rgba(226, 88, 34, .12);
  --accent2: #c2451a;         /* flamme assombrie pour le contraste sur blanc */
  --pos: #4A5A32;             /* olive Ash Kopion */
  --neg: #c81e1e;
  --warn: #b7720f;
  --bar: #d9dfe3;
  --shadow: 0 14px 34px -20px rgba(30, 42, 51, .35);
  --glass: rgba(255, 255, 255, .9);
  --card-grad: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background .2s, color .2s;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
h2 { font-size: 17px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.mt { margin-top: 16px; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.q-warn { color: var(--warn); }
.link { color: var(--accent2); font-weight: 600; font-size: 14px; }
.link:hover { text-decoration: underline; }
.ico { flex-shrink: 0; display: block; }

/* ---------- layout : rail d'icônes + barre du haut ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 92px; flex-shrink: 0; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 22px 10px;
  border-right: 1px solid var(--line); background: var(--card);
}
.brand { display: grid; place-items: center; }
.brand img { border-radius: 12px; }
.sidebar nav { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.sidebar nav a {
  display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px; border-radius: 16px;
  color: var(--muted); font-weight: 600; font-size: 11px; transition: .15s; text-align: center;
}
.sidebar nav a:hover { background: var(--hover); color: var(--text); }
.sidebar nav a.active { background: var(--accent); color: var(--accent-ink); }
.side-user { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.side-user form { margin: 0; }

.main { flex: 1; min-width: 0; min-height: 100vh; max-width: 1360px; margin: 0 auto; padding: 22px 32px 60px;
  display: flex; flex-direction: column; gap: 20px; }
.topbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.topbar-title { flex: 1; min-width: 200px; }
.topbar-title h1 { font-size: 26px; font-weight: 700; }
.topbar-title p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.topbar-tools { display: flex; align-items: center; gap: 10px; }
.top-search { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line);
  border-radius: 99px; padding: 0 14px; color: var(--muted); width: 260px; }
.top-search input { border: 0; background: none; padding: 10px 0; font-size: 14px; }
.top-search:focus-within { border-color: var(--accent2); }
.round-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); color: var(--text); transition: .15s; }
.round-btn:hover { border-color: var(--accent2); }
.me { display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border-radius: 99px;
  background: var(--card); border: 1px solid var(--line); }
.me b { display: block; font-size: 13.5px; line-height: 1.1; }
.me small { color: var(--muted); font-size: 11.5px; }
.theme-dark-only { display: none; }
:root[data-theme="light"] .theme-dark-only { display: block; }
:root[data-theme="light"] .theme-light-only { display: none; }
@media (max-width: 760px) { .top-search, .me > span:not(.avatar) { display: none; } .me { padding: 4px; } .topbar-title h1 { font-size: 22px; } }

.bottomnav { display: none; }
@media (max-width: 860px) {
  .sidebar { display: none; }
  .main { padding: 16px 16px 110px; gap: 16px; }
  .bottomnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--glass); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  }
  .bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); font-weight: 600; }
  .bottomnav a.active { color: var(--accent2); }
}

/* ---------- composants ---------- */
.card { background: var(--card); background-image: var(--card-grad); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; min-width: 0; box-shadow: var(--shadow); }
.grid2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.grid-asset { grid-template-columns: 1.6fr 1fr; }
@media (max-width: 960px) { .grid2, .grid-asset { grid-template-columns: 1fr; gap: 16px; } }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; }
.sub-title { font-size: 14px; margin: 20px 0 10px; color: var(--muted); font-weight: 600; }
.empty { color: var(--muted); text-align: center; padding: 18px 0; margin: 0; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: 14px; align-self: flex-start; }
.back:hover { color: var(--text); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.trow .tmain > span .stock { display: inline-block; margin-top: 3px; }

.hero { text-align: center; padding: 6px 0 0; }
.big-amount { font-size: clamp(34px, 6vw, 52px); font-weight: 800; letter-spacing: -.035em; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.big-amount span { font-size: .4em; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.hero-sub { display: flex; gap: 8px 18px; justify-content: center; flex-wrap: wrap; margin: 0 0 6px; font-size: 14px; }
.hero-sub b { margin-left: 4px; }

.actions { display: flex; justify-content: center; gap: 22px; margin-top: 16px; flex-wrap: wrap; }
.action { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.action span {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--line); color: var(--text); transition: .15s;
}
.action:hover span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: translateY(-2px); }
.action:hover { color: var(--text); }

/* pastille de variation (+40 %) */
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px;
  color: var(--pos); background: color-mix(in srgb, var(--pos) 13%, transparent); border: 1px solid color-mix(in srgb, var(--pos) 35%, transparent); }
.delta.down { color: var(--neg); background: color-mix(in srgb, var(--neg) 12%, transparent); border-color: color-mix(in srgb, var(--neg) 35%, transparent); }
.delta.flat { color: var(--muted); background: var(--card2); border-color: var(--line); }

/* ---------- tableau de bord ---------- */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.dash-main, .dash-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
@media (max-width: 1180px) { .dash { grid-template-columns: 1fr; } }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .stat-row { grid-template-columns: 1fr; gap: 10px; }
  .stat-row .stat { gap: 8px; padding: 14px 16px; }
  .stat-row .stat-ico { width: 34px; height: 34px; }
}
@media (max-width: 640px) {
  .dtable { table-layout: fixed; }
  .dtable th:nth-child(2), .dtable td:nth-child(2), .dtable th:nth-child(3), .dtable td:nth-child(3),
  .dtable th:nth-child(5), .dtable td:nth-child(5) { display: none; }
  .dtable th:nth-child(4) { border-radius: 0 12px 12px 0; width: 50%; }
  .dtable td, .dtable th { padding: 10px 6px; }
  .dtable td:first-child { overflow: hidden; }
  .dtable .op { min-width: 0; }
  .dtable .op span:last-child { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dtable .op .tx-ico { display: none; }
}
.stat { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.stat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 600; font-size: 14.5px; }
.stat-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent2); }
.stat-body { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.stat-body b { font-size: clamp(19px, 1.7vw, 24px); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-body small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.stat-body small a:hover { color: var(--text); text-decoration: underline; }
.stat-body > div b { display: block; }

.balance-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.balance-head h2 { font-size: 16px; font-weight: 600; color: var(--muted); }
.balance-amount { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.balance-amount b { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.chart-box.bars { height: 300px; }

.pill-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--card2); border: 1px solid var(--line); border-radius: 99px; }
.pill-tabs button, .pill-tabs a { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted);
  padding: 6px 14px; border-radius: 99px; cursor: pointer; }
.pill-tabs .on { background: var(--accent); color: var(--accent-ink); }

/* donut + objectifs */
.donut-wrap { position: relative; width: 190px; height: 190px; margin: 4px auto 10px; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut-center small { color: var(--muted); font-size: 12.5px; }
.donut-center b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.split-list { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.split-list li { display: flex; align-items: center; gap: 8px; }
.split-list li span:nth-child(2) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.split-list { list-style: none; margin: 0; padding: 0; }
.split-list i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.goal { display: flex; flex-direction: column; gap: 6px; }
.goal + .goal { margin-top: 14px; }
.goal-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.goal-top b { font-variant-numeric: tabular-nums; }
.goal-top small { color: var(--muted); }
.goal-bar { position: relative; height: 22px; border-radius: 99px; background: var(--card2); border: 1px solid var(--line); overflow: hidden; }
.goal-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--c, var(--accent));
  background-image: radial-gradient(circle, rgba(255, 255, 255, .35) 1.2px, transparent 1.6px); background-size: 24px 100%; }
.goal-bar em { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800; }

/* cartes bancaires empilées */
.bank-stack { display: flex; flex-direction: column; }
.bank-card { position: relative; display: block; border-radius: 20px; padding: 16px 18px; color: #f7f1ee; overflow: hidden;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 35%, #0a0a0a));
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .6); transition: transform .15s; }
.bank-card + .bank-card { margin-top: -78px; }
.bank-card:hover { transform: translateY(-6px); z-index: 2; }
.bank-card:last-child { min-height: 168px; }
.bank-card::after { content: ""; position: absolute; right: -50px; top: -60px; width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255, 255, 255, .08); }
.bank-card .bc-top { display: flex; justify-content: space-between; font-weight: 700; font-size: 14px; }
.bank-card .bc-top small { opacity: .8; font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
.bank-card .bc-chip { width: 38px; height: 28px; border-radius: 6px; margin: 30px 0 10px;
  background: linear-gradient(135deg, #f2d27a, #c99a35); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.bank-card .bc-amount { font-size: 24px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.bank-card .bc-foot { display: flex; justify-content: space-between; align-items: end; margin-top: 6px; font-size: 12px; opacity: .85; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }

/* contributeurs (avatars façon « quick transfer ») */
.people { display: flex; gap: 14px; flex-wrap: wrap; }
.people a { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); width: 64px; text-align: center; }
.people a b { color: var(--text); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.people span.nm { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* tableau des transactions */
.dtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.dtable th { text-align: left; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  padding: 10px 12px; background: var(--card2); }
.dtable th:first-child { border-radius: 12px 0 0 12px; }
.dtable th:last-child { border-radius: 0 12px 12px 0; }
.dtable td { padding: 12px; border-bottom: 1px solid var(--hair); white-space: nowrap; }
.dtable tr:last-child td { border-bottom: 0; }
.dtable tbody tr:hover td { background: var(--hover); }
.dtable .r { text-align: right; font-variant-numeric: tabular-nums; }
.dtable .op { display: flex; align-items: center; gap: 10px; white-space: normal; min-width: 200px; }
.dtable .op span:last-child { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.table-scroll { overflow-x: auto; }
.status { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px;
  background: color-mix(in srgb, var(--pos) 13%, transparent); color: var(--pos); border: 1px solid color-mix(in srgb, var(--pos) 32%, transparent); }
.status.out { background: color-mix(in srgb, var(--neg) 10%, transparent); color: var(--neg); border-color: color-mix(in srgb, var(--neg) 30%, transparent); }
.status.mid { background: var(--card2); color: var(--muted); border-color: var(--line); }

/* ---------- comptes ---------- */
.acc-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.acc-scroll::-webkit-scrollbar { height: 6px; }
.acc-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.acc-card {
  scroll-snap-align: start; position: relative; overflow: hidden; min-height: 150px; color: #f7f1ee;
  display: flex; flex-direction: column; padding: 18px; border-radius: var(--radius);
  background: linear-gradient(140deg, var(--c), color-mix(in srgb, var(--c) 30%, #0a0a0a));
  box-shadow: 0 10px 30px -16px var(--c); transition: transform .15s;
}
.acc-card::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255, 255, 255, .1);
}
a.acc-card:hover { transform: translateY(-3px); }
.acc-kind { font-size: 12px; font-weight: 600; opacity: .8; text-transform: uppercase; letter-spacing: .06em; }
.acc-name { font-weight: 700; font-size: 16px; margin-top: 2px; }
.acc-balance { margin-top: auto; font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.acc-balance small { font-size: 12px; opacity: .75; font-weight: 600; }
.acc-new { background: var(--card); border: 1.5px dashed var(--line); box-shadow: none; --c: var(--card); color: var(--text); }
.acc-new::after { display: none; }
.acc-new summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 100%; min-height: 112px; color: var(--muted); font-weight: 600; }
.acc-new summary::-webkit-details-marker { display: none; }
.acc-new[open] summary { display: none; }
.acc-new input, .acc-new select { padding: 9px 12px; }
.acc-hero {
  border-radius: 28px; padding: 26px; text-align: center; position: relative; overflow: hidden; color: #f7f1ee;
  background: linear-gradient(140deg, var(--c), color-mix(in srgb, var(--c) 25%, #0a0a0a));
}
.acc-hero h1 { font-size: 20px; margin-top: 4px; }
.acc-hero .big-amount span { color: rgba(255, 255, 255, .7); }
.acc-rate { margin: 0; font-size: 13px; opacity: .9; }

/* ---------- transactions (liste) ---------- */
.tx { display: flex; align-items: center; gap: 14px; padding: 11px 6px; border-radius: 14px; }
.tx + .tx { border-top: 1px solid var(--hair); }
.tx:hover { background: var(--hover); }
.tx-ico {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-size: 19px;
  background: color-mix(in srgb, var(--c) 20%, var(--card2));
}
.tx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tx-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-sub a:hover { color: var(--text); text-decoration: underline; }
.tx-amt { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tx-amt.neg { color: var(--text); }
.tx form { margin: 0; }

/* ---------- tables (marché, membres) ---------- */
.table { display: flex; flex-direction: column; }
.trow { display: flex; align-items: center; gap: 14px; padding: 12px 6px; border-radius: 14px; }
.trow + .trow { border-top: 1px solid var(--hair); }
a.trow:hover { background: var(--hover); }
.tmain { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tmain b, .tmain small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tright { display: flex; flex-direction: column; align-items: flex-end; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tright small { font-size: 12.5px; }
.ticker {
  display: inline-grid; place-items: center; min-width: 52px; height: 30px; padding: 0 8px; border-radius: 9px;
  background: var(--card2); border: 1px solid var(--line); font-weight: 800; font-size: 12px; letter-spacing: .04em;
}
.badge { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: color-mix(in srgb, currentColor 14%, transparent); }

.stats { display: flex; gap: 14px; flex-wrap: wrap; }
.stats > div { flex: 1; min-width: 120px; background: var(--card2); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.stats b { font-size: 18px; font-variant-numeric: tabular-nums; }
.cat-bars { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.cat-bar { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 13.5px; }
.cat-bar i { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--accent); }
.leader { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.leader li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.leader li span { flex: 1; }

.chart-box { position: relative; height: 260px; }
.chart-box.tall { height: 340px; }
.chart-box.short { height: 200px; }

.avatar {
  display: inline-grid; place-items: center; border-radius: 50%; flex-shrink: 0; font-weight: 800; color: #fff;
  background: linear-gradient(140deg, var(--av), color-mix(in srgb, var(--av) 35%, #000));
}
.avatar-img { object-fit: cover; background: var(--card2); border: 2px solid var(--line); }
.avatar-edit { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.avatar-edit form { margin: 0; }
.avatar-edit input[type=file] { display: none; }
.avatar-pick { position: relative; cursor: pointer; border-radius: 50%; }
.avatar-pick::after { content: "📷"; position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 14px; background: var(--accent); border: 3px solid var(--card); }
.avatar-pick:hover .avatar { filter: brightness(1.1); }

/* ---------- formulaires ---------- */
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px; outline: none; transition: border-color .15s;
}
input:focus, select:focus { border-color: var(--accent2); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; color: var(--muted); font-weight: 600; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: auto; accent-color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  font: inherit; font-weight: 700; padding: 12px 22px; border-radius: 99px; transition: .15s; color: var(--text);
}
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 22px -12px var(--accent); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost { background: var(--card); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent2); }
.btn-ghost.danger { color: var(--neg); }
.btn-ghost.danger:hover { border-color: var(--neg); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-block { width: 100%; }
.icon-btn {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  background: transparent; color: var(--muted); list-style: none;
}
.icon-btn:hover { background: var(--card2); color: var(--text); }
.icon-btn::-webkit-details-marker { display: none; }

.segmented { display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 4px; gap: 4px; }
.segmented a, .segmented label { flex: 1; text-align: center; }
.segmented a, .segmented label span { display: block; padding: 10px; border-radius: 99px; font-weight: 700; color: var(--muted); cursor: pointer; transition: .15s; }
.segmented a.active, .segmented input:checked + span { background: var(--accent); color: var(--accent-ink); }
.segmented input { display: none; }
.segmented input:disabled + span { opacity: .35; cursor: not-allowed; }
.segmented.small a, .segmented.small label span { padding: 8px; font-size: 14px; }

.op-wrap { max-width: 520px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.amount-input { display: flex; align-items: baseline; justify-content: center; gap: 10px; padding: 14px 0 0; }
.amount-input input {
  background: none; border: 0; padding: 0; text-align: right; font-size: 46px; font-weight: 800; letter-spacing: -.03em;
  width: 100%; max-width: 330px; font-variant-numeric: tabular-nums;
}
.amount-input span { font-size: 20px; color: var(--muted); font-weight: 700; flex: 1; }
.op-form p { margin: 0; }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch input { display: none; }
.swatch span { display: block; width: 26px; height: 26px; border-radius: 50%; background: var(--c); cursor: pointer; border: 2px solid transparent; }
.swatch input:checked + span { border-color: var(--card); box-shadow: 0 0 0 2px var(--c); }

.filters { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 10px; }
@media (max-width: 760px) { .filters { grid-template-columns: 1fr 1fr; } .filters input { grid-column: 1 / -1; } }

details > summary { cursor: pointer; }
.summary-row { display: flex; align-items: center; gap: 10px; font-weight: 700; list-style: none; }
.summary-row::-webkit-details-marker { display: none; }

.invite { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.code { display: block; font: 800 26px/1.2 ui-monospace, "Cascadia Code", Consolas, monospace; letter-spacing: .18em; margin-top: 4px; color: var(--accent2); }
.member { position: relative; }
.member-admin { position: relative; }
.popover {
  position: absolute; right: 0; top: 40px; z-index: 10; width: 300px; padding: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 40px rgba(0, 0, 0, .35);
}
.popover input, .popover select { flex: 1; padding: 9px 12px; width: auto; min-width: 0; }
.profile-hero { display: flex; flex-direction: column; align-items: center; gap: 8px; }

/* ---------- commerce ---------- */
.sync-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.sync-bar > span:nth-child(2) { flex: 1; }
.sync-bar form { margin: 0; }
.sync-bar .icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.sync-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; background: var(--muted); }
.sync-dot.ok { background: var(--pos); box-shadow: 0 0 10px var(--pos); }
.sync-dot.err { background: var(--neg); }
.trade-filters { display: grid; grid-template-columns: repeat(5, 1fr) auto auto; gap: 12px; align-items: end; }
.trade-checks { display: flex; flex-direction: column; gap: 6px; padding-bottom: 4px; }
@media (max-width: 1100px) { .trade-filters { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .trade-filters { grid-template-columns: 1fr 1fr; } }
.routes { display: flex; flex-direction: column; gap: 14px; }
.route { display: flex; flex-direction: column; gap: 14px; }
.route-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.route-name { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.route-name:hover b { text-decoration: underline; }
.route-profit { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.route-legs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; }
.leg { background: var(--card2); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0; font-variant-numeric: tabular-nums; }
.leg b, .leg small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leg-tag { align-self: flex-start; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 2px 8px; border-radius: 99px; margin-bottom: 4px; }
.leg-tag.buy { background: color-mix(in srgb, var(--accent2) 14%, transparent); color: var(--accent2); }
.leg-tag.sell { background: color-mix(in srgb, var(--pos) 14%, transparent); color: var(--pos); }
.leg-arrow { display: grid; place-items: center; color: var(--muted); font-size: 22px; }
@media (max-width: 640px) { .route-legs { grid-template-columns: 1fr; } .leg-arrow { transform: rotate(90deg); height: 14px; } }
.route-foot { display: flex; align-items: center; gap: 10px 24px; flex-wrap: wrap; }
.route-foot > span { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.route-foot .btn { margin-left: auto; }
.stock { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--card2); color: var(--muted); white-space: nowrap; }
.stock.s1, .stock.s2, .stock.inv.s5, .stock.inv.s6, .stock.inv.s7 { color: var(--neg); background: color-mix(in srgb, var(--neg) 12%, transparent); }
.stock.s3, .stock.s4 { color: var(--warn); background: color-mix(in srgb, var(--warn) 13%, transparent); }
.stock.s5, .stock.s6, .stock.s7, .stock.inv.s1, .stock.inv.s2 { color: var(--pos); background: color-mix(in srgb, var(--pos) 12%, transparent); }
.grid2.even { grid-template-columns: 1fr 1fr; }
@media (max-width: 960px) { .grid2.even { grid-template-columns: 1fr; } }

/* ---------- grille des marchandises (façon UEX) ---------- */
.cgrid-wrap { display: flex; flex-direction: column; gap: 14px; }
.cgrid-title { display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 700; color: var(--accent2); }
.search { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.search input { border: 0; background: none; padding: 15px 0; font-size: 16px; font-weight: 600; }
.search:focus-within { border-color: var(--accent2); }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 5px; }
.chip {
  display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 5px 7px; border-radius: 7px;
  background: var(--card); border: 1px solid var(--line); font-size: 11.5px; font-variant-numeric: tabular-nums; transition: .12s;
}
.chip:hover { border-color: var(--accent2); }
.chip.sel { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip.sel .chip-code, .chip.sel .chip-val { color: var(--accent-ink); }
.chip.held { box-shadow: inset 3px 0 0 var(--pos); }
.chip-code { font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.chip-val { font-weight: 700; }
.chip-val.roi { color: var(--accent2); }
.chip-val.v-sell { display: none; color: var(--text); }
.cgrid.mode-sell .v-roi { display: none; }
.cgrid.mode-sell .v-sell { display: inline; }
.cgrid-toggle { text-align: right; }
.cgrid-toggle button { background: none; border: 0; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.cgrid-toggle b { color: var(--text); }
.cgrid-toggle .on { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- fiche marchandise ---------- */
.cinfo-head h1 { font-size: 32px; margin: 2px 0; }
.cinfo-head p { margin: 0; }
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--accent2); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: 10px 16px; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent2); }
.tab-panel { display: flex; flex-direction: column; gap: 18px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 960px) { .kpis { grid-template-columns: 1fr 1fr; } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 3px; min-width: 0; box-shadow: var(--shadow); }
.kpi > span { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi > b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi > small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi > small b { color: var(--text); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 1100px) { .grid3 { grid-template-columns: 1fr; } }
.chart-title { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.ptable { display: flex; flex-direction: column; overflow-x: auto; }
.ptr { display: grid; grid-template-columns: minmax(200px, 2.2fr) 1fr 1fr 1fr 1fr 1fr 1fr; gap: 12px; align-items: center; padding: 10px 6px; min-width: 760px; font-variant-numeric: tabular-nums; }
.ptable.sim .ptr { grid-template-columns: 1.4fr .8fr 2.6fr .9fr 1.2fr 1.2fr; }
.ptr + .ptr { border-top: 1px solid var(--hair); }
.ptr.ph { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: var(--card2); border-radius: 12px; }
.ptr > span { min-width: 0; }
.ptr > span > small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.ptr .r { text-align: right; white-space: nowrap; }

/* ---------- inventaire ---------- */
.picker { position: relative; }
.picker-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 15; max-height: 340px; overflow-y: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 40px rgba(0, 0, 0, .35); padding: 4px;
}
.picker-results button {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: none; border: 0; color: var(--text); font: inherit; padding: 9px 12px; border-radius: 10px; cursor: pointer;
}
.picker-results button:hover { background: var(--card2); }
.picked { padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent2) 30%, transparent); font-size: 14px; }
.inv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .inv-grid { grid-template-columns: 1fr 1fr; } }
.mkt { color: var(--text); }
.mkt b { color: var(--accent2); }
.inv-ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--card2); flex-shrink: 0; font-size: 17px; }
.cat-head { margin: 18px 6px 4px; color: var(--accent2); }
.cat-head:first-child { margin-top: 0; }

/* qualité 0–1000 (base 500) */
.quality-input { display: flex; align-items: center; gap: 10px; }
.quality-input input[type=number] { width: 84px; flex-shrink: 0; padding: 10px; text-align: center; }
.quality-input input[type=range] {
  flex: 1; padding: 0; height: 6px; border: 0; border-radius: 3px; appearance: none; cursor: pointer;
  background: linear-gradient(90deg, #A01212, #E25822 50%, #9cb46a);
}
.quality-input input[type=range]::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
.quality-input input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
.quality-delta { font-size: 12px; }
.qbadge { display: inline-flex; align-items: baseline; gap: 3px; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 99px; vertical-align: middle; }
.qbadge small { font-size: 10px; font-weight: 700; opacity: .85; }
.qbadge.q-base { background: var(--card2); color: var(--muted); }
.qbadge.q-high { background: color-mix(in srgb, var(--pos) 14%, transparent); color: var(--pos); }
.qbadge.q-low { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }

/* ---------- contrats ---------- */
.ct-filters { grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 760px) { .ct-filters { grid-template-columns: 1fr 1fr; } }
.ct-row { color: inherit; box-shadow: inset 3px 0 0 var(--ct); padding-left: 12px; }
.ct-row:hover { background: var(--hover); }
.ct-commande { --ct: var(--muted); }
.ct-devis { --ct: #7a8fb0; }
.ct-accepte { --ct: #c9a227; }
.ct-en_cours { --ct: var(--accent2); }
.ct-termine { --ct: #4f9db0; }
.ct-facture { --ct: #a678d6; }
.ct-paye { --ct: var(--pos); }
.ct-annule { --ct: var(--neg); }
.status[class*="ct-"] { color: var(--ct); background: color-mix(in srgb, var(--ct) 12%, transparent); border-color: color-mix(in srgb, var(--ct) 35%, transparent); }
html[data-theme="light"] .ct-accepte { --ct: #8a6d10; }
html[data-theme="light"] .ct-devis { --ct: #4b6186; }
html[data-theme="light"] .ct-termine { --ct: #2a7082; }
html[data-theme="light"] .ct-facture { --ct: #7445a8; }
.ct-steps { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.ct-step { flex: 1 0 auto; text-align: center; padding: 8px 10px; border-radius: 10px; font-size: 12.5px; font-weight: 700; background: var(--card2); color: var(--muted); white-space: nowrap; }
.ct-step.done { color: var(--text); }
.ct-step.now { background: var(--accent); color: var(--accent-ink); }
.ct-desc { white-space: pre-wrap; margin: 0; }
.ct-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ct-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 12px; max-height: 200px; overflow-y: auto; padding: 2px; }
.ct-members .check span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- retrait de compte ---------- */
.acc-tools { display: flex; gap: 8px; }
.acc-tools details:first-child .popover { left: 0; right: auto; max-width: calc(100vw - 48px); }
.acc-remove { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.acc-remove span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.acc-remove b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-remove .bp-remove { flex-shrink: 0; }
.acc-remove .bp-remove:disabled { opacity: .35; cursor: not-allowed; background: none; color: var(--muted); }

/* ---------- frais ---------- */
.fee-box { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--card2); font-size: 14px; }
.fee-box > div { display: flex; justify-content: space-between; gap: 12px; }
.fee-box b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.fee-box > small { font-size: 12.5px; }
.fee-net { margin-top: 2px; padding-top: 8px; border-top: 1px solid var(--line); font-weight: 700; }
.fee-settings { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
@media (max-width: 560px) { .fee-settings { grid-template-columns: 1fr 1fr; } .fee-settings .btn { grid-column: 1 / -1; } }

/* ---------- mode test ---------- */
.sandbox-bar {
  position: sticky; top: 10px; z-index: 30; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--accent2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}
.sandbox-bar > span { flex: 1 1 220px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--accent2); }
.sandbox-bar small { color: var(--muted); }

/* ---------- blueprints ---------- */
.bp-members { display: flex; flex-wrap: wrap; gap: 8px; }
.bp-member { display: flex; align-items: center; gap: 6px; padding: 8px 10px 8px 8px; border-radius: 99px; background: var(--card2); border: 1px solid transparent; }
.bp-member a { display: flex; align-items: center; gap: 10px; }
.bp-member a > span:not(.avatar) { display: flex; flex-direction: column; line-height: 1.25; }
.bp-remove { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.bp-remove:hover { background: var(--accent); color: var(--accent-ink); }
.bp-member small { font-size: 12px; }
.bp-member:hover, .bp-member.active { border-color: var(--accent2); }
.bp-row .tmain small { white-space: normal; }
.bp-owners { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.bp-owner { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 2px 10px 2px 2px; border-radius: 99px; background: var(--card2); }
.bp-more-owners { margin-top: 6px; }
.bp-more-owners summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.bp-more-owners summary::-webkit-details-marker { display: none; }
.bp-more-owners summary small { font-weight: 700; color: var(--accent2); }
.bp-stack { display: inline-flex; }
.bp-stack > span { display: inline-flex; border-radius: 50%; box-shadow: 0 0 0 2px var(--card); }
.bp-stack > span + span { margin-left: -7px; }
.bp-member-search { flex: 0 1 260px; min-width: 0; padding: 0 14px; gap: 8px; }
.bp-member-search input { padding: 9px 0; font-size: 14px; min-width: 0; }
.bp-more { display: block; margin: 12px auto 0; }
@media (max-width: 520px) {
  .bp-member-search { flex: 1 1 100%; }
  .bp-members { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bp-member { min-width: 0; padding: 6px 4px 6px 6px; gap: 2px; }
  .bp-member a { min-width: 0; flex: 1; gap: 7px; }
  .bp-member a > span:not(.avatar) { min-width: 0; }
  .bp-member b, .bp-member small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bp-remove { flex-shrink: 0; width: 22px; height: 22px; }
}
.bp-toggle .btn { min-width: 104px; white-space: nowrap; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; }
.bp-source { text-align: center; margin: 0; }
@media (max-width: 520px) { .bp-toggle .btn { min-width: 0; padding: 8px 12px; } }

/* ---------- badge UEX (pied de page) ---------- */
.uex-badge { display: flex; justify-content: center; margin-top: auto; padding-top: 24px; }
.uex-badge a { display: block; border-radius: 9px; opacity: .85; transition: opacity .15s, transform .15s; }
.uex-badge a:hover { opacity: 1; transform: translateY(-1px); }
.uex-badge img { display: block; width: 160px; height: auto; border-radius: 9px; border: 1px solid var(--line); }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 24px 16px; }
.auth-card {
  width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line); border-radius: 28px;
  padding: 34px 28px; text-align: center; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow);
}
.auth-card form { text-align: left; }
.auth-card h1 { font-size: 26px; }
.auth-card p { margin: 0; }
.auth-logo { margin: 0 auto; border-radius: 16px; }

/* ---------- notifications ---------- */
.toasts { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 460px); }
.toast {
  padding: 13px 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .35); transition: opacity .4s, transform .4s; animation: drop .35s ease;
}
.toast.success { border-color: color-mix(in srgb, var(--pos) 50%, var(--line)); }
.toast.success::before { content: "✓ "; color: var(--pos); }
.toast.error { border-color: color-mix(in srgb, var(--neg) 50%, var(--line)); }
.toast.error::before { content: "✕ "; color: var(--neg); }
.toast.hide { opacity: 0; transform: translateY(-10px); pointer-events: none; }
@keyframes drop { from { opacity: 0; transform: translateY(-12px); } }
