/* Shark. Direction (unslop, @heydamir) :
   - Produit : des agents qui prospectent sur LinkedIn pour un studio, plus calendrier et SEO.
   - Caractère : patient, exact, aux aguets.
   - Monde : l'eau la nuit, une bouée, un sondeur.
   - Moments : le bassin (un aileron par agent sur sa ligne d'eau) et le fil En direct.
   - Signature : l'aileron.
   Surfaces neutres (gris très légèrement froid) ; sarcelle pour agir ; orange bouée réservé à ce qui
   vit ou demande attention. IBM Plex Sans pour l'interface, IBM Plex Mono pour les chiffres et l'heure. */
:root {
  --bg: #f6f7f8; --surface: #ffffff; --surface-2: #eef0f2; --surface-3: #e2e5e9;
  --ink: #14171a; --ink-2: #4a5058; --muted: #656b73;
  --line: color-mix(in srgb, var(--ink) 9%, transparent); --line-2: color-mix(in srgb, var(--ink) 16%, transparent);
  --accent: #0b6e6e; --accent-ink: #ffffff; --accent-soft: #e3f0ef; --accent-text: #0a5f5f;
  --signal: #c2410c; --signal-ink: #ffffff; --signal-soft: #fbeae2;
  --ok: #16a34a; --ok-text: #15803d; --warn: #a16207; --danger: #dc2626;
  --focus: #0b6e6e;
  --r-lg: 14px; --r: 10px; --r-sm: 8px; --r-xs: 6px;
  --font: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 68px; --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
:root[data-theme="dark"] {
    --bg: #111316; --surface: #16191d; --surface-2: #1d2126; --surface-3: #262b31;
    --ink: #eceef0; --ink-2: #b4b9c0; --muted: #8b919a;
    --accent: #4fc2b5; --accent-ink: #062120; --accent-soft: #15302e; --accent-text: #7fd8cd;
    --signal: #ff7a45; --signal-ink: #2a1206; --signal-soft: #34221a;
    --ok: #4cc38a; --ok-text: #4cc38a; --warn: #e5b04a; --danger: #ff6b6b;
    --focus: #7fd8cd;
    color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111316; --surface: #16191d; --surface-2: #1d2126; --surface-3: #262b31;
    --ink: #eceef0; --ink-2: #b4b9c0; --muted: #8b919a;
    --accent: #4fc2b5; --accent-ink: #062120; --accent-soft: #15302e; --accent-text: #7fd8cd;
    --signal: #ff7a45; --signal-ink: #2a1206; --signal-soft: #34221a;
    --ok: #4cc38a; --ok-text: #4cc38a; --warn: #e5b04a; --danger: #ff6b6b;
    --focus: #7fd8cd;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { height: 100%; }
/* La page est TOUJOURS un peu plus haute que l'écran entier (100lvh + 1px), même quand un onglet
   est presque vide. En PWA écran d'accueil iOS, une page qui ne peut pas défiler fait remonter la
   barre fixe du bas (c'était le cas d'Agents, Calendrier et SEO, et pas d'Accueil ni Réglages). */
body { min-height: calc(100% + 1px); min-height: calc(100lvh + 1px); }
body {
  font: 15px/1.5 var(--font); font-feature-settings: "tnum" 0;
  background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
a { color: var(--accent-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
/* Tout contrôle hérite de la couleur du thème (sinon : texte noir par défaut sur fond sombre). */
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: 0; line-height: 1.2; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 13px; } .b { font-weight: 600; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Mise en page : barre latérale (bureau), en-tête, barre du bas (mobile) */
.app { display: grid; grid-template-columns: 1fr; min-height: 100%; }
.sidebar { display: none; }
.main { min-width: 0; padding: 0 16px calc(var(--nav-h) + var(--safe-b) + 20px); }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px;
  padding: max(8px, env(safe-area-inset-top)) 0 8px; margin: 0 -16px; padding-left: 16px; padding-right: 16px;
  background: var(--bg);
  border-bottom: 1px solid transparent;
}
.topbar .brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 18px; color: var(--ink); text-decoration: none; }
.brand .mark { width: 24px; height: 19px; color: var(--accent); flex: none; }
.topbar .grow { flex: 1; }
.iconbtn {
  position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--r);
  background: transparent; border: 1px solid var(--line); color: var(--ink-2);
}
.iconbtn[data-count]::after {
  content: attr(data-count); position: absolute; top: -6px; right: -7px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px; background: var(--signal); color: var(--signal-ink); font: 600 11px/18px var(--font); text-align: center;
}

/* Activité réseau : fine ligne en haut de l'écran pendant qu'une requête tourne. */
.busybar { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 200; pointer-events: none; overflow: hidden; opacity: 0; transition: opacity 200ms var(--ease); }
.busybar::before { content: ""; position: absolute; inset: 0; width: 40%; background: var(--accent); animation: busy 1.1s ease-in-out infinite; }
body.busy .busybar { opacity: 1; }
@keyframes busy { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* Quotas toujours visibles (en-tête) */
.quota { display: grid; gap: 4px; min-width: 132px; padding: 4px 8px; border-radius: var(--r-sm); border: 1px solid var(--line); background: transparent; text-align: left; color: var(--ink-2); }
.quota .q { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 8px; font-size: 11px; line-height: 1.2; }
.quota .bar { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.quota .bar i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(var(--p, 0)); background: var(--ink-2); transition: transform 400ms var(--ease); }
.quota .bar i.hot { background: var(--signal); }
.quota .v { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); }

/* Blocs */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; margin-bottom: 16px; }
.card.pad-sm { padding: 12px 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.card-head h2 { font-size: 18px; }
.eyebrow { font-size: 13px; color: var(--muted); }
.section-title { font-size: 28px; font-weight: 400; margin: 16px 0 16px; }
.section { margin: 24px 0 8px; }
.section > h2 { font-size: 18px; margin-bottom: 8px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); padding: 12px 16px; border-radius: var(--r); font-weight: 500; font-size: 15px; line-height: 1.2; text-decoration: none; transition: background-color 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease), transform 120ms var(--ease); }
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent-text); padding-left: 8px; padding-right: 8px; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--line-2); }
.btn.block { width: 100%; }
.btn.sm { padding: 8px 12px; font-size: 14px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn[aria-busy="true"]::after { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Formulaires */
label.field { display: block; font-size: 14px; font-weight: 500; color: var(--ink-2); margin: 16px 0 8px; }
input, textarea, select {
  width: 100%; padding: 12px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface); outline: none;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }

/* Filtres et segments */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: transparent; font-size: 14px; user-select: none; cursor: pointer; }
.chip .net { font-size: 12px; color: var(--muted); text-transform: capitalize; }
.chip.on { background: var(--surface-3); border-color: var(--line-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-2); }
.chip.on .net { color: var(--ink-2); }
.seg { display: inline-flex; border-bottom: 1px solid var(--line); gap: 16px; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 8px 0 8px; font-weight: 500; font-size: 15px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.seg button.on { color: var(--ink); border-bottom-color: var(--accent); }

/* Chiffres */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.kpi { background: var(--surface); padding: 12px 16px; }
.kpi .ic { display: none; }
.kpi b { display: block; font-weight: 500; font-size: 26px; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-size: 13px; }

/* Listes */
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.avatar { width: 38px; height: 38px; border-radius: 50%; flex: none; overflow: hidden; background: var(--surface-3); color: var(--ink-2); display: grid; place-items: center; container-type: inline-size; }
.avatar .initials { font-weight: 500; font-size: 38cqi; line-height: 1; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: var(--r-xs); white-space: nowrap; color: var(--ink-2); background: var(--surface-2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); flex: none; }
.pill.scheduled::before, .pill.coldSequenceToValidate::before, .pill.coldSequenceWaitingForSlot::before, .pill.inviteSent::before, .pill.messaged::before { background: var(--accent); }
.pill.published::before, .pill.completed::before, .pill.interested::before, .pill.inviteAccepted::before, .pill.hasReplied::before { background: var(--ok); }
.pill.failed::before, .pill.notInterested::before { background: var(--danger); }
.pill.replyToValidate::before, .pill.pending::before, .pill.ongoing::before, .pill.manual::before { background: var(--warn); }
.pill.missingInformation::before { background: var(--signal); }

/* Marques */
.brandbar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.brandbar::-webkit-scrollbar { display: none; }
.brandbar .bchip { white-space: nowrap; padding: 8px 12px; border-radius: var(--r-sm); background: transparent; border: 1px solid var(--line-2); font-size: 14px; color: var(--ink-2); }
.brandbar .bchip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 500; }

