/* =====================================================================
   Norynex · Admin Console & Nexa Studio  —  v2 Design
   Prefixe:  .ax-*  = Admin Panel   ·   .nx-*  = Nexa Hilfe (Creator Studio)
   Nutzt die Theme-Variablen aus style.css (Dark + Light Mode).
   ===================================================================== */

:root {
  --ax-surface: rgba(24, 21, 30, 0.72);
  --ax-surface-2: rgba(255, 255, 255, 0.025);
  --ax-line: rgba(255, 255, 255, 0.07);
  --ax-line-strong: rgba(255, 255, 255, 0.12);
  --ax-text-dim: #9a94a6;
  --ax-mono: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --ax-green: #22c55e;
  --ax-amber: #f59e0b;
  --ax-red: #ef4444;
  --ax-blue: #3b82f6;
  --ax-cyan: #06b6d4;
  --ax-violet: #a83bff;
  --ax-pink: #a83bff;
  --ax-grad: var(--accent);
  --ax-radius: 16px;
  --ax-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 10px 30px -12px rgba(0,0,0,0.55);
}
[data-theme="light"] {
  --ax-surface: rgba(255, 255, 255, 0.9);
  --ax-surface-2: rgba(20, 20, 40, 0.025);
  --ax-line: rgba(20, 20, 40, 0.08);
  --ax-line-strong: rgba(20, 20, 40, 0.14);
  --ax-text-dim: #645e70;
  --ax-shadow: 0 1px 2px rgba(20,20,40,0.04), 0 8px 24px -12px rgba(20,20,40,0.14);
}

/* ---------- Shell ---------- */
.ax-shell {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: 22px;
  max-width: 1480px;
  margin: 0 auto;
  align-items: start;
}
.ax-side {
  position: sticky;
  top: calc(var(--header-h) + 12px);
  max-height: calc(100vh - var(--header-h) - 24px);
  overflow-y: auto;
  scrollbar-width: thin;
  background: var(--ax-surface);
  border: 1px solid var(--ax-line);
  border-radius: 20px;
  padding: 16px 12px;
  backdrop-filter: blur(14px);
  box-shadow: var(--ax-shadow);
}
.ax-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 16px; border-bottom: 1px solid var(--ax-line); margin-bottom: 12px; }
.ax-brand-mark {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--ax-grad); color: #fff; font-size: 16px;
  box-shadow: 0 6px 20px -6px rgba(0,0,0,0.35);
}
.ax-brand-title { font-weight: 800; font-size: 15px; letter-spacing: -0.02em; color: var(--text-primary); line-height: 1.1; }
.ax-brand-sub { font-size: 11px; color: var(--ax-text-dim); font-family: var(--ax-mono); margin-top: 2px; }

.ax-nav-group { margin: 14px 0 4px; padding: 0 10px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ax-text-dim); opacity: 0.8; }
.ax-nav-item {
  width: 100%; display: flex; align-items: center; gap: 11px; padding: 9px 10px; margin: 1px 0;
  border-radius: 11px; color: var(--text-secondary); font-size: 13.5px; font-weight: 600; text-align: left;
  transition: background .15s, color .15s; position: relative;
}
.ax-nav-item i { width: 18px; text-align: center; font-size: 13.5px; opacity: 0.85; }
.ax-nav-item:hover { background: var(--ax-surface-2); color: var(--text-primary); }
.ax-nav-item.is-active { background: linear-gradient(rgba(168,59,255,0.22),rgba(168,59,255,0.22)); color: var(--text-primary); }
.ax-nav-item.is-active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ax-grad); }
.ax-nav-item.is-active i { color: var(--purple-light); opacity: 1; }
.ax-nav-count { margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: 99px; font-size: 10.5px; font-weight: 800; text-align: center; font-family: var(--ax-mono); background: var(--ax-surface-2); color: var(--ax-text-dim); border: 1px solid var(--ax-line); }
.ax-nav-count.is-hot { background: rgba(239,68,68,0.16); color: #f87171; border-color: rgba(239,68,68,0.35); }

.ax-side-foot { margin-top: 16px; padding: 12px 10px 4px; border-top: 1px solid var(--ax-line); font-size: 11.5px; color: var(--ax-text-dim); display: grid; gap: 6px; }
.ax-side-foot .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ax-side-foot b { font-family: var(--ax-mono); color: var(--text-primary); font-weight: 700; }

/* ---------- Main + Topbar ---------- */
.ax-main { min-width: 0; }
.ax-topbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; margin-bottom: 18px;
  background: var(--ax-surface); border: 1px solid var(--ax-line); border-radius: 18px; backdrop-filter: blur(14px);
  box-shadow: var(--ax-shadow);
}
.ax-crumbs { display: flex; flex-direction: column; min-width: 0; }
.ax-crumbs small { font-size: 11px; color: var(--ax-text-dim); font-weight: 600; letter-spacing: 0.04em; }
.ax-crumbs h1 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.025em; color: var(--text-primary); display: flex; align-items: center; gap: 10px; }
.ax-top-spacer { flex: 1; }
.ax-search {
  display: flex; align-items: center; gap: 8px; min-width: 240px; padding: 8px 12px; border-radius: 12px;
  background: var(--ax-surface-2); border: 1px solid var(--ax-line); color: var(--ax-text-dim); font-size: 13px; cursor: pointer;
  transition: border-color .15s;
}
.ax-search:hover { border-color: var(--ax-line-strong); }
.ax-kbd { margin-left: auto; font-family: var(--ax-mono); font-size: 10.5px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--ax-line-strong); color: var(--ax-text-dim); }
.ax-live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--ax-text-dim); padding: 7px 11px; border-radius: 10px; border: 1px solid var(--ax-line); font-family: var(--ax-mono); }
.ax-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ax-green); box-shadow: 0 0 0 0 rgba(34,197,94,0.6); animation: axPing 2s infinite; flex-shrink: 0; }
.ax-dot.is-off { background: var(--ax-text-dim); animation: none; }
.ax-dot.is-warn { background: var(--ax-amber); }
.ax-dot.is-bad { background: var(--ax-red); }
@keyframes axPing { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.55); } 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

