* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f5f7fb;
  color: #111827;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}

.hidden {
  display: none;
}

.login {
  width: min(420px, 100%);
  margin: 12vh auto;
  padding: 28px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

h1, h2 {
  margin: 0 0 12px;
}

p {
  margin: 0;
  color: #64748b;
}

input, select, textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
}

textarea {
  min-height: 84px;
}

button {
  min-height: 40px;
  padding: 8px 14px;
  border: 0;
  border-radius: 6px;
  background: #0f766e;
  color: #fff;
  cursor: pointer;
}

button.secondary {
  background: #334155;
}

button.danger {
  background: #b91c1c;
}

.error {
  margin-top: 10px;
  color: #b91c1c;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tabs button {
  background: #e2e8f0;
  color: #0f172a;
}

.tabs button.active {
  background: #0f766e;
  color: #fff;
}

.panel {
  margin-bottom: 16px;
  padding: 18px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  align-items: end;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.stat {
  padding: 18px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th, .table td {
  padding: 10px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
}

.actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.check input {
  width: auto;
}

.codebox {
  white-space: pre-wrap;
  word-break: break-word;
  padding: 12px;
  background: #0f172a;
  color: #e5e7eb;
  border-radius: 6px;
  overflow: auto;
}
