/* suendermann.me – Bausteine für Startseite, Anmeldung und alle Werkzeug-Seiten.
   Farben und Themen stehen in theme.css. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; background: var(--grain); pointer-events: none; z-index: 0; opacity: .7; }
body > * { position: relative; z-index: 1; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.025em; line-height: 1.1; }
[hidden] { display: none !important; }
.i { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.spacer { flex: 1; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

/* ------------------------------------------------------------------ */
/* Knöpfe                                                              */
/* ------------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 600 14px/1 var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .08s, box-shadow .15s, filter .15s; -webkit-tap-highlight-color: transparent; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); box-shadow: 0 10px 22px -12px var(--accent); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.dark { background: var(--text); color: var(--bg); border-color: transparent; }
.btn.block { width: 100%; height: 50px; font-size: 15px; }
.btn.lg { height: 50px; padding: 0 24px; font-size: 15px; }
.btn.sm { height: 34px; padding: 0 13px; font-size: 13px; }
.btn.xs { height: 28px; padding: 0 10px; font-size: 12.5px; gap: 6px; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn .i { width: 17px; height: 17px; }
.icon-btn { width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); display: inline-grid; place-items: center; cursor: pointer; flex: none; transition: background .15s, border-color .15s; }
.icon-btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.sm .i { width: 16px; height: 16px; }
.icon-btn.ghost { border-color: transparent; background: transparent; }
.icon-btn.ghost:hover { background: var(--surface-2); }
:is(.btn, .icon-btn, .tile, .chip, a):focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring); }

/* ------------------------------------------------------------------ */
/* Formulare                                                           */
/* ------------------------------------------------------------------ */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; min-width: 0; }
.field > label, .field .label { font-size: 13.5px; font-weight: 600; }
.input-wrap { position: relative; }
.input-wrap > .i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input, .select, .textarea { width: 100%; height: 46px; padding: 0 14px; border-radius: 13px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.input-wrap > .input { padding-left: 44px; height: 50px; }
.textarea { height: auto; min-height: 110px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
:is(.input, .select, .textarea):focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.input.sm, .select.sm { height: 36px; font-size: 14px; border-radius: 10px; }
.reveal { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted); border-radius: 999px; cursor: pointer; display: grid; place-items: center; }
.reveal:hover { color: var(--text); background: var(--surface-2); }
.hint { font-size: 12.5px; color: var(--muted); }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; flex: none; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 22px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 14px; }
.strength { height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-top: 2px; }
.strength span { display: block; height: 100%; width: 0; border-radius: 3px; transition: width .2s, background .2s; }
.input-suffix { display: flex; align-items: stretch; }
.input-suffix .input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-suffix span { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--border-strong); border-left: 0; border-radius: 0 13px 13px 0; background: var(--surface-2); color: var(--muted); font-size: 14px; font-weight: 600; }

