:root {
  --bg: #000203; --panel: #0d1014; --panel2: #151a20; --line: #232a33;
  --text: #eef1f4; --muted: #8b96a3; --gold: #F5B800; --gold2: #ffd24a;
  --green: #2ecc71; --red: #e74c3c; --blue: #4aa3ff; --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 12px; letter-spacing: .04em; text-transform: uppercase; font-weight: 800; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 14px; color: var(--muted); }
.muted { color: var(--muted); } .small { font-size: 13px; }
.center { display: grid; place-items: center; min-height: 60vh; text-align: center; }

/* Layout */
.top { position: sticky; top: 0; z-index: 10; background: rgba(0,2,3,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); }
.top-in { max-width: 1200px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: .08em; color: var(--text); }
.brand img { width: 36px; height: 36px; }
.brand span b { color: var(--gold); }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 700; font-size: 13px;
  text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--panel2); text-decoration: none; }
.nav a.on { color: #000; background: var(--gold); }
.me { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--panel2); object-fit: cover; flex: none;
  display: inline-grid; place-items: center; font-weight: 800; color: var(--gold); font-size: 13px; }
main { max-width: 1200px; margin: 0 auto; padding: 20px 16px 80px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }

/* Buttons & forms */
button, .btn { font: inherit; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; font-size: 13px;
  border: 1px solid var(--line); background: var(--panel2); color: var(--text); padding: 9px 14px;
  border-radius: 9px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
button:hover, .btn:hover { border-color: var(--gold); text-decoration: none; }
button:disabled { opacity: .5; cursor: not-allowed; }
.primary { background: var(--gold); border-color: var(--gold); color: #000; }
.primary:hover { background: var(--gold2); }
.danger { color: var(--red); } .danger:hover { border-color: var(--red); }
.duty-in { background: var(--green); border-color: var(--green); color: #00150a; }
.duty-out { background: var(--red); border-color: var(--red); color: #fff; }
.mini { padding: 5px 9px; font-size: 11px; }
input, select, textarea { font: inherit; color: var(--text); background: #07090c; border: 1px solid var(--line);
  border-radius: 9px; padding: 9px 11px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
textarea { min-height: 90px; resize: vertical; }
label { display: block; margin-bottom: 12px; font-size: 13px; color: var(--muted); font-weight: 600; }
label > input, label > select, label > textarea { margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); }
.check input { width: auto; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 12px; }

/* Lists */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--panel2); }
.tablewrap { overflow-x: auto; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .04em; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); }
.badge.green { color: var(--green); border-color: rgba(46,204,113,.4); }
.badge.red { color: var(--red); border-color: rgba(231,76,60,.4); }
.badge.gold { color: var(--gold); border-color: rgba(245,184,0,.4); }
.badge.blue { color: var(--blue); border-color: rgba(74,163,255,.4); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); display: inline-block;
  box-shadow: 0 0 0 3px rgba(46,204,113,.2); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(46,204,113,.05); } }
