/* Producer-Dashboard — Rahmen + Übersicht (Rework Stufe 1, 20.11.2026, Richtung A).
   Seitenleiste nach Gruppen (Sell / Money / Work for artists / Account), am Handy
   eine Leiste unten (Home · Beats · + · Money · More) und die Seitenleiste als Blatt.
   Wird NACH app-kit.css geladen, auf dem Producer-Dashboard und (seit 23.11.2026,
   gleicher Aufbau) auf dem Käufer-Dashboard public/buyer/dashboard.html. Ändert nur das
   Aussehen; Knöpfe, IDs und data-target bleiben wie vorher (dashboard.js).
   Knöpfe: Rand statt Fläche (CLAUDE.md 1.7). */
:root {
  --pd-red: #f51919;
  --pd-text: #F0EDE8;
  --pd-muted: #999;
  --pd-faint: #666;
  --pd-line: #2a2a2a;
  --pd-soft: #1c1c1c;
  --pd-card: #111;
  --pd-ease: cubic-bezier(.23, 1, .32, 1);
  --pd-glow: 0 0 18px rgba(245, 25, 25, .2);
  --pd-mono: 'DM Mono', 'Courier New', monospace;
  --pd-display: 'Cormorant Garamond', 'Times New Roman', serif;
}

/* ── Kopfleiste ─────────────────────────────────────────────────────────── */
.admin-nav { background: #080808; }
.pd-planpill {
  font-family: var(--pd-mono); font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase;
  padding: 5px 10px; border: 1px solid var(--pd-line); border-radius: 99px; color: var(--pd-muted);
}
.pd-planpill[hidden] { display: none; }
.pd-planpill em { font-style: normal; color: var(--pd-red); }
.pd-avatar {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%;
  background: linear-gradient(135deg, #2a2a2a, #151515) center / cover no-repeat;
  border: 1px solid var(--pd-line);
  display: grid; place-items: center;
  font-family: var(--pd-mono); font-size: 11px; color: var(--pd-muted);
}
.pd-avatar:empty:not([data-img]) { display: none; }

/* ── Seitenleiste ───────────────────────────────────────────────────────── */
.pd-side { background: #090909; padding: 18px 0 24px; display: flex; flex-direction: column; }
.pd-side__sheethead { display: none; }
.pd-grp {
  margin: 0; padding: 18px 22px 6px;
  font-family: var(--pd-mono); font-size: 9.5px; letter-spacing: .26em; color: #555; text-transform: uppercase;
}
.pd-side .producer-nav-btn {
  padding: 10px 22px; font-size: 14px; font-weight: 500; letter-spacing: .01em;
  color: var(--pd-muted); border-left: 2px solid transparent; background: transparent;
}
.pd-side .producer-nav-btn:hover { background: transparent; color: var(--pd-text); }
.pd-side .producer-nav-btn.active {
  color: var(--pd-text); border-left-color: var(--pd-red);
  background: linear-gradient(90deg, rgba(245, 25, 25, .1), transparent);
}
.pd-side .producer-nav-btn.active svg { color: var(--pd-red); opacity: 1; }
.pd-side #logout-btn-sidebar { margin-top: auto; padding-top: 22px; }

/* Handy-Leiste: nur am Handy */
.pd-tabbar, .pd-sheet-backdrop { display: none; }

/* ── Inhalt ─────────────────────────────────────────────────────────────── */
.admin-main { padding: 32px 40px 64px; }

/* Übersicht: Kopf mit Wellen */
#section-stats .pd-hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: block; margin: -32px -40px 26px; padding: 46px 40px 36px;
  background: #060606; border-bottom: 1px solid var(--pd-soft);
}
#section-stats .pd-hero::before {
  content: ""; position: absolute; inset: -30%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(36% 44% at 24% 36%, rgba(245, 25, 25, .15), transparent 70%),
    radial-gradient(30% 40% at 78% 64%, rgba(245, 25, 25, .07), transparent 70%);
  animation: pd-drift 24s ease-in-out infinite alternate;
}
@keyframes pd-drift { from { transform: translate3d(-4%, -3%, 0) scale(1); } to { transform: translate3d(5%, 4%, 0) scale(1.12); } }
#section-stats .pd-hero > canvas.k-waves {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: .55;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
}
@media (prefers-reduced-motion: reduce) { #section-stats .pd-hero::before { animation: none; } }
.pd-eyebrow {
  margin: 0; font-family: var(--pd-mono); font-size: 10.5px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--pd-red);
}
#section-stats .pd-hero__title {
  margin: 12px 0 0; font-family: var(--pd-display); font-style: italic; font-weight: 500;
  text-transform: uppercase; line-height: .92; letter-spacing: -.02em;
  font-size: clamp(2.6rem, 5vw, 4.4rem); color: var(--pd-text);
}
#section-stats .pd-hero__title em { font-style: inherit; color: var(--pd-red); text-shadow: 0 0 34px rgba(245, 25, 25, .45); }
.pd-hero__sub { margin: 14px 0 0; color: var(--pd-muted); font-size: 15px; line-height: 1.6; max-width: 60ch; }
.pd-hero__acts { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.pd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.pd-btn svg { width: 14px; height: 14px; }
.pd-btn[hidden] { display: none; }

/* Kennzahlen */
#section-stats .producer-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; }
#section-stats .admin-stat {
  background: var(--pd-card); border: 1px solid var(--pd-soft); padding: 20px 20px 16px;
  transition: border-color .3s var(--pd-ease), transform .3s var(--pd-ease), box-shadow .3s var(--pd-ease);
}
#section-stats .admin-stat:hover { border-color: var(--pd-red); box-shadow: var(--pd-glow); transform: translateY(-2px); }
#section-stats .admin-stat__label {
  margin: 0; font-family: var(--pd-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--pd-muted);
}
#section-stats .admin-stat__value,
#section-stats .admin-stat__value.gold {
  margin: 12px 0 2px; font-family: var(--pd-display); font-style: italic; font-weight: 500; line-height: 1;
  font-size: 44px; font-variant-numeric: tabular-nums; color: var(--pd-text);
}
.pd-kpi-note { margin: 6px 0 0; font-family: var(--pd-mono); font-size: 10px; letter-spacing: .08em; color: var(--pd-faint); }
.pd-kpi-note em { font-style: normal; color: var(--pd-red); }
.pd-kpi-link { cursor: pointer; }