.segmented { display: inline-flex; padding: 4px; gap: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); flex-wrap: wrap; }
.segmented button { border: 0; background: transparent; color: var(--muted); font: 600 13.5px/1 var(--font); padding: 9px 14px; border-radius: 999px; cursor: pointer; }
.segmented button[aria-checked="true"], .segmented button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.alert { padding: 12px 15px; border-radius: 13px; font-size: 14px; margin-bottom: 18px; border: 1px solid; }
.alert.error { color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.alert.success { color: var(--success); background: color-mix(in srgb, var(--success) 8%, var(--surface)); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.alert.info { color: var(--text); background: var(--accent-soft); border-color: var(--accent-line); }

/* ------------------------------------------------------------------ */
/* Marke                                                               */
/* ------------------------------------------------------------------ */
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 17px/1 var(--font-display); letter-spacing: -.03em; color: var(--text); text-decoration: none; }
.brand b { color: var(--accent); }
.logo { width: 34px; height: 34px; border-radius: 11px; background: var(--text); color: var(--bg); display: grid; place-items: center; font: 800 19px/1 var(--font-display); position: relative; flex: none; }
.logo::after { content: ""; position: absolute; right: 6px; bottom: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ------------------------------------------------------------------ */
/* Anmelden / Registrieren                                             */
/* ------------------------------------------------------------------ */
.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.auth-aside { position: relative; overflow: hidden; margin: 14px; border-radius: 28px; background: var(--accent); color: var(--accent-ink); padding: 40px 44px; display: flex; flex-direction: column; justify-content: space-between; isolation: isolate; }
.auth-aside::before { content: ""; position: absolute; inset: 0; background: var(--grain), radial-gradient(120% 80% at 100% 0%, rgba(255, 255, 255, .28), transparent 55%), radial-gradient(90% 70% at 0% 100%, rgba(0, 0, 0, .22), transparent 60%); z-index: -1; }
.auth-aside .brand { color: inherit; }
.auth-aside .brand b { color: inherit; opacity: .6; }
.auth-aside .logo { background: var(--accent-ink); color: var(--accent); }
.auth-aside .logo::after { background: var(--accent); }
.aside-copy h2 { font-size: clamp(38px, 4.6vw, 64px); line-height: .98; letter-spacing: -.045em; margin: 0 0 30px; font-weight: 800; }
.stack { position: relative; height: 230px; margin-bottom: 8px; }
.stack .card-f { position: absolute; display: flex; gap: 12px; align-items: center; width: 270px; padding: 14px 16px; border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .45); animation: float 7s ease-in-out infinite; }
.stack .card-f strong { display: block; font-size: 14.5px; }
.stack .card-f span { color: var(--muted); font-size: 13px; }
.stack .card-f .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: var(--c); flex: none; }
.stack .f1 { left: 0; top: 0; transform: rotate(-4deg); }
.stack .f2 { left: 120px; top: 78px; transform: rotate(3deg); animation-delay: -2.3s; }
.stack .f3 { left: 30px; top: 158px; transform: rotate(-1.5deg); animation-delay: -4.6s; }
@keyframes float { 50% { translate: 0 -8px; } }
.aside-foot { opacity: .7; font-size: 13px; margin: 0; }
.auth-main { display: flex; flex-direction: column; padding: 26px 24px; }
.auth-top { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.auth-top .brand { margin-right: auto; display: none; }
.auth-card { width: 100%; max-width: 400px; margin: auto; padding: 32px 0; }
.auth-card h1 { font-size: 40px; letter-spacing: -.04em; margin: 0 0 8px; }
.auth-card .sub { color: var(--muted); margin: 0 0 28px; }
p.switch { text-align: center; color: var(--muted); font-size: 14px; margin-top: 22px; }
p.switch a, .link { font-weight: 600; text-decoration: none; }
.success-box { text-align: center; }
.success-icon { width: 68px; height: 68px; border-radius: 22px; margin: 0 auto 20px; display: grid; place-items: center; color: var(--accent-ink); background: var(--accent); box-shadow: 0 16px 34px -14px var(--accent); }
.success-icon .i { width: 30px; height: 30px; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-top .brand { display: inline-flex; }
}

/* ------------------------------------------------------------------ */
/* Kopfzeile (angemeldet)                                              */
/* ------------------------------------------------------------------ */
.topbar { position: sticky; top: 0; z-index: 30; padding: 10px 12px 0; }
.topbar-inner { max-width: 1120px; margin: 0 auto; padding: 8px 8px 8px 14px; display: flex; align-items: center; gap: 8px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.crumb { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; min-width: 0; font-weight: 600; font-size: 14.5px; }
.crumb .brand { margin: 0; }
.crumb .sep { color: var(--border-strong); }
.crumb .here { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.menu { position: relative; }
.avatar-btn { display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 12px 0 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font: 600 14px/1 var(--font); }
.avatar-btn:hover { border-color: var(--border-strong); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--accent-ink); font-size: 12.5px; font-weight: 700; background: var(--accent); flex: none; }
.avatar-btn .name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 10px); width: 270px; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 7px; display: none; }
.menu.open .menu-pop { display: block; animation: rise .16s ease; }
.menu-pop .who { padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.menu-pop .who strong { display: block; }
.menu-pop .who span { color: var(--muted); font-size: 13px; word-break: break-all; }
.menu-pop a, .menu-pop button.mi { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 0; background: none; color: var(--text); font: 500 14px/1.2 var(--font); text-decoration: none; cursor: pointer; text-align: left; }
.menu-pop a:hover, .menu-pop button.mi:hover { background: var(--surface-2); }
.menu-pop hr { border: 0; border-top: 1px solid var(--border); margin: 6px 4px; }
.menu-pop .badge { margin-left: auto; }
.menu-pop form { margin: 0; }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11.5px; font-weight: 700; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* Darstellung (Farbe + Hell/Dunkel) */
.look { padding: 6px 10px 10px; }
.look .lbl { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin: 4px 0 8px; }
.swatches { display: flex; gap: 9px; margin-bottom: 12px; }
.swatches button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); cursor: pointer; padding: 0; }
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--text); }
.look .segmented { display: flex; }
.look .segmented button { flex: 1; padding: 8px 4px; font-size: 13px; }

