:root {
  --bg: #f3f5f9;
  --panel: #ffffff;
  --panel-2: #f8f9fc;
  --line: #e3e7ef;
  --text: #1a2233;
  --muted: #667085;
  --brand: #0b2a5b;
  --brand-2: #1d5fd1;
  --accent: #10a37f;
  --warn: #c2410c;
  --danger: #c0262d;
  --hover: #eef2fa;
  --mine: #e7f0ff;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 2px 8px rgba(16, 24, 40, .05);
  --radius: 12px;
  --side: 248px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e131c; --panel: #161d29; --panel-2: #1b2331; --line: #263042; --text: #e6eaf2; --muted: #98a2b3;
    --brand: #8fb4ff; --brand-2: #5b8def; --hover: #1f2938; --mine: #1b2b47; --shadow: 0 1px 2px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e131c; --panel: #161d29; --panel-2: #1b2331; --line: #263042; --text: #e6eaf2; --muted: #98a2b3;
  --brand: #8fb4ff; --brand-2: #5b8def; --hover: #1f2938; --mine: #1b2b47; --shadow: 0 1px 2px rgba(0,0,0,.4);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px; padding: 0 4px; font-size: .9em; }
pre { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; overflow: auto; }
pre code { border: 0; padding: 0; }
blockquote { margin: 4px 0; padding: 2px 10px; border-left: 3px solid var(--line); color: var(--muted); }
.boot { padding: 40px; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.tiny { font-size: .75rem; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.hidden { display: none !important; }
.center { text-align: center; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Bedienelemente */
button, .btn {
  font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  border-radius: 9px; padding: 7px 14px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; white-space: nowrap;
}
button:hover, .btn:hover { background: var(--hover); text-decoration: none; }
button:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.btn-primary:hover { background: #174fb0; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-danger { color: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { padding: 4px 10px; font-size: .85rem; }
.icon-btn { border: 0; background: transparent; padding: 6px; border-radius: 8px; font-size: 1.1rem; line-height: 1; }
input, textarea, select {
  font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; width: 100%;
}
textarea { resize: vertical; min-height: 80px; }
input:focus, textarea:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--brand-2) 35%, transparent); border-color: var(--brand-2); }
label { display: block; font-weight: 600; font-size: .9rem; margin: 10px 0 4px; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
label.check input { width: auto; }
.field-hint { font-size: .8rem; color: var(--muted); margin-top: 3px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.card-head h2, .card-head h3 { margin: 0; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge.blue { background: #e7f0ff; color: #1d4fb0; border-color: #c9dbff; }
.badge.green { background: #e6f6ef; color: #0d7a57; border-color: #bfe8d6; }
.badge.orange { background: #fff1e6; color: #b5480d; border-color: #ffd6b8; }
.badge.purple { background: #f1e9ff; color: #6a36d6; border-color: #dcc9ff; }
.count { background: var(--danger); color: #fff; border-radius: 99px; font-size: .7rem; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.active { color: var(--brand-2); border-color: var(--brand-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--panel); border-radius: 99px; padding: 3px 11px; font-size: .85rem; color: var(--text); cursor: pointer; }
.chip.active { background: var(--brand-2); color: #fff; border-color: var(--brand-2); }
.chip:hover { text-decoration: none; }

/* Avatare */
.av { border-radius: 50%; object-fit: cover; flex: none; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; position: relative; background: #8892a6; overflow: visible; }
.av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.av .dot { position: absolute; right: -1px; bottom: -1px; width: 28%; height: 28%; min-width: 9px; min-height: 9px; border-radius: 50%; background: #22c55e; border: 2px solid var(--panel); }

/* Gerüst */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { background: var(--brand); color: #dfe7f6; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; padding: 14px 10px; }
:root[data-theme="dark"] .side { background: #101826; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .side { background: #101826; } }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1.1rem; padding: 4px 8px 16px; }
.logo:hover { text-decoration: none; }
.logo svg { width: 30px; height: 30px; }
.nav a, .nav .nav-title { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: #dfe7f6; font-weight: 500; }
.nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.nav a.active { background: rgba(255,255,255,.16); color: #fff; }
.nav .ico { width: 22px; text-align: center; }
.nav .count { margin-left: auto; }
.nav-title { font-size: .72rem !important; text-transform: uppercase; letter-spacing: .06em; opacity: .65; margin-top: 12px; }
.nav .gdot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.side-foot { margin-top: auto; padding: 10px; font-size: .75rem; opacity: .6; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; padding: 10px 20px; }
.top .search { max-width: 460px; flex: 1; position: relative; }
.top .search input { padding-left: 34px; background: var(--panel); }
.top .search::before { content: "🔍"; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: .85rem; opacity: .6; }
.bell { position: relative; }
.bell .count { position: absolute; top: -2px; right: -4px; }
.page { padding: 20px; max-width: 1180px; width: 100%; margin: 0 auto; flex: 1; }
.page.wide { max-width: none; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 1050px) { .cols { grid-template-columns: 1fr; } .cols > aside { order: 2; } }
.menu-btn { display: none; }
.bottom-nav { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 50; left: 0; top: 0; width: 270px; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .menu-btn { display: inline-flex; }
  .page { padding: 14px 12px 80px; }
  .top { padding: 8px 12px; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--panel); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a { flex: 1; text-align: center; padding: 8px 0 6px; color: var(--muted); font-size: .7rem; position: relative; }
  .bottom-nav a .ico { display: block; font-size: 1.25rem; }
  .bottom-nav a.active { color: var(--brand-2); }
  .bottom-nav .count { position: absolute; top: 3px; left: 55%; }
}
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 40; }

/* Anmeldung */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero { background: linear-gradient(150deg, #0b2a5b 0%, #123f86 55%, #10a37f 140%); color: #e8efff; padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.auth-hero h1 { font-size: 2.3rem; color: #fff; }
.auth-hero ul { padding-left: 1.1em; line-height: 1.9; }
.auth-groups { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.auth-groups span { background: rgba(255,255,255,.12); border-radius: 99px; padding: 4px 12px; font-size: .9rem; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 30px; }
.auth-form .card { width: 100%; max-width: 420px; padding: 26px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-hero { padding: 30px 22px; } .auth-hero h1 { font-size: 1.7rem; } }

/* Listen von Personen */
.person { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.person:hover { background: var(--hover); }
.person .name { font-weight: 600; color: var(--text); }
.person .sub { font-size: .82rem; color: var(--muted); }
.grid-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.pcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; box-shadow: var(--shadow); }
.pcard .name { font-weight: 700; color: var(--text); }
.pcard .sub { font-size: .85rem; color: var(--muted); min-height: 1.3em; }
.pcard .why { font-size: .78rem; color: var(--accent); }

/* Beiträge */
.post { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; }
.post-head { display: flex; gap: 10px; padding: 14px 16px 6px; align-items: flex-start; }
.post-head .who { flex: 1; min-width: 0; }
.post-head .who a.name { font-weight: 600; color: var(--text); }
.post-body { padding: 4px 16px 10px; overflow-wrap: anywhere; }
.post-body h3 { margin: 4px 0 6px; }
.post-body .more { font-weight: 600; }
.post-foot { display: flex; gap: 4px; padding: 6px 10px; border-top: 1px solid var(--line); align-items: center; flex-wrap: wrap; }
.post.pinned { border-color: #f4c46b; }
.react-bar { display: flex; gap: 4px; flex-wrap: wrap; }
.react { border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px; font-size: .85rem; background: var(--panel); cursor: pointer; }
.react.mine { background: var(--mine); border-color: var(--brand-2); }
.emoji-pick { display: flex; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 3px 6px; box-shadow: var(--shadow); position: absolute; z-index: 60; }
.emoji-pick button { border: 0; padding: 3px 5px; background: transparent; font-size: 1.15rem; border-radius: 6px; }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; margin-top: 8px; }
.files .img { display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); max-height: 320px; }
.files .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.files.single { grid-template-columns: 1fr; }
.files.single .img { max-height: 460px; }
.files.single .img img { object-fit: contain; background: var(--panel-2); }
.doc { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--text); background: var(--panel-2); font-size: .88rem; }
.poll { margin-top: 8px; display: grid; gap: 6px; }
.poll-opt { position: relative; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; cursor: pointer; overflow: hidden; background: var(--panel); text-align: left; width: 100%; display: block; }
.poll-opt .bar { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--brand-2) 15%, transparent); }
.poll-opt span { position: relative; }
.poll-opt.mine { border-color: var(--brand-2); font-weight: 600; }
.comments { border-top: 1px solid var(--line); padding: 10px 16px; }
.comment { display: flex; gap: 8px; margin-bottom: 10px; }
.comment .bubble { background: var(--panel-2); border-radius: 10px; padding: 7px 11px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.comment.solved .bubble { border: 2px solid var(--accent); }
.composer { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 14px; box-shadow: var(--shadow); }
.composer textarea { border: 0; padding: 6px 2px; min-height: 60px; }
.composer textarea:focus { outline: none; }
.composer .tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 8px; }
.attach-list { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.attach-list .att { position: relative; border: 1px solid var(--line); border-radius: 8px; padding: 4px 26px 4px 8px; font-size: .8rem; background: var(--panel-2); }
.attach-list .att img { height: 46px; border-radius: 5px; display: block; }
.attach-list .att button { position: absolute; top: 2px; right: 2px; border: 0; background: transparent; padding: 0 4px; }

/* Chat */
.chat { display: flex; flex-direction: column; height: calc(100vh - 190px); min-height: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.chat.dm { height: calc(100vh - 110px); }
@media (max-width: 860px) { .chat { height: calc(100vh - 210px); } .chat.dm { height: calc(100vh - 140px); } }
.chat-head { padding: 10px 14px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.chat-pins { padding: 6px 14px; border-bottom: 1px solid var(--line); background: #fff8e6; font-size: .85rem; color: #6b4e00; cursor: pointer; }
:root[data-theme="dark"] .chat-pins { background: #2a2512; color: #f1d27a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chat-pins { background: #2a2512; color: #f1d27a; } }
.chat-log { flex: 1; overflow-y: auto; padding: 10px 6px 10px 10px; }
.day-sep { text-align: center; margin: 12px 0 6px; font-size: .75rem; color: var(--muted); }
.day-sep span { background: var(--panel-2); border: 1px solid var(--line); padding: 2px 10px; border-radius: 99px; }
.unread-sep { display: flex; align-items: center; gap: 8px; color: var(--danger); font-size: .75rem; font-weight: 600; margin: 6px 0; }
.unread-sep::before, .unread-sep::after { content: ""; flex: 1; height: 1px; background: var(--danger); opacity: .5; }
.msg { display: flex; gap: 10px; padding: 3px 8px; border-radius: 8px; position: relative; }
.msg:hover { background: var(--hover); }
.msg.cont { padding-top: 0; }
.msg.cont .av-slot { visibility: hidden; height: 0; }
.msg .av-slot { width: 36px; flex: none; }
.msg .meta { font-size: .78rem; color: var(--muted); }
.msg .meta b { color: var(--text); font-size: .9rem; margin-right: 6px; }
.msg .text { overflow-wrap: anywhere; }
.msg .text.deleted { color: var(--muted); font-style: italic; }
.msg.highlight { background: #fff6d6; }
:root[data-theme="dark"] .msg.highlight { background: #2d2914; }
.msg .reply-q { border-left: 3px solid var(--brand-2); padding: 1px 8px; margin: 2px 0 3px; font-size: .82rem; color: var(--muted); cursor: pointer; background: var(--panel-2); border-radius: 0 6px 6px 0; }
.msg .actions { position: absolute; right: 8px; top: -14px; display: none; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 1px; }
.msg:hover .actions, .msg.show-actions .actions { display: flex; }
.msg .actions button { border: 0; background: transparent; padding: 4px 6px; font-size: .95rem; }
.msg .pin-mark { font-size: .75rem; color: #b07d00; }
.chat-typing { height: 20px; font-size: .78rem; color: var(--muted); padding: 0 16px; }
.chat-compose { border-top: 1px solid var(--line); padding: 8px 10px; }
.chat-compose .reply-prev { font-size: .8rem; color: var(--muted); padding: 3px 8px; border-left: 3px solid var(--brand-2); margin-bottom: 6px; display: flex; gap: 6px; }
.chat-compose .bar { display: flex; gap: 6px; align-items: flex-end; }
.chat-compose textarea { min-height: 42px; max-height: 180px; resize: none; border-radius: 10px; }
.mention-pop { position: absolute; bottom: 100%; left: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); max-height: 220px; overflow-y: auto; min-width: 240px; z-index: 30; }
.mention-pop div { padding: 6px 10px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.mention-pop div.sel, .mention-pop div:hover { background: var(--hover); }

/* Direktnachrichten */
.dm-wrap { display: grid; grid-template-columns: 320px 1fr; gap: 14px; }
.dm-list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow-y: auto; height: calc(100vh - 110px); }
.dm-item { display: flex; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--text); align-items: center; }
.dm-item:hover { background: var(--hover); text-decoration: none; }
.dm-item.active { background: var(--mine); }
.dm-item .last { font-size: .82rem; color: var(--muted); }
.dm-item.unread .last { color: var(--text); font-weight: 600; }
@media (max-width: 860px) {
  .dm-wrap { grid-template-columns: 1fr; }
  .dm-wrap.has-active .dm-list { display: none; }
  .dm-wrap:not(.has-active) .dm-chat { display: none; }
  .dm-list { height: auto; }
}

/* Profil */
.cover { height: 180px; border-radius: var(--radius) var(--radius) 0 0; background: linear-gradient(120deg, #0b2a5b, #1d5fd1 60%, #10a37f); background-size: cover; background-position: center; }
.profile-card { padding: 0; overflow: hidden; }
.profile-main { padding: 0 20px 18px; }
.profile-main .av { margin-top: -56px; border: 4px solid var(--panel); }
.profile-main h1 { margin: 8px 0 2px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: 6px; } }

/* Gruppen */
.group-tile { display: flex; gap: 14px; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); }
.group-tile:hover { text-decoration: none; border-color: var(--brand-2); }
.group-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; flex: none; color: #fff; }
.group-banner { border-radius: var(--radius); color: #fff; padding: 18px 20px; margin-bottom: 14px; display: flex; gap: 14px; align-items: center; }
.group-banner .group-icon { background: rgba(255,255,255,.18); }
.group-banner h1 { margin: 0; color: #fff; }
.group-banner p { margin: 2px 0 0; opacity: .9; }
.grid-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }

/* Börse und Termine */
.listing { border-left: 4px solid var(--brand-2); }
.listing.t-gesuch { border-left-color: var(--warn); }
.listing.t-job { border-left-color: #6a36d6; }
.listing.t-kooperation { border-left-color: var(--accent); }
.listing.t-investment { border-left-color: #b07d00; }
.event { display: flex; gap: 14px; }
.event .date { width: 64px; flex: none; text-align: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); height: fit-content; }
.event .date .m { background: var(--brand-2); color: #fff; font-size: .72rem; font-weight: 700; text-transform: uppercase; padding: 2px 0; }
.event .date .d { font-size: 1.5rem; font-weight: 800; padding: 2px 0 0; }
.event .date .w { font-size: .7rem; color: var(--muted); padding-bottom: 4px; }

/* Benachrichtigungen */
.dropdown { position: absolute; right: 0; top: calc(100% + 6px); width: 380px; max-width: calc(100vw - 20px); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 40px rgba(16,24,40,.18); z-index: 70; max-height: 70vh; overflow-y: auto; }
.notif { display: flex; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--text); font-size: .9rem; }
.notif:hover { background: var(--hover); text-decoration: none; }
.notif.unread { background: var(--mine); }
.menu-list a, .menu-list button { display: flex; width: 100%; padding: 9px 14px; border: 0; border-radius: 0; background: transparent; color: var(--text); gap: 8px; }
.menu-list a:hover, .menu-list button:hover { background: var(--hover); text-decoration: none; }

/* Modal und Toast */
.modal-back { position: fixed; inset: 0; background: rgba(10, 15, 25, .5); z-index: 90; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 12px; overflow-y: auto; }
.modal { background: var(--panel); border-radius: 14px; width: 100%; max-width: 560px; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal.wide { max-width: 760px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #1a2233; color: #fff; padding: 9px 16px; border-radius: 10px; box-shadow: var(--shadow); font-size: .9rem; max-width: 90vw; pointer-events: auto; cursor: pointer; }
.toast.err { background: var(--danger); }
@media (max-width: 860px) { #toasts { bottom: 76px; } }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 95; display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.lightbox img { max-width: 95vw; max-height: 92vh; }

table.list { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.list th, table.list td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { color: var(--muted); font-weight: 600; font-size: .8rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.stat b { font-size: 1.5rem; display: block; }
.stat span { color: var(--muted); font-size: .8rem; }
.notice { background: #eef5ff; border: 1px solid #cfe0ff; color: #1b3d7a; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: .9rem; }
:root[data-theme="dark"] .notice { background: #16243c; border-color: #26406b; color: #cfe0ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .notice { background: #16243c; border-color: #26406b; color: #cfe0ff; } }
.notice.warn { background: #fff4e5; border-color: #ffd8a8; color: #7a3d00; }
.steps { padding-left: 1.2em; }
.steps li { margin-bottom: 6px; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .85rem; word-break: break-all; }
@media (max-width: 860px) {
  .group-banner { padding: 10px 14px; margin-bottom: 8px; gap: 10px; }
  .group-banner h1 { font-size: 1.15rem; }
  .group-banner .group-icon { width: 36px; height: 36px; font-size: 1.2rem; }
  .tabs { margin-bottom: 8px; }
  .tabs a { padding: 7px 10px; font-size: .9rem; }
}
