/* ─────────────────────────────────────────────────────────────
   Kundenportal · Design
   ───────────────────────────────────────────────────────────── */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --bg: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --line: rgba(0, 0, 0, .08);
  --fill: rgba(0, 0, 0, .05);
  --fill-2: rgba(0, 0, 0, .08);
  --hover: rgba(0, 0, 0, .03);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --ring: rgba(0, 113, 227, .22);
  --danger: #e30000;
  --success: #34c759;
  --field: #ffffff;
  --field-line: rgba(0, 0, 0, .14);
  --nav-bg: rgba(251, 251, 253, .78);
  --glass: rgba(255, 255, 255, .72);
  --glass-line: rgba(255, 255, 255, .7);
  --seg-active: #ffffff;
  --switch-off: rgba(120, 120, 128, .2);
  --toast-bg: rgba(29, 29, 31, .88);
  --toast-text: #f5f5f7;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04), 0 2px 8px rgba(0, 0, 0, .04);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 30px rgba(0, 0, 0, .06);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .05), 0 24px 60px rgba(0, 0, 0, .12);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #8e8e93;
    --line: rgba(255, 255, 255, .09);
    --fill: rgba(255, 255, 255, .08);
    --fill-2: rgba(255, 255, 255, .13);
    --hover: rgba(255, 255, 255, .04);
    --accent: #0a84ff;
    --accent-hover: #409cff;
    --ring: rgba(10, 132, 255, .35);
    --danger: #ff453a;
    --success: #30d158;
    --field: #1c1c1e;
    --field-line: rgba(255, 255, 255, .16);
    --nav-bg: rgba(22, 22, 23, .78);
    --glass: rgba(28, 28, 30, .66);
    --glass-line: rgba(255, 255, 255, .08);
    --seg-active: #636366;
    --switch-off: rgba(120, 120, 128, .36);
    --toast-bg: rgba(245, 245, 247, .92);
    --toast-text: #1d1d1f;
    --shadow-sm: 0 0 0 1px rgba(255, 255, 255, .05);
    --shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 10px 30px rgba(0, 0, 0, .4);
    --shadow-lg: 0 0 0 1px rgba(255, 255, 255, .08), 0 24px 60px rgba(0, 0, 0, .6);
  }
}

*, *::before, *::after { 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.47 var(--font); letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -.022em; }
p { margin: 0; }
.ic { flex: none; display: block; }
.muted { color: var(--text-2); }
.hidden { display: none !important; }

/* ── Navigation ─────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 50; height: 52px;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { max-width: 1120px; height: 100%; margin: 0 auto; padding: 0 22px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 15px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #0a84ff, #5e5ce6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.nav-links { display: flex; gap: 2px; }
.nav-links a { color: var(--text-2); font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 999px; transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); background: var(--fill); }
.nav-spacer { flex: 1; }

.usermenu { position: relative; }
.usermenu summary { list-style: none; cursor: pointer; border-radius: 50%; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring); }
.menu {
  position: absolute; right: 0; top: 44px; min-width: 240px; padding: 6px;
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg);
  animation: pop .22s var(--ease);
}
.menu-head { display: flex; gap: 12px; align-items: center; padding: 10px 10px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.menu-head strong { display: block; font-size: 14px; }
.menu-head span { display: block; font-size: 12px; color: var(--text-2); }
.menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--text); font-size: 14px; }
.menu a:hover { background: var(--fill); }
.menu a .ic { color: var(--text-2); }

.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 600; letter-spacing: 0;
  background: linear-gradient(135deg, hsl(var(--h) 70% 62%), hsl(calc(var(--h) + 40) 65% 48%));
}
.avatar.lg { width: 40px; height: 40px; font-size: 15px; }
.avatar.xl { width: 72px; height: 72px; font-size: 26px; }

/* ── Layout ─────────────────────────────────────────────────── */

