:root{
  --bg:#0b1220;
  --bg2:#070b14;
  --card:#0f1a2e;
  --card-hover:#16233d;
  --muted:#9fb0c8;
  --txt:#eaf0ff;
  --accent:#55c2ff;
  --danger:#ff5b6e;
  --border:rgba(255,255,255,.08);

  --shadow-soft:0 6px 18px rgba(0,0,0,.25);
  --shadow-strong:0 20px 50px rgba(0,0,0,.5);
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;
  background:linear-gradient(180deg,var(--bg),var(--bg2));
  color:var(--txt);
}

a{color:var(--accent);text-decoration:none}

.container{
  max-width:1200px;
  margin:0 auto;
  padding:40px 24px 80px 24px;
}

/* =========================================================
   LEGACY NAV (nicht mehr aktiv – nur noch zur Sicherheit)
========================================================= */

.nav,
.nav-inner,
.logo,
.nav-divider,
.tabs,
.tab{}

/* =========================================================
   TOP NAV (Style D)
========================================================= */

.topnav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 24px;
  height:64px;
  background:rgba(11,18,32,.9);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  border-bottom:1px solid rgba(255,255,255,.06);
  position:sticky;
  top:0;
  z-index:100;
}

.nav-left{
  display:flex;
  align-items:center;
  gap:18px;
}

.nav-logo{
  width:40px;
  height:40px;
  border-radius:10px;
  object-fit:contain;
  padding:5px;
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,.08);
}

.nav-brand .brand-title{
  font-size:15px;
  font-weight:600;
  line-height:1.2;
}

.nav-brand .brand-sub{
  font-size:12px;
  opacity:0.6;
}

.nav-center{
  display:flex;
  gap:4px;
}

.nav-tab{
  position:relative;
  text-decoration:none;
  color:var(--muted);
  font-size:13px;
  font-weight:500;
  padding:5px 11px;
  border-radius:8px;
  transition:.15s;
}

.nav-tab:hover{
  color:var(--txt);
  background:rgba(255,255,255,.05);
}

.nav-tab.active{
  color:var(--accent);
  background:rgba(85,194,255,.1);
}

.nav-tab.active::after{
  display:none;
}

.nav-right{
  display:flex;
  align-items:center;
  gap:18px;
}

.user-box{
  text-align:right;
}

.user-name{
  font-size:14px;
  font-weight:600;
}

.user-role{
  font-size:12px;
  opacity:0.6;
}

.user-display-name{
  font-size:13px;
  font-weight:500;
  color:rgba(255,255,255,.75);
  pointer-events:none;
  user-select:none;
  white-space:nowrap;
}

.user-badge-wrap{
  position:relative;
  display:flex;
  align-items:center;
}

.user-menu{
  display:flex;
  align-items:center;
  gap:8px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
  border-radius:20px;
  padding:4px 12px 4px 4px;
  cursor:pointer;
  transition:.15s;
}

.user-menu:hover{
  background:rgba(255,255,255,.07);
  border-color:rgba(255,255,255,.14);
}

.user-avatar{
  width:28px;
  height:28px;
  border-radius:50%;
  background:linear-gradient(135deg,#1e6fa8,#0a3050);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:10px;
  font-weight:700;
  color:#fff;
  flex-shrink:0;
}

.logout-btn{
  background:transparent;
  border:1px solid rgba(255,255,255,0.2);
  color:white;
  padding:6px 12px;
  border-radius:8px;
  cursor:pointer;
  transition:0.2s;
}

.logout-btn:hover{
  background:rgba(255,255,255,0.05);
}

/* =========================================================
   CARDS
========================================================= */

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  padding:28px;
  margin-bottom:20px;
  box-shadow:var(--shadow-soft);
  transition:background .15s ease, transform .15s ease;
}

.card.clickable:hover{
  background:var(--card-hover);
  transform:translateY(-1px);
  cursor:pointer;
}

.section-title{
  font-size:22px;
  font-weight:700;
  margin-bottom:24px;
}

/* =========================================================
   BUTTON SYSTEM
========================================================= */

.btn{
  cursor:pointer;
  height:42px;
  padding:0 18px;
  border-radius:10px;
  font-size:14px;
  font-weight:500;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  border:1px solid transparent;
  transition:all .2s ease;
}