.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 9px; background: var(--panel2); }
.item .grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs button.on { background: var(--gold); color: #000; border-color: var(--gold); }

/* News */
.news { border-left: 3px solid var(--line); padding-left: 14px; }
.news.pinned { border-left-color: var(--gold); }
.news + .news { margin-top: 18px; }
.news h2 { margin-bottom: 4px; text-transform: none; letter-spacing: 0; font-size: 18px; }
.news .body { white-space: pre-wrap; word-wrap: break-word; margin-top: 8px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat { background: var(--panel2); border-radius: 10px; padding: 12px; }
.stat b { display: block; font-size: 24px; font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.clock { font-size: 32px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: .03em; }

/* Akten */
.fields dt { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 10px; }
.fields dd { margin: 2px 0 0; white-space: pre-wrap; word-wrap: break-word; }
.imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 10px; }
.imgs img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.timeline .e { padding: 10px 0; border-bottom: 1px solid var(--line); }
.timeline .e:last-child { border-bottom: 0; }
.matrix td, .matrix th { text-align: center; padding: 6px; }
.matrix td:first-child, .matrix th:first-child { text-align: left; }
.yes { color: var(--green); font-weight: 900; }

/* Modal & Toast */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  width: min(560px, 100%); max-height: 90vh; overflow-y: auto; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 60; background: var(--panel2);
  border: 1px solid var(--gold); padding: 10px 16px; border-radius: 10px; font-weight: 600; max-width: calc(100% - 32px); }
.toast.err { border-color: var(--red); }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; text-align: center; }
.login .card { width: min(420px, 100%); padding: 32px 24px; }
.login img { width: 140px; height: 140px; }
.discord { background: #5865F2; border-color: #5865F2; color: #fff; padding: 12px 20px; font-size: 14px; }

/* Kalender */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .wd { font-size: 11px; font-weight: 800; color: var(--muted); text-align: center; text-transform: uppercase; padding: 4px 0; }
.cal .d { min-height: 86px; background: var(--panel2); border-radius: 8px; padding: 4px; font-size: 12px; min-width: 0; }
.cal .d .n { font-weight: 800; color: var(--muted); }
.cal .d.other { opacity: .35; }
.cal .d.today { outline: 2px solid var(--gold); }
.chip { display: block; background: rgba(245,184,0,.16); color: var(--gold); border-radius: 5px; padding: 2px 5px; margin-top: 3px;
  cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; font-size: 11px; }
.chip:hover { background: rgba(245,184,0,.3); }
.chip.mine { background: rgba(46,204,113,.18); color: var(--green); }
.chip.off { text-decoration: line-through; color: var(--muted); background: transparent; }
@media (max-width: 760px) { .cal .d { min-height: 54px; padding: 2px; } .chip { font-size: 10px; padding: 1px 3px; } .chip .t { display: none; } .cal { gap: 2px; } }

/* Mitgliedschaft */
.hero { display: flex; gap: 20px; align-items: center; background: linear-gradient(135deg, #161200, #000203 60%); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; margin-bottom: 16px; }
.hero img { width: 110px; height: 110px; flex: none; }
.hero p { color: var(--muted); max-width: 640px; margin: 0; }
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-bottom: 16px; }
.plan { position: relative; background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--pc); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; }
.plan.pop { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 10px 40px rgba(245,184,0,.12); }
.plan h2 { margin: 6px 0 2px; }
.plan-icon { font-size: 30px; }
.plan .price { font-size: 30px; font-weight: 900; color: var(--pc); margin-top: 8px; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: 13px; color: var(--muted); font-weight: 600; }
.plan ul, ul.feat { padding-left: 18px; margin: 10px 0 14px; flex: 1; }
.plan li, ul.feat li { margin: 4px 0; font-size: 14px; }
.plan button { width: 100%; justify-content: center; }
.ribbon { position: absolute; top: 12px; right: 12px; background: var(--gold); color: #000; font-size: 11px; font-weight: 900; padding: 3px 8px; border-radius: 99px; text-transform: uppercase; }
.tiny { font-size: 11px; margin: 8px 0 0; }
table.svc td, table.svc th { text-align: center; } table.svc td:first-child, table.svc th:first-child { text-align: left; }
table.svc .hl { background: rgba(245,184,0,.07); }
.mcard { aspect-ratio: 1.586; max-width: 440px; border-radius: 16px; padding: 18px 20px; color: #fff; display: flex; flex-direction: column;
  background: radial-gradient(circle at 85% 15%, color-mix(in srgb, var(--pc) 45%, transparent), transparent 55%), linear-gradient(135deg, #1b1b1b, #000203);
  border: 1px solid color-mix(in srgb, var(--pc) 60%, #000); box-shadow: 0 14px 40px rgba(0,0,0,.6); }
.mcard-top { display: flex; justify-content: space-between; align-items: center; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; font-size: 13px; color: var(--pc); }
.mcard-top img { height: 34px; }
.mcard-name { font-size: 22px; font-weight: 800; margin-top: auto; letter-spacing: .02em; }
.mcard-row { display: flex; gap: 28px; margin: 10px 0; }
.mcard-row small { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #aaa; }
.mcard-row b { font-variant-numeric: tabular-nums; }
.mcard-foot { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: #aaa; font-style: italic; }
details summary { color: var(--gold); }
@media (max-width: 760px) { .hero { flex-direction: column; text-align: center; } .hero img { width: 80px; height: 80px; } }

@media (max-width: 1440px) { .brand span { display: none; } .nav a { padding: 8px 10px; } }
@media (max-width: 760px) {
  .top-in { flex-wrap: wrap; gap: 8px; padding: 8px 16px; }
  .brand span { display: none; }
  .nav { order: 3; flex-basis: 100%; }
  .me { margin-left: auto; }
  .me .who { display: none; }
  .hide-m { display: none; }
  .clock { font-size: 26px; }
}
.grid + .card, .grid + .grid { margin-top: 16px; }
