/* Admin-Portal LoopFest Franklin.
   Gleiche Palette, gleiche Schrift, andere Dichte: hell, tabellarisch,
   tastaturfreundlich. Der Loop taucht nur noch als aktiver Zustand in der
   Seitenleiste auf. */

body { background: #FBFAF6; font-size: 15px; }

.admin {
  display: flex;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* ============================================================ Anmeldung */

.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: var(--lf-asphalt);
}
.login__card { width: 100%; max-width: 340px; }
.login__brand {
  font-family: var(--lf-font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--lf-beton);
  margin-bottom: 4px;
}
.login__rule {
  height: 5px;
  width: 64px;
  background: var(--lf-signal);
  border-radius: var(--lf-r-full);
  margin-bottom: 22px;
}
.login label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8C949C;
  margin-bottom: 6px;
}
.login input {
  width: 100%;
  height: 48px;
  border-radius: var(--lf-r-s);
  border: 1px solid #3A4046;
  background: #1C2024;
  color: var(--lf-beton);
  padding: 0 14px;
  font-size: 16px;
  margin-bottom: 14px;
}
.login input:last-of-type { margin-bottom: 20px; }
.login__submit {
  width: 100%;
  height: 50px;
  border-radius: var(--lf-r-s);
  background: var(--lf-signal);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}
.login__submit:hover { background: var(--lf-signal-dark); }
.login__note { font-size: 13px; color: #7C838B; margin-top: 14px; line-height: 1.5; }
.login__warn {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--lf-r-s);
  border: 1px solid #5A4520;
  background: #2A2318;
  color: #E9C87A;
  font-size: 13px;
  line-height: 1.5;
}

/* =========================================================== Seitenleiste */