/* ------------------------------------------------------------------ */
/* Seitenrahmen                                                        */
/* ------------------------------------------------------------------ */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px 80px; }
.wrap.narrow { max-width: 780px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 38px 0 24px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: clamp(32px, 5vw, 44px); letter-spacing: -.04em; }
.page-head p { margin: 6px 0 0; color: var(--muted); max-width: 620px; }
.tool-head { display: flex; gap: 18px; align-items: center; padding: 34px 0 26px; flex-wrap: wrap; }
.tool-head .ico { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: color-mix(in srgb, var(--c, var(--accent)) 15%, var(--surface)); color: color-mix(in srgb, var(--c, var(--accent)), #fff var(--lift)); border: 1px solid color-mix(in srgb, var(--c, var(--accent)) 25%, transparent); flex: none; }
.tool-head .ico .i { width: 28px; height: 28px; }
.tool-head .txt { flex: 1; min-width: 220px; }
.tool-head h1 { margin: 0; font-size: clamp(30px, 5vw, 42px); letter-spacing: -.04em; }
.tool-head p { margin: 4px 0 0; color: var(--muted); }
@media (max-width: 600px) { .tool-head { padding-top: 24px; gap: 14px; } .tool-head .ico { width: 48px; height: 48px; border-radius: 15px; } }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); min-width: 0; }
.card-pad { padding: 24px; }
.stack-y > * + * { margin-top: 18px; }
.card h2 { font-size: 21px; margin: 0 0 16px; }
.card h3 { font-size: 17px; margin: 0 0 10px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; font-size: 18px; flex: 1; }
@media (max-width: 600px) { .card-pad { padding: 18px; } }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.grid-side { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.grid-side.left { grid-template-columns: 360px minmax(0, 1fr); }
@media (max-width: 880px) { .grid-2, .grid-side, .grid-side.left { grid-template-columns: 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 600 13px/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--accent-line); }
.chip.on, .chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: transparent; }
.chip .i { width: 15px; height: 15px; }
.empty-state { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty-state .i { width: 40px; height: 40px; color: var(--border-strong); margin-bottom: 8px; }
.empty-state strong { display: block; color: var(--text); font: 700 18px/1.3 var(--font-display); margin-bottom: 4px; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); min-width: 0; }
.list > li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); text-decoration: none; }
.list .meta { color: var(--muted); font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .lead-ico { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex: none; font-weight: 700; }
kbd { font: 600 12px/1 var(--font); color: var(--muted); border: 1px solid var(--border); border-radius: 7px; padding: 5px 7px; background: var(--surface-2); }
.money { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.pos { color: var(--success); }
.neg { color: var(--danger); }
.copy-row { display: flex; gap: 8px; }
.copy-row .input { font-size: 14px; }

/* ------------------------------------------------------------------ */
/* Startseite                                                          */
/* ------------------------------------------------------------------ */
.hero { padding: 34px 0 22px; }
.date { color: var(--muted); font-weight: 500; font-size: 14px; margin: 0 0 10px; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 10px; }
.date::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero h1 { font-size: clamp(32px, 5.5vw, 52px); line-height: 1.05; letter-spacing: -.05em; margin: 0; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--accent); }

.notice { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); margin-bottom: 14px; font-size: 14px; flex-wrap: wrap; }
.notice > .i { color: var(--accent); }
.notice .btn { margin-left: auto; }

