.services-page,
.services-page * {
  box-sizing: border-box;
}

.services-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: rgba(255,255,255,.94);
  min-height: 100%;
  padding: 4px;
}

.services-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.services-header h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
}

.services-header p {
  margin: 6px 0 0;
  opacity: .72;
}

.services-header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.services-header-actions .input,
.services-header-actions input,
.services-header-actions select {
  min-width: 170px;
}

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

.services-stats .stat-card {
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.025));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,.20);
}

.services-stats .stat-card.danger {
  border-color: rgba(239,68,68,.24);
}

.services-stats .stat-label {
  font-size: 13px;
  opacity: .70;
  margin-bottom: 8px;
}

.services-stats .stat-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.services-stats .stat-sub {
  margin-top: 8px;
  font-size: 12px;
  opacity: .65;
}

.services-table-wrap {
  width: 100%;
  overflow: auto;
  border-radius: 16px;
}

.services-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1100px;
}

.services-table thead th {
  text-align: left;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  white-space: nowrap;
}

.services-table tbody td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  vertical-align: middle;
}

.services-table tbody tr:hover {
  background: rgba(255,255,255,.03);
}

.service-agent {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.service-agent strong {
  font-size: 14px;
}

.service-sub {
  font-size: 12px;
  opacity: .65;
}

.service-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
}

.service-badge.active {
  background: rgba(34,197,94,.14);
  color: #86efac;
  border-color: rgba(34,197,94,.22);
}

.service-badge.closed {
  background: rgba(148,163,184,.12);
  color: #cbd5e1;
  border-color: rgba(148,163,184,.18);
}

.service-duration-live {
  color: #86efac;
  font-weight: 700;
}

.service-actions-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.service-session-body {
  padding-top: 6px;
}

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

.service-detail-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.service-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.03);
}

.service-detail-row .k {
  opacity: .62;
  font-size: 13px;
}

.service-detail-row .v {
  text-align: right;
  font-weight: 600;
  word-break: break-word;
}

@media (max-width: 1100px) {
  .services-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-session-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .services-stats {
    grid-template-columns: 1fr;
  }

  .services-header-actions {
    width: 100%;
  }

  .services-header-actions .input,
  .services-header-actions button,
  .services-header-actions select {
    width: 100%;
  }
}

/* ===== Filtres / recherche ===== */
.services-header-actions .input,
.services-header-actions input,
.services-header-actions select {
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(10, 18, 40, .78);
  color: rgba(255,255,255,.92);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.services-header-actions .input::placeholder,
.services-header-actions input::placeholder {
  color: rgba(255,255,255,.42);
}

.services-header-actions .input:focus,
.services-header-actions input:focus,
.services-header-actions select:focus {
  border-color: rgba(59,130,246,.55);
  box-shadow: 0 0 0 3px rgba(59,130,246,.14);
  background: rgba(12, 22, 48, .92);
}

.services-header-actions select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 40px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,.65) 50%),
    linear-gradient(135deg, rgba(255,255,255,.65) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.services-header-actions input[type="date"] {
  color-scheme: dark;
}

.services-header-actions input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: .85;
  cursor: pointer;
}

.services-header-actions input[type="date"]::-webkit-datetime-edit,
.services-header-actions input[type="date"]::-webkit-datetime-edit-text,
.services-header-actions input[type="date"]::-webkit-datetime-edit-month-field,
.services-header-actions input[type="date"]::-webkit-datetime-edit-day-field,
.services-header-actions input[type="date"]::-webkit-datetime-edit-year-field {
  color: rgba(255,255,255,.92);
}

/* ===== Badge statut ===== */
.service-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.service-badge.active {
  background: linear-gradient(180deg, rgba(34,197,94,.18), rgba(34,197,94,.10));
  color: #86efac;
  border-color: rgba(34,197,94,.28);
}

.service-badge.closed {
  background: linear-gradient(180deg, rgba(148,163,184,.18), rgba(148,163,184,.10));
  color: #dbe7f4;
  border-color: rgba(148,163,184,.22);
}