.btn-primary{
  background:var(--accent);
  color:#001828;
  font-weight:600;
}

.btn-primary:hover{
  background:#7ed4ff;
  transform:translateY(-1px);
}

.btn-secondary{
  background:rgba(255,255,255,0.06);
  border:1px solid var(--border);
  color:var(--txt);
}

.btn-secondary:hover{
  background:rgba(255,255,255,0.12);
}

.btn-danger{
  background:rgba(255,91,110,0.18);
  border:1px solid rgba(255,91,110,0.35);
  color:#ff9aa5;
}

.btn-danger:hover{
  background:rgba(255,91,110,0.30);
}

.btn-sm{
  height:34px;
  font-size:13px;
  padding:0 12px;
}

/* =========================================================
   BADGES
========================================================= */

.badge{
  height:22px;
  padding:0 8px;
  border-radius:999px;
  font-size:11px;
  display:inline-flex;
  align-items:center;
  border:1px solid var(--border);
  background:rgba(255,255,255,0.08);
}

.badge-danger{
  background:rgba(255,91,110,0.2);
  border-color:rgba(255,91,110,0.4);
  color:#ff9aa5;
}

/* =========================================================
   LAYOUT
========================================================= */

.two-col{
  display:grid;
  grid-template-columns: 380px 1fr;
  gap:28px;
  align-items:start;
}

@media(max-width:1000px){
  .two-col{
    grid-template-columns:1fr;
  }
}

/* =========================================================
   TOAST
========================================================= */

.toast{
  position:fixed;
  right:16px;
  bottom:16px;
  background:var(--card);
  border:1px solid var(--border);
  padding:14px 16px;
  border-radius:14px;
  max-width:360px;
  box-shadow:var(--shadow-strong);
  display:none;
}

.toast.show{display:block}

.small{
  color:var(--muted);
  font-size:13px;
}

/* =========================================================
   MODAL LAYER (CLEAN)
========================================================= */

#modalRoot{
  position:fixed;
  inset:0;
  display:none;

  align-items:center;
  justify-content:center;

  background:rgba(5,10,20,0.7);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);

  z-index:2000;

  opacity:0;
  pointer-events:none;

  transition:opacity .2s ease;
}

#modalRoot.show{
  display:flex;
  opacity:1;
  pointer-events:auto;
}

#modalRoot .card{
  background:#0f1a2e;
  border:1px solid rgba(255,255,255,.1);
  box-shadow:0 24px 64px rgba(0,0,0,.6);
  width:560px;
  max-width:95vw;
  max-height:85vh;
  display:flex;
  flex-direction:column;
  padding:0;
  border-radius:18px;
  overflow:hidden;
  animation:modalPop .2s ease;
}

@keyframes modalPop{
  from{transform:translateY(12px) scale(.98);opacity:0}
  to{transform:none;opacity:1}
}

.modal-section{
  padding:28px 28px 8px;
  display:flex;
  flex-direction:column;
  gap:16px;
}

.modal-section h3{
  font-size:17px;
  font-weight:600;
  margin:0 0 4px;
  color:var(--txt);
}

.modal-meta{
  font-size:13px;
  color:var(--muted);
}

