/* Glassy dashboard — frosted cards over a warm blurred backdrop */

.glass-page {
  --g-ink: #211d17;
  --g-muted: rgba(33, 29, 23, 0.55);
  --g-card: rgba(255, 255, 255, 0.34);
  --g-card-border: rgba(255, 255, 255, 0.6);
  --g-track: rgba(255, 255, 255, 0.5);
  --g-pill: rgba(255, 255, 255, 0.62);
  --g-dark: #1c1a18;
  --g-accent: #2547d0;
  --g-bar: #1c1a18;
  --g-shadow: 0 10px 34px rgba(30, 55, 130, 0.14);
  --g-hatch: repeating-linear-gradient(135deg, rgba(255,255,255,.7) 0 3px, rgba(70,90,140,.28) 3px 4.5px);
  background: #dbe4fb;
  color: var(--g-ink);
  min-height: 100vh;
}

/* Warm "living room" backdrop built from blurred light blobs */
.glass-page::before {
  content: "";
  position: fixed;
  inset: -12%;
  z-index: -1;
  background:
    radial-gradient(38% 34% at 10% 22%, rgba(125, 152, 255, 0.55), transparent 72%),
    radial-gradient(34% 30% at 86% 12%, rgba(255, 255, 255, 0.95), transparent 72%),
    radial-gradient(44% 38% at 54% 80%, rgba(37, 71, 208, 0.26), transparent 72%),
    radial-gradient(40% 38% at 18% 88%, rgba(234, 239, 252, 0.95), transparent 72%),
    radial-gradient(32% 30% at 94% 72%, rgba(255, 255, 255, 0.9), transparent 72%),
    radial-gradient(30% 26% at 62% 30%, rgba(160, 180, 255, 0.45), transparent 72%),
    linear-gradient(160deg, #f4f7ff, #c9d6fb);
  filter: blur(34px);
}

/* Dark variants */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .glass-page {
    --g-ink: #f4efe6;
    --g-muted: rgba(244, 239, 230, 0.55);
    --g-card: rgba(44, 38, 32, 0.42);
    --g-card-border: rgba(255, 255, 255, 0.14);
    --g-track: rgba(255, 255, 255, 0.1);
    --g-pill: rgba(255, 255, 255, 0.1);
    --g-dark: #0d0c0b;
    --g-bar: #e9edf9;
    --g-accent: #5b7bff;
    --g-shadow: 0 10px 34px rgba(0, 0, 0, 0.4);
    --g-hatch: repeating-linear-gradient(135deg, rgba(255,255,255,.22) 0 3px, rgba(255,255,255,.06) 3px 4.5px);
    background: #0e1222;
  }
  :root:not([data-theme="light"]) .glass-page::before {
    background:
      radial-gradient(38% 34% at 10% 22%, rgba(37, 71, 208, 0.55), transparent 72%),
      radial-gradient(34% 30% at 86% 12%, rgba(125, 152, 255, 0.28), transparent 72%),
      radial-gradient(44% 38% at 54% 80%, rgba(27, 54, 166, 0.55), transparent 72%),
      radial-gradient(40% 38% at 18% 88%, rgba(60, 70, 120, 0.6), transparent 72%),
      linear-gradient(160deg, #141a33, #0b0e1c);
  }
}
:root[data-theme="dark"] .glass-page {
  --g-ink: #f4efe6;
  --g-muted: rgba(244, 239, 230, 0.55);
  --g-card: rgba(44, 38, 32, 0.42);
  --g-card-border: rgba(255, 255, 255, 0.14);
  --g-track: rgba(255, 255, 255, 0.1);
  --g-pill: rgba(255, 255, 255, 0.1);
  --g-dark: #0d0c0b;
  --g-bar: #e9edf9;
  --g-accent: #5b7bff;
  --g-shadow: 0 10px 34px rgba(0, 0, 0, 0.4);
  --g-hatch: repeating-linear-gradient(135deg, rgba(255,255,255,.22) 0 3px, rgba(255,255,255,.06) 3px 4.5px);
  background: #0e1222;
}
:root[data-theme="dark"] .glass-page::before {
  background:
    radial-gradient(38% 34% at 10% 22%, rgba(37, 71, 208, 0.55), transparent 72%),
    radial-gradient(34% 30% at 86% 12%, rgba(125, 152, 255, 0.28), transparent 72%),
    radial-gradient(44% 38% at 54% 80%, rgba(27, 54, 166, 0.55), transparent 72%),
    radial-gradient(40% 38% at 18% 88%, rgba(60, 70, 120, 0.6), transparent 72%),
    linear-gradient(160deg, #141a33, #0b0e1c);
}

.glass-shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 22px 28px 70px;
}

/* ---- Top bar -------------------------------------------------------- */
.g-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
}
.g-brand, .g-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--g-pill);
  border: 1px solid var(--g-card-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--g-ink);
  text-decoration: none;
  white-space: nowrap;
}
.g-nav {
  display: flex;
  gap: 2px;
  padding: 5px;
  border-radius: 999px;
  background: var(--g-pill);
  border: 1px solid var(--g-card-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow-x: auto;
  max-width: 100%;
}
.g-nav a {
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--g-ink);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.g-nav a:hover { background: rgba(255, 255, 255, 0.45); }
.g-nav a.active { background: var(--g-dark); color: #fff; }
.g-top-actions { display: flex; gap: 8px; align-items: center; }

/* ---- Hero ------------------------------------------------------------- */
.g-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.g-hero h1 {
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--g-ink);
}
.g-hero-sub { margin: 6px 0 0; font-size: 13.5px; color: var(--g-muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.g-stale {
  background: var(--g-accent);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 4px 11px;
  border-radius: 999px;
}
.g-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 8px;
  border-radius: 999px;
  background: var(--g-dark);
  color: #fff;
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none;
  box-shadow: var(--g-shadow);
  transition: transform 0.12s ease;
}
.g-cta:hover { transform: translateY(-1px); }
.g-cta i {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--g-accent); color: #fff;
  display: grid; place-items: center; font-style: normal; font-size: 17px; line-height: 1;
}

/* ---- Metrics row ------------------------------------------------------- */
.g-metrics {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  margin-bottom: 22px;
}
.g-pills { display: flex; gap: 12px; align-items: flex-end; }
.g-pillbar { min-width: 0; }
.g-pillbar small { display: block; font-size: 11px; color: var(--g-muted); font-weight: 600; margin: 0 0 6px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-pillbar div {
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--g-card-border);
}
.pill-dark { background: var(--g-dark); color: #fff; border-color: transparent !important; }
.pill-yellow { background: var(--g-accent); color: #fff; border-color: transparent !important; }
.pill-hatched { background: var(--g-hatch); color: var(--g-ink); }
.pill-light { background: var(--g-pill); color: var(--g-ink); }

.g-kpis { display: flex; gap: 34px; align-items: flex-end; }
.g-kpi b { display: block; font-size: 44px; font-weight: 400; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.g-kpi span { font-size: 11.5px; color: var(--g-muted); font-weight: 600; }

/* ---- Cards ----------------------------------------------------------------- */
.g-card {
  background: var(--g-card);
  border: 1px solid var(--g-card-border);
  border-radius: 28px;
  box-shadow: var(--g-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  padding: 20px 22px;
  min-width: 0;
}
.g-card.dark {
  background: rgba(24, 22, 20, 0.9);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.08);
}
.g-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.g-card h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.g-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--g-muted); }
.g-big { font-size: 34px; font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin: 2px 0; }
.g-note { font-size: 11.5px; color: var(--g-muted); }
.g-arrow {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.85); color: #1c1a18;
  display: grid; place-items: center; text-decoration: none; font-size: 14px; flex-shrink: 0;
}
.g-chip-up { background: rgba(120, 200, 110, 0.35); color: #2f7a2c; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.g-chip-down { background: rgba(255, 90, 70, 0.25); color: #b3261e; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.g-chip-y { background: var(--g-accent); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 8px; }

.g-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.2fr 1.05fr 1fr;
  grid-template-areas:
    "bars velo gauge side"
    "links cal cal side";
  gap: 18px;
  margin-bottom: 34px;
}
.g-a-bars { grid-area: bars; }
.g-a-velo { grid-area: velo; }
.g-a-gauge { grid-area: gauge; }
.g-a-links { grid-area: links; }
.g-a-cal { grid-area: cal; }
.g-side { grid-area: side; display: flex; flex-direction: column; gap: 18px; }
.g-side .dark { flex: 1; }

/* Pill bars (monthly revenue) */
.pbars { display: flex; gap: 8px; align-items: flex-end; margin: 10px 0 12px; }
.pbar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.pbar-track {
  width: 100%; max-width: 30px; height: 112px;
  background: var(--g-track); border-radius: 999px;
  display: flex; align-items: flex-end; overflow: hidden;
}
.pbar-fill { width: 100%; background: var(--g-bar); border-radius: 999px; min-height: 18px; }
.pbar.current .pbar-fill { background: var(--g-accent); }
.pbar span { font-size: 10px; color: var(--g-muted); font-weight: 600; }
.g-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.g-foot .g-note b { display: block; font-size: 13px; color: var(--g-ink); }
.g-darkpill { background: var(--g-dark); color: #fff; font-weight: 700; font-size: 13px; padding: 8px 14px; border-radius: 999px; }

/* Thin velocity bars */
.vbars { display: flex; align-items: flex-end; justify-content: space-between; height: 112px; margin-top: 14px; padding: 0 4px; }
.vcol { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; flex: 1; height: 100%; }
.vbar { width: 4px; border-radius: 999px; background: var(--g-bar); min-height: 6px; }
.vcol span { font-size: 10px; color: var(--g-muted); font-weight: 600; }

/* Gauge */
.gauge-wrap { display: grid; place-items: center; position: relative; margin: 6px 0 10px; }
.gauge-wrap svg { width: 150px; height: 150px; }
.gauge-center { position: absolute; text-align: center; }
.gauge-center b { display: block; font-size: 30px; font-weight: 500; letter-spacing: -0.03em; }
.gauge-center span { font-size: 10.5px; color: var(--g-muted); font-weight: 600; }
.g-btn-row { display: flex; align-items: center; justify-content: space-between; }

/* Split segments */
.seg-row { display: flex; gap: 6px; margin: 14px 0 6px; }
.seg { min-width: 0; }
.seg small { display: block; font-size: 10.5px; font-weight: 700; color: var(--g-muted); margin-bottom: 5px; white-space: nowrap; }
.seg div { height: 34px; border-radius: 999px; padding: 0 12px; display: flex; align-items: center; font-size: 12.5px; font-weight: 700; border: 1px solid var(--g-card-border); }

/* Dark latest-sales list */
.dl-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.dl-row:last-of-type { border-bottom: none; }
.dl-row b { display: block; font-size: 13px; font-weight: 600; }
.dl-row small { font-size: 11px; color: rgba(255, 255, 255, 0.5); }
.dl-amt { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; margin-right: 8px; }
.dl-check { width: 22px; height: 22px; border-radius: 50%; background: var(--g-accent); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 900; flex-shrink: 0; }
.dl-check.hollow { background: rgba(255, 255, 255, 0.12); color: transparent; }
.dl-more { margin-top: 10px; display: block; text-align: center; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.75); font-size: 12.5px; font-weight: 600; text-decoration: none; }

/* Shortcut list */
.sl-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 0; border-bottom: 1px solid rgba(60, 80, 130, 0.14); text-decoration: none; color: inherit; }
.sl-row:last-child { border-bottom: none; }
.sl-row b { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600; }
.sl-row b::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--g-dark); }
.sl-row:nth-child(2) b::before { background: var(--g-accent); }
.sl-row small { display: block; margin: 2px 0 0 16px; font-size: 11px; color: var(--g-muted); }
.sl-row i { font-style: normal; color: var(--g-muted); }

