/* outlet72 portal — Redesign 10/2026. Liegt über style.css (alte Klassen bleiben gültig). */

:root {
  --bg: #0a0d12;
  --bg-elev: #11161d;
  --bg-elev-2: #171e27;
  --bg-input: #080b0f;
  --border: #232b36;
  --border-strong: #364252;
  --text: #edf2f7;
  --text-muted: #8a96a6;
  --font-sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --tt-cyan: #25f4ee;
  --tt-pink: #fe2c55;
  --tt-bar: #14a6a1;
  --wn-yellow: #ffd23f;
  --ds-green: #00d97e;

  --section: var(--ds-green);
  --section-2: var(--ds-green);
  --radius: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
body.nav-tiktok { --section: var(--tt-cyan); --section-2: var(--tt-pink); --accent: var(--tt-cyan); --accent-dim: #25f4ee1f; }
body.nav-whatnot { --section: var(--wn-yellow); --section-2: #ff8a3d; --accent: var(--wn-yellow); --accent-dim: #ffd23f1f; }
body.nav-datensourcing { --section: var(--ds-green); --section-2: #58a6ff; }

html, body { font-family: var(--font-sans); background: var(--bg); }
body {
  background:
    radial-gradient(1200px 500px at 85% -10%, color-mix(in srgb, var(--section) 12%, transparent), transparent 60%),
    radial-gradient(900px 420px at -10% 10%, color-mix(in srgb, var(--section-2) 9%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

/* ───────── Kopfzeile ───────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  gap: 1.25rem; padding: .7rem 1.5rem;
  background: color-mix(in srgb, var(--bg-elev) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.brand { font-family: var(--font-sans); gap: .55rem; text-decoration: none !important; }
.brand-mark {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  font: 800 .95rem/1 var(--font-mono); color: #0a0d12;
  background: linear-gradient(135deg, var(--section), var(--section-2));
  box-shadow: 0 0 24px color-mix(in srgb, var(--section) 45%, transparent);
  transition: transform .4s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.brand-name { font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; font-stretch: 112%; }
.brand-sub { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; }

.mainnav { display: flex; gap: .35rem; flex: 1; justify-content: center; }
.mainnav-item {
  --c: var(--ds-green);
  position: relative; display: inline-flex; align-items: center; gap: .55rem;
  padding: .6rem 1.15rem; border-radius: 999px;
  font-weight: 700; font-size: 1.02rem; font-stretch: 110%; letter-spacing: -.005em;
  color: var(--text-muted); text-decoration: none !important;
  border: 1px solid transparent;
  transition: color .25s, background .25s, border-color .25s, transform .25s var(--ease);
}
.mainnav-item svg { width: 18px; height: 18px; fill: currentColor; }
.mainnav-tiktok { --c: var(--tt-cyan); }
.mainnav-whatnot { --c: var(--wn-yellow); }
.mainnav-data { --c: var(--ds-green); }
.mainnav-item:hover { color: var(--text); background: color-mix(in srgb, var(--c) 10%, transparent); transform: translateY(-1px); }
.mainnav-item.is-active {
  color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent);
  border-color: color-mix(in srgb, var(--c) 45%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 7%, transparent), 0 8px 30px -12px var(--c);
}
.topbar-search { margin: 0; max-width: 260px; }
.logout-btn { font-family: var(--font-sans); }

/* Unterleiste (TikTok-Bereiche) */
.subnav {
  display: flex; gap: .25rem; padding: .55rem 1.5rem; overflow-x: auto;
  border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg-elev) 55%, transparent);
}
.subnav a {
  padding: .4rem .9rem; border-radius: 8px; white-space: nowrap;
  color: var(--text-muted); font-weight: 600; font-size: .9rem; text-decoration: none !important;
  transition: background .2s, color .2s;
}
.subnav a:hover { color: var(--text); background: var(--bg-elev-2); }
.subnav a.is-active { color: var(--text); background: var(--bg-elev-2); box-shadow: inset 0 -2px 0 var(--section); }
.subnav .subnav-meta { margin-left: auto; display: flex; align-items: center; gap: .5rem; font-size: .78rem; color: var(--text-muted); white-space: nowrap; }

.container { max-width: 1360px; padding: 1.75rem 1.5rem 3rem; }

/* ───────── Seitenkopf / Hero ───────── */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin: .25rem 0 1.5rem; }
.hero-kicker { font: 600 .75rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .18em; color: var(--section); }
.hero h1 {
  margin-top: .45rem; font-size: clamp(1.9rem, 3.4vw, 2.9rem); line-height: 1.02; font-weight: 900; font-stretch: 118%; letter-spacing: -.025em;
  color: var(--text);
}
.hero h1::after {
  content: ""; display: block; width: 72px; height: 4px; margin-top: .6rem; border-radius: 4px;
  background: linear-gradient(90deg, var(--section), var(--section-2));
  transform-origin: left; animation: grow-x .8s var(--ease) .15s both;
}
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero p { color: var(--text-muted); max-width: 640px; margin-top: .5rem; }
.hero-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ───────── Kennzahlen ───────── */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.kpi {
  position: relative; overflow: hidden; padding: 1.1rem 1.2rem 1.15rem; border-radius: var(--radius);
  background: linear-gradient(160deg, var(--bg-elev-2), var(--bg-elev));
  border: 1px solid var(--border);
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
  animation: rise .6s var(--ease) both;
}
.kpi:nth-child(2) { animation-delay: .06s } .kpi:nth-child(3) { animation-delay: .12s } .kpi:nth-child(4) { animation-delay: .18s } .kpi:nth-child(5) { animation-delay: .24s }
.kpi::after {
  content: ""; position: absolute; inset: auto -30% -60% auto; width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--k, var(--section)) 30%, transparent), transparent 70%);
  transition: transform .5s var(--ease);
}
.kpi:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--k, var(--section)) 50%, var(--border)); box-shadow: 0 18px 40px -22px var(--k, var(--section)); }
.kpi:hover::after { transform: scale(1.35); }
.kpi-label { font: 600 .72rem/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--text-muted); }
.kpi-value { margin-top: .45rem; font: 700 2rem/1 var(--font-mono); letter-spacing: -.03em; color: var(--text); font-variant-numeric: tabular-nums; }
.kpi-sub { margin-top: .5rem; font-size: .82rem; color: var(--text-muted); }
.kpi-sub b { color: var(--text); font-weight: 600; }
.kpi.is-alert { --k: var(--tt-pink); }
.kpi.is-alert .kpi-value { color: var(--tt-pink); }
.kpi.is-good { --k: var(--ds-green); }

