/* ===== Mission-Editor (Vollseiten Mission-Control, Liquid Glass) =====
   Gilt NUR fuer #editorView (eigenes Geruest, nur im new-Skin sichtbar).
   Das classic-Modal (#createModal) bleibt komplett unberuehrt. */

#editorView { display: none; }
[data-skin="new"] body.editor-open #editorView { display: block; max-width: 1760px; margin: 0 auto; padding: 8px 0 60px; color: var(--text); }
[data-skin="new"] body.editor-open .missions-container { display: none !important; }
[data-skin="new"] body.editor-open #createModal { display: none !important; }
[data-skin="new"] body.editor-open .content-area { max-width: none !important; margin: 0 !important; padding: 0 40px !important; }

/* Page Header */
#editorView .ed-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 8px 4px 28px; flex-wrap: wrap; }
#editorView .ed-crumb { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
#editorView .ed-crumb a { color: var(--text-dim); cursor: pointer; text-decoration: none; }
#editorView .ed-crumb a:hover { color: var(--accent); }
#editorView .ed-title { display: flex; align-items: center; gap: 14px; }
#editorView .ed-title h1 { font-size: 42px; font-weight: 800; letter-spacing: .5px; margin: 0; color: var(--text); }
#editorView .ed-badge { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; background: var(--accent-dim, rgba(31,168,255,0.15)); color: var(--accent); }
#editorView .ed-sub { font-size: 14px; color: var(--text-dim); margin: 8px 0 0; }
#editorView .ed-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Glas-Panels */
#editorView .ed-panel { background: rgba(255,255,255,0.04); -webkit-backdrop-filter: blur(20px) saturate(120%); backdrop-filter: blur(20px) saturate(120%); border: 1px solid rgba(255,255,255,0.08); border-radius: 20px; padding: 32px; margin: 0; }
#editorView .ed-main > .ed-panel + .ed-panel { margin-top: 20px; }
#editorView .ed-panel-title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; color: var(--text); margin: 0 0 20px; }

/* Grid: Editor links, Vorschau/Validierung rechts (sticky) */
#editorView .ed-grid { display: grid; grid-template-columns: 3fr 1fr; gap: 20px; align-items: start; }
#editorView .ed-main { min-width: 0; }
#editorView .ed-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 86px; }

/* Mission-Panel: Felder 40% links, Banner 60% rechts, Unterkanten buendig */
#editorView .ed-mission-row { display: grid; grid-template-columns: 2fr 3fr; gap: 28px; align-items: stretch; }
#editorView #edMountFields { display: flex; flex-direction: column; height: 100%; }
#editorView #edMountFields > .form-group:last-child { flex: 0 0 auto; margin-bottom: 0; }
#editorView .ed-sd-group { flex: 1; display: flex; flex-direction: column; margin-bottom: 14px; }
#editorView .ed-sd-group .input-with-btn { flex: 1; display: flex; position: relative; }
#editorView #mShortDesc { flex: 1; resize: none; min-height: 48px; padding-right: 64px; }
#editorView .ed-sd-group .input-inline-btn { position: absolute; top: 8px; right: 8px; bottom: auto; transform: none; }
#editorView .ed-banner-col { display: flex; flex-direction: column; }
#editorView .ed-banner { position: relative; flex: 1; min-height: 200px; border-radius: 14px; overflow: hidden; background: #0a1722; border: 1px solid rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; }
#editorView .ed-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#editorView .ed-banner-empty { color: var(--text-muted); font-size: 13px; }
#editorView .ed-banner-change { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgba(5,11,20,0.7); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.15); color: #fff; padding: 7px 12px; border-radius: 8px; font-size: 12px; cursor: pointer; display: inline-flex; gap: 6px; }
#editorView .ed-banner-change:hover { background: rgba(5,11,20,0.9); }
#editorView #edMountImg { display: none; }
#editorView #miniCal { display: none; }
#editorView .ed-lbl { display: block; font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 7px; }

