/* ==========================================================================
   J.A.R.V.I.S Presentationszentrum - Stylesheet
   Bewusst reduziert: warmes Papier-Dunkel, serifenlose Systemschrift,
   keine Verlaeufe, kein Neon, keine Spielereien.
   ========================================================================== */

:root {
  --bg: #0d1017;
  --bg-2: #12161f;
  --panel: #161b26;
  --panel-2: #1b2130;
  --line: #262d3d;
  --line-soft: #1f2534;
  --text: #e6e9ef;
  --text-dim: #98a1b3;
  --text-mute: #6b7488;
  --accent: #5c9bd8;
  --accent-deep: #3d78b0;
  --danger: #d96a6a;
  --ok: #6fbf8f;
  --radius: 10px;
  --mono: "Cascadia Mono", "SF Mono", Consolas, monospace;
  --sans: "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}

/* sehr dezentes Raster im Hintergrund */
.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.32;
  pointer-events: none;
  z-index: 0;
}

/* ------------------------------ Kopfzeile ------------------------------ */
.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 16, 23, 0.86);
  backdrop-filter: blur(6px);
}

.brand { display: flex; align-items: center; gap: 14px; }

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--accent);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.5px;
}

.brand-text h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.brand-text p {
  margin: 1px 0 0;
  font-size: 11.5px;
  color: var(--text-mute);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.status-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 13px;
  background: var(--bg-2);
}

.status-chip .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(111, 191, 143, 0.12);
}

.status-chip.offline .dot { background: var(--danger); box-shadow: none; }

/* ------------------------------ Layout ------------------------------ */
.layout {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 20px;
  padding: 22px 26px 10px;
  align-items: start;
}

@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.panel-list { max-height: calc(100vh - 150px); }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--text);
}

.head-tools { display: flex; align-items: center; gap: 8px; }

.count-badge {
  font-size: 11.5px;
  color: var(--text-mute);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 9px;
}

.icon-btn {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text-dim);
  border-radius: 7px;
  width: 30px; height: 30px;
  font-size: 15px;
  cursor: pointer;
  display: grid; place-items: center;
  transition: color .15s, border-color .15s, background .15s;
}

.icon-btn:hover { color: var(--accent); border-color: var(--accent-deep); }

/* ------------------------------ Dropzone ------------------------------ */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 26px 16px;
  cursor: pointer;
  text-align: center;
  background: var(--bg-2);
  transition: border-color .15s, background .15s;
  margin-bottom: 12px;
}

.dropzone:hover, .dropzone.hover {
  border-color: var(--accent);
  background: #141a26;
}

.dz-icon { font-size: 22px; color: var(--accent); line-height: 1; }
.dz-title { font-weight: 600; font-size: 13.5px; }
.dz-hint { font-size: 11.5px; color: var(--text-mute); }

/* ------------------------------ Ordnerpfad ------------------------------ */
.folder-path {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  padding: 7px 10px;
  margin-bottom: 12px;
  overflow: hidden;
}

.fp-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-mute);
  flex-shrink: 0;
}

.folder-path code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ------------------------------ Dateiliste ------------------------------ */
.list-scroll { overflow-y: auto; flex: 1; min-height: 120px; }

.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.file-item {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 11px 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color .15s;
}

.file-item:hover { border-color: var(--line); }

.fi-icon {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 6px;
  display: grid; place-items: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: rgba(92, 155, 216, 0.12);
  color: var(--accent);
  text-transform: uppercase;
}

.fi-main { flex: 1; min-width: 0; }

.fi-name {
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fi-meta {
  font-size: 11px;
  color: var(--text-mute);
  margin-top: 2px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.fi-actions { display: flex; gap: 6px; flex-shrink: 0; }

.act-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-dim);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11.5px;
  cursor: pointer;
  font-family: var(--sans);
  transition: color .15s, border-color .15s, background .15s;
  white-space: nowrap;
}

.act-btn:hover { color: var(--text); border-color: var(--text-mute); }
.act-btn.primary { border-color: var(--accent-deep); color: var(--accent); }
.act-btn.primary:hover { background: rgba(92, 155, 216, 0.1); }
.act-btn.danger:hover { color: var(--danger); border-color: var(--danger); }

.empty-state {
  text-align: center;
  padding: 34px 16px;
  color: var(--text-mute);
}

.empty-state p { margin: 0 0 4px; font-size: 13px; }
.empty-state span { font-size: 11.5px; }

/* ------------------------------ Generator ------------------------------ */
.gen-form { display: flex; flex-direction: column; gap: 12px; }

.row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

@media (max-width: 620px) { .row.two { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }

.field > span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-mute);
}

.field input, .field select, .slide-card input, .slide-card textarea {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  padding: 8px 10px;
  font-size: 13px;
  font-family: var(--sans);
  width: 100%;
  outline: none;
  transition: border-color .15s;
}

.field input:focus, .field select:focus,
.slide-card input:focus, .slide-card textarea:focus {
  border-color: var(--accent-deep);
}

.field select { cursor: pointer; }

.slides-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-mute);
}

.mini-btn {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--accent);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11.5px;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--sans);
}

.mini-btn:hover { border-color: var(--accent-deep); }

.slides-editor { display: flex; flex-direction: column; gap: 10px; max-height: 240px; overflow-y: auto; padding-right: 2px; }

.slide-card {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.slide-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.remove-slide {
  background: none;
  border: none;
  color: var(--text-mute);
  cursor: pointer;
  font-size: 13px;
  padding: 0 4px;
}

.remove-slide:hover { color: var(--danger); }

.slide-card textarea { resize: vertical; min-height: 44px; font-size: 12.5px; }

.gen-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.switch { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-dim); cursor: pointer; }
.switch input { accent-color: var(--accent); }

.primary-btn {
  background: var(--accent);
  color: #0b1220;
  border: none;
  border-radius: 7px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--sans);
  transition: background .15s;
}

.primary-btn:hover { background: #6fa9e0; }
.primary-btn:disabled { opacity: .55; cursor: default; }

.gen-result {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-dim);
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
  display: none;
}

.gen-result.show { display: block; }
.gen-result strong { color: var(--accent); }
.gen-result .err { color: var(--danger); }

/* ------------------------------ Toasts ------------------------------ */
.toast-stack {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 340px;
}

.toast {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 7px;
  padding: 10px 13px;
  font-size: 12.5px;
  color: var(--text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: slideIn .18s ease-out;
}

.toast.err { border-left-color: var(--danger); }
.toast.ok { border-left-color: var(--ok); }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ------------------------------ Fusszeile ------------------------------ */
.foot {
  position: relative;
  z-index: 1;
  padding: 12px 26px 16px;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11.5px;
  color: var(--text-mute);
  border-top: 1px solid var(--line-soft);
  margin-top: 12px;
}

.foot code { font-family: var(--mono); color: var(--text-dim); }
.sep { opacity: .5; }

/* Scrollbars schlicht halten */
.list-scroll::-webkit-scrollbar, .slides-editor::-webkit-scrollbar { width: 8px; }
.list-scroll::-webkit-scrollbar-thumb, .slides-editor::-webkit-scrollbar-thumb {
  background: var(--line); border-radius: 4px;
}

@media (max-width: 820px) {
  }


/* --------------------------- Plattform-Hinweis --------------------------- */
.plat-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--text-mute);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 5px 11px;
  background: var(--bg-2);
  white-space: nowrap;
}

.plat-note::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.85;
}

@media (max-width: 820px) {
  .plat-note { display: none; }
}
