/* FairShare – Neumorphism / Soft UI styles. Mobile-first.
   Palette from design spec:
     #EFF2F9 lightest · #E4EBF1 base · #B5BFC6 mid · #6E7F8D dark/accent
   Shadows: light #FAFBFF (100%) · dark #161B1D (~23%) */

:root {
  --bg: #e4ebf1;
  --surface: #e4ebf1;
  --light: #f7f9fd;          /* near #FAFBFF highlight */
  --dark: rgba(22, 27, 29, 0.20);  /* #161B1D @ ~20-23% */

  --text: #4a5a67;
  --heading: #3b4a57;
  --muted: #9aa6b1;          /* between #B5BFC6 and #6E7F8D */
  --accent: #6e7f8d;
  --accent-deep: #586876;

  --pos: #4f8d7b;            /* restrained green for positive balances */
  --neg: #c07d7d;            /* restrained red for negative balances */

  --radius: 18px;
  --radius-sm: 12px;

  /* neumorphic shadow presets */
  --nm-out:    -6px -6px 12px var(--light), 6px 6px 14px var(--dark);
  --nm-out-sm: -4px -4px  8px var(--light), 4px 4px  8px var(--dark);
  --nm-in:     inset -4px -4px 8px var(--light), inset 4px 4px 8px var(--dark);
  --nm-in-sm:  inset -2px -2px 5px var(--light), inset 3px 3px 6px var(--dark);

  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
[v-cloak] { display: none; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

h1, h2, h3 { color: var(--heading); font-weight: 600; }

/* ---------------- App bar ---------------- */
.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  padding-top: var(--safe-top);
}
/* changelog page uses a simple flex bar */
.appbar__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 8px 16px;
}
.appbar__title {
  flex: 1;
  min-width: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.appbar__title--text { font-size: 1.15rem; }

/* main app: icon row as a 3-column grid (1fr auto 1fr) so the logo is ALWAYS
   perfectly centered, regardless of how many icons sit on each side */
.appbar__bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 8px 12px;
}
/* group header: FAIRSHARE banner as background instead of the logo */
.appbar--group .appbar__bar {
  min-height: 72px;
  background-image: url('../img/header.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 0px 0px 25px 25px;
  box-shadow: 0 6px 16px rgba(22, 27, 29, 0.18);
}
.appbar__side {
  display: flex;
  align-items: center;
  gap: 8px;
}
.appbar__side--left { justify-content: flex-start; }
.appbar__side--right { justify-content: flex-end; gap: 0; }
.appbar__logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.appbar__logo {
  height: 50px;          /* home */
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}
.appbar--group .appbar__logo { height: 30px; }   /* inside a group */
.appbar__group {
  text-align: center;
  padding: 0 16px 10px;
  margin-top: 10px;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.iconbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: none;
  color: var(--accent);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--nm-out-sm);
  flex-shrink: 0;
  padding: 0;
}
.iconbtn:active { box-shadow: var(--nm-in-sm); }
.iconbtn .icon { width: 24px; height: 24px; display: block; }

/* Appbar icons are flat (no neumorphism), just the plain icon */
.appbar .iconbtn {
  background: transparent;
  box-shadow: none;
}
.appbar .iconbtn:active {
  background: transparent;
  box-shadow: none;
  opacity: 0.55;
}

/* ---------------- Account menu (top-right profile) ---------------- */
.menu-overlay { position: fixed; inset: 0; z-index: 45; }
.account-menu {
  position: fixed;
  top: calc(var(--safe-top) + 60px);
  right: 14px;
  z-index: 46;
  width: min(248px, 82vw);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--nm-out);
  padding: 18px;
}
.account-menu__name { font-weight: 600; color: var(--heading); }
.account-menu__email {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 3px 0 16px;
  word-break: break-word;
}
.account-menu .btn + .btn { margin-top: 10px; }

