html, body {
  font-family: "Segoe UI", system-ui, sans-serif;
  margin: 0;
  background: #0f172a;
  color: #e2e8f0;
}

h1, h2 {
  margin-top: 0;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: end;
  margin: 1.25rem 0 1.75rem;
}

.filters label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: #94a3b8;
}

.filters select,
.filters input,
.panel input {
  background: #111827;
  border: 1px solid #334155;
  border-radius: 0.5rem;
  color: #f8fafc;
  padding: 0.55rem 0.7rem;
  min-width: 12rem;
}

.filters button,
.panel button {
  background: #2563eb;
  border: none;
  color: white;
  border-radius: 0.5rem;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
}

.panel .account-actions button {
  appearance: none;
  -webkit-appearance: none;
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
}

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

.stat-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 0.85rem;
  padding: 1rem 1.1rem;
}

.stat-card h2 {
  font-size: 0.85rem;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.stat-card p {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
}

.panel {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 0.85rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.panel form {
  display: flex;
  gap: 0.75rem;
  align-items: end;
  flex-wrap: wrap;
}

.panel label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: #94a3b8;
  font-size: 0.9rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #111827;
  border-radius: 0.85rem;
  overflow: hidden;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid #1f2937;
  vertical-align: top;
}

.data-table th {
  color: #94a3b8;
  font-size: 0.85rem;
}

.data-table th button.sort {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.data-table th button.sort:hover {
  color: #f8fafc;
}

.data-table th button.sort:disabled {
  cursor: not-allowed;
}

.error {
  background: #7f1d1d;
  color: #fecaca;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
}

.success {
  background: #14532d;
  color: #bbf7d0;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
}

.key-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.account-actions button {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  border-radius: 0.5rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.account-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  color: #94a3b8;
}

.pager-actions {
  display: flex;
  gap: 0.75rem;
}

.account-actions button.secondary,
.modal-actions button.secondary,
.pager-actions button.secondary {
  background: transparent;
  border: 1px solid #334155;
  color: #cbd5e1;
}

.pager-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 50;
}

.modal {
  width: min(28rem, 100%);
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 0.85rem;
  padding: 1.25rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.modal h2 {
  margin-bottom: 0.75rem;
}

.modal p {
  color: #cbd5e1;
  margin-top: 0;
}

.modal label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: #94a3b8;
  font-size: 0.9rem;
  margin: 1rem 0;
}

.modal input,
.modal textarea {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.5rem;
  color: #f8fafc;
  padding: 0.55rem 0.7rem;
  font: inherit;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

.modal-actions button {
  appearance: none;
  -webkit-appearance: none;
  background: #2563eb;
  border: none;
  color: white;
  border-radius: 0.5rem;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
}

.modal-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.account-actions button.btn-danger,
.modal-actions button.btn-danger {
  background-color: #dc2626;
  color: #fff;
}

.account-actions button.btn-deactivate,
.modal-actions button.btn-deactivate {
  background-color: #ea580c;
  color: #000;
}

.account-actions button.btn-activate,
.modal-actions button.btn-activate {
  background-color: #16a34a;
  color: #fff;
}

code {
  font-family: Consolas, monospace;
  word-break: break-all;
}

#blazor-error-ui {
  background: lightyellow;
  bottom: 0;
  box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
  display: none;
  left: 0;
  padding: 0.6rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
  color: #111;
}

#blazor-error-ui .dismiss {
  cursor: pointer;
  position: absolute;
  right: 0.75rem;
  top: 0.5rem;
}
