/* ═══════════════════════════════════════════════
   ImageSign — Komponenten
   Keine abgerundeten Ecken, keine Schatten, kein Dekor
   ═══════════════════════════════════════════════ */

/* ─── Logo ─── */
.logo { display: flex; align-items: center; gap: var(--s2); text-decoration: none; color: var(--black); }
.logo:visited, .logo * { color: inherit; }
.logo-mark {
  width: 28px; height: 28px;
  background: var(--black);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-mark svg { width: 17px; height: 17px; color: var(--white) !important; }
.logo-type { line-height: 1; letter-spacing: -.3px; }
.logo-type strong { font-weight: 700; }
.logo-type span   { font-weight: 200; }
.logo-claim {
  font-size: 8px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .24em;
  color: var(--g-label);
  margin-top: 2px;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s2);
  padding: 9px 18px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .02em;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.btn-primary   { background: var(--black); color: var(--white); border-color: var(--black); }
.btn-primary:hover { background: var(--g-text); border-color: var(--g-text); }

.btn-secondary { background: var(--white); color: var(--black); border-color: var(--g-line); }
.btn-secondary:hover { border-color: var(--black); }

.btn-ghost     { color: var(--g-mid); }
.btn-ghost:hover { color: var(--black); background: var(--g-line-lt); }

.btn-danger    { background: var(--white); color: var(--status-off); border-color: var(--g-line); }
.btn-danger:hover { border-color: var(--status-off); }

.btn-sm  { padding: 6px 12px; font-size: 13px; }
.btn-lg  { padding: 12px 24px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .35; cursor: not-allowed; }

.icon-btn {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: none; cursor: pointer;
  color: var(--g-label);
  transition: color .15s, background .15s;
}
.icon-btn:hover { color: var(--black); background: var(--g-line-lt); }
.icon-btn svg { width: 15px; height: 15px; }

/* ─── Formular ─── */
.field { margin-bottom: var(--s5); }

.input {
  width: 100%;
  padding: 10px 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 300;
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--g-line);
  outline: none;
  transition: border-color .15s;
}
.input::placeholder { color: var(--g-label); font-weight: 300; }
.input:focus { border-color: var(--black); }
.input:disabled { background: var(--g-bg); color: var(--g-label); }

select.input { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M2 3.5L5 6.5L8 3.5' stroke='%23888' stroke-width='1.3' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}

textarea.input { resize: vertical; min-height: 90px; font-family: 'Poppins', sans-serif; }

.field-hint { font-size: 13px; font-weight: 300; color: var(--g-label); margin-top: var(--s1); }
.field-error { font-size: 14px; color: var(--status-off); margin-top: var(--s1); }

/* Checkbox / Switch */
.check { display: flex; align-items: center; gap: var(--s2); cursor: pointer; font-size: 15px; font-weight: 300; }
.check input { width: 15px; height: 15px; accent-color: var(--black); cursor: pointer; }

/* ─── Suchfeld ─── */
.search {
  display: flex; align-items: center;
  background: var(--white);
  border: 1px solid var(--g-line);
  transition: border-color .15s;
}
.search:focus-within { border-color: var(--black); }
.search svg { width: 14px; height: 14px; margin: 0 var(--s2) 0 var(--s3); color: var(--g-label); flex-shrink: 0; }
.search input {
  border: none; outline: none; background: none;
  padding: 8px 12px 8px 0;
  font-family: 'Poppins', sans-serif; font-size: 15px; font-weight: 300;
  width: 180px;
}
.search input::placeholder { color: var(--g-label); }

/* ─── Card ─── */
.card {
  background: var(--white);
  border: 1px solid var(--g-line);
  cursor: pointer;
  transition: border-color .15s;
  position: relative;
}
.card:hover { border-color: var(--black); }

.card-visual {
  aspect-ratio: 16 / 9;
  background: var(--g-line-lt);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  position: relative;
}
.card-visual img, .card-visual video { width: 100%; height: 100%; object-fit: cover; }
.card-visual svg { color: var(--black); opacity: .18; }

.card-body { padding: var(--s3); display: flex; align-items: flex-start; gap: var(--s2); }
.card-name { font-size: 14px; font-weight: 500; letter-spacing: -.1px; }
.card-meta { font-size: 12px; font-weight: 400; text-transform: uppercase; letter-spacing: .12em; color: var(--g-label); margin-top: 2px; }

/* ─── Status-Badge ─── */
.badge {
  position: absolute; bottom: var(--s2); right: var(--s2);
  padding: 3px 8px;
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--white);
}
.badge-online  { background: var(--status-on); }
.badge-offline { background: var(--status-off); }

