
    :root {
      --bg: #f4f7f8;
      --card: #ffffff;
      --text: #17323a;
      --muted: #60777d;
      --accent: #2c6873;
      --accent-dark: #204f58;
      --shadow: 0 10px 30px rgba(23, 50, 58, .10);
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      font-family: Arial, Helvetica, sans-serif;
      color: var(--text);
      background: linear-gradient(135deg, #eef5f5 0%, var(--bg) 100%);
    }

    .container {
      width: min(1100px, 92%);
      margin: 0 auto;
    }

    header {
      text-align: center;
      padding: 70px 20px 45px;
    }

    .logo-mark {
      width: 70px;
      height: 70px;
      margin: 0 auto 20px;
      border-radius: 18px;
      display: grid;
      place-items: center;
      background: var(--accent);
      color: white;
      font-size: 28px;
      font-weight: 700;
      box-shadow: var(--shadow);
    }

    h1 {
      margin: 0 0 14px;
      font-size: clamp(30px, 5vw, 48px);
      letter-spacing: -.8px;
    }

    .intro {
      max-width: 650px;
      margin: 0 auto;
      color: var(--muted);
      font-size: 18px;
      line-height: 1.6;
    }

    main {
      padding: 10px 0 70px;
    }

    .tools {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 24px;
    }

    .tool {
      background: var(--card);
      border-radius: 20px;
      padding: 28px;
      box-shadow: var(--shadow);
      transition: transform .2s ease, box-shadow .2s ease;
      display: flex;
      flex-direction: column;
    }

    .tool:hover {
      transform: translateY(-4px);
      box-shadow: 0 16px 38px rgba(23, 50, 58, .15);
    }

    .tool h2 {
      margin: 0 0 12px;
      font-size: 22px;
    }

    .tool p {
      margin: 0 0 24px;
      color: var(--muted);
      line-height: 1.55;
      min-height: 50px;
    }

    .image-button {
      display: block;
      margin-top: auto;
      border-radius: 12px;
      overflow: hidden;
      cursor: pointer;
      outline: none;
      background: #edf2f3;
    }

    .image-button img {
      width: 100%;
      display: block;
      aspect-ratio: 16 / 7;
      object-fit: cover;
      transition: transform .25s ease, opacity .25s ease;
    }

    .image-button:hover img {
      transform: scale(1.025);
      opacity: .92;
    }

    .primary-tool-link {
      display: inline-block;
      margin-top: auto;
      padding: 13px 18px;
      border-radius: 10px;
      background: var(--accent);
      color: #fff;
      text-align: center;
      text-decoration: none;
      font-weight: 700;
    }

    .primary-tool-link:hover {
      background: var(--accent-dark);
    }

    [hidden] {
      display: none !important;
    }

    .coming-soon {
      margin-top: auto;
      padding: 24px;
      border: 2px dashed #c8d5d8;
      border-radius: 12px;
      text-align: center;
      color: var(--muted);
      background: #f8fafb;
    }

    footer {
      text-align: center;
      padding: 25px 20px 40px;
      color: #819398;
      font-size: 13px;
    }

    @media (max-width: 760px) {
      header { padding-top: 45px; }
      .tools { grid-template-columns: 1fr; }
      .tool { padding: 22px; }
    }

    /* =========================
   PAGE DE CONNEXION
   ========================= */

.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =========================
   EMMATHUNE — DASHBOARD V3
   ========================= */

.dashboard-page.dashboard-v3 {
  --dash-ink: #18322f;
  --dash-muted: #6f7f7b;
  --dash-border: #e3e7e2;
  --dash-canvas: #f3f1eb;
  --dash-panel: #fffdf9;
  --dash-green: #267568;
  --dash-green-dark: #174c45;
  --dash-mint: #dcebe6;
  --dash-amber: #d8a84d;
  margin: 0;
  min-height: 100vh;
  color: var(--dash-ink);
  background: var(--dash-canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dashboard-v3 .dashboard-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

.dashboard-v3 .dashboard-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 28px 18px 20px;
  background: #173833;
  color: #fff;
}

.dashboard-v3 .dashboard-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 32px;
  color: #fff;
  text-decoration: none;
}

.dashboard-v3 .logo-symbol {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--dash-amber);
  color: #173833;
  font-family: Georgia, serif;
  font-size: 23px;
  font-weight: 800;
}

