/* A2G Mitglieder-App – gleiches Design wie die Startseite, mobile first */

/* Schriften lokal gehostet (keine Verbindung zu Google). Lizenz: SIL Open Font License 1.1 */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(../fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(../fonts/inter-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(../fonts/inter-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url(../fonts/inter-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 600; font-display: swap; src: url(../fonts/bricolage-grotesque-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 800; font-display: swap; src: url(../fonts/bricolage-grotesque-latin-800-normal.woff2) format("woff2"); }

:root {
  --ink: #0d1726; --ink-2: #1c2a3f; --paper: #fbf8f2; --paper-2: #f2ede3; --card: #ffffff; --line: #e4ddd0;
  --muted: #5d6675; --green: #00b36b; --green-ink: #007a49; --green-soft: #d8f5e7; --coral: #ff5a3c;
  --coral-soft: #ffe3dc; --sun: #ffc531; --sky: #3d7bff; --dark-card: #0d1726;
  --shadow: 0 1px 2px rgba(13, 23, 38, .06), 0 10px 30px rgba(13, 23, 38, .08);
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f3efe7; --ink-2: #d9d4ca; --paper: #0b121d; --paper-2: #111b2a; --card: #152133; --line: #24344b;
    --muted: #9aa5b5; --green-ink: #39d996; --green-soft: #0f3a2a; --coral-soft: #3a1d17; --dark-card: #1d2c43;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #f3efe7; --ink-2: #d9d4ca; --paper: #0b121d; --paper-2: #111b2a; --card: #152133; --line: #24344b;
  --muted: #9aa5b5; --green-ink: #39d996; --green-soft: #0f3a2a; --coral-soft: #3a1d17; --dark-card: #1d2c43;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: var(--green-ink); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.stack { display: grid; gap: 16px; }
.stack-lg { display: grid; gap: 22px; }

/* Pilot-Hinweis */
.proto { background: var(--sun); color: #2a1f00; font-size: 13px; text-align: center; padding: 7px 16px; }

/* Logo */
.logo-mark { display: inline-block; font: 800 24px/1 var(--font-display); letter-spacing: -0.04em; background: var(--ink); color: var(--paper); padding: 8px 11px 9px; border-radius: 12px; text-decoration: none; }
.logo-mark b { color: var(--green); }
.logo-mark-sm { font-size: 18px; padding: 6px 9px 7px; border-radius: 10px; }

/* Topbar */
.topbar { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 16px; max-width: 680px; margin-inline: auto; background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(10px); }
.topbar-title { font: 700 17px var(--font-display); text-align: center; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: #04140c; font: 800 17px var(--font-display); display: grid; place-items: center; text-decoration: none; }

/* View */
.view { max-width: 680px; margin-inline: auto; padding: 8px 16px calc(110px + env(safe-area-inset-bottom)); outline: none; }
.view > * { animation: fadeUp .25s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.boot { min-height: 60vh; display: grid; place-items: center; }
.boot .logo-mark { font-size: 40px; animation: breathe 1.2s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.08); } }
.h1 { font-size: 36px; font-weight: 800; margin: 6px 0 6px; }
.h2 { font-size: 22px; font-weight: 800; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--green-ink); }
.back { font-weight: 700; text-decoration: none; font-size: 15px; }
.lead { font-size: 17px; color: var(--ink-2); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; background: var(--ink); color: var(--paper); font: 700 15px var(--font-body); text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(13, 23, 38, .16); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-green { background: var(--green); color: #04140c; }
.btn-coral { background: var(--coral); color: #fff; }
.btn-light { background: #fff; color: #0d1726; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn-ghost-light { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn-block { width: 100%; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* Karten */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 20px; box-shadow: var(--shadow); }
.card-link { display: block; text-decoration: none; color: inherit; }
.card-link:hover { border-color: var(--green); }
.empty { padding: 26px 18px; text-align: center; color: var(--muted); background: var(--card); border: 2px dashed var(--line); border-radius: 18px; font-size: 15px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); }
.tag-green { background: var(--green-soft); color: var(--green-ink); }
.tag-coral { background: var(--coral-soft); color: var(--coral); }
.tag-sun { background: var(--sun); color: #2a1f00; }

/* Monatskarte */
.month-card { background: var(--dark-card); color: #f3efe7; border-radius: 26px; padding: 24px 22px; position: relative; overflow: hidden; display: grid; gap: 12px; }
.month-card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(0, 179, 107, .45), transparent 70%); pointer-events: none; }
.month-card > * { position: relative; z-index: 1; }
.month-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.month-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #a9b3c3; }
.days-left { white-space: nowrap; font-size: 13px; font-weight: 700; background: rgba(255, 255, 255, .12); padding: 5px 10px; border-radius: 999px; }
.month-card h2 { font-size: 28px; }
.month-card p { color: #c3cad6; font-size: 15px; }
.month-card .chosen-tag { justify-self: start; background: var(--green); color: #04140c; font-weight: 800; font-size: 13px; padding: 5px 11px; border-radius: 999px; }
.month-card .progress { background: rgba(255, 255, 255, .14); }

.status-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini { padding: 16px; display: grid; gap: 4px; }
.mini-lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
.mini-val { font: 800 24px/1.1 var(--font-display); text-transform: capitalize; }
.pause-dots { display: flex; gap: 6px; margin-top: 4px; }
.pause-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.pause-dots i.on { background: var(--coral); }
.notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-left: 5px solid var(--sun); }

/* Fortschritt */
.progress { position: relative; height: 10px; background: var(--paper-2); border-radius: 10px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--green); border-radius: inherit; }
.progress .half { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: rgba(13, 23, 38, .25); }
.pmeta { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.pmeta b { color: var(--ink); }

/* Projekte */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 2px solid var(--line); background: var(--card); color: var(--ink); padding: 7px 14px; border-radius: 999px; font: 700 14px var(--font-body); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pcard { display: grid; gap: 10px; border-width: 2px; }
.pcard.is-chosen { border-color: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.pcard h3 { font-size: 21px; }
.pcard p { color: var(--muted); font-size: 15px; }
.pimg { height: 160px; border-radius: 16px; background: linear-gradient(135deg, var(--green-soft), var(--paper-2)); display: grid; place-items: center; font-size: 40px; overflow: hidden; }
.pimg img { width: 100%; height: 100%; object-fit: cover; }

/* Listen */
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; font-size: 15px; }
.list li .r { text-align: right; color: var(--muted); font-size: 14px; }

/* Abstimmungen */
.poll { display: grid; gap: 14px; }
.poll-state { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.poll-state.open { color: var(--green-ink); }
.opt { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: center; padding: 14px 16px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; font-weight: 600; }
.opt:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.opt input { width: 20px; height: 20px; accent-color: var(--green); margin: 0; }
.result { display: grid; gap: 6px; }
.result-row { display: flex; justify-content: space-between; font-size: 15px; font-weight: 600; }
.result-bar { height: 8px; background: var(--paper-2); border-radius: 8px; overflow: hidden; }
.result-bar i { display: block; height: 100%; background: var(--ink); border-radius: inherit; }
.result.is-mine .result-bar i { background: var(--green); }
.voted { background: var(--green-soft); color: var(--green-ink); padding: 12px 14px; border-radius: 12px; font-weight: 700; font-size: 15px; }

/* Wirkung */
.story { padding: 0; overflow: hidden; }
.story img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.story-body { padding: 20px; display: grid; gap: 12px; }
.story-nums { display: flex; flex-wrap: wrap; gap: 8px; }
.story-nums span { background: var(--paper-2); padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 14px; }
.story blockquote { margin: 0; padding-left: 14px; border-left: 4px solid var(--coral); font-style: italic; color: var(--ink-2); }
.reacts { display: flex; gap: 8px; flex-wrap: wrap; }
.react { border: 2px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 12px; font: 700 15px var(--font-body); color: var(--ink); cursor: pointer; }
.react[aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); }
.thanks { display: grid; gap: 10px; }
.thanks p { background: var(--sun); color: #2a1f00; padding: 14px 16px; border-radius: 4px 18px 18px 18px; font-weight: 600; font-size: 15px; }

/* Formulare */
.form { display: grid; gap: 8px; }
.form label { font-weight: 600; font-size: 14px; margin-top: 6px; }
input[type="text"], input[type="email"], input[type="number"], textarea, select {
  width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); font-size: 16px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--green); outline: none; }

/* Tabellen */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.num { text-align: right; white-space: nowrap; }

/* Login */
.login { min-height: 70vh; display: grid; align-content: center; gap: 18px; max-width: 440px; margin-inline: auto; }
.login .logo-mark { justify-self: start; }
.login h1 { font-size: 40px; font-weight: 800; }
.big-emoji { font-size: 52px; }

/* Tabbar */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom)); width: min(648px, calc(100% - 20px)); display: grid; grid-template-columns: repeat(5, 1fr); background: #0d1726; border-radius: 22px; padding: 6px; z-index: 30; box-shadow: 0 12px 30px rgba(13, 23, 38, .3); }
.tabbar a { position: relative; display: grid; justify-items: center; gap: 2px; padding: 7px 2px; color: #a9b3c3; font: 700 11px var(--font-body); border-radius: 16px; text-decoration: none; white-space: nowrap; }
.tabbar a span { font-size: 19px; line-height: 1.1; filter: grayscale(1); opacity: .7; }
.tabbar a[aria-current="page"] { background: rgba(255, 255, 255, .1); color: #fff; }
.tabbar a[aria-current="page"] span { filter: none; opacity: 1; }
.tab-dot { position: absolute; top: 5px; right: calc(50% - 18px); width: 9px; height: 9px; border-radius: 50%; background: var(--coral); }

/* Dialog */
.dlg { border: 0; border-radius: 24px; padding: 24px; width: min(440px, calc(100% - 32px)); background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.dlg::backdrop { background: rgba(13, 23, 38, .5); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; background: #0d1726; color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 15px; z-index: 90; transition: all .25s; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--coral); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