.ax-icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--ax-line); color: var(--text-secondary); background: var(--ax-surface-2); transition: all .15s; flex-shrink: 0;
}
.ax-icon-btn:hover { color: var(--text-primary); border-color: var(--ax-line-strong); }
.ax-icon-btn.is-on { color: var(--purple-light); border-color: rgba(168,59,255,0.45); background: rgba(168,59,255,0.12); }
.ax-icon-btn.is-spinning i { animation: axSpin .8s linear infinite; }
@keyframes axSpin { to { transform: rotate(360deg); } }

/* ---------- Buttons / Inputs ---------- */
.ax-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px; border-radius: 11px;
  font-size: 13px; font-weight: 700; border: 1px solid var(--ax-line-strong); color: var(--text-primary); background: var(--ax-surface-2);
  transition: transform .1s, filter .15s, border-color .15s, background .15s; white-space: nowrap;
}
.ax-btn:hover { border-color: rgba(168,59,255,0.45); }
.ax-btn:active { transform: translateY(1px); }
.ax-btn:disabled { opacity: .5; cursor: not-allowed; }
.ax-btn--primary { background: var(--ax-grad); border-color: transparent; color: #fff; box-shadow: 0 8px 22px -10px rgba(0,0,0,0.35); }
.ax-btn--primary:hover { filter: brightness(1.1); border-color: transparent; }
.ax-btn--danger { background: rgba(239,68,68,0.12); color: #f87171; border-color: rgba(239,68,68,0.35); }
.ax-btn--danger:hover { background: rgba(239,68,68,0.2); border-color: rgba(239,68,68,0.55); }
.ax-btn--ghost { background: transparent; border-color: transparent; color: var(--text-secondary); }
.ax-btn--ghost:hover { background: var(--ax-surface-2); color: var(--text-primary); border-color: var(--ax-line); }
.ax-btn--sm { padding: 6px 10px; font-size: 12px; border-radius: 9px; }

.ax-input, .ax-select, .ax-textarea {
  width: 100%; background: var(--ax-surface-2); border: 1px solid var(--ax-line-strong); border-radius: 11px;
  padding: 10px 13px; color: var(--text-primary); font-size: 13.5px; transition: border-color .15s, box-shadow .15s;
}
.ax-input:focus, .ax-select:focus, .ax-textarea:focus { border-color: rgba(168,59,255,0.6); box-shadow: 0 0 0 3px rgba(0,0,0,0.07); }
.ax-textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
.ax-select { cursor: pointer; }
.ax-select option { background: var(--bg-card); color: var(--text-primary); }
.ax-label { display: block; font-size: 12px; font-weight: 700; color: var(--text-secondary); margin: 0 0 6px; }
.ax-hint { font-size: 11.5px; color: var(--ax-text-dim); margin-top: 6px; }
.ax-field { margin-bottom: 14px; }
.ax-input-icon { position: relative; }
.ax-input-icon i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ax-text-dim); font-size: 12.5px; pointer-events: none; }
.ax-input-icon .ax-input { padding-left: 34px; }

/* Segmented control / chips */
.ax-seg { display: inline-flex; gap: 3px; padding: 3px; background: var(--ax-surface-2); border: 1px solid var(--ax-line); border-radius: 11px; flex-wrap: wrap; }
.ax-seg button { padding: 6px 11px; border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--ax-text-dim); display: inline-flex; align-items: center; gap: 6px; }
.ax-seg button:hover { color: var(--text-primary); }
.ax-seg button.is-active { background: var(--bg-card); color: var(--text-primary); box-shadow: 0 2px 8px rgba(0,0,0,0.25); }
.ax-seg button .n { font-family: var(--ax-mono); font-size: 10.5px; opacity: .75; }

.ax-switch { position: relative; width: 38px; height: 22px; flex-shrink: 0; display: inline-block; }
.ax-switch input { opacity: 0; width: 0; height: 0; }
.ax-switch span { position: absolute; inset: 0; background: var(--ax-line-strong); border-radius: 99px; transition: .2s; cursor: pointer; }
.ax-switch span::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.ax-switch input:checked + span { background: var(--purple-main); }
.ax-switch input:checked + span::before { transform: translateX(16px); }

/* ---------- Cards / Grid ---------- */
.ax-grid { display: grid; gap: 16px; }
.ax-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ax-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ax-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ax-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ax-grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.ax-card {
  background: var(--ax-surface); border: 1px solid var(--ax-line); border-radius: var(--ax-radius);
  padding: 18px; box-shadow: var(--ax-shadow); min-width: 0; position: relative;
}
.ax-card--flush { padding: 0; overflow: hidden; }
.ax-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.ax-card-head h3 { margin: 0; font-size: 14.5px; font-weight: 800; letter-spacing: -0.01em; color: var(--text-primary); display: flex; align-items: center; gap: 9px; }
.ax-card-head h3 i { color: var(--purple-light); font-size: 13px; }
.ax-card-head p { margin: 2px 0 0; font-size: 12px; color: var(--ax-text-dim); }
.ax-card-head .ax-top-spacer { flex: 1; }
.ax-card--flush .ax-card-head { padding: 16px 18px 0; }