/* ---------------- Home key visual ---------------- */
.keyvisual {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  background-image: url('../img/keyvisual.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 0px 0px 25px 25px;
}
.keyvisual__profile {
  position: absolute;
  top: calc(var(--safe-top) + 12px);
  right: 14px;
  background: transparent;
  box-shadow: none;
}
.keyvisual__profile:active { background: transparent; box-shadow: none; opacity: 0.55; }

/* ---------------- Content ---------------- */
/* Bottom clearance for the fixed wallet/tab bar is handled once, on the footer. */
.content {
  flex: 1;
  padding: 8px 20px;
}
.home > .card:first-child { margin-top: 20px; }
.hero { text-align: center; padding: 16px 8px 10px; }
.hero__logo {
  font-size: 2rem;
  width: 84px; height: 84px;
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--nm-out);
}
.hero h2 { margin: 8px 0 8px; font-size: 1.5rem; line-height: 1.25; }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--nm-out);
  padding: 22px;
  margin-bottom: 22px;
}
.card h3 { margin: 0 0 16px; font-size: 1.1rem; }

/* ---------------- Wallet (stacked cards at the bottom edge) ---------------- */
.wallet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 34;
  background: rgba(22, 27, 29, 0.28);
}
.wallet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  max-width: 560px;
  margin: 0 auto;
  z-index: 35;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}
.wallet-card {
  pointer-events: auto;
  background: var(--surface);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -7px 22px rgba(22, 27, 29, 0.16);
  margin-top: -26px;            /* overlap → looks like inserted/stacked cards */
  transition: margin .25s ease, transform .25s ease;
}
.wallet-card:first-child { margin-top: 0; }
.wallet-card.open { margin-top: 0; }   /* selected card sits clear of the stack */
.wallet-card__head {
  position: relative;
  width: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 10px 15px 40px 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}
.wallet-card__grip {
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: var(--dark);
  opacity: .4;
}
.wallet-card__title { font-size: 1.05rem; font-weight: 600; color: var(--heading); }
.wallet-card__body {
  max-height: 0;
  overflow: hidden;
  padding: 0 22px;
  transition: max-height .3s ease;
}
.wallet-card.open .wallet-card__body {
  max-height: 72vh;
  overflow-y: auto;
  padding: 2px 22px calc(48px + var(--safe-bottom));
}
/* accent (Gruppe beitreten) */
.wallet-card--accent { background: var(--accent); }
.wallet-card--accent .wallet-card__title { color: #fff; }
.wallet-card--accent .wallet-card__grip { background: #fff; opacity: .55; }

/* Accent variant (e.g. "Gruppe beitreten") – soft shadows tuned for the
   accent surface instead of the light base. */
.card--accent {
  background: var(--accent);
  box-shadow:
    -6px -6px 12px rgba(255, 255, 255, 0.16),
     6px  6px 16px rgba(22, 27, 29, 0.30);
}
.card--accent h3 { color: #fff; }
.card--accent .field > span,
.wallet-card--accent .field > span { color: rgba(255, 255, 255, 0.82); }
.card--accent input,
.wallet-card--accent input {
  background: var(--accent);
  color: #fff;
  box-shadow:
    inset -3px -3px 6px rgba(255, 255, 255, 0.14),
    inset  3px  3px 7px rgba(22, 27, 29, 0.34);
}
.card--accent input::placeholder,
.wallet-card--accent input::placeholder { color: rgba(255, 255, 255, 0.6); }
.card--accent input:focus,
.wallet-card--accent input:focus {
  box-shadow:
    inset -3px -3px 6px rgba(255, 255, 255, 0.14),
    inset  3px  3px 7px rgba(22, 27, 29, 0.34),
    0 0 0 2px rgba(255, 255, 255, 0.35);
}
.card--accent .btn,
.wallet-card--accent .btn {
  background: var(--accent);
  color: #fff;
  box-shadow:
    -5px -5px 10px rgba(255, 255, 255, 0.16),
     5px  5px 12px rgba(22, 27, 29, 0.32);
}
.card--accent .btn:active,
.wallet-card--accent .btn:active {
  box-shadow:
    inset -3px -3px 6px rgba(255, 255, 255, 0.14),
    inset  3px  3px 7px rgba(22, 27, 29, 0.34);
}
.card--accent .btn:disabled,
.wallet-card--accent .btn:disabled {
  box-shadow:
    -5px -5px 10px rgba(255, 255, 255, 0.16),
     5px  5px 12px rgba(22, 27, 29, 0.32);
}

/* ---------------- Account / Auth ---------------- */
.auth-switch { text-align: center; font-size: 0.9rem; margin: 14px 0 6px; color: var(--muted); }
.auth-switch a { color: var(--accent); font-weight: 600; cursor: pointer; }
.auth-hint { font-size: 0.78rem; line-height: 1.4; margin: 8px 0 0; }

/* ---------------- Danger zone ---------------- */
.owner-note { font-size: 0.82rem; margin-top: 24px; text-align: center; }
.danger-zone { margin-top: 30px; }
.danger-zone .owner-note { margin-top: 14px; margin-bottom: 18px; text-align: left; }
.btn--danger { color: var(--neg); }
.btn--danger:active { box-shadow: var(--nm-in); }

/* ---------------- Forms ---------------- */
.field { display: block; margin-bottom: 16px; }
.field > span {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 8px;
  padding-left: 4px;
}
input, select, textarea {
  width: 100%;
  padding: 13px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--nm-in);
  -webkit-appearance: none;
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  box-shadow: var(--nm-in), 0 0 0 2px rgba(110, 127, 141, 0.25);
}
textarea { resize: vertical; }
select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--accent-deep);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--nm-out);
  transition: box-shadow .12s ease;
}
.btn:active { box-shadow: var(--nm-in); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: var(--nm-out); }
.btn--primary { color: #fff; background: var(--accent); }
.btn--primary:active { box-shadow: var(--nm-in); }

/* ---------------- Lists ---------------- */
.list { list-style: none; margin: 0; padding: 0; }
.list__row, .balance, .settle, .expense, .group-row, .member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--nm-out-sm);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.list__row { cursor: pointer; }
.list__row:active { box-shadow: var(--nm-in-sm); }