/* Auf derselben Höhe wie der Status, aber links: Zwei Angaben über
   denselben Bildschirm, die nichts miteinander zu tun haben —
   nebeneinander gestellt sieht man beide auf einen Blick. */
.badge-touch {
  left: var(--s2); right: auto;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.35);
  backdrop-filter: blur(2px);
}

.badge-flat {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .1em;
}
.badge-flat.on  { color: var(--status-on); }
.badge-flat.off { color: var(--status-off); }

/* ─── Screen-Visual ─── */
.screen-visual {
  aspect-ratio: 16 / 9;
  background: var(--black);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.screen-visual.portrait { aspect-ratio: 9 / 16; }
.screen-visual .frame {
  width: 72%; height: 72%;
  border: 1px solid rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center;
}
.screen-visual .frame svg { width: 26px; height: 26px; color: rgba(255,255,255,.22); opacity: 1; }
.screen-visual img { width: 100%; height: 100%; object-fit: cover; }

/* Vorschau: das, was gerade läuft.

   `contain` statt `cover` — ein Hochformat-Plakat auf einer
   Querformat-Kachel darf nicht beschnitten werden. Wer prüfen
   will, ob das richtige Bild läuft, muss es ganz sehen. */
.screen-visual .vorschau { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Nichts läuft: das Zeichen, ruhig und klein. */
.screen-visual .zeichen { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.screen-visual .zeichen svg { width: 34%; max-width: 86px; height: auto; color: rgba(255,255,255,.2); }

/* Webseiten haben kein Bild — dann steht dort ihr Name. */
.screen-visual .webname {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: var(--s5); text-align: center;
  font-size: 13px; font-weight: 300; line-height: 1.5;
  color: rgba(255,255,255,.55);
}
.screen-visual .laeuft {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: var(--s4) var(--s3) var(--s2);
  font-size: 11px; font-weight: 400; letter-spacing: .04em;
  color: rgba(255,255,255,.7);
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ─── Dropdown ─── */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 4px); left: 0;
  min-width: 200px;
  background: var(--white);
  border: 1px solid var(--g-line);
  z-index: 200;
  display: none;
  animation: slideUp .12s ease;
}
.dropdown-menu.right { left: auto; right: 0; }
.dropdown-menu.open { display: block; }
.dropdown-menu a,
.dropdown-menu button {
  display: block; width: 100%;
  padding: 10px 16px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px; font-weight: 400;
  color: var(--black); text-decoration: none;
  background: none; border: none; text-align: left;
  cursor: pointer;
  transition: background .1s;
}
.dropdown-menu a:hover,
.dropdown-menu button:hover { background: var(--g-bg); }
.dropdown-menu button.danger { color: var(--status-off); }
.dropdown-head {
  padding: var(--s3) var(--s4) var(--s2);
  border-bottom: 1px solid var(--g-line);
}
.dropdown-head strong { display: block; font-size: 14px; font-weight: 600; }
.dropdown-head small  { font-size: 12px; font-weight: 300; color: var(--g-label); }
.dropdown-sep { border: none; border-top: 1px solid var(--g-line); margin: var(--s1) 0; }

/* ─── Modal ─── */
.overlay {
  position: fixed; inset: 0;
  background: rgba(10,10,10,.6);
  z-index: 500;
  display: none; align-items: center; justify-content: center;
  padding: var(--s4);
  animation: fadeIn .12s ease;
}
.overlay.open { display: flex; }

.modal {
  background: var(--white);
  width: 100%; max-width: 460px;
  border: 1px solid var(--g-line);
  animation: slideUp .16s ease;
  max-height: 90vh;
  display: flex; flex-direction: column;
}
.modal.lg { max-width: 680px; }

.modal-head {
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--black);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.modal-head h2 { font-size: 16px; font-weight: 500; letter-spacing: -.2px; }
.modal-body { padding: var(--s5); overflow-y: auto; }
.modal-foot {
  padding: var(--s3) var(--s5);
  border-top: 1px solid var(--g-line);
  display: flex; justify-content: flex-end; gap: var(--s2);
  flex-shrink: 0;
}

/* ─── Toast ─── */
.toasts {
  position: fixed; bottom: var(--s6); right: var(--s6);
  z-index: 900;
  display: flex; flex-direction: column; gap: var(--s2);
}
.toast {
  padding: var(--s3) var(--s4);
  background: var(--black); color: var(--white);
  font-size: 14px; font-weight: 400;
  max-width: 320px;
  animation: slideUp .18s ease;
}
.toast.error { background: var(--status-off); }

/* ─── Kontextmenü ─── */
.ctx {
  position: fixed; z-index: 400;
  min-width: 160px;
  background: var(--white);
  border: 1px solid var(--g-line);
  display: none;
}
.ctx.open { display: block; }
.ctx button {
  display: block; width: 100%;
  padding: 9px 16px;
  font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 400;
  color: var(--black); background: none; border: none;
  text-align: left; cursor: pointer;
}
.ctx button:hover { background: var(--g-bg); }
.ctx button.danger { color: var(--status-off); }
.ctx-sep { border: none; border-top: 1px solid var(--g-line); margin: var(--s1) 0; }

/* ─── Leerzustand ─── */
.empty {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 80px var(--s6);
  gap: var(--s4);
}
.empty svg { width: 40px; height: 40px; color: var(--g-line); }
.empty h3 { font-size: 18px; font-weight: 600; }
.empty p  { font-size: 15px; font-weight: 300; color: var(--g-mid); max-width: 340px; line-height: 1.6; }

/* ─── Upload-Zone ─── */
.dropzone {
  border: 1px dashed var(--g-line);
  padding: var(--s10) var(--s6);
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--black); background: var(--g-bg); }
.dropzone input { display: none; }
.dropzone svg { width: 32px; height: 32px; color: var(--g-line); margin-bottom: var(--s3); }

/* ─── Spinner ─── */
.spinner {
  width: 20px; height: 20px;
  border: 1.5px solid var(--g-line);
  border-top-color: var(--black);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

/* ─── Tabs ─── */
.tabs { display: flex; border-bottom: 1px solid var(--g-line); }
.tab {
  padding: 10px 18px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px; font-weight: 500;
  color: var(--g-label);
  background: none; border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer; margin-bottom: -1px;
  transition: color .15s;
}
.tab:hover { color: var(--black); }
.tab.active { color: var(--black); border-bottom-color: var(--black); }

/* ─── Ablegefläche über der ganzen Seite ─── */
.drop-veil {
  position: fixed; inset: 0;
  background: rgba(10,10,10,.92);
  z-index: 800;
  display: none;
  align-items: center; justify-content: center;
  pointer-events: none;
}
.drop-veil.open { display: flex; animation: fadeIn .12s ease; }
.drop-veil-inner { text-align: center; color: var(--white); }
.drop-veil-inner svg { width: 56px; height: 56px; margin-bottom: var(--s5); opacity: .5; }
.drop-veil-title { font-size: 25px; font-weight: 700; letter-spacing: -.5px; }
.drop-veil-note {
  font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .22em;
  color: rgba(255,255,255,.5);
  margin-top: var(--s3);
}

/* ─── Fortschrittsfenster ─── */
.upload-panel {
  position: fixed; bottom: var(--s5); right: var(--s5);
  width: 340px; max-width: calc(100vw - var(--s8));
  background: var(--white);
  border: 1px solid var(--black);
  z-index: 820;
  animation: slideUp .18s ease;
  box-shadow: 0 8px 32px rgba(0,0,0,.14);
}
.upload-panel-head {
  display: flex; align-items: center; gap: var(--s2);
  padding: var(--s3) var(--s3) var(--s3) var(--s4);
  border-bottom: 1px solid var(--g-line);
}
.upload-panel-head strong { flex: 1; font-size: 14px; font-weight: 600; }
.upload-panel-list { max-height: 260px; overflow-y: auto; }

.upload-row {
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--g-line-lt);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s1) var(--s3);
  align-items: center;
}
.upload-row:last-child { border-bottom: none; }
.upload-row-name {
  font-size: 14px; font-weight: 400;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.upload-row-state {
  font-size: 13px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--g-label);
}
.upload-row.fertig .upload-row-state { color: var(--status-on); }
.upload-row.fehler .upload-row-state { color: var(--status-off); }
.upload-row.fehler .upload-row-name { color: var(--status-off); }