/* Briefing: dominanter Editor + AI-Panel */
#editorView .ed-brief-row { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
#editorView .ed-tabs { display: inline-flex; gap: 4px; margin-left: auto; }
#editorView .ed-tab { font-size: 13px; padding: 6px 12px; color: var(--text-dim); cursor: pointer; background: none; border: none; display: inline-flex; align-items: center; gap: 6px; }
#editorView .ed-tab.active { color: var(--accent); border-bottom: 2px solid var(--accent); }
#editorView .ed-brief-row { align-items: stretch; }
#editorView .ed-brief-editor { display: flex; flex-direction: column; }
#editorView #edMountDesc { flex: 1; display: flex; flex-direction: column; }
#editorView .ed-desc-group { flex: 1; display: flex; flex-direction: column; margin-bottom: 0; }
#editorView .ed-desc-group > label { display: none; }
#editorView #mDesc { width: 100%; flex: 1; min-height: 380px; resize: vertical; }
#editorView #bfPreview { flex: 1; min-height: 380px; padding: 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-dark); font-size: 14px; color: var(--text-dim); white-space: pre-wrap; }
#editorView .ed-bf-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; margin-bottom: 10px; background: var(--bg-dark); border: 1px solid var(--border); border-radius: 8px; }
#editorView .ed-bf-toolbar button { background: none; border: none; color: var(--text-dim); width: 32px; height: 30px; border-radius: 6px; cursor: pointer; font-size: 13px; }
#editorView .ed-bf-toolbar button:hover { background: rgba(255,255,255,0.08); color: var(--text); }
#editorView .ed-bf-toolbar .sep { width: 1px; background: var(--border); margin: 4px 4px; }
#editorView .ed-ai { background: rgba(31,168,255,0.05); border: 1px solid rgba(31,168,255,0.18); border-radius: 14px; padding: 16px; }
#editorView .ed-ai-h { font-size: 13px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
#editorView .ed-ai-h .beta { font-size: 9px; letter-spacing: 1px; background: var(--accent); color: #04121c; padding: 2px 6px; border-radius: 4px; }
#editorView .ed-ai-sub { font-size: 12px; color: var(--text-muted); margin: 0 0 12px; }
#editorView .ed-ai-btn { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 10px 12px; margin-bottom: 7px; border-radius: 10px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07); color: var(--text-dim); font-size: 12.5px; cursor: pointer; }
#editorView .ed-ai-btn:hover { background: rgba(31,168,255,0.12); color: var(--text); border-color: rgba(31,168,255,0.3); }
#editorView .ed-ai-toggle { margin-top: 12px; margin-bottom: 0; }
#editorView .ed-ai-btn.on { background: var(--accent); color: #04121c; border-color: var(--accent); font-weight: 600; }
#editorView .ed-ai-btn.on:hover { background: var(--accent); color: #04121c; }

/* Untere 3 Panels (kompakt) */
#editorView .ed-cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; align-items: stretch; }
#editorView .ed-cols3 .ed-panel { padding: 20px; }
#editorView .ed-cols3 .ed-panel-title { font-size: 15px; margin-bottom: 14px; }

/* Formular-Normalisierung im Editor */
#editorView .form-group { margin-bottom: 16px; }
#editorView label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 7px; }
#editorView input[type=text], #editorView input[type=url], #editorView input[type=number],
#editorView input[type=datetime-local], #editorView input[type=time],
#editorView select, #editorView textarea {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px; color: var(--text); font-size: 14px; padding: 11px 13px; font-family: inherit;
}
#editorView textarea { line-height: 1.6; }
#editorView input:focus, #editorView select:focus, #editorView textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-dim, rgba(31,168,255,0.15)); }
#editorView input[type=datetime-local], #editorView input[type=time], #editorView input[type=number], #editorView select { color-scheme: dark; }
#editorView select option { background: #0d1625; color: #fff; }
#editorView .hint { font-size: 11px; color: var(--text-muted); margin-top: 5px; }
#editorView .ed-cols3 label { font-size: 10.5px; margin-bottom: 5px; }
#editorView .ed-cols3 input[type=text], #editorView .ed-cols3 input[type=url], #editorView .ed-cols3 input[type=number],
#editorView .ed-cols3 input[type=datetime-local], #editorView .ed-cols3 input[type=time], #editorView .ed-cols3 select { padding: 8px 10px; font-size: 12.5px; }
#editorView .ed-cols3 .form-group { margin-bottom: 11px; }

/* Anforderungen: schlichte Checkbox-Liste untereinander */
#editorView #mReqChips { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
#editorView .req-item { display: flex; align-items: center; gap: 8px; padding: 4px 2px; font-size: 12.5px; color: var(--text-dim); cursor: pointer; text-transform: none; letter-spacing: 0; font-weight: 400; }
#editorView .req-item:hover { color: var(--text); }
#editorView .req-item.on { color: var(--text); }
#editorView .req-item input[type=checkbox] { accent-color: var(--accent); width: auto; margin: 0; flex-shrink: 0; }
#editorView .req-item span { flex: 1; }
#editorView .req-link { color: var(--accent); text-decoration: none; flex-shrink: 0; }
#editorView .req-custom-row input { padding: 8px 10px; font-size: 12px; }