/* group overview rows */
.group-row__name {
  flex: 1;
  min-width: 0;
  cursor: pointer;
  font-weight: 600;
  color: var(--heading);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.group-row__actions { display: flex; gap: 12px; flex-shrink: 0; }
.group-row__chevron { cursor: pointer; }

/* member overview rows */
.member-row__name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  color: var(--heading);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-row__actions { display: flex; gap: 12px; flex-shrink: 0; }

.section-title {
  margin: 22px 6px 12px;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ---------------- Segmented control (neumorphic) ---------------- */
.segmented {
  display: flex;
  gap: 6px;
  background: var(--surface);
  border-radius: 999px;
  box-shadow: var(--nm-in);
  padding: 6px;
  margin: 4px 0 18px;
}
.segmented button {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 11px 12px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: color .12s ease;
}
.segmented button.active {
  background: var(--surface);
  color: var(--accent-deep);
  box-shadow: var(--nm-out-sm);
}

/* ---------------- Expenses ---------------- */
.expense__main { min-width: 0; }
.expense__desc { font-weight: 600; color: var(--heading); cursor: pointer; }
.expense__meta { font-size: 0.78rem; margin-top: 3px; }
.expense__right { text-align: right; white-space: nowrap; }
.expense__amount { font-weight: 700; color: var(--heading); }
.expense__actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 3px; }
.link-del, .link-edit {
  background: none; border: none;
  font-size: 0.76rem; cursor: pointer; padding: 2px 0;
}
.link-del { color: var(--neg); }
.link-edit { color: var(--accent); }

/* ---------------- Expenses total ---------------- */
.sum-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--nm-out-sm);
  padding: 14px 18px;
  margin: 0 0 18px;
}
.sum-bar__label { color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.sum-bar__value { color: var(--heading); font-weight: 700; font-size: 1.25rem; }

/* ---------------- Per-payer breakdown ---------------- */
.pie-wrap { display: flex; justify-content: center; margin: 6px 0 22px; }
.pie { width: 180px; height: 180px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.12)); }

