:root {
  --bg: #16171b; --bg2: #1f2127; --card: #262931; --line: #353945;
  --text: #ece9e1; --muted: #9a9ca5; --accent: #ffb703; --accent2: #fb5607;
  --good: #7ad151; --bad: #ef476f; --blue: #4cc9f0;
  --r: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 Inter, system-ui, sans-serif; }
body { background-image: radial-gradient(circle at 20% 0%, #2a2218 0, transparent 40%), radial-gradient(circle at 100% 100%, #1b2330 0, transparent 45%); min-height: 100vh; }
.hidden { display: none !important; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%; }
input:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
a { color: var(--accent); }

.logo { font-family: 'Permanent Marker', cursive; font-size: 52px; margin: 0; letter-spacing: 1px; transform: rotate(-3deg); color: var(--text); }
.logo span { color: var(--accent); }
.logo.small { font-size: 26px; transform: rotate(-2deg); white-space: nowrap; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-box { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 28px 24px; text-align: center; box-shadow: 0 20px 60px #0008; }
.tag { color: var(--muted); margin: 14px 0 20px; }
.tabs2 { display: flex; gap: 6px; margin-bottom: 14px; background: var(--bg2); padding: 4px; border-radius: 10px; }
.tabs2 button { flex: 1; border: 0; background: none; color: var(--muted); padding: 8px; border-radius: 8px; font-weight: 600; }
.tabs2 button.on { background: var(--accent); color: #1a1a1a; }
#loginForm { display: grid; gap: 10px; }
.err { color: var(--bad); min-height: 1.2em; margin: 4px 0 0; }

/* Kopfzeile */
.top { position: sticky; top: 0; z-index: 10; background: #16171bee; backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); padding: 10px 16px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; flex: 1; }
.stat { background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
.stat.money b { color: var(--accent); }
.bar { position: relative; width: 120px; height: 22px; background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #6d5cff, var(--blue)); transition: width .4s; }
.bar.laune i { background: linear-gradient(90deg, var(--accent2), var(--accent)); }
.bar.hp i { background: linear-gradient(90deg, #c2185b, var(--bad)); }
.bar span { position: relative; display: block; text-align: center; font-size: 12px; line-height: 20px; font-weight: 600; text-shadow: 0 1px 2px #000; }

/* Navigation */
.nav { display: flex; gap: 4px; overflow-x: auto; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--bg); scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav button { border: 0; background: none; color: var(--muted); padding: 8px 12px; border-radius: 10px; white-space: nowrap; font-weight: 600; position: relative; }
.nav button:hover { color: var(--text); background: var(--bg2); }
.nav button.on { background: var(--card); color: var(--accent); }
.nav .dot { position: absolute; top: 4px; right: 4px; background: var(--bad); color: #fff; font-size: 10px; border-radius: 999px; padding: 0 5px; line-height: 15px; }

main { max-width: 1100px; margin: 0 auto; padding: 18px 16px 60px; }
h2 { font-family: 'Permanent Marker', cursive; font-weight: 400; font-size: 28px; margin: 0 0 4px; color: var(--accent); }
h3 { margin: 0 0 8px; font-size: 16px; }
.sub { color: var(--muted); margin: 0 0 16px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.cols { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } .bar { width: 92px; } .logo.small { display: none; } .top { padding: 8px 12px; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.card.lock { opacity: .5; }
.card.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.card .ico { font-size: 30px; line-height: 1; margin-bottom: 6px; }
.card .meta { color: var(--muted); font-size: 13px; margin: 2px 0 10px; }
.row { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.btn { border: 0; background: var(--accent); color: #1a1a1a; font-weight: 800; padding: 8px 14px; border-radius: 9px; }
.btn:hover { filter: brightness(1.1); }
.btn:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; filter: none; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.red { background: var(--bad); color: #fff; }
.btn.big { padding: 12px; font-size: 16px; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.pill { display: inline-block; background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; font-size: 12px; color: var(--muted); }
.pill.on { color: var(--good); border-color: #2f5a22; }
.good { color: var(--good); } .bad { color: var(--bad); } .muted { color: var(--muted); } .acc { color: var(--accent); }

.busy { background: linear-gradient(135deg, #2c2416, #262931); border-color: #5a4520; }
.progress { height: 10px; background: var(--bg2); border-radius: 999px; overflow: hidden; margin: 10px 0; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent2), var(--accent)); }
.big-num { font-size: 26px; font-weight: 800; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; font-weight: 600; }
table { width: 100%; border-collapse: collapse; }
td, th { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
tr.me td { background: #3a2f14; }
.link { background: none; border: 0; color: var(--text); padding: 0; text-decoration: underline dotted; }

.spark { display: flex; align-items: flex-end; gap: 2px; height: 44px; margin: 8px 0; }
.spark i { flex: 1; background: var(--blue); border-radius: 2px 2px 0 0; opacity: .7; }
.spark i:last-child { background: var(--accent); opacity: 1; }

.reports .r { padding: 9px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; }
.reports .r.new { font-weight: 600; }
.reports time { color: var(--muted); font-size: 12px; white-space: nowrap; min-width: 86px; }

.chat { display: flex; flex-direction: column; height: min(65vh, 560px); }
.chat .msgs { flex: 1; overflow-y: auto; padding: 6px 0; }
.chat .m { padding: 4px 0; word-wrap: break-word; }
.chat .m b { color: var(--accent); cursor: pointer; }
.chat .m time { color: var(--muted); font-size: 11px; margin-right: 6px; }
.chat form { display: flex; gap: 8px; margin-top: 8px; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 30px); opacity: 0; background: var(--card); border: 1px solid var(--accent); border-radius: 12px; padding: 10px 16px; transition: .25s; z-index: 50; max-width: calc(100% - 32px); box-shadow: 0 10px 30px #000a; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.bad { border-color: var(--bad); }
.modal { position: fixed; inset: 0; background: #000a; display: grid; place-items: center; z-index: 40; padding: 16px; }
.modal .card { max-width: 420px; width: 100%; }