.form-grid{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.form-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

.form-group{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.form-group label{
  font-size:13px;
  font-weight:600;
  color:rgba(255,255,255,.75);
}

.form-group input,
.form-group select{
  height:40px;
  padding:0 14px;
  border-radius:9px;
  border:1px solid rgba(255,255,255,.09);
  background:rgba(255,255,255,.05);
  color:var(--txt);
  font-size:14px;
  transition:.18s;
}

.form-group input:hover,
.form-group select:hover{
  border-color:rgba(255,255,255,.15);
  background:rgba(255,255,255,.08);
}

.form-group input:focus,
.form-group select:focus{
  outline:none;
  border-color:var(--accent);
  background:rgba(85,194,255,.06);
  box-shadow:0 0 0 3px rgba(85,194,255,.15);
}

.modal-footer{
  padding:16px 28px 20px;
  border-top:1px solid rgba(255,255,255,.07);
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
  background:rgba(0,0,0,0.1);
}


/* =========================================================
   LOGIN OVERLAY (ISOLATED LAYER)
========================================================= */

.login-overlay{
  position:fixed;
  inset:0;

  display:flex;
  align-items:center;
  justify-content:center;

  background:
    radial-gradient(circle at 30% 20%, rgba(85,194,255,0.08), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(85,194,255,0.05), transparent 50%),
    rgba(5,10,20,0.92);

  backdrop-filter:blur(10px);

  z-index:3000;
}

.login-overlay::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
}

.modal-card {
  width: 420px;
  max-width: 95vw;

  background: linear-gradient(180deg, #13213a, #0f1a2e);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;

  box-shadow: 0 30px 80px rgba(0,0,0,0.6);

  padding: 28px;

  animation: loginPop .35s ease;
}

@keyframes loginPop {
  from {
    transform: translateY(20px) scale(.97);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.login-brand{
  text-align:center;
  margin-bottom:20px;
}

.login-brand h2{
  margin:0;
  font-size:22px;
}

.login-brand .sub{
  font-size:13px;
  color:var(--muted);
  margin-top:4px;
}

/* ================= WATER BACKGROUND ================= */

body::before{
  content:"";
  position:fixed;
  inset:0;

  z-index:-1;
  pointer-events:none;

  background:
    radial-gradient(circle at 20% 30%, rgba(85,194,255,0.06), transparent 40%),
    radial-gradient(circle at 70% 80%, rgba(85,194,255,0.05), transparent 50%);

  animation:waterFloat 18s ease-in-out infinite alternate;
}

@keyframes waterFloat{
  from{
    transform:translateY(0px) scale(1);
  }
  to{
    transform:translateY(-20px) scale(1.03);
  }
}

.login-overlay::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 40% 20%, rgba(85,194,255,0.12), transparent 50%),
    radial-gradient(circle at 60% 70%, rgba(85,194,255,0.08), transparent 60%);
  animation:waterFloat 12s ease-in-out infinite alternate;
}

.login-overlay::before{
  pointer-events:none;
}

/* ================= ROLE BADGE ================= */

.role-badge{
  padding:4px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:600;
  margin-left:8px;
  background:linear-gradient(135deg,var(--accent),#3daeff);
  color:#001018;
}

.list-row{
  padding:10px 0;
  border-bottom:1px solid rgba(255,255,255,0.05);
}

.list-row:last-child{
  border-bottom:none;
}

/* =========================================================
   SUBTABS
========================================================= */

.subtabs{
  display:flex;
  gap:10px;
  margin:6px 0 18px 0;   /* weniger Abstand oben */
}

.subtab{
  padding:8px 18px;
  border-radius:30px;
  border:1px solid rgba(255,255,255,.15);
  background:rgba(255,255,255,.05);
  color:#cfe7ff;
  cursor:pointer;
  transition:all .25s ease;
}

.subtab:hover{
  background:rgba(255,255,255,.1);
}

.subtab.active{
  background:var(--accent);
  color:#001018;
  font-weight:600;
  box-shadow:0 0 20px rgba(85,194,255,.4);
}

/* =========================================================
   SUBVIEW TRANSITION
========================================================= */

.subview{
  opacity:0;
  transform:translateY(8px);
  pointer-events:none;
  transition:opacity .25s ease, transform .25s ease;
  position:absolute;
  width:100%;
}

.subview.active{
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
  position:relative;
}

/* Teilnehmer-Form kompakter */

.card.form-compact{
  padding:22px 26px;          /* weniger Innenabstand */
}

.card.form-compact .section-title{
  font-size:18px;             /* kleiner */
  margin-bottom:16px;
}

.card.form-compact .form-grid{
  gap:14px;
}

/* Layout */
.tm-layout{
  display:grid;
  grid-template-columns:400px 1fr;
  gap:28px;
  margin-top:24px;
}

@media(max-width:1000px){
  .tm-layout{grid-template-columns:1fr;}
}

/* Drag */
.participant-card{
  background:rgba(255,255,255,0.06);
  padding:14px;
  border-radius:12px;
  cursor:grab;
  transition:.2s;
}

.participant-card:hover{
  background:rgba(255,255,255,0.1);
}

.participant-card.dragging{
  opacity:.4;
}

.team-dropzone{
  border:1px dashed rgba(255,255,255,.15);
  border-radius:14px;
  padding:16px;
  margin-bottom:16px;
  transition:.2s;
}

.team-dropzone.drag-over{
  border-color:var(--accent);
  background:rgba(85,194,255,0.08);
}

/* =========================================================
   SIDE DRAWER (CLEAN LAYER)
========================================================= */

.side-drawer{
  position:fixed;
  top:0;
  right:-420px;

  width:420px;
  height:100%;

  background:#0f1a2e;
  border-left:1px solid rgba(255,255,255,.08);

  transition:right .3s ease;

  z-index:500;
}

.side-drawer.open{
  right: 0;
}

.drawer-content{
  padding: 24px;
  overflow-y: auto;
}

.drawer-close{
  background:none;
  border:none;
  color:white;
  font-size:18px;
  float:right;
  cursor:pointer;
}

.participant-card.selected{
  background:rgba(85,194,255,0.2);
  border:1px solid var(--accent);
}

.member-chip{
  background:rgba(255,255,255,.08);
  padding:4px 8px;
  border-radius:999px;
  font-size:12px;
  display:inline-block;
  margin:4px 4px 0 0;
}

.team-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:8px;
}

.context-menu{
  position:fixed;
  background:#141f36;
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  padding:8px 0;
  z-index:3000;
  min-width:160px;
}

.context-item{
  padding:8px 16px;
  cursor:pointer;
}

.context-item:hover{
  background:rgba(255,255,255,.08);
}

/* Reflow */
.team-dropzone.reflow{
  transform:scale(1.02);
  transition:transform .25s ease;
  transform:translateY(-3px) scale(1.01);
}

/* Soft Highlight */
.participant-card.moved-highlight{
  background:rgba(80,180,255,.25);
  transition:background 1.2s ease;
}

/* Counter Pulse */
.counter-animate{
  animation:counterPulse .4s ease;
}

@keyframes counterPulse{
  0%{ transform:scale(1); }
  50%{ transform:scale(1.25); }
  100%{ transform:scale(1); }
}

.participant-card.moved-highlight{
  background:rgba(80,180,255,.25);
  transition:background 1s ease;
}

.counter-animate{
  animation:counterPulse .35s ease;
}

.btn-icon{
  gap:8px;
}

.context-menu{
  position:fixed;
  background:#141f36;
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  padding:8px 0;
  min-width:160px;

  z-index:1000;
}

.undo-toast{
  position:fixed;
  bottom:30px;
  left:50%;
  transform:translateX(-50%);
  background:#1e293b;
  color:white;
  padding:14px 20px;
  border-radius:10px;
  display:flex;
  gap:20px;
  align-items:center;
  box-shadow:0 8px 20px rgba(0,0,0,0.35);
  z-index:9999;
}

.undo-toast{
  animation:toastSlide .25s ease;
}

@keyframes toastSlide{
  from{
    transform:translate(-50%,20px);
    opacity:0;
  }
  to{
    transform:translate(-50%,0);
    opacity:1;
  }
}

.undo-btn{
  background:#3b82f6;
  border:none;
  color:white;
  padding:6px 14px;
  border-radius:6px;
  cursor:pointer;
}

.drag-ghost{
  position:absolute;
  top:-9999px;
  left:-9999px;
  background:#1b2a44;
  color:white;
  padding:10px 14px;
  border-radius:8px;
  font-size:13px;
  box-shadow:0 6px 18px rgba(0,0,0,.4);
  pointer-events:none;
}

.drag-ghost div{
  margin:2px 0;
}

.user-menu{
  position:relative;
}

.user-btn{
  background:transparent;
  border:none;
  color:white;
  font-weight:600;
  cursor:pointer;
}

.user-dropdown{
  position:absolute;
  right:0;
  top:40px;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:8px;
  box-shadow:0 8px 20px rgba(0,0,0,.4);
  min-width:180px;
  display:none;
}

.user-dropdown.open{
  display:block;
}

.dropdown-item{
  padding:10px 14px;
  cursor:pointer;
}

.dropdown-item:hover{
  background:var(--card-hover);
}

.dropdown-item.danger{
  color:#ff6b6b;
}

@keyframes navload{
  0%{transform:translateX(-100%)}
  100%{transform:translateX(100%)}
}

#sessionLock{
position:fixed;
inset:0;
background:#0008;
display:flex;
align-items:center;
justify-content:center;
z-index:9999;
}

.session-lock-box{
background:white;
padding:40px;
border-radius:10px;
text-align:center;
}

@keyframes navload{
  0%{transform:translateX(-100%)}
  100%{transform:translateX(100%)}
}

/* =========================
   DRAG GHOST ADVANCED
========================= */

.drag-ghost-advanced{
  position:fixed;
  top:-9999px;
  left:-9999px;
  pointer-events:none;
  z-index:9999;
}

.ghost-stack{
  position:relative;
}

.ghost-card{
  background:rgba(30,30,40,0.95);
  border:1px solid rgba(255,255,255,0.1);
  padding:6px 10px;
  border-radius:8px;
  font-size:12px;
  white-space:nowrap;
  box-shadow:0 4px 12px rgba(0,0,0,0.4);
}

.ghost-count{
  position:absolute;
  top:-8px;
  right:-8px;
  background:#00aaff;
  color:white;
  font-size:11px;
  padding:2px 6px;
  border-radius:999px;
  font-weight:bold;
}

.ghost-card{
  animation: ghostPop 0.15s ease;
}

@keyframes ghostPop{
  from{
    transform: scale(0.9) translate(0,0);
    opacity:0;
  }
  to{
    transform: scale(1) translate(0,0);
    opacity:1;
  }
}
/* =========================================================
   TABLET-RESPONSIVE (≤1024px = iPad Landscape, ≤768px = iPad Portrait)
   Breakpoints:
     1024px = iPad Pro Landscape
      768px = iPad Portrait / iPad mini Landscape
      600px = iPad mini Portrait
========================================================= */

/* ── Navigation ── */
@media(max-width:1024px){
  .nav-inner{
    padding:0 16px;
    gap:8px;
  }
  .nav-logo-text{
    display:none;
  }
  .nav-logo-sub{
    display:none;
  }
  .nav-tab{
    padding:4px 9px;
    font-size:12px;
  }
  .user-pill{
    padding:3px 8px 3px 3px;
  }
  .user-pill-name{
    display:none;
  }
}

@media(max-width:768px){
  .nav-tabs{
    gap:2px;
  }
  .nav-tab{
    padding:4px 7px;
    font-size:11px;
  }
  /* Container padding */
  .container{
    padding:16px 12px 60px;
  }
}

/* ── Modals ── */
@media(max-width:768px){
  .modal-card{
    width:calc(100vw - 32px);
    max-height:80vh;
    overflow-y:auto;
  }
}

/* ── Buttons touch-friendly ── */
@media(max-width:1024px){
  .btn{
    min-height:40px;
    padding:0 14px;
  }
  .btn-sm{
    min-height:34px;
  }
}

/* ── Touch-Optimierungen ── */
@media(max-width:1024px){
  /* Verhindert versehentliche Textselektion beim Tippen */
  .btn, .nav-tab, .p-card, .member-chip,
  .aw-nav-item, .st-nav-item, .lv-nav-item, .au-nav-item{
    -webkit-user-select:none;
    user-select:none;
    -webkit-tap-highlight-color:transparent;
    touch-action:manipulation;
  }
  /* Scrollbare Bereiche mit Momentum */
  .wk-col-left, .tm-col, .aw-content, .st-content,
  .au-content, .lv-content, .aw-sidebar, .st-sidebar,
  .lv-sidebar, .au-sidebar{
    -webkit-overflow-scrolling:touch;
  }
  /* Größere Touch-Targets */
  .wk-close-btn, .modal-close{
    min-width:40px;
    min-height:40px;
  }
}

/* =========================================================
   STATUS LED
========================================================= */

.status-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(255,255,255,.2);
  transition: background .4s, box-shadow .4s;
  cursor: default;
}

