/* replydock — poste de travail d'agence : rail sombre, zone de travail claire, un accent bleu. */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/pjs-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/pjs-latin-ext.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --rail: #0b0c0e;
  --rail-2: #131318;
  --rail-3: #1f1f26;
  --rail-line: rgba(255, 255, 255, .08);
  --rail-text: #a1a1aa;
  --rail-text-2: #6b7280;
  --rail-active: #4d8eff;
  --rail-active-bg: rgba(24, 119, 242, .14);
  --ground: #f7f8f9;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --surface-3: #eef0f3;
  --line: #e4e7ec;
  --line-2: #d1d5db;
  --text: #0b0c0e;
  --text-2: #5f6775;
  --text-3: #6f7785;
  --accent: #1468d8;
  --accent-hover: #115cc0;
  --accent-soft: rgba(20, 104, 216, .10);
  --accent-line: rgba(20, 104, 216, .45);
  --good: #15803d;
  --good-soft: #e7f6ec;
  --warn: #b45309;
  --warn-soft: #fdf1dc;
  --bad: #c62828;
  --bad-soft: #fdeaea;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .04);
  --shadow-2: 0 8px 24px rgba(16, 24, 40, .12), 0 2px 6px rgba(16, 24, 40, .06);
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --ring: 0 0 0 3px rgba(20, 104, 216, .25);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --rail-w: 248px;
  --rail-w-min: 72px;
  --font: "Plus Jakarta Sans", ui-sans-serif, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* --- Base --------------------------------------------------------------------- */
* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--ground); }
body { min-height: 100vh; background: var(--ground); color: var(--text); font: 14.5px/1.5 var(--font); letter-spacing: -.004em; -webkit-font-smoothing: antialiased; scrollbar-color: var(--line-2) transparent; }
::selection { background: rgba(20, 104, 216, .22); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1 { font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -.025em; margin: 0; text-wrap: balance; }
h2 { font-size: 16px; line-height: 1.35; font-weight: 650; letter-spacing: -.012em; margin: 0 0 12px; }
h3 { font-size: 13px; font-weight: 600; color: var(--text-2); margin: 20px 0 8px; }
p { text-wrap: pretty; margin: 0 0 10px; }
code { font: 12.5px/1.4 var(--mono); background: var(--surface-2); padding: 2px 6px; border-radius: var(--r-sm); }
strong, b { font-weight: 650; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.sub { display: block; font-size: 12.5px; color: var(--text-2); font-weight: 400; overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* L'attribut hidden l'emporte sur les display des composants (.badge, .btn…). */
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
.ic { width: 18px; height: 18px; flex: none; vertical-align: -4px; }
.ic.sm { width: 16px; height: 16px; vertical-align: -3px; }
.ic.lg { width: 20px; height: 20px; }
.ic.xl { width: 28px; height: 28px; }

/* --- Coque : rail + zone de travail ------------------------------------------- */
.app { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .25s var(--ease); }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--rail); color: var(--rail-text); border-right: 1px solid var(--rail-line); overflow: hidden; }
.rail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 68px; padding: 0 14px 0 18px; border-bottom: 1px solid var(--rail-line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 750; font-size: 16px; letter-spacing: -.02em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 16px; font-weight: 800; }
.rail-toggle { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--rail-text-2); cursor: pointer; }
.rail-toggle:hover { background: var(--rail-2); color: #fff; }
.rail-toggle .ic-open { display: none; }
.rail-nav { flex: 1; overflow-y: auto; padding: 14px 10px 10px; }
.rail-title { margin: 14px 10px 6px; font-size: 11px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--rail-text-2); white-space: nowrap; }
.rail-group + .rail-group { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rail-line); }
.rail-group:first-child .rail-title { margin-top: 2px; }
.rail-link { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 10px; color: var(--rail-text); font-weight: 500; font-size: 14.5px; white-space: nowrap; transition: background-color .15s var(--ease), color .15s var(--ease); }
.rail-link:hover { background: var(--rail-2); color: #fff; text-decoration: none; }
.rail-link.is-current { background: var(--rail-active-bg); color: var(--rail-active); box-shadow: inset 0 0 0 1px rgba(77, 142, 255, .22); }
.rail-link .ic { color: inherit; opacity: .9; }
.rail-link .lbl { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.rail-link .cnt { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.rail-link.is-current .cnt { background: var(--rail-active); color: #0b0c0e; }
.rail-link .avatar { width: 26px; height: 26px; font-size: 12px; margin: 0 -4px; }
.rail-link.soon { color: var(--rail-text-2); cursor: default; }
.rail-foot { padding: 12px 10px; border-top: 1px solid var(--rail-line); }
.whoami { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: #fff; }
.whoami .avatar { width: 36px; height: 36px; background: #f59e0b; color: #fff; }
.whoami .who { flex: 1; min-width: 0; line-height: 1.25; }
.whoami .who strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.whoami .who span { display: block; font-size: 12px; color: var(--rail-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.whoami form { margin: 0; }
.whoami .btn.icon { background: transparent; border-color: transparent; color: var(--rail-text-2); }
.whoami .btn.icon:hover { background: var(--rail-2); color: #fff; }
.main { min-width: 0; display: flex; flex-direction: column; }
.mbar { display: none; }
.backdrop { display: none; }

html.rail-collapsed .app { grid-template-columns: var(--rail-w-min) minmax(0, 1fr); }
html.rail-collapsed .rail-head { justify-content: center; padding: 0; }
html.rail-collapsed .brand .brand-name, html.rail-collapsed .rail-title, html.rail-collapsed .rail-link .lbl,
html.rail-collapsed .rail-link .cnt, html.rail-collapsed .whoami .who, html.rail-collapsed .whoami form { display: none; }
html.rail-collapsed .rail-toggle { position: absolute; top: 76px; left: 50%; transform: translateX(-50%); background: var(--rail-2); }
html.rail-collapsed .rail-toggle .ic-open { display: block; }
html.rail-collapsed .rail-toggle .ic-close { display: none; }
html.rail-collapsed .rail-nav { padding-top: 54px; }
html.rail-collapsed .rail-link { justify-content: center; padding: 0; }
html.rail-collapsed .rail-group + .rail-group { border-top-color: var(--rail-line); }
html.rail-collapsed .whoami { justify-content: center; padding: 8px 0; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; min-height: 68px; padding: 14px 32px; background: var(--surface); border-bottom: 1px solid var(--line); }
.page-head .lede { margin: 2px 0 0; font-size: 13px; color: var(--text-2); }
.page-head .actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-head form { margin: 0; }
.page-body { flex: 1; padding: 24px 32px 64px; max-width: 1320px; width: 100%; }
.crumb { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-2); margin-bottom: 4px; }
.crumb:hover { color: var(--text); }
.page-head .title { display: grid; gap: 2px; }

/* --- La file : tuiles de ce qui attend une action ---------------------------------- */
.queue { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.q { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 2px 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); color: var(--text); transition: border-color .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease); }
a.q:hover { text-decoration: none; border-color: var(--line-2); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.q-l { grid-column: 1; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.q-n { grid-column: 1; font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.q-n small { font-size: 14px; font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.q-n.txt { font-size: 17px; line-height: 1.3; padding: 4px 0 3px; }
.q-s { grid-column: 1; font-size: 12.5px; color: var(--text-3); }
.q .ic { grid-column: 2; grid-row: 1 / span 3; width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); }
.q.hot .q-n, .q.hot .ic { color: var(--accent); }
.q.hot .ic { background: var(--accent-soft); }
.q.bad .q-n, .q.bad .ic { color: var(--bad); }
.q.bad .ic { background: var(--bad-soft); }
.q.good .ic { color: var(--good); background: var(--good-soft); }

/* --- Cartes, onglets, tables ---------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; margin-bottom: 16px; box-shadow: var(--shadow-1); }
.card.pad0 { padding: 0; overflow: hidden; }
.card > h2:first-child { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.card-head form { margin: 0; }
.card-head .count { font-size: 13px; color: var(--text-2); margin-left: 8px; font-weight: 500; }
.tabs { display: flex; gap: 2px; margin: 0 0 18px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs.is-scroll-right { mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); }
.tabs.is-scroll-left { mask-image: linear-gradient(90deg, transparent, #000 48px); -webkit-mask-image: linear-gradient(90deg, transparent, #000 48px); }
.tabs.is-scroll-left.is-scroll-right { mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent); }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--text-2); font-size: 14px; font-weight: 550; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a[aria-current] { color: var(--accent); border-bottom-color: var(--accent); }
.tabs a span.n { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tabs.pills { gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; display: flex; width: fit-content; max-width: 100%; }
.tabs.pills a { padding: 6px 12px; margin: 0; border: 0; border-radius: 8px; font-size: 13.5px; }
.tabs.pills a[aria-current] { background: var(--accent-soft); color: var(--accent); }
.tabs.pills a span { margin-left: 4px; }
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 18px; overflow: hidden; box-shadow: var(--shadow-1); }
table.list { width: 100%; border-collapse: collapse; }
.list th, .list td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
.list thead th { font-size: 11.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); background: var(--surface); }
.list tbody tr { position: relative; transition: background-color .12s var(--ease); }
.list tbody tr:hover { background: #fafbfc; }
/* Retour d'une fiche : sa ligne est surlignée, puis le surlignage s'efface (admin.js, markReturn). */
.list tbody tr.is-last-seen, li.is-last-seen { animation: last-seen 2.6s var(--ease) .5s both; }
@keyframes last-seen { from { background: var(--accent-soft); } to { background: transparent; } }
.list tbody tr:last-child td, .list tbody tr:last-child th { border-bottom: 0; }
.list .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.list.compact th, .list.compact td { padding: 8px 10px; }
.list .when { color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 13px; }
.list td.actions { text-align: right; white-space: nowrap; }
.list td.actions form { display: inline-flex; gap: 6px; margin: 0; }
.member-actions { display: grid; gap: 6px; justify-items: stretch; }
.member-actions .btn { width: 100%; justify-content: center; }
.who-cell { display: flex; align-items: center; gap: 12px; }
.rowlink { display: grid; color: var(--text); font-weight: 600; }
.rowlink::after { content: ""; position: absolute; inset: 0; }
.rowlink:hover { text-decoration: none; }
.rowlink small { color: var(--text-2); font-weight: 400; font-size: 12.5px; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tag { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; font: 12px/1.7 var(--mono); color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 7px; white-space: nowrap; }
.scroll-x { overflow-x: auto; }

/* --- Boutons ------------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 15px; border-radius: var(--r-md); border: 1px solid var(--accent); background: var(--accent); color: #fff; font: 600 14px/1 var(--font); letter-spacing: -.005em; white-space: nowrap; cursor: pointer; box-shadow: 0 1px 2px rgba(20, 104, 216, .25); transition: background-color .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease), box-shadow .15s var(--ease); }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--line-2); box-shadow: var(--shadow-1); }
.btn.ghost:hover { background: var(--surface-2); border-color: #b9c0cc; }
.btn.danger { background: var(--surface); color: var(--bad); border-color: var(--line-2); box-shadow: none; }
.btn.danger:hover { background: var(--bad-soft); border-color: rgba(198, 40, 40, .35); }
.btn.small { min-height: 32px; padding: 0 11px; border-radius: 8px; font-size: 13px; }
.btn.big { min-height: 48px; padding: 0 24px; font-size: 15.5px; border-radius: 12px; }
.btn.icon { width: 34px; min-height: 34px; padding: 0; border-radius: 8px; }
.btn.icon.small { width: 30px; min-height: 30px; }
.btn .ic { width: 16px; height: 16px; }
.btn.is-done { color: var(--good); border-color: rgba(21, 128, 61, .35); background: var(--good-soft); }

/* --- Formulaires ---------------------------------------------------------------- */
input, select, textarea { width: 100%; padding: 9px 12px; border-radius: var(--r-md); background: var(--surface); color: var(--text); border: 1px solid var(--line-2); font: 14.5px/1.45 var(--font); transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:hover, select:hover, textarea:hover { border-color: #b9c0cc; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: var(--ring); }
input[readonly], textarea[readonly] { color: var(--text-2); background: var(--surface-2); }
select { appearance: none; padding-right: 34px; cursor: pointer; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center; }
textarea { resize: vertical; }
input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); flex: none; }
input[type=file] { padding: 6px; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
label.block { margin: 12px 0 8px; }
.check { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 500; color: var(--text); }
.stack { display: grid; gap: 14px; }
.stack .btn.small { justify-self: start; }
form.inline { display: flex; gap: 8px; align-items: center; margin: 0; flex-wrap: wrap; }
form.inline select { width: auto; min-width: 190px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; align-items: end; }
.grid-form .wide { grid-column: 1 / -1; }
.grid-form.fill { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } /* peu de champs : mêmes colonnes que les formulaires voisins */
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-actions > form { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.inline-status { font-size: 13px; color: var(--text-2); }
.inline-status.is-good { color: var(--good); }
.inline-status.is-bad { color: var(--bad); }
.copyrow { display: flex; gap: 8px; }
.copyrow input { font-family: var(--mono); font-size: 13px; }

/* --- Messages, états ------------------------------------------------------------ */
.alert { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--accent-soft); border: 1px solid rgba(24, 119, 242, .25); color: var(--text); border-radius: var(--r-md); padding: 10px 14px; margin: 0 0 16px; font-size: 14px; }
.alert.error { background: var(--bad-soft); border-color: rgba(198, 40, 40, .3); color: var(--bad); }
.alert.warn { background: var(--warn-soft); border-color: rgba(180, 83, 9, .3); color: var(--warn); }
.alert form { display: inline; margin-left: auto; }
.note, .flag { border-radius: var(--r-md); padding: 8px 12px; font-size: 13.5px; margin: 0; }
.note.bad, .flag.bad { background: var(--bad-soft); color: var(--bad); }
.note.warn, .flag.warn { background: var(--warn-soft); color: var(--warn); }
.flags { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 6px; }
.empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 44px 22px; color: var(--text-2); }
.empty .ic { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--surface-2); color: var(--text-3); margin-bottom: 6px; }
.empty strong { color: var(--text); font-size: 15px; }
.empty .btn { margin-top: 8px; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; vertical-align: middle; white-space: nowrap; background: var(--surface-2); color: var(--text-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.s-a_inviter, .badge.s-test_termine, .badge.role-admin { background: var(--accent-soft); color: var(--accent); }
.badge.s-test_envoye, .badge.s-test_en_cours, .badge.r-a_revoir, .badge.g-nouveau, .badge.g-a_rejoindre, .badge.g-demande, .badge.m-a_brancher, .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.s-entretien, .badge.s-essai, .badge.s-retenu, .badge.r-entretien, .badge.on, .badge.g-pret, .badge.m-connecte, .badge.good { background: var(--good-soft); color: var(--good); }
.badge.s-ecarte, .badge.s-refuse, .badge.r-refuser, .badge.g-bloque, .badge.m-deconnecte, .badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.role-manager { background: var(--accent-soft); color: var(--accent); }
.score { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 26px; padding: 0 8px; border-radius: 8px; font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.score.good { background: var(--good-soft); color: var(--good); }
.score.mid { background: var(--warn-soft); color: var(--warn); }
.score.low { background: var(--bad-soft); color: var(--bad); }
.avatar { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }
.avatar.lg { width: 64px; height: 64px; font-size: 24px; }
.avatar.xl { width: 80px; height: 80px; font-size: 30px; }
.avatar.violet { background: var(--accent); color: #fff; }

/* --- Lignes dans un panneau (jamais de carte dans une carte) ------------------------------------ */
.rows { display: grid; margin: 0; padding: 0; list-style: none; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--text); }
.row:first-child { border-top: 0; }
a.row:hover { text-decoration: none; background: #fafbfc; }
.row .who { flex: 1; min-width: 0; }
.row .who strong { display: block; font-size: 14.5px; }
.row .meta { font-size: 12.5px; color: var(--text-2); }
.row .ic.chev { color: var(--text-3); }

/* --- Fiche d'entité (agence, modèle) ----------------------------------------------- */
.entity { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.entity .who { flex: 1; min-width: 200px; }
.entity .who h2 { font-size: 22px; letter-spacing: -.02em; margin: 0 0 2px; }
.entity .who .sub { font-size: 13.5px; }
.entity .facts-row { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); margin-top: 6px; }
.entity .facts-row strong { color: var(--text); font-variant-numeric: tabular-nums; }
.entity .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.model-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); color: var(--text); transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.model-card:hover { text-decoration: none; border-color: var(--line-2); box-shadow: var(--shadow-2); }
.model-card .who { flex: 1; min-width: 0; }
.model-card .who strong { display: block; font-size: 15px; }
.model-card .meta { font-size: 12.5px; color: var(--text-2); }
.model-card .ic.chev { color: var(--text-3); }
.members-form { display: flex; flex-wrap: wrap; gap: 8px; }
.members-form .check { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.shift-cell { display: grid; gap: 5px; justify-items: start; }
form.inline.shift-form { flex-wrap: nowrap; gap: 6px; }
.shift-form input { width: 64px; padding: 7px 6px; text-align: center; font-variant-numeric: tabular-nums; }
.shift-form .dash { color: var(--text-3); }

/* --- Vault -------------------------------------------------------------------------- */
.dropzone { position: relative; display: grid; justify-items: center; gap: 6px; padding: 26px 20px; border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); background: var(--surface); text-align: center; color: var(--text-2); transition: border-color .15s var(--ease), background-color .15s var(--ease); }
.dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone.has-error { border-color: var(--bad); }
.dropzone .ic { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); }
.dropzone strong { color: var(--text); font-size: 14.5px; }
.dropzone input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone .upload-track { width: 100%; max-width: 420px; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 6px; display: none; }
.dropzone .upload-progress { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .2s linear; }
.dropzone .upload-status { font-size: 12.5px; color: var(--text-2); min-height: 18px; display: none; }
.dropzone.is-busy .upload-track, .dropzone.is-busy .upload-status, .dropzone.has-error .upload-status { display: block; }
.dropzone.is-busy input[type=file] { pointer-events: none; }
.dropzone.has-error .upload-status { color: var(--bad); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.media { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1); display: grid; }
.media-thumb { position: relative; display: block; aspect-ratio: 4 / 5; background: var(--surface-3); border: 0; padding: 0; cursor: pointer; width: 100%; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-thumb .ic.placeholder { position: absolute; inset: 0; margin: auto; width: 32px; height: 32px; color: var(--text-3); }
.media-kind { position: absolute; top: 8px; left: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; background: rgba(11, 12, 14, .72); color: #fff; font-size: 11.5px; font-weight: 600; backdrop-filter: blur(6px); }
.media-kind .ic { width: 12px; height: 12px; }
.media-price { position: absolute; right: 8px; bottom: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--text); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; box-shadow: var(--shadow-1); }
.media-body { padding: 10px 12px 12px; display: grid; gap: 4px; }
.media-body strong { font-size: 13.5px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-body .sub { font-size: 12px; }
.media-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.media-tags span { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.media-edit { display: none; padding: 0 12px 12px; border-top: 1px solid var(--line); }
.media.is-open .media-edit { display: block; padding-top: 12px; }
.media-edit .grid-form { grid-template-columns: 1fr 1fr; gap: 8px; }
.media-edit label { font-size: 12px; }
.media-edit input { padding: 7px 9px; font-size: 13.5px; }
.vault-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }

/* --- Scripts --------------------------------------------------------------------------- */
.script-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.script { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow-1); display: grid; gap: 10px; }
.script.off { opacity: .6; }
.script-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.script-head strong { font-size: 15px; }
.script-steps { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.script-steps li { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 10px 6px 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--ground); font-size: 13px; color: var(--text-2); }
.script-steps li img { width: 30px; height: 30px; border-radius: 6px; object-fit: cover; }
.script-steps li .txt { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.steps-list { display: grid; gap: 10px; }
.step { display: grid; grid-template-columns: 28px minmax(0, 1fr) 34px; gap: 10px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--ground); }
.step-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.step textarea { min-height: 60px; }

/* --- Connexion, création de compte, pages hors coque ------------------------------------ */
body.bare { display: grid; place-items: start center; padding: 0 16px; background: radial-gradient(900px 400px at 50% -200px, rgba(24, 119, 242, .10), transparent 70%) no-repeat, var(--ground); }
.auth { width: 100%; max-width: 420px; margin: 9vh auto 40px; padding: 30px; }
.auth.wide { max-width: 800px; }
.auth .brand { color: var(--text); margin-bottom: 26px; }
.auth h1 { font-size: 24px; margin-bottom: 4px; }
.auth .lede { color: var(--text-2); margin: 0 0 22px; font-size: 14px; }
.auth form .btn { margin-top: 4px; min-height: 42px; }
.setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 20px; }
.qr, .tg-qr { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; width: 220px; }
.qr svg { width: 100%; height: auto; display: block; }
.tg-qr { width: 240px; height: 240px; padding: 10px; }
.tg-qr img { width: 100%; height: 100%; display: block; }
.secret { word-break: break-all; }
.steps { padding-left: 20px; display: grid; gap: 10px; align-content: start; margin: 0 0 12px; }
#tg-login h1 { margin-bottom: 16px; }

/* --- Fiche candidat ----------------------------------------------------------------------- */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { display: grid; gap: 2px; margin: 0; }
.kpi span { color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.kpi strong { font-size: 30px; font-weight: 700; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.kpi strong small { font-size: 15px; color: var(--text-3); font-weight: 500; }
.kpi em { font-style: normal; color: var(--text-3); font-size: 12.5px; }
.two-col { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; align-items: start; }
.two-col > .col { min-width: 0; }
.two-col > .col > .card:last-child { margin-bottom: 0; }
.two-col.even { align-items: stretch; }
.two-col.even > .card { display: flex; flex-direction: column; justify-content: flex-start; gap: 2px; margin-bottom: 16px; }
.two-col.even > .card > .push { margin-top: 12px; }
.report { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }
.report-head { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; }
.lead { font-size: 15px; line-height: 1.6; margin: 0 0 12px; }
.criteria th { width: 160px; font-weight: 500; color: var(--text-2); }
.criteria meter { width: 100%; height: 6px; appearance: none; border: 0; border-radius: 999px; background: var(--surface-3); }
.criteria meter::-webkit-meter-bar { background: var(--surface-3); border: 0; border-radius: 999px; height: 6px; }
.criteria meter::-webkit-meter-optimum-value { background: var(--accent); border-radius: 999px; }
.criteria meter::-moz-meter-bar { background: var(--accent); border-radius: 999px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cols ul, .redflags { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.redflags li { color: var(--bad); }
blockquote { margin: 0 0 8px; padding: 10px 14px; background: var(--ground); border: 1px solid var(--line); border-radius: var(--r-md); white-space: pre-wrap; font-size: 14px; }
.facts { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
.facts dt { color: var(--text-2); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.history { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 13.5px; }
.history .muted { font-variant-numeric: tabular-nums; margin-right: 6px; }

/* --- Conversations (test et transcription) -------------------------------------------------- */
.transcript, .messages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bubble { max-width: 74%; padding: 8px 12px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.45; animation: rise .22s var(--ease); }
.bubble.fan { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 6px; }
.bubble.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.bubble.flagged { box-shadow: 0 0 0 2px var(--bad); }
.bubble.queued { opacity: .72; }
.bubble.draft { align-self: stretch; max-width: none; background: var(--warn-soft); border: 1px dashed var(--warn); white-space: normal; }
.bubble.draft textarea { width: 100%; }
.todo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.todo-list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bubble .who { display: block; font-size: 11.5px; font-weight: 600; color: var(--text-2); margin-bottom: 2px; }
.bubble.me .who { color: rgba(255, 255, 255, .9); }
.bubble.me .who b { color: #fff; }
.event { align-self: center; font-size: 12.5px; font-weight: 600; padding: 5px 12px; border-radius: 999px; margin: 4px 0; animation: rise .22s var(--ease); }
.event.offer { background: var(--warn-soft); color: var(--warn); }
.event.purchase { background: var(--good-soft); color: var(--good); }
.event.gift { background: var(--accent-soft); color: var(--accent); }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* --- Test candidat ---------------------------------------------------------------------------- */
body.candidate { display: block; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 58px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .brand { color: var(--text); }
.page { max-width: 1120px; margin: 0 auto; padding: 24px 24px 64px; }
.candidate .intro { max-width: 680px; margin: 7vh auto 0; padding: 30px 32px; }
.candidate .intro h1 { font-size: 28px; margin-bottom: 10px; }
.rules { padding-left: 0; list-style: none; display: grid; gap: 10px; margin: 20px 0 26px; }
.rules li { padding: 12px 14px; background: var(--ground); border: 1px solid var(--line); border-radius: var(--r-md); }
.test-tools { display: flex; align-items: center; gap: 12px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; padding: 5px 11px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.timer.late { background: var(--bad-soft); color: var(--bad); border-color: rgba(198, 40, 40, .3); }
.chat-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.chat { display: flex; flex-direction: column; padding: 0; height: calc(100vh - 124px); min-height: 480px; overflow: hidden; }
.chat-head { display: flex; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
.chat-head small { display: block; color: var(--text-2); font-size: 12.5px; }
.messages { flex: 1; overflow-y: auto; padding: 18px; background: var(--ground); }
.typing { margin: 0; padding: 6px 18px; color: var(--text-2); font-size: 13px; background: var(--ground); }
.chat-error { margin: 0; padding: 6px 18px; color: var(--bad); font-size: 13px; background: var(--ground); }
.composer { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; padding: 10px 14px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.composer textarea { flex: 1; min-width: 0; }
.composer-tools { flex-basis: 100%; display: flex; gap: 6px; }
.composer-tools .btn { min-height: 30px; padding: 0 10px; font-size: 13px; }
.composer textarea { min-height: 44px; max-height: 140px; }
.composer .btn { min-height: 44px; }
.vault { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; }
.vault h2 { margin-bottom: 4px; }
.vault-items { list-style: none; padding: 0; margin: 10px 0 0; display: grid; }
.offer { display: grid; gap: 3px; padding: 12px 0; border-top: 1px solid var(--line); }
.offer:first-child { border-top: 0; }
.offer strong { font-size: 14px; }
.offer small { color: var(--text-2); font-size: 12.5px; }
.offer-row { display: grid; grid-template-columns: auto minmax(56px, 1fr) auto auto; gap: 6px; align-items: center; margin-top: 8px; }
.offer-row input { padding: 6px 8px; min-height: 32px; }
.dollar { color: var(--text-2); font-weight: 600; }

/* --- Annonces -------------------------------------------------------------------------------- */
.statusline { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 0; list-style: none; color: var(--text-2); font-size: 13px; }
.statusline strong { color: var(--text); }
.items { list-style: none; padding: 0; margin: 0 0 14px; display: grid; }
.item { display: grid; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; padding-top: 4px; }
.item.off > .item-head strong, .item.off .meta { color: var(--text-3); }
.item.off > .item-head strong { color: var(--text-2); }
.item p { margin: 0; }
.item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.item-head form { margin: 0; flex: none; }
.item textarea { font-size: 14px; }
/* Groupes Telegram repliés (Annonces, 28/10) : une ligne par groupe, le bouton Activer/Désactiver reste à droite. */
.item.group { position: relative; display: block; padding: 0; }
.group-fold > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-height: 52px; padding: 10px 124px 10px 22px; cursor: pointer; list-style: none; position: relative; }
.group-fold > summary::-webkit-details-marker { display: none; }
.group-fold > summary::before { content: ""; position: absolute; left: 4px; top: 50%; width: 6px; height: 6px; border-right: 1.6px solid var(--text-3); border-bottom: 1.6px solid var(--text-3); transform: translateY(-60%) rotate(-45deg); transition: transform .2s var(--ease); }
.group-fold[open] > summary::before { transform: translateY(-70%) rotate(45deg); }
.group-fold > summary .when { font-size: 12.5px; color: var(--text-3); }
.item.off .group-fold > summary strong { color: var(--text-2); }
.group-body { display: grid; gap: 8px; padding: 0 0 14px 22px; }
.group-toggle { position: absolute; top: 10px; right: 0; margin: 0; }
.meta { font-size: 13.5px; color: var(--text-2); }
details.edit > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; cursor: pointer; list-style: none; color: var(--accent); font-size: 13.5px; font-weight: 600; }
details.edit > summary::-webkit-details-marker { display: none; }
details.edit > summary::after { content: ""; width: 6px; height: 6px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s var(--ease); }
details.edit[open] > summary::after { transform: rotate(225deg) translateY(-1px); }
details.edit[open] { flex-basis: 100%; }
details.edit[open] > summary { margin-bottom: 8px; }
/* Section repliée et discrète (Annonces : journal, réglages) : une ligne grise qui résume, le détail au clic. */
details.fold { border-top: 1px solid var(--line); }
details.fold:last-of-type { border-bottom: 1px solid var(--line); }
details.fold > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 2px; cursor: pointer; list-style: none; color: var(--text-3); font-size: 13px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary strong { color: var(--text-2); font-weight: 600; }
details.fold > summary > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.fold > summary .bad { color: var(--bad); }
details.fold > summary::after { content: ""; flex: none; margin-left: auto; width: 6px; height: 6px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s var(--ease); }
details.fold[open] > summary::after { transform: rotate(225deg) translateY(-1px); }
details.fold > summary:hover, details.fold[open] > summary { color: var(--text-2); }
details.fold > .fold-body { padding: 4px 0 18px; }
details.fold .table-wrap { margin-bottom: 0; }
.edit-panel { padding: 14px; background: var(--ground); border: 1px solid var(--line); border-radius: 12px; }
.preview { white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px 14px; background: var(--ground); border: 1px solid var(--line); border-radius: var(--r-md); font-size: 13.5px; line-height: 1.55; max-height: 260px; overflow-y: auto; }
.preview-wrap { position: relative; }
.preview-wrap .preview { padding-bottom: 50px; }
.copy-corner { position: absolute; right: 10px; bottom: 10px; background: var(--surface); }
.linkph { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.account-row { display: flex; align-items: center; gap: 12px; }
.account-row form { margin: 0 0 0 auto; }

/* --- Utilitaires d'espacement (la CSP interdit les styles inline) ----------------------------- */
.mt0 { margin-top: 0; } .mt8 { margin-top: 8px; } .mt10 { margin-top: 10px; } .mt14 { margin-top: 14px; } .mt16 { margin-top: 16px; }
.mb0 { margin-bottom: 0; } .mb8 { margin-bottom: 8px; } .mb14 { margin-bottom: 14px; } .mb18 { margin-bottom: 18px; }
.ml-auto { margin-left: auto; } .grow { flex: 1; min-width: 240px; } .minw140 { min-width: 140px; } .minw280 { min-width: 280px; } .maxw800 { max-width: 800px; }
.step > * { min-width: 0; }
.list td > form, .list td .members-form { max-width: 100%; }

/* --- Écrans moyens et petits ------------------------------------------------------------------------ */
@media (max-width: 1100px) {
  .queue { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  html.rail-collapsed .app { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 40; transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: none; }
  html.rail-open .rail { transform: none; box-shadow: var(--shadow-2); }
  html.rail-collapsed .brand .brand-name, html.rail-collapsed .rail-title, html.rail-collapsed .rail-link .lbl, html.rail-collapsed .rail-link .cnt, html.rail-collapsed .whoami .who, html.rail-collapsed .whoami form { display: revert; }
  html.rail-collapsed .rail-link { justify-content: flex-start; padding: 0 12px; }
  html.rail-collapsed .rail-nav { padding-top: 14px; }
  html.rail-collapsed .rail-head { justify-content: space-between; padding: 0 14px 0 18px; }
  html.rail-collapsed .whoami { justify-content: flex-start; padding: 8px 10px; }
  .rail-toggle { display: none !important; }
  .backdrop { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(11, 12, 14, .45); opacity: 0; pointer-events: none; transition: opacity .2s var(--ease); }
  html.rail-open .backdrop { opacity: 1; pointer-events: auto; }
  .mbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20; height: 56px; padding: 0 12px 0 8px; background: var(--rail); color: #fff; }
  .mbar .brand { font-size: 15px; }
  .mbar .brand-mark { width: 28px; height: 28px; font-size: 14px; }
  .menu-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: #fff; cursor: pointer; }
  .page-head { padding: 14px 16px; min-height: 0; }
  .page-body { padding: 16px 16px 48px; }
  h1 { font-size: 24px; }
  .kpis, .cols, .setup-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 2px 0; }
  .facts dd { margin-bottom: 8px; }
  .chat-layout { grid-template-columns: 1fr; }
  .chat { height: 70vh; }
  .vault { position: static; max-height: none; }
  .bubble { max-width: 86%; }
  .report-head { flex-direction: column; }
  .step { grid-template-columns: 28px minmax(0, 1fr) 34px; }
  .step select { grid-column: 2; }
  .script-steps li .txt { max-width: 200px; }
  .page { padding: 16px 16px 48px; }
  .topbar { padding: 0 16px; }
}
@media (max-width: 720px) {
  .table-wrap { overflow: visible; }
  .list.stack-sm thead { display: none; }
  .list.stack-sm, .list.stack-sm tbody { display: block; }
  .list.stack-sm tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .list.stack-sm tbody tr:last-child { border-bottom: 0; }
  .list.stack-sm td { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding: 0; border: 0; font-size: 13.5px; text-align: left; min-width: 0; }
  .list.stack-sm td > * { min-width: 0; max-width: 100%; }
  form.inline select { min-width: 0; }
  .list.stack-sm td[data-label]::before { content: attr(data-label); color: var(--text-3); font-size: 12.5px; font-weight: 500; }
  .list.stack-sm td.span, .list.stack-sm td.span-sm { grid-column: 1 / -1; }
  .list.stack-sm td.actions { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .queue { gap: 8px; }
  .q { padding: 12px 14px; }
  .q-n { font-size: 22px; }
  .item-head { flex-direction: column; }
  .account-row { flex-wrap: wrap; }
  .account-row form { margin-left: 0; }
  .auth { margin-top: 4vh; padding: 24px 20px; }
  .candidate .intro { padding: 24px 20px; }
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .entity { gap: 12px; }
}
/* Tactile : cibles de 40 px et champs à 16 px (iOS n'agrandit pas la page au focus). */
@media (pointer: coarse) {
  .tabs a { padding: 12px 14px; }
  .tabs.pills a { padding: 9px 14px; }
  .btn.small { min-height: 40px; }
  .seg button { width: 36px; height: 32px; }
  .rail-link { height: 46px; }
  input, select, textarea { font-size: 16px; }
  .tabs a, .btn, .q, .rail-link, .folder { touch-action: manipulation; }
}
/* Téléphone : zones sûres (encoche, barre d'accueil). */
@media (max-width: 900px) {
  .mbar { padding-top: env(safe-area-inset-top); height: calc(56px + env(safe-area-inset-top)); }
  .rail { padding-top: env(safe-area-inset-top); }
  .page-body { padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .list tbody tr.is-last-seen, li.is-last-seen { background: var(--accent-soft); }
}

/* --- Conversations (CRM) ------------------------------------------------------------------- */
.crm { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: stretch; height: calc(100vh - 330px); min-height: 540px; }
.crm-list { display: flex; flex-direction: column; min-height: 0; }
.crm-tools { display: flex; gap: 8px; align-items: center; padding: 12px; border-bottom: 1px solid var(--line); }
.crm-tools form { margin: 0; }
.crm-health { display: flex; align-items: center; gap: 6px; margin: 0; padding: 8px 14px; font-size: 12.5px; border-bottom: 1px solid var(--line); }
.crm-health.good { color: var(--good); }
.crm-health.bad { color: var(--bad); }
.fan-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.fan a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); color: var(--text); }
.fan:first-child a { border-top: 0; }
.fan a:hover { text-decoration: none; background: #fafbfc; }
.fan.is-active a { background: var(--accent-soft); }
.fan-main { flex: 1; min-width: 0; display: grid; }
.fan-main strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fan-main .sub { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fan-side { display: grid; justify-items: end; gap: 4px; font-size: 12px; }
.unread { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; }
.crm-pane { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.crm-pane .chat-head { gap: 10px; flex-wrap: wrap; }
.crm-pane .chat-head .who { flex: 1; min-width: 160px; }
.crm-pane .chat-head .who strong { display: block; }
.crm-back { display: none; color: var(--text-2); }
.crm-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.crm-actions form { margin: 0; }
.crm-actions select { min-width: 150px; padding: 6px 30px 6px 10px; font-size: 13.5px; }
.crm-empty { margin: auto; }
.media-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; margin: 2px 0 4px; border-radius: 999px; background: rgba(0, 0, 0, .06); font-size: 12.5px; font-weight: 600; }
.bubble.me .media-chip { background: rgba(255, 255, 255, .18); }
.bubble.has-media { display: grid; gap: 2px; }
.journal-text { white-space: pre-wrap; overflow-wrap: anywhere; display: block; max-width: 520px; font-size: 13.5px; }
@media (max-width: 1100px) {
  .crm { grid-template-columns: 280px minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .crm { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .crm-list { max-height: 60vh; }
  .crm.has-fan .crm-list { display: none; }
  .crm.has-fan .crm-pane { height: calc(100vh - 150px); min-height: 480px; }
  .crm:not(.has-fan) .crm-pane { display: none; }
  .crm-back { display: inline-grid; }
  .crm-actions { width: 100%; justify-content: flex-start; }
}

/* --- Offres du vault et lots dans le chat ------------------------------------------------ */
.offer-chip.s-envoyee { background: var(--warn-soft); color: var(--warn); }
.offer-chip.s-payee, .offer-chip.s-livree { background: var(--good-soft); color: var(--good); }
.offer-chip.s-echec { background: var(--bad-soft); color: var(--bad); }
.bubble.me .offer-chip.s-envoyee, .bubble.me .offer-chip.s-payee, .bubble.me .offer-chip.s-livree, .bubble.me .offer-chip.s-echec { background: #fff; }
.offer-chip .offer-state { font-weight: 700; }

dialog.sheet { width: min(980px, calc(100vw - 32px)); max-height: min(860px, calc(100vh - 48px)); padding: 0; border: 0; border-radius: var(--r-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-2); overflow: hidden; }
dialog.sheet[open] { display: flex; flex-direction: column; animation: rise .22s var(--ease); }
dialog.sheet::backdrop { background: rgba(11, 12, 14, .55); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-size: 17px; }
.sheet-cats { margin: 12px 18px 0; flex: none; }
.tabs.pills.sheet-cats { max-width: calc(100% - 36px); }
.bubble.has-media .media-chip { justify-self: start; }
.pick-grid { flex: 1; min-height: 160px; overflow-y: auto; margin: 0; padding: 12px 18px 16px; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; align-content: start; }
.pick-empty { grid-column: 1 / -1; padding: 40px 0; text-align: center; color: var(--text-2); list-style: none; }
.pick { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: var(--surface-3); cursor: pointer; box-shadow: 0 0 0 1px var(--line); transition: box-shadow .15s var(--ease), transform .15s var(--ease); }
.pick:hover { box-shadow: 0 0 0 1px var(--line-2), var(--shadow-1); }
.pick.is-on { box-shadow: 0 0 0 3px var(--accent); }
.pick.is-full { animation: nudge .3s var(--ease); }
.pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick input { position: absolute; top: 8px; left: 8px; z-index: 1; width: 18px; height: 18px; }
.pick-blank { display: grid; place-items: center; width: 100%; height: 100%; color: var(--text-3); }
.pick-badge { position: absolute; top: 7px; right: 7px; display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px; border-radius: 999px; background: rgba(11, 12, 14, .72); color: #fff; font-size: 11px; font-weight: 600; }
.pick-badge .ic { width: 11px; height: 11px; }
.pick-price { position: absolute; right: 7px; bottom: 30px; padding: 2px 7px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: var(--text); font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pick-price.free { color: var(--good); }
.pick-flag { position: absolute; left: 7px; bottom: 30px; padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--warn-soft); color: var(--warn); backdrop-filter: blur(4px); }
.pick-flag.h-achete, .pick-flag.h-offert { background: rgba(255, 255, 255, .94); color: var(--good); }
.pick-name { position: absolute; inset: auto 0 0 0; padding: 14px 8px 6px; font-size: 11.5px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: linear-gradient(transparent, rgba(11, 12, 14, .78)); }
.sheet-foot { flex: none; display: grid; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.sheet-foot textarea { min-height: 44px; max-height: 120px; }
.offer-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.offer-count { flex: 1; min-width: 120px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.price-field { display: inline-flex; align-items: center; gap: 0; width: 120px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface); }
.price-field:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.price-field span { padding-left: 12px; color: var(--text-2); font-weight: 600; }
.price-field input { border: 0; box-shadow: none !important; padding-left: 6px; font-variant-numeric: tabular-nums; }
.price-field input:focus-visible { outline: none; }
.offer-stars { min-width: 72px; font-size: 13.5px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.offer-hint { margin: 0; font-size: 12.5px; color: var(--text-2); min-height: 18px; }
.pick-foot { grid-template-columns: 1fr auto; align-items: center; }
.lots-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.lot-picker { margin: 0; padding: 10px; list-style: none; overflow-y: auto; border-right: 1px solid var(--line); background: var(--ground); display: grid; gap: 4px; align-content: start; }
.lot-picker button { display: grid; gap: 2px; width: 100%; padding: 9px 11px; border: 0; border-radius: 9px; background: transparent; color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.lot-picker button:hover { background: var(--surface-2); }
.lot-picker button.is-current { background: var(--accent-soft); }
.lot-picker button.is-current strong { color: var(--accent); }
.lot-picker strong { font-size: 14px; }
.lot-picker .sub { font-size: 12px; }
.lot-detail { overflow-y: auto; padding: 14px 18px 18px; }
.lot-detail-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.lot-detail-head strong { font-size: 16px; }
.lot-back { display: none; }
.link-btn { flex: none; border: 0; background: none; padding: 0 4px; color: var(--accent); font: 600 12.5px/1.4 var(--font); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
@keyframes nudge { 0%, 100% { transform: none; } 30% { transform: translateX(-3px); } 60% { transform: translateX(3px); } }

/* --- Lots en étapes (onglet Scripts et fenêtre du chat) ------------------------------------------ */
.lot-cards { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.lot { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow-1); display: grid; gap: 10px; }
.lot.off { opacity: .6; }
.lot-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lot-title strong { font-size: 15px; margin-right: 4px; }
.lot-head form { display: flex; gap: 6px; margin: 0; }
.lot-context { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--ground); color: var(--text-2); font-size: 13px; line-height: 1.5; }
.lot-steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.lot-step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.lot-step.paid { border-color: rgba(21, 128, 61, .28); background: rgba(21, 128, 61, .03); }
.lot-step-body { display: grid; gap: 6px; min-width: 0; }
.lot-step-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.lot-text { margin: 0; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.lot-media { display: flex; gap: 6px; flex-wrap: wrap; }
.lot-thumb { position: relative; display: block; width: 54px; aspect-ratio: 3 / 4; border-radius: 7px; overflow: hidden; background: var(--surface-3); box-shadow: 0 0 0 1px var(--line); }
.lot-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lot-thumb .pick-badge { top: auto; bottom: 3px; right: 3px; padding: 0 4px; font-size: 9.5px; }
.lot-followups { margin: 2px 0 0; padding: 0; list-style: none; display: grid; gap: 3px; }
.lot-followups li { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; color: var(--text-2); }
.lot-followups li::before { content: "↺"; color: var(--text-3); flex: none; }
.lot-followups li span { flex: 1; min-width: 0; }
.step-fields { display: grid; gap: 8px; min-width: 0; }
.step-media { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.step-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.step-chips .lot-thumb { width: 36px; }
.step-prices { display: grid; grid-template-columns: repeat(2, minmax(0, 140px)); gap: 8px; }
.step-prices label { font-size: 12px; }
.step-prices input { padding: 6px 9px; font-size: 13.5px; }

@media (max-width: 720px) {
  dialog.sheet { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .pick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 10px 12px; }
  .sheet-head, .sheet-foot { padding-left: 14px; padding-right: 14px; }
  .sheet-cats { margin: 10px 12px 0; }
  .tabs.pills.sheet-cats { max-width: calc(100% - 24px); }
  .offer-count { flex-basis: 100%; }
  .lots-body { grid-template-columns: 1fr; }
  .lot-picker { border-right: 0; }
  dialog.sheet.has-lot .lot-picker { display: none; }
  dialog.sheet:not(.has-lot) .lot-detail { display: none; }
  .lot-back { display: inline-flex; }
  .price-field { width: 104px; }
}
@media (prefers-reduced-motion: reduce) {
  dialog.sheet[open], .pick.is-full { animation: none; }
}

/* --- Pointage des chatteurs ----------------------------------------------------------------- */
.shift-bar { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); }
.shift-bar strong { font-size: 14px; }
.shift-bar .sub { font-size: 13px; }
.shift-bar form { margin: 0 0 0 auto; }
.shift-bar.on { border-color: rgba(21, 128, 61, .3); background: var(--good-soft); }
.shift-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(21, 128, 61, .18); flex: none; }
.shift-who { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.shift-who form { margin: 0; }

/* --- Versions filigranées et visionneuse ---------------------------------------------------- */
.media { position: relative; }
.media-view { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 999px; background: rgba(11, 12, 14, .66); color: #fff; cursor: zoom-in; }
.media-view:hover { background: rgba(11, 12, 14, .82); }
.media-price.free { color: var(--good); }
.pick-view { position: absolute; top: 6px; right: 6px; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 999px; background: rgba(11, 12, 14, .62); color: #fff; cursor: zoom-in; }
.pick-view:hover { background: rgba(11, 12, 14, .85); }
.pick-badge { right: 40px; }
button.lot-thumb { padding: 0; border: 0; cursor: zoom-in; font: inherit; }
dialog.viewer { width: min(860px, calc(100vw - 32px)); }
.viewer-body { flex: 1; min-height: 0; display: grid; place-items: center; gap: 10px; padding: 14px; background: #0b0c0e; overflow: auto; }
.viewer-body img, .viewer-body video { max-width: 100%; max-height: calc(100vh - 170px); border-radius: 8px; user-select: none; -webkit-user-drag: none; }
.viewer-note { margin: 0; color: #c9ced6; font-size: 13px; }
@media (max-width: 720px) {
  .shift-bar form { margin-left: 0; }
  .viewer-body img, .viewer-body video { max-height: calc(100dvh - 120px); }
}

/* --- Commissions ------------------------------------------------------------------- */
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.card-head.padded { padding: 18px 22px 0; }
.list tr.is-off td { color: var(--text-3); }
.stmt-amount { display: flex; align-items: center; gap: 10px; flex: none; }
.stmt-amount strong { font-size: 20px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.items.stmts, .stmts .item, .rows.ledger { grid-template-columns: minmax(0, 1fr); }
.copyrow.wallet { align-items: center; flex-wrap: wrap; max-width: 720px; }
.copyrow.wallet input { flex: 1 1 220px; min-width: 0; }
.ledger .who .tag { display: block; width: fit-content; margin-top: 4px; }
.tag.clip { max-width: 220px; }
.list td.nowrap { white-space: nowrap; }
.facts.tight { grid-template-columns: 210px 1fr; gap: 6px 16px; font-size: 13.5px; }
.facts.tight dd { font-variant-numeric: tabular-nums; }
.tx-form input { width: 320px; max-width: 100%; font-family: var(--mono); font-size: 13px; }
.tiers .row { justify-content: space-between; }
.tiers .row strong { font-variant-numeric: tabular-nums; }
.tiers .row.is-current, .tiers .row.is-current strong { color: var(--accent); }

@media (max-width: 720px) {
  .facts.tight { grid-template-columns: 1fr; gap: 2px 0; }
  .facts.tight dd { margin-bottom: 8px; }
  .stmt-amount strong { font-size: 18px; }
}
input.mono-input { font-family: var(--mono); font-size: 13px; }

/* --- Mon espace : panneau des ventes arrêté au niveau des paliers, dépliable ------------------ */
.sales-col { align-items: stretch; }
.sales-col .side > .card:last-child { margin-bottom: 0; }
.capped-cell { position: relative; min-height: 300px; }
.card.capped { position: absolute; inset: 0; margin: 0; display: flex; flex-direction: column; }
.card.capped.is-open { position: static; }
.capped-body { flex: 1; min-height: 0; overflow: hidden; }
.card.capped.is-open .capped-body { overflow: visible; }
.capped-foot { display: none; position: relative; z-index: 1; margin-top: -44px; padding: 26px 18px 14px; text-align: center; background: linear-gradient(rgba(255, 255, 255, 0), var(--surface) 55%); }
.card.capped.is-overflow .capped-foot, .card.capped.is-open .capped-foot { display: block; }
.card.capped.is-open .capped-foot { margin-top: 0; padding-top: 12px; background: none; border-top: 1px solid var(--line); }
.card.capped.is-open .capped-foot .ic { transform: rotate(180deg); }
@media (max-width: 1100px) {
  .capped-cell { min-height: 0; }
  .card.capped { position: static; margin-bottom: 16px; }
  .capped-body { max-height: 540px; }
  .card.capped.is-open .capped-body { max-height: none; }
}

/* --- Page du compte façon Wysper : en-tête, configuration CRM, deux volets (catégories + contenu) ------- */
.acct-title { display: inline-flex; align-items: center; gap: 14px; }
.acct-avatar { position: relative; overflow: visible; }
.acct-dot { position: absolute; right: 2px; bottom: 2px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--surface); background: var(--text-3); }
.acct-dot.m-connecte { background: var(--good); }
.acct-dot.m-deconnecte { background: var(--bad); }
.accounts { list-style: none; margin: 0; padding: 0; }
.account { display: flex; align-items: center; gap: 16px; padding: 16px 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.account:first-child { border-top: 0; }
.account .who { flex: 1; min-width: 200px; }
.account .who strong { display: block; font-size: 16px; }
.account .meta { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card.cfg { margin-bottom: 16px; }
.cfg-head { padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.cfg-head h2 { margin: 0 0 2px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.cfg-head p { margin: 0; color: var(--text-2); font-size: 13.5px; }
.cfg-row { display: flex; align-items: center; gap: 16px; width: 100%; padding: 16px 22px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; font: inherit; cursor: pointer; transition: background-color .12s var(--ease); }
.cfg-row:first-of-type, .cfg-head + .cfg-row { border-top: 0; }
button.cfg-row:hover { background: #fafbfc; }
.cfg-row.static { cursor: default; }
.cfg-row > .ic { width: 42px; height: 42px; padding: 11px; border-radius: 12px; background: var(--surface-2); color: var(--text-2); }
.cfg-main { flex: 1; min-width: 0; }
.cfg-main strong { display: block; font-size: 15px; }
.cfg-go { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-size: 14px; font-weight: 500; }
.pad { padding: 0 22px 16px; }
.two-pane { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden; }
.pane-side { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.pane-side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 18px 18px 10px; }
.pane-side-head h2 { margin: 0; font-size: 18px; }
.folders { list-style: none; margin: 0; padding: 6px 10px 14px; display: grid; gap: 2px; overflow-y: auto; }
.folder { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--text); text-align: left; font: inherit; cursor: pointer; transition: background-color .12s var(--ease); }
.folder:hover { background: var(--surface-2); }
.folder.on { background: var(--surface-2); }
.folder .fic { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); }
.folder.on .fic { background: var(--accent); color: #fff; }
.folder .ft { flex: 1; min-width: 0; }
.folder .ft strong { display: block; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.folder .ft span { font-size: 12.5px; color: var(--text-2); }
.folder .fa { display: none; gap: 2px; }
.folder:hover .fa, .folder.on .fa { display: inline-flex; }
.folder.drop-over { outline: 2px dashed var(--accent); outline-offset: -2px; background: var(--accent-soft); }
.fa .btn.icon { width: 28px; min-height: 28px; border-color: transparent; box-shadow: none; background: transparent; }
.pane-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 20px 12px; }
.pane-head h2 { margin: 0; font-size: 20px; display: flex; align-items: center; gap: 10px; }
.pane-head h2 .count { font-size: 13px; color: var(--text-2); font-weight: 500; }
.pane-head .tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pane-head .tools input[type=search] { width: 220px; padding: 7px 10px; }
.pane-sub { padding: 0 20px 10px; color: var(--text-2); font-size: 13.5px; }
.select-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 20px 10px; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); font-size: 13.5px; font-weight: 600; color: var(--accent); }
.select-bar .btn { min-height: 30px; }
.select-bar .spacer { flex: 1; }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.seg button { display: inline-grid; place-items: center; width: 30px; height: 26px; border: 0; border-radius: 6px; background: transparent; color: var(--text-2); cursor: pointer; }
.seg button.on { background: var(--surface-2); color: var(--text); }
.vgrid { flex: 1; min-height: 0; overflow-y: auto; margin: 0; padding: 4px 20px 20px; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; align-content: start; }
.vcard { position: relative; display: grid; gap: 6px; }
.vcard .vthumb { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: var(--surface-3); border: 0; padding: 0; width: 100%; cursor: pointer; box-shadow: 0 0 0 1px var(--line); transition: box-shadow .15s var(--ease); }
.vcard .vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vcard.on .vthumb { box-shadow: 0 0 0 3px var(--accent); }
.vcard .vcheck { position: absolute; top: 8px; left: 8px; z-index: 1; width: 22px; height: 22px; border-radius: 6px; border: 2px solid rgba(255, 255, 255, .9); background: rgba(0, 0, 0, .35); display: grid; place-items: center; color: #fff; cursor: pointer; opacity: 0; transition: opacity .15s var(--ease); }
.vcard:hover .vcheck, .vcard.on .vcheck, .vgrid.selecting .vcheck { opacity: 1; }
.vcard.on .vcheck { background: var(--accent); border-color: var(--accent); }
.vcard .vcheck .ic { width: 13px; height: 13px; opacity: 0; }
.vcard.on .vcheck .ic { opacity: 1; }
.vcard .vkind { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; background: rgba(11, 12, 14, .72); color: #fff; font-size: 11px; font-weight: 600; }
.vcard .vkind .ic { width: 11px; height: 11px; }
.vcard .vprice { position: absolute; right: 8px; bottom: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: var(--text); font-size: 12px; font-weight: 700; }
.vcard .vprice.free { color: var(--good); }
.vcard .vprice.none { color: var(--warn); }
.vcard .veye { position: absolute; left: 8px; bottom: 8px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(11, 12, 14, .66); color: #fff; display: grid; place-items: center; cursor: zoom-in; opacity: 0; transition: opacity .15s var(--ease); }
.vcard:hover .veye { opacity: 1; }
.vcard .vname { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
.vcard .vname.none { font-style: italic; color: var(--text-3); }
.vcard[draggable=true] { cursor: grab; }
.vcard.dragging { opacity: .4; }
.slist { flex: 1; min-height: 0; overflow-y: auto; margin: 0; padding: 4px 20px 20px; list-style: none; display: grid; gap: 10px; align-content: start; }
.slist.grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.scard { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.scard:hover { border-color: var(--line-2); box-shadow: var(--shadow-1); }
.scard.on { border-color: var(--accent); background: var(--accent-soft); }
.scard.off { opacity: .55; }
.scard .sthumb { position: relative; width: 72px; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--surface-3); display: grid; place-items: center; color: var(--text-3); border: 0; padding: 0; cursor: zoom-in; }
.scard .sthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scard .sthumb .more { position: absolute; right: 4px; bottom: 4px; padding: 1px 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700; }
.scard .sthumb .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.scard .sthumb .play .ic { width: 28px; height: 28px; padding: 7px; border-radius: 50%; background: rgba(0, 0, 0, .55); }
.scard .sbody { display: grid; gap: 3px; min-width: 0; }
.scard .sbody strong { font-size: 14.5px; }
.scard .sbody .cap { font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.scard .sfoot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin-top: 4px; }
.scard .sfoot .pr { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--warn); }
.scard .sfoot .pr.free { color: var(--good); }
.scard .sfoot .pr .ic { width: 13px; height: 13px; }
.scard .sfoot span.n { display: inline-flex; align-items: center; gap: 3px; }
.scard .sfoot span.n .ic { width: 13px; height: 13px; }
.scard .sact { display: flex; align-items: center; gap: 2px; }
.scard .sact .btn.icon { width: 30px; min-height: 30px; border-color: transparent; box-shadow: none; background: transparent; color: var(--text-3); }
.scard .sact .btn.icon:hover { background: var(--surface-2); color: var(--text); }
.scard .scheck { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--surface); display: grid; place-items: center; color: #fff; cursor: pointer; margin-right: 4px; }
.scard.on .scheck { background: var(--accent); border-color: var(--accent); }
.scard .scheck .ic { width: 12px; height: 12px; opacity: 0; }
.scard.on .scheck .ic { opacity: 1; }
.slist.compact .scard { grid-template-columns: 40px minmax(0, 1fr) auto; padding: 8px 12px; }
.slist.compact .sthumb { width: 40px; }
.slist.compact .cap { -webkit-line-clamp: 1; }
.scard[draggable=true] { cursor: grab; }
.switch { position: relative; width: 42px; height: 24px; flex: none; border-radius: 999px; background: var(--line-2); border: 0; cursor: pointer; transition: background-color .2s var(--ease); padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s var(--ease); }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
.switch:disabled { opacity: .5; cursor: wait; }
.rows.members .row { padding: 12px 22px; }
.rows.members .row.member { gap: 14px; }
.card-head.padded input[type=search] { width: 260px; max-width: 100%; }
.hidden-rows .row { display: none; }
.sheet .m-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 18px; }
.sheet .m-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface); }
.sheet .m-foot .left { margin-right: auto; font-size: 13px; color: var(--text-2); }
.sheet .form-grid { display: grid; gap: 14px; }
.sheet label.lbl { font-size: 13px; font-weight: 600; color: var(--text-2); display: grid; gap: 6px; }
.sheet .hint { font-size: 12.5px; color: var(--text-3); }
.sheet .hint.bad { color: var(--bad); }
.tag-list { display: grid; gap: 6px; }
.tag-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.tag-row .grip { color: var(--text-3); cursor: grab; }
.tag-row .sw { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.tag-row .tn { flex: 1; min-width: 0; font-weight: 600; }
.tag-row .tc { font-size: 12px; color: var(--text-3); }
.tag-row.dragging { opacity: .4; }
.tag-row.drop-over { outline: 2px dashed var(--accent); outline-offset: -2px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.swatch.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.swatch.custom { width: 32px; height: 28px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); }
.tag-preview { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: color-mix(in srgb, var(--tc) 18%, transparent); color: color-mix(in srgb, var(--tc) 70%, #000); }
.field-group { display: grid; gap: 6px; margin-bottom: 14px; }
.field-group h3 { margin: 0 0 4px; }
.frow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; }
.frow .ft { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.frow .ft .ic { color: var(--text-2); }
.pick-grid.light { background: var(--ground); }
.media-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.media-strip .mcell { position: relative; width: 64px; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: var(--surface-3); box-shadow: 0 0 0 1px var(--line); }
.media-strip .mcell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-strip .mcell .x { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(11, 12, 14, .7); color: #fff; display: grid; place-items: center; cursor: pointer; }
.media-strip .mcell .x .ic { width: 11px; height: 11px; }
.media-strip .madd { width: 64px; aspect-ratio: 3 / 4; border-radius: 8px; border: 1.5px dashed var(--line-2); background: transparent; color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.upload-modal .track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.upload-modal .bar { height: 100%; width: 0; background: var(--accent); transition: width .2s linear; }
.details-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; }
.details-layout .prev { aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--surface-3); display: grid; place-items: center; }
.details-layout .prev img, .details-layout .prev video { width: 100%; height: 100%; object-fit: contain; display: block; background: #0b0c0e; }
.cat-check { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-check label { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--text); cursor: pointer; }
.cat-check label.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.cat-check input { width: 14px; height: 14px; }
.inline-note { font-size: 12.5px; color: var(--text-3); }
.toasts { position: fixed; top: 20px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.toast { padding: 12px 16px; border-radius: 12px; color: #fff; box-shadow: var(--shadow-2); font-size: 14px; font-weight: 500; animation: rise .22s var(--ease); }
.toast.success { background: #10b981; }
.toast.error { background: #ef4444; }
.toast.info { background: #1877f2; }
@media (max-width: 900px) {
  .two-pane { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .pane-side, .pane-main { min-width: 0; }
  .pane-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .folders { display: flex; gap: 6px; overflow-x: auto; max-width: 100%; padding: 0 10px 10px; scrollbar-width: none; }
  .folders::-webkit-scrollbar { display: none; }
  .folder { width: auto; flex: none; }
  .folder .fa { display: none !important; }
  .details-layout { grid-template-columns: 1fr; }
  .account .row-actions { width: 100%; }
  .cfg-row { padding: 14px 16px; }
  .vgrid, .slist { padding: 4px 12px 16px; }
  .pane-head { padding: 14px 12px 10px; }
  .select-bar { margin: 0 12px 10px; }
}

/* --- Vault du compte, vignettes façon Wysper -------------------------------------------------------- */
.vtools { display: grid; gap: 10px; padding: 0 20px 12px; }
.vtypes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vtypes .spacer { flex: 1; }
.vsearch { width: 100%; }
.vgrid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.vcard .vthumb { aspect-ratio: 1 / 1; border-radius: 12px; }
.vcard .vcheck { top: auto; bottom: auto; left: auto; right: 8px; top: 8px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; background: rgba(255, 255, 255, .55); opacity: 1; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.vcard .vcheck .ic { color: #fff; }
.vcard .vkind { top: auto; left: auto; right: 8px; bottom: 36px; font-size: 11px; }
.vcard .vprice { right: auto; left: 8px; top: 8px; bottom: auto; }
.vcard .veye { left: 8px; bottom: 36px; }
.vcard .vname { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 6px; padding: 18px 10px 8px; color: #fff; font-size: 12.5px; font-weight: 600; background: linear-gradient(transparent, rgba(0, 0, 0, .78)); overflow: hidden; }
.vcard .vname .ic { width: 14px; height: 14px; flex: none; }
.vcard .vname .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vcard .vname.none { font-style: italic; }
.tags-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.tags-layout .tag-list { gap: 6px; }
@media (max-width: 720px) { .tags-layout { grid-template-columns: 1fr; } }
.details-layout .prev { position: relative; }
.details-layout .prev-note { position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 6px 10px; border-radius: 8px; background: rgba(11, 12, 14, .7); color: #fff; font-size: 12px; text-align: center; }
.form-grid.dls { gap: 0; align-content: start; }
.dl { display: grid; gap: 4px; padding: 12px 0; border-top: 1px solid var(--line); }
.dl:first-child { border-top: 0; padding-top: 0; }
.dl .dv { font-size: 14.5px; color: var(--text); overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .pane-head { flex-direction: column; align-items: stretch; }
  .pane-head .tools { width: 100%; justify-content: space-between; }
  .pane-head .tools .btn { flex: 1; }
  .vtypes .btn { flex: 1; min-width: 0; padding: 0 10px; }
  .vtypes .spacer { display: none; }
  .vtypes > .btn:last-child { flex-basis: 100%; }
}

/* --- Tableau de bord des revenus et des performances (façon Wysper) ------------------------- */
.stats-pills { margin: 0; }
.stats-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.stats-tools .spacer { flex: 1; }
.stats-range { display: inline-flex; align-items: center; gap: 6px; padding: 0 4px; font-size: 13px; color: var(--text-2); }
.date-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.date-form input[type=date] { height: 34px; padding: 0 10px; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 12px; }
.section-title { margin: 8px 0 12px; font-size: 18px; }
.section-head .section-title { margin: 0; }

.revenue { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px 28px; padding: 26px 28px; }
.rev-total { display: flex; align-items: center; gap: 18px; min-width: 0; }
.rev-icon { display: grid; place-items: center; flex: none; width: 54px; height: 54px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); box-shadow: 0 0 0 6px rgba(20, 104, 216, .05); }
.rev-icon .ic { width: 24px; height: 24px; }
.rev-label { display: block; font-size: 11px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.rev-amount { display: block; font-size: 42px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; color: var(--accent); font-variant-numeric: tabular-nums; }
.rev-sub { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-3); }
.rev-tiles { display: grid; grid-template-columns: repeat(3, minmax(140px, auto)); margin: 0; }
.rev-tile { padding: 4px 26px; border-left: 1px solid var(--line); }
.rev-tile dt { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.rev-tile dt .ic { width: 26px; height: 26px; padding: 6px; border-radius: 8px; background: var(--surface-2); color: var(--text-2); }
.rev-tile.t-sent dt .ic { background: var(--accent-soft); color: var(--accent); }
.rev-tile.t-sold dt .ic { background: var(--good-soft); color: var(--good); }
.rev-tile.t-conv dt .ic { background: var(--warn-soft); color: var(--warn); }
.rev-tile dd { margin: 8px 0 0; font-size: 24px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.chart-card .card-head { margin-bottom: 18px; }
.chart { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 220px auto; gap: 8px 12px; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; margin: -8px 0; font-size: 12px; line-height: 16px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.chart-plot { position: relative; min-width: 0; }
.chart-plot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.chart .base { stroke: var(--line-2); stroke-width: 1; }
.chart .bar { fill: var(--accent); }
.chart .bar:hover { fill: var(--accent-hover); }
.chart-x { grid-column: 2; display: flex; font-size: 12px; color: var(--text-3); }
.chart-x span { display: flex; flex: 1 1 0; justify-content: center; min-width: 0; white-space: nowrap; }
.chart-x span:first-child { justify-content: flex-start; }

.stats-cols { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 16px; align-items: start; }
.stats-cols > .col { min-width: 0; }
.podium { display: flex; justify-content: center; gap: 10px; align-items: flex-end; margin: 0; padding: 0; list-style: none; text-align: center; }
.pod { display: grid; flex: 0 1 calc((100% - 20px) / 3); justify-items: center; gap: 4px; min-width: 0; }
.pod > strong { max-width: 100%; overflow: hidden; font-size: 13.5px; text-overflow: ellipsis; white-space: nowrap; }
.pod .amt { font-size: 13px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.pod .step { display: grid; place-items: center; width: 100%; margin-top: 6px; border-radius: 10px 10px 4px 4px; background: var(--surface-2); }
.pod .step b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--line-2); color: #fff; font-size: 12.5px; }
.pod.p1 .step { height: 96px; background: var(--accent-soft); }
.pod.p1 .step b { background: var(--accent); }
.pod.p1 .amt { color: var(--accent); }
.pod.p2 .step { height: 64px; }
.pod.p2 .step b { background: var(--text-3); }
.pod.p3 .step { height: 48px; background: var(--warn-soft); }
.pod.p3 .step b { background: var(--warn); }
.summary .row { gap: 12px; }
.summary .sum-ic { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--surface-2); color: var(--text-2); }
.summary .sum-ic.good { background: var(--good-soft); color: var(--good); }
.summary .sum-ic.warn { background: var(--warn-soft); color: var(--warn); }
.summary .sum-ic.accent { background: var(--accent-soft); color: var(--accent); }
.summary .sum-ic.bad { background: var(--bad-soft); color: var(--bad); }
.summary .who .meta { display: block; font-size: 12px; color: var(--text-3); }
.summary .who strong em { margin-left: 4px; font-style: normal; font-weight: 500; color: var(--text-2); }
.perf .money { color: var(--good); font-variant-numeric: tabular-nums; }
.perf tr.is-you td { background: rgba(20, 104, 216, .04); }
.perf tr.is-off { opacity: .6; }
.empty.tight { padding: 22px 12px; }
@media (max-width: 1100px) {
  .stats-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .revenue { grid-template-columns: minmax(0, 1fr); padding: 20px; }
  .rev-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: 14px; border-top: 1px solid var(--line); }
  .rev-tile { padding: 4px 12px; border-left: 0; }
  .rev-tile:first-child { padding-left: 0; }
  .rev-tile dt { white-space: normal; }
  .rev-amount { font-size: 34px; }
  .chart { grid-template-rows: 160px auto; }
}
@media (max-width: 520px) {
  .rev-tiles { grid-template-columns: 1fr; gap: 10px; }
  .rev-tile dd { margin-top: 2px; font-size: 20px; }
  .chart-x .alt { visibility: hidden; }
}
