:root {
  --bg-light: #f3f9fc;
  --bg-dark: #071118;
  --primary-dark: #071118;
  --primary-light: #b1c8e6;
  --text-light: #282828;
  --text-dark: #fef6f6;
  --card: #ffffff;
  --border: #dbe7f3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Roboto, sans-serif;
  background: var(--bg-light);
  color: var(--text-light);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--primary-dark);
  color: var(--text-dark);
}

.topbar a {
  color: var(--text-dark);
  text-decoration: none;
  margin-left: 16px;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.5px;
}

.container {
  padding: 24px;
}

.card,
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

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

.tile {
  display: block;
  padding: 18px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary-dark);
  text-decoration: none;
}

.tile h3 {
  margin-top: 0;
}

.inline-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

input,
select,
button {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

button.btn,
a.btn {
  background: var(--primary-dark);
  color: var(--text-dark);
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
}

button.link {
  background: none;
  border: none;
  color: var(--primary-dark);
  cursor: pointer;
  text-decoration: underline;
}

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

th,
td {
  text-align: left;
  padding: 8px;
  border-bottom: 1px solid var(--border);
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 50%;
  margin-left: 12px;
}

.warning {
  color: #b24b00;
}

.error {
  color: #b20000;
}

.empty {
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 8px;
}

@media (prefers-color-scheme: dark) {
  body {
    background: var(--bg-dark);
    color: var(--text-dark);
  }
  .card,
  .panel {
    background: #0c1a24;
    border-color: #1f2e3a;
  }
}