/* Week strip */
.wk { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-top: 12px; }
.wk-col { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.wk-col small { font-size: 10.5px; color: var(--g-muted); font-weight: 600; text-transform: uppercase; }
.wk-num { width: 34px; height: 26px; border-radius: 999px; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; }
.wk-col.ref .wk-num { background: var(--g-accent); color: #fff; }
.wk-ev { width: 100%; padding: 8px 6px; border-radius: 14px; font-size: 12px; font-weight: 700; background: var(--g-dark); color: #fff; font-variant-numeric: tabular-nums; }
.wk-ev small { display: block; font-size: 10px; color: rgba(255, 255, 255, 0.55); text-transform: none; font-weight: 500; }
.wk-ev.empty { background: transparent; color: var(--g-muted); border: 1px dashed rgba(60, 80, 130, 0.3); font-weight: 500; }
.wk-ev.empty small { display: none; }

/* Section row */
.g-section-title { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 14px; }
.g-row2 { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; margin-bottom: 18px; }

/* Monthly chart */
.gchart { display: flex; align-items: flex-end; gap: 12px; height: 190px; padding-top: 8px; overflow-x: auto; }
.gchart-col { flex: 1; min-width: 40px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; height: 100%; }
.gchart-bars { display: flex; align-items: flex-end; gap: 5px; height: 150px; }
.gchart-bar { width: 14px; border-radius: 999px; min-height: 4px; }
.gchart-bar.rev { background: var(--g-bar); }
.gchart-bar.exp { background: var(--g-accent); }
.gchart-col span { font-size: 10.5px; color: var(--g-muted); font-weight: 600; white-space: nowrap; }
.g-legend { display: flex; gap: 18px; margin-top: 12px; font-size: 12px; color: var(--g-muted); font-weight: 600; }
.g-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }

/* Donut */
.donut-wrap { display: flex; align-items: center; gap: 18px; margin-top: 8px; flex-wrap: wrap; }
.donut { position: relative; width: 140px; height: 140px; flex-shrink: 0; }
.donut svg { width: 140px; height: 140px; transform: rotate(-90deg); }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut-center b { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.donut-center span { font-size: 10px; color: var(--g-muted); font-weight: 600; }
.dleg { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 12.5px; flex: 1; min-width: 150px; }
.dleg li { display: flex; align-items: center; gap: 8px; }
.dleg i { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dleg span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dleg b { font-variant-numeric: tabular-nums; }

/* Table card + sync card */
.glass-page .g-table table { width: 100%; font-size: 13px; }
.glass-page .g-table th { color: var(--g-muted); border-bottom: 1px solid rgba(60, 80, 130, 0.18); }
.glass-page .g-table td { border-bottom: 1px solid rgba(60, 80, 130, 0.12); }
.glass-page .g-table tbody tr:hover { background: rgba(255, 255, 255, 0.25); }
.glass-page .action-cell { position: static; background: transparent; }
.glass-page .btn-icon { color: var(--g-muted); }
.glass-page .btn-secondary { background: var(--g-pill); color: var(--g-ink); border: 1px solid var(--g-card-border); }
.glass-page .btn-primary { background: var(--g-dark); color: #fff; }
.glass-page td.positive { color: #2f7a2c; }
.glass-page td.negative { color: #b3261e; }
.glass-page .flash-list { margin-bottom: 16px; }
.g-footnote { font-size: 12px; color: var(--g-muted); max-width: 720px; line-height: 1.55; margin: 18px 4px 0; }
.g-card-head-lg { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }

/* ---- Responsive ------------------------------------------------------------ */
@media (max-width: 1180px) {
  .g-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: none; }
  .g-grid > * { grid-area: auto !important; }
  .g-metrics { grid-template-columns: 1fr; }
  .g-row2 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .glass-shell { padding: 14px 14px 60px; }
  .g-topbar { flex-wrap: wrap; }
  .g-nav { order: 3; width: 100%; }
  .g-grid { grid-template-columns: 1fr; }
  .g-pills { flex-wrap: wrap; }
  .g-kpis { gap: 22px; flex-wrap: wrap; }
  .g-kpi b { font-size: 34px; }
  .g-hero { flex-direction: column; }
  .g-hero h1 { font-size: 30px; }
}

/* ======================================================================
   Centre de contrôle : commandes, messages, demandes, synchro
   ====================================================================== */
.g-nav-sep { width: 1px; background: rgba(60, 80, 130, 0.22); margin: 6px 6px; flex-shrink: 0; }
.g-nbadge {
  display: inline-block; margin-left: 6px; min-width: 18px; padding: 1px 6px; border-radius: 999px;
  background: var(--g-accent); color: #fff; font-size: 10.5px; font-weight: 800; text-align: center; line-height: 16px;
}
.g-nav a.active .g-nbadge { background: #fff; color: var(--g-dark); }

.g-sync {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; cursor: pointer;
  background: var(--g-pill); border: 1px solid var(--g-card-border); color: var(--g-ink);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); font: inherit; font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.g-sync-dot { width: 8px; height: 8px; border-radius: 50%; background: #2f9e44; box-shadow: 0 0 0 3px rgba(47, 158, 68, 0.2); }
.g-sync.warn .g-sync-dot { background: #e08a00; box-shadow: 0 0 0 3px rgba(224, 138, 0, 0.22); }
.g-sync.busy .g-sync-dot { background: var(--g-accent); animation: g-pulse 1s ease-in-out infinite; }
@keyframes g-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.6); opacity: 0.5; } }
.g-newdata {
  margin: 0 0 14px; padding: 10px 16px; border-radius: 16px; background: var(--g-accent); color: #fff;
  font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 12px;
}
.g-newdata[hidden] { display: none; }
.g-newdata button { border: 0; border-radius: 999px; padding: 5px 12px; font-weight: 700; cursor: pointer; background: #fff; color: var(--g-accent); }

.g-search input {
  padding: 11px 18px; border-radius: 999px; border: 1px solid var(--g-card-border); background: var(--g-pill);
  color: var(--g-ink); font: inherit; font-size: 13.5px; width: 260px; backdrop-filter: blur(18px);
}
.g-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.g-tabs a {
  padding: 9px 16px; border-radius: 999px; background: var(--g-pill); border: 1px solid var(--g-card-border);
  color: var(--g-ink); text-decoration: none; font-size: 13px; font-weight: 600; backdrop-filter: blur(18px);
}
.g-tabs a b { margin-left: 6px; color: var(--g-muted); font-weight: 700; }
.g-tabs a.on { background: var(--g-dark); color: #fff; border-color: transparent; }
.g-tabs a.on b { color: rgba(255, 255, 255, 0.7); }

.g-table-wrap { overflow-x: auto; }
.g-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.g-table th { text-align: left; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--g-muted); font-weight: 700; padding: 12px 14px 8px; }
.g-table td { padding: 13px 14px; border-top: 1px solid rgba(60, 80, 130, 0.12); vertical-align: top; }
.g-table .r { text-align: right; }
.g-table .nowrap { white-space: nowrap; }
.g-table .items { max-width: 320px; color: var(--g-muted); }
.g-table a { color: inherit; text-decoration: none; }
.g-row-link { cursor: pointer; transition: background 0.12s; }
.g-row-link:hover { background: rgba(255, 255, 255, 0.3); }
.g-sub { font-size: 12px; color: var(--g-muted); }
.g-empty { padding: 34px 16px; text-align: center; color: var(--g-muted); font-size: 14px; }
.g-empty-s { color: var(--g-muted); font-size: 13px; margin: 10px 0 0; line-height: 1.5; }
.g-empty-s code { background: rgba(60, 80, 130, 0.12); padding: 1px 5px; border-radius: 5px; font-size: 12px; }

.g-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.g-badge.ok { background: rgba(47, 158, 68, 0.18); color: #2b7a3d; }
.g-badge.warn { background: rgba(224, 138, 0, 0.2); color: #9a5b00; }
.g-badge.info { background: rgba(37, 71, 208, 0.14); color: #2547d0; }
.g-badge.muted { background: rgba(120, 130, 150, 0.2); color: var(--g-muted); }
:root[data-theme="dark"] .g-badge.ok { color: #7bd98f; }
:root[data-theme="dark"] .g-badge.warn { color: #ffc15a; }
:root[data-theme="dark"] .g-badge.info { color: #9db3ff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .g-badge.ok { color: #7bd98f; }
  :root:not([data-theme="light"]) .g-badge.warn { color: #ffc15a; }
  :root:not([data-theme="light"]) .g-badge.info { color: #9db3ff; }
}

.g-back { font-size: 13px; color: var(--g-muted); text-decoration: none; font-weight: 600; }
.g-two { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.g-stack { display: flex; flex-direction: column; gap: 18px; }
.g-h2 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 6px; }
.g-h3 { font-size: 18px; font-weight: 600; margin: 6px 0 10px; }
.g-lines { margin-top: 8px; }
.g-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid rgba(60, 80, 130, 0.12); color: inherit; text-decoration: none; font-size: 13.5px; }
.g-line-r { font-variant-numeric: tabular-nums; white-space: nowrap; display: flex; gap: 10px; align-items: center; }
.g-totals { margin-top: 12px; display: grid; gap: 6px; font-size: 13.5px; }
.g-totals > div { display: flex; justify-content: space-between; color: var(--g-muted); }
.g-totals .big { color: var(--g-ink); font-size: 18px; font-weight: 700; padding-top: 8px; border-top: 1px solid rgba(60, 80, 130, 0.18); }
.g-body { font-size: 13.5px; line-height: 1.55; margin: 6px 0 0; white-space: pre-wrap; }
.g-kv { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid rgba(60, 80, 130, 0.1); font-size: 13.5px; }
.g-kv > span:first-child { color: var(--g-muted); }
.g-kv a { color: var(--g-accent); text-decoration: none; font-weight: 600; word-break: break-all; }
.g-mini { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid rgba(60, 80, 130, 0.1); color: inherit; text-decoration: none; font-size: 13.5px; }

.g-btn {
  display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--g-card-border);
  background: var(--g-pill); color: var(--g-ink); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; text-decoration: none;
}
.g-btn:hover { background: rgba(255, 255, 255, 0.6); }
.g-btn.primary { background: var(--g-accent); color: #fff; border-color: transparent; }
.g-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; align-items: center; }
.g-actions form { display: contents; }
.g-callout { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }

/* Boîte de réception */
.g-inbox { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 18px; align-items: start; }
.g-list { padding: 8px; max-height: 74vh; overflow-y: auto; }
.g-msg { display: block; padding: 12px 14px; border-radius: 18px; color: inherit; text-decoration: none; border: 1px solid transparent; }
.g-msg:hover { background: rgba(255, 255, 255, 0.28); }
.g-msg.sel { background: rgba(255, 255, 255, 0.55); border-color: var(--g-card-border); }
.g-msg-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.g-msg-top span { color: var(--g-muted); font-size: 11.5px; white-space: nowrap; }
.g-msg.unread .g-msg-top b::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--g-accent); margin-right: 7px; }
.g-msg-sub { font-size: 13px; font-weight: 600; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-msg-snip { font-size: 12.5px; color: var(--g-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-reader { min-height: 320px; }
.g-mailbody { white-space: pre-wrap; word-wrap: break-word; font: inherit; font-size: 14px; line-height: 1.6; margin: 10px 0 0; padding: 16px 18px; border-radius: 18px; background: rgba(255, 255, 255, 0.35); max-height: 46vh; overflow: auto; }
.g-notebox { margin-top: 18px; display: grid; gap: 8px; justify-items: start; }
.g-notebox textarea, .g-form input, .g-form textarea {
  width: 100%; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--g-card-border); background: var(--g-pill);
  color: var(--g-ink); font: inherit; font-size: 13.5px; box-sizing: border-box;
}

/* Demandes (kanban) */
.g-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.g-col { background: rgba(255, 255, 255, 0.22); border: 1px solid var(--g-card-border); border-radius: 24px; padding: 12px; min-height: 120px; backdrop-filter: blur(14px); }
.g-col-head { display: flex; justify-content: space-between; padding: 4px 8px 10px; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--g-muted); }
.g-kcard { background: var(--g-card); border: 1px solid var(--g-card-border); border-radius: 18px; padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--g-shadow); }
.g-kt { color: inherit; text-decoration: none; font-size: 14px; }
.g-kp { font-size: 12.5px; color: var(--g-muted); margin: 6px 0 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.g-kmove select { width: 100%; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--g-card-border); background: var(--g-pill); color: var(--g-ink); font: inherit; font-size: 12px; }
.g-klink { display: inline-block; margin-top: 8px; font-size: 12.5px; font-weight: 700; color: var(--g-accent); text-decoration: none; }
.g-dot-new { color: var(--g-accent); font-weight: 800; }
.g-newreq { margin-bottom: 16px; }
.g-newreq summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.g-form { display: grid; gap: 10px; margin-top: 12px; max-width: 560px; justify-items: start; }

/* Accueil : à traiter + connexions */
.g-todo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.g-todo-card { display: block; text-decoration: none; color: inherit; padding: 18px 20px; }
.g-todo-card .n { font-size: 38px; font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: 4px; }
.g-todo-card .n.hot { color: var(--g-accent); }
.g-todo-card:hover { transform: translateY(-2px); transition: transform 0.15s; }
.g-feed { display: grid; gap: 0; }
.g-src { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(60, 80, 130, 0.12); font-size: 13.5px; }
.g-src::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #2f9e44; flex-shrink: 0; }
.g-src.bad::before { background: #e08a00; }
.g-src.off::before { background: #9aa0ad; }
.g-src b { min-width: 150px; }
.g-src .s-msg { color: var(--g-muted); flex: 1; }
.g-src .s-when { color: var(--g-muted); font-size: 12px; white-space: nowrap; }
.g-hide-sm { }

@media (max-width: 1180px) {
  .g-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-todo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-two, .g-inbox { grid-template-columns: 1fr; }
  .g-list { max-height: 360px; }
}
@media (max-width: 900px) { .g-hide-sm { display: none; } .g-sync-text { max-width: 110px; overflow: hidden; text-overflow: ellipsis; } }
@media (max-width: 720px) {
  .g-board, .g-todo { grid-template-columns: 1fr; }
  .g-search input { width: 100%; }
  .g-top-actions { flex-wrap: nowrap; }
}

/* Messagerie imprimeur */
.g-chat { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; margin: 6px 0 14px; }
.g-bubble { max-width: 78%; padding: 10px 14px; border-radius: 18px; background: rgba(255, 255, 255, 0.5); align-self: flex-start; }
.g-bubble.boutique { align-self: flex-end; background: var(--g-accent); color: #fff; }
.g-bubble.boutique .g-sub, .g-bubble.boutique a { color: rgba(255, 255, 255, 0.8); }
.g-bt { white-space: pre-wrap; word-wrap: break-word; font-size: 14px; margin-top: 2px; }

/* ---- Accueil simple ---- */
.s-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.s-tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.s-tile { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; padding: 22px 22px 18px; min-height: 170px; }
.s-tile:hover { transform: translateY(-2px); transition: transform 0.15s; }
.s-n { font-size: 54px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.s-hot .s-n { color: var(--g-accent); }
.s-title { font-size: 19px; font-weight: 700; line-height: 1.2; }
.s-help { font-size: 14.5px; color: var(--g-muted); line-height: 1.4; }
.s-go { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 600; color: var(--g-accent); }
.s-block { padding: 22px 24px; margin-bottom: 20px; }
.s-h2 { margin: 0 0 14px; font-size: 20px; font-weight: 700; }
.s-muted { font-weight: 500; color: var(--g-muted); font-size: 15px; }
.s-money { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.s-money b { display: block; font-size: 30px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.s-money span { font-size: 15px; font-weight: 600; }
.s-money small { font-weight: 400; color: var(--g-muted); font-size: 13px; }
.s-pos { color: #12805c; } .s-neg { color: #c0392b; }
.s-link { font-size: 15px; font-weight: 600; color: var(--g-accent); text-decoration: none; }
.s-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 4px 0 28px; }
.s-btn { display: inline-flex; align-items: center; padding: 12px 20px; border-radius: 999px; background: rgba(255,255,255,0.6); font-weight: 600; font-size: 15px; text-decoration: none; color: inherit; }
@media (max-width: 1180px) { .s-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .s-tiles-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .s-tiles, .s-tiles-3 { grid-template-columns: 1fr; gap: 12px; }
  .s-tile { min-height: 0; padding: 18px; flex-direction: row; flex-wrap: wrap; align-items: baseline; }
  .s-n { font-size: 40px; margin-right: 10px; }
  .s-title { flex: 1 1 60%; }
  .s-help, .s-go { flex: 1 1 100%; }
  .s-money { grid-template-columns: 1fr; }
  .s-actions .g-cta, .s-actions .s-btn { width: 100%; justify-content: center; }
}

/* Barre du haut : le menu passe sur sa propre ligne dès que l'écran est moyen, pour que tout soit visible */
@media (max-width: 1500px) {
  .g-topbar { flex-wrap: wrap; }
  .g-nav { order: 3; width: 100%; justify-content: space-between; }
  .g-nav a { flex: 1 1 auto; text-align: center; }
}
@media (max-width: 720px) {
  .g-nav { padding: 4px; }
  .g-nav a { padding: 9px 7px; font-size: 12.5px; }
}