/* ───────── Karten / Raster ───────── */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.25rem; }
.grid-2 > * { min-width: 0; }
.panel {
  border-radius: var(--radius); border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
  padding: 1.15rem 1.25rem; margin-bottom: 1.25rem;
  animation: rise .6s var(--ease) both;
}
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.panel-head h2 { font-size: 1.12rem; font-weight: 800; font-stretch: 110%; letter-spacing: -.01em; }
.panel-head .panel-note { font-size: .8rem; color: var(--text-muted); }
.panel-head a { font-size: .85rem; font-weight: 600; }

/* ───────── Balkendiagramm (Umsatz/Tag) ───────── */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .bar { fill: var(--tt-bar); transition: fill .15s; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart g.col:hover .bar, .chart g.col:focus .bar { fill: var(--tt-cyan); }
.chart .grid line { stroke: var(--border); stroke-width: 1; }
.chart .axis text { fill: var(--text-muted); font: 500 10px var(--font-mono); }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 5; transform: translate(-50%, calc(-100% - 10px));
  padding: .45rem .6rem; border-radius: 8px; background: #050709; border: 1px solid var(--border-strong);
  font-size: .78rem; white-space: nowrap; opacity: 0; transition: opacity .12s;
}
.chart-tip b { font-family: var(--font-mono); }
.chart-tip.is-on { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .chart .bar { transform-box: fill-box; transform-origin: bottom; animation: grow .7s var(--ease) both; }
}

/* ───────── LIVE-Karten ───────── */
.lives { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.live {
  position: relative; overflow: hidden; border-radius: var(--radius); padding: 1rem 1.1rem;
  border: 1px solid var(--border); background: linear-gradient(165deg, var(--bg-elev-2), var(--bg-elev));
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
  animation: rise .6s var(--ease) both;
}
.live::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--tt-cyan), var(--tt-pink)); opacity: .8;
}
.live:hover { transform: translateY(-4px) rotate(-.3deg); border-color: color-mix(in srgb, var(--tt-pink) 45%, var(--border)); box-shadow: 0 22px 44px -26px var(--tt-pink); }
.live-when { font: 600 .74rem/1 var(--font-mono); color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; }
.live-title { margin: .4rem 0 .75rem; font-weight: 800; font-size: 1.02rem; line-height: 1.25; }
.live-rev { font: 700 1.6rem/1 var(--font-mono); letter-spacing: -.03em; }
.live-stats { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin-top: .55rem; font-size: .8rem; color: var(--text-muted); }
.live-stats b { color: var(--text); font-family: var(--font-mono); font-weight: 600; }
.live-top { margin-top: .7rem; padding-top: .6rem; border-top: 1px dashed var(--border); font-size: .78rem; color: var(--text-muted); }
.live-top li { list-style: none; display: flex; justify-content: space-between; gap: .5rem; }
.live-top li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live.is-best { border-color: color-mix(in srgb, var(--tt-cyan) 55%, var(--border)); }
.live-badge {
  position: absolute; top: .8rem; right: .8rem; font: 700 .66rem/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase;
  padding: .3rem .45rem; border-radius: 6px; color: #0a0d12; background: var(--tt-cyan);
}
.live-badge.is-nodata { background: var(--bg-elev-2); color: var(--text-muted); border: 1px solid var(--border); }

