/* ==========================================================================
   Marketplace Manager – Design „Night City“:
   dunkel, Neon-Verlauf Pink → Orange → Gold, Glasflächen, mobile-first.
   ========================================================================== */

:root {
  --bg: #07070b;
  --surface: rgba(20, 20, 30, .72);
  --surface-2: rgba(34, 34, 50, .78);
  --solid: #12121b;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .14);
  --text: #f3f3f7;
  --muted: #9091a6;
  --dim: #5f6178;
  --pink: #ff2d75;
  --orange: #ff7a1a;
  --gold: #ffc23d;
  --cyan: #19e3ff;
  --green: #22e39a;
  --red: #ff3b5c;
  --warn: #ffb020;
  --grad: linear-gradient(120deg, #ff2d75 0%, #ff6a3d 50%, #ffb000 100%);
  --grad-soft: linear-gradient(120deg, rgba(255, 45, 117, .16), rgba(255, 176, 0, .10));
  --radius: 20px;
  --glow: 0 0 0 1px rgba(255, 45, 117, .35), 0 10px 30px rgba(255, 45, 117, .25);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Bebas Neue", "Oswald", Impact, "Arial Narrow", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }

.bg-fx {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 600px at -10% -10%, rgba(255, 45, 117, .20), transparent 60%),
    radial-gradient(700px 500px at 110% 0%, rgba(25, 227, 255, .10), transparent 60%),
    radial-gradient(900px 700px at 60% 120%, rgba(255, 122, 26, .14), transparent 60%),
    var(--bg);
}
.bg-fx::before {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.dim { color: var(--dim); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: .04em; text-transform: uppercase; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding: 0 .07em 0 .02em; }
h3 { margin: 0; font: 400 26px/1.1 var(--font-display); letter-spacing: .05em; text-transform: uppercase; }

.logo-mark { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--grad); flex: none; }
.logo-mark.sm { width: 40px; height: 40px; border-radius: 12px; }
.logo-mark.has-img { background: var(--solid); overflow: hidden; box-shadow: 0 0 0 1px var(--line-2), 0 6px 20px rgba(255, 45, 117, .25); }
.logo-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ------------------------------ Login ------------------------------ */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 20px; }
.login-hero { width: min(600px, 100%); display: flex; flex-direction: column; gap: 16px; }
.login-brand { display: flex; align-items: center; gap: 16px; font-size: 15px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; line-height: 1.25; }
.login-brand small { color: var(--muted); font-size: 11.5px; letter-spacing: .16em; }
.login-logo { width: 68px; height: 68px; border-radius: 18px; box-shadow: 0 12px 40px rgba(255, 45, 117, .45), 0 0 0 1px rgba(255, 255, 255, .1); }
.login-title { font-size: clamp(44px, 7vw, 68px); line-height: .95; margin: 0; letter-spacing: .02em; }
.login-lead { color: #c7c8d6; font-size: 15.5px; margin: 0; }
.login-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.login-points li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: #d6d7e2; }
.login-points li span { font-size: 18px; flex: none; }
.login-error { background: rgba(255, 59, 92, .12); color: #ff8fa3; border-radius: 12px; padding: 10px 12px; margin: 0; }
.login-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn.btn-discord { background: #5865f2; border-color: #5865f2; color: #fff; padding: 13px 24px; font-size: 15.5px; box-shadow: 0 12px 34px rgba(88, 101, 242, .4); }
.btn.btn-discord:hover { background: #4752c4; border-color: #4752c4; transform: translateY(-1px); }

/* ------------------------------ Kopf ------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 18px;
  padding: 12px 28px; background: rgba(7, 7, 11, .72); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; line-height: 1.2; }
.brand:hover { text-decoration: none; }
.brand b { font-size: 13px; }
.stand-switch { display: flex; flex-direction: column; min-width: 0; padding-left: 18px; border-left: 1px solid var(--line-2); }
.eyebrow { color: var(--pink); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.stand-name { font-size: 26px; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stand-select { min-height: 34px; padding: 4px 10px; font: 400 22px/1 var(--font-display); letter-spacing: .04em; text-transform: uppercase; background: transparent; border-color: transparent; padding-left: 0; }
.stand-select:hover { border-color: var(--line-2); padding-left: 8px; }
.stand-select option { background: var(--solid); font: 15px var(--font); text-transform: none; }
.spacer { flex: 1; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-name { font-weight: 600; font-size: 14px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; display: inline-grid; place-items: center; background: var(--grad-soft); border: 1px solid rgba(255, 45, 117, .45); font-weight: 800; font-size: 13px; }

.view { padding: 24px 28px 60px; max-width: 1400px; margin: 0 auto; }
.page-title { margin-bottom: 18px; }
.page-title h1 { margin: 0; font-size: 44px; line-height: 1; }

/* ---------------------------- Bausteine ---------------------------- */
.grid { display: grid; gap: 16px; }
.cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.cols-2 { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; }
.cols-2e { grid-template-columns: 1fr 1fr; align-items: start; }
.stack { display: grid; gap: 16px; align-content: start; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }

.card {
  position: relative; min-width: 0; padding: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(180deg, rgba(255, 255, 255, .04), transparent 40%); }
.card h2 {
  margin: 0 0 14px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.card h2 a, .card h2 .sub { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 13px; }
.hero { background: linear-gradient(120deg, rgba(255, 45, 117, .22), rgba(255, 122, 26, .12) 60%, rgba(25, 227, 255, .08)), var(--surface); border-color: rgba(255, 45, 117, .25); }
.hero .title { margin: 0 0 6px; color: var(--text); font: 400 34px/1 var(--font-display); letter-spacing: .04em; text-transform: uppercase; }
.hero p { margin: 0; }

.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.kpi { overflow: hidden; }
.kpi .label { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.kpi .value { font: 400 clamp(26px, 2.6vw, 38px)/1.05 var(--font-display); letter-spacing: .03em; margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .value.neg { color: #ff8fa3; }
.kpi .hint { color: var(--muted); font-size: 12.5px; }
.kpi::after { content: ""; position: absolute; left: 20px; right: 20px; top: 0; height: 2px; border-radius: 2px; background: var(--kpi-color, var(--grad)); }
.kpi.in { --kpi-color: var(--green); }
.kpi.blue { --kpi-color: var(--cyan); }
.kpi.warn { --kpi-color: var(--warn); }

.stand-card { display: flex; align-items: center; gap: 14px; color: var(--text); transition: border-color .15s, transform .15s; }
.stand-card:hover { text-decoration: none; border-color: rgba(255, 45, 117, .45); transform: translateY(-2px); }
.stand-icon { width: 48px; height: 48px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--grad-soft); border: 1px solid var(--line-2); }
.stand-info { flex: 1; min-width: 0; display: grid; }
.stand-info strong { font-size: 17px; }
.stand-go { color: var(--pink); font-size: 22px; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; padding: 10px 16px; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--text); border-image: var(--grad) 1; border-bottom: 2px solid; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px;
  padding: 9px 16px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--text); font: 600 14px/1.2 var(--font); cursor: pointer; white-space: nowrap;
  transition: transform .12s, border-color .15s, box-shadow .15s, background .15s;
}
.btn:hover { border-color: rgba(255, 255, 255, .28); text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: default; transform: none; }
.btn-primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 24px rgba(255, 45, 117, .3); }
.btn-primary:hover { box-shadow: var(--glow); border-color: transparent; }
.btn-danger { color: #ff8fa3; border-color: rgba(255, 59, 92, .35); }
.btn-success { color: #7ff2c2; border-color: rgba(34, 227, 154, .35); }
.btn-ghost { background: transparent; }
.btn-sm { min-height: 32px; padding: 5px 10px; font-size: 12.5px; border-radius: 10px; }
.icon-btn { background: none; border: 0; color: var(--muted); font-size: 16px; cursor: pointer; padding: 6px 8px; border-radius: 10px; min-width: 34px; min-height: 34px; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
form.inline { display: inline; margin: 0; }

/* Formulare */
input, select, textarea {
  width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border-radius: 12px;
  background: rgba(0, 0, 0, .35); color: var(--text); border: 1px solid var(--line-2); font: 15px var(--font);
}
input:focus, select:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255, 45, 117, .22); }
label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.form { display: grid; gap: 14px; align-content: start; }
.form > h2, .form > h3, .form > p { margin: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { color: var(--muted); font-size: 12.5px; margin: 0; }
.hint:empty { display: none; }
.warn-box { color: var(--warn); }
.total { margin: 0; font-size: 15px; color: var(--muted); }
.total b { color: var(--text); font-size: 18px; }
.danger-zone { border-color: rgba(255, 59, 92, .25); }

.chips { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chip { flex: none; background: var(--surface); border: 1px solid var(--line-2); color: var(--muted); padding: 7px 14px; border-radius: 99px; font: 600 13px var(--font); }
.chip:hover { color: var(--text); text-decoration: none; }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; }
.tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: rgba(255, 255, 255, .07); color: var(--muted); }
.tag-owner { background: var(--grad-soft); color: var(--gold); border: 1px solid rgba(255, 194, 61, .35); }

/* Tabellen */
.table-wrap { overflow-x: auto; margin: 0 -6px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; color: var(--dim); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 8px 6px; border-bottom: 1px solid var(--line-2); }
.tbl th.num { text-align: right; }
.tbl td { padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.archived td { opacity: .5; }
.row-actions { text-align: right; white-space: nowrap; }
.row-actions > * + * { margin-left: 4px; }

/* Kennzahlen */
.stats { margin: 0; display: grid; gap: 6px; }
.stats > div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.stats dt { color: var(--muted); }
.stats dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }
.stats .sum { border-top: 1px solid var(--line-2); padding-top: 8px; margin-top: 2px; font-weight: 700; }
.pos { color: var(--green); }
.neg { color: #ff8fa3; }

/* Buchungen */
.bookings { list-style: none; margin: 0; padding: 0; }
.bookings li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.bookings li:last-child { border-bottom: 0; }
.bookings li.cancelled .b-title, .bookings li.cancelled .b-deltas { text-decoration: line-through; opacity: .45; }
.b-icon { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); font-size: 16px; }
.b-main { flex: 1; min-width: 0; display: grid; }
.b-title { font-weight: 600; font-size: 14px; }
.b-note { color: #c7c8d6; font-size: 13px; }
.b-main small { font-size: 12px; }
.storno { color: #ff8fa3; font-weight: 600; }
.b-deltas { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.delta { font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 700; white-space: nowrap; }
.bookings.compact li { padding: 8px 0; }
.bookings.compact .b-icon { width: 28px; height: 28px; font-size: 14px; }

.member-list { list-style: none; margin: 0; padding: 0; }
.member-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.member-list li:last-child { border-bottom: 0; }
.member-list .grow { flex: 1; min-width: 0; display: grid; }
.member-list .avatar { width: 38px; height: 38px; }

/* Meldungen */
.flashes { display: grid; gap: 8px; margin-bottom: 16px; }
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; font-weight: 500; border: 1px solid; animation: flash-in .25s ease-out; }
.flash-success { background: rgba(34, 227, 154, .10); border-color: rgba(34, 227, 154, .35); color: #a6f5d4; }
.flash-error { background: rgba(255, 59, 92, .12); border-color: rgba(255, 59, 92, .4); color: #ffb3c1; }
.flash-x { margin-left: auto; background: none; border: 0; color: inherit; font-size: 20px; cursor: pointer; opacity: .7; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-4px); } }

/* Dialoge */
.dlg {
  width: min(480px, calc(100vw - 24px)); padding: 22px; border-radius: var(--radius); color: var(--text);
  background: #14141f; border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 45, 117, .15);
}
.dlg::backdrop { background: rgba(4, 4, 8, .7); backdrop-filter: blur(4px); }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

/* ------------------------------ Mobil ------------------------------ */
@media (max-width: 980px) {
  .cols-2, .cols-2e { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .topbar { padding: 10px 14px; gap: 12px; }
  .brand-text, .user-name { display: none; }
  .stand-switch { padding-left: 12px; }
  .view { padding: 16px 14px 48px; }
  .kpis { gap: 10px; }
  .kpi { padding: 14px; }
  .actions .btn { flex: 1 1 calc(50% - 10px); }
  .actions .btn-primary { flex-basis: 100%; }
  .row2 { grid-template-columns: 1fr; }
  .row-actions .btn-sm { padding: 5px 8px; }
  .tbl { font-size: 13px; }
}
@media (max-width: 520px) { .hide-sm { display: none; } }
.admin-card { border-color: rgba(255, 194, 61, .35); background: linear-gradient(120deg, rgba(255, 194, 61, .08), transparent 60%), var(--surface); }
.admin-link { color: var(--gold); border-color: rgba(255, 194, 61, .35); }
.dlg.dlg-wide { width: min(600px, calc(100vw - 24px)); }
.start-items { max-height: 44vh; overflow: auto; margin: 0; }
.start-items input { min-height: 36px; padding: 6px 10px; text-align: right; max-width: 120px; margin-left: auto; display: block; }
.coin-line { color: var(--cyan); font-size: 13px; }
[hidden] { display: none !important; }
.tax-calc { display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line-2); font-size: 14px; }
.tax-calc > div { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); }
.tax-calc b { color: var(--text); font-variant-numeric: tabular-nums; }
.tax-calc .sum { border-top: 1px solid var(--line-2); padding-top: 6px; margin-top: 2px; color: var(--text); font-weight: 700; }
.tax-calc .sum b { font-size: 18px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.icon-del:hover { background: rgba(255, 59, 92, .15); }
.table-tools { display: flex; gap: 10px; margin-bottom: 10px; }
.table-tools input { flex: 1; min-height: 38px; padding: 7px 12px; }
.table-tools select { width: auto; min-height: 38px; padding: 7px 10px; }
@media (max-width: 520px) { .table-tools { flex-direction: column; } .table-tools select { width: 100%; } }
/* Rundes Logo (Marketplace Manager) */
.logo-mark.has-img { border-radius: 50%; background: transparent; box-shadow: 0 6px 22px rgba(46, 129, 195, .35), 0 6px 22px rgba(230, 60, 90, .25); }
.login-logo { border-radius: 50%; box-shadow: 0 12px 40px rgba(46, 129, 195, .35), 0 12px 40px rgba(230, 60, 90, .3); }
