/* Oberfläche für Verwaltung und Fernbedienung. */
:root {
  --bg: #f4f5f3;
  --surface: #ffffff;
  --text: #111111;
  --muted: #5f6661;
  --line: #dfe3e0;
  --accent: var(--gp-green);
  --danger: #b3261e;
  --ok: #2e8b57;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-copy);
  font-size: 16px;
  line-height: 1.45;
}

h1, h2, h3 { margin: 0 0 12px; font-weight: 500; line-height: 1.05; }
h2.head { font-size: 30px; }
h3.head { font-size: 22px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  height: 64px;
  background: var(--gp-black);
  color: var(--gp-white);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 40px; height: 40px; }
.brand .head { font-size: 26px; }

nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
nav button {
  background: none;
  border: 0;
  color: #c9cfcb;
  padding: 8px 14px;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}
nav button:hover { color: var(--gp-white); }
nav button.active { background: var(--gp-green); color: var(--gp-white); }

main { max-width: 1180px; margin: 0 auto; padding: 28px 24px 80px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
}
.narrow { max-width: 420px; margin: 60px auto; }

.row { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.row > label { flex: 1 1 160px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.split { display: grid; gap: 20px; grid-template-columns: 300px 1fr; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

label { display: block; font-size: 14px; color: var(--muted); }
label > input, label > select, label > textarea { margin-top: 4px; }
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
input[type='checkbox'] { width: auto; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

button {
  font: inherit;
  cursor: pointer;
  border-radius: 8px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}
button:hover { border-color: #b8c0bb; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--gp-white); }
button.primary:hover { filter: brightness(1.08); }
button.danger { color: var(--danger); }
button.ghost { background: none; border-color: #444; color: #ddd; }
button.small { padding: 6px 10px; font-size: 14px; }
button:disabled { opacity: 0.5; cursor: default; }

.muted { color: var(--muted); }
.small { font-size: 14px; }
.error { color: var(--danger); min-height: 1.4em; margin: 8px 0 0; }
.empty { color: var(--muted); padding: 24px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #b5b5b5; margin-right: 6px; }
.dot.on { background: var(--ok); }

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  background: #eef1ef;
  color: var(--muted);
  font-size: 13px;
  margin-right: 4px;
}
.pill.live { background: var(--gp-fresh); color: var(--gp-black); }

.list { list-style: none; margin: 0; padding: 0; }
.list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list button { flex: none; }

.thumb {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  background: #222;
  flex: none;
}

.media-card { padding: 0; overflow: hidden; margin: 0; }
.media-card .preview { aspect-ratio: 16 / 10; background: #111; display: flex; }
.media-card .preview img, .media-card .preview video { width: 100%; height: 100%; object-fit: contain; }
.media-card .meta { padding: 12px 14px; }
.media-card .name { font-weight: 700; word-break: break-word; }

.side-list button {
  display: block;
  width: 100%;
  text-align: left;
  margin-bottom: 6px;
}
.side-list button.active { border-color: var(--accent); background: #edf4f1; }

.days { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.days label {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
}

.dropzone {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  color: var(--muted);
}
.dropzone.over { border-color: var(--accent); background: #edf4f1; }

#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--gp-black);
  color: var(--gp-white);
  padding: 12px 20px;
  border-radius: 10px;
  max-width: 90vw;
  z-index: 50;
}
#toast.error { background: var(--danger); }

@media (max-width: 640px) {
  .topbar { padding: 0 12px; gap: 12px; }
  .brand .head { display: none; }
  main { padding: 20px 16px 60px; }
}

label.inline {
  flex: 0 0 auto !important;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  padding-bottom: 10px;
}

[hidden] { display: none !important; }