/* Optionen: Checkbox-Reihen untereinander, normale Schrift.
   Die Original-Labels tragen Inline-Styles (margin:0, gap:24px am Container) -> !important noetig. */
#editorView #moduleSection > div:first-child { display: flex !important; flex-direction: column; align-items: flex-start !important; gap: 9px !important; margin-bottom: 4px !important; }
#editorView #moduleSection > div:first-child label,
#editorView .taclink-section label, #editorView .underdog-check { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 12.5px; color: var(--text-dim); }
#editorView #moduleSection > div:first-child label { margin: 0 !important; }

/* Modul-/Rollen-Panel in voller Breite */
#editorView #modulePanel { margin-top: 20px; }
#editorView #modulePanel .module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
#editorView #modulePanel .sides-container.active { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
#editorView #modulePanel .single-modules.hidden { display: none; }

/* Sidebar: Missionsvorschau */
#editorView .ed-prev-row { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
#editorView .ed-prev-row:last-child { border-bottom: none; }
#editorView .ed-prev-ico { color: var(--accent); flex-shrink: 0; margin-top: 1px; }
#editorView .ed-prev-lbl { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
#editorView .ed-prev-val { font-size: 14px; color: var(--text); margin-top: 2px; word-break: break-word; }
#editorView .ed-prev-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
#editorView .ed-prev-chip { font-size: 11px; padding: 3px 9px; border-radius: 6px; background: var(--accent-dim, rgba(31,168,255,0.15)); color: var(--accent); }

/* Sidebar: Validierung */
#editorView .ed-ring-wrap { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
#editorView .ed-ring { width: 72px; height: 72px; flex-shrink: 0; }
#editorView .ed-ring-txt { font-size: 14px; font-weight: 700; color: var(--text); }
#editorView .ed-ring-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
#editorView .ed-check { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 6px 0; color: var(--text-dim); }
#editorView .ed-check .ic { width: 18px; height: 18px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 11px; }
#editorView .ed-check.ok .ic { background: rgba(40,209,124,0.18); color: var(--success, #28d17c); }
#editorView .ed-check.warn .ic { background: rgba(255,182,72,0.18); color: var(--warning, #ffb648); }
#editorView .ed-check.ok { color: var(--text); }

/* Responsive */
@media (max-width: 1100px) {
  #editorView .ed-grid { grid-template-columns: 1fr; }
  #editorView .ed-side { position: static; }
  #editorView .ed-brief-row { grid-template-columns: 1fr; }
  #editorView .ed-cols3 { grid-template-columns: 1fr; }
  #editorView .ed-mission-row { grid-template-columns: 1fr; }
  #editorView .ed-title h1 { font-size: 32px; }
}

/* ===== AI-Assist: Ergebnis-Vorschau im Panel ===== */
#editorView #aiResult { margin-top: 10px; border: 1px solid rgba(31,168,255,0.3); border-radius: 10px; background: rgba(5,11,20,0.5); overflow: hidden; }
#editorView .ed-ai-result-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--accent); border-bottom: 1px solid rgba(31,168,255,0.18); }
#editorView .ed-ai-x { background: none; border: none; color: var(--text-muted); font-size: 16px; cursor: pointer; line-height: 1; padding: 0 2px; }
#editorView .ed-ai-x:hover { color: var(--text); }
#editorView .ed-ai-result-body { padding: 10px; font-size: 12.5px; line-height: 1.55; color: var(--text-dim); white-space: pre-wrap; max-height: 320px; overflow-y: auto; }
#editorView .ed-ai-result-actions { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid rgba(31,168,255,0.18); }
#editorView .ed-ai-result-actions .btn { padding: 6px 10px; font-size: 12px; }
#editorView .ed-ai-undo { display: block; width: 100%; background: none; border: none; color: var(--accent); font-size: 12px; cursor: pointer; padding: 8px 10px; text-align: left; border-top: 1px solid rgba(31,168,255,0.18); }
#editorView .ed-ai-undo:hover { text-decoration: underline; }
#editorView .ed-ai-spin { display: inline-block; width: 12px; height: 12px; border: 2px solid rgba(31,168,255,0.3); border-top-color: var(--accent); border-radius: 50%; animation: edspin .8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes edspin { to { transform: rotate(360deg); } }
#editorView .ed-ai-dates { display: flex; flex-direction: column; gap: 6px; }
#editorView .ed-ai-date { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 9px 11px; border-radius: 8px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); color: var(--text); font-size: 12.5px; cursor: pointer; }
#editorView .ed-ai-date:hover { border-color: var(--accent); background: rgba(31,168,255,0.1); }
#editorView .ed-ai-date span { font-size: 11px; color: var(--success, #28d17c); white-space: nowrap; }
#editorView .ed-ai-hint { font-size: 11px; color: var(--text-muted); margin: 8px 0 0; }