.searchbar { display: flex; gap: 10px; align-items: center; margin: 4px 0 22px; }
.search { position: relative; display: block; flex: 1; }
.search .i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { width: 100%; height: 52px; padding: 0 54px 0 48px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 15px; box-shadow: var(--shadow-sm); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.search kbd { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .search kbd { display: none; } }
.searchbar .icon-btn { width: 52px; height: 52px; }

.bento { display: grid; gap: 28px; }
.tile-group[hidden] { display: none; }
.tile-group h2 { margin: 0 0 12px; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.tile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; gap: 14px; }
@media (max-width: 720px) { .bento { gap: 22px; } .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.tile { --c: var(--accent); position: relative; display: flex; flex-direction: column; gap: 12px; padding: 16px; min-height: 128px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border); color: inherit; text-decoration: none; box-shadow: var(--shadow-sm); transition: transform .22s cubic-bezier(.2, .8, .2, 1), box-shadow .22s, border-color .22s; overflow: hidden; isolation: isolate; }
.tile::after { content: ""; position: absolute; width: 180px; height: 180px; right: -76px; top: -76px; border-radius: 50%; background: var(--c); opacity: .08; z-index: -1; transition: transform .4s ease, opacity .4s; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--c) 40%, var(--border)); }
.tile:hover::after { transform: scale(1.4); opacity: .13; }
.tile .ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: color-mix(in srgb, var(--c), #fff var(--lift)); background: color-mix(in srgb, var(--c) 14%, var(--surface)); }
.tile .ico .i { width: 21px; height: 21px; }
.tile h3 { margin: auto 0 0; font-size: 17px; letter-spacing: -.025em; line-height: 1.2; hyphens: auto; }
.tile p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.tile .tag { position: absolute; top: 16px; right: 16px; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--text); color: var(--bg); }
.tile .ext { position: absolute; top: 18px; right: 18px; color: var(--muted); }
.tile .ext .i { width: 16px; height: 16px; }
.tile .quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tile .quick a { position: relative; z-index: 2; font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-radius: 999px; background: var(--surface-2); color: var(--text); text-decoration: none; border: 1px solid var(--border); }
.tile .quick a:hover { border-color: var(--c); color: var(--c); }
.tile .cover { position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.tile.big { grid-column: span 2; grid-row: span 2; padding: 26px; background: var(--c); color: #fff; border-color: transparent; }
.tile.big::after { width: 380px; height: 380px; right: -130px; top: -150px; background: #fff; opacity: .13; }
.tile.big::before { content: ""; position: absolute; inset: 0; background: var(--grain); z-index: -1; }
.tile.big .ico { width: 60px; height: 60px; border-radius: 19px; background: rgba(255, 255, 255, .2); color: #fff; }
.tile.big .ico .i { width: 29px; height: 29px; }
.tile.big h3 { font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -.045em; }
.tile.big p { color: rgba(255, 255, 255, .85); font-size: 15px; max-width: 400px; }
.tile.big .quick a { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .25); color: #fff; }
.tile.big .quick a:hover { background: #fff; color: var(--c); }
.tile.big .tag { background: #fff; color: var(--c); }
.tile.wide { grid-column: span 2; }
@media (max-width: 720px) {
  .tile { min-height: 112px; padding: 14px; border-radius: 20px; }
  .tile h3 { font-size: 15.5px; }
  .tile p { font-size: 12.5px; }
  .tile.big { grid-row: span 1; min-height: 210px; padding: 20px; }
  .tile .quick a { padding: 7px 11px; }
}
.empty { color: var(--muted); display: none; padding: 20px 0; }

/* Kacheln anordnen */
.bento.arrange .tile { cursor: grab; animation: wiggle .45s ease-in-out infinite alternate; touch-action: none; user-select: none; -webkit-user-select: none; }
.bento.arrange .tile:nth-child(2n) { animation-delay: -.22s; }
.bento.arrange .tile .cover, .bento.arrange .tile .quick { pointer-events: none; }
.bento.arrange .tile.off { opacity: .38; }
.bento.arrange .tile.dragging { animation: none; z-index: 5; box-shadow: var(--shadow-lg); cursor: grabbing; transition: none; }
@keyframes wiggle { from { rotate: -.6deg; } to { rotate: .6deg; } }
.tile .t-ctl { display: none; position: absolute; top: 10px; right: 10px; z-index: 3; gap: 5px; }
.bento.arrange .tile .t-ctl { display: flex; }
.bento.arrange .tile .tag, .bento.arrange .tile .ext { display: none; }
.t-ctl button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-sm); }
.t-ctl button .i { width: 16px; height: 16px; }
.arrange-bar { position: sticky; bottom: 16px; z-index: 20; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 20px auto 0; width: fit-content; max-width: 100%; padding: 8px 8px 8px 20px; border-radius: 999px; background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); font-size: 14px; }
.arrange-bar .btn { border-color: transparent; }
.arrange-bar .btn.ghost { color: var(--bg); }
.arrange-bar .btn.ghost:hover { background: rgba(127, 127, 127, .25); }
@media (prefers-reduced-motion: reduce) { .bento.arrange .tile { animation: none; } .stack .card-f { animation: none; } }

/* ------------------------------------------------------------------ */
/* Dialog & Hinweise                                                   */
/* ------------------------------------------------------------------ */
.dialog { overflow: auto; border: 0; padding: 0; border-radius: 28px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); width: min(540px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); }
.dialog::backdrop { background: rgba(20, 16, 10, .45); backdrop-filter: blur(4px); }
.dialog[open] { animation: pop .24s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.dialog .d-body { padding: 28px; }
.dialog .d-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.dialog .d-head h2 { margin: 0; font-size: 28px; flex: 1; letter-spacing: -.04em; }
.dialog .d-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 0 28px 26px; flex-wrap: wrap; }
.toasts { position: fixed; left: 50%; bottom: 22px; translate: -50% 0; z-index: 100; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); animation: rise .2s ease; max-width: calc(100vw - 32px); }
.toast.error { background: var(--danger); color: #fff; }

/* Neuigkeiten */
.news-item { position: relative; padding: 0 0 28px 30px; border-left: 2px solid var(--border); margin-left: 8px; }
.news-item::before { content: ""; position: absolute; left: -9px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 4px solid var(--accent); box-sizing: border-box; }
.news-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.news-item time { font-size: 13px; color: var(--muted); font-weight: 600; }
.news-item h3 { margin: 4px 0 8px; font-size: 21px; }
.news-item ul { margin: 0; padding-left: 18px; }
.news-item li { margin: 5px 0; }
.news-item .btn { margin-top: 12px; }

/* ------------------------------------------------------------------ */
/* Verwaltung & Konto                                                  */
/* ------------------------------------------------------------------ */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { padding: 18px 20px; }
.stat strong { display: block; font: 800 32px/1.1 var(--font-display); letter-spacing: -.04em; }
.stat span { color: var(--muted); font-size: 13px; }
.users { width: 100%; border-collapse: collapse; }
.users th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.users td { padding: 13px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 14px; }
.users tr:last-child td { border-bottom: 0; }
.u-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.u-cell strong { display: block; }
.u-cell span { color: var(--muted); font-size: 13px; word-break: break-all; }
.u-cell .avatar { font-size: 12.5px; flex: none; word-break: normal; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.active { color: var(--success); background: color-mix(in srgb, var(--success) 12%, transparent); }
.pill.pending { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.pill.blocked { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.pill.plain { color: var(--muted); background: var(--surface-2); }
.pill.plain::before { display: none; }
.actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }
.form-narrow { max-width: 480px; }
.users td.muted { white-space: nowrap; }
@media (max-width: 720px) {
  .actions { justify-content: flex-start; margin-top: 8px; }
  .avatar-btn .name { display: none; }
  .avatar-btn { padding: 0 4px; }
  .topbar-inner { padding-left: 12px; }
  .crumb .brand > span:not(.logo) { display: none; }
}
@media (max-width: 1040px) {
  .users thead { display: none; }
  .users tr { display: block; padding: 14px 16px; border-bottom: 1px solid var(--border); }
  .users tr:last-child { border-bottom: 0; }
  .users td { display: block; padding: 4px 0; border: 0; }
  #userTable .actions, .users .actions { justify-content: flex-start; margin-top: 8px; }
}

/* ------------------------------------------------------------------ */
/* Bewegter Hintergrund (an-/abschaltbar über das Menü)                */
/* ------------------------------------------------------------------ */
.bgfx { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; contain: strict; }
.bgfx canvas { display: block; width: 100%; height: 100%; }
:root[data-bg="off"] .bgfx { display: none; }

/* Umschalter im Darstellungs-Menü */
.look-switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
button.switch { width: 42px; height: 24px; flex: none; border-radius: 999px; border: 0; background: var(--border-strong); position: relative; cursor: pointer; transition: background .18s; padding: 0; }
button.switch i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .18s; }
button.switch[aria-checked="true"] { background: var(--accent); }
button.switch[aria-checked="true"] i { transform: translateX(18px); }

/* Live-Angabe auf Kacheln */
.tile .live { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; max-width: 100%; margin-top: -4px; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--c) 12%, var(--surface)); color: color-mix(in srgb, var(--c) 72%, var(--text)); font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.tile .live.urgent { background: color-mix(in srgb, var(--danger) 13%, var(--surface)); color: var(--danger); }
.tile.big .live { background: rgba(255, 255, 255, .2); color: inherit; }

/* Suche über die eigenen Daten */
.search-results { margin: 0 0 18px; display: grid; gap: 6px; }
.search-results[hidden] { display: none; }
.search-results h2 { margin: 2px 0 6px; font-size: 14px; color: var(--muted); font-family: var(--font); font-weight: 650; }
.sr-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: inherit; text-decoration: none; }
.sr-item:hover, .sr-item:focus-visible { border-color: var(--accent-line); background: var(--accent-soft); }
.sr-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.sr-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12.5px; }
.sr-item .sr-type { color: var(--muted); font-size: 12px; font-weight: 600; }

