:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: #f6f7f9;
  color: #1f2937;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

a {
  color: #2563eb;
  text-decoration: none;
}

.topbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  height: 60px;
  justify-content: space-between;
  padding: 0 28px;
}

.brand {
  color: #111827;
  font-weight: 700;
}

nav,
.actions,
.inline-form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

nav form,
.actions form {
  margin: 0;
}

.page {
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px;
}

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

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: 28px;
  margin-bottom: 6px;
}

h2 {
  font-size: 18px;
}

.panel,
.login-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 20px;
}

.login-page {
  background: #eef2f7;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-panel {
  max-width: 400px;
  width: 100%;
}

.stack {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  font-size: 14px;
  gap: 6px;
}

input {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font: inherit;
  min-height: 36px;
  padding: 7px 10px;
}

button,
.button {
  align-items: center;
  background: #2563eb;
  border: 1px solid #2563eb;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  min-height: 36px;
  padding: 7px 12px;
}

.secondary {
  background: #ffffff;
  border-color: #d1d5db;
  color: #374151;
}

.danger {
  background: #dc2626;
  border-color: #dc2626;
}

.link-button {
  background: transparent;
  border: 0;
  color: #2563eb;
  min-height: 0;
  padding: 0;
}

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

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

th {
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
}

.badge {
  background: #e0f2fe;
  border-radius: 999px;
  color: #0369a1;
  display: inline-block;
  font-size: 12px;
  padding: 3px 8px;
}

.badge.disabled,
.muted {
  color: #6b7280;
}

.alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
  margin-bottom: 16px;
  padding: 12px;
}

.notice {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  color: #047857;
  margin-bottom: 16px;
  padding: 12px;
}

.empty {
  color: #6b7280;
  text-align: center;
}

.module-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.check-row {
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  display: flex;
  gap: 10px;
  padding: 12px;
}

.check-row input {
  min-height: auto;
}

@media (max-width: 760px) {
  .topbar,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
    height: auto;
    gap: 12px;
  }

  .page {
    padding: 18px;
  }

  table {
    display: block;
    overflow-x: auto;
  }
}
