/* Fleetmatic CRM — interface. Minimaliste : surfaces blanches, gris neutres, violet Fleetmatic en accent. */
:root {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-2: #fbfbfc;
  --hover: #f3f3f5;
  --line: #ebebee;
  --line-strong: #dcdce1;
  --text: #121216;
  --text-2: #55555f;
  --text-3: #8a8a95;
  --accent: #8429c4;
  --accent-hover: #7322ad;
  --accent-soft: #f4ecfb;
  --accent-text: #6c1fa3;
  --green: #18794e; --green-soft: #e9f6ef;
  --amber: #a35a00; --amber-soft: #fdf3e3;
  --red: #c4302b; --red-soft: #fdecec;
  --blue: #2457c5; --blue-soft: #eaf0fc;
  --shadow-sm: 0 1px 2px rgba(18,18,22,.04);
  --shadow: 0 1px 2px rgba(18,18,22,.04), 0 4px 16px rgba(18,18,22,.05);
  --shadow-lg: 0 8px 40px rgba(18,18,22,.14), 0 2px 8px rgba(18,18,22,.06);
  --r: 10px; --r-sm: 7px; --r-lg: 14px;
  --sidebar: 232px;
  --ease: cubic-bezier(.23,1,.32,1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0c0c0f; --surface: #141418; --surface-2: #17171c; --hover: #1d1d23; --line: #24242b; --line-strong: #31313a;
  --text: #f2f2f5; --text-2: #a9a9b4; --text-3: #75757f;
  --accent: #9a45d8; --accent-hover: #a95ae0; --accent-soft: #241532; --accent-text: #c79bf0;
  --green: #4cc38a; --green-soft: #12261c; --amber: #f0a64a; --amber-soft: #2a1f10; --red: #f0716b; --red-soft: #2c1516; --blue: #7aa2f7; --blue-soft: #141d33;
  --shadow-sm: none; --shadow: 0 0 0 1px var(--line); --shadow-lg: 0 12px 48px rgba(0,0,0,.55), 0 0 0 1px var(--line);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.45; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: "ss01"; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
svg { flex-shrink: 0; }
::selection { background: var(--accent-soft); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- structure ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; padding: 18px 12px 14px; gap: 2px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 20px; }
.brand img { height: 22px; width: auto; display: block; }
.brand .tag { font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--text-3); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; }
.logo-on-dark { display: none !important; }
:root[data-theme="dark"] .logo-on-dark { display: block !important; }
:root[data-theme="dark"] .logo-on-light { display: none !important; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--r-sm); color: var(--text-2); font-weight: 500; cursor: pointer; transition: background .12s, color .12s; position: relative; }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-text); }
.nav-item.active svg { color: var(--accent); }
.nav-item .badge { margin-left: auto; }
.nav-sep { height: 1px; background: var(--line); margin: 10px 8px; }
.side-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); }
.me .who { min-width: 0; }
.me .who b { display: block; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who span { font-size: 12px; color: var(--text-3); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; }
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar h1 { font-size: 17px; font-weight: 600; margin: 0; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .crumb { color: var(--text-3); font-weight: 500; }
.topbar .spacer { flex: 1; }
.search-btn { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 11px; min-width: 240px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm); color: var(--text-3); cursor: pointer; box-shadow: var(--shadow-sm); }
.search-btn:hover { border-color: var(--line-strong); }
.search-btn kbd { margin-left: auto; }
kbd { font-family: inherit; font-size: 11px; color: var(--text-3); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--surface-2); }
.content { padding: 8px 28px 64px; max-width: 1360px; width: 100%; }
.content.wide { max-width: none; }

