/* Content-Maschine – Oberfläche
   Dunkles Werkstatt-Thema, warmes Orange als Akzent, ruhige Bewegung. */

:root {
  --bg: #0F1215;
  --bg-2: #14181C;
  --panel: #1A1F24;
  --panel-2: #20262C;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #F2F0EB;
  --muted: #9AA3AB;
  --faint: #6B747C;
  --accent: #E8773C;
  --accent-2: #F2A65A;
  --accent-ink: #1A0F08;
  --ok: #3DBE7C;
  --warn: #E8B339;
  --bad: #E25555;
  --info: #5FA8F5;
  --ig: #D6336C;
  --fb: #1877F2;
  --pi: #E60023;
  --li: #0A66C2;
  --r: 14px;
  --r-s: 9px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Oswald", "Public Sans", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--bg);
  font-size: 15px; line-height: 1.5; min-height: 100vh; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, video { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::selection { background: rgba(232, 119, 60, .4); }

/* Hintergrund: zwei langsam treibende Lichtflecken auf feinem Raster */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg .grid {
  position: absolute; inset: 0; opacity: .35;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 30% 0%, #000 0%, transparent 70%);
}
.blob { position: absolute; width: 60vw; height: 60vw; max-width: 900px; max-height: 900px; border-radius: 50%; filter: blur(90px); opacity: .22; animation: drift 26s var(--ease) infinite alternate; }
.b1 { background: radial-gradient(circle, #E8773C 0%, transparent 60%); top: -20vw; left: -10vw; }
.b2 { background: radial-gradient(circle, #3B6C9E 0%, transparent 60%); bottom: -25vw; right: -15vw; animation-duration: 34s; animation-delay: -10s; }
@keyframes drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(8vw, 6vh, 0) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .blob { animation: none; } * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Grundgerüst */
.shell { position: relative; z-index: 1; display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 16px;
  border-right: 1px solid var(--line); background: rgba(15, 18, 21, .72); backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 22px; }
.mark { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent-2), var(--accent)); box-shadow: 0 6px 18px rgba(232,119,60,.35); }
.mark svg { width: 24px; height: 24px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--display); font-weight: 500; font-size: 17px; letter-spacing: .3px; }
.brand-text small { color: var(--muted); font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: var(--muted);
  transition: background .2s var(--ease), color .2s, transform .2s var(--ease); position: relative; }
.nav a:hover { background: rgba(255,255,255,.05); color: var(--text); transform: translateX(2px); }
.nav a.on { background: linear-gradient(90deg, rgba(232,119,60,.18), rgba(232,119,60,.04)); color: var(--text); }
.nav a.on::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.side-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.who-text strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-text small { color: var(--muted); font-size: 11px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--accent-2); flex: none; }

.main { min-width: 0; padding: 26px 36px 60px; }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; animation: rise .5s var(--ease) both; }
.title { font-family: var(--display); font-size: 30px; font-weight: 500; letter-spacing: .3px; text-transform: uppercase; }
.sub { color: var(--muted); margin-top: 2px; }
.top-r { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.page { animation: rise .55s var(--ease) both; animation-delay: .05s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(6px); } to { opacity: 1; transform: none; } }
.stagger > * { animation: pop .5s var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: .03s } .stagger > *:nth-child(2) { animation-delay: .07s }
.stagger > *:nth-child(3) { animation-delay: .11s } .stagger > *:nth-child(4) { animation-delay: .15s }
.stagger > *:nth-child(5) { animation-delay: .19s } .stagger > *:nth-child(6) { animation-delay: .23s }
.stagger > *:nth-child(7) { animation-delay: .27s } .stagger > *:nth-child(8) { animation-delay: .31s }
.stagger > *:nth-child(n+9) { animation-delay: .35s }

/* Bausteine */
.card { background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0)) , var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-h h2, .card-h h3 { font-family: var(--display); font-weight: 500; font-size: 18px; text-transform: uppercase; letter-spacing: .4px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.mt { margin-top: 14px; } .mb { margin-bottom: 14px; }
.sep { height: 1px; background: var(--line); margin: 16px 0; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; border: 1px dashed var(--line-2); border-radius: var(--r); }
.empty svg { width: 36px; height: 36px; margin: 0 auto 10px; color: var(--faint); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--text); cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .18s, background .18s, border-color .18s, opacity .18s; }
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-1px); background: #273038; border-color: rgba(255,255,255,.22); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.primary { background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--accent-ink); border-color: transparent; box-shadow: 0 8px 22px rgba(232,119,60,.28); }
.btn.primary:hover { box-shadow: 0 12px 28px rgba(232,119,60,.4); filter: brightness(1.04); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: rgba(255,255,255,.06); }
.btn.danger { color: #FFB1B1; border-color: rgba(226,85,85,.35); } .btn.danger:hover { background: rgba(226,85,85,.12); }
.btn.ok { color: #B8F0D0; border-color: rgba(61,190,124,.4); } .btn.ok:hover { background: rgba(61,190,124,.14); }
.btn.sm { padding: 7px 11px; font-size: 13px; border-radius: 8px; } .btn.sm svg { width: 15px; height: 15px; }
.btn.lg { padding: 13px 22px; font-size: 15px; border-radius: 12px; }
.icon-btn { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: transparent; border: 1px solid transparent; color: var(--muted); cursor: pointer; transition: all .18s; }
.icon-btn:hover { background: rgba(255,255,255,.06); color: var(--text); border-color: var(--line); }
.icon-btn svg { width: 18px; height: 18px; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); color: var(--muted); white-space: nowrap; }
.chip svg { width: 13px; height: 13px; }
.chip.ok { color: #B8F0D0; border-color: rgba(61,190,124,.4); background: rgba(61,190,124,.1); }
.chip.warn { color: #FFE2A0; border-color: rgba(232,179,57,.4); background: rgba(232,179,57,.1); }
.chip.bad { color: #FFB1B1; border-color: rgba(226,85,85,.4); background: rgba(226,85,85,.1); }
.chip.info { color: #BFE0FF; border-color: rgba(95,168,245,.4); background: rgba(95,168,245,.1); }
.chip.accent { color: #FFD9C0; border-color: rgba(232,119,60,.5); background: rgba(232,119,60,.14); }
.chip.ch { color: #fff; border: none; }
.chip.ch.instagram { background: linear-gradient(135deg, #F58529, #DD2A7B 55%, #8134AF); }
.chip.ch.facebook { background: var(--fb); }
.chip.ch.pinterest { background: var(--pi); }
.chip.ch.linkedin { background: var(--li); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--faint); }
.dot.instagram { background: var(--ig); } .dot.facebook { background: var(--fb); } .dot.pinterest { background: var(--pi); } .dot.linkedin { background: var(--li); }
.dot.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(232,119,60,.6); } 50% { box-shadow: 0 0 0 7px rgba(232,119,60,0); } }

/* Formulare */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .lbl { font-size: 12px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.field .hint { font-size: 12px; color: var(--faint); }
.input, textarea.input, select.input { width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(0,0,0,.25); color: var(--text); outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,119,60,.18); background: rgba(0,0,0,.35); }
textarea.input { resize: vertical; min-height: 90px; line-height: 1.55; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.input::placeholder { color: var(--faint); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; transition: all .18s; user-select: none; }
.check:hover { border-color: var(--line-2); background: rgba(255,255,255,.03); }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.check.on { border-color: rgba(232,119,60,.5); background: rgba(232,119,60,.08); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; }
.seg label { padding: 7px 12px; font-size: 13px; cursor: pointer; color: var(--muted); transition: all .18s; }
.seg input { display: none; }
.seg input:checked + span, .seg label.on { background: rgba(232,119,60,.18); color: var(--text); }
.seg label span { display: block; }

/* Kennzahlen */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.kpi { padding: 18px 18px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); position: relative; overflow: hidden; transition: transform .25s var(--ease), border-color .25s; }
.kpi:hover { transform: translateY(-3px); border-color: var(--line-2); }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(232,119,60,.18), transparent 70%); }
.kpi .n { font-family: var(--display); font-size: 40px; line-height: 1; font-weight: 500; letter-spacing: .5px; }
.kpi .l { color: var(--muted); font-size: 13px; margin-top: 6px; }
.kpi.accent .n { color: var(--accent-2); }

/* Dropzone */
.drop { position: relative; border: 2px dashed rgba(255,255,255,.18); border-radius: 18px; padding: 42px 24px; text-align: center; background: rgba(255,255,255,.02);
  transition: border-color .25s, background .25s, transform .25s var(--ease); cursor: pointer; overflow: hidden; }
.drop::before { content: ""; position: absolute; inset: -2px; border-radius: 20px; padding: 2px; opacity: 0; transition: opacity .3s;
  background: conic-gradient(from var(--a, 0deg), var(--accent), var(--accent-2), #3B6C9E, var(--accent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.drop.over { border-color: transparent; background: rgba(232,119,60,.08); transform: scale(1.005); }
.drop.over::before { opacity: 1; animation: spin 2.4s linear infinite; }
@property --a { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --a: 360deg; } }
.drop .ico { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(232,119,60,.25), rgba(232,119,60,.08)); color: var(--accent-2); transition: transform .3s var(--ease); }
.drop .ico svg { width: 30px; height: 30px; }
.drop.over .ico { transform: translateY(-6px) scale(1.08); }
.drop h3 { font-family: var(--display); font-weight: 500; font-size: 20px; text-transform: uppercase; letter-spacing: .4px; }
.drop p { color: var(--muted); margin-top: 6px; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop.compact { padding: 20px; display: flex; align-items: center; gap: 16px; text-align: left; }
.drop.compact .ico { margin: 0; width: 48px; height: 48px; border-radius: 13px; }
.drop.compact .ico svg { width: 22px; height: 22px; }
.drop.compact h3 { font-size: 16px; }
.uploads { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.up { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-size: 13px; animation: pop .4s var(--ease) both; }
.up .bar { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.up .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .25s; position: relative; }
.up .bar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); transform: translateX(-100%); animation: shimmer 1.3s infinite; }
.up.done .bar i::after { animation: none; }
.up.err { border-color: rgba(226,85,85,.4); }
@keyframes shimmer { to { transform: translateX(100%); } }

/* Mediathek */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 12px; flex-wrap: wrap; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.mcard { position: relative; border-radius: 12px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); aspect-ratio: 1; cursor: pointer; transition: transform .25s var(--ease), border-color .2s, box-shadow .25s; }
.mcard:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow); }
.mcard img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.mcard:hover img { transform: scale(1.04); }
.mcard .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); background: repeating-linear-gradient(135deg, rgba(255,255,255,.03) 0 10px, transparent 10px 20px); }
.mcard .ph svg { width: 34px; height: 34px; }
.mcard .ph.spin svg { animation: rot 1.4s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.mcard .meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 9px; background: linear-gradient(transparent, rgba(0,0,0,.78)); font-size: 12px; display: flex; justify-content: space-between; align-items: flex-end; gap: 6px; }
.mcard .meta .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.mcard .badges { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; justify-content: space-between; gap: 6px; pointer-events: none; }
.mcard .sel { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255,255,255,.8); background: rgba(0,0,0,.35); display: grid; place-items: center; transition: all .18s; }
.mcard .sel svg { width: 14px; height: 14px; opacity: 0; stroke-width: 3; color: var(--accent-ink); }
.mcard.selected { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,119,60,.25), var(--shadow); }
.mcard.selected .sel { background: var(--accent); border-color: var(--accent); }
.mcard.selected .sel svg { opacity: 1; }
.mcard .vid { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.5); backdrop-filter: blur(6px); display: grid; place-items: center; color: #fff; }
.mcard .vid svg { width: 20px; height: 20px; fill: #fff; stroke: none; margin-left: 2px; }
.selbar { position: sticky; bottom: 18px; z-index: 5; margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px 18px; border-radius: 14px;
  background: rgba(26,31,36,.9); border: 1px solid var(--line-2); backdrop-filter: blur(14px); box-shadow: var(--shadow); transform: translateY(20px); opacity: 0; pointer-events: none; transition: all .3s var(--ease); }
.selbar.show { transform: none; opacity: 1; pointer-events: auto; }

/* Modal (Medium-Detail) */
.modal { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(5,7,9,.7); backdrop-filter: blur(8px); }
.modal.open { display: flex; animation: fade .2s both; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal .box { width: min(1100px, 100%); max-height: 92vh; overflow: auto; border-radius: 18px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: pop .3s var(--ease) both; display: grid; grid-template-columns: 1.4fr 1fr; }
.modal .view { background: #000; display: grid; place-items: center; min-height: 420px; position: relative; }
.modal .view img, .modal .view video { max-height: 92vh; width: 100%; height: 100%; object-fit: contain; }
.modal .view .focus { position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 3px rgba(232,119,60,.8), 0 0 18px rgba(0,0,0,.6); transform: translate(-50%, -50%); pointer-events: none; }
.modal .side-p { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.modal .close { position: absolute; top: 10px; right: 10px; z-index: 2; background: rgba(0,0,0,.5); color: #fff; }

/* KI-Prüfung */
.check-box { border-radius: 10px; border: 1px solid var(--line); padding: 12px 14px; background: rgba(0,0,0,.2); font-size: 13px; }
.check-box ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }

/* Beitrag */
.chgrid { display: grid; grid-template-columns: 1.25fr .85fr; gap: 18px; margin-top: 12px; }
.post-layout { display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: start; }
.sticky { position: sticky; top: 20px; }
.media-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.media-strip .mcard { aspect-ratio: 1; }
.media-strip .mcard:first-child { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
.facts dl { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 0; }
.facts dt { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--faint); font-weight: 600; }
.facts dd { margin: 2px 0 0; white-space: pre-wrap; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 12px 14px; color: var(--muted); cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 8px; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all .18s; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.tabpane { display: none; } .tabpane.on { display: block; animation: rise .35s var(--ease) both; }
.editor { position: relative; }
.editor textarea { min-height: 320px; font-size: 15px; line-height: 1.6; padding: 16px; font-family: var(--font); }
.editor .first { position: absolute; right: 12px; top: 10px; font-size: 11px; color: var(--faint); background: rgba(0,0,0,.5); padding: 2px 8px; border-radius: 999px; }
.counts { display: flex; gap: 14px; font-size: 12px; color: var(--faint); margin-top: 8px; flex-wrap: wrap; }
.counts b { color: var(--muted); font-weight: 600; }
.lints { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.lint { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); }
.lint svg { width: 15px; height: 15px; margin-top: 2px; }
.lint.warn { color: #FFE2A0; border-color: rgba(232,179,57,.3); background: rgba(232,179,57,.07); }
.lint.error { color: #FFB1B1; border-color: rgba(226,85,85,.3); background: rgba(226,85,85,.07); }
.lint.info { color: var(--muted); }
.lint.ok { color: #B8F0D0; border-color: rgba(61,190,124,.3); background: rgba(61,190,124,.07); }
.preview { border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: #fff; color: #111; font-family: -apple-system, system-ui, sans-serif; font-size: 14px; }
.preview .ph-head { display: flex; align-items: center; gap: 10px; padding: 12px; }
.preview .ph-head .av { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #F2A65A, #E8773C); }
.preview .ph-img { aspect-ratio: 4/5; background: #eee; overflow: hidden; }
.preview .ph-img img { width: 100%; height: 100%; object-fit: cover; }
.preview .ph-img.wide { aspect-ratio: 1.91/1; }
.preview .ph-img.tall { aspect-ratio: 2/3; }
.preview .ph-txt { padding: 12px; white-space: pre-wrap; line-height: 1.45; }
.preview .ph-txt .more { color: #777; }
.skeleton { border-radius: 10px; background: linear-gradient(90deg, rgba(255,255,255,.05) 25%, rgba(255,255,255,.12) 50%, rgba(255,255,255,.05) 75%); background-size: 200% 100%; animation: sk 1.4s infinite; }
@keyframes sk { from { background-position: 200% 0 } to { background-position: -200% 0 } }
.writing { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(232,119,60,.35); background: rgba(232,119,60,.08); }
.writing .dots i { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: var(--accent-2); animation: bounce 1.2s infinite; }
.writing .dots i:nth-child(2) { animation-delay: .15s } .writing .dots i:nth-child(3) { animation-delay: .3s }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .5 } 40% { transform: translateY(-5px); opacity: 1 } }
.questions { border-left: 3px solid var(--warn); padding: 10px 14px; background: rgba(232,179,57,.07); border-radius: 0 10px 10px 0; font-size: 14px; }
.questions ul { margin: 6px 0 0; padding-left: 18px; }
.status-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }

/* Listen */
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); transition: transform .2s var(--ease), border-color .2s; }
.item:hover { transform: translateX(3px); border-color: var(--line-2); }
.item .th { width: 64px; height: 64px; border-radius: 9px; object-fit: cover; background: var(--panel-2); }
.item .th.ph { display: grid; place-items: center; color: var(--faint); }
.item .t { min-width: 0; }
.item .t strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .t small { color: var(--muted); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--faint); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:hover td { background: rgba(255,255,255,.02); }

/* Kalender */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .dow { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--faint); padding: 4px 8px; }
.cal .day { min-height: 118px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); padding: 8px; display: flex; flex-direction: column; gap: 5px; transition: border-color .2s; }
.cal .day:hover { border-color: var(--line-2); }
.cal .day.other { opacity: .4; }
.cal .day.today { border-color: rgba(232,119,60,.6); box-shadow: inset 0 0 0 1px rgba(232,119,60,.3); }
.cal .num { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; }
.cal .day.today .num { color: var(--accent-2); font-weight: 700; }
.cal .ev { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 7px; border-radius: 7px; background: rgba(255,255,255,.05); border: 1px solid var(--line); overflow: hidden; transition: transform .18s var(--ease), background .18s; }
.cal .ev:hover { transform: scale(1.03); background: rgba(255,255,255,.09); }
.cal .ev span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .ev img { width: 18px; height: 18px; border-radius: 4px; object-fit: cover; }
.cal .ev.done { opacity: .55; }

/* Toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 40px)); }
.toast { padding: 12px 16px; border-radius: 12px; background: rgba(26,31,36,.95); border: 1px solid var(--line-2); box-shadow: var(--shadow); backdrop-filter: blur(10px); font-size: 14px; display: flex; gap: 10px; align-items: flex-start; animation: toastin .35s var(--ease) both; }
.toast.out { animation: toastout .3s var(--ease) both; }
.toast.ok { border-color: rgba(61,190,124,.5); } .toast.warn { border-color: rgba(232,179,57,.5); } .toast.bad { border-color: rgba(226,85,85,.5); }
.toast svg { width: 18px; height: 18px; margin-top: 1px; }
.toast.ok svg { color: var(--ok); } .toast.warn svg { color: var(--warn); } .toast.bad svg { color: var(--bad); }
@keyframes toastin { from { opacity: 0; transform: translateY(14px) scale(.97) } to { opacity: 1; transform: none } }
@keyframes toastout { to { opacity: 0; transform: translateY(8px) } }

/* Login */
.login-wrap { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login { width: min(420px, 100%); padding: 34px; border-radius: 22px; background: rgba(26,31,36,.85); border: 1px solid var(--line-2); backdrop-filter: blur(16px); box-shadow: 0 30px 80px rgba(0,0,0,.5); animation: pop .6s var(--ease) both; }
.login .brand { padding: 0 0 22px; }
.login h1 { font-family: var(--display); font-weight: 500; font-size: 26px; text-transform: uppercase; letter-spacing: .4px; }
.login .err { margin-top: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(226,85,85,.4); background: rgba(226,85,85,.1); color: #FFB1B1; font-size: 13px; }

/* Responsive */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .post-layout { grid-template-columns: 320px 1fr; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: auto; flex-direction: row; align-items: center; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); z-index: 20; }
  .brand, .side-foot { display: none; }
  .nav { flex-direction: row; width: 100%; justify-content: space-around; gap: 0; }
  .nav a { flex-direction: column; gap: 4px; padding: 6px 8px; font-size: 10px; }
  .nav a.on::before { display: none; }
  .nav a svg { width: 22px; height: 22px; }
  .main { padding: 18px 16px 96px; }
  .title { font-size: 24px; }
  .top { flex-direction: column; align-items: flex-start; gap: 12px; }
  .grid-2, .grid-3, .grid-4, .form-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .post-layout, .chgrid { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .page { overflow-x: clip; }
  .selbar { flex-wrap: wrap; }
  .selbar .btn.primary { width: 100%; }
  .tabs form { margin-left: 0 !important; }
  .modal .box { grid-template-columns: 1fr; }
  .modal .view { min-height: 260px; }
  .cal .day { min-height: 70px; padding: 5px; }
  .cal .ev span { display: none; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .item { grid-template-columns: 52px 1fr; }
  .item .act { grid-column: 1 / -1; }
}

/* Passkeys */
.pk-btn { width: 100%; justify-content: center; gap: 10px; }
.pk-btn svg { width: 20px; height: 20px; }
.pk-btn.busy { opacity: .7; pointer-events: none; }
.card.glow { border-color: rgba(232,119,60,.6); box-shadow: 0 0 0 1px rgba(232,119,60,.35), 0 20px 60px rgba(232,119,60,.12); animation: glowpulse 2.4s ease-in-out infinite; }
@keyframes glowpulse { 0%,100% { box-shadow: 0 0 0 1px rgba(232,119,60,.35), 0 20px 60px rgba(232,119,60,.10); } 50% { box-shadow: 0 0 0 2px rgba(232,119,60,.55), 0 20px 70px rgba(232,119,60,.22); } }
.login .sep { margin: 20px 0 14px; }
.login a.small { display: inline-block; color: var(--muted); text-decoration: none; border-bottom: 1px dashed var(--line-2); }
.login a.small:hover { color: var(--text); }