.payer {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--nm-out-sm);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.payer__head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.payer__dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.payer__name { font-weight: 600; color: var(--heading); }
.payer__total { margin-left: auto; font-weight: 700; color: var(--heading); white-space: nowrap; }
.payer__items {
  list-style: none;
  margin: 8px 0 0;
  padding: 0 0 0 22px;
}
.payer__items li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.86rem;
  padding: 3px 0;
}
.payer__item-desc { color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- Balances ---------------- */
.pos { color: var(--pos); font-weight: 700; }
.neg { color: var(--neg); font-weight: 700; }
.muted { color: var(--muted); }
.settle__amount { font-weight: 700; color: var(--accent-deep); white-space: nowrap; }

/* ---------------- Empty state ---------------- */
.empty { text-align: center; padding: 48px 16px; }
.empty p { margin: 5px 0; }

/* ---------------- Inline add ---------------- */
.add-inline { display: flex; gap: 12px; margin-top: 8px; }
.add-inline input { flex: 1; }
.add-inline .btn { width: auto; min-width: 56px; }
.share-box { margin-top: 30px; }

/* ---------------- FAB ---------------- */
.fab {
  position: fixed;
  right: max(20px, calc(50% - 280px + 20px));
  bottom: calc(86px + var(--safe-bottom));
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 2rem;
  line-height: 1;
  box-shadow: var(--nm-out);
  cursor: pointer;
  z-index: 25;
}
.fab:active { box-shadow: var(--nm-in); }

/* ---------------- Bottom tab bar ---------------- */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  gap: 6px;
  background: var(--bg);
  padding: 10px 16px calc(10px + var(--safe-bottom));
  z-index: 24;
}
.tabbar button {
  flex: 1;
  background: var(--surface);
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  color: var(--muted);
  cursor: pointer;
  box-shadow: var(--nm-out-sm);
}
.tabbar button.active {
  color: var(--accent-deep);
  font-weight: 600;
  box-shadow: var(--nm-in-sm);
}
.tabbar__icon { width: 24px; height: 24px; display: block; }

/* ---------------- Modal ---------------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(58, 74, 87, 0.28);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: flex-end;
  z-index: 40;
}
.modal__sheet {
  background: var(--bg);
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  border-radius: 26px 26px 0 0;
  padding: 24px 22px calc(24px + var(--safe-bottom));
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 -8px 30px rgba(22, 27, 29, 0.18);
  animation: slideUp .22s ease;
}
.modal__sheet h3 { margin: 0 0 18px; }
.modal__actions { display: flex; gap: 12px; margin-top: 10px; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ---------------- Chips ---------------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 9px 16px;
  border: none;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--nm-out-sm);
}
.chip--on {
  color: #fff;
  background: var(--accent);
  box-shadow: var(--nm-in-sm);
}

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(100px + var(--safe-bottom));
  transform: translateX(-50%);
  background: var(--accent-deep);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  box-shadow: 0 6px 18px rgba(22, 27, 29, 0.25);
  z-index: 60;
  max-width: 90%;
  text-align: center;
}

/* ---------------- Footer ---------------- */
.footer {
  text-align: center;
  padding: 16px 0 calc(120px + var(--safe-bottom));
  font-size: 0.8rem;
}
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--accent); }

/* ============================================================
   DARK MODE – glassmorphism with glowing edges
   ============================================================ */
[data-theme="dark"] {
  --bg: #0e1217;
  --surface: rgba(255, 255, 255, 0.055);
  --light: rgba(255, 255, 255, 0.22);
  --dark: rgba(0, 0, 0, 0.55);

  --text: #cfd8e0;
  --heading: #f1f5f9;
  --muted: #8b97a3;
  --accent: #a9bccc;
  --accent-deep: #d4e1ec;
  --pos: #6fd6b4;
  --neg: #e58c8c;

  /* raised glass: top highlight (glow edge) + hairline border + depth */
  --nm-out:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.30),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 12px 30px rgba(0, 0, 0, 0.55);
  --nm-out-sm:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.07),
    0 6px 16px rgba(0, 0, 0, 0.45);
  /* recessed glass */
  --nm-in:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.10),
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    inset 0 3px 10px rgba(0, 0, 0, 0.5);
  --nm-in-sm:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 2px 6px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] body { background: #0b0e12; }
[data-theme="dark"] #app {
  background:
    radial-gradient(130% 50% at 50% -8%, rgba(120, 150, 185, 0.14), transparent 60%),
    radial-gradient(120% 50% at 50% 108%, rgba(120, 150, 185, 0.07), transparent 60%),
    #0b0e12;
}

