/* ==============================================================
   MUSIKDATENBANK – DESIGN
   Hell, schlicht, gut lesbar; Farben wie die Verwaltung der Website.
   ============================================================== */

:root {
  --red: #d40000;
  --red-dark: #a80000;
  --ink: #24292c;
  --muted: #6d7b80;
  --line: #e1e6e8;
  --bg: #f2f3f4;
  --card: #fff;
  --green: #198754;
  --amber: #b26a00;
  --radius: 6px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

a { color: var(--red-dark); }
a:hover { color: var(--red); }
code { padding: 1px 5px; background: #eceff0; border-radius: 3px; font-size: .92em; }
h1 { margin: 0 0 14px; font-size: 26px; font-weight: 600; }
h2 { margin: 0 0 12px; font-size: 18px; font-weight: 600; }

/* ---- Kopf ---- */
.top { background: #fff; border-bottom: 1px solid var(--line); }
.top-in {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px;
  max-width: 1180px; margin: 0 auto; padding: 10px 18px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; text-decoration: none; }
.brand img { height: 34px; width: auto; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-right: auto; }
.top nav a { padding: 6px 12px; color: var(--ink); text-decoration: none; border-radius: var(--radius); }
.top nav a:hover { background: var(--bg); }
.top nav a.is-on { color: #fff; background: var(--red); }
.user { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--muted); }

.page { max-width: 1180px; margin: 0 auto; padding: 24px 18px 60px; }

/* ---- Karten, Meldungen ---- */
.card { margin-bottom: 18px; padding: 20px 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.flash { margin: 0 0 16px; padding: 11px 14px; border: 1px solid; border-radius: var(--radius); }
.flash.is-ok { color: #0f5132; background: #e6f4ec; border-color: #b7dfc8; }
.flash.is-error { color: #842029; background: #fbe9eb; border-color: #f0c2c7; }
.hint { color: var(--muted); font-size: 14px; }
.error { margin-top: 4px; color: #b02a37; font-size: 14px; }
.muted { color: var(--muted); }

/* ---- Schalter ---- */
.btn {
  display: inline-block; padding: 8px 15px; color: var(--ink); background: #fff;
  border: 1px solid #c9d1d3; border-radius: var(--radius); font: inherit; line-height: 1.3;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--bg); color: var(--ink); }
.btn-primary { color: #fff; background: var(--red); border-color: var(--red); }
.btn-primary:hover { color: #fff; background: var(--red-dark); }
.btn-light { padding: 5px 11px; font-size: 14px; }
.btn-danger { color: #b02a37; border-color: #e3a5ac; }
.btn-danger:hover { color: #fff; background: #b02a37; }

.title-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.title-row h1 { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions form { margin: 0; }

/* ---- Formulare ---- */
.field { display: block; margin: 0 0 14px; }
.field > span { display: block; margin-bottom: 4px; font-weight: 600; font-size: 14px; }
.field small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=search], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: 8px 10px; color: var(--ink); background: #fff;
  border: 1px solid #c9d1d3; border-radius: var(--radius); font: inherit;
}
textarea { min-height: 120px; line-height: 1.5; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #f3b3b3; border-color: var(--red); }
.check { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 12px; }
.check input { margin-top: 4px; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.grid .wide { grid-column: 1 / -1; }
@media (max-width: 700px) { .grid { grid-template-columns: 1fr; } }

.login { max-width: 430px; margin: 40px auto; }

/* ---- Suche und Filter ---- */
.search { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.search input[type=search] { flex: 1 1 260px; width: auto; }
.search select { flex: 0 1 190px; width: auto; }

/* ---- Tabellen ---- */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td a.name { color: var(--ink); font-weight: 600; text-decoration: none; }
td a.name:hover { color: var(--red); }
td small { display: block; color: var(--muted); }
.nowrap { white-space: nowrap; }
.old, .new { word-break: break-word; }
.old { color: #842029; }
.new { color: #0f5132; }

.badge { display: inline-block; padding: 1px 9px; font-size: 12px; font-weight: 600; border-radius: 99px; background: #e9ecef; color: #495057; white-space: nowrap; }
.badge.s-neu { background: #fde8c8; color: #8a4b00; }
.badge.s-in_arbeit { background: #dbeafe; color: #1e40af; }
.badge.s-geprueft { background: #d6efe0; color: #14633f; }
.badge.warn { background: #fbe9eb; color: #842029; }

.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0; color: var(--muted); }

.cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }
.facts { margin: 0; }
.facts dt { margin-top: 10px; color: var(--muted); font-size: 13px; }
.facts dd { margin: 0; word-break: break-word; }

.stats { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.stat { flex: 1 1 150px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.stat b { display: block; font-size: 26px; font-weight: 600; }
.stat span { color: var(--muted); font-size: 13px; }

pre.sample { overflow-x: auto; padding: 12px; background: #f6f7f8; border: 1px solid var(--line); border-radius: var(--radius); font-size: 12.5px; }

@media (max-width: 600px) {
  th, td { padding: 8px 10px; }
  .hide-s { display: none; }
}