/* ---------- éléments ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-weight: 500; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-sm); transition: background .12s, border-color .12s, transform .12s var(--ease); }
.btn:hover { background: var(--hover); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(132,41,196,.25), inset 0 1px 0 rgba(255,255,255,.12); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.danger { color: var(--red); }
.btn.sm { height: 28px; padding: 0 9px; font-size: 13px; }
.btn.icon { width: 34px; padding: 0; }
.btn.sm.icon { width: 28px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--hover); color: var(--text-2); }
.badge.accent { background: var(--accent); color: #fff; }
.badge.red { background: var(--red-soft); color: var(--red); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--hover); color: var(--text-2); white-space: nowrap; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.accent { background: var(--accent-soft); color: var(--accent-text); }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.small { font-size: 12.5px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: var(--accent-text); background: var(--accent-soft); flex-shrink: 0; letter-spacing: .02em; }
.avatar.sq { border-radius: 8px; }
.avatar.lg { width: 48px; height: 48px; font-size: 17px; border-radius: 12px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-h h3 { margin: 0; font-size: 14px; font-weight: 600; }
.card-h .right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.card-b { padding: 16px 18px; }
.card-b.flush { padding: 0; }
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.g-detail { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }

.hello { padding: 18px 0 22px; }
.hello h2 { margin: 0 0 4px; font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.hello p { margin: 0; color: var(--text-2); }

.stat { padding: 16px 18px 18px; }
.stat .label { display: flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.stat .value { font-size: 28px; font-weight: 600; letter-spacing: -.02em; margin-top: 8px; line-height: 1.1; }
.stat .sub { color: var(--text-3); font-size: 12.5px; margin-top: 4px; }
.stat.click { cursor: pointer; transition: border-color .12s; }
.stat.click:hover { border-color: var(--line-strong); }

/* listes */
.list { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line); min-height: 52px; }
.row:last-child { border-bottom: 0; }
.row.click { cursor: pointer; }
.row.click:hover { background: var(--surface-2); }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-weight: 500; }
.row .s { color: var(--text-3); font-size: 12.5px; }
.empty { padding: 36px 20px; text-align: center; color: var(--text-3); }
.empty b { display: block; color: var(--text-2); font-weight: 600; margin-bottom: 4px; font-size: 14px; }
.empty svg { color: var(--line-strong); margin-bottom: 8px; }

