*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  min-height: 100vh;
}

header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 2rem;
  background: #1e293b;
  border-bottom: 1px solid #334155;
}

header h1 { font-size: 1.4rem; font-weight: 700; color: #f1f5f9; }

.badge {
  padding: .25rem .75rem;
  border-radius: 9999px;
  font-size: .75rem;
  font-weight: 600;
}
.badge--ok { background: #166534; color: #bbf7d0; }
.badge--err { background: #7f1d1d; color: #fecaca; }

main { padding: 2rem; max-width: 1200px; margin: 0 auto; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: .75rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.stat-label { font-size: .8rem; color: #94a3b8; text-transform: uppercase; letter-spacing: .05em; }
.stat-value { font-size: 2rem; font-weight: 700; color: #f1f5f9; }

.calls-table-section {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: .75rem;
  overflow: hidden;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #334155;
}

.table-header h2 { font-size: 1rem; font-weight: 600; }

#btn-refresh {
  background: #334155;
  color: #e2e8f0;
  border: none;
  padding: .4rem .9rem;
  border-radius: .4rem;
  cursor: pointer;
  font-size: .85rem;
}
#btn-refresh:hover { background: #475569; }

table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th { padding: .75rem 1rem; text-align: left; color: #94a3b8; font-weight: 500; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; background: #0f172a; }
td { padding: .75rem 1rem; border-top: 1px solid #1e293b; color: #cbd5e1; }
tr:hover td { background: #0f172a44; }

.loading { text-align: center; color: #64748b; padding: 2rem !important; }

.status { padding: .2rem .6rem; border-radius: 9999px; font-size: .75rem; font-weight: 600; }
.status-active   { background: #14532d; color: #86efac; }
.status-completed{ background: #1e3a5f; color: #93c5fd; }
.status-pending  { background: #451a03; color: #fdba74; }
.status-failed   { background: #7f1d1d; color: #fca5a5; }
