/* Die Verwaltung in den Farben der Marke: Kakao, Krabbe, Muschel. Hell und dunkel wie das Gerät. */
:root {
  --kakao: #3c1914;
  --krabbe: #ee5e29;
  --muschel: #fcf5ec;
  --bein: #b9361d;
  --bg: var(--muschel);
  --surface: #fffdf9;
  --text: var(--kakao);
  --muted: #7a5a52;
  --line: #ead9c8;
  --accent: var(--kakao);
  --on-accent: #fff;
  --danger: var(--bein);
  color-scheme: light dark;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d0f0c;
    --surface: #2a1712;
    --text: #fcf5ec;
    --muted: #c9ada3;
    --line: #4a2c24;
    --accent: var(--krabbe);
    --on-accent: #1d0f0c;
    --danger: #ff8a65;
  }
}

* {
  box-sizing: border-box;
}

/* Sonst schlüge „display: flex“ das Attribut hidden. */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
}

.bar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  flex-wrap: wrap;
}

.brand {
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
}

.brand span {
  color: var(--krabbe);
  font-weight: 700;
  margin-left: 4px;
}

nav {
  display: flex;
  gap: 4px;
}

nav a {
  padding: 6px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
}

nav a.active,
nav a:hover {
  background: var(--bg);
  color: var(--text);
}

.who {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

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

h1 {
  font-size: 28px;
  margin: 8px 0 16px;
}

h2 {
  font-size: 18px;
  margin: 32px 0 8px;
}

.muted {
  color: var(--muted);
}

.error {
  color: var(--danger);
  font-weight: 600;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
}

.narrow {
  max-width: 420px;
  margin: 48px auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
}

input {
  font: inherit;
  color: inherit;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}

input:focus-visible,
button:focus-visible,
a:focus-visible,
tr.link:focus-visible {
  outline: 3px solid var(--krabbe);
  outline-offset: 2px;
}

button {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
}

button.quiet {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

button.danger {
  background: var(--danger);
  color: #fff;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

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

.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px 20px;
}

.tile h3 {
  margin: 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.tile .big {
  font-size: 30px;
  font-weight: 800;
  margin: 6px 0;
}

.tile p {
  margin: 2px 0;
}

.toolbar {
  margin-bottom: 16px;
}

.toolbar input {
  width: min(420px, 100%);
}

.scroll {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}

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

th,
td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: 0;
}

th {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

tr.link {
  cursor: pointer;
}

tr.link:hover {
  background: var(--bg);
}

.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  margin-right: 4px;
}

.badge.danger {
  color: var(--danger);
  border-color: var(--danger);
}

.actions,
.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (prefers-reduced-motion: no-preference) {
  button,
  nav a {
    transition: background-color 120ms ease;
  }
}