/* États vides */
.empty { padding: 24px 4px; color: var(--muted); font-size: 14px; }
.empty svg { display: none; }

.hero { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; margin-bottom: 16px; display: flex; gap: 12px; align-items: center; background: var(--surface); }
.hero .txt h2 { font-size: 18px; } .hero .txt p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.hero svg { display: none; }

/* Barre de navigation du bas (mobile). Géométrie inchangée : ne pas toucher au positionnement. */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b); display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line);
}
.tabbar button { position: relative; border: 0; background: transparent; display: grid; place-items: center; align-content: center; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 500; }
.tabbar button svg { width: 22px; height: 22px; stroke-width: 1.8; }
.tabbar button.on { color: var(--accent-text); }
.tabbar button.on::before { content: ""; position: absolute; top: -1px; left: 28%; right: 28%; height: 2px; background: var(--accent); }

.tab { display: none; }
.tab.on { display: block; }

.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); transform: translateX(-50%) translateY(8px); background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: var(--r); font-weight: 500; opacity: 0; pointer-events: none; transition: opacity 200ms var(--ease), transform 200ms var(--ease); max-width: calc(100vw - 32px); text-align: center; z-index: 50; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Bureau ===== */
@media (min-width: 900px) {
  .app { grid-template-columns: 236px 1fr; }
  .sidebar {
    display: flex; flex-direction: column; gap: 2px; padding: 20px 12px; position: sticky; top: 0; height: 100vh;
    background: var(--surface); border-right: 1px solid var(--line);
  }
  .sidebar .brand { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 21px; padding: 4px 12px 16px; }
  .sidebar .brand .mark { width: 28px; height: 22px; }
  .sidebar .nav-label { font-size: 12px; color: var(--muted); padding: 24px 12px 8px; }
  .sidebar .navitem { display: flex; align-items: center; gap: 12px; height: 36px; padding: 0 12px; border-radius: var(--r-sm); color: var(--ink-2); font-weight: 500; border: 0; background: transparent; width: 100%; text-align: left; }
  .sidebar .navitem svg { width: 18px; height: 18px; stroke-width: 1.6; color: var(--muted); }
  .sidebar .navitem.on { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
  .sidebar .navitem.on svg { color: var(--accent-text); }
  .sidebar .navitem:not(.on):hover { background: var(--surface-2); }
  .sidebar .spacer { flex: 1; }
  .tabbar { display: none; }
  .main { padding: 0 40px 48px; max-width: 1120px; }
  .topbar { margin: 0 -40px; padding-left: 40px; padding-right: 40px; }
  .topbar .brand.mobile-only { display: none; }
  .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
  .kpis { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 899px) { .desktop-only { display: none !important; } .section-title { font-size: 26px; margin: 12px 0 12px; } }
@media (min-width: 900px) { .mobile-only { display: none !important; } }

/* ===== Le bassin : chaque agent, un aileron sur la ligne d'eau ===== */
.pond { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; margin-bottom: 16px; }
.lane { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 16px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.lane:last-child { border-bottom: 0; }
.lane .who { font-weight: 500; }
.lane .what { grid-column: 1 / -1; font-size: 14px; color: var(--ink-2); }
.lane .counts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lane .counts b { color: var(--ink); font-weight: 500; font-size: 15px; }
.water { grid-column: 1 / -1; position: relative; height: 30px; margin-top: 2px; }
.water svg.wave { position: absolute; left: 0; right: 0; bottom: 4px; width: 100%; height: 10px; color: var(--line-2); }
.water .fin { position: absolute; bottom: 8px; left: 4%; width: 40px; height: 20px; color: var(--ink); }
[data-state="hunting"] .fin { color: var(--accent); animation: glide 30s ease-in-out infinite; }
[data-state="hunting"] .fin .wake { opacity: 1; }
[data-state="resting"] .fin { left: 46%; bottom: 6px; color: var(--muted); }
[data-state="waiting"] .fin { left: 46%; bottom: 6px; color: var(--line-2); }
[data-state="paused"] .fin { left: 46%; bottom: -6px; color: var(--line-2); }
.fin .wake { opacity: 0; transition: opacity 300ms var(--ease); } [data-state="hunting"] .fin .wake { opacity: .55; }
.state { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.state.hunting { color: var(--signal); } .state.hunting::before { animation: beat 1.6s ease-in-out infinite; }
.state.resting { color: var(--muted); } .state.waiting { color: var(--warn); } .state.paused { color: var(--muted); }
@keyframes glide { 0% { left: 3%; transform: scaleX(1); } 47% { left: calc(97% - 40px); transform: scaleX(1); } 50% { left: calc(97% - 40px); transform: scaleX(-1); } 97% { left: 3%; transform: scaleX(-1); } 100% { left: 3%; transform: scaleX(1); } }
@keyframes beat { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* Fil d'activité : les nouveautés arrivent en haut. */
.ticker { list-style: none; margin: 0; padding: 0; }
.ticker li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ticker li:last-child { border-bottom: 0; }
.ticker li .t { color: var(--muted); font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.ticker li .k { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); transform: translateY(-1px); }
.ticker li .k.good { background: var(--ok); } .ticker li .k.act { background: var(--accent); } .ticker li .k.hot { background: var(--signal); }
.ticker li.new { animation: arrive 400ms var(--ease); }
@keyframes arrive { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.livenote { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: 8px 0 2px; }
.livenote .pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--signal); animation: beat 1.6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .fin, .state::before, .livenote .pulse, .busybar::before, .ticker li.new, .btn[aria-busy="true"]::after { animation: none !important; }
}

/* ===== Agents ===== */
.agent-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 16px; margin-bottom: 12px; }
.agent-card .top { display: flex; align-items: flex-start; gap: 12px; }
.agent-card .name { font-weight: 500; font-size: 17px; line-height: 1.3; }
.agent-card .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; font-size: 13px; color: var(--muted); }
.agent-card .water { margin-top: 4px; }
.agent-card .stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.agent-card .stat { padding: 0 4px; }
.agent-card .stat b { display: block; font-weight: 500; font-size: 22px; font-variant-numeric: tabular-nums; }
.agent-card .stat span { font-size: 12px; color: var(--muted); }
.agent-card[data-open] { cursor: pointer; }
.agent-card[data-open]:hover { border-color: var(--line-2); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; vertical-align: middle; }
.status-dot.ACTIVE { background: var(--ok); } .status-dot.PAUSED { background: var(--muted); }

/* ===== Calendrier ===== */
.calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 16px; }
.calgrid .dow { text-align: center; font-size: 12px; color: var(--muted); padding-bottom: 4px; }
.calgrid .day { aspect-ratio: 1; border-radius: var(--r-sm); border: 1px solid var(--line); padding: 4px; font-size: 13px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; background: var(--surface); }
.calgrid .day.out { opacity: .45; } .calgrid .day.today { border-color: var(--accent); }
.calgrid .day.sel { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.calgrid .day .dots { display: flex; gap: 2px; flex-wrap: wrap; margin-top: auto; }
.calgrid .day .d { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.calgrid .day.sel .d { background: var(--accent-ink); }
.agenda-day { margin-top: 8px; }
.agenda-day .date { font-size: 14px; font-weight: 500; color: var(--ink-2); margin: 16px 0 8px; }
.post-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.post-row .time { font-family: var(--mono); font-weight: 500; font-size: 15px; min-width: 46px; font-variant-numeric: tabular-nums; }
.net-badge { font-size: 12px; padding: 2px 8px; border-radius: var(--r-xs); border: 1px solid var(--line-2); color: var(--ink-2); text-transform: capitalize; white-space: nowrap; }

/* ===== Assistant de création ===== */
.wizard { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: flex; flex-direction: column; overflow-y: auto; }
.wizard .wz-top { position: sticky; top: 0; background: var(--bg); display: flex; align-items: center; gap: 12px; padding: max(12px, env(safe-area-inset-top)) 16px 12px; z-index: 2; border-bottom: 1px solid var(--line); }
.wizard .steps { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: center; }
.wizard .steps > span[style] { display: none; }
.wizard .stepdot { width: 26px; height: 4px; border-radius: 2px; background: var(--surface-3); font-size: 0; color: transparent; }
.wizard .stepdot.on { background: var(--accent); }
.wizard .stepdot.done { background: color-mix(in srgb, var(--accent) 55%, var(--surface-3)); }
.wizard .wz-body { flex: 1; width: 100%; max-width: 620px; margin: 0 auto; padding: 8px 16px 120px; }
.wizard h2.wz-title { font-size: 26px; margin: 20px 0 8px; }
.wizard .wz-sub { color: var(--ink-2); margin: 0 0 20px; max-width: 60ch; }
.wizard .wz-foot { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + var(--safe-b)); background: var(--surface); border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: space-between; }
.pick { border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 16px 16px; background: var(--surface); cursor: pointer; margin-bottom: 12px; display: block; width: 100%; text-align: left; }
.pick:hover { border-color: var(--ink-2); }
.pick.sel { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pick .name { font-weight: 500; font-size: 16px; }
.pick .meta { color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.badge-reco { display: inline-block; color: var(--accent-text); font-weight: 500; font-size: 13px; margin: 4px 0 8px; }
.auton { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .auton { grid-template-columns: repeat(3, 1fr); } }
.auton .opt { border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 12px 16px; cursor: pointer; background: var(--surface); }
.auton .opt.sel { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.auton .opt .h { font-weight: 500; display: flex; align-items: center; gap: 8px; }
.auton .opt .line { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.obj-opt { display: flex; align-items: center; gap: 12px; }
.obj-opt svg { stroke: var(--accent); flex: none; }
.wz-loading { padding: 48px 0; max-width: 46ch; }
.wz-loading svg { display: none; }
.wz-loading::before { content: ""; display: block; width: 100%; height: 2px; margin-bottom: 20px; background: linear-gradient(90deg, var(--accent) 0 30%, var(--surface-3) 30%); background-size: 200% 100%; animation: scan 1.4s linear infinite; }
@keyframes scan { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.removable { display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px 4px 12px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink); font-size: 14px; margin: 0 8px 8px 0; }
.removable b { cursor: pointer; color: var(--muted); padding: 0 4px; font-weight: 400; } .removable b:hover { color: var(--danger); }

/* ===== SEO / GEO ===== */
.site-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; margin-bottom: 16px; }
.site-card .head { display: flex; align-items: center; gap: 12px; }
.ring { --p: 0; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: radial-gradient(closest-side, var(--surface) 76%, transparent 77%), conic-gradient(var(--c, var(--accent)) calc(var(--p) * 1%), var(--surface-3) 0);
  font-weight: 500; font-size: 19px; font-variant-numeric: tabular-nums; }
.subscores { display: grid; grid-template-columns: repeat(3, 1fr); margin: 12px 0; border: 1px solid var(--line); border-radius: var(--r); }
.subscores .ss { padding: 8px 12px; border-right: 1px solid var(--line); }
.subscores .ss:last-child { border-right: 0; }
.subscores .ss b { font-weight: 500; font-size: 20px; font-variant-numeric: tabular-nums; display: block; }
.subscores .ss span { font-size: 12px; color: var(--muted); }
.site-name { font-weight: 500; font-size: 17px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up { color: var(--ok-text); } .down { color: var(--danger); }
.repo-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 14px; padding: 8px 0; border-top: 1px solid var(--line); }
.repo-form { display: flex; gap: 8px; margin: 0 0 8px; }
.issues { border-top: 1px solid var(--line); }
.issue { padding: 16px 0; border-bottom: 1px solid var(--line); }
.issue:last-child { border-bottom: 0; padding-bottom: 4px; }
.issue-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.issue-title { font-weight: 500; }
.issue-why { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; max-width: 68ch; }
.issue-actions { margin-top: 8px; }
.issue-actions:empty { display: none; }
.pr-state { margin: 8px 0 0; }
.fix { margin-top: 12px; padding: 12px; border-radius: var(--r); background: var(--surface-2); }
.artifact { margin-top: 8px; }
.artifact pre.code { margin: 4px 0 0; max-height: 280px; overflow: auto; background: var(--surface); border: 1px solid var(--line); word-break: normal; white-space: pre-wrap; user-select: text; }
.sev { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: var(--r-xs); white-space: nowrap; color: var(--ink-2); background: var(--surface-2); }
.fix .sev, .issue .sev { background: var(--surface-2); }
.sev::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.sev.error::before { background: var(--danger); } .sev.warning::before { background: var(--warn); } .sev.info::before { background: var(--accent); }
.collapsible { display: none; }
.collapsible.open { display: block; }

/* ===== Boîte de réception, fiche agent ===== */
.thread { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.bubble { max-width: 85%; padding: 8px 12px; border-radius: 14px; font-size: 14px; white-space: pre-wrap; background: var(--surface-2); color: var(--ink); }
.bubble.out { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.bubble.in { align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble .when { display: block; font-size: 11px; opacity: .75; margin-top: 4px; }
.todo-card textarea { min-height: 90px; }
.todo-card .q { background: var(--signal-soft); color: var(--ink); border-left: 3px solid var(--signal); border-radius: var(--r-sm); padding: 12px 12px; margin: 12px 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.listed { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.listed:last-child { border-bottom: 0; }
.listed span { flex: 1; }
.listed button { border: 0; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; padding: 4px 8px; border-radius: var(--r-xs); }
.listed button:hover { color: var(--danger); }
.kv { display: grid; grid-template-columns: 128px 1fr; gap: 8px 12px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.hours { display: grid; grid-template-columns: 64px 1fr 1fr; gap: 8px 8px; align-items: center; font-size: 14px; }
.hours input[type=time] { padding: 8px; }
.code { font-family: var(--mono); font-size: 13px; background: var(--surface-2); border-radius: var(--r-sm); padding: 12px; word-break: break-all; user-select: all; white-space: pre-wrap; }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; } }
details > summary { list-style: none; display: inline-flex; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

/* ===== Search Console ===== */
.site-tabs { display: flex; margin: 8px 0 4px; }
.gsc { padding-top: 12px; }
.gsc-period { margin-bottom: 12px; gap: 8px; }
.gsc-kpis .kpi .small { margin-top: 4px; }
.gsc-kpis .kpi b { font-size: 24px; font-weight: 500; }
.gsc-chart-wrap { margin: 16px 0 8px; }
.gsc-chart { position: relative; margin-top: 8px; }
.gsc-chart svg { display: block; overflow: visible; }
.gsc-chart .grid { stroke: var(--line); stroke-width: 1; }
.gsc-chart .tick { fill: var(--muted); font: 11px var(--mono); }
.gsc-chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.gsc-chart .cross { stroke: var(--line-2); stroke-width: 1; }
.gsc-chart .dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.gsc-chart .hit { cursor: crosshair; outline: none; }
.gsc-chart .tip { position: absolute; top: -8px; transform: translateY(-100%); pointer-events: none; display: grid; gap: 2px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line-2); font-size: 13px; white-space: nowrap; transition: opacity 120ms var(--ease); }
.gsc-h { font-size: 16px; margin: 24px 0 4px; }
.qchips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.qchip { font-size: 13px; padding: 2px 8px; border-radius: var(--r-xs); background: var(--surface-2); color: var(--ink-2); }
.qchip .muted { font-family: var(--mono); font-size: 12px; }
.table-wrap { overflow-x: auto; margin-top: 8px; }
.gsc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.gsc-table th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 0 8px 8px 0; border-bottom: 1px solid var(--line); }
.gsc-table td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.gsc-table tr:last-child td { border-bottom: 0; }
.gsc-table .n { text-align: right; font-family: var(--mono); font-size: 13px; white-space: nowrap; padding-right: 0; padding-left: 8px; }
.gsc-setup ol { padding-left: 20px; color: var(--ink-2); }
.gsc-setup li { margin-bottom: 4px; }
.gsc-setup code, .gsc code { font-family: var(--mono); font-size: 13px; }
.insp { margin-top: 8px; }
.sidebar .navitem { white-space: nowrap; }
.navcount { margin-left: auto; font: 500 12px/1 var(--mono); color: var(--signal); }

/* ===== SEO & GEO : liste de sites, page d'un site ===== */
.site-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .site-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .site-grid { grid-template-columns: repeat(3, 1fr); } }
.site-tile { display: grid; gap: 8px; text-align: left; width: 100%; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); transition: border-color 150ms var(--ease), background-color 150ms var(--ease); }
.site-tile:hover { border-color: var(--line-2); }
.site-tile:active { transform: scale(0.99); }
.tile-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chev { color: var(--muted); flex: none; transition: transform 200ms var(--ease); }
.tile-foot { display: flex; flex-wrap: wrap; gap: 4px 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.tile-foot .muted:last-child { margin-left: auto; }
.sbar { display: grid; gap: 4px; }
.sbar-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.sbar-top b { font-weight: 500; }
.sbar-n { font-family: var(--mono); font-size: 15px; font-weight: 500; }
.sbar-track { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.sbar-track i { display: block; height: 100%; transform-origin: left; }

.back { display: inline-block; margin-top: 12px; font-size: 14px; text-decoration: none; color: var(--accent-text); }
.site-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.site-head .section-title { overflow-wrap: anywhere; }
.site-head .btn { flex: none; margin-top: 8px; }
.run-banner { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 16px 0 0; padding: 12px 16px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); font-size: 14px; }
.run-banner.good { border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.run-banner .btn { flex: none; margin: -4px -8px -4px 0; }

.score-pair { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 16px 0 24px; }
@media (min-width: 640px) { .score-pair { grid-template-columns: 1fr 1fr; } }
.score-card { display: grid; gap: 8px; text-align: left; width: 100%; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.score-card:hover { border-color: var(--line-2); }
.sc-top { display: flex; justify-content: space-between; align-items: baseline; }
.sc-title { font-size: 20px; font-weight: 500; }
.sc-n { font-family: var(--mono); font-size: 28px; font-weight: 500; line-height: 1; }
.sc-n .muted { font-size: 14px; }
.sc-sub { font-size: 14px; color: var(--ink-2); margin-top: -4px; }
.sc-what { font-size: 13px; color: var(--muted); }
.sc-foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

.space-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.space-tab { display: grid; gap: 2px; text-align: left; padding: 12px 12px 12px 0; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: transparent; color: var(--muted); }
.space-tab .st-title { font-size: 17px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.space-tab .st-sub { font-size: 13px; color: var(--muted); }
.space-tab.on { color: var(--ink); border-bottom-color: var(--accent); }
.space-tab:not(.on):hover { color: var(--ink-2); }
.st-count { font: 500 12px/18px var(--mono); min-width: 20px; padding: 0 6px; border-radius: var(--r-xs); background: var(--surface-3); color: var(--ink); text-align: center; }

.reco-group { margin-top: 24px; }
.group-title { font-size: 18px; margin: 0 0 8px; font-weight: 500; }
.group-title .muted { font-size: 14px; font-weight: 400; margin-left: 4px; }
.reco { border-top: 1px solid var(--line); }
.reco:last-of-type { border-bottom: 1px solid var(--line); }
.reco-head { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "title chev" "meta chev"; align-items: center; gap: 4px 12px; width: 100%; padding: 12px 0; border: 0; background: transparent; text-align: left; }
.reco-title { grid-area: title; font-weight: 500; }
.reco-meta { grid-area: meta; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.reco-head .chev { grid-area: chev; }
.reco.open .reco-head .chev { transform: rotate(90deg); }
.reco-head:hover .reco-title { color: var(--accent-text); }
.reco-body { padding: 0 0 16px; }
.reco:not(.open) .reco-body { display: none; }
.st { font-weight: 500; color: var(--ink-2); }
.st.act { color: var(--accent-text); } .st.warn { color: var(--warn); }
.evidence { margin: 8px 0 0; padding: 8px 12px; border-left: 2px solid var(--line-2); color: var(--ink-2); }
@media (max-width: 520px) {
  .space-tab .st-sub { display: none; }
}

/* ===== Connexion de l'appareil ===== */
.login { position: fixed; inset: 0; z-index: 300; background: var(--bg); display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); overflow-y: auto; }
.login-box { width: 100%; max-width: 400px; display: grid; gap: 12px; }
.login-box .mark { width: 36px; height: 28px; color: var(--accent); }
.login-box h1 { font-size: 28px; font-weight: 400; }
.login-box #loginWhy:empty { display: none; }
.login-steps { margin: 0; padding-left: 20px; color: var(--ink-2); display: grid; gap: 4px; }
#loginCode { font: 500 28px/1.2 var(--mono); letter-spacing: .08em; text-align: center; padding: 12px; margin: 8px 0 12px; }
.advanced { margin-top: 12px; }
.advanced > summary { padding-left: 0; }
.advanced[open] > summary { margin-bottom: 4px; }
.pair { padding: 16px; margin: 4px 0 12px; border-radius: var(--r); background: var(--surface-2); text-align: center; }
.pair-code { font: 500 36px/1.1 var(--mono); letter-spacing: .1em; color: var(--ink); }
.pair-code span { display: inline-block; width: 16px; }
.pair p { margin: 8px 0 0; }
.draft-note { margin: 8px 0 0; } .draft-note:empty { display: none; }

/* ===== Tableau de bord (accueil) ===== */
.dash-head { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 16px; flex-wrap: wrap; margin: 12px 0 16px; }
.dash-head .section-title { margin: 0; }
.dash-head p { margin: 0; font-size: 14px; }
.dash { display: grid; gap: 16px; grid-template-columns: 1fr; grid-template-areas: "kpis" "todo" "agents" "pipe" "seo" "posts" "live"; }
@media (min-width: 900px) {
  .main:has(#tab-home.on) { max-width: 1320px; }
  .dash { grid-template-columns: repeat(12, 1fr); grid-template-areas:
    "kpis kpis kpis kpis kpis kpis kpis kpis kpis kpis kpis kpis"
    "todo todo todo todo todo pipe pipe pipe pipe pipe pipe pipe"
    "agents agents agents agents agents agents agents live live live live live"
    "seo seo seo seo seo seo seo posts posts posts posts posts"; align-items: start; }
}
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; min-width: 0; }
.panel > h2 { font-size: 17px; font-weight: 500; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.panel > h2 .btn { margin-left: auto; }
.panel > h2 .muted { font-size: 14px; font-weight: 400; }
.panel .pond { margin: 0; border: 0; border-radius: 0; }
.panel .pond .lane { padding-left: 0; padding-right: 0; }
.panel .empty { padding: 8px 0; }
.calm { margin: 0; color: var(--ink-2); font-size: 14px; }

.kpi-row { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .kpi-row { grid-template-columns: repeat(4, 1fr); } }
.ktile { display: grid; gap: 4px; align-content: start; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; }
.k-label { font-size: 13px; color: var(--ink-2); }
.k-value { font-size: 32px; font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; }
.k-sub { color: var(--muted); }
.k-bar { display: block; height: 4px; margin-top: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.k-bar i { display: block; height: 100%; transform-origin: left; background: var(--ink-2); }

.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-list li + li { border-top: 1px solid var(--line); }
.todo-row { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 12px; width: 100%; padding: 12px 0; border: 0; background: transparent; text-align: left; font-size: 14px; }
.todo-row:hover .t-text { color: var(--accent-text); }
.todo-row .k { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); transform: translateY(-1px); }
.todo-row .k.act { background: var(--accent); } .todo-row .k.hot { background: var(--signal); } .todo-row .k.warn { background: var(--warn); }
.t-kind { color: var(--ink-2); }
.todo-row .t { white-space: nowrap; }

.funnel { display: grid; gap: 8px; }
.f-row { display: grid; grid-template-columns: 104px 1fr 48px 40px; align-items: center; gap: 12px; font-size: 14px; }
.f-label { color: var(--ink-2); }
.f-track { height: 12px; }
.f-track i { display: block; height: 100%; transform-origin: left; background: var(--ink-2); border-radius: 0 4px 4px 0; opacity: .55; }
.f-track i.lead { background: var(--accent); opacity: 1; }
.f-n { text-align: right; font-family: var(--mono); font-size: 14px; }
.f-rate { text-align: right; font-family: var(--mono); }

.seo-rows { display: grid; }
.seo-row { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 16px; width: 100%; padding: 12px 0; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; }
.seo-row:first-child { border-top: 0; padding-top: 0; }
.seo-row:hover .sr-name { color: var(--accent-text); }
.sr-name { display: grid; gap: 2px; font-weight: 500; min-width: 0; }
.sr-name .small { font-weight: 400; }
.sr-score, .sr-clicks { display: grid; justify-items: end; font: 500 18px/1.2 var(--mono); }
.sr-score .small, .sr-clicks .small { font-family: var(--font); font-weight: 400; font-size: 12px; }
.sr-clicks:empty { display: none; }
@media (max-width: 520px) { .seo-row { grid-template-columns: 1fr auto auto; } .sr-clicks { grid-column: 1 / -1; justify-items: start; grid-auto-flow: column; justify-content: start; gap: 8px; } }
.update-bar { position: fixed; left: 16px; right: 16px; bottom: calc(var(--nav-h) + var(--safe-b) + 12px); z-index: 250; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: var(--r); background: var(--ink); color: var(--bg); font-size: 14px; }
@media (min-width: 900px) { .update-bar { left: auto; bottom: 24px; max-width: 480px; } }
@media (min-width: 900px) {
  .dash { align-items: stretch; }
  .dash .panel[style*="grid-area:live"] { display: flex; flex-direction: column; max-height: 420px; }
  .dash .panel[style*="grid-area:live"] .ticker { overflow-y: auto; min-height: 0; flex: 1; margin-right: -8px; padding-right: 8px; }
}
@media (max-width: 899px) { .dash .ticker li:nth-child(n+7) { display: none; } }
.cloud-box { margin-top: 12px; padding: 12px; border-radius: var(--r); background: var(--surface-2); }
.cloud-box.on { box-shadow: inset 2px 0 0 var(--accent); }
.cloud-box .actions { margin-top: 8px; }
.cloud-box pre { margin: 8px 0 0; max-height: 240px; overflow: auto; }
.net-grid { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.net-grid .net-off { flex-basis: 100%; }
.net-grid .net-off[open] { padding: 8px 12px 12px; border-radius: var(--r); background: var(--surface-2); }
details.post > summary { list-style: none; cursor: pointer; }
details.post > summary::-webkit-details-marker { display: none; }
details.post[open] > summary { border-bottom: 0; }
.post-body { padding: 0 0 12px 58px; border-bottom: 1px solid var(--line); }
@media (max-width: 520px) { .post-body { padding-left: 0; } }
.post-text { white-space: pre-wrap; font-size: 14px; margin: 0 0 8px; }
.post-media { display: flex; gap: 8px; overflow-x: auto; margin: 8px 0; }
.post-media img { width: 96px; height: 120px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); flex: none; }
.post-results { list-style: none; margin: 8px 0; padding: 0; font-size: 14px; }
.post-results li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.post-body .actions label { flex: 1 1 100%; flex-wrap: wrap; }
.post-body .actions input[type="datetime-local"] { flex: 1 1 180px; min-width: 0; width: auto; }
.thumb-box { position: relative; flex: none; width: 56px; height: 70px; }
.post-thumb { width: 56px; height: 70px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); display: block; }
.post-thumb.missing { display: grid; place-items: center; text-align: center; font-size: 11px; line-height: 1.2; padding: 4px; color: var(--warn); background: var(--surface-2); border-style: dashed; }
.thumb-n { position: absolute; right: 4px; bottom: 4px; min-width: 18px; padding: 0 4px; border-radius: var(--r-xs); background: rgba(0,0,0,.65); color: #fff; font: 500 11px/18px var(--mono); text-align: center; }
.post-media figure { position: relative; margin: 0; flex: none; }
.media-x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 16px; line-height: 1; }
.media-add { flex: none; width: 96px; height: 120px; display: grid; place-items: center; text-align: center; padding: 8px; border: 1px dashed var(--line-2); border-radius: var(--r-sm); font-size: 13px; color: var(--accent-text); cursor: pointer; }
.media-add:hover { background: var(--surface-2); }
@media (max-width: 520px) {
  .thumb-box, .post-thumb { width: 44px; height: 55px; }
  .post-row .net-badge { font-size: 11px; padding: 1px 6px; }
  .post-row .row { gap: 4px !important; }
  details.post .post-row { gap: 8px; }
  details.post .post-row .time { min-width: 40px; font-size: 14px; }
}
.warn-line { padding: 10px 12px; border-radius: 8px; background: var(--signal-soft); border-left: 3px solid var(--signal); }