/* Zwei Kästen: Top-Beats + Needs you */
.pd-two { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; margin: 14px 0 28px; }
.pd-box { background: var(--pd-card); border: 1px solid var(--pd-soft); padding: 22px 24px; min-width: 0; }
.pd-box__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
#section-stats .pd-box__title {
  margin: 0 0 6px; font-family: var(--pd-display); font-style: italic; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0; font-size: 24px; color: var(--pd-text);
}
.pd-mono { font-family: var(--pd-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--pd-faint); }
.pd-li {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 0; margin: 0;
  border: 0; border-bottom: 1px solid var(--pd-soft); background: none; color: var(--pd-text);
  font: inherit; font-size: 14px; text-align: left; cursor: pointer;
}
.pd-li:last-child { border-bottom: 0; }
.pd-li:hover .pd-li__go { transform: translateX(3px); }
.pd-li:focus-visible { outline: 1px solid var(--pd-red); outline-offset: 2px; }
.pd-li__t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-li__go { margin-left: auto; color: var(--pd-red); transition: transform .25s var(--pd-ease); flex: none; }
.pd-li__num { margin-left: auto; flex: none; font-family: var(--pd-mono); font-size: 11px; letter-spacing: .06em; color: var(--pd-muted); white-space: nowrap; }
.pd-rank { flex: 0 0 22px; font-family: var(--pd-display); font-style: italic; font-size: 22px; line-height: 1; color: var(--pd-red); }
.pd-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #555; }
.pd-dot--red { background: var(--pd-red); box-shadow: 0 0 8px rgba(245, 25, 25, .6); }
.pd-dot--warn { background: #f5b219; }
.pd-empty { margin: 10px 0 0; color: var(--pd-muted); font-size: 13.5px; line-height: 1.6; }

/* ── My Beats (Stufe 2, 20.11.2026) ─────────────────────────────────────── */
/* Filter: Rand statt Fläche (CLAUDE.md 1.7), aktiv = roter Rand + weiße Schrift */
.pd-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-filter[hidden] { display: none; }
.pd-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; cursor: pointer;
  background: transparent; color: var(--pd-muted); border: 1px solid var(--pd-line); border-radius: 99px;
  font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  transition: color .18s, border-color .18s, box-shadow .18s;
}
.pd-chip span { color: #666; }
.pd-chip:hover { color: var(--pd-red); border-color: var(--pd-red); box-shadow: 0 0 10px rgba(245, 25, 25, .25); }
.pd-chip.is-on { color: #fff; border: 1.5px solid var(--pd-red); }
.pd-chip.is-on span { color: var(--pd-red); }
.pd-chip:focus-visible { outline: 2px solid var(--pd-red); outline-offset: 2px; }
.pd-filter-empty { padding: 18px 20px 22px; margin: 0; }

#beats-table .pd-c-cover { width: 56px; padding-right: 0; }
.pd-cover {
  display: block; width: 40px; height: 40px; border-radius: 6px; border: 1px solid var(--pd-line);
  background: #161616 center / cover no-repeat;
}
.pd-cover:not([style])::after {
  content: ''; display: block; width: 100%; height: 100%;
  background: radial-gradient(circle at 50% 50%, #2a2a2a 0 18%, transparent 19%);
}
.pd-beat-meta { display: none; }
.pd-hints { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pd-hint {
  font-family: 'DM Mono', monospace; font-size: 10.5px; letter-spacing: .04em;
  color: var(--pd-muted); border: 1px solid var(--pd-line); border-radius: 5px; padding: 2px 8px; line-height: 1.5;
}
.pd-hint--red { color: var(--pd-red); border-color: rgba(245, 25, 25, .45); }
#beats-table tr[hidden] { display: none !important; }

/* ── Rest Stufe 2 (20.11.2026) ──────────────────────────────────────────── */
/* Requests / Chats / Services: gleiche Seitenüberschrift wie alle Bereiche */
.pd-subtitle-head { margin: 0 0 10px; }
/* Payouts ohne Stripe: nur EIN „Connect Stripe“ (oben), nicht drei */
#section-payouts.pd-no-stripe .payout-balance-card .btn-payout { display: none; }

@media (max-width: 1100px) {
  #section-stats .producer-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pd-two { grid-template-columns: 1fr; }
}

/* ── Handy ──────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .admin-layout { grid-template-rows: 56px 1fr; }
  .admin-main { grid-row: 2; padding: 16px 16px calc(104px + env(safe-area-inset-bottom)); }
  .admin-nav { padding: 0 16px; }
  .admin-nav__title, .pd-planpill, .pd-name, #logout-btn { display: none !important; }
  /* Hinweis-Leisten (z. B. „Selling opens at launch“) untereinander statt gequetscht */
  #section-stats .pt-current-strip { flex-direction: column; align-items: flex-start; gap: 4px; }

  /* Seitenleiste = Blatt von unten, nur offen nach „More“ */
  .admin-layout .pd-side { display: none; }
  body.pd-sheet-open .admin-layout .pd-side {
    display: flex; flex-direction: column; flex-wrap: nowrap; gap: 0;
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 998;
    height: auto; max-height: 84svh; overflow-y: auto;
    padding: 6px 0 calc(22px + env(safe-area-inset-bottom));
    background: #0b0b0b; border-top: 1px solid var(--pd-line); border-radius: 14px 14px 0 0;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, .6);
  }
  .pd-side__sheethead {
    display: flex; align-items: center; justify-content: space-between; padding: 12px 22px 2px;
    font-family: var(--pd-mono); font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: var(--pd-muted);
  }
  .pd-side__close {
    width: 38px; height: 38px; display: grid; place-items: center; background: none;
    border: 1px solid var(--pd-line); border-radius: 50%; color: var(--pd-text); cursor: pointer;
  }
  .admin-layout .pd-side .producer-nav-btn {
    width: 100%; padding: 13px 22px; font-size: 15px; border-radius: 0; border-left: 2px solid transparent;
  }
  .admin-layout .pd-side .producer-nav-btn.active { border-left-color: var(--pd-red); }
  body.pd-sheet-open .pd-sheet-backdrop {
    display: block; position: fixed; inset: 0; z-index: 995; background: rgba(0, 0, 0, .62);
  }
  body.pd-sheet-open { overflow: hidden; }

  /* Leiste unten */
  .pd-tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 990;
    height: calc(66px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(8, 8, 8, .96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-top: 1px solid var(--pd-soft);
  }
  .pd-tabbar .pd-tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    width: auto; margin: 0; padding: 0; border: 0; border-radius: 0; background: none;
    font-family: var(--pd-mono); font-size: 9px; font-weight: 400; letter-spacing: .12em; text-transform: uppercase;
    color: var(--pd-muted); cursor: pointer;
  }
  .pd-tabbar .pd-tab svg { width: 20px; height: 20px; opacity: 1; }
  .pd-tabbar .pd-tab:hover { background: none; color: var(--pd-text); }
  .pd-tabbar .pd-tab.active { color: var(--pd-text); background: none; border: 0; }
  .pd-tabbar .pd-tab.active svg { color: var(--pd-red); }
  .pd-tab__ring {
    width: 48px; height: 48px; margin-top: -24px; border-radius: 50%;
    display: grid; place-items: center; background: #080808; color: #fff;
    border: 1.5px solid var(--pd-red); box-shadow: var(--pd-glow);
    transition: color .3s var(--pd-ease), box-shadow .3s var(--pd-ease);
  }
  .pd-tab--up:hover .pd-tab__ring, .pd-tab--up:focus-visible .pd-tab__ring { color: var(--pd-red); box-shadow: 0 0 25px rgba(245, 25, 25, .35); }

  /* Checklisten-Ring (onboarding.css) klein oben in die Kopfleiste, links neben den
     Profil-Kreis (.pd-avatar: 34 px, 22 px vom Rand, Leiste 56 px, bleibt oben stehen).
     Unten rechts verdeckte er Inhalt, z. B. Delete bei My Beats (Inhaber 20.11.2026: Platz A).
     Die Checkliste klappt darunter auf. „body …“, weil onboarding.css später geladen wird
     (per Skript) und bei gleicher Gewichtung sonst gewinnt. */
  /* Fenster (.modal-overlay, z 1000) liegen über Leiste (990) und Blatt (998). */
  body .producer-onboarding { top: 9px; right: 66px; bottom: auto !important; flex-direction: column-reverse; }
  body .producer-onboarding__toggle { width: 38px; height: 38px; box-shadow: none; }
  body .producer-onboarding__ring { width: 34px; height: 34px; }
  body .producer-onboarding__count { font-size: .55rem; }
  body .producer-onboarding__panel {
    position: fixed; top: 64px; left: 16px; right: 16px; width: auto;
    max-height: calc(100svh - 64px - 96px - env(safe-area-inset-bottom));
    /* weich aufklappen (Inhaber 21.11.): spielt jedes Mal, wenn [hidden] wegfällt */
    animation: pd-checkliste-auf .2s ease-out;
  }
  @keyframes pd-checkliste-auf { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
  @media (prefers-reduced-motion: reduce) { body .producer-onboarding__panel { animation: none; } }
  body.pd-sheet-open .producer-onboarding { display: none !important; }

  /* Übersicht */
  #section-stats .pd-hero { margin: -16px -16px 22px; padding: 30px 16px 26px; }
  #section-stats .pd-hero__title { font-size: 2.6rem; }
  .pd-hero__acts .pd-btn { flex: 1 1 0; }
  #section-stats .producer-stats { gap: 10px; }
  #section-stats .admin-stat { padding: 16px; }
  #section-stats .admin-stat__value, #section-stats .admin-stat__value.gold { font-size: 34px; }
  .pd-box { padding: 18px 18px 8px; }

  /* My Beats: jede Zeile eine Karte, alles sichtbar (vorher rechts abgeschnitten) */
  #section-beats .beats-toolbar { padding: 14px; }
  #beats-table, #beats-table tbody { display: block; width: 100%; }
  #beats-table thead { display: none; }
  #beats-table tbody tr {
    display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center;
    gap: 10px 12px; padding: 14px; border-bottom: 1px solid var(--pd-line);
  }
  #beats-table tbody td { display: block; padding: 0; border: 0; min-width: 0; }
  #beats-table td.pd-c-hide { display: none; }
  #beats-table td.pd-c-cover { grid-row: 1 / span 2; width: auto; align-self: start; }
  #beats-table td.pd-c-title { grid-column: 2 / 4; }
  #beats-table td.pd-c-pub { grid-column: 2 / 3; }
  #beats-table td.pd-c-act { grid-column: 3 / 4; }
  #beats-table tr.pd-row-empty, #beats-table tr.loading-row { display: block; }
  .pd-cover { width: 52px; height: 52px; }
  .pd-beat-meta { display: block; margin-top: 4px; font-size: 11px; color: var(--pd-muted); line-height: 1.5; }
  #beats-table td.pd-c-pub .badge { white-space: normal; }

  /* Übrige Tabellen (Payouts, Beat-Club-Pool, Sound Kits): im Kasten seitlich
     schiebbar statt rechts abgeschnitten */
  .producer-section .admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .producer-section .admin-table-wrap .admin-table:not(#beats-table) th,
  .producer-section .admin-table-wrap .admin-table:not(#beats-table) td { padding-left: 12px; padding-right: 12px; white-space: nowrap; }
  .producer-section .admin-table-wrap .admin-table:not(#beats-table) td[colspan] { white-space: normal; }

  /* Service-Karten: Knöpfe unter den Text statt daneben (Titel wurde gequetscht) */
  .pd-svc-card { flex-direction: column; }
  .pd-svc-acts { flex-wrap: wrap; }
}

/* Tutorial-Knöpfe in Kopfzeilen = gleiche Größe wie der Hauptknopf daneben (.btn-upload), 20.11.2026 */
.admin-page-header .nss-guide-btn { font-size: .7rem; padding: .5rem 1.1rem; letter-spacing: .12em; }