.dashboard-v3 .dashboard-logo > span:last-child { display: grid; line-height: 1.1; }
.dashboard-v3 .dashboard-logo strong { font-family: Georgia, serif; font-size: 21px; letter-spacing: -.25px; }
.dashboard-v3 .dashboard-logo small { margin-top: 4px; color: #a9bfba; font-size: 10px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; }

.dashboard-v3 .side-navigation { display: grid; gap: 7px; }
.dashboard-v3 .side-navigation a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 10px;
  color: #b9ccc7;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: background .18s ease, color .18s ease;
}
.dashboard-v3 .side-navigation a span { width: 19px; color: #87a49d; font-size: 18px; text-align: center; }
.dashboard-v3 .side-navigation a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.dashboard-v3 .side-navigation a.is-active { background: #285c53; color: #fff; box-shadow: inset 3px 0 var(--dash-amber); }
.dashboard-v3 .side-navigation a.is-active span { color: #e8c173; }

.dashboard-v3 .sidebar-account {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 15px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.dashboard-v3 .account-avatar {
  display: grid;
  flex: 0 0 35px;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 50%;
  background: #e6c177;
  color: #173833;
  font-weight: 800;
}
.dashboard-v3 .account-copy { display: grid; min-width: 0; }
.dashboard-v3 .account-copy small { color: #8ea8a2; font-size: 9px; text-transform: uppercase; }
.dashboard-v3 .account-copy strong { overflow: hidden; margin-top: 3px; font-size: 12px; text-overflow: ellipsis; }
.dashboard-v3 .icon-logout {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #9bb2ac;
  font-size: 19px;
  cursor: pointer;
}

.dashboard-v3 .dashboard-main {
  width: 100%;
  max-width: 1640px;
  margin: 0 auto;
  padding: 34px clamp(24px, 3vw, 52px) 54px;
}

.dashboard-v3 .dashboard-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}
.dashboard-v3 .dashboard-kicker,
.dashboard-v3 .panel-overline {
  margin: 0 0 8px;
  color: var(--dash-green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.6px;
}
.dashboard-v3 .dashboard-topbar h1 {
  margin: 0;
  color: var(--dash-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 3.2vw, 46px);
  font-weight: 600;
  letter-spacing: -1.2px;
  line-height: 1.05;
}
.dashboard-v3 .dashboard-intro { margin: 9px 0 0; color: var(--dash-muted); font-size: 13px; }

.dashboard-v3 .period-form {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.dashboard-v3 .period-form label {
  position: static;
  display: grid;
  width: auto;
  height: auto;
  gap: 6px;
  overflow: visible;
  clip: auto;
  color: var(--dash-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
}
.dashboard-v3 .period-form select,
.dashboard-v3 .dashboard-refresh {
  min-width: 112px;
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--dash-border);
  border-radius: 9px;
  background: var(--dash-panel);
  color: var(--dash-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
}
.dashboard-v3 .dashboard-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-color: var(--dash-green-dark);
  background: var(--dash-green-dark);
  color: #fff;
  cursor: pointer;
}
.dashboard-v3 .dashboard-refresh:disabled { opacity: .65; cursor: wait; }

.dashboard-v3 .dashboard-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 86px;
  padding: 22px;
  border: 1px solid var(--dash-border);
  border-radius: 14px;
  background: var(--dash-panel);
  color: var(--dash-muted);
  box-shadow: none;
}
.dashboard-v3 .dashboard-status-error { border-color: #e7c6c1; background: #fff6f4; color: #9a4035; }
.dashboard-v3 .loading-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dash-green); animation: dashPulse 1.1s ease-in-out infinite; }
@keyframes dashPulse { 50% { opacity: .3; transform: scale(.7); } }

.dashboard-v3 #dashboardContent { display: grid; gap: 20px; }
.dashboard-v3 .dashboard-summary { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(360px, 1fr); gap: 20px; }
.dashboard-v3 .revenue-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 142px;
  gap: 24px;
  min-height: 260px;
  padding: 30px;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, #153f38 0%, #1e5e53 100%);
  color: #fff;
  box-shadow: 0 14px 34px rgba(23, 56, 51, .13);
}
.dashboard-v3 .revenue-hero::after {
  position: absolute;
  right: -75px;
  bottom: -105px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  content: "";
}
.dashboard-v3 .hero-copy { display: flex; z-index: 1; flex-direction: column; align-items: flex-start; }
.dashboard-v3 .metric-label { color: #71807c; font-size: 11px; font-weight: 750; letter-spacing: .6px; text-transform: uppercase; }
.dashboard-v3 .revenue-hero .metric-label { color: #bdd0ca; }
.dashboard-v3 .hero-value { margin: 13px 0 17px; font-family: Georgia, serif; font-size: clamp(42px, 5vw, 65px); font-weight: 500; letter-spacing: -2px; line-height: 1; }
.dashboard-v3 .trend-pill { padding: 6px 10px; border-radius: 99px; background: rgba(255,255,255,.11); color: #dce9e5; font-size: 11px; font-weight: 700; }
.dashboard-v3 .trend-pill[data-tone="positive"] { background: rgba(130, 211, 169, .15); color: #baf0d0; }
.dashboard-v3 .trend-pill[data-tone="negative"] { background: rgba(236, 139, 128, .15); color: #ffd0ca; }
.dashboard-v3 .progress-ring {
  position: relative;
  z-index: 1;
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  align-self: start;
  border-radius: 50%;
  background: conic-gradient(var(--dash-amber) calc(var(--progress) * 1%), rgba(255,255,255,.12) 0);
}
.dashboard-v3 .progress-ring::before { position: absolute; width: 102px; height: 102px; border-radius: 50%; background: #20594f; content: ""; }
.dashboard-v3 .progress-ring div { z-index: 1; display: grid; text-align: center; }
.dashboard-v3 .progress-ring strong { font-family: Georgia, serif; font-size: 24px; }
.dashboard-v3 .progress-ring span { margin-top: 3px; color: #b8cec7; font-size: 9px; text-transform: uppercase; }
.dashboard-v3 .hero-meta { z-index: 1; display: grid; grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: auto; border-top: 1px solid rgba(255,255,255,.13); }
.dashboard-v3 .hero-meta span { display: grid; gap: 5px; padding: 17px 18px 0 0; }
.dashboard-v3 .hero-meta small { color: #9dbab2; font-size: 10px; text-transform: uppercase; }
.dashboard-v3 .hero-meta strong { font-size: 15px; font-variant-numeric: tabular-nums; }

.dashboard-v3 .quick-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dashboard-v3 .compact-kpi {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  min-height: 124px;
  padding: 20px;
  border: 1px solid var(--dash-border);
  border-radius: 14px;
  background: var(--dash-panel);
}
.dashboard-v3 .compact-kpi > div { display: grid; min-width: 0; }
.dashboard-v3 .compact-kpi strong { overflow: hidden; margin-top: 9px; font-family: Georgia, serif; font-size: clamp(22px, 2.2vw, 29px); font-weight: 600; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-v3 .compact-kpi small { margin-top: 8px; color: #99a39f; font-size: 10px; }
.dashboard-v3 .metric-icon { display: grid; flex: 0 0 30px; width: 30px; height: 30px; place-items: center; border-radius: 8px; background: var(--dash-mint); color: var(--dash-green); font-size: 13px; font-weight: 900; }
.dashboard-v3 .metric-icon-due { background: #f5e9d1; color: #9b6c17; }

.dashboard-v3 .history-notice { display: flex; align-items: center; gap: 13px; padding: 14px 17px; border: 1px solid #e6d6b5; border-radius: 11px; background: #fff8e9; color: #765b28; }
.dashboard-v3 .history-notice > span { display: grid; flex: 0 0 24px; height: 24px; place-items: center; border-radius: 50%; background: #e8c477; font-family: Georgia, serif; font-weight: 800; }
.dashboard-v3 .history-notice p { margin: 0; font-size: 12px; line-height: 1.45; }

.dashboard-v3 .dashboard-grid { display: grid; gap: 20px; margin: 0; }
.dashboard-v3 .main-insights { grid-template-columns: minmax(0, 2.15fr) minmax(290px, .85fr); }
.dashboard-v3 .dashboard-panel { min-width: 0; padding: 24px; border: 1px solid var(--dash-border); border-radius: 16px; background: var(--dash-panel); box-shadow: none; }
.dashboard-v3 .panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.dashboard-v3 .panel-heading.compact { margin-bottom: 21px; }
.dashboard-v3 .panel-heading h2,
.dashboard-v3 .annual-panel h2 { margin: 0; color: var(--dash-ink); font-family: Georgia, serif; font-size: 21px; font-weight: 600; letter-spacing: -.3px; }
.dashboard-v3 .panel-heading p { margin: 6px 0 0; color: var(--dash-muted); font-size: 11px; line-height: 1.45; }

.dashboard-v3 .chart-legend { display: flex; flex-wrap: wrap; gap: 13px; color: var(--dash-muted); font-size: 10px; white-space: nowrap; }
.dashboard-v3 .chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dashboard-v3 .chart-legend i { width: 18px; height: 4px; border-radius: 6px; }
.dashboard-v3 .legend-current { background: var(--dash-green); }
.dashboard-v3 .legend-previous { height: 0 !important; border-top: 2px dashed #8ea19c; }
.dashboard-v3 .legend-target { height: 2px !important; background: var(--dash-amber); }
.dashboard-v3 .chart-frame { overflow-x: auto; border-radius: 10px; }
.dashboard-v3 .dashboard-chart { display: block; width: 100%; min-width: 700px; height: auto; }
.dashboard-v3 .chart-grid { stroke: #e7e9e5; stroke-width: 1; }
.dashboard-v3 .chart-axis-label { fill: #7e8c88; font-family: Inter, Arial, sans-serif; font-size: 12px; }
.dashboard-v3 .chart-month-label.is-selected { fill: var(--dash-green-dark); font-weight: 800; }
.dashboard-v3 .chart-selected-month { fill: #f1f6f3; }
.dashboard-v3 .chart-bar { fill: #82aea5; }
.dashboard-v3 .chart-bar-history { fill: #b9c8c4; }
.dashboard-v3 .chart-bar.is-selected { fill: var(--dash-green); }
.dashboard-v3 .chart-target-marker { stroke: var(--dash-amber); stroke-width: 4; stroke-linecap: round; }
.dashboard-v3 .chart-line-previous { fill: none; stroke: #849a95; stroke-width: 2; stroke-dasharray: 6 5; }
.dashboard-v3 .chart-dot-previous { fill: var(--dash-panel); stroke: #849a95; stroke-width: 2; }
.dashboard-v3 .daily-area { fill: url(#dailyAreaGradient); }
.dashboard-v3 .daily-line { fill: none; stroke: var(--dash-green); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.dashboard-v3 .daily-point { fill: var(--dash-panel); stroke: var(--dash-green); stroke-width: 3; }
.dashboard-v3 .chart-empty-bg { fill: #f7f7f3; stroke: #e7e8e3; }
.dashboard-v3 .chart-empty-title { fill: var(--dash-ink); font-family: Georgia, serif; font-size: 19px; }
.dashboard-v3 .chart-empty-copy { fill: var(--dash-muted); font-family: Inter, Arial, sans-serif; font-size: 12px; }

.dashboard-v3 .annual-panel { display: flex; flex-direction: column; justify-content: flex-start; background: #1c4640; color: #fff; }
.dashboard-v3 .annual-panel .panel-overline { color: #e5be70; }
.dashboard-v3 .annual-panel h2 { color: #fff; }
.dashboard-v3 .annual-percent { margin: 25px 0 2px; font-family: Georgia, serif; font-size: 50px; font-weight: 500; }
.dashboard-v3 .annual-panel > p { min-height: 34px; margin: 0 0 19px; color: #b6cac5; font-size: 11px; line-height: 1.45; }
.dashboard-v3 .annual-gauge { height: 8px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.11); }
.dashboard-v3 .annual-gauge span { display: block; height: 100%; border-radius: inherit; background: var(--dash-amber); }
.dashboard-v3 .annual-stats { display: grid; gap: 0; margin: 24px 0 0; }
.dashboard-v3 .annual-stats div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.dashboard-v3 .annual-stats dt { color: #9eb8b1; font-size: 10px; }
.dashboard-v3 .annual-stats dd { margin: 0; font-size: 12px; font-weight: 750; }
.dashboard-v3 .target-detail { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; margin-top: auto; padding-top: 20px; }
.dashboard-v3 .target-detail > span { color: #9eb8b1; font-size: 10px; }
.dashboard-v3 .target-detail > strong { color: #f0cb80; font-size: 13px; }
.dashboard-v3 .target-detail > small { grid-column: 1 / -1; color: #b8cbc6; font-size: 9px; }
.dashboard-v3 .target-detail .progress-track { grid-column: 1 / -1; height: 5px; margin: 5px 0 0; background: rgba(255,255,255,.1); }
.dashboard-v3 .target-detail .progress-track span { display: block; height: 100%; border-radius: inherit; background: #e7bf6d; }

.dashboard-v3 .daily-summary { display: grid; min-width: 150px; justify-items: end; }
.dashboard-v3 .daily-summary small { color: var(--dash-muted); font-size: 9px; text-transform: uppercase; }
.dashboard-v3 .daily-summary strong { margin-top: 5px; color: var(--dash-green-dark); font-size: 13px; }
.dashboard-v3 .breakdown-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dashboard-v3 .breakdown-list { display: grid; gap: 16px; }
.dashboard-v3 .breakdown-item { display: flex; align-items: flex-start; gap: 10px; }
.dashboard-v3 .breakdown-rank { padding-top: 1px; color: #a2aaa7; font-family: Georgia, serif; font-size: 12px; }
.dashboard-v3 .breakdown-content { flex: 1; min-width: 0; }
.dashboard-v3 .breakdown-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 11px; }
.dashboard-v3 .breakdown-heading span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-v3 .breakdown-heading strong { flex: 0 0 auto; color: var(--dash-ink); }
.dashboard-v3 .breakdown-track { height: 5px; overflow: hidden; border-radius: 99px; background: #e9ece7; }
.dashboard-v3 .breakdown-track span { display: block; height: 100%; border-radius: inherit; background: var(--dash-green); }
.dashboard-v3 .empty-state { padding: 25px 10px !important; color: var(--dash-muted); text-align: center; }

.dashboard-v3 .data-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 99px; background: var(--dash-mint); color: var(--dash-green-dark); font-size: 9px; font-weight: 750; }
.dashboard-v3 .data-badge i { width: 6px; height: 6px; border-radius: 50%; background: #30a47f; box-shadow: 0 0 0 3px rgba(48,164,127,.12); }
.dashboard-v3 .table-scroll { overflow-x: auto; }
.dashboard-v3 .dashboard-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.dashboard-v3 .dashboard-table th,
.dashboard-v3 .dashboard-table td { padding: 13px 12px; border-bottom: 1px solid #e8eae5; color: #42504d; text-align: left; font-size: 11px; }
.dashboard-v3 .dashboard-table th { color: #85918d; font-size: 9px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; }
.dashboard-v3 .dashboard-table tbody tr:hover { background: #f7f8f4; }
.dashboard-v3 .dashboard-table .cell-number { color: var(--dash-ink); font-weight: 750; text-align: right; font-variant-numeric: tabular-nums; }
.dashboard-v3 .dashboard-table .has-balance { color: #9b6212; }
.dashboard-v3 .data-timestamp { margin: 12px 0 0; color: #9aa39f; font-size: 9px; text-align: right; }

@media (max-width: 1160px) {
  .dashboard-v3 .dashboard-summary { grid-template-columns: 1fr; }
  .dashboard-v3 .quick-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dashboard-v3 .compact-kpi { min-height: 116px; padding: 17px; }
  .dashboard-v3 .metric-icon { display: none; }
  .dashboard-v3 .breakdown-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-v3 .breakdown-panel:last-child { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .dashboard-v3 .dashboard-shell { grid-template-columns: 1fr; }
  .dashboard-v3 .dashboard-sidebar { position: static; display: grid; grid-template-columns: auto 1fr auto; height: auto; padding: 14px 18px; }
  .dashboard-v3 .dashboard-logo { padding: 0; }
  .dashboard-v3 .dashboard-logo small { display: none; }
  .dashboard-v3 .side-navigation { display: flex; justify-content: center; gap: 5px; }
  .dashboard-v3 .side-navigation a { min-height: 39px; padding: 0 10px; }
  .dashboard-v3 .side-navigation a span { display: none; }
  .dashboard-v3 .sidebar-account { margin: 0; padding: 0; border: 0; }
  .dashboard-v3 .account-copy { display: none; }
  .dashboard-v3 .main-insights { grid-template-columns: 1fr; }
  .dashboard-v3 .quick-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .dashboard-v3 .dashboard-sidebar { grid-template-columns: auto auto; justify-content: space-between; }
  .dashboard-v3 .side-navigation { grid-column: 1 / -1; grid-row: 2; margin-top: 12px; overflow-x: auto; justify-content: flex-start; }
  .dashboard-v3 .sidebar-account { grid-column: 2; grid-row: 1; }
  .dashboard-v3 .dashboard-main { padding: 25px 16px 42px; }
  .dashboard-v3 .dashboard-topbar { align-items: flex-start; flex-direction: column; }
  .dashboard-v3 .period-form { display: grid; grid-template-columns: repeat(2, 1fr); width: 100%; }
  .dashboard-v3 .period-form select { width: 100%; }
  .dashboard-v3 .dashboard-refresh { grid-column: 1 / -1; width: 100%; }
  .dashboard-v3 .revenue-hero { grid-template-columns: 1fr; padding: 24px; }
  .dashboard-v3 .progress-ring { position: absolute; top: 24px; right: 22px; width: 95px; height: 95px; }
  .dashboard-v3 .progress-ring::before { width: 73px; height: 73px; }
  .dashboard-v3 .progress-ring strong { font-size: 18px; }
  .dashboard-v3 .hero-value { max-width: calc(100% - 94px); font-size: 39px; }
  .dashboard-v3 .hero-meta { grid-template-columns: 1fr; }
  .dashboard-v3 .hero-meta span { padding-top: 12px; }
  .dashboard-v3 .quick-kpis,
  .dashboard-v3 .breakdown-grid { grid-template-columns: 1fr; }
  .dashboard-v3 .breakdown-panel:last-child { grid-column: auto; }
  .dashboard-v3 .panel-heading { align-items: flex-start; flex-direction: column; }
  .dashboard-v3 .daily-summary { justify-items: start; }
  .dashboard-v3 .dashboard-panel { padding: 19px; }
  .dashboard-v3 .dashboard-chart { min-width: 660px; }
  .dashboard-v3 .chart-frame::after { display: block; margin-top: 5px; color: #a1aaa6; font-size: 9px; text-align: right; content: "Faites défiler le graphique horizontalement →"; }
}

.login-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.login-box {
  width: min(420px, 100%);
  background: var(--card);
  padding: 42px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  text-align: center;
}

.login-box .logo-mark {
  margin-bottom: 22px;
}

.login-box h1 {
  margin: 0 0 6px;
  font-size: 32px;
}

.login-subtitle {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 17px;
}

.login-box form {
  text-align: left;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.form-group input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #c8d5d8;
  border-radius: 10px;
  background: #f8fafb;
  color: var(--text);
  font-size: 16px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(44, 104, 115, .12);
}

.login-button {
  width: 100%;
  margin-top: 8px;
  padding: 14px 18px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.login-button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.login-button:disabled {
  opacity: .65;
  cursor: wait;
  transform: none;
}

.login-message {
  min-height: 20px;
  margin: 16px 0 0;
  text-align: center;
  font-size: 14px;
}

@media (max-width: 500px) {
  .login-box {
    padding: 30px 22px;
  }
}

/* =========================
   ADMINISTRATION
   ========================= */

.admin-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-header {
  text-align: center;
  padding: 50px 20px 30px;
}

.admin-header .logo-mark {
  margin: 0 auto 18px;
}

.admin-header h1 {
  margin-bottom: 8px;
}

.admin-box {
  background: var(--card);
  border-radius: 20px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.admin-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.admin-title h2 {
  margin: 0 0 6px;
}

.admin-title p {
  margin: 0;
  color: var(--muted);
}

.secondary-button {
  display: inline-block;
  padding: 11px 18px;
  border-radius: 10px;
  background: #edf2f3;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.user-form {
  padding: 24px;
  border-radius: 15px;
  background: #f8fafb;
  margin-bottom: 30px;
}

.user-form h3,
.users-list h3 {
  margin-top: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 180px;
  gap: 16px;
  margin-bottom: 20px;
}

.form-group input,
.form-group select,
.user-form select {
  width: 100%;
  padding: 13px;
  border: 1px solid #c8d5d8;
  border-radius: 10px;
  background: white;
  font-size: 15px;
  color: var(--text);
}

.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px;
  border-bottom: 1px solid #e1e8ea;
}

.user-row:last-child {
  border-bottom: none;
}

.user-role {
  display: inline-block;
  margin-left: 10px;
  padding: 4px 9px;
  border-radius: 20px;
  background: #edf2f3;
  color: var(--muted);
  font-size: 12px;
}

.delete-button {
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  background: #f1dddd;
  color: #8c3030;
  cursor: pointer;
  font-weight: 700;
}

.protected-user {
  color: var(--muted);
  font-size: 13px;
}

#formMessage {
  margin: 14px 0 0;
  color: var(--accent-dark);
  font-weight: 700;
}

.message-error {
  color: #8c3030 !important;
}

.message-success {
  color: #246b3f !important;
}

.page-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.field-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 760px) {

  .form-grid {
    grid-template-columns: 1fr;
  }

  .admin-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .user-row {
    align-items: flex-start;
    flex-direction: column;
  }

}

/* =========================
   ADMINISTRATION DES DONNÉES
   ========================= */

.db-admin-page {
  background:
    radial-gradient(circle at 85% 5%, rgba(44, 104, 115, .13), transparent 28%),
    linear-gradient(135deg, #eef5f5 0%, var(--bg) 100%);
}

.db-admin-header {
  padding-bottom: 24px;
}

.db-admin-header .logo-mark {
  background: #173f48;
  box-shadow: 0 14px 32px rgba(23, 63, 72, .22);
}

.db-admin-kicker,
.db-editor-kicker,
.critical-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.db-admin-container {
  width: min(1320px, 94%);
}

.db-admin-warning {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
  padding: 17px 20px;
  border: 1px solid #efd49d;
  border-radius: 15px;
  background: #fff8e8;
  color: #694c17;
  box-shadow: 0 8px 24px rgba(105, 76, 23, .07);
}

.db-admin-warning > span {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #d9a743;
  color: #fff;
  font-weight: 900;
}

.db-admin-warning p {
  margin: 4px 0 0;
  line-height: 1.5;
}

.database-admin-entry {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: -6px 0 28px;
  padding: 18px 20px;
  border: 1px solid #ccdcdf;
  border-radius: 15px;
  background: linear-gradient(135deg, #f2f8f8, #fff);
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.database-admin-entry:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(23, 50, 58, .09);
}

.database-admin-icon {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 13px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.database-admin-entry > span:nth-child(2) {
  display: grid;
  gap: 4px;
}

.database-admin-entry small {
  color: var(--muted);
  line-height: 1.4;
}

.database-admin-arrow {
  margin-left: auto;
  color: var(--accent);
  font-size: 25px;
}

.db-admin-box {
  overflow: hidden;
}

.db-admin-title {
  margin-bottom: 22px;
}

.db-admin-top-actions,
.db-toolbar-actions,
.db-editor-actions,
.db-editor-actions > div,
.critical-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.db-entity-tabs {
  display: flex;
  gap: 8px;
  margin: 0 -30px;
  padding: 0 30px 18px;
  overflow-x: auto;
  border-bottom: 1px solid #e2eaec;
}

.db-entity-tabs button {
  flex: 0 0 auto;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f0f4f5;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
}

.db-entity-tabs button:hover {
  border-color: #c8d7da;
}

.db-entity-tabs button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.db-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0 16px;
}

.db-search-field {
  display: grid;
  flex: 1;
  max-width: 520px;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.db-search-field input {
  padding: 11px 13px;
}

.db-button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.db-button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.db-create-button {
  width: auto;
  margin: 0;
  padding: 11px 16px;
  font-size: 14px;
}

.db-status {
  min-height: 20px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.db-status[data-tone="success"] { color: #246b3f; }
.db-status[data-tone="error"] { color: #9b3030; }

.db-table-wrap {
  overflow-x: auto;
  border: 1px solid #dfe8ea;
  border-radius: 13px;
}

.db-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  background: #fff;
}

.db-table th,
.db-table td {
  max-width: 260px;
  padding: 12px 13px;
  overflow: hidden;
  border-bottom: 1px solid #e7edef;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.db-table th {
  position: sticky;
  top: 0;
  background: #f5f8f9;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .45px;
  text-transform: uppercase;
}

.db-table tbody tr:hover { background: #f8fbfb; }
.db-table tbody tr:last-child td { border-bottom: 0; }
.db-table .db-cell-number { text-align: right; font-variant-numeric: tabular-nums; }
.db-table td[data-active="true"] { color: #246b3f; font-weight: 800; }
.db-table td[data-active="false"] { color: #9b3030; font-weight: 800; }

.db-edit-button {
  padding: 7px 11px;
  font-size: 12px;
}

.db-empty-cell {
  padding: 34px !important;
  color: var(--muted);
  text-align: center !important;
}

.db-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

.db-editor {
  margin-top: 22px;
  border: 2px solid rgba(44, 104, 115, .18);
}

.db-editor-kicker {
  margin-bottom: 5px;
}

.db-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}

.db-form-field {
  display: grid;
  align-content: start;
  gap: 7px;
}

.db-form-field > span {
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}

.db-form-field.is-wide { grid-column: 1 / -1; }
.db-form-field.is-checkbox {
  display: flex;
  align-items: center;
  align-self: end;
  min-height: 49px;
  padding: 0 14px;
  border: 1px solid #d5e0e2;
  border-radius: 10px;
  background: #f8fafb;
}

.db-form-field.is-checkbox input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.db-editor-actions {
  justify-content: space-between;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid #e0e8ea;
}

.db-delete-button {
  padding: 11px 15px;
}

.db-validate-button {
  padding: 12px 18px;
  box-shadow: none;
  font-size: 14px;
}

.critical-dialog {
  width: min(600px, calc(100% - 30px));
  max-height: calc(100vh - 30px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 20px;
  color: var(--text);
  box-shadow: 0 30px 90px rgba(17, 38, 44, .35);
}

.critical-dialog::backdrop {
  background: rgba(15, 31, 36, .72);
  backdrop-filter: blur(4px);
}

.critical-dialog-card {
  padding: 32px;
}

.critical-dialog-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 50%;
  background: #a33a3a;
  color: #fff;
  font-size: 25px;
  font-weight: 900;
}

.critical-kicker { color: #9b3030; }
.critical-dialog h2 { margin: 0 0 10px; }
.critical-summary {
  margin: 0 0 22px;
  padding: 13px 15px;
  border-left: 4px solid #a33a3a;
  background: #fbefef;
  color: #6d2929;
  line-height: 1.5;
}

.critical-field {
  display: grid;
  gap: 7px;
  margin-top: 17px;
}

.critical-field > span {
  font-size: 13px;
  font-weight: 800;
}

.critical-field small {
  color: var(--muted);
  line-height: 1.4;
}

.critical-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  color: #4c6065;
  font-size: 13px;
  line-height: 1.45;
}

.critical-consent input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
}

.critical-message {
  min-height: 20px;
  margin: 14px 0 0;
  color: #9b3030;
  font-size: 13px;
  font-weight: 750;
}

.critical-actions {
  justify-content: flex-end;
  margin-top: 22px;
}

.critical-confirm-button {
  padding: 11px 15px;
  background: #a33a3a;
  color: #fff;
}

.critical-confirm-button:disabled {
  opacity: .55;
  cursor: wait;
}

@media (max-width: 900px) {
  .db-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .db-toolbar { align-items: stretch; flex-direction: column; }
  .db-search-field { max-width: none; }
  .db-toolbar-actions { justify-content: flex-end; }
}

@media (max-width: 650px) {
  .db-admin-box,
  .db-editor { padding: 21px; }
  .db-entity-tabs { margin: 0 -21px; padding-inline: 21px; }
  .db-admin-top-actions,
  .db-toolbar-actions,
  .db-editor-actions,
  .db-editor-actions > div,
  .critical-actions { align-items: stretch; flex-direction: column; }
  .db-admin-top-actions a,
  .db-toolbar-actions button,
  .db-editor-actions button,
  .critical-actions button { width: 100%; text-align: center; }
  .db-form-grid { grid-template-columns: 1fr; }
  .db-editor-actions { flex-direction: column-reverse; }
  .critical-dialog-card { padding: 24px 20px; }
  .database-admin-entry { align-items: flex-start; }
}

/* =========================
   DASHBOARD EMMATHUNE
   ========================= */

.dashboard-page {
  min-height: 100vh;
  background: #f3f6f7;
}

.dashboard-header {
  padding: 24px 0;
  text-align: left;
  background: #153941;
  color: white;
}

.dashboard-nav,
.dashboard-brand,
.dashboard-actions,
.panel-heading,
.dashboard-toolbar,
.period-form {
  display: flex;
  align-items: center;
}

.dashboard-nav,
.dashboard-toolbar,
.panel-heading {
  justify-content: space-between;
}

.dashboard-brand {
  gap: 16px;
}

.dashboard-brand .logo-mark {
  width: 54px;
  height: 54px;
  margin: 0;
  border-radius: 14px;
  background: #e6b85c;
  color: #153941;
  font-size: 21px;
  box-shadow: none;
}

.dashboard-brand h1 {
  margin: 2px 0;
  font-size: 27px;
  letter-spacing: -.4px;
}

.dashboard-subtitle {
  margin: 0;
  color: #b9cacc;
  font-size: 14px;
}

.eyebrow {
  margin: 0;
  color: #4f7d86;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.4px;
}

.dashboard-header .eyebrow {
  color: #e6b85c;
}

.dashboard-actions {
  gap: 10px;
}

.dashboard-actions .secondary-button,
.dashboard-actions .logout-button {
  background: rgba(255, 255, 255, .1);
  color: white;
}

.user-chip {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(230, 184, 92, .14);
  color: #f3d59a;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-main {
  padding: 28px 0 70px;
}

.dashboard-toolbar {
  gap: 28px;
  margin-bottom: 22px;
}

.dashboard-toolbar h2 {
  margin: 5px 0 4px;
  font-size: 28px;
}

.toolbar-description {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.period-form {
  gap: 10px;
  padding: 12px;
  border: 1px solid #dde6e8;
  border-radius: 14px;
  background: white;
  box-shadow: 0 6px 18px rgba(23, 50, 58, .06);
}

.period-form label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.period-form select,
.refresh-button {
  width: auto;
  min-width: 112px;
  padding: 10px 12px;
}

.refresh-button {
  border: 0;
  border-radius: 9px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.dashboard-status {
  padding: 24px;
  border-radius: 14px;
  background: white;
  color: var(--muted);
  box-shadow: var(--shadow);
  text-align: center;
}

.dashboard-status-error {
  border: 1px solid #e5bdbd;
  color: #8c3030;
  background: #fff8f8;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.kpi-card,
.dashboard-panel,
.tax-strip {
  border: 1px solid #e0e8e9;
  background: white;
  box-shadow: 0 8px 24px rgba(23, 50, 58, .06);
}

.kpi-card {
  min-height: 150px;
  padding: 22px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
}

.kpi-card-primary {
  border-color: #285e68;
  background: linear-gradient(145deg, #285e68, #173f48);
  color: white;
}

.kpi-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.kpi-card-primary .kpi-label,
.kpi-card-primary .kpi-foot {
  color: #c4d7da;
}

.kpi-value {
  margin: 14px 0 8px;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1;
}

.kpi-trend,
.kpi-foot {
  margin-top: auto;
  color: var(--muted);
  font-size: 12px;
}

.kpi-trend[data-tone="positive"] { color: #bde8c9; }
.kpi-trend[data-tone="negative"] { color: #ffd0ca; }

.progress-track,
.breakdown-track,
.annual-gauge {
  overflow: hidden;
  border-radius: 999px;
  background: #e7edef;
}

.progress-track {
  height: 7px;
  margin: 4px 0 11px;
}

.progress-track span,
.breakdown-track span,
.annual-gauge span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #d3a748;
}

.tax-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
  border-radius: 14px;
}

.tax-strip div {
  padding: 17px 20px;
  border-right: 1px solid #e5ebec;
}

.tax-strip div:last-child {
  border-right: 0;
}

.tax-strip span,
.tax-strip strong {
  display: block;
}

.tax-strip span {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
}

.tax-strip strong {
  font-size: 18px;
}

.dashboard-grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-grid-wide {
  grid-template-columns: minmax(0, 2fr) minmax(250px, .8fr);
}

.dashboard-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-panel {
  min-width: 0;
  padding: 22px;
  border-radius: 16px;
}

.panel-heading {
  gap: 18px;
  margin-bottom: 18px;
}

.panel-heading h3 {
  margin: 4px 0 0;
  font-size: 18px;
}

.panel-note,
.data-badge {
  color: var(--muted);
  font-size: 12px;
}

.data-badge {
  padding: 6px 9px;
  border-radius: 999px;
  background: #edf4f5;
  color: var(--accent-dark);
  font-weight: 700;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chart-legend i {
  width: 17px;
  height: 4px;
  border-radius: 5px;
}

.legend-current { background: #2c6873; }
.legend-previous { background: #91a7ac; }
.legend-target { background: #d3a748; }

.chart-scroll,
.table-scroll {
  overflow-x: auto;
}

.dashboard-chart {
  display: block;
  min-width: 760px;
  width: 100%;
  height: auto;
}

.chart-grid {
  stroke: #e7edef;
  stroke-width: 1;
}

.chart-axis-label {
  fill: #71858a;
  font-size: 11px;
  font-family: Arial, Helvetica, sans-serif;
}

.chart-bar { fill: #2c6873; }
.chart-bar-history { fill: #6e949c; }
.chart-line {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart-line-previous { stroke: #91a7ac; }
.chart-line-target { stroke: #d3a748; stroke-dasharray: 7 6; }
.chart-dot-previous { fill: #91a7ac; }
.chart-dot-target { fill: #d3a748; }
.daily-bar { fill: #4e8791; }

.annual-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #173f48;
  color: white;
}

.annual-panel .eyebrow { color: #e6b85c; }
.annual-panel h3 { margin: 5px 0 26px; font-size: 19px; }
.annual-gauge { height: 14px; background: #2f5961; }
.annual-panel > strong { margin: 20px 0 5px; font-size: 38px; }
.annual-panel > p { margin: 0; color: #c4d7da; line-height: 1.5; }

.breakdown-list {
  display: grid;
  gap: 16px;
}

.breakdown-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  font-size: 12px;
}

.breakdown-heading span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breakdown-heading strong {
  flex: 0 0 auto;
}

.breakdown-track { height: 6px; }
.breakdown-track span { background: #4e8791; }
.empty-state { padding: 25px !important; text-align: center; color: var(--muted); }

.dashboard-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.dashboard-table th,
.dashboard-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e5ebec;
  text-align: left;
  font-size: 13px;
}

.dashboard-table th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.dashboard-table tbody tr:hover { background: #f7fafb; }
.dashboard-table .cell-number { text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 920px) {
  .kpi-grid,
  .dashboard-grid-three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid-wide {
    grid-template-columns: 1fr;
  }

  .tax-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tax-strip div:nth-child(2) { border-right: 0; }
  .tax-strip div:nth-child(-n + 2) { border-bottom: 1px solid #e5ebec; }
}

@media (max-width: 680px) {
  .dashboard-header { padding: 18px 0; }
  .dashboard-nav,
  .dashboard-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .dashboard-actions .user-chip { width: 100%; text-align: center; }
  .dashboard-actions a { flex: 1; text-align: center; }
  .period-form { width: 100%; flex-wrap: wrap; }
  .period-form select { flex: 1; }
  .refresh-button { width: 100%; }
  .kpi-grid,
  .dashboard-grid-three,
  .tax-strip {
    grid-template-columns: 1fr;
  }

  .tax-strip div,
  .tax-strip div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid #e5ebec;
  }

  .tax-strip div:last-child { border-bottom: 0; }
  .panel-heading { align-items: flex-start; flex-direction: column; }
  .dashboard-panel { padding: 18px; }
}
.home-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 20px auto 10px;
  padding: 0 20px;
}

.admin-button,
.logout-button {
  display: inline-block;
  padding: 11px 18px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  transition: transform .2s ease, background .2s ease;
}

.admin-button {
  background: var(--accent);
  color: white;
}

.admin-button:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.logout-button {
  background: #edf2f3;
  color: var(--text);
}

.logout-button:hover {
  background: #dfe8ea;
  transform: translateY(-2px);
}

@media (max-width: 600px) {
  .home-actions {
    flex-direction: column;
    align-items: center;
  }

  .admin-button,
  .logout-button {
    width: 100%;
    max-width: 300px;
    text-align: center;
  }
}

/* =========================
   SAISIE DES VENTES
   ========================= */

.form-card {
  background: var(--card);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.form-card h2 {
  margin: 0 0 22px;
  font-size: 21px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.product-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.product-row select {
  flex: 1;
  min-width: 0;
}

.products-loading {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 14px;
}

.add-product-button,
.remove-product-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

.add-product-button {
  margin-top: 14px;
  padding: 10px 16px;
  background: #edf2f3;
  color: var(--text);
}

.remove-product-button {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  background: #f1dddd;
  color: #8c3030;
  font-size: 22px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #d5e0e2;
  border-radius: 10px;
  padding: 13px 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(44, 104, 115, .12);
}

textarea {
  resize: vertical;
}

.submit-zone {
  text-align: center;
  padding: 15px 0 40px;
}

#message {
  margin-top: 15px;
  font-weight: 700;
  white-space: pre-wrap;
}

.submit-button:disabled {
  opacity: .65;
  cursor: wait;
}

.submit-button {
  border: 0;
  border-radius: 12px;
  padding: 16px 30px;
  background: var(--accent);
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background .2s ease, transform .2s ease;
}

.submit-button:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

#message {
  margin-top: 18px;
  font-weight: 700;
}

@media (max-width: 760px) {

  .products-grid {
    grid-template-columns: 1fr;
  }

  .form-grid,
  .products-grid {
    grid-template-columns: 1fr;
  }

  .form-card {
    padding: 22px;
  }

  .submit-button {
    width: 100%;
  }

}