.upload-row-bar {
  grid-column: 1 / -1;
  height: 2px; background: var(--g-line);
  display: block;
}
.upload-row-bar span {
  display: block; height: 100%;
  background: var(--black);
  transition: width .2s ease;
}
.upload-row.fehler .upload-row-bar span { background: var(--status-off); }

/* ─── Ablegeziel beim Verschieben ─── */
.drop-target { outline: 2px solid var(--black); outline-offset: -2px; }
.card.drop-target .card-visual,
.list-row.drop-target { background: var(--g-line-lt); }
.dragging-item { opacity: .4; }

/* ─── Hintergrundton über der Wiedergabeliste ───
   Abgesetzt, aber nicht laut: Es ist kein Element der Liste,
   soll aber auch nicht übersehen werden. */
.radio-zeile {
  display: grid;
  grid-template-columns: 34px 1fr auto auto;
  gap: var(--s4);
  align-items: center;
  padding: var(--s3) var(--s5);
  background: var(--g-bg);
  border-bottom: 1px solid var(--g-line);
}
.radio-zeile .radio-sym svg { width: 20px; height: 20px; color: var(--g-mid); }
.radio-zeile .radio-wer strong { font-size: 15px; font-weight: 600; display: block; }
.radio-zeile .radio-wer small { font-size: 12px; font-weight: 300; color: var(--g-mid); display: block; margin-top: 1px; }
.radio-regler { display: flex; align-items: center; gap: var(--s3); }
.radio-regler input[type=range] { width: 150px; accent-color: var(--black); }
.radio-regler input[type=number] { width: 62px; padding: 4px var(--s2); font-size: 13px; font-family: inherit;
  border: 1px solid var(--g-line); background: var(--white); }
