/* =========================================================
   NLS TECHNOLOGY PORTAL — Liquid Glass
   Basiert auf dem Design-System von nextlvlstudios.de
   (Aurora + Liquid Glass) und erweitert es um Glaskanten,
   Formulare und Portal-Komponenten.
   ========================================================= */

:root {
  --accent-blue: #0A84FF;
  --accent-indigo: #5E5CE6;
  --accent-teal: #30D5C8;
  --accent-orange: #FF9F0A;
  --accent-red: #FF453A;
  --accent-green: #30D158;

  --radius-xl: 36px;
  --radius-lg: 28px;
  --radius-md: 22px;
  --radius-sm: 14px;

  --bg-base: #FEF8F8;
  --bg-base-2: #F6EFED;
  --glass-surface: rgba(254, 248, 248, 0.55);
  --glass-surface-strong: rgba(254, 248, 248, 0.72);
  --glass-border: rgba(254, 248, 248, 0.8);
  --glass-rim: rgba(255, 255, 255, 0.95);
  --glass-rim-soft: rgba(255, 255, 255, 0.25);
  --glass-shadow: 0 20px 60px rgba(23, 22, 22, 0.12);
  --field-bg: rgba(255, 255, 255, 0.55);
  --field-bg-focus: rgba(255, 255, 255, 0.8);
  --hover: rgba(120, 130, 160, 0.12);
  --text-main: #171616;
  --text-muted: rgba(23, 22, 22, 0.66);
  --text-faint: rgba(23, 22, 22, 0.42);
  --divider: rgba(23, 22, 22, 0.08);

  --ok-bg: rgba(48, 209, 88, 0.14);
  --ok-text: #1b7a37;
  --warn-bg: rgba(255, 159, 10, 0.16);
  --warn-text: #8a5300;
  --error-bg: rgba(255, 69, 58, 0.13);
  --error-text: #c4271d;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-base: #171616;
    --bg-base-2: #0E0D0D;
    --glass-surface: rgba(254, 248, 248, 0.06);
    --glass-surface-strong: rgba(254, 248, 248, 0.1);
    --glass-border: rgba(254, 248, 248, 0.14);
    --glass-rim: rgba(255, 255, 255, 0.35);
    --glass-rim-soft: rgba(255, 255, 255, 0.06);
    --glass-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    --field-bg: rgba(254, 248, 248, 0.06);
    --field-bg-focus: rgba(254, 248, 248, 0.1);
    --hover: rgba(254, 248, 248, 0.08);
    --text-main: #FEF8F8;
    --text-muted: rgba(254, 248, 248, 0.68);
    --text-faint: rgba(254, 248, 248, 0.42);
    --divider: rgba(254, 248, 248, 0.1);
    --ok-text: #4fe07a;
    --warn-text: #ffc15c;
    --error-text: #ff7a70;
    color-scheme: dark;
  }
  .blob-1, .blob-2 { opacity: 0.46; }
  .blob-3 { opacity: 0.4; }
  .blob-4 { opacity: 0.24; }
}

@font-face {
  font-family: 'Null';
  src: url('/assets/fonts/Null-Normal.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-base);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-blue); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 3px; }
::selection { background: rgba(10, 132, 255, 0.25); }

/* ======================= AURORA ======================= */
.aurora-wrap {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: linear-gradient(180deg, var(--bg-base) 0%, var(--bg-base-2) 100%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(95px); opacity: 0.22; will-change: transform; }
.blob-1 { width: 620px; height: 620px; background: var(--accent-indigo); top: -160px; left: -120px; animation: drift1 26s ease-in-out infinite; }
.blob-2 { width: 560px; height: 560px; background: var(--accent-blue); top: 10%; right: -180px; animation: drift2 32s ease-in-out infinite; }
.blob-3 { width: 480px; height: 480px; background: var(--accent-teal); bottom: -140px; left: 8%; opacity: 0.17; animation: drift3 30s ease-in-out infinite; }
.blob-4 { width: 400px; height: 400px; background: var(--accent-orange); bottom: -60px; right: 10%; opacity: 0.12; animation: drift1 24s ease-in-out infinite reverse; }
@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(60px,80px) scale(1.12); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-70px,60px) scale(0.92); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(50px,-50px) scale(1.08); } }