/* ───────── Tabellen ───────── */
.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th { text-align: left; font: 600 .7rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); padding: .55rem .6rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: .6rem .6rem; border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); vertical-align: middle; }
.tbl tr { transition: background .15s; }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--section) 5%, transparent); }
.tbl .num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--bg-elev-2); display: block; }
.tbl .name { font-weight: 600; max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl .sub { color: var(--text-muted); font-size: .78rem; }
.table-wrap { overflow-x: auto; }

/* Status-Pillen (Text + Farbe, nie Farbe allein) */
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 600; white-space: nowrap; border: 1px solid var(--border); color: var(--text-muted); background: var(--bg-elev-2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-good { color: #3ddc97; border-color: #3ddc9744; background: #3ddc9712; }
.pill-warn { color: #f5b942; border-color: #f5b94244; background: #f5b94212; }
.pill-bad { color: #ff6b81; border-color: #ff6b8144; background: #ff6b8112; }
.pill-info { color: #7cc4ff; border-color: #7cc4ff44; background: #7cc4ff12; }
.pill-auction { color: var(--tt-cyan); border-color: #25f4ee44; background: #25f4ee12; }

.filter-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.chip { padding: .38rem .8rem; border-radius: 999px; border: 1px solid var(--border); color: var(--text-muted); font-size: .84rem; font-weight: 600; text-decoration: none !important; transition: all .2s; }
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.is-active { color: #0a0d12; background: var(--section); border-color: var(--section); }
.chip .cnt { font-family: var(--font-mono); opacity: .75; margin-left: .3rem; }

/* Hinweise */
.notice { display: flex; gap: .8rem; align-items: flex-start; padding: .9rem 1rem; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-elev); margin-bottom: 1.25rem; font-size: .9rem; }
.notice-icon { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; }
.notice-warn { border-color: #f5b94255; } .notice-warn .notice-icon { background: #f5b94222; color: #f5b942; }
.notice-bad { border-color: #ff6b8155; } .notice-bad .notice-icon { background: #ff6b8122; color: #ff6b81; }
.notice-info .notice-icon { background: #7cc4ff22; color: #7cc4ff; }
.notice b { font-weight: 700; }

.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ds-green); box-shadow: 0 0 0 0 var(--ds-green); animation: pulse 2s infinite; display: inline-block; }
.live-dot.is-stale { background: #f5b942; animation: none; }

.empty { padding: 2rem 1rem; text-align: center; color: var(--text-muted); }

/* Whatnot-Karten */
.wn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.wn-card { border-radius: var(--radius); border: 1px solid var(--border); background: linear-gradient(165deg, var(--bg-elev-2), var(--bg-elev)); padding: 1.05rem 1.15rem; transition: transform .35s var(--ease), border-color .35s, box-shadow .35s; animation: rise .6s var(--ease) both; }
.wn-card:hover { transform: translateY(-3px); border-color: #ffd23f66; box-shadow: 0 18px 40px -24px var(--wn-yellow); }
.wn-card h3 { font-size: 1rem; font-weight: 800; margin: .35rem 0 .6rem; overflow-wrap: anywhere; }
.wn-meta { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .8rem; color: var(--text-muted); margin-bottom: .8rem; }
.wn-meta b { color: var(--text); font-family: var(--font-mono); }
.wn-actions { display: flex; gap: .45rem; flex-wrap: wrap; }

/* Buttons im neuen Look */
.btn { border-radius: 10px; font-family: var(--font-sans); font-weight: 700; transition: transform .2s var(--ease), box-shadow .2s, background .2s; }
.btn-primary { background: linear-gradient(135deg, var(--section), color-mix(in srgb, var(--section) 60%, var(--section-2))); color: #0a0d12; border: 0; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px -12px var(--section); text-decoration: none; }

/* Alte Bereiche (Datensourcing) leicht angleichen */
.section-num { color: var(--section); }
.section-head h2 { font-weight: 800; font-stretch: 110%; }
.card { border-radius: var(--radius); }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 #00d97e88; } 70% { box-shadow: 0 0 0 8px #00d97e00; } 100% { box-shadow: 0 0 0 0 #00d97e00; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 980px) {
  .grid-2 { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; padding: .6rem 1rem; }
  .mainnav { order: 3; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; }
  .topbar-search, .worker-indicator { display: none; }
}
@media (max-width: 560px) {
  .container { padding: 1.1rem 1rem 2.5rem; }
  .subnav { padding: .5rem 1rem; }
  .mainnav-item { padding: .5rem .8rem; font-size: .92rem; }
  .brand-sub { display: none; }
  .kpi-value { font-size: 1.6rem; }
  .tbl .name { max-width: 180px; }
}

/* Anmeldung */
.login-brand { display: flex; align-items: center; gap: .6rem; font-family: var(--font-sans); font-weight: 900; font-stretch: 115%; letter-spacing: -.02em; }
.login-banner { font-family: var(--font-sans); white-space: normal; }

/* Tabellen in schmalen Karten: Namensspalte nimmt den Rest und kürzt mit … */
.tbl td.grow { width: 100%; max-width: 0; }
.tbl td.grow .name { max-width: none; }
.tbl td:first-child:has(.thumb) { width: 52px; }
.live-top li span:last-child { flex: none; white-space: nowrap; }
.live-top li span:first-child { min-width: 0; }
.live-stats span, .kpi-sub { white-space: nowrap; }
.kpi-sub { white-space: normal; }

/* Wischbare Leisten ohne sichtbaren Scrollbalken */
.mainnav, .subnav { scrollbar-width: none; }
.mainnav::-webkit-scrollbar, .subnav::-webkit-scrollbar { display: none; }
@media (max-width: 560px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .kpi { padding: .9rem .9rem 1rem; }
  .kpi-value { font-size: 1.35rem; }
  .kpi-sub { font-size: .76rem; }
  .hero h1 { font-size: 1.85rem; }
}

/* ───────── Datensourcing: Moduswahl ───────── */
.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.mode {
  --c: var(--ds-green);
  display: flex; gap: 1rem; align-items: flex-start; padding: 1.15rem 1.2rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: linear-gradient(160deg, var(--bg-elev-2), var(--bg-elev));
  color: var(--text); text-decoration: none !important;
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s, opacity .35s;
  animation: rise .6s var(--ease) both;
}
.mode-tiktok { --c: var(--tt-cyan); animation-delay: .06s; }
.mode:not(.is-active) { opacity: .62; }
.mode:hover { opacity: 1; transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 45%, var(--border)); }
.mode.is-active { opacity: 1; border-color: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 10%, transparent), 0 20px 44px -26px var(--c); }
.mode-icon { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); }
.mode-icon svg { width: 24px; height: 24px; fill: currentColor; }
.mode-text { display: flex; flex-direction: column; gap: .3rem; }
.mode-text b { font-size: 1.08rem; font-weight: 800; font-stretch: 110%; }
.mode-text span { color: var(--text-muted); font-size: .86rem; line-height: 1.45; }

/* ───────── TikTok-Liste: Formular ───────── */
.tl-grid { display: grid; gap: 1rem; }
.tl-step { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: .9rem; padding: .9rem 0; border-top: 1px dashed var(--border); }
.tl-step:first-child { border-top: 0; padding-top: .2rem; }
.tl-num { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font: 700 .85rem var(--font-mono); color: #0a0d12; background: linear-gradient(135deg, var(--tt-cyan), var(--tt-pink)); }
.tl-label { display: block; font-weight: 700; margin-bottom: .45rem; }
.tl-inline { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: .4rem; }
.tl-inline label { display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; color: var(--text-muted); }
.tl-form input[type=text], .tl-form select { background: var(--bg-input); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: .45rem .6rem; font: inherit; }
.tl-form input[type=file] { font: inherit; color: var(--text-muted); }
.tl-details { margin-top: .4rem; font-size: .86rem; color: var(--text-muted); }
.tl-details summary { cursor: pointer; font-weight: 600; color: var(--text); }
.tl-details ul { margin: .5rem 0 0 1.1rem; display: grid; gap: .25rem; }
.tl-submit { justify-self: start; padding: .7rem 1.4rem; font-size: 1rem; background: linear-gradient(135deg, var(--tt-cyan), var(--tt-pink)); }

.tl-list { display: grid; gap: .9rem; }
.tl-item { border: 1px solid var(--border); border-radius: 12px; padding: .95rem 1.05rem; background: var(--bg-elev); }
.tl-item h3 { font-size: 1rem; font-weight: 800; margin: .25rem 0 .15rem; }
.tl-item-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.tl-running { border-color: #7cc4ff55; }
.tl-done { border-color: #3ddc9744; }
.tl-error { border-color: #ff6b8155; }
@media (max-width: 760px) { .modes { grid-template-columns: 1fr; } }
