/* Storico - Tabelle mobile-first, dark-tech */
.stable-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text);
}

.stable-table thead {
  display: none; /* mobile-first: header nascosto */
}

.stable-table tbody tr {
  display: block;
  background: var(--surface);
  margin-bottom: 1rem;
  border-radius: var(--radius);
  padding: 0.75rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.stable-table td {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #222;
  position: relative;
}

.stable-table td:last-child {
  border-bottom: 0;
}

/* Etichette "data-label" su mobile */
.stable-table td::before {
  content: attr(data-label);
  font-weight: 600;
  color: var(--muted);
  flex: 1;
  text-align: left;
}

/* Status badges */
.stable-table .status {
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.8rem;
  text-align: center;
}

.stable-table .status.success {
  background-color: rgba(32, 201, 151, 0.2);
  color: var(--accent);
}

.stable-table .status.failed {
  background-color: rgba(250, 82, 82, 0.2);
  color: var(--danger);
}

.stable-table .status.pending {
  background-color: rgba(151, 117, 250, 0.2);
  color: var(--secondary);
}

.stable-table .status.started {
  background-color: rgba(255, 193, 7, 0.2); /* giallo caldo semitrasparente */
  color: #ffc107; /* stesso giallo pieno */
}

/* Azioni */
.stable-table a.btn {
  width: auto;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  text-align: center;
  margin-left: 0.5rem;
}

/* Desktop: tabella classica */
@media (min-width: 600px) {
  .stable-table thead {
    display: table-header-group;
    background: var(--surface);
    color: var(--text);
  }
  .stable-table tbody tr {
    display: table-row;
    box-shadow: none;
    margin-bottom: 0;
    border-radius: 0;
  }
  .stable-table td {
    display: table-cell;
    border-bottom: 1px solid #222;
    padding: 0.75rem;
  }
  .stable-table td::before {
    content: none;
  }
  .stable-table a.btn {
    margin-left: 0;
  }
}