.container { max-width: 1120px; margin: 0 auto; padding: 56px 22px 110px; }
.container.narrow { max-width: 760px; }
.hero { margin-bottom: 44px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.hero h1 { font-size: clamp(34px, 5.4vw, 56px); line-height: 1.06; font-weight: 700; letter-spacing: -.03em; }
.hero p { font-size: clamp(17px, 2vw, 21px); color: var(--text-2); margin-top: 12px; max-width: 640px; }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

.section { margin-top: 44px; }
.section:first-child { margin-top: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; padding: 0 4px; }
.section-title { font-size: 22px; font-weight: 600; }
.section-note { font-size: 13px; color: var(--text-3); margin: 10px 4px 0; }

.back { display: inline-flex; align-items: center; gap: 2px; font-size: 15px; margin: -20px 0 26px -6px; padding: 4px 6px; border-radius: 8px; }
.back:hover { background: var(--fill); }

/* ── App-Icon & Kacheln ─────────────────────────────────────── */

.app-icon {
  --s: 60px;
  width: var(--s); height: var(--s); border-radius: calc(var(--s) * .2237); flex: none;
  display: grid; place-items: center; color: #fff;
  font-size: calc(var(--s) * .38); font-weight: 650; letter-spacing: -.02em; line-height: 1;
  background: linear-gradient(145deg, var(--g1), var(--g2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 8px 18px -8px var(--g2);
  text-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.app-icon.sm { --s: 40px; }
.app-icon.xs { --s: 30px; }
.app-icon.xl { --s: 84px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 20px; min-height: 224px; padding: 26px;
  background: var(--surface); border-radius: 24px; box-shadow: var(--shadow); color: var(--text);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
  animation: rise .6s var(--ease) both;
}
.tile:hover { transform: translateY(-5px) scale(1.01); box-shadow: var(--shadow-lg); }
.tile:active { transform: scale(.985); transition-duration: .15s; }
.tile h3 { font-size: 20px; font-weight: 600; line-height: 1.2; }
.tile p { margin-top: 6px; color: var(--text-2); font-size: 14px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tile-go { margin-top: auto; display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-size: 14px; font-weight: 500; }
.tile-go .ic { transition: transform .3s var(--ease); }
.tile:hover .tile-go .ic { transform: translateX(3px); }
.grid .tile:nth-child(2) { animation-delay: .04s; } .grid .tile:nth-child(3) { animation-delay: .08s; }
.grid .tile:nth-child(4) { animation-delay: .12s; } .grid .tile:nth-child(5) { animation-delay: .16s; }
.grid .tile:nth-child(n+6) { animation-delay: .2s; }

/* ── Buttons ────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 18px; border: 0; border-radius: 999px;
  background: var(--accent); color: #fff; font: inherit; font-size: 14px; font-weight: 500; letter-spacing: -.01em;
  cursor: pointer; white-space: nowrap; transition: background .2s, transform .12s, opacity .2s;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(.96); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-lg { height: 48px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-secondary { background: var(--fill); color: var(--text); }
.btn-secondary:hover { background: var(--fill-2); }
.btn-plain { background: transparent; color: var(--accent); padding: 0 10px; }
.btn-plain:hover { background: var(--fill); }
.btn-danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 35%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.btn-icon { width: 36px; padding: 0; }

/* ── Formulare ──────────────────────────────────────────────── */

.field { display: block; margin-bottom: 16px; }
.label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin: 0 0 7px 2px; }
.input {
  width: 100%; height: 46px; padding: 0 15px; border-radius: 12px; outline: none;
  border: 1px solid var(--field-line); background: var(--field); color: var(--text);
  font: inherit; font-size: 16px; letter-spacing: -.01em;
  transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: var(--text-3); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
textarea.input { height: auto; min-height: 92px; padding: 12px 15px; resize: vertical; line-height: 1.45; }
select.input { appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2386868b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 92px; }
.input-wrap .input-actions { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: flex; gap: 2px; }
.input-actions button {
  width: 36px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--text-3);
  display: grid; place-items: center; cursor: pointer; transition: background .2s, color .2s;
}
.input-actions button:hover { background: var(--fill); color: var(--text); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.hint { font-size: 12px; color: var(--text-3); margin: 6px 2px 0; }

.card { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-sm); padding: 24px; }

.swatches { display: flex; flex-wrap: wrap; gap: 12px; padding: 4px 2px; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch span {
  display: block; width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(145deg, var(--g1), var(--g2));
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px transparent;
  transition: box-shadow .2s, transform .2s var(--ease);
}
.swatch:hover span { transform: scale(1.08); }
.swatch input:checked + span { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
.swatch input:focus-visible + span { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ring); }

.drop {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 20px;
  border: 1.5px dashed var(--field-line); border-radius: 16px; text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.drop:hover, .drop.drag { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.drop.has-file { border-style: solid; border-color: var(--success); background: color-mix(in srgb, var(--success) 7%, transparent); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 6px; background: var(--fill); color: var(--accent); }
.drop.has-file .drop-icon { color: var(--success); }
.drop-title { font-size: 15px; font-weight: 600; color: var(--text); word-break: break-all; }
.drop-sub { font-size: 13px; color: var(--text-3); }

/* ── Segmented Control ──────────────────────────────────────── */

.segmented { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--fill); }
.segmented a {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 18px; border-radius: 8px;
  color: var(--text); font-size: 13px; font-weight: 500; transition: background .25s, box-shadow .25s;
}
.segmented a.active { background: var(--seg-active); box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 1px rgba(0,0,0,.04); }
.segmented .count { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ── Listen ─────────────────────────────────────────────────── */

.list { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-sm); overflow: hidden; }
.row { position: relative; display: flex; align-items: center; gap: 14px; min-height: 62px; padding: 11px 18px; color: var(--text); }
.row + .row::before { content: ""; position: absolute; top: 0; right: 0; left: 18px; height: 1px; background: var(--line); }
.list.icons .row + .row::before { left: 72px; }
a.row { transition: background .15s; }
a.row:hover { background: var(--hover); }
a.row:active { background: var(--fill); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-meta { font-size: 13px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.row .chev { color: var(--text-3); opacity: .7; }
.row.empty-row { justify-content: center; color: var(--text-3); font-size: 14px; }

.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; }
.search { position: relative; flex: 1; max-width: 320px; min-width: 200px; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.search input { height: 36px; padding-left: 36px; border-radius: 10px; font-size: 14px; background: var(--fill); border-color: transparent; }
.search input:focus { background: var(--field); }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--fill); color: var(--text-2); white-space: nowrap; }
.pill.green { background: color-mix(in srgb, var(--success) 15%, transparent); color: color-mix(in srgb, var(--success) 70%, var(--text)); }
.pill.red { background: color-mix(in srgb, var(--danger) 13%, transparent); color: var(--danger); }
.pill.blue { background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 36px; }
.stat { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-sm); padding: 20px 22px; }
.stat-num { font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 13px; color: var(--text-2); margin-top: 2px; }

/* ── Switch ─────────────────────────────────────────────────── */

.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--switch-off); transition: background .25s; }
.switch span::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.16);
  transition: transform .3s cubic-bezier(.3, .7, .4, 1.15);
}
.switch input:checked + span { background: #34c759; }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 4px var(--ring); }
label.row { cursor: pointer; }

/* ── Detail-Kopf ────────────────────────────────────────────── */

.detail-head { display: flex; align-items: center; gap: 20px; margin-bottom: 40px; flex-wrap: wrap; }
.detail-head .grow { flex: 1; min-width: 200px; }
.detail-head h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; letter-spacing: -.028em; line-height: 1.1; }
.detail-head .sub { color: var(--text-2); font-size: 16px; margin-top: 4px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.danger-zone p { color: var(--text-2); font-size: 14px; max-width: 460px; }

.creds {
  position: relative; overflow: hidden; margin-bottom: 36px; padding: 24px;
  border-radius: 18px; color: #fff;
  background: linear-gradient(135deg, #0a84ff, #5e5ce6);
  box-shadow: 0 20px 40px -20px #5e5ce6;
  animation: rise .6s var(--ease) both;
}
.creds h3 { font-size: 18px; display: flex; align-items: center; gap: 8px; }
.creds p { opacity: .85; font-size: 14px; margin-top: 4px; }
.creds pre {
  margin: 16px 0; padding: 14px 16px; border-radius: 12px; background: rgba(0,0,0,.2);
  font: 14px/1.7 var(--mono); white-space: pre-wrap; word-break: break-all;
}
.creds .btn { background: rgba(255,255,255,.95); color: #1d1d1f; }
.creds .btn:hover { background: #fff; }
.creds .btn-plain { background: transparent; color: #fff; }
.creds .btn-plain:hover { background: rgba(255,255,255,.15); }

/* ── Dialog ─────────────────────────────────────────────────── */

dialog {
  width: min(540px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 22px;
  background: var(--surface); color: var(--text); box-shadow: 0 40px 100px rgba(0,0,0,.35);
}
dialog[open] { animation: pop .32s var(--ease); }
dialog::backdrop { background: rgba(0,0,0,.32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .25s; }
.dialog-head { padding: 26px 28px 0; }
.dialog-head h2 { font-size: 22px; font-weight: 600; }
.dialog-head p { color: var(--text-2); font-size: 14px; margin-top: 4px; }
.dialog-body { padding: 22px 28px 6px; }
.dialog-foot { padding: 6px 28px 26px; display: flex; justify-content: flex-end; gap: 10px; }

/* ── Leerer Zustand ─────────────────────────────────────────── */

.empty { text-align: center; padding: 72px 24px; background: var(--surface); border-radius: 24px; box-shadow: var(--shadow-sm); }
.empty-icon { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--text-2); }
.empty h2 { font-size: 22px; font-weight: 600; }
.empty p { color: var(--text-2); margin: 8px auto 22px; max-width: 420px; }

/* ── Toasts ─────────────────────────────────────────────────── */

.toasts { position: fixed; top: 66px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 11px 20px 11px 16px; border-radius: 999px;
  background: var(--toast-bg); color: var(--toast-text); font-size: 14px; font-weight: 500;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: var(--shadow-lg);
  animation: toastIn .45s cubic-bezier(.2, .9, .3, 1.25) both; max-width: calc(100vw - 32px);
}
.toast .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex: none; }
.toast.error .dot { background: var(--danger); }
.toast.out { opacity: 0; transform: translateY(-10px) scale(.96); transition: .35s var(--ease); }

/* ── Login ──────────────────────────────────────────────────── */

body.auth { display: grid; place-items: center; padding: 24px 16px; overflow-x: hidden; }
.orbs { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.orbs i { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; animation: drift 22s ease-in-out infinite alternate; }
.orbs i:nth-child(1) { width: 520px; height: 520px; left: -120px; top: -140px; background: #64d2ff; }
.orbs i:nth-child(2) { width: 460px; height: 460px; right: -140px; top: 10%; background: #bf5af2; animation-delay: -7s; }
.orbs i:nth-child(3) { width: 420px; height: 420px; left: 30%; bottom: -200px; background: #ff9f0a; opacity: .35; animation-delay: -13s; }
@media (prefers-color-scheme: dark) { .orbs i { opacity: .32; } .orbs i:nth-child(3) { opacity: .18; } }

.auth-card {
  position: relative; z-index: 1; width: min(410px, 100%); padding: 44px 36px 32px; text-align: center;
  background: var(--glass); border: 1px solid var(--glass-line); border-radius: 30px;
  -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.25);
  animation: rise .7s var(--ease) both;
}
.auth-card.wide { width: min(500px, 100%); text-align: left; }
.auth-mark {
  width: 68px; height: 68px; margin: 0 auto 22px; border-radius: 18px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, #0a84ff, #5e5ce6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 14px 30px -10px #5e5ce6;
}
.auth-card h1 { font-size: 28px; font-weight: 700; letter-spacing: -.028em; }
.auth-card .lead { color: var(--text-2); margin: 6px 0 30px; font-size: 16px; }
.auth-card form { text-align: left; }
.auth-card .input { background: var(--field); }
.auth-error {
  display: flex; gap: 8px; align-items: center; padding: 11px 14px; margin-bottom: 16px; border-radius: 12px;
  background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); font-size: 14px; text-align: left;
  animation: shake .4s;
}
.auth-foot { margin-top: 22px; font-size: 13px; color: var(--text-3); }
.checks { list-style: none; padding: 0; margin: 0 0 26px; border-radius: 14px; background: var(--fill); }
.checks li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 14px; }
.checks li + li { border-top: 1px solid var(--line); }
.checks .ok { color: var(--success); } .checks .bad { color: var(--danger); }

/* ── Viewer ─────────────────────────────────────────────────── */

body.viewer { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.viewer-bar {
  flex: none; height: 50px; display: flex; align-items: center; gap: 12px; padding: 0 12px;
  background: var(--nav-bg); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
.viewer-bar .title { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; font-size: 14px; }
.viewer-bar .title span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-bar .side { width: 180px; display: flex; gap: 4px; }
.viewer-bar .side.right { justify-content: flex-end; }
.viewer-frame { flex: 1; width: 100%; border: 0; background: #fff; }

/* ── Animationen ────────────────────────────────────────────── */

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.94); } }
@keyframes drift { to { transform: translate(60px, 40px) scale(1.1); } }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ── Mobil ──────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .nav-inner { padding: 0 16px; gap: 12px; }
  .brand-name { display: none; }
  .container { padding: 36px 16px 80px; }
  .hero { margin-bottom: 30px; }
  .grid { grid-template-columns: 1fr; gap: 14px; }
  .tile { min-height: 0; padding: 20px; flex-direction: row; align-items: center; gap: 16px; border-radius: 20px; }
  .tile .app-icon { --s: 52px; }
  .tile p { -webkit-line-clamp: 2; }
  .tile-go { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .stats { gap: 10px; } .stat { padding: 14px 16px; } .stat-num { font-size: 26px; }
  .row-meta.hide-sm { display: none; }
  .viewer-bar .side { width: auto; }
  .viewer-bar .side .label-txt { display: none; }
  .auth-card { padding: 36px 22px 26px; border-radius: 26px; }
  .dialog-head, .dialog-body, .dialog-foot { padding-left: 20px; padding-right: 20px; }
}