/* frosted glass blur on the main surfaces */
[data-theme="dark"] .card,
[data-theme="dark"] .btn,
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea,
[data-theme="dark"] .list__row,
[data-theme="dark"] .balance,
[data-theme="dark"] .settle,
[data-theme="dark"] .expense,
[data-theme="dark"] .group-row,
[data-theme="dark"] .member-row,
[data-theme="dark"] .wallet-card,
[data-theme="dark"] .modal__sheet,
[data-theme="dark"] .segmented,
[data-theme="dark"] .chip,
[data-theme="dark"] .account-menu,
[data-theme="dark"] .iconbtn {
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

/* translucent top/bottom bars */
[data-theme="dark"] .appbar { background: rgba(12, 16, 21, 0.55); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
[data-theme="dark"] .tabbar { background: rgba(12, 16, 21, 0.6); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }

/* primary action: brighter, glowing glass */
[data-theme="dark"] .btn--primary {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 0 18px rgba(170, 200, 230, 0.28),
    0 10px 26px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] .fab {
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.16),
    0 0 20px rgba(170, 200, 230, 0.3),
    0 10px 26px rgba(0, 0, 0, 0.5);
}

/* glowing focus ring on inputs */
[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
  box-shadow:
    var(--nm-in),
    0 0 0 1px rgba(255, 255, 255, 0.4),
    0 0 14px rgba(170, 200, 230, 0.35);
}

/* segmented active = glowing glass pill */
[data-theme="dark"] .segmented button.active {
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 0 14px rgba(170, 200, 230, 0.25);
}

/* chips */
[data-theme="dark"] .chip--on {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.16),
    0 0 12px rgba(170, 200, 230, 0.25);
}

/* accent cards (Gruppe beitreten) become neutral glass in dark */
[data-theme="dark"] .card--accent,
[data-theme="dark"] .wallet-card--accent { background: var(--surface); }
[data-theme="dark"] .card--accent .field > span,
[data-theme="dark"] .wallet-card--accent .field > span,
[data-theme="dark"] .wallet-card--accent .wallet-card__title { color: var(--muted); }
[data-theme="dark"] .wallet-card--accent .wallet-card__title { color: var(--heading); }
[data-theme="dark"] .wallet-card--accent .wallet-card__grip { background: rgba(255, 255, 255, 0.4); }
[data-theme="dark"] .card--accent input,
[data-theme="dark"] .wallet-card--accent input {
  background: var(--surface); color: var(--text); box-shadow: var(--nm-in);
}
[data-theme="dark"] .card--accent input::placeholder,
[data-theme="dark"] .wallet-card--accent input::placeholder { color: var(--muted); }
[data-theme="dark"] .card--accent .btn,
[data-theme="dark"] .wallet-card--accent .btn {
  background: var(--surface); color: var(--accent-deep); box-shadow: var(--nm-out);
}

/* modal backdrop a touch darker */
[data-theme="dark"] .modal { background: rgba(0, 0, 0, 0.5); }

/* toast as dark glass */
[data-theme="dark"] .toast {
  background: rgba(30, 38, 47, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.18), 0 0 0 1px rgba(255,255,255,0.08), 0 8px 24px rgba(0,0,0,0.5);
}

/* account-menu section label */
.account-menu__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin: 16px 0 8px;
}

/* keep icons readable on the (light) header banner / key visual in dark mode */
[data-theme="dark"] .appbar--group .iconbtn { color: #3b4a57; }
[data-theme="dark"] .keyvisual__profile { color: #3b4a57; }