/* ===== Briefing-Umbau: Tabs mittig, Tab-Inhalte volle Breite ===== */
#editorView .ed-brief-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
#editorView .ed-brief-head .ed-brief-t { justify-self: start; }
#editorView .ed-brief-head .ed-tabs { justify-self: center; margin: 0; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 4px; gap: 2px; }
#editorView .ed-brief-head .ed-tab { padding: 7px 16px; border-radius: 7px; border-bottom: none; font-size: 13px; }
#editorView .ed-brief-head .ed-tab.active { background: var(--accent-dim, rgba(31,168,255,0.15)); color: var(--accent); border-bottom: none; }
#editorView .ed-brief-sp { justify-self: end; }

/* Freundlichere Texteingabe */
#editorView #mDesc { flex: 0 0 auto; height: 180px; min-height: 130px; max-height: 75vh; resize: vertical; overflow-y: auto; font-size: 14.5px; line-height: 1.75; padding: 16px 18px; border-radius: 12px; background: rgba(0,0,0,0.22); }
#editorView #mDesc::placeholder { color: var(--text-muted); }
#editorView .ed-bf-toolbar { border-radius: 10px; padding: 6px 8px; align-items: center; }
#editorView .ed-bf-hint { margin-left: auto; font-size: 11px; color: var(--text-muted); padding-right: 4px; }

/* Vorschau = gerenderte Anzeige (identisch zum Missionsdetail im new-Skin) */
#editorView #bfPreview { white-space: normal; min-height: 180px; padding: 18px 20px; border-radius: 12px; background: rgba(0,0,0,0.22); }
#editorView .ed-bf-empty { color: var(--text-muted); font-size: 13px; }
.md-body { font-size: 14.5px; line-height: 1.75; color: var(--text-dim); }
.md-body h3, .md-body h4, .md-body h5 { color: var(--text); margin: 18px 0 8px; letter-spacing: .3px; }
.md-body h3:first-child, .md-body h4:first-child, .md-body h5:first-child { margin-top: 0; }
.md-body h3 { font-size: 17px; } .md-body h4 { font-size: 15.5px; } .md-body h5 { font-size: 14px; }
.md-body h3, .md-body h4 { padding-left: 10px; border-left: 3px solid var(--accent); }
.md-body p { margin: 0 0 12px; }
.md-body ul { margin: 0 0 12px; padding-left: 22px; }
.md-body li { margin: 4px 0; }
.md-body blockquote { margin: 0 0 12px; padding: 8px 14px; border-left: 3px solid var(--accent); background: rgba(31,168,255,0.07); border-radius: 0 8px 8px 0; }
.md-body strong { color: var(--text); }
.md-body a { color: var(--accent); }

/* ===== AI Assistent: Auslöse-Button (rechts im Briefing-Kopf) ===== */
#editorView .ed-ai-open {
  justify-self: end; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
  background: var(--accent-dim, rgba(31,168,255,0.15)); color: var(--accent);
  border: 1px solid rgba(31,168,255,0.4);
}
#editorView .ed-ai-open:hover { background: var(--accent); color: #04121c; border-color: var(--accent); }