/* ======================= LIQUID GLASS ======================= */
.glass {
  position: relative;
  isolation: isolate;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(28px) saturate(175%);
  backdrop-filter: blur(28px) saturate(175%);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-rim-soft);
}
/* Lichtkante: heller Rand oben links, weich auslaufend – wie iOS Liquid Glass. */
.glass::before {
  content: "";
  position: absolute; inset: -1px; z-index: -1;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(145deg, var(--glass-rim), transparent 32%, transparent 68%, var(--glass-rim-soft));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
/* Glanz: leichter Lichtschimmer auf der oberen Hälfte. */
.glass-sheen::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  border-radius: inherit;
  background: radial-gradient(120% 60% at 20% 0%, rgba(255,255,255,0.35), transparent 60%);
  pointer-events: none;
}
@media (prefers-color-scheme: dark) { .glass-sheen::after { background: radial-gradient(120% 60% at 20% 0%, rgba(255,255,255,0.07), transparent 60%); } }

/* ======================= TYPO ======================= */
.wordmark {
  font-family: 'Null', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 22px; font-weight: 400; letter-spacing: 0.01em;
  color: var(--text-main); text-decoration: none !important;
  white-space: nowrap;
}
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 50px;
  background: var(--glass-surface); border: 1px solid var(--glass-border);
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em; color: var(--text-muted);
}
.kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-teal); box-shadow: 0 0 10px var(--accent-teal); }
.headline {
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.08;
  margin: 0 0 10px;
  background: linear-gradient(120deg, var(--text-main) 20%, var(--accent-indigo) 60%, var(--accent-blue) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sub { color: var(--text-muted); font-size: 16px; line-height: 1.6; margin: 0 0 26px; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); font-size: 13px; }

/* ======================= BUTTONS ======================= */
.btn {
  appearance: none; border: none; cursor: pointer; text-decoration: none !important;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: inherit; font-size: 15.5px; font-weight: 700; line-height: 1.2;
  padding: 14px 24px; border-radius: 50px;
  transition: transform 0.25s cubic-bezier(.25,.8,.25,1), box-shadow 0.25s ease, background 0.2s ease, opacity 0.2s ease;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.btn svg { width: 19px; height: 19px; flex: none; }
.btn-primary {
  color: #fff; background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
  box-shadow: 0 12px 30px rgba(10,132,255,0.35), inset 0 1px 0 rgba(255,255,255,0.35);
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 16px 38px rgba(10,132,255,0.48), inset 0 1px 0 rgba(255,255,255,0.35); transform: translateY(-1px); }
.btn-glass {
  color: var(--text-main); background: var(--glass-surface-strong);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(23,22,22,0.08), inset 0 1px 0 var(--glass-rim-soft);
}
.btn-glass:hover:not(:disabled) { background: var(--glass-surface); transform: translateY(-1px); }
.btn-danger { color: var(--error-text); background: var(--error-bg); }
.btn-danger:hover:not(:disabled) { background: rgba(255,69,58,0.2); }
.btn-block { width: 100%; }
.btn-sm { font-size: 14px; padding: 9px 16px; }
.link-btn { appearance: none; border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--accent-blue); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.link-btn:disabled { color: var(--text-faint); cursor: default; text-decoration: none; }
.icon-btn {
  appearance: none; border: 0; cursor: pointer;
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: transparent; color: var(--text-muted);
  transition: background .2s, color .2s;
}
.icon-btn:hover { background: var(--hover); color: var(--text-main); }
.icon-btn svg { width: 19px; height: 19px; }

/* ======================= FORMULARE ======================= */
.field { margin-top: 14px; }
.field label, .label { display: block; font-size: 13.5px; font-weight: 650; margin: 0 0 7px 4px; color: var(--text-muted); }
input[type=text], input[type=email], input[type=password], input[type=search], select {
  width: 100%; font: inherit; font-size: 16px;
  padding: 13px 16px;
  color: var(--text-main); background: var(--field-bg);
  border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 2px rgba(23,22,22,0.04);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input::placeholder { color: var(--text-faint); }
input:focus, select:focus { outline: none; background: var(--field-bg-focus); border-color: var(--accent-blue); box-shadow: 0 0 0 4px rgba(10,132,255,0.18); }
.hint { font-size: 12.5px; color: var(--text-faint); margin: 6px 0 0 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 16px 4px 0; font-size: 14px; color: var(--text-muted); cursor: pointer; }
.check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--accent-blue); flex: none; }

.strength { height: 5px; border-radius: 5px; background: var(--divider); margin: 8px 4px 0; overflow: hidden; }
.strength span { display: block; height: 100%; width: 0; border-radius: inherit; transition: width .3s, background .3s; }

/* Hinweise */
.alert { border-radius: var(--radius-sm); padding: 12px 16px; font-size: 14px; line-height: 1.5; margin: 0 0 14px; }
.alert-error { background: var(--error-bg); color: var(--error-text); }
.alert-warn { background: var(--warn-bg); color: var(--warn-text); }
.alert-ok { background: var(--ok-bg); color: var(--ok-text); }

/* ======================= AUTH-SEITEN ======================= */
.auth { flex: 1; display: grid; place-items: center; padding: 48px 16px 24px; }
.auth-card { width: 100%; max-width: 440px; border-radius: var(--radius-xl); padding: 38px 34px 30px; }
.auth-card .top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 30px; }
.client-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; margin: 0 0 22px;
  border-radius: var(--radius-md);
  background: var(--glass-surface-strong); border: 1px solid var(--glass-border);
  font-size: 14px; color: var(--text-muted);
}
.client-banner strong { color: var(--text-main); }
.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 6px; color: var(--text-faint); font-size: 12.5px; font-weight: 600; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--divider); }
.switch-line { text-align: center; margin: 22px 0 0; font-size: 14px; color: var(--text-muted); }
.auth form .btn-primary { margin-top: 22px; }

