/* Netzwerk mit Herz – App-Styles. Farben aus dem Logo (Rot/Schwarz/Weiß) + Grau, Grün, Rot */
:root {
  --brand: #E20F1A;
  --brand-dark: #B80B14;
  --brand-soft: #FDE8E9;
  --ink: #1A1A1A;
  --ink-2: #3A3A3A;
  --grey-1: #F5F5F6;
  --grey-2: #E8E8EA;
  --grey-3: #C9C9CE;
  --grey-4: #8A8A92;
  --grey-5: #5E5E66;
  --green: #2E8B57;
  --green-soft: #E3F4EA;
  --red: #C62828;
  --red-soft: #FBE4E4;
  --blue: #3A6EA5;
  --blue-soft: #E5EEF7;
  --amber: #B7791F;
  --amber-soft: #FCF1DC;
  --bg: #F3F3F5;
  --card: #FFFFFF;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 14px rgba(0,0,0,.05);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; font-weight: 750; letter-spacing: -.01em; }
h1 { font-size: 1.55rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
small, .muted { color: var(--grey-5); }
.muted-sm { color: var(--grey-4); font-size: .85rem; }
hr { border: 0; border-top: 1px solid var(--grey-2); margin: 1.2rem 0; }

/* ---------- Top bar */
.topbar { position: sticky; top: 0; z-index: 30; height: 60px; display: flex; align-items: center; gap: 14px; padding: 0 16px; background: var(--ink); color: #fff; }
.topbar .brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; white-space: nowrap; }
.topbar .brand:hover { text-decoration: none; }
.topbar .brand img { width: 40px; height: 40px; border-radius: 50%; background: #fff; }
.topbar .brand span em { color: var(--brand); font-style: normal; }
.topbar form.search { flex: 1; max-width: 520px; margin-left: auto; }
.topbar form.search input { width: 100%; height: 38px; border-radius: 19px; border: 0; padding: 0 16px 0 38px; background: #2E2E2E url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23aaa' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 4 4'/%3E%3C/svg%3E") no-repeat 14px center; color: #fff; font-size: .95rem; }
.topbar form.search input::placeholder { color: #aaa; }
.topbar .me { display: flex; align-items: center; gap: 8px; color: #fff; }
.menu-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.6rem; cursor: pointer; padding: 4px; }

/* ---------- Shell */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: calc(100vh - 60px); }
.sidebar { background: #fff; border-right: 1px solid var(--grey-2); padding: 16px 10px; position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; }
.sidebar a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 600; }
.sidebar a:hover { background: var(--grey-1); text-decoration: none; }
.sidebar a.active { background: var(--brand-soft); color: var(--brand-dark); }
.sidebar a .ic { width: 22px; text-align: center; font-size: 1.05rem; }
.sidebar a .count { margin-left: auto; background: var(--brand); color: #fff; border-radius: 10px; font-size: .72rem; padding: 1px 7px; }
.sidebar .sep { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--grey-4); padding: 16px 12px 6px; }
main { padding: 24px; max-width: 1180px; width: 100%; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.bottomnav { display: none; }

/* ---------- Cards & grid */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .right { margin-left: auto; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.stack > * + * { margin-top: 10px; }

/* ---------- Hero „Nächstes Treffen“ */
.hero { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%); color: #fff; border-radius: var(--radius); padding: 22px; margin-bottom: 18px; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.hero::after { content: "♥"; position: absolute; right: -10px; bottom: -50px; font-size: 200px; opacity: .1; line-height: 1; }
.hero .label { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; opacity: .85; font-weight: 700; }
.hero h2 { font-size: 1.5rem; margin: 6px 0; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 6px 18px; opacity: .95; }
.hero .btn { background: #fff; color: var(--brand-dark); }
.hero .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.hero .warn { background: rgba(0,0,0,.25); border-radius: 10px; padding: 10px 12px; margin-top: 12px; font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; position: relative; z-index: 1; }

/* ---------- Stats */
.stat { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.stat .n { font-size: 1.6rem; font-weight: 800; }
.stat .l { color: var(--grey-5); font-size: .85rem; }
.stat.red .n { color: var(--brand); } .stat.green .n { color: var(--green); }

/* ---------- Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; background: var(--brand); color: #fff; font: inherit; font-weight: 650; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn.sm { height: 32px; padding: 0 12px; font-size: .88rem; border-radius: 8px; }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--grey-3); }
.btn.ghost:hover { background: var(--grey-1); }
.btn.dark { background: var(--ink); } .btn.dark:hover { background: #000; }
.btn.green { background: var(--green); } .btn.green:hover { background: #246F45; }
.btn.grey { background: var(--grey-5); }
.btn.danger { background: #fff; color: var(--red); border-color: #E8B4B4; }
.btn.danger:hover { background: var(--red-soft); }
.btn.block { width: 100%; }
.btn-link { background: none; border: 0; color: var(--brand); cursor: pointer; font: inherit; padding: 0; }
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 4px; color: var(--ink-2); }
.field { margin-bottom: 14px; }
.field .hint { font-size: .8rem; color: var(--grey-4); margin-top: 3px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=url], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--grey-3); border-radius: 10px; background: #fff; font: inherit; color: var(--ink); }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(226,15,26,.15); }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; }
.check input { margin-top: 4px; accent-color: var(--brand); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; }
.inline-form { display: inline; }
.hp { position: absolute; left: -9999px; }

/* ---------- Badges, Alerts */
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: .75rem; font-weight: 700; vertical-align: middle; white-space: nowrap; }
.badge-grey { background: var(--grey-2); color: var(--grey-5); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-brand { background: var(--brand); color: #fff; }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; border-left: 4px solid; background: #fff; box-shadow: var(--shadow); }
.alert-success { border-color: var(--green); background: var(--green-soft); }
.alert-danger { border-color: var(--red); background: var(--red-soft); }
.alert-warning { border-color: var(--amber); background: var(--amber-soft); }
.alert-info { border-color: var(--blue); background: var(--blue-soft); }

/* ---------- Avatar */
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; object-fit: cover; background: var(--grey-2); color: var(--grey-5); font-weight: 800; flex-shrink: 0; }
.avatar-xs { width: 28px; height: 28px; font-size: .7rem; }
.avatar-sm { width: 36px; height: 36px; font-size: .8rem; }
.avatar-md { width: 48px; height: 48px; font-size: 1rem; }
.avatar-lg { width: 96px; height: 96px; font-size: 1.8rem; }
.avatar-xl { width: 140px; height: 140px; font-size: 2.6rem; border: 4px solid #fff; box-shadow: var(--shadow); }
.avatar-sys { background: var(--brand); color: #fff; }

/* ---------- Members */
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.member-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 10px; color: inherit; }
.member-card:hover { text-decoration: none; box-shadow: 0 4px 20px rgba(0,0,0,.1); }
.member-card .top { display: flex; gap: 12px; align-items: center; }
.member-card .name { font-weight: 750; }
.member-card .comp { color: var(--grey-5); font-size: .88rem; }
.member-card .contact { font-size: .86rem; display: grid; gap: 2px; }
.member-card .contact a { color: var(--ink-2); }
.profile-cover { height: 140px; border-radius: var(--radius) var(--radius) 0 0; background: linear-gradient(135deg, var(--ink) 0%, #3a3a3a 60%, var(--brand) 140%); }
.profile-head { background: #fff; border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow); padding: 0 20px 18px; margin-bottom: 18px; }
.profile-head .row { display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; }
.profile-head .avatar-xl { margin-top: -60px; }
.profile-head .who { flex: 1; min-width: 200px; padding-top: 10px; }
.profile-head .who h1 { margin: 0; }
.kv { display: grid; grid-template-columns: 26px 1fr; gap: 6px 4px; font-size: .92rem; }
.kv span:nth-child(odd) { color: var(--grey-4); text-align: center; }
.company-logo { width: 64px; height: 64px; object-fit: contain; border-radius: 10px; background: var(--grey-1); padding: 4px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 10px; }
.gallery a, .gallery .gi { position: relative; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--grey-1); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery .gi form { position: absolute; top: 4px; right: 4px; }
.gallery .gi button { background: rgba(0,0,0,.6); color: #fff; border: 0; border-radius: 50%; width: 26px; height: 26px; cursor: pointer; }

/* ---------- Feed */
.post { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.post .ph { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.post .ph .t { font-weight: 650; line-height: 1.3; }
.post .ph .t a { color: var(--ink); }
.post .ph .time { font-size: .8rem; color: var(--grey-4); }
.post .body { white-space: normal; margin: 6px 0; }
.post .img { margin: 10px -16px; }
.post .img img { width: 100%; max-height: 520px; object-fit: cover; display: block; }
.post .bar { display: flex; gap: 14px; border-top: 1px solid var(--grey-2); padding-top: 8px; margin-top: 8px; font-size: .9rem; }
.post .bar button, .post .bar a { background: none; border: 0; color: var(--grey-5); cursor: pointer; font: inherit; font-weight: 600; padding: 4px 6px; border-radius: 6px; }
.post .bar button:hover { background: var(--grey-1); }
.post .bar .liked { color: var(--brand); }
.post .type-ic { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--grey-1); flex-shrink: 0; }
.post.admin-only { border: 1px dashed var(--grey-3); }
.comments { margin-top: 8px; display: grid; gap: 8px; }
.comment { display: flex; gap: 8px; }
.comment .cb { background: var(--grey-1); border-radius: 12px; padding: 6px 12px; font-size: .9rem; }
.comment-form { display: flex; gap: 8px; margin-top: 8px; }
.comment-form input { min-height: 36px; border-radius: 18px; }
.composer textarea { min-height: 70px; border: 0; background: var(--grey-1); }
.composer .row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }

/* ---------- Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--grey-5); font-weight: 700; padding: 8px 10px; border-bottom: 2px solid var(--grey-2); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--grey-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
.vote-cell { text-align: center; }
.dot { display: inline-block; width: 22px; height: 22px; border-radius: 50%; line-height: 22px; text-align: center; font-size: .75rem; font-weight: 800; color: #fff; }
.dot.yes { background: var(--green); } .dot.no { background: var(--red); } .dot.maybe { background: var(--grey-4); } .dot.none { background: var(--grey-2); color: var(--grey-4); }

/* ---------- Voting */
.vote-option { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--grey-2); border-radius: 12px; margin-bottom: 10px; }
.vote-option .date { flex: 1; min-width: 200px; font-weight: 700; }
.vote-option .date small { display: block; font-weight: 500; }
.seg { display: inline-flex; border: 1px solid var(--grey-3); border-radius: 10px; overflow: hidden; }
.seg input { display: none; }
.seg label { margin: 0; padding: 8px 14px; cursor: pointer; font-weight: 650; color: var(--grey-5); border-right: 1px solid var(--grey-3); }
.seg label:last-of-type { border-right: 0; }
.seg input.yes:checked + label { background: var(--green); color: #fff; }
.seg input.maybe:checked + label { background: var(--grey-5); color: #fff; }
.seg input.no:checked + label { background: var(--red); color: #fff; }
.bars { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--grey-2); width: 100%; }
.bars span { display: block; }
.bars .y { background: var(--green); } .bars .m { background: var(--grey-4); } .bars .n { background: var(--red); }
.option-winner { border-color: var(--green); background: var(--green-soft); }
.progress { height: 10px; background: var(--grey-2); border-radius: 5px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand); }

/* ---------- Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--grey-2); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--grey-5); font-weight: 650; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs a.active { color: var(--brand); border-color: var(--brand); }
.tabs a:hover { text-decoration: none; color: var(--ink); }

.list-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--grey-2); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.empty { text-align: center; color: var(--grey-4); padding: 26px 10px; }
.diff { font-size: .84rem; }
.diff del { color: var(--red); background: var(--red-soft); text-decoration: line-through; padding: 0 3px; border-radius: 3px; }
.diff ins { color: var(--green); background: var(--green-soft); text-decoration: none; padding: 0 3px; border-radius: 3px; }
.prose h2 { margin-top: 1.4em; color: var(--brand-dark); }
.prose h3 { margin-top: 1.2em; }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: .3em; }

/* ---------- Guest pages */
.guest { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: radial-gradient(circle at 20% 20%, #fff 0, var(--grey-1) 60%), var(--grey-1); }
.guest-box { width: 100%; max-width: 440px; }
.guest-box.wide { max-width: 640px; }
.guest-logo { text-align: center; margin-bottom: 14px; }
.guest-logo img { width: 150px; height: 150px; }
.guest .card { padding: 26px; }
.guest-links { text-align: center; margin-top: 14px; font-size: .9rem; display: grid; gap: 6px; }
.big-icon { font-size: 3rem; color: var(--brand); text-align: center; }

/* ---------- Responsive */
@media (max-width: 1100px) { .cols-main { grid-template-columns: minmax(0, 1fr); } .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 60px; bottom: 0; width: 270px; z-index: 40; transform: translateX(-100%); transition: transform .2s; box-shadow: 4px 0 24px rgba(0,0,0,.15); height: auto; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 60px 0 0 0; background: rgba(0,0,0,.35); z-index: 35; }
  .menu-toggle { display: block; }
  .topbar .brand span { display: none; }
  .topbar .me .nm { display: none; }
  main { padding: 16px 16px 90px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .bottomnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--grey-2); padding-bottom: env(safe-area-inset-bottom); }
  .bottomnav a { flex: 1; text-align: center; padding: 8px 0 7px; color: var(--grey-5); font-size: .7rem; font-weight: 650; }
  .bottomnav a .ic { display: block; font-size: 1.25rem; line-height: 1.2; }
  .bottomnav a.active { color: var(--brand); }
  .bottomnav a:hover { text-decoration: none; }
  h1 { font-size: 1.3rem; }
  .profile-head .avatar-xl { width: 110px; height: 110px; margin-top: -50px; }
  .page-head .actions { margin-left: 0; }
}
@media (max-width: 520px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .seg label { padding: 8px 10px; } }

@media print {
  .topbar, .sidebar, .bottomnav, .no-print, .btn { display: none !important; }
  .shell { display: block; } main { padding: 0; } .card { box-shadow: none; border: 1px solid #ddd; }
}
