:root {
  --bg: #0f172a;
  --bg-soft: #111827;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --danger: #dc2626;
  --ok: #16a34a;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); }
button, input, select { font: inherit; }
a { color: var(--primary); }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 0.92rem; }
.brand { font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; color: #60a5fa; font-size: 0.84rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
code { background: #f1f5f9; padding: 2px 6px; border-radius: 7px; }

.btn { border: 0; border-radius: 12px; padding: 11px 16px; cursor: pointer; font-weight: 700; transition: transform .12s ease, background .12s ease, opacity .12s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #e2e8f0; color: #0f172a; }
.btn-danger { background: #fee2e2; color: var(--danger); }
.btn-small { padding: 8px 12px; border-radius: 10px; font-size: 0.9rem; }
.full { width: 100%; margin-top: 12px; }
.input { width: 100%; border: 1px solid #cbd5e1; border-radius: 12px; padding: 11px 13px; background: white; outline: none; margin-bottom: 10px; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.label { display: block; font-size: 0.86rem; font-weight: 700; margin: 12px 0 6px; }
.check { display: flex; gap: 8px; align-items: center; margin: 10px 0; color: var(--muted); }
.message { margin-top: 12px; font-size: 0.92rem; }
.message.ok { color: var(--ok); }
.message.err { color: var(--danger); }
.empty-state { color: var(--muted); padding: 22px; text-align: center; border: 1px dashed #cbd5e1; border-radius: 14px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 999px; background: #fef3c7; color: #92400e; font-weight: 800; font-size: 0.82rem; }
.pill.unlocked { background: #dcfce7; color: #166534; }

/* Viewer */
.viewer-body { background: var(--bg); overflow: hidden; }
.viewer-app { height: 100vh; display: flex; flex-direction: column; }
.viewer-header { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; background: rgba(15, 23, 42, 0.95); color: white; border-bottom: 1px solid rgba(255,255,255,.08); }
.tour-title { font-size: 1.15rem; font-weight: 800; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.tour-layout { flex: 1; display: grid; grid-template-columns: 1fr 360px; min-height: 0; }
.pano-section { position: relative; min-width: 0; background: #020617; }
.pano { width: 100%; height: 100%; min-height: 350px; }
.fallback-pano { width: 100%; height: 100%; background-size: cover; background-position: center; }
.scene-label { position: absolute; left: 20px; bottom: 18px; padding: 10px 14px; background: rgba(15,23,42,.72); color: white; border-radius: 14px; font-weight: 800; backdrop-filter: blur(12px); }
.floorplan-panel { background: #f8fafc; border-left: 1px solid rgba(255,255,255,.08); padding: 18px; overflow: auto; box-shadow: -10px 0 30px rgba(0,0,0,.12); }
.panel-title { font-weight: 900; margin-bottom: 12px; }
.floorplan-wrap { position: relative; width: 100%; border-radius: 18px; overflow: hidden; background: white; border: 1px solid var(--line); box-shadow: 0 8px 28px rgba(15,23,42,.08); }
.floorplan-wrap img { display: block; width: 100%; height: auto; }
.fp-point { position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: white; border: 3px solid white; box-shadow: 0 8px 20px rgba(15,23,42,.28); display: grid; place-items: center; cursor: pointer; font-size: 13px; font-weight: 900; }
.fp-point.locked { background: #64748b; }
.fp-point.active { background: var(--ok); transform: translate(-50%, -50%) scale(1.14); }
.fp-point .tooltip { display: none; position: absolute; bottom: calc(100% + 8px); white-space: nowrap; background: rgba(15,23,42,.92); color: white; padding: 6px 8px; border-radius: 9px; font-size: 12px; }
.fp-point:hover .tooltip { display: block; }
.scene-list { margin-top: 16px; display: grid; gap: 8px; }
.scene-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: white; cursor: pointer; font-weight: 700; }
.scene-item.locked { color: #64748b; }
.scene-item.active { border-color: var(--primary); background: #eff6ff; }

.modal { position: fixed; inset: 0; background: rgba(2,6,23,.72); display: grid; place-items: center; z-index: 20; padding: 20px; }
.modal-card { width: min(460px, 100%); background: white; border-radius: 22px; padding: 24px; box-shadow: var(--shadow); position: relative; }
.modal-card h2 { margin-top: 0; }
.modal-close { position: absolute; top: 14px; right: 14px; border: 0; background: #f1f5f9; width: 34px; height: 34px; border-radius: 50%; font-size: 22px; cursor: pointer; }
.code-block { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }

@media (max-width: 980px) {
  .viewer-body { overflow: auto; }
  .viewer-app { min-height: 100vh; height: auto; }
  .viewer-header { height: auto; padding: 14px; gap: 12px; align-items: flex-start; }
  .header-actions { flex-wrap: wrap; justify-content: flex-end; }
  .tour-layout { display: flex; flex-direction: column; }
  .pano-section { height: 62vh; min-height: 420px; }
  .floorplan-panel { border-left: 0; border-top: 1px solid var(--line); }
}

/* Admin */
.admin-body { min-height: 100%; background: #f1f5f9; }
.admin-shell { max-width: 1380px; margin: 0 auto; padding: 28px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.admin-header h1 { margin: 0; }
.card { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card.narrow { max-width: 430px; }
.grid.two { display: grid; grid-template-columns: 360px 1fr; gap: 22px; align-items: start; }
.tour-list { display: grid; gap: 10px; }
.tour-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px; cursor: pointer; background: #f8fafc; }
.tour-card:hover, .tour-card.active { border-color: var(--primary); background: #eff6ff; }
.tour-card strong { display: block; }
.editor-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.editor-head h2 { margin: 0 0 6px; }
.tabs { display: flex; gap: 8px; margin: 20px 0; border-bottom: 1px solid var(--line); }
.tab { border: 0; background: transparent; padding: 12px 14px; cursor: pointer; font-weight: 800; color: var(--muted); border-bottom: 3px solid transparent; }
.tab.active { color: var(--primary); border-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.scene-admin, .grant-admin, .point-admin { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px; margin-bottom: 8px; }
.scene-admin small, .grant-admin small, .point-admin small { display: block; color: var(--muted); }
.inline-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; margin-bottom: 12px; }
.inline-form .input { margin-bottom: 0; }
.admin-floorplan { position: relative; width: min(720px, 100%); background: #f8fafc; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; min-height: 260px; margin-bottom: 14px; }
.admin-floorplan img { width: 100%; display: block; }
.admin-floorplan .draft-point { position: absolute; transform: translate(-50%, -50%); width: 22px; height: 22px; border-radius: 50%; background: #f97316; border: 3px solid white; box-shadow: 0 6px 15px rgba(0,0,0,.25); }
.admin-floorplan .fp-point { width: 26px; height: 26px; font-size: 11px; }

@media (max-width: 1000px) {
  .admin-shell { padding: 16px; }
  .grid.two { grid-template-columns: 1fr; }
  .inline-form { grid-template-columns: 1fr; }
}

/* Branding & Panorama-Hotspots */
.top-logo {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 8;
  max-width: 160px;
  max-height: 90px;
  object-fit: contain;
  filter: drop-shadow(0 10px 25px rgba(0,0,0,.45));
}

.pano-hop-shell,
.nadir-hotspot-shell,
.admin-existing-hop-shell,
.draft-pano-marker {
  background: transparent !important;
  border: 0 !important;
  width: auto !important;
  height: auto !important;
}

.pano-hop {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255,255,255,.9);
  border-radius: 999px;
  background: rgba(15,23,42,.82);
  color: white;
  padding: 9px 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
  white-space: nowrap;
}
.pano-hop:not(.locked) { background: rgba(37,99,235,.88); }
.pano-hop.locked { background: rgba(2,6,23,.88); }
.pano-hop-icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.18); }
.pano-hop-preview {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translateX(-50%);
  width: 230px;
  background: rgba(2,6,23,.96);
  border: 2px solid rgba(255,255,255,.85);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(0,0,0,.45);
  text-align: left;
  color: white;
}
.pano-hop:hover .pano-hop-preview { display: block; }
.pano-hop-preview img { display: block; width: 100%; height: 118px; object-fit: cover; opacity: .92; }
.pano-hop-preview strong { display: block; padding: 10px 12px 0; }
.pano-hop-preview small { display: block; color: #cbd5e1; padding: 2px 12px 11px; }
.preview-placeholder { display: grid; place-items: center; min-height: 100px; color: #cbd5e1; padding: 12px; text-align: center; }

.nadir-logo {
  transform: translate(-50%, -50%);
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  display: grid;
  place-items: center;
  border: 6px solid rgba(255,255,255,.65);
  box-shadow: 0 18px 45px rgba(0,0,0,.35);
  overflow: hidden;
}
.nadir-logo img { max-width: 92%; max-height: 92%; object-fit: contain; }

.floor-tooltip { min-width: 160px; white-space: normal !important; text-align: left; overflow: hidden; padding: 0 !important; }
.floor-tooltip img { display: block; width: 180px; height: 90px; object-fit: cover; }
.floor-tooltip strong { display: block; padding: 7px 9px 0; }
.floor-tooltip small { display: block; padding: 1px 9px 8px; color: #cbd5e1; }

/* Admin Erweiterungen */
.scene-edit-card { border: 1px solid var(--line); border-radius: 15px; padding: 14px; margin-bottom: 12px; background: #f8fafc; }
.scene-edit-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.scene-edit-head small { display: block; color: var(--muted); }
.scene-thumb { width: 120px; height: 64px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); }
.scene-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.scene-edit-grid label span { display: block; font-size: .82rem; font-weight: 800; margin-bottom: 5px; color: var(--muted); }
.scene-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.admin-pano { position: relative; width: 100%; min-height: 420px; background: #020617; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); margin: 12px 0; }
.admin-pano-canvas { width: 100%; height: 420px; }
.hotspot-form-top { grid-template-columns: 1fr 1fr 1fr; }
.hotspot-save-row { grid-template-columns: 1fr auto; }
.admin-hop-dot {
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(37,99,235,.9);
  color: white;
  border: 2px solid white;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 25px rgba(0,0,0,.35);
  white-space: nowrap;
}
.draft-pano-marker span {
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f97316;
  color: white;
  border: 3px solid white;
  font-weight: 900;
  box-shadow: 0 10px 25px rgba(0,0,0,.35);
}
.logo-preview { margin-top: 12px; display: flex; align-items: center; gap: 12px; color: var(--muted); border: 1px dashed #cbd5e1; border-radius: 14px; padding: 12px; min-height: 70px; }
.logo-preview img { max-width: 160px; max-height: 80px; object-fit: contain; background: #0f172a; border-radius: 10px; padding: 8px; }

@media (max-width: 1000px) {
  .scene-edit-grid { grid-template-columns: 1fr; }
  .hotspot-form-top, .hotspot-save-row { grid-template-columns: 1fr; }
  .top-logo { max-width: 120px; max-height: 70px; top: 14px; right: 14px; }
  .pano-hop-label { display: none; }
}

/* v0.3 Bulk-Upload & rotierende Panorama-Vorschau */
.dropzone {
  border: 2px dashed #94a3b8;
  border-radius: 18px;
  padding: 26px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  display: grid;
  gap: 8px;
  place-items: center;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.dropzone:hover,
.dropzone.dragover {
  border-color: var(--primary);
  background: #eff6ff;
  transform: translateY(-1px);
}
.dropzone-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
}
.bulk-options { grid-template-columns: 1fr auto; margin-top: 12px; }
.bulk-list { display: grid; gap: 8px; margin-top: 12px; }
.bulk-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(180px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.bulk-row strong { display: block; }
.bulk-row small { display: block; color: var(--muted); }

.mini-pano-preview {
  display: block;
  width: 100%;
  height: 126px;
  background-size: cover;
  background-position: center;
  background-color: #020617;
  overflow: hidden;
}
.mini-pano-preview .pnlm-container,
.mini-pano-preview .pnlm-render-container,
.mini-pano-preview .pnlm-dragfix {
  width: 100% !important;
  height: 100% !important;
}
.pano-hop-preview .mini-pano-preview { height: 126px; }
.floor-tooltip .mini-pano-preview { width: 190px; height: 96px; }
.pano-hop-preview img,
.floor-tooltip img { display: none; }
.pano-hop-preview { pointer-events: none; }

@media (max-width: 1000px) {
  .bulk-options, .bulk-row { grid-template-columns: 1fr; }
}

/* v0.4 Admin-Hotspot-Bearbeitung */
.hotspot-selection {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 10px 12px;
  background: #f8fafc;
  margin: 10px 0 12px;
}
.hotspot-save-row { grid-template-columns: 1fr auto auto auto; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.point-admin.selected { border-color: var(--primary); background: #eff6ff; }
.admin-existing-hop-shell.selected { z-index: 3; }
.admin-hop-dot.selected {
  background: #f97316;
  color: #fff;
  box-shadow: 0 0 0 5px rgba(249,115,22,.25), 0 14px 30px rgba(0,0,0,.38);
}
.admin-pano-canvas { cursor: crosshair; }
.admin-pano-canvas:active { cursor: grabbing; }
@media (max-width: 1000px) {
  .hotspot-save-row { grid-template-columns: 1fr; }
  .row-actions { justify-content: stretch; }
  .row-actions .btn { width: 100%; }
}

/* v0.5 Ogulo-ähnliche Marker, größere Kameraabdeckung, gesperrte Preview schwarz */
.pano-hop {
  position: relative;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #0f172a;
  padding: 0;
  font-weight: 900;
  cursor: pointer;
  box-shadow: none;
  backdrop-filter: none;
  white-space: nowrap;
}
.pano-hop:not(.locked),
.pano-hop.locked { background: transparent; }
.pano-hop-marker {
  position: relative;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.96);
  border: 6px solid rgba(255,255,255,.72);
  box-shadow: 0 16px 42px rgba(0,0,0,.36), inset 0 0 0 1px rgba(15,23,42,.08);
  overflow: visible;
}
.pano-hop-marker img {
  max-width: 68%;
  max-height: 68%;
  object-fit: contain;
  display: block;
}
.pano-hop-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #0ea5e9;
  color: #fff;
  font-size: 28px;
  line-height: 1;
}
.pano-hop-lock {
  position: absolute;
  right: -8px;
  top: -8px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #020617;
  color: #fff;
  border: 3px solid #fff;
  font-size: 13px;
  box-shadow: 0 8px 20px rgba(0,0,0,.32);
}
.pano-hop-label,
.pano-hop-icon { display: none !important; }
.pano-hop-preview {
  left: 50%;
  bottom: calc(100% + 14px);
  width: 250px;
  background: rgba(255,255,255,.98);
  border: 6px solid rgba(255,255,255,.95);
  border-radius: 15px;
  box-shadow: 0 18px 48px rgba(0,0,0,.45);
  color: #0f172a;
}
.pano-hop-preview strong {
  padding: 8px 10px 0;
  color: #0f172a;
  font-weight: 900;
}
.pano-hop-preview small {
  color: #475569;
  padding: 2px 10px 8px;
}
.pano-hop-preview.is-black {
  background: #000;
  border-color: #fff;
  color: #fff;
}
.pano-hop-preview.is-black strong { color: #fff; }
.pano-hop-preview.is-black small { color: #cbd5e1; }
.preview-black {
  min-height: 126px;
  background: #000 !important;
  color: transparent !important;
}
.floor-tooltip.is-black {
  background: #000 !important;
  border-color: rgba(255,255,255,.9) !important;
  color: #fff !important;
}
.floor-tooltip.is-black strong { color: #fff; }
.floor-tooltip.is-black small { color: #cbd5e1; }
.floor-tooltip .preview-black.floor-mini {
  width: 190px;
  height: 96px;
  min-height: 96px;
  display: block;
}
.nadir-logo {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,.98);
  border: 10px solid rgba(255,255,255,.85);
  box-shadow: 0 20px 60px rgba(0,0,0,.42), inset 0 0 0 1px rgba(15,23,42,.08);
}
.nadir-logo img {
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
}
@media (max-width: 1000px) {
  .pano-hop-marker { width: 62px; height: 62px; border-width: 5px; }
  .pano-hop-preview { width: 220px; }
  .nadir-logo { width: 180px; height: 180px; border-width: 8px; }
}


/* v0.5 Feinschliff: 16:9-Hoverfenster, Ogulo-ähnliche Logo-Marker, Nadir-Kameraabdeckung */
.pano-hop-preview {
  width: 280px;
}
.pano-hop-preview .mini-pano-preview,
.pano-hop-preview .preview-black {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto !important;
  min-height: 0 !important;
}
.floor-tooltip {
  min-width: 240px;
}
.floor-tooltip .mini-pano-preview,
.floor-tooltip .preview-black.floor-mini {
  width: 240px !important;
  aspect-ratio: 16 / 9;
  height: auto !important;
  min-height: 0 !important;
}
.pano-hop-marker {
  background: rgba(255,255,255,.98);
  border: 7px solid rgba(255,255,255,.82);
}
.pano-hop-marker img {
  max-width: 72%;
  max-height: 72%;
}
.nadir-logo {
  width: 240px;
  height: 240px;
  background: rgba(255,255,255,.99);
  border: 12px solid rgba(255,255,255,.88);
}
.nadir-logo img {
  max-width: 72%;
  max-height: 72%;
}
@media (max-width: 1000px) {
  .pano-hop-preview { width: 240px; }
  .floor-tooltip { min-width: 220px; }
  .floor-tooltip .mini-pano-preview,
  .floor-tooltip .preview-black.floor-mini { width: 220px !important; }
  .nadir-logo { width: 190px; height: 190px; border-width: 9px; }
}

.admin-header-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 760px) {
  .admin-header { align-items: flex-start; gap: 14px; flex-direction: column; }
  .admin-header-actions { justify-content: flex-start; }
}

/* v0.7 Agreement-Link UI */
.small-input {
  max-width: 110px;
}
.direct-link-output {
  margin: 12px 0 18px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.04);
}
.copy-field {
  display: flex;
  gap: 8px;
  align-items: center;
}
.copy-field .input {
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

/* v0.7.1: Backup/Import zusätzlich deutlich sichtbar in der linken Admin-Spalte */
.backup-visible { text-align: center; }


/* v0.8 Ricoh-THETA Nadir-Abdeckung
   Großer fester weißer Rundpatch direkt am unteren Pol, damit das schwarze Kameragehäuse/Stativ bei THETA-Aufnahmen zuverlässig verdeckt wird. */
.nadir-logo {
  width: clamp(330px, 24vw, 430px) !important;
  height: clamp(330px, 24vw, 430px) !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.995) !important;
  border: 14px solid rgba(255,255,255,0.92) !important;
  box-shadow: 0 26px 78px rgba(0,0,0,.44), inset 0 0 0 1px rgba(15,23,42,.08) !important;
  display: grid !important;
  place-items: center !important;
  overflow: hidden !important;
}
.nadir-logo img {
  max-width: 54% !important;
  max-height: 54% !important;
  object-fit: contain !important;
}
@media (max-width: 1000px) {
  .nadir-logo {
    width: clamp(270px, 42vw, 360px) !important;
    height: clamp(270px, 42vw, 360px) !important;
    border-width: 12px !important;
  }
}
@media (max-width: 520px) {
  .nadir-logo {
    width: 260px !important;
    height: 260px !important;
    border-width: 10px !important;
  }
}


/* ==== v1.0: Navigation, Statistik, Abrechnung ==== */
.nav-active { outline: 2px solid #2563eb; }
.whoami { align-self: center; font-size: 12px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-box { background: #f1f5f9; border-radius: 10px; padding: 12px 14px; margin: 10px 0; display: grid; gap: 4px; }
.stat-bar-row { display: grid; grid-template-columns: 160px 1fr 48px; align-items: center; gap: 10px; margin: 4px 0; }
.stat-label { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-bar { background: #e2e8f0; border-radius: 6px; height: 12px; overflow: hidden; }
.stat-bar-fill { display: block; height: 100%; background: #2563eb; border-radius: 6px; }
.stat-value { text-align: right; font-size: 13px; color: #475569; }
.invoice-item-row { margin-bottom: 6px; }
textarea.input { resize: vertical; font-family: inherit; }

/* ==== v1.1: Systemansicht ==== */
.sys-row { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.sys-row span { color: #64748b; flex: 0 0 auto; }
.sys-row strong { text-align: right; word-break: break-all; font-weight: 600; }
.sys-warn { color: #b91c1c; }