/* Admin-Bereich */
.admin-tabs { display: flex; gap: 6px; margin-bottom: 18px; overflow-x: auto; }
.admin-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.admin-tabs a:hover { color: var(--text); border-color: var(--border-strong); }
.admin-tabs a[aria-current] { background: var(--text); border-color: var(--text); color: var(--bg); }
a.stat { color: inherit; text-decoration: none; }
a.stat:hover { border-color: var(--accent-line); }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.admin-wide { grid-column: 1 / -1; }
.admin-card { padding: 20px 22px; }
.admin-card h2, .admin-section h2 { margin: 0 0 12px; font-size: 18px; letter-spacing: -.02em; }
.admin-section { margin-bottom: 24px; }
.admin-section h2 small { font-family: var(--font); font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-left: 6px; }
.admin-none { margin: 0; padding: 18px 20px; color: var(--muted); font-size: 14px; }
.kv { margin: 0; display: grid; }
.kv > div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.admin-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.admin-actions > div { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.admin-actions p { margin: 0 0 6px; flex: 1; color: var(--muted); font-size: 13.5px; }
.admin-actions form { margin: 0; }
.admin-link { margin-bottom: 18px; border-color: var(--accent-line); }
.admin-link p { margin: 0 0 12px; font-size: 14px; }
.admin-search { margin-bottom: 14px; }
.users tr[hidden] { display: none; }
.u-when { color: var(--muted); font-size: 13px; white-space: nowrap; }
.u-when span { display: block; }
.u-used i { font-style: normal; }
@media (min-width: 1041px) { #userTable .actions { display: grid; grid-template-columns: auto auto; justify-content: end; } #userTable .actions .btn { width: 100%; } }
@media (max-width: 720px) {
  .admin-grid, .admin-actions { grid-template-columns: minmax(0, 1fr); }
  .u-used i { display: none; }
  .u-used:not(:has(i))::before { content: "Speicher: "; }
}