.status-led[data-state="online"] {
  background: #4caf50;
  box-shadow: 0 0 0 2px rgba(76,175,80,.25);
  animation: led-pulse-green 2.5s ease-in-out infinite;
}

.status-led[data-state="slow"] {
  background: #ffb347;
  box-shadow: 0 0 0 2px rgba(255,179,71,.25);
  animation: led-pulse-yellow 1.5s ease-in-out infinite;
}

.status-led[data-state="warn"] {
  background: #ff9800;
  box-shadow: 0 0 0 2px rgba(255,152,0,.3);
}

.status-led[data-state="offline"] {
  background: #f44336;
  box-shadow: 0 0 0 2px rgba(244,67,54,.3);
  animation: led-pulse-red 1s ease-in-out infinite;
}

@keyframes led-pulse-green {
  0%, 100% { box-shadow: 0 0 0 2px rgba(76,175,80,.25); }
  50%       { box-shadow: 0 0 0 4px rgba(76,175,80,.1); }
}
@keyframes led-pulse-yellow {
  0%, 100% { box-shadow: 0 0 0 2px rgba(255,179,71,.3); }
  50%       { box-shadow: 0 0 0 5px rgba(255,179,71,.08); }
}
@keyframes led-pulse-red {
  0%, 100% { box-shadow: 0 0 0 2px rgba(244,67,54,.4); opacity:1; }
  50%       { box-shadow: 0 0 0 5px rgba(244,67,54,.1); opacity:.7; }
}