.side {
  width: 260px;
  flex: 0 0 auto;
  background: var(--lf-asphalt);
  color: var(--lf-beton);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
}
.side__brand {
  font-family: var(--lf-font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 0 10px;
  margin-bottom: 4px;
}
.side__brand span { color: var(--lf-signal); }
.side__sub { font-size: 12px; color: #7C838B; padding: 0 10px; margin-bottom: 24px; }
.side__nav { display: flex; flex-direction: column; gap: 4px; }
.side__link {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 44px;
  padding: 0 12px;
  border-radius: var(--lf-r-s);
  color: #AEB5BC;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  width: 100%;
}
.side__link:hover { background: #23272C; color: var(--lf-beton); }
.side__link[aria-current='page'] { background: var(--lf-signal); color: #fff; }
.side__link[aria-current='page']:hover { background: var(--lf-signal-dark); color: #fff; }
.side__link .ic { flex: 0 0 auto; }
.side__count {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: var(--lf-r-full);
  background: rgba(255, 255, 255, .14);
}
.side__link[aria-current='page'] .side__count { background: rgba(0, 0, 0, .22); }
.side__foot {
  margin-top: auto;
  padding: 14px 12px 0;
  border-top: 1px solid #2E343A;
  font-size: 13px;
  color: #7C838B;
}
.side__user { color: var(--lf-beton); font-weight: 600; margin-bottom: 2px; }
.side__logout { color: #AEB5BC; text-decoration: underline; }
.side__logout:hover { color: var(--lf-signal); }

/* ================================================================ Arbeitsfläche */

.work { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.screen { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }

.pagebar {
  flex: 0 0 auto;
  padding: 22px 28px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--lf-beton-2);
  flex-wrap: wrap;
}
.pagebar__title {
  font-family: var(--lf-font-display);
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0;
}
.pagebar__sub { font-size: 14px; color: var(--lf-ink-60); margin-top: 2px; }
.pagebar__crumb { font-size: 13px; color: var(--lf-ink-60); margin-bottom: 2px; }
.pagebar__actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }

.body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }

/* --------------------------------------------------------- Bedienelemente */

.abtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border-radius: var(--lf-r-s);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
.abtn--primary { background: var(--lf-signal); color: #fff; font-weight: 700; }
.abtn--primary:hover { background: var(--lf-signal-dark); }
.abtn--plain { border: 1px solid #DCD6C6; background: #fff; }
.abtn--plain:hover { border-color: var(--lf-ink-60); }
.abtn--danger { border: 1px solid #E3B4AF; background: #fff; color: var(--lf-rot); }
.abtn--danger:hover { background: #FCF1F0; }
.abtn--sm { height: 34px; padding: 0 12px; font-size: 14px; }
.abtn--link { height: auto; padding: 0; color: var(--lf-signal-dark); font-weight: 700; }
.abtn--link:hover { color: var(--lf-signal); }

.searchbox {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 14px;
  border-radius: var(--lf-r-s);
  border: 1px solid #DCD6C6;
  background: #fff;
}
.searchbox .ic { color: var(--lf-ink-60); flex: 0 0 auto; }
.searchbox input { border: 0; outline: none; font-size: 15px; width: 180px; background: transparent; }

.ainput, .aselect, .atextarea {
  width: 100%;
  border: 1px solid #DCD6C6;
  border-radius: var(--lf-r-s);
  background: #fff;
  font-size: 16px;
}
.ainput, .aselect { height: 46px; padding: 0 12px; }
.atextarea { padding: 10px 12px; resize: vertical; min-height: 92px; line-height: 1.5; }
.ainput:focus, .aselect:focus, .atextarea:focus { border-color: var(--lf-signal); }
.ainput--time { width: 100%; min-width: 0; text-align: center; font-variant-numeric: tabular-nums; }

.alabel {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--lf-ink-60);
  margin-bottom: 6px;
}
.afield { margin-bottom: 18px; }
.arow2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* -------------------------------------------------------------- Tabelle */

.table { min-width: 900px; }
.table__head, .table__row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 190px 150px 110px 170px 130px;
  align-items: center;
}
.table__head {
  padding: 10px 28px;
  background: var(--lf-beton);
  border-bottom: 1px solid var(--lf-beton-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--lf-ink-60);
  position: sticky;
  top: 0;
  z-index: 2;
}
.table__row {
  padding: 12px 28px;
  border-bottom: 1px solid #EFEBE0;
  font-size: 15px;
}
.table__row:hover { background: #fff; }
.table__name { font-weight: 600; }
.table__cat { display: flex; align-items: center; gap: 8px; color: var(--lf-ink-60); }
.table__swatch { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.table__muted { color: var(--lf-ink-60); }
.table__actions { text-align: right; display: flex; gap: 6px; justify-content: flex-end; }
.table__empty { padding: 48px 28px; text-align: center; color: var(--lf-ink-60); }

.pill {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--lf-r-full);
  white-space: nowrap;
}
.pill--ok { background: var(--lf-ok-bg); color: var(--lf-ok-fg); }
.pill--warn { background: var(--lf-warn-bg); color: var(--lf-warn-fg); }
.pill--mute { background: var(--lf-beton); color: var(--lf-ink-60); }
.state--on { color: var(--lf-ok-fg); font-weight: 600; }
.state--off { color: #8A8578; font-weight: 600; }

/* ------------------------------------------------------------ Formular */

.form {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  padding: 24px 28px 40px;
  align-content: start;
}
@media (max-width: 1200px) {
  .form { grid-template-columns: minmax(0, 1fr); }
}

.langtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  border-bottom: 2px solid var(--lf-beton-2);
  margin-bottom: 18px;
  align-items: flex-end;
}
.langtab {
  height: 40px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--lf-ink-60);
  border-radius: var(--lf-r-s) var(--lf-r-s) 0 0;
  position: relative;
}
.langtab:hover { background: var(--lf-beton); }
.langtab[aria-current='true'] { background: var(--lf-ink); color: var(--lf-beton); }
.langtab__gap {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: var(--lf-r-full);
  background: var(--lf-warn);
  margin-left: 7px;
  vertical-align: 1px;
}
.langtabs__more { margin-left: auto; align-self: center; padding-right: 4px; }

.hint {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  border-radius: var(--lf-r-s);
  background: var(--lf-note-bg);
  border: 1px solid var(--lf-note-border);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 18px;
}
.hint .ic { flex: 0 0 auto; color: var(--lf-warn-fg); }
.hint--error { background: #FCF1F0; border-color: #E3B4AF; }
.hint--error .ic { color: var(--lf-rot); }

.timerow {
  display: grid;
  grid-template-columns: 1fr auto 1fr 44px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.timerow__dash { color: var(--lf-ink-60); }
.timerow__drop {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--lf-r-s);
  color: var(--lf-ink-60);
}
.timerow__drop:hover { background: #FCF1F0; color: var(--lf-rot); }
.timerow__err { grid-column: 1 / -1; font-size: 13px; color: var(--lf-rot); margin: -2px 0 6px; }

.togglelist { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle {
  height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: var(--lf-r-full);
  border: 1px solid #DCD6C6;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: var(--lf-ink-60);
}
.toggle:hover { border-color: var(--lf-ink-60); }
.toggle[aria-pressed='true'] {
  background: var(--lf-ink);
  border-color: var(--lf-ink);
  color: var(--lf-beton);
}

/* Kartenposition — dieselbe echte Karte wie in der Besucher-App (js/map.js) */
.pinmap {
  position: relative;
  height: 420px;
  border-radius: var(--lf-r-m);
  overflow: hidden;
  border: 1px solid #DCD6C6;
  background: var(--lf-map-ground);
}
/* Ohne feste Größe legt MapLibre eine 0×0-Karte an und zeichnet nie. */
.pinmap__slot,
.pinmap__slot .map__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* Positioniert wird der Marker von MapLibre, hier steht nur das Aussehen. */
.pinmap__pin {
  color: var(--lf-cat-essen);
  cursor: grab;
}
.pinmap__pin svg {
  width: 40px;
  height: 40px;
  fill: #fff;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .35));
}
.pinmap__note {
  position: absolute;
  z-index: 3;   /* MapLibre setzt eigene z-index auf Canvas und Marker */
  left: 12px;
  bottom: 12px;
  font-size: 12px;
  color: #6B6659;
  background: rgba(243, 240, 232, .9);
  padding: 4px 9px;
  border-radius: 4px;
  pointer-events: none;
}
.pinmap__coord { font-size: 13px; color: var(--lf-ink-60); font-variant-numeric: tabular-nums; }

.panel {
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--lf-r-m);
  border: 1px solid #DCD6C6;
  background: #fff;
}
.panel__title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--lf-ink-60);
  margin-bottom: 10px;
}
.progedit {
  display: grid;
  grid-template-columns: 84px 84px minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #EFEBE0;
}

/* ---------------------------------------------------------- Kategorien */

.catgrid {
  padding: 24px 28px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  align-content: start;
}
.catcard {
  border: 1px solid var(--lf-beton-2);
  border-radius: var(--lf-r-m);
  background: #fff;
  padding: 16px;
}
.catcard__top { display: flex; gap: 14px; align-items: flex-start; }
.catcard__icon {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: var(--lf-r-full);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.catcard__body { flex: 1 1 auto; min-width: 0; }
.catcard__name { font-size: 17px; font-weight: 700; margin-bottom: 3px; }
.catcard__meta { font-size: 14px; color: var(--lf-ink-60); margin-bottom: 9px; }
.catcard__edit {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: var(--lf-r-s);
  border: 1px solid #DCD6C6;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}
.catcard__edit:hover { border-color: var(--lf-ink-60); }
.catcard__form { margin-top: 14px; padding-top: 14px; border-top: 1px solid #EFEBE0; }
.colorrow { display: flex; align-items: center; gap: 10px; }
.colorrow input[type='color'] {
  width: 46px;
  height: 40px;
  padding: 2px;
  border: 1px solid #DCD6C6;
  border-radius: var(--lf-r-s);
  background: #fff;
}
.colorrow code { font-size: 14px; color: var(--lf-ink-60); }

/* ------------------------------------------------------- Übersetzungen */

.filterbar {
  flex: 0 0 auto;
  padding: 14px 28px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--lf-beton-2);
  align-items: center;
}
.langfilter {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border-radius: var(--lf-r-full);
  border: 1px solid #DCD6C6;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: var(--lf-ink-60);
}
.langfilter:hover { border-color: var(--lf-ink-60); }
.langfilter[aria-pressed='true'] {
  background: var(--lf-ink);
  border-color: var(--lf-ink);
  color: var(--lf-beton);
}
.langfilter__n { opacity: .75; }

.queue { padding: 20px 28px 40px; }
.qcard {
  border: 1px solid var(--lf-beton-2);
  border-radius: var(--lf-r-m);
  background: #fff;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.qcard__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.qcard__subject { font-size: 16px; font-weight: 700; }
.qcard__langs { margin-left: auto; font-size: 13px; color: var(--lf-ink-60); }
.qcard__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1100px) { .qcard__grid { grid-template-columns: minmax(0, 1fr); } }
.qcard__source {
  padding: 12px 14px;
  border-radius: var(--lf-r-s);
  background: var(--lf-beton);
}
.qcard__srclabel {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--lf-ink-60);
  margin-bottom: 5px;
}
.qcard__srctext { font-size: 15px; line-height: 1.5; }
.qcard__actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.queue__done { padding: 56px 28px; text-align: center; }
.queue__done .ic { color: var(--lf-ok-fg); }
.queue__done-title {
  font-family: var(--lf-font-display);
  font-size: 24px;
  text-transform: uppercase;
  margin: 12px 0 8px;
}

/* ------------------------------------------------------- Statusleiste */

.savebar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 28px;
  background: var(--lf-warn-bg);
  border-top: 1px solid var(--lf-note-border);
  font-size: 14px;
  color: var(--lf-warn-fg);
}
.savebar__actions { margin-left: auto; display: flex; gap: 8px; }

.draftnote {
  padding: 10px 28px;
  background: var(--lf-beton);
  border-bottom: 1px solid var(--lf-beton-2);
  font-size: 13px;
  color: var(--lf-ink-60);
  display: flex;
  align-items: center;
  gap: 8px;
}
.draftnote .ic { flex: 0 0 auto; }
