* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #eef2f7;
  color: #172033;
}

.dashboard-page {
  padding: 20px;
  min-height: 100vh;
}

.dashboard-hero {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 22px;
  background: linear-gradient(135deg, #0f2f4f, #14607a);
  color: white;
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 14px 34px rgba(15, 47, 79, 0.24);
}

.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dashboard-kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 2px;
  opacity: 0.8;
}

.dashboard-hero h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.1;
}

.dashboard-subtitle {
  margin: 8px 0 0;
  font-size: 15px;
  opacity: 0.9;
}

.hero-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-summary span {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.hero-right {
  min-width: 290px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-right p {
  margin: 0 0 10px;
  font-size: 13px;
  opacity: 0.85;
  text-transform: capitalize;
}

.hero-right strong {
  font-size: 20px;
  margin-bottom: 8px;
}

.hero-right span {
  font-size: 13px;
  line-height: 1.4;
  opacity: 0.85;
}

.hero-right a {
  margin-top: 16px;
  color: white;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.18);
  padding: 9px 13px;
  border-radius: 999px;
  width: fit-content;
  font-size: 13px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(135px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.dashboard-card,
.dashboard-panel {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #dfe7f1;
  box-shadow: 0 8px 20px rgba(18, 32, 51, 0.07);
}

.dashboard-card {
  padding: 18px;
  min-height: 116px;
  position: relative;
  overflow: hidden;
}

.dashboard-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: #2563eb;
}

.dashboard-card.alert-card::before {
  background: #f97316;
}

.dashboard-card.good-card::before {
  background: #16a34a;
}

.dashboard-card p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-card strong {
  display: block;
  margin-top: 14px;
  font-size: 34px;
  color: #0f172a;
  line-height: 1;
}

.dashboard-card span {
  display: block;
  margin-top: 10px;
  color: #7c8da5;
  font-size: 12px;
}

.dashboard-content {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}

.dashboard-panel {
  padding: 18px;
  min-height: 170px;
}

.dashboard-panel.large {
  grid-column: span 2;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  align-items: flex-start;
}

.panel-header h2 {
  margin: 0;
  font-size: 17px;
  color: #0f172a;
}

.panel-header span {
  display: block;
  margin-top: 4px;
  color: #7c8da5;
  font-size: 12px;
}

.panel-action {
  border: 0;
  background: #123c69;
  color: white;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

.empty-chart {
  height: 240px;
  border: 1px dashed #b8c5d6;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #7c8da5;
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  font-size: 13px;
}

.empty-block {
  min-height: 110px;
  border: 1px dashed #b8c5d6;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #7c8da5;
  background: #f8fafc;
  font-size: 13px;
}

.alert-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.alert-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 11px 0;
  border-bottom: 1px solid #edf2f7;
}

.alert-list li:last-child {
  border-bottom: 0;
}

.alert-list strong {
  color: #0f172a;
  font-size: 14px;
}

.alert-list span {
  color: #64748b;
  font-size: 13px;
}

.health-box {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.health-box div {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px;
}

.health-box strong {
  display: block;
  font-size: 30px;
  color: #0f172a;
}

.health-box span {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-size: 13px;
}

@media (max-width: 1200px) {
  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }

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

  .dashboard-panel.large {
    grid-column: span 1;
  }
}

@media (max-width: 800px) {
  .dashboard-page {
    padding: 14px;
  }

  .dashboard-hero {
    flex-direction: column;
  }

  .hero-right {
    min-width: 0;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .panel-header {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .health-box {
    grid-template-columns: 1fr;
  }

  .dashboard-hero h1 {
    font-size: 28px;
  }
}
/* ==========================
   Graphique mensuel
========================== */

.fake-chart{
    height:260px;
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:12px;
    padding:20px;
    background:#f8fafc;
    border:1px solid #dbe5ef;
    border-radius:16px;
}

.fake-chart div{
    flex:1;
    background:linear-gradient(to top,#2563eb,#60a5fa);
    border-radius:8px 8px 0 0;
    position:relative;
    transition:.25s;
    min-height:10px;
}

.fake-chart div:hover{
    transform:translateY(-6px);
    filter:brightness(1.08);
}

.fake-chart span{
    position:absolute;
    bottom:-28px;
    width:100%;
    text-align:center;
    font-size:12px;
    color:#64748b;
    font-weight:600;
}
/* ==========================
   Listes Dashboard
==========================*/

.ranking-list,
.alert-list,
.intervention-list{
    list-style:none;
    margin:0;
    padding:0;
}

.ranking-list li,
.alert-list li,
.intervention-list li{

    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:12px 14px;
    margin-bottom:10px;

    background:white;

    border-left:5px solid #2563eb;

    border-radius:10px;

    box-shadow:0 2px 8px rgba(0,0,0,.08);

    transition:.2s;
}

.ranking-list li:hover,
.alert-list li:hover,
.intervention-list li:hover{

    transform:translateX(6px);

    box-shadow:0 8px 18px rgba(0,0,0,.15);
}

.ranking-list strong,
.intervention-list strong{

    color:#16344a;

    font-size:15px;
}

.ranking-list span,
.intervention-list span{

    color:#6c7b8a;

    font-size:13px;
}

.alert-list strong{

    color:#d35400;
}