.radio-regler span { font-size: 13px; font-weight: 500; width: 40px; text-align: right; }
@media (max-width: 760px) {
  .radio-zeile { grid-template-columns: 34px 1fr; }
  .radio-regler, .radio-zeile > .btn { grid-column: 2; }
}

/* ─── Live-Ansicht ─── */
.live-wrap {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--s5);
  align-items: start;
}

.live-screen {
  aspect-ratio: 16 / 9;
  background: var(--black);
  border: 1px solid var(--g-line);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.live-screen.portrait { aspect-ratio: 9 / 16; max-width: 220px; }
.live-screen > * { width: 100%; height: 100%; object-fit: contain; border: 0; display: block; }
.live-screen.leer::after {
  content: '';
  width: 28px; height: 28px;
  border: 2px solid rgba(255,255,255,.2);
  border-top-color: rgba(255,255,255,.6);
  border-radius: 50%;
  animation: live-dreh 1s linear infinite;
}
@keyframes live-dreh { to { transform: rotate(360deg) } }

.live-label {
  font-size: 9px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .18em;
  color: var(--g-label);
  margin-bottom: var(--s2);
}
.live-name {
  font-size: 15px; font-weight: 600;
  color: var(--black);
  line-height: 1.3;
  word-break: break-word;
}
.live-meta {
  font-size: 11px; font-weight: 300;
  color: var(--g-mid);
  margin-top: var(--s1);
}
.live-bar {
  height: 2px;
  background: var(--g-line);
  margin-top: var(--s4);
}
.live-bar > span {
  display: block; height: 100%;
  background: var(--black);
  width: 0;
  transition: width .4s linear;
}

.switch-inline {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-size: 11px; font-weight: 400;
  color: var(--g-text);
  cursor: pointer;
}

@media (max-width: 760px) {
  .live-wrap { grid-template-columns: 1fr; }
}

/* ─── Zugangsdaten ───
   Erscheinen genau einmal. Darum klar abgesetzt und zum Kopieren
   gebaut, statt beiläufig in einer Meldung. */
.zugang-hinweis {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--g-text);
  margin-bottom: var(--s4);
}

.zugang {
  background: var(--black);
  color: var(--white);
  padding: var(--s4);
  margin-bottom: var(--s3);
}

.zugang-zeile {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s3);
  padding: var(--s2) 0;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.zugang-zeile:last-child { border-bottom: 0; }

.zugang-label {
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: rgba(255,255,255,.45);
  flex-shrink: 0;
}

.zugang code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 13px;
  color: var(--white);
  text-align: right;
  word-break: break-all;
  user-select: all;
}

/* Feld, auf das sich eine Datei ziehen lässt */
.drop-aktiv {
  border-color: var(--black) !important;
  background: var(--g-line-lt);
}

/* Feld, über dem gerade ein Inhalt schwebt */

/* ─── Rechnungen ─── */
.rechnung {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto auto auto;
  align-items: center;
  gap: var(--s4);
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--g-line-lt);
  font-size: 13px;
}
.rechnung:last-child { border-bottom: 0; }

.rechnung-links { display: flex; flex-direction: column; min-width: 0; }
.rechnung-nummer { font-weight: 500; color: var(--black); }
.rechnung-zeitraum { font-size: 11px; color: var(--g-label); }
.rechnung-datum { color: var(--g-mid); font-variant-numeric: tabular-nums; }
.rechnung-betrag {
  font-weight: 500; color: var(--black);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rechnung-stand { font-size: 11px; }

.rechnung-links-aussen { display: flex; gap: var(--s3); }
.rechnung-links-aussen a {
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--black);
  text-decoration: none;
  border-bottom: 1px solid var(--g-line);
}
.rechnung-links-aussen a:hover { border-color: var(--black); }

@media (max-width: 760px) {
  .rechnung {
    grid-template-columns: 1fr auto;
    gap: var(--s2) var(--s3);
  }
  .rechnung-datum, .rechnung-stand { grid-column: 1; }
  .rechnung-links-aussen { grid-column: 2; justify-self: end; }
}
