.dashboard,
.dashboard * {
  box-sizing: border-box;
}

.dashboard {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100%;
  color: rgba(255,255,255,.94);
  padding: 4px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}

.dashboard-header-copy {
  min-width: 280px;
  flex: 1 1 420px;
}

.dashboard-header h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.dashboard-header p {
  margin: 6px 0 0;
  opacity: .72;
}

.service-box {
  min-width: 320px;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background:
    radial-gradient(circle at top left, rgba(59,130,246,.22), transparent 35%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,.28);
}

.service-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.service-badge {
    width: 64px;
    height: 64px;
    min-width: 64px;
    border-radius: 16px;
    background-color: rgba(255,255,255,0.06);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain; /* au lieu de cover pour éviter de couper l'image */
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
    overflow: hidden;
}

.service-meta {
  min-width: 0;
}

.service-title {
  font-weight: 800;
  font-size: 16px;
  line-height: 1.2;
  word-break: break-word;
}

.service-sub {
  margin-top: 4px;
  font-size: 13px;
  color: #a7f3d0;
  opacity: .95;
}

.service-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.service-btn {
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(59,130,246,.32);
  background: linear-gradient(180deg, rgba(37,99,235,.95), rgba(29,78,216,.82));
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: .18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.service-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(37,99,235,.24);
}

.service-btn-secondary {
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border-color: rgba(255,255,255,.1);
  color: rgba(255,255,255,.92);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
}

.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .85fr);
  gap: 18px;
}

.dashboard-panel {
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(0,0,0,.22);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.dashboard-main-panel,
.dashboard-side-panel,
.dashboard-activity,
.dashboard-shortcuts {
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.panel-head p {
  margin: 4px 0 0;
  font-size: 13px;
  opacity: .7;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  position: relative;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(15,23,42,.76), rgba(10,15,30,.72));
  border: 1px solid rgba(255,255,255,.06);
  min-height: 120px;
}

.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .58;
}

.stat-number {
  margin-top: 14px;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

.stat-text {
  margin-top: 10px;
  font-size: 13px;
  color: #94a3b8;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mini-stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 90px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(15,23,42,.74), rgba(10,15,30,.68));
  border: 1px solid rgba(255,255,255,.06);
}

.mini-stat-label {
  font-size: 12px;
  opacity: .64;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.mini-stat strong {
  font-size: 24px;
  font-weight: 800;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.timeline::-webkit-scrollbar {
  width: 8px;
}

.timeline::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.14);
  border-radius: 999px;
}

.timeline-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, rgba(15,23,42,.6), rgba(10,15,30,.58));
}

.timeline-dot {
  width: 10px;
  height: 10px;
  min-width: 10px;
  border-radius: 50%;
  margin-top: 6px;
  background: #60a5fa;
  box-shadow: 0 0 0 5px rgba(96,165,250,.12);
}

.timeline-dot.warning {
  background: #f59e0b;
  box-shadow: 0 0 0 5px rgba(245,158,11,.12);
}

.timeline-dot.success {
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34,197,94,.12);
}

.timeline-dot.danger {
  background: #ef4444;
  box-shadow: 0 0 0 5px rgba(239,68,68,.12);
}

.timeline-content {
  min-width: 0;
  flex: 1;
  line-height: 1.45;
}

.timeline-content strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 4px;
}

.timeline-content p {
  margin: 0;
  font-size: 13px;
  color: rgba(255,255,255,.8);
  word-break: break-word;
}

.timeline-content span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #94a3b8;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.shortcut-card {
  text-align: left;
  min-height: 110px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.06);
  background:
    radial-gradient(circle at top right, rgba(59,130,246,.18), transparent 35%),
    linear-gradient(180deg, rgba(15,23,42,.72), rgba(10,15,30,.64));
  color: rgba(255,255,255,.96);
  cursor: pointer;
  transition: .18s ease;
}

.shortcut-card:hover {
  transform: translateY(-1px);
  border-color: rgba(59,130,246,.28);
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
}

.shortcut-card strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
}

.shortcut-card span {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.4;
}

.empty-state {
  padding: 16px;
  border-radius: 16px;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
  border: 1px dashed rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
}

@media (max-width: 1180px) {
  .dashboard-grid,
  .dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shortcut-grid,
  .mini-stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .dashboard-stats,
  .shortcut-grid,
  .mini-stats {
    grid-template-columns: 1fr;
  }

  .service-box {
    width: 100%;
  }
}

.service-title {
    font-weight: 700;
    font-size: 18px;
    line-height: 1.2;
}

.service-sub {
    font-size: 13px;
    color: #22c55e;
    margin-top: 4px;
}