/* KPI */
.ax-kpi { padding: 16px 16px 12px; overflow: hidden; }
.ax-kpi-top { display: flex; align-items: center; gap: 10px; }
.ax-kpi-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 14px; flex-shrink: 0; }
.ax-kpi-label { font-size: 12px; font-weight: 700; color: var(--ax-text-dim); }
.ax-kpi-val { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; margin: 12px 0 2px; color: var(--text-primary); font-variant-numeric: tabular-nums; line-height: 1; }
.ax-kpi-foot { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ax-text-dim); }
.ax-delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; font-family: var(--ax-mono); font-size: 11px; padding: 1px 6px; border-radius: 6px; }
.ax-delta.up { color: #4ade80; background: rgba(34,197,94,0.12); }
.ax-delta.down { color: #f87171; background: rgba(239,68,68,0.12); }
.ax-delta.flat { color: var(--ax-text-dim); background: var(--ax-surface-2); }
.ax-kpi svg.ax-spark { display: block; width: 100%; height: 38px; margin-top: 10px; }

/* Mini-Stats */
.ax-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.ax-mini > div { padding: 12px 13px; border-radius: 12px; background: var(--ax-surface-2); border: 1px solid var(--ax-line); }
.ax-mini b { display: block; font-size: 19px; font-weight: 800; color: var(--text-primary); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.ax-mini span { font-size: 11.5px; color: var(--ax-text-dim); font-weight: 600; }
.ax-mini--tight { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ax-mini--tight > div { padding: 10px; }
.ax-mini--tight b { font-size: 15px; white-space: nowrap; }
.ax-mini--tight span { font-size: 10.5px; }

/* Charts */
.ax-chart { width: 100%; height: 240px; display: block; overflow: visible; }
.ax-chart .grid line { stroke: var(--ax-line); stroke-dasharray: 3 4; }
.ax-chart .axis text { fill: var(--ax-text-dim); font-size: 10.5px; font-family: var(--ax-mono); }
.ax-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-secondary); font-weight: 600; }
.ax-legend span { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.ax-legend span.is-off { opacity: 0.35; }
.ax-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.ax-tip {
  position: fixed; z-index: 10050; pointer-events: none; padding: 9px 11px; border-radius: 10px; font-size: 12px;
  background: rgba(12,12,18,0.96); border: 1px solid rgba(255,255,255,0.1); color: #f5f3f8; box-shadow: 0 10px 30px rgba(0,0,0,.4);
  min-width: 140px; display: none;
}
.ax-tip b { display: block; font-family: var(--ax-mono); font-size: 11px; color: #a1a1b5; margin-bottom: 5px; font-weight: 400; }
.ax-tip div { display: flex; align-items: center; gap: 7px; justify-content: space-between; }
.ax-tip div span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.ax-tip i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

.ax-bars { display: grid; gap: 10px; }
.ax-bar-row { display: grid; grid-template-columns: 110px 1fr minmax(44px, auto); align-items: center; gap: 10px; font-size: 12.5px; }
.ax-bar-row .name { color: var(--text-secondary); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ax-bar-track { height: 8px; border-radius: 99px; background: var(--ax-surface-2); border: 1px solid var(--ax-line); overflow: hidden; }
.ax-bar-fill { height: 100%; border-radius: 99px; background: var(--ax-grad); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.ax-bar-row .val { font-family: var(--ax-mono); font-size: 11.5px; color: var(--text-primary); text-align: right; }

/* Gauges */
.ax-gauge { display: flex; align-items: center; gap: 14px; }
.ax-gauge svg { width: 74px; height: 74px; flex-shrink: 0; transform: rotate(-90deg); }
.ax-gauge circle { fill: none; stroke-width: 7; }
.ax-gauge .track { stroke: var(--ax-line); }
.ax-gauge .val { stroke-linecap: round; transition: stroke-dashoffset .8s cubic-bezier(.2,.8,.2,1); }
.ax-gauge-meta b { display: block; font-size: 20px; font-weight: 800; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.ax-gauge-meta span { font-size: 12px; color: var(--ax-text-dim); }

/* Lists */
.ax-list { display: flex; flex-direction: column; }
.ax-list-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--ax-line); min-width: 0; }
.ax-list-item:last-child { border-bottom: none; }
.ax-list-item .grow { flex: 1; min-width: 0; }
.ax-list-item .t { font-size: 13px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-list-item .s { font-size: 11.5px; color: var(--ax-text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-list-item .r { font-family: var(--ax-mono); font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.ax-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--ax-grad); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px; }
.ax-thumb { width: 64px; aspect-ratio: 16/9; border-radius: 8px; object-fit: cover; background: var(--ax-surface-2); flex-shrink: 0; display: grid; place-items: center; color: var(--ax-text-dim); }
.ax-rank { width: 22px; font-family: var(--ax-mono); font-size: 12px; color: var(--ax-text-dim); text-align: center; flex-shrink: 0; }

/* Timeline (Audit) */
.ax-timeline { position: relative; padding-left: 18px; }
.ax-timeline::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--ax-line); border-radius: 2px; }
.ax-tl-item { position: relative; padding: 0 0 14px; }
.ax-tl-item::before { content: ''; position: absolute; left: -17px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg-card); border: 2px solid var(--purple-light); }
.ax-tl-item.is-danger::before { border-color: var(--ax-red); }
.ax-tl-item .t { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.ax-tl-item .s { font-size: 11.5px; color: var(--ax-text-dim); font-family: var(--ax-mono); }

/* Pills / badges */
.ax-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; border: 1px solid transparent; white-space: nowrap; }
.ax-pill--green { background: rgba(34,197,94,0.12); color: #4ade80; border-color: rgba(34,197,94,0.28); }
.ax-pill--amber { background: rgba(245,158,11,0.12); color: #fbbf24; border-color: rgba(245,158,11,0.3); }
.ax-pill--red { background: rgba(239,68,68,0.13); color: #f87171; border-color: rgba(239,68,68,0.32); }
.ax-pill--blue { background: rgba(59,130,246,0.13); color: #60a5fa; border-color: rgba(59,130,246,0.3); }
.ax-pill--violet { background: rgba(168,59,255,0.14); color: #dcb3ff; border-color: rgba(168,59,255,0.32); }
.ax-pill--gray { background: var(--ax-surface-2); color: var(--ax-text-dim); border-color: var(--ax-line); }
[data-theme="light"] .ax-pill--green { color: #15803d; }
[data-theme="light"] .ax-pill--amber { color: #b45309; }
[data-theme="light"] .ax-pill--red { color: #b91c1c; }
[data-theme="light"] .ax-pill--blue { color: #1d4ed8; }
[data-theme="light"] .ax-pill--violet { color: #9224ec; }
.ax-method { font-family: var(--ax-mono); font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 5px; min-width: 50px; text-align: center; display: inline-block; }
.ax-method.GET { background: rgba(59,130,246,0.14); color: #60a5fa; }
.ax-method.POST { background: rgba(34,197,94,0.14); color: #4ade80; }
.ax-method.PATCH, .ax-method.PUT { background: rgba(245,158,11,0.14); color: #fbbf24; }
.ax-method.DELETE { background: rgba(239,68,68,0.14); color: #f87171; }

/* ---------- Log Viewer ---------- */
.ax-logbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.ax-logbar .ax-input-icon { flex: 1; min-width: 200px; }
.ax-log {
  font-family: var(--ax-mono); font-size: 12px; line-height: 1.55;
  max-height: 62vh; overflow: auto; border-top: 1px solid var(--ax-line);
}
.ax-log-row {
  display: grid; grid-template-columns: 150px 74px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 8px 18px; border-bottom: 1px solid var(--ax-line); cursor: pointer; transition: background .12s;
}
.ax-log-row:hover { background: var(--ax-surface-2); }
.ax-log-row.is-new { animation: axFlash 1.6s ease-out; }
@keyframes axFlash { from { background: rgba(168,59,255,0.18); } to { background: transparent; } }
.ax-log-row .ts { color: var(--ax-text-dim); white-space: nowrap; font-size: 11.5px; }
.ax-log-row .msg { color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-log-row .msg em { font-style: normal; color: var(--ax-text-dim); }
.ax-log-row .meta { color: var(--ax-text-dim); font-size: 11px; white-space: nowrap; }
.ax-log-detail { padding: 12px 18px 16px; background: rgba(0,0,0,0.22); border-bottom: 1px solid var(--ax-line); white-space: pre-wrap; word-break: break-word; color: var(--text-secondary); font-size: 11.5px; }
[data-theme="light"] .ax-log-detail { background: rgba(20,20,40,0.04); }
.ax-level { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 6px; border-radius: 5px; text-align: center; }
.ax-level.info { color: #60a5fa; background: rgba(59,130,246,0.12); }
.ax-level.warn { color: #fbbf24; background: rgba(245,158,11,0.12); }
.ax-level.error, .ax-level.critical { color: #f87171; background: rgba(239,68,68,0.14); }
.ax-level.ok { color: #4ade80; background: rgba(34,197,94,0.12); }
.ax-status { font-weight: 700; }
.ax-status.s2 { color: #4ade80; } .ax-status.s3 { color: #60a5fa; } .ax-status.s4 { color: #fbbf24; } .ax-status.s5 { color: #f87171; }

/* ---------- Tables ---------- */
.ax-table-wrap { overflow-x: auto; }
.ax-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ax-table th { text-align: left; padding: 11px 16px; color: var(--ax-text-dim); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; border-bottom: 1px solid var(--ax-line); white-space: nowrap; background: var(--ax-surface-2); position: sticky; top: 0; }
.ax-table th.sortable { cursor: pointer; user-select: none; }
.ax-table th.sortable:hover { color: var(--text-primary); }
.ax-table td { padding: 11px 16px; border-bottom: 1px solid var(--ax-line); vertical-align: middle; color: var(--text-primary); }
.ax-table tbody tr { transition: background .12s; }
.ax-table tbody tr:hover td { background: var(--ax-surface-2); }
.ax-table tr.is-selected td { background: rgba(168,59,255,0.08); }
.ax-table .num { font-family: var(--ax-mono); font-size: 12px; text-align: right; }
.ax-check { width: 16px; height: 16px; accent-color: var(--purple-main); cursor: pointer; }
.ax-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; font-size: 12px; color: var(--ax-text-dim); flex-wrap: wrap; }
.ax-bulkbar {
  position: sticky; bottom: 16px; z-index: 5; margin-top: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 14px; background: rgba(20,16,34,0.92); border: 1px solid rgba(168,59,255,0.35);
  backdrop-filter: blur(12px); box-shadow: 0 16px 40px -12px rgba(0,0,0,0.6); color: #f5f3f8; font-size: 13px; font-weight: 700;
}
[data-theme="light"] .ax-bulkbar { background: rgba(255,255,255,0.96); color: var(--text-primary); }

/* Legacy-Inhalte (bestehende Tabs) im neuen Look */
.ax-legacy .admin-table-wrapper, .ax-legacy .admin-stat-card { background: var(--ax-surface) !important; border: 1px solid var(--ax-line) !important; border-radius: var(--ax-radius) !important; box-shadow: var(--ax-shadow); }
.ax-legacy .admin-table th { background: var(--ax-surface-2); font-size: 10.5px; letter-spacing: .08em; font-weight: 800; color: var(--ax-text-dim); border-bottom: 1px solid var(--ax-line); }
.ax-legacy .admin-table td { border-bottom: 1px solid var(--ax-line); }
.ax-legacy .admin-report-card { background: var(--ax-surface) !important; border-color: var(--ax-line) !important; border-radius: var(--ax-radius) !important; box-shadow: var(--ax-shadow); }
.ax-legacy .admin-action-btn { border-radius: 9px; padding: 6px 10px; }
.ax-legacy input[type="text"], .ax-legacy input[type="number"], .ax-legacy select, .ax-legacy textarea { border-radius: 11px !important; }

/* ---------- Drawer / Palette / Modal ---------- */
.ax-overlay { position: fixed; inset: 0; background: rgba(5,5,10,0.55); backdrop-filter: blur(4px); z-index: 10000; opacity: 0; transition: opacity .2s; }
.ax-overlay.is-open { opacity: 1; }
.ax-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); z-index: 10001;
  background: var(--bg-card); border-left: 1px solid var(--ax-line-strong); box-shadow: -20px 0 60px rgba(0,0,0,0.45);
  transform: translateX(100%); transition: transform .28s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column;
}
.ax-drawer.is-open { transform: translateX(0); }
.ax-drawer-head { padding: 18px 20px; border-bottom: 1px solid var(--ax-line); display: flex; align-items: center; gap: 12px; }
.ax-drawer-body { padding: 18px 20px 28px; overflow-y: auto; flex: 1; }
.ax-drawer-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.ax-drawer-hero .ax-avatar { width: 58px; height: 58px; font-size: 20px; }
.ax-kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; font-size: 12.5px; margin: 8px 0 16px; }
.ax-kv dt { color: var(--ax-text-dim); font-weight: 600; }
.ax-kv dd { margin: 0; color: var(--text-primary); font-family: var(--ax-mono); font-size: 12px; word-break: break-all; }
.ax-section-title { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ax-text-dim); margin: 18px 0 8px; }

.ax-palette {
  position: fixed; left: 50%; top: 12vh; transform: translateX(-50%) scale(.97); width: min(620px, calc(100vw - 32px)); z-index: 10001;
  background: var(--bg-card); border: 1px solid var(--ax-line-strong); border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  overflow: hidden; opacity: 0; transition: opacity .15s, transform .15s;
}
.ax-palette.is-open { opacity: 1; transform: translateX(-50%) scale(1); }
.ax-palette input { width: 100%; border: none; background: transparent; padding: 18px 20px; font-size: 16px; color: var(--text-primary); border-bottom: 1px solid var(--ax-line); }
.ax-palette-list { max-height: 50vh; overflow-y: auto; padding: 8px; }
.ax-palette-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; color: var(--text-secondary); text-align: left; }
.ax-palette-item i { width: 18px; text-align: center; color: var(--ax-text-dim); }
.ax-palette-item small { margin-left: auto; font-size: 11px; color: var(--ax-text-dim); }
.ax-palette-item.is-active { background: rgba(168,59,255,0.16); color: var(--text-primary); }
.ax-palette-item.is-active i { color: var(--purple-light); }

.ax-empty { text-align: center; padding: 48px 20px; color: var(--ax-text-dim); font-size: 13px; }
.ax-empty i { font-size: 28px; display: block; margin-bottom: 10px; opacity: .6; }
.ax-skel { background: linear-gradient(90deg, var(--ax-surface-2) 0%, rgba(255,255,255,0.06) 50%, var(--ax-surface-2) 100%); background-size: 200% 100%; animation: axSkel 1.2s infinite; border-radius: 12px; }
@keyframes axSkel { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.ax-fade-in { animation: axIn .35s cubic-bezier(.2,.8,.2,1) both; }
@keyframes axIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Broadcast Vorschau */
.ax-preview-notif { display: flex; gap: 12px; padding: 14px; border-radius: 14px; background: var(--ax-surface-2); border: 1px solid var(--ax-line); }
.ax-preview-notif .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--ax-grad); color: #fff; flex-shrink: 0; }
.ax-preview-notif b { display: block; font-size: 13.5px; color: var(--text-primary); }
.ax-preview-notif p { margin: 3px 0 0; font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; word-break: break-word; }

/* Seitenbanner (öffentlich) */
#nx-site-banner {
  position: fixed; z-index: 9000; left: 50%; bottom: 20px; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px);
  display: flex; align-items: center; gap: 10px; padding: 11px 48px 11px 16px; border-radius: 14px; font-size: 13px; font-weight: 600; color: #fff;
  box-shadow: 0 18px 40px -12px rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.15); animation: axIn .4s cubic-bezier(.2,.8,.2,1) both;
}
#nx-site-banner.info { background: linear-gradient(var(--accent),var(--accent)); }
#nx-site-banner.success { background: linear-gradient(#059669,#059669); }
#nx-site-banner.warning { background: linear-gradient(#d97706,#d97706); }
#nx-site-banner.critical { background: linear-gradient(#dc2626,#dc2626); }
#nx-site-banner button { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,0.85); width: 28px; height: 28px; border-radius: 8px; }
#nx-site-banner button:hover { background: rgba(255,255,255,0.15); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .ax-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ax-grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ax-grid-main { grid-template-columns: minmax(0, 1fr); }
  .ax-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .ax-shell { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ax-side { position: static; max-height: none; padding: 8px; display: flex; gap: 4px; overflow-x: auto; border-radius: 14px; }
  .ax-brand, .ax-nav-group, .ax-side-foot { display: none; }
  .ax-nav-item { width: auto; flex-shrink: 0; padding: 8px 12px; }
  .ax-nav-item.is-active::before { display: none; }
  .ax-search { min-width: 0; flex: 1; }
  .ax-log-row { grid-template-columns: 1fr auto; }
  .ax-log-row .ts { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .ax-grid-4, .ax-grid-3, .ax-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .ax-grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ax-topbar { padding: 12px; }
  .ax-crumbs h1 { font-size: 17px; }
  .ax-live .lbl { display: none; }
  .ax-kv { grid-template-columns: 1fr; }
  .ax-bar-row { grid-template-columns: 80px 1fr minmax(40px, auto); }
}

/* =====================================================================
   NEXA STUDIO  (Creator Studio → Nexa Hilfe)
   ===================================================================== */
.nx-app {
  display: grid; grid-template-columns: 260px minmax(0, 1fr);
  height: calc(100vh - var(--header-h) - 150px); min-height: 560px;
  margin: -24px; border-radius: var(--radius-lg); overflow: hidden;
  background:
    linear-gradient(transparent,transparent),
    linear-gradient(transparent,transparent),
    var(--bg-card);
}
.nx-app.is-collapsed { grid-template-columns: 0 minmax(0, 1fr); }
.nx-app.is-collapsed .nx-side { opacity: 0; pointer-events: none; }

/* Sidebar */
.nx-side { border-right: 1px solid var(--ax-line); display: flex; flex-direction: column; min-width: 0; background: rgba(0,0,0,0.12); transition: opacity .2s; overflow: hidden; }
[data-theme="light"] .nx-side { background: rgba(20,20,40,0.02); }
.nx-side-head { padding: 14px 12px 10px; display: flex; flex-direction: column; gap: 10px; }
.nx-new-btn { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--ax-grad); color: #fff; font-weight: 700; font-size: 13.5px; box-shadow: 0 8px 22px -10px rgba(0,0,0,0.35); }
.nx-new-btn:hover { filter: brightness(1.08); }
.nx-new-btn kbd { margin-left: auto; font-family: var(--ax-mono); font-size: 10px; padding: 1px 5px; border-radius: 5px; background: rgba(255,255,255,0.18); }
.nx-side-search { position: relative; }
.nx-side-search i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--ax-text-dim); }
.nx-side-search input { width: 100%; padding: 8px 10px 8px 31px; border-radius: 10px; background: var(--ax-surface-2); border: 1px solid var(--ax-line); color: var(--text-primary); font-size: 12.5px; }
.nx-side-list { flex: 1; overflow-y: auto; padding: 4px 8px 12px; scrollbar-width: thin; }
.nx-side-group { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ax-text-dim); padding: 12px 8px 6px; }
.nx-conv { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 10px; font-size: 13px; color: var(--text-secondary); text-align: left; position: relative; }
.nx-conv:hover { background: var(--ax-surface-2); color: var(--text-primary); }
.nx-conv.is-active { background: rgba(168,59,255,0.16); color: var(--text-primary); }
.nx-conv .ttl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-conv .pin { color: var(--ax-amber); font-size: 10px; }
.nx-conv .act { display: none; gap: 2px; }
.nx-conv:hover .act, .nx-conv.is-active .act { display: flex; }
.nx-conv .act span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; color: var(--ax-text-dim); font-size: 11px; }
.nx-conv .act span:hover { background: var(--ax-line-strong); color: var(--text-primary); }
.nx-side-foot { padding: 12px; border-top: 1px solid var(--ax-line); }
.nx-snap { padding: 12px; border-radius: 12px; background: var(--ax-surface-2); border: 1px solid var(--ax-line); }
.nx-snap-title { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ax-text-dim); display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.nx-snap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nx-snap-grid b { display: block; font-size: 15px; font-weight: 800; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.nx-snap-grid span { font-size: 10.5px; color: var(--ax-text-dim); font-weight: 600; }

/* Main */
.nx-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.nx-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--ax-line); }
.nx-top-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nx-top-title .nx-logo { width: 34px; height: 34px; }
.nx-top-title b { font-size: 15px; font-weight: 800; color: var(--text-primary); display: block; letter-spacing: -0.01em; }
.nx-top-title small { font-size: 11.5px; color: var(--ax-text-dim); display: flex; align-items: center; gap: 6px; }
.nx-top-spacer { flex: 1; }
.nx-logo { position: relative; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(rgba(168,59,255,0.25),rgba(168,59,255,0.25)); border: 1px solid rgba(168,59,255,0.35); flex-shrink: 0; }
.nx-logo img { width: 58%; height: 58%; object-fit: contain; }
.nx-logo.is-lg { width: 64px; height: 64px; border-radius: 20px; box-shadow: 0 16px 40px -14px rgba(0,0,0,0.35); }
.nx-logo.is-sm { width: 30px; height: 30px; border-radius: 10px; }

.nx-mode { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--ax-surface-2); border: 1px solid var(--ax-line); }
.nx-mode button { padding: 5px 10px; border-radius: 7px; font-size: 11.5px; font-weight: 700; color: var(--ax-text-dim); }
.nx-mode button.is-active { background: var(--bg-card); color: var(--text-primary); box-shadow: 0 2px 6px rgba(0,0,0,.25); }

.nx-scroll { flex: 1; overflow-y: auto; min-height: 0; scroll-behavior: smooth; }
.nx-thread { max-width: 820px; margin: 0 auto; padding: 24px 22px 12px; display: flex; flex-direction: column; gap: 22px; }

/* Welcome */
.nx-welcome { max-width: 820px; margin: 0 auto; padding: 36px 22px 16px; }
.nx-hello { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.nx-hello h2 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.03em; color: var(--text-primary); line-height: 1.15; }
.nx-hello h2 span { background: var(--ax-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nx-hello p { margin: 6px 0 0; color: var(--text-secondary); font-size: 14px; }
.nx-cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.nx-cat {
  text-align: left; padding: 15px; border-radius: 16px; background: var(--ax-surface); border: 1px solid var(--ax-line);
  transition: transform .15s, border-color .15s, box-shadow .15s; display: flex; flex-direction: column; gap: 8px; min-width: 0;
}
.nx-cat:hover { transform: translateY(-2px); border-color: rgba(168,59,255,0.4); box-shadow: 0 14px 30px -18px rgba(0,0,0,0.35); }
.nx-cat.is-active { border-color: rgba(168,59,255,0.6); background: rgba(168,59,255,0.1); }
.nx-cat-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 14px; }
.nx-cat b { font-size: 13.5px; color: var(--text-primary); font-weight: 800; }
.nx-cat span { font-size: 12px; color: var(--ax-text-dim); line-height: 1.45; }
.nx-prompts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.nx-prompt { display: flex; align-items: center; gap: 10px; text-align: left; padding: 11px 13px; border-radius: 12px; border: 1px dashed var(--ax-line-strong); color: var(--text-secondary); font-size: 13px; transition: all .15s; min-width: 0; }
.nx-prompt i { color: var(--purple-light); font-size: 12px; flex-shrink: 0; }
.nx-prompt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-prompt:hover { border-style: solid; border-color: rgba(168,59,255,0.5); color: var(--text-primary); background: rgba(168,59,255,0.08); }

/* Messages */
.nx-msg { display: flex; gap: 12px; align-items: flex-start; animation: axIn .3s cubic-bezier(.2,.8,.2,1) both; }
.nx-msg--user { justify-content: flex-end; }
.nx-msg--user .nx-bubble { background: var(--ax-grad); color: #fff; border-radius: 18px 18px 6px 18px; padding: 11px 15px; max-width: 78%; font-size: 14px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; box-shadow: 0 10px 24px -14px rgba(0,0,0,0.35); }
.nx-msg--ai .nx-body { flex: 1; min-width: 0; }
.nx-msg--ai .nx-who { font-size: 12px; font-weight: 800; color: var(--text-primary); display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.nx-msg--ai .nx-who small { font-weight: 600; color: var(--ax-text-dim); font-family: var(--ax-mono); font-size: 10.5px; }
.nx-md { font-size: 14px; line-height: 1.7; color: var(--text-primary); word-break: break-word; }
.nx-md p { margin: 0 0 10px; }
.nx-md p:last-child { margin-bottom: 0; }
.nx-md h1, .nx-md h2, .nx-md h3 { font-size: 15px; font-weight: 800; margin: 16px 0 8px; letter-spacing: -0.01em; }
.nx-md h1:first-child, .nx-md h2:first-child, .nx-md h3:first-child { margin-top: 0; }
.nx-md ul, .nx-md ol { margin: 4px 0 12px; padding-left: 22px; }
.nx-md li { margin: 4px 0; }
.nx-md li::marker { color: var(--purple-light); }
.nx-md strong { font-weight: 800; }
.nx-md a { color: var(--purple-light); text-decoration: underline; text-underline-offset: 2px; }
.nx-md code { font-family: var(--ax-mono); font-size: 12px; background: var(--ax-surface-2); border: 1px solid var(--ax-line); padding: 1px 5px; border-radius: 5px; }
.nx-md pre { background: rgba(0,0,0,0.3); border: 1px solid var(--ax-line); border-radius: 12px; padding: 12px 14px; overflow-x: auto; margin: 8px 0 12px; }
.nx-md pre code { background: none; border: none; padding: 0; }
.nx-md blockquote { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--purple-light); background: rgba(168,59,255,0.08); border-radius: 0 10px 10px 0; color: var(--text-secondary); }
.nx-md hr { border: none; border-top: 1px solid var(--ax-line); margin: 14px 0; }
.nx-md table { border-collapse: collapse; margin: 8px 0 12px; font-size: 13px; display: block; overflow-x: auto; }
.nx-md th, .nx-md td { border: 1px solid var(--ax-line-strong); padding: 6px 10px; text-align: left; }
.nx-md th { background: var(--ax-surface-2); }
.nx-tools { display: flex; align-items: center; gap: 2px; margin-top: 8px; opacity: 0; transition: opacity .15s; }
.nx-msg--ai:hover .nx-tools, .nx-msg--ai:last-child .nx-tools { opacity: 1; }
.nx-tools button { height: 28px; min-width: 28px; padding: 0 8px; border-radius: 8px; color: var(--ax-text-dim); font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.nx-tools button:hover { background: var(--ax-surface-2); color: var(--text-primary); }
.nx-tools button.is-on { color: var(--purple-light); }
.nx-tools .sep { width: 1px; height: 16px; background: var(--ax-line); margin: 0 4px; }
.nx-follow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.nx-follow button { padding: 7px 12px; border-radius: 99px; font-size: 12.5px; border: 1px solid var(--ax-line-strong); color: var(--text-secondary); background: var(--ax-surface-2); display: inline-flex; align-items: center; gap: 6px; }
.nx-follow button:hover { color: var(--text-primary); border-color: rgba(168,59,255,0.5); }
.nx-error { display: flex; gap: 10px; align-items: center; padding: 10px 13px; border-radius: 12px; background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; font-size: 13px; }
[data-theme="light"] .nx-error { color: #b91c1c; }

.nx-typing { display: inline-flex; gap: 5px; padding: 6px 0; }
.nx-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--purple-light); animation: nexaPulse 1.1s infinite ease-in-out; }
.nx-typing span:nth-child(2) { animation-delay: .15s; } .nx-typing span:nth-child(3) { animation-delay: .3s; }
.nx-thinking-label { font-size: 12px; color: var(--ax-text-dim); margin-left: 8px; font-family: var(--ax-mono); }
.nx-caret::after { content: '▍'; color: var(--purple-light); animation: nxBlink 1s steps(2) infinite; margin-left: 1px; }
@keyframes nxBlink { 50% { opacity: 0; } }

/* Composer */
.nx-composer-wrap { padding: 10px 22px 16px; }
.nx-composer {
  max-width: 820px; margin: 0 auto; border-radius: 20px; border: 1px solid var(--ax-line-strong);
  background: var(--ax-surface); box-shadow: 0 18px 40px -24px rgba(0,0,0,0.8); transition: border-color .15s, box-shadow .15s; backdrop-filter: blur(10px);
}
.nx-composer:focus-within { border-color: rgba(168,59,255,0.55); box-shadow: 0 0 0 4px rgba(0,0,0,0.06), 0 18px 40px -24px rgba(0,0,0,0.8); }
.nx-composer textarea { width: 100%; border: none; background: transparent; resize: none; padding: 14px 16px 6px; font-size: 14.5px; line-height: 1.55; color: var(--text-primary); max-height: 200px; min-height: 26px; }
.nx-composer textarea::placeholder { color: var(--ax-text-dim); }
.nx-composer-bar { display: flex; align-items: center; gap: 6px; padding: 6px 8px 8px 10px; }
.nx-composer-bar .nx-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; color: var(--text-secondary); border: 1px solid var(--ax-line); background: var(--ax-surface-2); }
.nx-composer-bar .nx-chip:hover { color: var(--text-primary); border-color: var(--ax-line-strong); }
.nx-count { font-family: var(--ax-mono); font-size: 11px; color: var(--ax-text-dim); margin-left: auto; }
.nx-count.is-warn { color: var(--ax-amber); }
.nx-send { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--ax-grad); color: #fff; transition: filter .15s, opacity .15s; flex-shrink: 0; }
.nx-send:disabled { opacity: .35; cursor: not-allowed; }
.nx-send.is-stop { background: var(--text-primary); color: var(--bg-card); }
.nx-disclaimer { max-width: 820px; margin: 8px auto 0; text-align: center; font-size: 11px; color: var(--ax-text-dim); }
.nx-menu { position: absolute; bottom: calc(100% + 8px); left: 0; min-width: 240px; padding: 6px; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--ax-line-strong); box-shadow: 0 20px 50px rgba(0,0,0,.5); z-index: 20; }
.nx-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border-radius: 9px; font-size: 13px; color: var(--text-secondary); text-align: left; }
.nx-menu button:hover { background: var(--ax-surface-2); color: var(--text-primary); }
.nx-menu button i { width: 16px; color: var(--purple-light); }
.nx-offline { max-width: 820px; margin: 0 auto 10px; display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3); color: #fbbf24; font-size: 12.5px; }

@media (max-width: 1000px) {
  .nx-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .nx-app { grid-template-columns: minmax(0, 1fr); height: calc(100vh - var(--header-h) - 210px); min-height: 480px; margin: -16px; }
  .nx-tools button span, .nx-tools .lbl { display: none; }
  .nx-side { position: absolute; z-index: 30; top: 0; bottom: 0; left: 0; width: 280px; background: var(--bg-card); transform: translateX(-100%); transition: transform .25s; box-shadow: 20px 0 60px rgba(0,0,0,.4); }
  .nx-app { position: relative; }
  .nx-app.is-side-open .nx-side { transform: none; }
  .nx-app.is-collapsed .nx-side { opacity: 1; pointer-events: auto; }
  .nx-prompts { grid-template-columns: minmax(0, 1fr); }
  .nx-hello h2 { font-size: 22px; }
  .nx-thread, .nx-welcome { padding-left: 14px; padding-right: 14px; }
  .nx-composer-wrap { padding: 8px 10px 12px; }
  .nx-mode { display: none; }
}
@media (max-width: 520px) {
  .nx-cats { grid-template-columns: minmax(0, 1fr); }
  .nx-cat span { display: none; }
}
@media (max-width: 620px) {
  .ax-search { min-width: 0; flex: 0 0 auto; }
  .ax-search span { display: none; }
}

/* Chromecast aktiv */
.nxd-cast-btn.is-casting { color: #fff; background: linear-gradient(var(--accent),var(--accent)) !important; box-shadow: 0 0 0 3px rgba(0,0,0,0.17); }