/* case à cocher ronde */
.check { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; background: var(--surface); transition: background .15s, border-color .15s; padding: 0; }
.check:hover { border-color: var(--accent); }
.check.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.check svg { opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s var(--ease); }
.check.on svg { opacity: 1; transform: none; }
.done .t { text-decoration: line-through; color: var(--text-3); }
.due { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.due.late { color: var(--red); font-weight: 500; }
.due.today { color: var(--accent-text); font-weight: 500; }

/* tableau */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { text-align: left; font-weight: 500; font-size: 12.5px; color: var(--text-3); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); position: sticky; top: 0; cursor: pointer; user-select: none; }
.tbl th:first-child, .tbl td:first-child { padding-left: 18px; }
.tbl th .arrow { opacity: .6; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { cursor: pointer; transition: background .1s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.cell-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-main b { font-weight: 600; }

.toolbar { display: flex; align-items: center; gap: 8px; margin: 6px 0 14px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--hover); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; height: 28px; padding: 0 11px; border-radius: 7px; color: var(--text-2); font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.input, select.input, textarea.input { width: 100%; height: 36px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); outline: none; transition: border-color .12s, box-shadow .12s; }
textarea.input { height: auto; min-height: 84px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.input.search { padding-left: 34px; }
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.toolbar .search-wrap { width: 280px; }
.toolbar select.input { width: auto; min-width: 150px; }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 14px; }
.form .full { grid-column: 1 / -1; }
.hint { font-size: 12px; color: var(--text-3); font-weight: 400; }

/* ---------- pipeline ---------- */
.board { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 18px; min-height: calc(100vh - 150px); align-items: flex-start; scroll-snap-type: x proximity; }
.col { flex: 0 0 272px; background: var(--hover); border-radius: var(--r-lg); display: flex; flex-direction: column; max-height: calc(100vh - 160px); scroll-snap-align: start; transition: background .15s, box-shadow .15s; }
:root[data-theme="dark"] .col { background: var(--surface-2); border: 1px solid var(--line); }
.col.over { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.col-h { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px 14px; font-weight: 600; font-size: 13px; }
.col-h .sum { margin-left: auto; color: var(--text-3); font-weight: 500; font-size: 12px; }
.col-b { padding: 4px 8px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.stage-dot { width: 8px; height: 8px; border-radius: 50%; }
.deal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 11px 12px 10px; cursor: grab; box-shadow: var(--shadow-sm); transition: box-shadow .15s, border-color .15s, transform .15s var(--ease), opacity .15s; }
.deal:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.deal.dragging { opacity: .45; transform: scale(.98); }
.deal .t { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.deal .m { color: var(--text-3); font-size: 12.5px; margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.deal .f { display: flex; align-items: center; gap: 6px; margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--text-3); }
.deal .f .amt { margin-left: auto; color: var(--text); font-weight: 600; }
.col-add { margin: 0 8px 10px; border: 1px dashed var(--line-strong); border-radius: var(--r); background: transparent; height: 34px; color: var(--text-3); cursor: pointer; font-weight: 500; }
.col-add:hover { color: var(--text); border-color: var(--text-3); }

/* ---------- fiche ---------- */
.detail-head { display: flex; align-items: flex-start; gap: 16px; padding: 14px 0 22px; flex-wrap: wrap; }
.detail-head h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.detail-head .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; color: var(--text-2); }
.detail-head .actions { margin-left: auto; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 10px 12px; font-size: 13.5px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv a { color: var(--accent-text); }
.mini-deal { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.mini-deal + .mini-deal { margin-top: 10px; }
.stepper { display: flex; gap: 3px; }
.stepper i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); cursor: pointer; transition: background .15s; }
.stepper i.on { background: var(--accent); }
.stepper i:hover { background: var(--accent-hover); opacity: .6; }

.composer { border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); overflow: hidden; transition: border-color .12s, box-shadow .12s; }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.composer textarea { border: 0; width: 100%; min-height: 70px; padding: 12px 14px; resize: vertical; outline: none; background: transparent; line-height: 1.5; }
.composer .bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); background: var(--surface-2); }
.timeline { position: relative; margin-top: 8px; }
.tl-item { display: flex; gap: 12px; padding: 12px 0; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 14px; top: 42px; bottom: -12px; width: 1px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-ico { width: 29px; height: 29px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--hover); color: var(--text-2); flex-shrink: 0; position: relative; z-index: 1; border: 3px solid var(--surface); box-sizing: content-box; margin: -3px; }
.tl-ico.accent { background: var(--accent-soft); color: var(--accent-text); }
.tl-ico.green { background: var(--green-soft); color: var(--green); }
.tl-ico.blue { background: var(--blue-soft); color: var(--blue); }
.tl-ico.amber { background: var(--amber-soft); color: var(--amber); }
.tl-body { flex: 1; min-width: 0; }
.tl-meta { font-size: 12.5px; color: var(--text-3); display: flex; gap: 8px; align-items: center; }
.tl-text { margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tl-text.boxed { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.tl-del { opacity: 0; margin-left: auto; }
.tl-item:hover .tl-del { opacity: 1; }

/* ---------- rapports ---------- */
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 70px; gap: 12px; align-items: center; font-size: 13px; }
.bar-row .lbl { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 10px; background: var(--hover); border-radius: 5px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 5px; transition: width .5s var(--ease); }
.bar-row .val { text-align: right; font-weight: 600; }
.funnel { display: flex; flex-direction: column; gap: 8px; }
.funnel-step { display: grid; grid-template-columns: 130px 1fr 110px; gap: 12px; align-items: center; font-size: 13px; }
.funnel-step .bar-track { height: 26px; border-radius: 7px; }
.funnel-step .bar-fill { border-radius: 7px; opacity: .9; }
.funnel-step .rate { color: var(--text-3); text-align: right; font-size: 12.5px; }

/* ---------- panneaux & fenêtres ---------- */
#overlay { position: fixed; inset: 0; background: rgba(12,12,16,.32); opacity: 0; pointer-events: none; transition: opacity .2s var(--ease); z-index: 60; }
#overlay.on { opacity: 1; pointer-events: auto; }
.modal { position: fixed; z-index: 70; left: 50%; top: 12vh; transform: translate(-50%, 8px) scale(.98); width: min(560px, calc(100vw - 24px)); max-height: 80vh; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .18s var(--ease), transform .18s var(--ease); }
.modal.on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.modal-h { display: flex; align-items: center; padding: 16px 20px 6px; }
.modal-h h3 { margin: 0; font-size: 16px; font-weight: 600; }
.modal-h .x { margin-left: auto; }
.modal-b { padding: 12px 20px 8px; overflow-y: auto; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 18px; }
.modal-f .left { margin-right: auto; }
.drawer { position: fixed; z-index: 70; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); background: var(--surface); box-shadow: var(--shadow-lg); transform: translateX(16px); opacity: 0; transition: transform .22s var(--ease), opacity .18s; display: flex; flex-direction: column; }
.drawer.on { transform: none; opacity: 1; }
.palette { top: 14vh; width: min(620px, calc(100vw - 24px)); }
.palette input { border: 0; outline: none; width: 100%; padding: 16px 18px 14px 46px; font-size: 15px; background: transparent; }
.palette .pw { position: relative; border-bottom: 1px solid var(--line); }
.palette .pw svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.palette .results { max-height: 52vh; overflow-y: auto; padding: 6px; }
.palette .grp { font-size: 11.5px; font-weight: 600; color: var(--text-3); padding: 10px 12px 4px; text-transform: uppercase; letter-spacing: .05em; }
.palette .res { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; cursor: pointer; }
.palette .res.sel { background: var(--hover); }
.palette .res .s { margin-left: auto; color: var(--text-3); font-size: 12.5px; }
.menu { position: fixed; z-index: 80; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 5px; min-width: 200px; animation: pop .14s var(--ease); }
.menu button { display: flex; width: 100%; align-items: center; gap: 9px; border: 0; background: transparent; padding: 8px 10px; border-radius: 6px; cursor: pointer; text-align: left; }
.menu button:hover { background: var(--hover); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 500; box-shadow: var(--shadow-lg); animation: toast .25s var(--ease); display: flex; align-items: center; gap: 8px; pointer-events: auto; }
.toast button { background: transparent; border: 0; color: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }
@keyframes toast { from { opacity: 0; transform: translateY(8px); } }

