:root {
  --bg:#f6f8fb; --bg2:#eef3f8; --surface:rgba(255,255,255,.82); --surface-2:#fff; --text:#111827; --muted:#64748b; --muted-2:#94a3b8; --line:#dbe4ef; --line-soft:rgba(15,23,42,.08);
  --sidebar:#0b1220; --sidebar-2:#111827; --sidebar-text:#e5edf8; --primary:#1459f5; --primary-2:#14b8a6; --success:#059669; --danger:#dc2626; --warning:#d97706;
  --shadow:0 18px 60px rgba(15,23,42,.10); --shadow-sm:0 8px 24px rgba(15,23,42,.08); --radius:22px; --radius-sm:14px; --sidebar-width:292px; color-scheme: light;
}
@media (prefers-color-scheme: dark){body[data-theme="system"]{--bg:#080d16;--bg2:#0c1422;--surface:rgba(17,24,39,.78);--surface-2:#111827;--text:#f8fafc;--muted:#a8b4c5;--muted-2:#738096;--line:#243145;--line-soft:rgba(255,255,255,.08);--sidebar:#050814;--sidebar-2:#09111f;color-scheme:dark}}
body[data-theme="dark"]{--bg:#080d16;--bg2:#0c1422;--surface:rgba(17,24,39,.78);--surface-2:#111827;--text:#f8fafc;--muted:#a8b4c5;--muted-2:#738096;--line:#243145;--line-soft:rgba(255,255,255,.08);--sidebar:#050814;--sidebar-2:#09111f;color-scheme:dark}
*{box-sizing:border-box} html{min-height:100%} body{margin:0;min-height:100vh;color:var(--text);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",sans-serif;background:radial-gradient(circle at 10% -10%,rgba(20,89,245,.18),transparent 34rem),radial-gradient(circle at 92% 0,rgba(20,184,166,.16),transparent 30rem),linear-gradient(135deg,var(--bg),var(--bg2));letter-spacing:-.015em} body:before{content:"";position:fixed;inset:0;pointer-events:none;background-image:linear-gradient(var(--line-soft) 1px,transparent 1px),linear-gradient(90deg,var(--line-soft) 1px,transparent 1px);background-size:42px 42px;mask-image:linear-gradient(to bottom,#000,transparent 86%)} a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button{cursor:pointer}.app-shell{min-height:100vh;display:grid;grid-template-columns:var(--sidebar-width) 1fr;position:relative;z-index:1}.sidebar{position:sticky;top:0;height:100vh;padding:18px 14px;overflow:auto;color:var(--sidebar-text);background:linear-gradient(180deg,var(--sidebar),var(--sidebar-2));border-right:1px solid rgba(255,255,255,.08);box-shadow:18px 0 50px rgba(2,6,23,.22)}.brand{display:flex;gap:12px;align-items:center;padding:8px 10px 20px;font-size:1.12rem;font-weight:950;letter-spacing:-.04em}.brand-icon{width:44px;height:44px;border-radius:16px;display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,#e11d48,#1459f5 48%,#14b8a6);box-shadow:0 14px 34px rgba(20,89,245,.28)}.brand small{display:block;margin-top:3px;color:#94a3b8;font-size:.72rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.nav-section{margin:18px 10px 8px;color:#718096;font-size:.72rem;font-weight:950;text-transform:uppercase;letter-spacing:.13em}.sidebar nav a{display:flex;align-items:center;gap:10px;margin:3px 0;padding:11px 12px;border-radius:15px;color:#cbd5e1;font-weight:820;transition:.16s ease;border:1px solid transparent}.sidebar nav a span{width:24px;text-align:center}.sidebar nav a:hover{background:rgba(255,255,255,.07);color:#fff}.sidebar nav a.active{background:linear-gradient(135deg,rgba(20,89,245,.96),rgba(20,184,166,.88));color:#fff;box-shadow:0 12px 30px rgba(20,89,245,.25)}.main{min-width:0}.topbar{position:sticky;top:0;z-index:5;display:flex;justify-content:space-between;align-items:center;gap:16px;padding:15px 30px;background:rgba(246,248,251,.72);backdrop-filter:blur(22px) saturate(1.35);border-bottom:1px solid var(--line-soft)}body[data-theme="dark"] .topbar{background:rgba(8,13,22,.72)}@media(prefers-color-scheme:dark){body[data-theme="system"] .topbar{background:rgba(8,13,22,.72)}}.topbar strong{font-size:1.05rem}.topbar-eyebrow,.eyebrow{margin:0 0 7px;color:var(--muted-2);text-transform:uppercase;font-size:.73rem;font-weight:950;letter-spacing:.14em}.topbar-user{display:flex;align-items:center;gap:10px;color:var(--muted)}.user-chip{display:inline-grid;gap:1px;text-align:right;font-weight:900}.user-chip small{font-size:.72rem;color:var(--muted);font-weight:800}.theme-switch{display:flex;gap:4px;padding:4px;border:1px solid var(--line);border-radius:999px;background:var(--surface)}.theme-dot{width:30px;height:30px;border-radius:999px;border:0;background:transparent;color:var(--muted);font-weight:900}.theme-dot:hover{background:var(--surface-2);color:var(--text)}.secure-pill{display:inline-flex;align-items:center;gap:7px;padding:8px 11px;border-radius:999px;background:#ecfdf5;color:#047857;border:1px solid #bbf7d0;font-size:.8rem;font-weight:900;white-space:nowrap}.secure-pill.off{background:#fff7ed;color:#c2410c;border-color:#fed7aa}.menu-toggle{display:none;border:0;background:transparent;font-size:1.4rem;color:var(--text)}.content{width:min(1600px,100%);padding:30px}.page-head,.page-hero{display:flex;justify-content:space-between;align-items:flex-start;gap:22px;margin-bottom:22px}.page-hero{padding:28px;border-radius:30px;background:linear-gradient(135deg,var(--surface),rgba(255,255,255,.52));border:1px solid rgba(255,255,255,.62);box-shadow:var(--shadow);backdrop-filter:blur(18px)}body[data-theme="dark"] .page-hero{background:linear-gradient(135deg,rgba(17,24,39,.88),rgba(15,23,42,.58));border-color:rgba(255,255,255,.08)}h1,h2,h3{margin:0;letter-spacing:-.05em}h1{font-size:clamp(2rem,3.3vw,3.85rem);line-height:1.02}h2{font-size:1.18rem}p{line-height:1.65}.muted{color:var(--muted)}.subtle{color:var(--muted-2);font-size:.86rem}.hero-clean{position:relative;overflow:hidden}.hero-clean:after{content:"";position:absolute;right:-110px;top:-150px;width:360px;height:360px;border-radius:999px;background:radial-gradient(circle,rgba(20,89,245,.22),rgba(20,184,166,.18),transparent 70%)}.hero-clean>*{position:relative;z-index:1}.hero-actions,.actions{display:flex;flex-wrap:wrap;gap:10px}.card,.stat-card,.toolbar,.pagination,.login-card{background:var(--surface);border:1px solid rgba(255,255,255,.60);box-shadow:var(--shadow);border-radius:var(--radius);backdrop-filter:blur(18px) saturate(1.2)}body[data-theme="dark"] .card,body[data-theme="dark"] .stat-card,body[data-theme="dark"] .toolbar,body[data-theme="dark"] .pagination{border-color:rgba(255,255,255,.08)}.card{padding:22px;margin-bottom:22px}.card-head{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:16px}.card-head a{color:var(--primary);font-weight:900}.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:22px}.stat-grid.six{grid-template-columns:repeat(6,minmax(0,1fr))}.stat-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.stat-card{min-height:112px;padding:17px;display:flex;flex-direction:column;justify-content:space-between}.stat-card span{color:var(--muted);font-size:.82rem;font-weight:900}.stat-card strong{font-size:2.25rem;letter-spacing:-.06em}.stat-card.mini{min-height:92px}.compact-stats{margin-bottom:16px}.grid{display:grid;gap:22px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:41px;padding:9px 14px;border-radius:13px;border:1px solid var(--line);background:var(--surface-2);color:var(--text);font-weight:900;box-shadow:var(--shadow-sm);transition:.16s ease}.btn:hover{transform:translateY(-1px);box-shadow:0 16px 36px rgba(15,23,42,.13)}.btn.primary{border-color:transparent;color:#fff;background:linear-gradient(135deg,var(--primary),#0f766e)}.btn.danger{background:#fff1f2;color:var(--danger);border-color:#fecdd3}.btn.small{min-height:34px;padding:6px 10px;border-radius:10px;font-size:.85rem}.toolbar{padding:14px;display:flex;gap:10px;align-items:center;justify-content:space-between;margin-bottom:18px}.toolbar form,.toolbar{flex-wrap:wrap}input,select,textarea{width:100%;border:1px solid var(--line);border-radius:13px;background:var(--surface-2);color:var(--text);padding:10px 12px;outline:0;transition:.15s ease}textarea{resize:vertical}input:focus,select:focus,textarea:focus{border-color:var(--primary);box-shadow:0 0 0 4px rgba(20,89,245,.14)}label{display:grid;gap:7px;color:var(--muted);font-size:.9rem;font-weight:900}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.form-grid.one{grid-template-columns:1fr}.form-grid .full,.full{grid-column:1/-1}.form-actions{display:flex;gap:10px;justify-content:flex-end;align-items:center}.inline-form{display:flex;gap:9px;flex-wrap:wrap;align-items:center}.inline-form>*{width:auto;min-width:160px}.inline-form.slim>*{min-width:120px}.check{display:flex;grid-template-columns:none;flex-direction:row;align-items:flex-start;gap:10px;padding:10px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.38)}.check input{width:auto;margin-top:2px}.check small{display:block;color:var(--muted);font-weight:700}.table-wrap{width:100%;overflow:auto;border-radius:18px;border:1px solid var(--line-soft);padding:0}table{width:100%;border-collapse:collapse;min-width:760px}th,td{padding:13px 15px;text-align:left;border-bottom:1px solid var(--line-soft);vertical-align:top}th{color:var(--muted);font-size:.76rem;text-transform:uppercase;letter-spacing:.08em;background:rgba(148,163,184,.10)}tr:hover td{background:rgba(20,89,245,.035)}.compact th,.compact td{padding:10px 12px}.pill,.status,.role{display:inline-flex;align-items:center;border-radius:999px;padding:6px 10px;font-size:.77rem;font-weight:950;background:#eef2ff;color:#3730a3}.status.Aktiv,.status.Verfügbar,.status.Genehmigt,.ok{background:#ecfdf5;color:#047857}.status.Defekt,.status.Abgelehnt,.danger-text{background:#fff1f2;color:#be123c}.status.Offen,.status.In{background:#fffbeb;color:#92400e}.flash{margin-bottom:18px;border-radius:16px;padding:14px 16px;font-weight:900;border:1px solid transparent}.flash.success{background:#ecfdf5;color:#047857;border-color:#bbf7d0}.flash.error{background:#fff1f2;color:#be123c;border-color:#fecdd3}.flash.info{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}.empty{text-align:center;color:var(--muted);padding:24px}.department-strip{display:grid;gap:10px}.department-chip{display:flex;align-items:center;gap:12px;padding:12px;border-radius:16px;background:rgba(148,163,184,.10);border:1px solid var(--line)}.department-chip em{margin-left:auto;font-style:normal;color:var(--muted);font-weight:900}.entity-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.entity-card{padding:20px;border-radius:22px;background:var(--surface);border:1px solid var(--line-soft);box-shadow:var(--shadow-sm)}.entity-card-top,.mini-stats{display:flex;justify-content:space-between;gap:10px;align-items:center}.entity-icon{font-size:1.5rem}.mini-stats{margin:18px 0;color:var(--muted)}.detail-grid,.info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.detail-item,.info-grid>div{padding:13px;border:1px solid var(--line);border-radius:15px;background:var(--surface-2)}.detail-item span,.info-grid span,.detail-list dt{display:block;margin-bottom:5px;color:var(--muted);font-size:.75rem;font-weight:950;text-transform:uppercase;letter-spacing:.08em}.detail-list{display:grid;gap:8px}.detail-list dd{margin:0 0 8px}.clean-list{display:grid;gap:10px;color:var(--muted);padding-left:20px}.permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.pre{white-space:pre-wrap}code{padding:3px 7px;border-radius:8px;background:rgba(20,89,245,.1);color:var(--primary)}.login-page,.login-wrap{min-height:100vh;display:grid;place-items:center;padding:28px;background:radial-gradient(circle at 20% 0,rgba(20,184,166,.2),transparent 30rem),linear-gradient(135deg,#08111f,#10213b)}.login-card{width:min(480px,100%);padding:28px}.login-card.wide{width:min(560px,100%)}.login-logo{width:58px;height:58px;border-radius:20px;display:grid;place-items:center;margin-bottom:12px;background:linear-gradient(135deg,#e11d48,var(--primary),var(--primary-2));color:#fff;font-size:1.8rem}.login-card form{display:grid;gap:14px;margin-top:20px}.btn.full{width:100%}.auth-switch{margin-top:18px;display:flex;justify-content:space-between;gap:12px;color:var(--muted)}.auth-switch a{color:var(--primary);font-weight:950}.pagination{display:flex;gap:8px;align-items:center;justify-content:center;padding:12px}.pagination a,.pagination span{padding:8px 11px;border-radius:12px;font-weight:900}.pagination .active{background:var(--primary);color:#fff}@media(max-width:1180px){.stat-grid.six,.stat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.grid.two,.grid.three,.entity-grid{grid-template-columns:1fr}}@media(max-width:860px){.app-shell{grid-template-columns:1fr}.sidebar{position:fixed;inset:0 auto 0 0;width:min(86vw,310px);z-index:20;transform:translateX(-105%);transition:.2s ease}body.sidebar-open .sidebar{transform:translateX(0)}.menu-toggle{display:inline-flex}.topbar{padding:14px 18px}.content{padding:18px}.form-grid,.detail-grid,.info-grid,.permission-grid{grid-template-columns:1fr}.stat-grid.six,.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.topbar-user .secure-pill,.user-chip{display:none}.page-head,.page-hero{flex-direction:column}.inline-form>*{width:100%}}@media(max-width:560px){.stat-grid.six,.stat-grid{grid-template-columns:1fr}.form-actions{justify-content:stretch;flex-direction:column}.btn{width:100%}}
.compact-fields { gap: 8px; margin: 0; }
.compact-fields input { min-width: 120px; }
.flash.info { border-color: rgba(37, 99, 235, .25); background: rgba(37, 99, 235, .08); color: var(--text); }

/* Retter-Portal v1.0.14: echtes Logo + seriöser E-Mail-First Auth-Look */
:root{
  --primary:#c8102e;
  --primary-2:#132233;
  --accent:#e21b2d;
  --sidebar:#ffffff;
  --sidebar-2:#f7f9fc;
  --sidebar-text:#172336;
}
body[data-theme="dark"]{
  --sidebar:#08101c;
  --sidebar-2:#101827;
  --sidebar-text:#eef4fb;
  --primary:#f04452;
  --primary-2:#172a3d;
}
@media (prefers-color-scheme: dark){body[data-theme="system"]{--sidebar:#08101c;--sidebar-2:#101827;--sidebar-text:#eef4fb;--primary:#f04452;--primary-2:#172a3d}}
body{background:radial-gradient(circle at 18% -8%,rgba(200,16,46,.12),transparent 34rem),radial-gradient(circle at 95% 2%,rgba(19,34,51,.12),transparent 30rem),linear-gradient(135deg,var(--bg),var(--bg2));}
.sidebar{background:linear-gradient(180deg,var(--sidebar),var(--sidebar-2));color:var(--sidebar-text);border-right:1px solid var(--line);box-shadow:12px 0 35px rgba(15,23,42,.08)}
body[data-theme="dark"] .sidebar{border-right-color:rgba(255,255,255,.08);box-shadow:18px 0 50px rgba(2,6,23,.22)}
.brand{position:sticky;top:0;z-index:3;margin:-4px -4px 14px;padding:10px 10px 16px;border-radius:20px;background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(255,255,255,.78));box-shadow:0 10px 26px rgba(15,23,42,.06)}
body[data-theme="dark"] .brand{background:linear-gradient(180deg,rgba(15,23,42,.92),rgba(15,23,42,.66));box-shadow:none}
.brand-logo-wrap{width:100%;display:flex;align-items:center;justify-content:flex-start;min-height:58px;overflow:hidden}
.brand-logo{display:block;width:min(218px,100%);height:auto;object-fit:contain;filter:drop-shadow(0 8px 18px rgba(15,23,42,.10))}
.brand-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.brand-icon{display:none}.brand small{display:none}
.sidebar nav a{color:#36445a;background:transparent;border-radius:14px}
body[data-theme="dark"] .sidebar nav a{color:#cbd5e1}
.sidebar nav a:hover{background:rgba(200,16,46,.075);color:#c8102e}
body[data-theme="dark"] .sidebar nav a:hover{background:rgba(255,255,255,.07);color:#fff}
.sidebar nav a.active{background:linear-gradient(135deg,#c8102e,#8f1226);box-shadow:0 12px 28px rgba(200,16,46,.22)}
.nav-section{color:#7c8798}
.topbar-title{display:flex;align-items:center;gap:12px;min-width:0}.topbar-logo{width:42px;height:42px;object-fit:contain;border-radius:14px;padding:4px;background:rgba(255,255,255,.85);border:1px solid var(--line);box-shadow:0 8px 20px rgba(15,23,42,.08)}
body[data-theme="dark"] .topbar-logo{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.10)}
.btn.primary,.sidebar nav a.active{background:linear-gradient(135deg,#d30d21,#9c1027);color:#fff;border-color:transparent}.btn.primary:hover{box-shadow:0 16px 38px rgba(200,16,46,.26)}
input:focus,select:focus,textarea:focus{border-color:#c8102e;box-shadow:0 0 0 4px rgba(200,16,46,.12)}
.login-page.auth-page-branded{background:radial-gradient(circle at 15% 10%,rgba(200,16,46,.22),transparent 30rem),radial-gradient(circle at 92% 7%,rgba(19,34,51,.28),transparent 32rem),linear-gradient(135deg,#f6f8fb,#eef2f7);}
body[data-theme="dark"] .login-page.auth-page-branded{background:radial-gradient(circle at 15% 10%,rgba(200,16,46,.18),transparent 30rem),radial-gradient(circle at 92% 7%,rgba(255,255,255,.08),transparent 32rem),linear-gradient(135deg,#08101c,#101827)}
.auth-card{position:relative;overflow:hidden;border-radius:30px;border:1px solid rgba(255,255,255,.72);background:linear-gradient(155deg,rgba(255,255,255,.92),rgba(255,255,255,.72));box-shadow:0 30px 90px rgba(15,23,42,.16)}
.auth-card:before{content:"";position:absolute;inset:-1px -1px auto -1px;height:6px;background:linear-gradient(90deg,#c8102e,#132233,#c8102e)}
body[data-theme="dark"] .auth-card{border-color:rgba(255,255,255,.10);background:linear-gradient(155deg,rgba(15,23,42,.92),rgba(15,23,42,.72));box-shadow:0 30px 100px rgba(0,0,0,.38)}
.auth-logo{display:block;width:min(310px,92%);height:auto;margin:4px auto 22px;object-fit:contain;filter:drop-shadow(0 10px 24px rgba(15,23,42,.12))}.login-logo{display:none}.auth-card h1{font-size:clamp(2rem,4vw,3.2rem);text-align:center}.auth-card .eyebrow,.auth-hint{text-align:center}.auth-hint{margin:8px 0 22px;color:var(--muted);font-weight:800}.login-policy-note{margin-top:14px;padding:11px 13px;border-radius:14px;background:rgba(200,16,46,.075);color:#8f1226;border:1px solid rgba(200,16,46,.18);font-size:.86rem;font-weight:900;text-align:center}
body[data-theme="dark"] .login-policy-note{background:rgba(240,68,82,.10);color:#fecdd3;border-color:rgba(240,68,82,.22)}
.pill,.status,.role{background:#fff1f2;color:#9f1239}.status.Aktiv,.status.Verfügbar,.status.Genehmigt,.ok{background:#ecfdf5;color:#047857}.card,.stat-card,.toolbar,.pagination,.login-card{border-color:rgba(203,213,225,.72)}
@media(max-width:860px){.brand-logo{width:min(210px,100%)}.topbar-logo{width:36px;height:36px}.topbar-title{gap:9px}}

/* Retter-Portal v1.0.14: transparentes Logo, stabilere Navigation, kein Layout-Ruckeln */
html{
  min-height:100%;
  overflow-y:scroll;
  scrollbar-gutter:stable both-edges;
}
body{
  min-height:100dvh;
  overflow-x:hidden;
}
.app-shell{
  grid-template-columns:var(--sidebar-width) minmax(0,1fr);
  align-items:start;
}
.sidebar{
  width:var(--sidebar-width);
  min-width:var(--sidebar-width);
  max-width:var(--sidebar-width);
  contain:layout paint;
}
.main{
  min-width:0;
  width:100%;
}
.content{
  margin:0 auto;
  min-height:calc(100dvh - 74px);
}
.sidebar nav a{
  min-height:44px;
  transform:none!important;
  will-change:auto;
}
.sidebar nav a:hover,
.sidebar nav a.active{
  transform:none!important;
}
.brand{
  min-height:90px;
  align-items:center;
}
.brand-logo-wrap{
  min-height:72px;
  padding:4px 0;
}
.brand-logo{
  width:min(232px,100%);
  max-height:82px;
  object-fit:contain;
  object-position:left center;
}
.topbar-logo{
  background:transparent;
  border-color:transparent;
  box-shadow:none;
  padding:0;
}
.auth-logo{
  width:min(330px,92%);
  max-height:138px;
  object-fit:contain;
}
.theme-switch{
  min-width:74px;
  justify-content:center;
}
.theme-dot{
  line-height:1;
}
@media(max-width:860px){
  .sidebar{width:min(86vw,310px);min-width:0;max-width:min(86vw,310px)}
  .brand-logo{width:min(226px,100%)}
}

/* Retter-Portal v1.0.14: Layout-Reparatur, echtes transparentes Logo, ruhige Navigation */
:root{
  --sidebar-width:300px;
  --primary:#c8102e;
  --primary-2:#132233;
  --accent:#e21b2d;
}
html{
  overflow-y:auto;
  scrollbar-gutter:stable;
  background:var(--bg);
}
body{
  width:100%;
  overflow-x:hidden;
  background:
    radial-gradient(circle at 18% -12%,rgba(200,16,46,.10),transparent 34rem),
    radial-gradient(circle at 94% 0,rgba(19,34,51,.10),transparent 32rem),
    linear-gradient(135deg,var(--bg),var(--bg2));
}
body[data-theme="dark"]{
  --bg:#07101d;
  --bg2:#0b1422;
  --surface:rgba(16,25,41,.88);
  --surface-2:#111c2c;
  --text:#f5f7fb;
  --muted:#aab6c7;
  --muted-2:#7e8ca3;
  --line:#253247;
  --line-soft:rgba(255,255,255,.07);
  --sidebar:#07101d;
  --sidebar-2:#0b1422;
  --sidebar-text:#f2f6fb;
  --primary:#e21b2d;
}
@media (prefers-color-scheme: dark){body[data-theme="system"]{
  --bg:#07101d;
  --bg2:#0b1422;
  --surface:rgba(16,25,41,.88);
  --surface-2:#111c2c;
  --text:#f5f7fb;
  --muted:#aab6c7;
  --muted-2:#7e8ca3;
  --line:#253247;
  --line-soft:rgba(255,255,255,.07);
  --sidebar:#07101d;
  --sidebar-2:#0b1422;
  --sidebar-text:#f2f6fb;
  --primary:#e21b2d;
}}
.app-shell{
  display:block;
  min-height:100dvh;
}
.sidebar{
  position:fixed;
  inset:0 auto 0 0;
  z-index:30;
  width:var(--sidebar-width);
  min-width:var(--sidebar-width);
  max-width:var(--sidebar-width);
  height:100dvh;
  padding:18px 14px 22px;
  overflow-y:auto;
  overflow-x:hidden;
  background:linear-gradient(180deg,var(--sidebar),var(--sidebar-2));
  color:var(--sidebar-text);
  border-right:1px solid var(--line);
  box-shadow:12px 0 36px rgba(15,23,42,.08);
  contain:initial;
}
body[data-theme="dark"] .sidebar{box-shadow:18px 0 60px rgba(0,0,0,.28);border-right-color:rgba(255,255,255,.08)}
.main{
  width:auto;
  min-width:0;
  margin-left:var(--sidebar-width);
}
.topbar{
  min-height:74px;
}
.content{
  width:min(1500px,100%);
  margin:0 auto;
  padding:28px 30px 40px;
  transition:opacity .14s ease, transform .14s ease;
}
body.page-transitioning .content{
  opacity:.82;
  transform:translateY(2px);
}
.brand{
  position:relative;
  top:auto;
  display:flex;
  width:100%;
  min-height:82px;
  margin:0 0 18px;
  padding:8px 8px 16px;
  border-radius:22px;
  background:transparent;
  box-shadow:none;
  overflow:hidden;
}
body[data-theme="dark"] .brand{background:transparent;box-shadow:none}
.brand-logo-wrap{
  width:100%;
  min-height:58px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  padding:0;
  overflow:hidden;
}
.brand-logo{
  display:block;
  width:228px;
  max-width:100%;
  max-height:86px;
  height:auto;
  object-fit:contain;
  object-position:left center;
  filter:drop-shadow(0 8px 18px rgba(15,23,42,.12));
}
.topbar-logo{
  width:42px;
  height:42px;
  object-fit:contain;
  border-radius:0;
  background:transparent;
  border:0;
  padding:0;
  box-shadow:none;
}
.auth-logo{
  display:block;
  width:min(320px,92%);
  max-height:124px;
  margin:0 auto 22px;
  object-fit:contain;
  filter:drop-shadow(0 12px 28px rgba(15,23,42,.14));
}
.login-card.auth-card{
  max-width:520px;
}
.login-card.wide.auth-card{
  max-width:620px;
}
.sidebar nav a{
  position:relative;
  min-height:42px;
  padding:10px 12px;
  color:color-mix(in srgb,var(--sidebar-text) 72%, transparent);
  border-radius:14px;
  transition:background-color .14s ease,color .14s ease,box-shadow .14s ease;
  transform:none!important;
}
.sidebar nav a:hover{
  background:rgba(200,16,46,.09);
  color:#c8102e;
}
body[data-theme="dark"] .sidebar nav a:hover{background:rgba(255,255,255,.065);color:#fff}
.sidebar nav a.active{
  background:linear-gradient(135deg,#c8102e,#981328);
  color:#fff;
  box-shadow:0 12px 26px rgba(200,16,46,.24);
}
.nav-section{margin-top:18px;color:var(--muted-2)}
.theme-switch{
  min-width:auto;
  padding:4px;
  gap:2px;
}
.theme-dot{
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  line-height:1;
}
.page-hero{
  border-radius:28px;
  background:linear-gradient(135deg,rgba(255,255,255,.92),rgba(255,255,255,.70));
  border:1px solid rgba(203,213,225,.75);
}
body[data-theme="dark"] .page-hero{background:linear-gradient(135deg,rgba(17,28,45,.94),rgba(10,18,31,.78));border-color:rgba(255,255,255,.08)}
.card,.stat-card,.toolbar,.pagination,.login-card{
  border:1px solid rgba(203,213,225,.68);
  box-shadow:0 14px 46px rgba(15,23,42,.08);
}
body[data-theme="dark"] .card,body[data-theme="dark"] .stat-card,body[data-theme="dark"] .toolbar,body[data-theme="dark"] .pagination,body[data-theme="dark"] .login-card{border-color:rgba(255,255,255,.08);box-shadow:0 16px 50px rgba(0,0,0,.20)}
.btn:hover{transform:none;box-shadow:0 12px 28px rgba(15,23,42,.12)}
.table-wrap{overflow:auto;scrollbar-gutter:stable;}
.dashboard-table table{min-width:100%;}
.dashboard-table th,.dashboard-table td{white-space:normal;}
.dashboard-table{overflow:hidden;}
@media(max-width:1180px){
  .content{padding:24px 22px 36px;}
}
@media(max-width:860px){
  .app-shell{display:block;}
  .sidebar{
    position:fixed;
    inset:0 auto 0 0;
    width:min(86vw,310px);
    min-width:0;
    max-width:min(86vw,310px);
    transform:translateX(-105%);
    transition:transform .2s ease;
  }
  body.sidebar-open .sidebar{transform:translateX(0)}
  .main{margin-left:0;}
  .content{padding:18px;}
  .brand-logo{width:min(232px,100%)}
}

/* Retter-Portal v1.0.17: Startseite/Login, Logo-Fix, ruhiger Seitenwechsel */
body.page-loading .content{
  opacity:.98;
  transform:none!important;
}
body.page-transitioning .content{
  opacity:1!important;
  transform:none!important;
}
.content{
  will-change:auto;
}
.entity-grid + .pagination,
.entity-grid + .pagination.subtle{
  margin-top:22px;
}
.pagination.subtle{
  margin-top:18px;
}
.topbar-logo,
img[src$="retter-portal-mark.png"],
img[src$="favicon.png"]{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
.topbar-logo{
  width:44px;
  height:44px;
  padding:0!important;
  object-fit:contain;
  filter:drop-shadow(0 8px 14px rgba(15,23,42,.16));
}
body[data-theme="dark"] .topbar-logo{filter:drop-shadow(0 10px 20px rgba(0,0,0,.32));}

.auth-landing{
  min-height:100dvh;
  color:var(--text);
  background:
    radial-gradient(circle at 16% 8%,rgba(200,16,46,.14),transparent 28rem),
    radial-gradient(circle at 88% 4%,rgba(19,34,51,.15),transparent 32rem),
    linear-gradient(135deg,var(--bg),var(--bg2));
  padding:26px;
  position:relative;
  overflow:hidden;
}
.auth-landing:before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:linear-gradient(var(--line-soft) 1px,transparent 1px),linear-gradient(90deg,var(--line-soft) 1px,transparent 1px);
  background-size:46px 46px;
  mask-image:linear-gradient(to bottom,#000,transparent 82%);
}
.auth-topbar,
.auth-hero-grid,
.auth-why-section{
  position:relative;
  z-index:1;
  width:min(1440px,100%);
  margin:0 auto;
}
.auth-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:14px 18px;
  border:1px solid rgba(203,213,225,.66);
  border-radius:26px;
  background:linear-gradient(135deg,rgba(255,255,255,.86),rgba(255,255,255,.60));
  box-shadow:0 18px 56px rgba(15,23,42,.08);
  backdrop-filter:blur(22px) saturate(1.18);
}
body[data-theme="dark"] .auth-topbar{
  border-color:rgba(255,255,255,.08);
  background:linear-gradient(135deg,rgba(17,28,45,.84),rgba(10,18,31,.62));
  box-shadow:0 22px 68px rgba(0,0,0,.28);
}
.auth-brand{
  display:flex;
  align-items:center;
  min-width:0;
}
.auth-brand img{
  display:block;
  width:min(270px,46vw);
  height:auto;
  max-height:74px;
  object-fit:contain;
  object-position:left center;
  filter:drop-shadow(0 10px 24px rgba(15,23,42,.10));
}
.auth-top-actions{
  display:flex;
  align-items:center;
  gap:10px;
}
.auth-theme-switch{
  display:flex;
  gap:4px;
  padding:4px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(255,255,255,.72);
  backdrop-filter:blur(16px);
}
body[data-theme="dark"] .auth-theme-switch{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.10)}
.auth-theme-switch button{
  width:36px;
  height:36px;
  border:0;
  border-radius:999px;
  background:transparent;
  color:var(--muted);
  font-weight:950;
}
.auth-theme-switch button:hover,
.auth-theme-switch button.active{
  background:var(--surface-2);
  color:var(--text);
  box-shadow:0 8px 18px rgba(15,23,42,.08);
}
.auth-hero-grid{
  display:grid;
  grid-template-columns:minmax(0,1.1fr) minmax(360px,520px);
  gap:26px;
  align-items:stretch;
  padding:42px 0 28px;
}
.auth-hero-copy,
.auth-card.auth-signin,
.auth-why-section{
  border:1px solid rgba(203,213,225,.66);
  background:linear-gradient(135deg,rgba(255,255,255,.88),rgba(255,255,255,.58));
  box-shadow:0 24px 76px rgba(15,23,42,.10);
  backdrop-filter:blur(24px) saturate(1.22);
}
body[data-theme="dark"] .auth-hero-copy,
body[data-theme="dark"] .auth-card.auth-signin,
body[data-theme="dark"] .auth-why-section{
  border-color:rgba(255,255,255,.08);
  background:linear-gradient(135deg,rgba(17,28,45,.88),rgba(10,18,31,.64));
  box-shadow:0 26px 80px rgba(0,0,0,.28);
}
.auth-hero-copy{
  position:relative;
  overflow:hidden;
  border-radius:34px;
  padding:clamp(28px,4vw,54px);
  min-height:540px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.auth-hero-copy:after{
  content:"";
  position:absolute;
  width:420px;
  height:420px;
  right:-140px;
  top:-140px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(200,16,46,.24),rgba(19,34,51,.16),transparent 68%);
  pointer-events:none;
}
.auth-hero-copy>*{position:relative;z-index:1}
.auth-hero-copy h1{
  max-width:980px;
  font-size:clamp(2.6rem,6vw,5.75rem);
  line-height:.96;
  letter-spacing:-.07em;
  margin:0;
}
.auth-lead{
  max-width:760px;
  color:var(--muted);
  font-size:clamp(1rem,1.4vw,1.22rem);
  font-weight:760;
  margin:22px 0 0;
}
.auth-hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:28px;
}
.auth-benefit-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-top:34px;
}
.auth-benefit-grid article{
  padding:16px;
  border-radius:20px;
  border:1px solid var(--line-soft);
  background:rgba(255,255,255,.50);
}
body[data-theme="dark"] .auth-benefit-grid article{background:rgba(255,255,255,.055)}
.auth-benefit-grid strong{display:block;margin-bottom:6px;font-size:1rem}
.auth-benefit-grid span{display:block;color:var(--muted);font-weight:760;line-height:1.45;font-size:.92rem}
.auth-card.auth-signin{
  position:relative;
  width:100%;
  max-width:none;
  align-self:stretch;
  padding:30px;
  border-radius:34px;
}
.auth-card.auth-signin:before{display:none}
.auth-card.auth-signin .auth-logo{
  width:min(292px,92%);
  max-height:118px;
  margin:0 auto 18px;
}
.auth-card.auth-signin h2{
  font-size:clamp(1.9rem,3vw,2.8rem);
  text-align:center;
  margin-bottom:18px;
}
.auth-card.auth-signin .eyebrow{text-align:center}
.auth-card.auth-signin form{margin-top:18px}
.auth-why-section{
  border-radius:34px;
  padding:30px;
  margin-bottom:32px;
}
.auth-section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:22px;
  margin-bottom:18px;
}
.auth-section-head h2{
  max-width:920px;
  font-size:clamp(1.7rem,3vw,3rem);
  line-height:1.04;
}
.auth-feature-row{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}
.auth-feature-card{
  padding:20px;
  border:1px solid var(--line-soft);
  border-radius:24px;
  background:rgba(255,255,255,.52);
}
body[data-theme="dark"] .auth-feature-card{background:rgba(255,255,255,.055)}
.auth-feature-card span{display:grid;place-items:center;width:46px;height:46px;border-radius:16px;margin-bottom:14px;background:#fff1f2;color:#9f1239;font-size:1.25rem}
.auth-feature-card strong{display:block;font-size:1.05rem;margin-bottom:8px}
.auth-feature-card p{margin:0;color:var(--muted);font-weight:760;line-height:1.5}
@media(max-width:1120px){
  .auth-hero-grid{grid-template-columns:1fr;}
  .auth-hero-copy{min-height:auto;}
  .auth-feature-row,.auth-benefit-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:650px){
  .auth-landing{padding:14px;}
  .auth-topbar{border-radius:22px;}
  .auth-brand img{width:min(215px,54vw);}
  .auth-top-actions .btn{display:none;}
  .auth-hero-grid{padding:20px 0;}
  .auth-hero-copy,.auth-card.auth-signin,.auth-why-section{border-radius:26px;padding:22px;}
  .auth-benefit-grid,.auth-feature-row{grid-template-columns:1fr;}
  .auth-section-head{display:block;}
}

/* Retter-Portal v1.0.17: ausgewogener Whitemode mit klareren Flächen */
:root{
  --bg:#e9eef5;
  --bg2:#f4f7fb;
  --surface:rgba(255,255,255,.88);
  --surface-2:#ffffff;
  --text:#111827;
  --muted:#53637a;
  --muted-2:#7a8799;
  --line:#cbd5e1;
  --line-soft:rgba(15,23,42,.125);
  --shadow:0 22px 66px rgba(15,23,42,.13);
  --shadow-sm:0 10px 30px rgba(15,23,42,.10);
}
body[data-theme="light"]{
  --bg:#e9eef5;
  --bg2:#f4f7fb;
  --surface:rgba(255,255,255,.88);
  --surface-2:#ffffff;
  --text:#111827;
  --muted:#53637a;
  --muted-2:#7a8799;
  --line:#cbd5e1;
  --line-soft:rgba(15,23,42,.125);
  --shadow:0 22px 66px rgba(15,23,42,.13);
  --shadow-sm:0 10px 30px rgba(15,23,42,.10);
}
body[data-theme="light"],
body[data-theme="system"]{
  background:
    radial-gradient(circle at 18% -12%,rgba(200,16,46,.13),transparent 34rem),
    radial-gradient(circle at 94% 0,rgba(19,34,51,.13),transparent 32rem),
    linear-gradient(135deg,var(--bg),var(--bg2));
}
body[data-theme="light"] .auth-landing,
body[data-theme="system"] .auth-landing{
  background:
    radial-gradient(circle at 15% 7%,rgba(200,16,46,.16),transparent 28rem),
    radial-gradient(circle at 88% 4%,rgba(19,34,51,.15),transparent 32rem),
    linear-gradient(135deg,#e8eef6,#f5f7fb 42%,#edf2f8);
}
body[data-theme="light"] .auth-topbar,
body[data-theme="light"] .auth-hero-copy,
body[data-theme="light"] .auth-card.auth-signin,
body[data-theme="light"] .auth-why-section,
body[data-theme="system"] .auth-topbar,
body[data-theme="system"] .auth-hero-copy,
body[data-theme="system"] .auth-card.auth-signin,
body[data-theme="system"] .auth-why-section{
  background:linear-gradient(145deg,rgba(255,255,255,.94),rgba(246,249,253,.86));
  border-color:rgba(148,163,184,.44);
  box-shadow:0 24px 72px rgba(15,23,42,.13), inset 0 1px 0 rgba(255,255,255,.92);
}
body[data-theme="light"] .auth-benefit-grid article,
body[data-theme="light"] .auth-feature-card,
body[data-theme="system"] .auth-benefit-grid article,
body[data-theme="system"] .auth-feature-card{
  background:linear-gradient(145deg,#ffffff,#f2f5f9);
  border-color:rgba(148,163,184,.38);
  box-shadow:0 12px 34px rgba(15,23,42,.075), inset 0 1px 0 rgba(255,255,255,.90);
}
body[data-theme="light"] .card,
body[data-theme="light"] .stat-card,
body[data-theme="light"] .toolbar,
body[data-theme="light"] .pagination,
body[data-theme="light"] .login-card,
body[data-theme="system"] .card,
body[data-theme="system"] .stat-card,
body[data-theme="system"] .toolbar,
body[data-theme="system"] .pagination,
body[data-theme="system"] .login-card{
  background:linear-gradient(145deg,rgba(255,255,255,.92),rgba(248,250,252,.84));
  border-color:rgba(148,163,184,.42);
  box-shadow:0 18px 54px rgba(15,23,42,.115), inset 0 1px 0 rgba(255,255,255,.92);
}
body[data-theme="light"] .page-hero,
body[data-theme="system"] .page-hero{
  background:linear-gradient(145deg,rgba(255,255,255,.94),rgba(244,248,252,.82));
  border-color:rgba(148,163,184,.44);
  box-shadow:0 22px 66px rgba(15,23,42,.12), inset 0 1px 0 rgba(255,255,255,.92);
}
body[data-theme="light"] input,
body[data-theme="light"] select,
body[data-theme="light"] textarea,
body[data-theme="system"] input,
body[data-theme="system"] select,
body[data-theme="system"] textarea{
  background:#f8fafc;
  border-color:#cbd5e1;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.96),0 1px 2px rgba(15,23,42,.045);
}
body[data-theme="light"] input:focus,
body[data-theme="light"] select:focus,
body[data-theme="light"] textarea:focus,
body[data-theme="system"] input:focus,
body[data-theme="system"] select:focus,
body[data-theme="system"] textarea:focus{
  background:#ffffff;
  border-color:#c8102e;
  box-shadow:0 0 0 4px rgba(200,16,46,.12),0 8px 24px rgba(15,23,42,.08);
}
body[data-theme="light"] .table-wrap,
body[data-theme="system"] .table-wrap{
  background:#f8fafc;
  border-color:rgba(148,163,184,.42);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.92);
}
body[data-theme="light"] th,
body[data-theme="system"] th{
  background:#eef3f8;
  color:#58677d;
}
body[data-theme="light"] tr:hover td,
body[data-theme="system"] tr:hover td{
  background:rgba(200,16,46,.035);
}
body[data-theme="light"] .sidebar,
body[data-theme="system"] .sidebar{
  background:linear-gradient(180deg,#ffffff,#f1f5f9);
  border-right-color:rgba(148,163,184,.46);
  box-shadow:14px 0 42px rgba(15,23,42,.10);
}
body[data-theme="light"] .topbar,
body[data-theme="system"] .topbar{
  background:rgba(244,247,251,.82);
  border-bottom-color:rgba(148,163,184,.36);
  box-shadow:0 8px 28px rgba(15,23,42,.055);
}
body[data-theme="light"] .btn:not(.primary),
body[data-theme="system"] .btn:not(.primary){
  background:linear-gradient(145deg,#ffffff,#f3f6fa);
  border-color:rgba(148,163,184,.44);
}
body[data-theme="light"] .auth-section-head h2,
body[data-theme="system"] .auth-section-head h2,
body[data-theme="light"] .auth-hero-copy h1,
body[data-theme="system"] .auth-hero-copy h1{
  text-shadow:0 1px 0 rgba(255,255,255,.70);
}
@media (prefers-color-scheme: dark){
  body[data-theme="system"]{
    background:
      radial-gradient(circle at 18% -12%,rgba(200,16,46,.10),transparent 34rem),
      radial-gradient(circle at 94% 0,rgba(19,34,51,.10),transparent 32rem),
      linear-gradient(135deg,var(--bg),var(--bg2));
  }
  body[data-theme="system"] .auth-landing{
    background:
      radial-gradient(circle at 15% 10%,rgba(200,16,46,.18),transparent 30rem),
      radial-gradient(circle at 92% 7%,rgba(255,255,255,.08),transparent 32rem),
      linear-gradient(135deg,#08101c,#101827);
  }
  body[data-theme="system"] .auth-topbar,
  body[data-theme="system"] .auth-hero-copy,
  body[data-theme="system"] .auth-card.auth-signin,
  body[data-theme="system"] .auth-why-section,
  body[data-theme="system"] .auth-benefit-grid article,
  body[data-theme="system"] .auth-feature-card,
  body[data-theme="system"] .card,
  body[data-theme="system"] .stat-card,
  body[data-theme="system"] .toolbar,
  body[data-theme="system"] .pagination,
  body[data-theme="system"] .login-card,
  body[data-theme="system"] .page-hero{
    background:linear-gradient(135deg,rgba(17,28,45,.88),rgba(10,18,31,.64));
    border-color:rgba(255,255,255,.08);
    box-shadow:0 26px 80px rgba(0,0,0,.28);
  }
  body[data-theme="system"] input,
  body[data-theme="system"] select,
  body[data-theme="system"] textarea{
    background:var(--surface-2);
    border-color:var(--line);
    box-shadow:none;
  }
  body[data-theme="system"] th{background:rgba(148,163,184,.10);color:var(--muted)}
  body[data-theme="system"] .topbar{background:rgba(8,13,22,.72);box-shadow:none;border-bottom-color:var(--line-soft)}
  body[data-theme="system"] .sidebar{background:linear-gradient(180deg,var(--sidebar),var(--sidebar-2));box-shadow:18px 0 60px rgba(0,0,0,.28);border-right-color:rgba(255,255,255,.08)}
  body[data-theme="system"] .btn:not(.primary){background:var(--surface-2);border-color:var(--line)}
}

/* Retter-Portal v1.0.19: ruhiger Whitemode, Auto-Modus und Logo-Varianten */
:root,
body[data-theme="light"]{
  --bg:#dfe7f1;
  --bg2:#edf2f8;
  --surface:rgba(246,249,253,.91);
  --surface-2:#f8fafc;
  --text:#0f172a;
  --muted:#4f6077;
  --muted-2:#7c8a9f;
  --line:#b9c6d6;
  --line-soft:rgba(15,23,42,.145);
  --shadow:0 26px 76px rgba(15,23,42,.16);
  --shadow-sm:0 13px 34px rgba(15,23,42,.12);
  color-scheme:light;
}
body[data-theme="light"]{
  background:
    radial-gradient(circle at 13% -8%,rgba(200,16,46,.18),transparent 34rem),
    radial-gradient(circle at 94% 0,rgba(19,34,51,.18),transparent 34rem),
    linear-gradient(135deg,#dbe4ef 0%,#edf2f8 50%,#dfe8f3 100%);
}
body[data-theme="light"]:before{
  background-image:linear-gradient(rgba(15,23,42,.10) 1px,transparent 1px),linear-gradient(90deg,rgba(15,23,42,.10) 1px,transparent 1px);
  opacity:.72;
}
body[data-theme="light"] .auth-landing{
  background:
    radial-gradient(circle at 14% 4%,rgba(200,16,46,.18),transparent 30rem),
    radial-gradient(circle at 86% 2%,rgba(19,34,51,.18),transparent 32rem),
    linear-gradient(135deg,#dbe4ef 0%,#edf2f8 48%,#dfe8f3 100%);
}
body[data-theme="light"] .auth-landing:before{
  background-image:linear-gradient(rgba(15,23,42,.10) 1px,transparent 1px),linear-gradient(90deg,rgba(15,23,42,.10) 1px,transparent 1px);
  opacity:.70;
}
body[data-theme="light"] .auth-topbar,
body[data-theme="light"] .auth-hero-copy,
body[data-theme="light"] .auth-card.auth-signin,
body[data-theme="light"] .auth-why-section,
body[data-theme="light"] .page-hero,
body[data-theme="light"] .card,
body[data-theme="light"] .stat-card,
body[data-theme="light"] .toolbar,
body[data-theme="light"] .pagination,
body[data-theme="light"] .login-card{
  background:linear-gradient(145deg,rgba(255,255,255,.82),rgba(238,244,250,.76));
  border:1px solid rgba(116,133,157,.38);
  box-shadow:0 24px 70px rgba(15,23,42,.16), inset 0 1px 0 rgba(255,255,255,.78);
}
body[data-theme="light"] .auth-benefit-grid article,
body[data-theme="light"] .auth-feature-card,
body[data-theme="light"] .department-chip,
body[data-theme="light"] .pill,
body[data-theme="light"] .status,
body[data-theme="light"] .role{
  background:linear-gradient(145deg,rgba(255,255,255,.90),rgba(231,238,247,.84));
  border-color:rgba(116,133,157,.32);
  box-shadow:0 12px 30px rgba(15,23,42,.095), inset 0 1px 0 rgba(255,255,255,.72);
}
body[data-theme="light"] .table-wrap{
  background:rgba(235,241,248,.74);
  border:1px solid rgba(116,133,157,.36);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.82),0 12px 32px rgba(15,23,42,.08);
}
body[data-theme="light"] th{
  background:#dce5f0;
  color:#43536a;
  border-bottom:1px solid rgba(116,133,157,.30);
}
body[data-theme="light"] td{border-bottom-color:rgba(116,133,157,.22)}
body[data-theme="light"] input,
body[data-theme="light"] select,
body[data-theme="light"] textarea{
  background:#edf3f9;
  border-color:#aebdce;
  color:#111827;
  box-shadow:inset 0 1px 2px rgba(15,23,42,.055),0 1px 0 rgba(255,255,255,.65);
}
body[data-theme="light"] input:focus,
body[data-theme="light"] select:focus,
body[data-theme="light"] textarea:focus{
  background:#f8fbff;
  border-color:#c8102e;
  box-shadow:0 0 0 4px rgba(200,16,46,.13),0 12px 30px rgba(15,23,42,.12);
}
body[data-theme="light"] .topbar{
  background:rgba(225,233,243,.88);
  border-bottom-color:rgba(116,133,157,.32);
  box-shadow:0 10px 32px rgba(15,23,42,.075);
}
body[data-theme="light"] .sidebar{
  background:linear-gradient(180deg,#f5f8fc,#e6edf6);
  border-right-color:rgba(116,133,157,.34);
  box-shadow:16px 0 46px rgba(15,23,42,.11);
}
body[data-theme="light"] .sidebar nav a{color:#354258}
body[data-theme="light"] .nav-section{color:#66758a}
body[data-theme="light"] .btn:not(.primary){
  background:linear-gradient(145deg,#f7faff,#e5edf6);
  border-color:rgba(116,133,157,.36);
  box-shadow:0 9px 24px rgba(15,23,42,.08);
}
body[data-theme="light"] .auth-theme-switch,
body[data-theme="light"] .theme-switch{
  background:rgba(231,239,248,.88);
  border-color:rgba(116,133,157,.30);
}
.theme-dot.auto,
.auth-theme-switch button[data-theme-set="system"]{width:auto;min-width:46px;padding:0 10px;font-size:.75rem;letter-spacing:.01em}
.logo-dark{display:none!important}.logo-light{display:block!important}
body[data-theme="dark"] .logo-light{display:none!important}
body[data-theme="dark"] .logo-dark{display:block!important}
@media (prefers-color-scheme: dark){
  body[data-theme="system"] .logo-light{display:none!important}
  body[data-theme="system"] .logo-dark{display:block!important}
}
@media (prefers-color-scheme: light){
  body[data-theme="system"] .logo-light{display:block!important}
  body[data-theme="system"] .logo-dark{display:none!important}
}
.topbar-logo-pair{display:grid;place-items:center;width:44px;height:44px;flex:0 0 44px}
.topbar-logo-pair .topbar-logo{grid-area:1/1;width:44px;height:44px}
.auth-brand .logo-dark,.auth-brand .logo-light{width:min(270px,46vw);height:auto;max-height:74px;object-fit:contain;object-position:left center;filter:drop-shadow(0 10px 24px rgba(15,23,42,.10))}
body[data-theme="dark"] .auth-brand .logo-dark,
body[data-theme="dark"] .brand-logo.logo-dark,
body[data-theme="dark"] .auth-logo.logo-dark{filter:drop-shadow(0 14px 30px rgba(0,0,0,.46))}
.auth-card.auth-signin .auth-logo.logo-dark,.auth-card.auth-signin .auth-logo.logo-light{width:min(292px,92%);max-height:118px;margin:0 auto 18px;object-fit:contain}
.auth-top-actions{margin-left:auto}.auth-hero-actions .btn:not(.primary){display:none}

@media (prefers-color-scheme: dark){
  body[data-theme="system"]{color-scheme:dark;}
}
@media (prefers-color-scheme: light){
  body[data-theme="system"]{color-scheme:light;}
}

.report-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}
.report-summary .stat-card strong{font-size:2rem}.report-summary .stat-card small{display:block;color:var(--muted);font-weight:800;margin-top:4px}
.check-badge{display:inline-flex;align-items:center;gap:6px;padding:7px 10px;border-radius:999px;background:#fff1f2;color:#9f1239;font-weight:950;font-size:.84rem;border:1px solid rgba(200,16,46,.18)}
.due-soon{color:#d97706}.overdue{color:#dc2626}.ok-text{color:#059669}
@media(max-width:1100px){.report-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.report-summary{grid-template-columns:1fr}.auth-brand .logo-dark,.auth-brand .logo-light{width:min(215px,54vw)}}
.form-section{padding:8px 0 0}.form-section h2{margin:0 0 4px}.compact-toolbar{margin:14px 0 18px}.compact-toolbar label{min-width:180px}.actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
@media (prefers-color-scheme: light){
  body[data-theme="system"]{
    --bg:#dfe7f1;--bg2:#edf2f8;--surface:rgba(246,249,253,.91);--surface-2:#f8fafc;--text:#0f172a;--muted:#4f6077;--muted-2:#7c8a9f;--line:#b9c6d6;--line-soft:rgba(15,23,42,.145);--shadow:0 26px 76px rgba(15,23,42,.16);--shadow-sm:0 13px 34px rgba(15,23,42,.12);
    background:radial-gradient(circle at 13% -8%,rgba(200,16,46,.18),transparent 34rem),radial-gradient(circle at 94% 0,rgba(19,34,51,.18),transparent 34rem),linear-gradient(135deg,#dbe4ef 0%,#edf2f8 50%,#dfe8f3 100%);
  }
  body[data-theme="system"] .auth-landing{background:radial-gradient(circle at 14% 4%,rgba(200,16,46,.18),transparent 30rem),radial-gradient(circle at 86% 2%,rgba(19,34,51,.18),transparent 32rem),linear-gradient(135deg,#dbe4ef 0%,#edf2f8 48%,#dfe8f3 100%)}
  body[data-theme="system"] .auth-topbar,body[data-theme="system"] .auth-hero-copy,body[data-theme="system"] .auth-card.auth-signin,body[data-theme="system"] .auth-why-section,body[data-theme="system"] .page-hero,body[data-theme="system"] .card,body[data-theme="system"] .stat-card,body[data-theme="system"] .toolbar,body[data-theme="system"] .pagination,body[data-theme="system"] .login-card{background:linear-gradient(145deg,rgba(255,255,255,.82),rgba(238,244,250,.76));border:1px solid rgba(116,133,157,.38);box-shadow:0 24px 70px rgba(15,23,42,.16), inset 0 1px 0 rgba(255,255,255,.78)}
  body[data-theme="system"] .auth-benefit-grid article,body[data-theme="system"] .auth-feature-card,body[data-theme="system"] .department-chip{background:linear-gradient(145deg,rgba(255,255,255,.90),rgba(231,238,247,.84));border-color:rgba(116,133,157,.32);box-shadow:0 12px 30px rgba(15,23,42,.095), inset 0 1px 0 rgba(255,255,255,.72)}
  body[data-theme="system"] .table-wrap{background:rgba(235,241,248,.74);border:1px solid rgba(116,133,157,.36);box-shadow:inset 0 1px 0 rgba(255,255,255,.82),0 12px 32px rgba(15,23,42,.08)}
  body[data-theme="system"] th{background:#dce5f0;color:#43536a;border-bottom:1px solid rgba(116,133,157,.30)}
  body[data-theme="system"] input,body[data-theme="system"] select,body[data-theme="system"] textarea{background:#edf3f9;border-color:#aebdce;color:#111827;box-shadow:inset 0 1px 2px rgba(15,23,42,.055),0 1px 0 rgba(255,255,255,.65)}
  body[data-theme="system"] .topbar{background:rgba(225,233,243,.88);border-bottom-color:rgba(116,133,157,.32);box-shadow:0 10px 32px rgba(15,23,42,.075)}
  body[data-theme="system"] .sidebar{background:linear-gradient(180deg,#f5f8fc,#e6edf6);border-right-color:rgba(116,133,157,.34);box-shadow:16px 0 46px rgba(15,23,42,.11)}
  body[data-theme="system"] .sidebar nav a{color:#354258}
}

/* Retter-Portal v1.0.19: Auto ist nur eine Voreinstellung und löst sich zu Light/Dark auf */
html[data-theme="light"],
body[data-theme="light"]{color-scheme:light}
html[data-theme="dark"],
body[data-theme="dark"]{color-scheme:dark}
body[data-theme="light"]{
  --bg:#d7e1ed;
  --bg2:#e9eff6;
  --surface:rgba(244,248,253,.93);
  --surface-2:#f4f8fc;
  --line:#aebdce;
  --line-soft:rgba(15,23,42,.17);
  --shadow:0 28px 80px rgba(15,23,42,.17);
  --shadow-sm:0 14px 36px rgba(15,23,42,.13);
  background:
    radial-gradient(circle at 12% -8%,rgba(200,16,46,.20),transparent 34rem),
    radial-gradient(circle at 92% 0,rgba(19,34,51,.20),transparent 34rem),
    linear-gradient(135deg,#d2ddea 0%,#e7eef6 48%,#dbe5f0 100%);
}
body[data-theme="light"] .auth-landing{
  background:
    radial-gradient(circle at 12% 2%,rgba(200,16,46,.20),transparent 30rem),
    radial-gradient(circle at 88% 2%,rgba(19,34,51,.20),transparent 32rem),
    linear-gradient(135deg,#d2ddea 0%,#e7eef6 48%,#dbe5f0 100%);
}
body[data-theme="light"] .auth-topbar,
body[data-theme="light"] .auth-hero-copy,
body[data-theme="light"] .auth-card.auth-signin,
body[data-theme="light"] .auth-why-section,
body[data-theme="light"] .page-hero,
body[data-theme="light"] .card,
body[data-theme="light"] .stat-card,
body[data-theme="light"] .toolbar,
body[data-theme="light"] .pagination,
body[data-theme="light"] .login-card{
  background:linear-gradient(145deg,rgba(255,255,255,.84),rgba(228,237,247,.82));
  border-color:rgba(82,101,126,.34);
  box-shadow:0 28px 80px rgba(15,23,42,.17), inset 0 1px 0 rgba(255,255,255,.78);
}
body[data-theme="light"] .auth-benefit-grid article,
body[data-theme="light"] .auth-feature-card,
body[data-theme="light"] .department-chip,
body[data-theme="light"] .entity-card,
body[data-theme="light"] .info-card{
  background:linear-gradient(145deg,rgba(255,255,255,.91),rgba(222,232,244,.88));
  border:1px solid rgba(82,101,126,.28);
  box-shadow:0 16px 40px rgba(15,23,42,.12), inset 0 1px 0 rgba(255,255,255,.70);
}
body[data-theme="light"] .auth-feature-card span{
  width:52px;height:52px;border-radius:18px;
  background:linear-gradient(145deg,#fff1f2,#dfe8f3);
  color:#b20d28;
  border:1px solid rgba(200,16,46,.18);
  box-shadow:0 12px 26px rgba(200,16,46,.13), inset 0 1px 0 rgba(255,255,255,.88);
  font-size:1.55rem;
}
body[data-theme="dark"] .auth-feature-card span{
  width:52px;height:52px;border-radius:18px;
  background:linear-gradient(145deg,rgba(255,255,255,.13),rgba(200,16,46,.17));
  color:#fff;
  border:1px solid rgba(255,255,255,.10);
  box-shadow:0 12px 30px rgba(0,0,0,.24);
  font-size:1.55rem;
}
.info-card{display:grid;gap:6px;padding:14px 16px;border-radius:18px;background:rgba(148,163,184,.10);border:1px solid var(--line-soft)}
.info-card strong{font-size:1rem}.info-card span{color:var(--muted);font-weight:750;line-height:1.5}
.theme-switch button[data-theme-set="system"],
.auth-theme-switch button[data-theme-set="system"]{font-weight:950}
.theme-switch button.active,
.auth-theme-switch button.active{background:var(--surface-2);color:var(--text);box-shadow:0 7px 18px rgba(15,23,42,.10)}
body[data-theme="dark"] .theme-switch button.active,
body[data-theme="dark"] .auth-theme-switch button.active{background:rgba(255,255,255,.10);box-shadow:0 7px 18px rgba(0,0,0,.22)}
body[data-theme="dark"] .topbar-logo-pair,
body[data-theme="dark"] .brand-logo-wrap,
body[data-theme="dark"] .auth-logo.logo-dark,
body[data-theme="dark"] .auth-brand .logo-dark{filter:drop-shadow(0 0 16px rgba(255,255,255,.10)) drop-shadow(0 18px 32px rgba(0,0,0,.38))}

/* Retter-Portal v1.0.21: temporäre Entwicklungs-Testrechte */
.devtools-hero .inline-form{justify-content:flex-end}.devtools-hero select{min-width:260px}.dev-role-card{position:relative;overflow:hidden}.dev-role-card:before{content:"";position:absolute;inset:-40% auto auto -16%;width:230px;height:230px;border-radius:999px;background:radial-gradient(circle,rgba(100,116,139,.18),transparent 62%);pointer-events:none}.dev-role-card.leader:before{background:radial-gradient(circle,rgba(211,13,33,.18),transparent 62%)}.soft-warning{border-style:dashed}.dev-impersonation-banner{position:sticky;top:73px;z-index:4;display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 30px 0;padding:12px 14px;border-radius:0 0 18px 18px;background:linear-gradient(135deg,rgba(211,13,33,.96),rgba(12,31,54,.96));color:#fff;box-shadow:0 16px 44px rgba(15,23,42,.22);border:1px solid rgba(255,255,255,.16)}.dev-impersonation-banner strong{font-weight:950}.dev-impersonation-banner span{margin-left:10px;color:rgba(255,255,255,.78);font-size:.9rem}.dev-impersonation-banner .btn{background:rgba(255,255,255,.14);color:#fff;border-color:rgba(255,255,255,.22);box-shadow:none}@media(max-width:860px){.devtools-hero .inline-form{justify-content:stretch}.devtools-hero select{min-width:0}.dev-impersonation-banner{top:66px;margin:0 18px;flex-direction:column;align-items:flex-start}.dev-impersonation-banner span{display:block;margin-left:0;margin-top:4px}}

/* Retter-Portal v1.0.22: Support-Tickets und klarere Self-Service-Personalansicht */
.support-thread{display:grid;gap:16px}.ticket-message{padding:16px 18px;border-radius:20px;background:linear-gradient(145deg,rgba(255,255,255,.08),rgba(255,255,255,.035));border:1px solid var(--line-soft);box-shadow:inset 0 1px 0 rgba(255,255,255,.08)}.ticket-message.original{border-color:rgba(211,13,33,.30);background:linear-gradient(145deg,rgba(211,13,33,.12),rgba(255,255,255,.04))}.ticket-message.internal{border-style:dashed;background:linear-gradient(145deg,rgba(245,158,11,.12),rgba(255,255,255,.035))}.ticket-message-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}.ticket-message-head strong{font-weight:950}.ticket-message-head span{color:var(--muted);font-size:.86rem;font-weight:800}.ticket-message p{white-space:pre-wrap;margin:0;line-height:1.62;color:var(--text)}body[data-theme="light"] .ticket-message{background:linear-gradient(145deg,rgba(255,255,255,.86),rgba(224,234,246,.72));border-color:rgba(82,101,126,.26);box-shadow:0 10px 26px rgba(15,23,42,.08),inset 0 1px 0 rgba(255,255,255,.72)}body[data-theme="light"] .ticket-message.original{background:linear-gradient(145deg,rgba(255,241,242,.95),rgba(228,237,247,.82));border-color:rgba(211,13,33,.24)}body[data-theme="light"] .ticket-message.internal{background:linear-gradient(145deg,rgba(255,251,235,.96),rgba(228,237,247,.82));border-color:rgba(245,158,11,.30)}

/* Retter-Portal v1.0.23: Dateianhänge, Kalender und Dienstplan */
.attachment-card{margin-top:18px}.attachment-upload{display:grid;grid-template-columns:minmax(260px,1.25fr) minmax(220px,.85fr) auto;gap:12px;align-items:center;margin:16px 0}.attachment-drop{position:relative;display:flex;align-items:center;gap:14px;padding:14px 16px;border-radius:20px;border:1px dashed var(--line);background:linear-gradient(145deg,rgba(255,255,255,.06),rgba(255,255,255,.025));cursor:pointer}.attachment-drop input{position:absolute;inset:0;opacity:0;cursor:pointer}.attachment-drop-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:16px;background:linear-gradient(145deg,rgba(211,13,33,.18),rgba(255,255,255,.06));font-weight:950;color:var(--accent)}.attachment-drop small{display:block;color:var(--muted);font-weight:750;margin-top:2px}.attachment-status{grid-column:1/-1;margin:0}.attachment-list{display:grid;gap:10px}.attachment-item{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 14px;border:1px solid var(--line-soft);border-radius:18px;background:rgba(255,255,255,.045)}.attachment-main{display:flex;align-items:center;gap:13px;min-width:0}.attachment-main strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.attachment-main small{display:block;color:var(--muted);font-weight:750;margin-top:2px}.attachment-icon{display:grid;place-items:center;flex:0 0 auto;width:42px;height:42px;border-radius:15px;background:rgba(148,163,184,.14)}
.calendar-page-grid{align-items:start}.calendar-list{display:grid;gap:12px}.calendar-item{display:grid;grid-template-columns:120px minmax(0,1fr) auto;gap:16px;align-items:start;padding:15px;border-radius:20px;border:1px solid var(--line-soft);background:linear-gradient(145deg,rgba(255,255,255,.055),rgba(255,255,255,.025))}.calendar-item time{display:grid;gap:3px;padding:12px;border-radius:17px;background:rgba(211,13,33,.10);border:1px solid rgba(211,13,33,.18);color:var(--text)}.calendar-item time small{color:var(--muted);font-weight:800}.calendar-item h3{margin:8px 0 4px}.compact-pre{font-size:.92rem;margin-top:8px}.timeline-list{display:grid;gap:10px}.timeline-item{display:flex;gap:12px;align-items:flex-start;padding:12px;border-radius:17px;border:1px solid var(--line-soft);background:rgba(255,255,255,.04);color:var(--text);text-decoration:none}.timeline-item:hover{transform:translateY(-1px);border-color:rgba(211,13,33,.22)}.timeline-dot{width:10px;height:10px;border-radius:999px;background:var(--accent);box-shadow:0 0 0 5px rgba(211,13,33,.12);margin-top:7px;flex:0 0 auto}.timeline-item strong{display:block}.timeline-item small{display:block;color:var(--muted);font-weight:800;margin-top:2px}
body[data-theme="light"] .attachment-drop,body[data-theme="light"] .attachment-item,body[data-theme="light"] .calendar-item,body[data-theme="light"] .timeline-item{background:linear-gradient(145deg,rgba(255,255,255,.88),rgba(224,234,246,.78));border-color:rgba(82,101,126,.28);box-shadow:0 12px 28px rgba(15,23,42,.075),inset 0 1px 0 rgba(255,255,255,.72)}body[data-theme="light"] .calendar-item time{background:linear-gradient(145deg,#fff1f2,#e5edf7);border-color:rgba(211,13,33,.20)}body[data-theme="light"] .attachment-icon{background:#e4ecf6;border:1px solid rgba(82,101,126,.16)}
@media(max-width:900px){.attachment-upload{grid-template-columns:1fr}.calendar-item{grid-template-columns:1fr}.calendar-item .actions{justify-content:flex-start}}