/* =========================================================
   LIGHT MODE
========================================================= */

html.light {
  --bg:    #f0f4f8;
  --bg2:   #e4eaf2;
  --card:  #ffffff;
  --card-hover: #f5f8fc;
  --muted: #6b7fa3;
  --txt:   #1a2640;
  --border: rgba(0,0,0,.09);
  --shadow-soft:   0 6px 18px rgba(0,0,0,.08);
  --shadow-strong: 0 20px 50px rgba(0,0,0,.15);
}

html.light body {
  background: linear-gradient(180deg, var(--bg), var(--bg2));
  color: var(--txt);
}

/* Nav */
html.light .topnav {
  background: rgba(255,255,255,.85);
  border-bottom: 1px solid rgba(0,0,0,.08);
}
html.light .nav-tab { color: #4a5c7a; }
html.light .nav-tab:hover { background: rgba(0,0,0,.05); color: var(--txt); }
html.light .nav-tab.active { color: var(--accent); background: rgba(85,194,255,.1); }
html.light .brand-title { color: var(--txt); }
html.light .brand-sub { color: var(--muted); }
html.light .user-display-name { color: rgba(0,0,0,.65); }

/* User Menu */
html.light .user-menu {
  background: rgba(0,0,0,.04);
  border-color: rgba(0,0,0,.1);
}
html.light .user-menu:hover {
  background: rgba(0,0,0,.07);
  border-color: rgba(0,0,0,.15);
}
html.light .user-avatar {
  background: linear-gradient(135deg, #1e6fa8, #0a3050);
}

/* Cards */
html.light .card {
  background: var(--card);
  border-color: var(--border);
  box-shadow: var(--shadow-soft);
}

/* Inputs */
html.light input,
html.light select,
html.light textarea {
  background: #f5f8fc;
  border-color: rgba(0,0,0,.12);
  color: var(--txt);
}
html.light input:focus,
html.light select:focus {
  border-color: var(--accent);
  background: #fff;
}
html.light input::placeholder { color: #9babc4; }

/* Buttons */
html.light .btn-secondary {
  background: rgba(0,0,0,.05);
  border-color: rgba(0,0,0,.12);
  color: var(--txt);
}
html.light .btn-secondary:hover {
  background: rgba(0,0,0,.09);
}

/* Table */
html.light .table th { color: var(--muted); border-color: var(--border); }
html.light .table td { border-color: var(--border); }
html.light .table tr:hover td { background: rgba(0,0,0,.02); }

/* Toast */
html.light .toast { background: #1a2640; color: #fff; }

/* Offline Banner */
html.light #offlineBanner { backdrop-filter: blur(10px); }

/* Theme Toggle Button */
.theme-toggle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.7);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.2);
}
html.light .theme-toggle {
  border-color: rgba(0,0,0,.12);
  background: rgba(0,0,0,.05);
  color: rgba(0,0,0,.6);
}
html.light .theme-toggle:hover {
  background: rgba(0,0,0,.09);
  border-color: rgba(0,0,0,.18);
}

/* Light Mode: Hardcode-Überschreibungen */
html.light #modalRoot .card {
  background: var(--card);
  border-color: var(--border);
  box-shadow: 0 24px 64px rgba(0,0,0,.15);
}
html.light .modal-card {
  background: var(--card);
  border-color: var(--border);
  box-shadow: 0 30px 80px rgba(0,0,0,.12);
}
html.light .side-drawer {
  background: var(--card);
  border-left-color: var(--border);
}

/* Light Mode: Dropdown Shadow anpassen */
html.light .user-dropdown {
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
}