/* ===== AI Assistent: rutscht rechts IM Briefing-Bereich rein (im Panel verankert) ===== */
#editorView .ed-brief-panel { position: relative; overflow: hidden; }
#editorView .ed-panel.ai-open { min-height: 480px; }
.ai-drawer-back {
  position: absolute; inset: 0; z-index: 5; background: rgba(2,6,12,0.5);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease;
}
.ai-drawer-back.open { opacity: 1; visibility: visible; }
.ai-drawer {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 6; width: 380px; max-width: 100%;
  background: var(--surface-1, #0d1726); border-left: 1px solid rgba(255,255,255,0.1);
  box-shadow: -20px 0 50px rgba(0,0,0,0.4);
  display: flex; flex-direction: column; padding: 18px 20px 22px;
  transform: translateX(105%); transition: transform .28s cubic-bezier(.22,.61,.36,1);
  overflow-y: auto;
}
.ai-drawer.open { transform: translateX(0); }
.ai-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ai-drawer-title { font-size: 16px; font-weight: 700; color: var(--text); display: inline-flex; align-items: center; gap: 8px; }
.ai-drawer-title .beta { font-size: 9px; letter-spacing: 1px; background: var(--accent); color: #04121c; padding: 2px 6px; border-radius: 4px; }
.ai-drawer-x { background: none; border: none; color: var(--text-muted); font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px; }
.ai-drawer-x:hover { color: var(--text); }
.ai-drawer-sub { font-size: 12.5px; color: var(--text-muted); margin: 8px 0 18px; line-height: 1.5; }
.ai-drawer-body { display: flex; flex-direction: column; gap: 9px; }
.ai-drawer-body .ed-ai-btn { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 10px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); color: var(--text-dim); font-size: 13px; cursor: pointer; }
.ai-drawer-body .ed-ai-btn:hover { background: rgba(31,168,255,0.12); color: var(--text); border-color: rgba(31,168,255,0.3); }
.ai-drawer-body .ed-ai-btn.on { background: var(--accent); color: #04121c; border-color: var(--accent); font-weight: 600; }
.ai-drawer-body .ed-ai-toggle { margin-top: 6px; }
.ai-drawer-body #aiResult { margin-top: 14px; border: 1px solid rgba(31,168,255,0.3); border-radius: 10px; background: rgba(5,11,20,0.5); overflow: hidden; }
.ai-drawer-body .ed-ai-result-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--accent); border-bottom: 1px solid rgba(31,168,255,0.18); }
.ai-drawer-body .ed-ai-x { background: none; border: none; color: var(--text-muted); font-size: 16px; cursor: pointer; line-height: 1; padding: 0 2px; }
.ai-drawer-body .ed-ai-result-body { padding: 10px; font-size: 12.5px; line-height: 1.55; color: var(--text-dim); white-space: pre-wrap; max-height: 40vh; overflow-y: auto; }
.ai-drawer-body .ed-ai-result-actions { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid rgba(31,168,255,0.18); flex-wrap: wrap; }
.ai-drawer-body .ed-ai-result-actions .btn { padding: 6px 10px; font-size: 12px; }
.ai-drawer-body .ed-ai-undo { display: block; width: 100%; background: none; border: none; color: var(--accent); font-size: 12px; cursor: pointer; padding: 8px 10px; text-align: left; border-top: 1px solid rgba(31,168,255,0.18); }
.ai-drawer-body .ed-ai-dates { display: flex; flex-direction: column; gap: 6px; }
.ai-drawer-body .ed-ai-date { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 9px 11px; border-radius: 8px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); color: var(--text); font-size: 12.5px; cursor: pointer; }
.ai-drawer-body .ed-ai-date:hover { border-color: var(--accent); background: rgba(31,168,255,0.1); }
.ai-drawer-body .ed-ai-date span { font-size: 11px; color: var(--success, #28d17c); white-space: nowrap; }
.ai-drawer-body .ed-ai-hint { font-size: 11px; color: var(--text-muted); margin: 8px 0 0; }
.ai-drawer-body .ed-ai-spin { display: inline-block; width: 12px; height: 12px; border: 2px solid rgba(31,168,255,0.3); border-top-color: var(--accent); border-radius: 50%; animation: edspin .8s linear infinite; vertical-align: -2px; margin-right: 6px; }

@media (max-width: 1100px) {
  #editorView .ed-brief-head { grid-template-columns: auto 1fr; justify-items: start; gap: 10px 14px; }
  #editorView .ed-brief-head .ed-tabs { justify-self: start; }
  #editorView .ed-ai-open { justify-self: end; }
}

/* ===== Modul-Anzahl deutlicher sichtbar (war zu klein/unscheinbar) ===== */
#editorView #modulePanel .module-grid { grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); }
#editorView .module-role-row { gap: 6px; }
#editorView .module-role-row select.module-role-select { flex: 1 1 auto; width: auto !important; min-width: 0; }
#editorView .module-role-row > span { font-size: 13px !important; color: var(--text-dim) !important; }
#editorView .module-role-row input.module-count {
  width: 46px !important; min-width: 46px; max-width: 46px; height: 32px;
  font-size: 14px; font-weight: 600; padding: 4px 4px; text-align: center;
  color: var(--text); background: var(--bg-dark); border: 1px solid var(--accent);
  border-radius: 6px; -moz-appearance: textfield;
}
#editorView .module-role-row .role-btn { width: 26px !important; min-width: 26px; height: 32px; font-size: 16px; }
