* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f6f8;
  color: #18212f;
}

header {
  padding: 22px 28px;
  background: #101828;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header h1 { margin: 0; font-size: 24px; }
header p { margin: 4px 0 0; color: #cbd5e1; }

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

main {
  padding: 24px;
  max-width: 1700px;
  margin: 0 auto;
}

.card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

.hidden { display: none; }

.card h2 { margin: 0 0 14px; font-size: 18px; }

.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.five { grid-template-columns: 1.1fr 1fr 1fr 1fr .8fr; }

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #344054;
  font-weight: 600;
}

input, select {
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: white;
}

button {
  border: 0;
  background: #2563eb;
  color: white;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

button.secondary { background: #64748b; }
button.danger { background: #dc2626; }
button.small { padding: 6px 9px; font-size: 12px; }
button:hover { opacity: .92; }

.actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.muted { color: #667085; font-size: 14px; }

pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px;
  border-radius: 12px;
  white-space: pre-wrap;
  overflow: auto;
  max-height: 260px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  padding: 9px 8px;
  vertical-align: middle;
}

th {
  color: #475467;
  font-size: 12px;
  background: #f8fafc;
}

td { color: #18212f; }
td input, td select { width: 100%; min-width: 110px; padding: 7px 8px; }

.setting-description {
  color: #667085;
  font-size: 12px;
  margin-top: 3px;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  background: #e0f2fe;
  color: #075985;
  white-space: nowrap;
}

.badge.revoked { background: #fee2e2; color: #991b1b; }
.badge.enrolled { background: #dcfce7; color: #166534; }
.badge.pending { background: #fef3c7; color: #92400e; }
.badge.preapproved { background: #ede9fe; color: #5b21b6; }
.badge.online { background: #dcfce7; color: #166534; }
.badge.stale { background: #fef3c7; color: #92400e; }
.badge.never { background: #e5e7eb; color: #374151; }
.badge.offline { background: #fee2e2; color: #991b1b; }

.error { color: #b42318; }
.success { color: #027a48; }

@media (max-width: 900px) {
  .grid.two, .grid.three, .grid.five { grid-template-columns: 1fr; }
  header { align-items: flex-start; gap: 12px; flex-direction: column; }
  .header-actions { width: 100%; }
}