/* ======================= NAVIGATION ======================= */
.topnav-wrap { position: sticky; top: 0; z-index: 50; padding: 14px 16px 0; }
.topnav {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 8px 8px 22px; border-radius: 50px;
}
.nav-links { display: flex; gap: 2px; }
.nav-links a {
  color: var(--text-main); font-weight: 600; font-size: 14.5px;
  padding: 9px 16px; border-radius: 22px; text-decoration: none; white-space: nowrap;
  transition: background .2s;
}
.nav-links a:hover { background: var(--hover); }
.nav-links a.active { background: var(--accent-indigo); color: #fff; box-shadow: 0 4px 15px rgba(94,92,230,0.35); }
.nav-user { display: flex; align-items: center; gap: 4px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
.avatar-lg { width: 64px; height: 64px; font-size: 22px; }

/* ======================= SEITEN ======================= */
main.page { width: 100%; max-width: 1080px; margin: 0 auto; padding: 44px 16px 40px; flex: 1; }
.page-head { margin-bottom: 30px; }
.page-head .kicker { margin-bottom: 18px; }
.page-head .sub { margin: 0; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 14.5px; margin-bottom: 18px; }

.panel { border-radius: var(--radius-lg); padding: 26px; }
.panel + .panel { margin-top: 18px; }
.panel h2 { font-size: 18px; letter-spacing: -0.01em; margin: 0 0 4px; }
.panel .panel-sub { color: var(--text-muted); font-size: 14px; margin: 0 0 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.empty { color: var(--text-muted); font-size: 14.5px; margin: 0; }

/* Liste in Glas-Panels (Passkeys, Sitzungen, Dateien, Protokoll) */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 14px; padding: 13px 4px; }
.list > li + li { border-top: 1px solid var(--divider); }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 650; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.list .meta { font-size: 13px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; }
.list a.row-link { color: var(--text-main); display: flex; align-items: center; gap: 14px; width: 100%; text-decoration: none; }
.list a.row-link:hover .title { color: var(--accent-blue); }
.icon-tile {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  display: grid; place-items: center; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
}
.icon-tile svg { width: 21px; height: 21px; }
.bg-blue { background: linear-gradient(135deg, var(--accent-blue), #4fb2ff); }
.bg-indigo { background: linear-gradient(135deg, var(--accent-indigo), #8a89ff); }
.bg-teal { background: linear-gradient(135deg, var(--accent-teal), #55e8d6); }
.bg-orange { background: linear-gradient(135deg, var(--accent-orange), #ffbf5c); }
.bg-red { background: linear-gradient(135deg, var(--accent-red), #ff7a70); }
.bg-green { background: linear-gradient(135deg, var(--accent-green), #6be38a); }
.bg-gray { background: linear-gradient(135deg, #8e8e93, #636366); }

.badge { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge-none { background: var(--warn-bg); color: var(--warn-text); }
.badge-apps { background: rgba(10,132,255,0.14); color: var(--accent-blue); }
.badge-admin { background: rgba(94,92,230,0.16); color: var(--accent-indigo); }
.badge-ok { background: var(--ok-bg); color: var(--ok-text); }
.badge-error { background: var(--error-bg); color: var(--error-text); }

/* ======================= APPS ======================= */
.app-icon { display: inline-grid; place-items: center; flex: none; object-fit: cover; color: #fff; font-weight: 700; box-shadow: 0 6px 16px rgba(23,22,22,0.14); }
.app-icon-sm { width: 38px; height: 38px; border-radius: 10px; font-size: 13px; }
.app-icon-md { width: 48px; height: 48px; border-radius: 12px; font-size: 16px; }
.app-icon-lg { width: 66px; height: 66px; border-radius: 16px; font-size: 21px; }
.app-icon-xl { width: 92px; height: 92px; border-radius: 22px; font-size: 30px; box-shadow: 0 16px 40px rgba(23,22,22,0.2); }

.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.app-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 22px; border-radius: var(--radius-md);
  color: var(--text-main); text-decoration: none !important;
  transition: transform .35s cubic-bezier(.25,.8,.25,1), box-shadow .35s ease;
}
.app-tile:hover { transform: translateY(-5px); box-shadow: 0 26px 60px rgba(23,22,22,0.18), inset 0 1px 0 var(--glass-rim-soft); }
.app-tile .app-icon { margin-bottom: 14px; transition: transform .35s cubic-bezier(.25,.8,.25,1); }
.app-tile:hover .app-icon { transform: scale(1.05); }
.app-tile-name { font-weight: 700; font-size: 16px; }
.app-tile-desc { font-size: 13.5px; color: var(--text-muted); line-height: 1.45; }
.app-hero { display: flex; align-items: center; gap: 22px; margin-bottom: 26px; }
.app-hero .headline { margin-bottom: 4px; }
.app-hero .sub { margin: 0; }

.callout { display: flex; align-items: center; gap: 18px; border-radius: var(--radius-lg); padding: 20px 22px; margin-bottom: 22px; }
.callout .grow { flex: 1; }
.callout h3 { margin: 0 0 3px; font-size: 16px; }
.callout p { margin: 0; font-size: 14px; color: var(--text-muted); }

/* ======================= VERWALTUNG ======================= */
.admin-layout { display: grid; grid-template-columns: 360px 1fr; gap: 18px; align-items: start; }
.user-list { padding: 14px; position: sticky; top: 96px; }
.user-list input[type=search] { font-size: 15px; padding: 11px 16px; border-radius: 50px; margin-bottom: 8px; }
.user-list ul { list-style: none; margin: 0; padding: 0; max-height: calc(100vh - 220px); overflow-y: auto; }
.user-row {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border: 0; border-radius: 16px; background: none;
  font: inherit; color: var(--text-main); text-align: left; cursor: pointer;
  transition: background .2s;
}
.user-row:hover { background: var(--hover); }
.user-row.active { background: var(--glass-surface-strong); box-shadow: 0 4px 14px rgba(23,22,22,0.08), inset 0 1px 0 var(--glass-rim-soft); }
.user-row .avatar { width: 34px; height: 34px; font-size: 12.5px; }
.user-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.user-row-text strong { font-size: 14.5px; }
.user-row-text small { font-size: 12.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.detail-head { display: flex; align-items: center; gap: 16px; padding-bottom: 20px; margin-bottom: 4px; border-bottom: 1px solid var(--divider); flex-wrap: wrap; }
.detail-head h2 { margin: 0; font-size: 21px; }
.detail-head .grow { flex: 1; min-width: 180px; }
.detail-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section-label { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; font-weight: 750; color: var(--text-faint); margin: 24px 4px 10px; display: flex; justify-content: space-between; align-items: baseline; }
.section-label span { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 13px; }

.group { border-radius: var(--radius-md); background: var(--glass-surface-strong); border: 1px solid var(--glass-border); overflow: hidden; }
.group.disabled { opacity: .5; }
.row { display: flex; align-items: center; gap: 13px; padding: 12px 16px; margin: 0; font-weight: 400; cursor: pointer; }
.row + .row { border-top: 1px solid var(--divider); }
.row:hover { background: var(--hover); }
.group.disabled .row { cursor: default; }
.group.disabled .row:hover { background: none; }
.row-text { flex: 1; min-width: 0; }
.row-text strong { display: block; font-size: 14.5px; font-weight: 650; }
.row-text small { display: block; color: var(--text-muted); font-size: 12.5px; }

/* iOS-Schalter */
.switch { appearance: none; width: 51px; height: 31px; border-radius: 999px; background: rgba(120,120,128,0.24); position: relative; cursor: pointer; flex: none; transition: background .25s; margin: 0; }
.switch::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 .25s cubic-bezier(.3,1.4,.6,1); }
.switch:checked { background: var(--accent-green); }
.switch:checked::after { transform: translateX(20px); }
.switch:disabled { opacity: .5; cursor: not-allowed; }
.switch:focus-visible { outline-offset: 2px; }

.detail-actions { display: flex; justify-content: flex-end; margin-top: 22px; }

/* ======================= DIALOG ======================= */
dialog {
  border: 0; padding: 0; background: transparent; color: var(--text-main);
  max-width: min(440px, calc(100vw - 32px)); width: 100%;
}
dialog::backdrop { background: rgba(10, 10, 14, 0.35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog .panel { background: var(--glass-surface-strong); }
dialog h2 { margin: 0 0 8px; }
.secret {
  font: 600 22px/1.2 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .04em;
  text-align: center; padding: 18px; margin: 18px 0; border-radius: var(--radius-sm);
  background: var(--field-bg); border: 1px dashed var(--glass-border); user-select: all;
}
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ======================= TOAST ======================= */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 200;
  transform: translate(-50%, 140%); opacity: 0;
  padding: 13px 24px; border-radius: 50px;
  font-size: 15px; font-weight: 650; white-space: nowrap;
  transition: transform .5s cubic-bezier(.3,1.4,.5,1), opacity .3s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.error { color: var(--error-text); }

/* ======================= FOOTER ======================= */
footer.site-footer { padding: 30px 24px 34px; text-align: center; }
.footer-links { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.footer-links a { color: var(--text-muted); font-size: 13px; font-weight: 600; }
.footer-links a:hover { color: var(--text-main); text-decoration: none; }
.copyright { font-size: 12.5px; color: var(--text-faint); }

/* ======================= RESPONSIVE ======================= */
@media (max-width: 860px) {
  .admin-layout { grid-template-columns: 1fr; }
  .user-list { position: static; }
  .user-list ul { max-height: 280px; }
}
@media (max-width: 640px) {
  .topnav { padding: 6px 6px 6px 16px; gap: 6px; }
  .wordmark { font-size: 18px; }
  .nav-links a { padding: 8px 11px; font-size: 13.5px; }
  .nav-user .avatar { display: none; }
  .auth-card { padding: 30px 22px 24px; border-radius: 30px; }
  .panel { padding: 20px; }
  .app-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .app-tile { padding: 16px; }
  .app-hero { gap: 16px; }
  .app-icon-xl { width: 72px; height: 72px; border-radius: 17px; }
  .callout { flex-wrap: wrap; }
}
@media (max-width: 400px) {
  .nav-links a { padding: 7px 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ======================= KLEINE HELFER ======================= */
.narrow-form { max-width: 440px; }
.form-submit { margin-top: 18px; }
.detail-meta { font-size: 14px; }
.dialog-text { margin: 0; }
.dialog-note { margin: 0 0 18px; }
#pending .muted { margin: 0; font-size: 14.5px; }

/* Handy: Navigation zweizeilig (Marke + Konto oben, Links darunter) */
@media (max-width: 640px) {
  .topnav { flex-wrap: wrap; border-radius: 26px; padding: 8px 8px 8px 16px; row-gap: 4px; }
  .nav-links { order: 3; width: 100%; justify-content: space-between; padding: 2px 0 0; border-top: 1px solid var(--divider); padding-top: 6px; }
  .nav-links a { flex: 1; text-align: center; }
  .nav-user .avatar { display: grid; width: 32px; height: 32px; font-size: 12px; }
  .callout .btn { width: 100%; }
}

/* Geschützte Seiten erst zeigen, wenn die Zugangsprüfung durch ist (kein Aufblitzen). */
body[data-auth="user"]:not([data-ready]) main,
body[data-auth="admin"]:not([data-ready]) main,
body[data-auth="pending"]:not([data-ready]) main { visibility: hidden; }