/* ---------- connexion ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 50% -10%, var(--accent-soft), transparent 60%), var(--bg); }
.login .box { width: min(380px, 100%); }
.login .box img { height: 26px; margin: 0 auto 28px; display: block; }
.login .card { padding: 28px; }
.login h1 { font-size: 19px; margin: 0 0 4px; font-weight: 600; letter-spacing: -.01em; }
.login p { margin: 0 0 20px; color: var(--text-2); }
.login .err { color: var(--red); font-size: 13px; min-height: 18px; margin: 10px 0 0; }

/* ---------- mobile ---------- */
.mobile-nav { display: none; }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-main, .g-detail { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  body { font-size: 15px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .topbar { padding: 0 16px; height: 56px; }
  .search-btn { min-width: 0; width: 38px; padding: 0; justify-content: center; }
  .search-btn span, .search-btn kbd { display: none; }
  .content { padding: 4px 16px 96px; }
  .g2 { grid-template-columns: minmax(0, 1fr); }
  .detail-head .actions { margin-left: 0; width: 100%; }
  .hello h2 { font-size: 22px; }
  .stat .value { font-size: 24px; }
  .stat .label { font-size: 12.5px; }
  .grid { gap: 12px; }
  .topbar h1 { font-size: 16px; }
  .form { grid-template-columns: 1fr; }
  .toolbar .search-wrap { width: 100%; }
  .hide-m { display: none !important; }
  .col { flex-basis: 84vw; }
  .mobile-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--text-3); padding: 6px 8px; border-radius: 8px; position: relative; min-width: 56px; }
  .mobile-nav a.active { color: var(--accent-text); }
  .mobile-nav .badge { position: absolute; top: 0; right: 8px; height: 16px; min-width: 16px; font-size: 10px; padding: 0 4px; }
  .modal { top: auto; bottom: 0; left: 0; right: 0; width: 100%; transform: translateY(16px); border-radius: 18px 18px 0 0; max-height: 92vh; }
  .modal.on { transform: none; }
  .palette { top: 8px; bottom: auto; border-radius: var(--r-lg); left: 8px; right: 8px; width: auto; }
  .bar-row { grid-template-columns: 100px 1fr 56px; }
  .funnel-step { grid-template-columns: 96px 1fr 70px; }
  .kv { grid-template-columns: 104px 1fr; }
  .row { padding: 12px 16px; }
  .tbl th:first-child, .tbl td:first-child { padding-left: 16px; }
}
@media (hover: none) { .tl-del { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
