:root{
  --bg0:#070a12;
  --bg1:#0b1220;

  --glass: rgba(16, 24, 38, 0.55);
  --glass2: rgba(16, 24, 38, 0.35);
  --border: rgba(255,255,255,0.08);
  --border2: rgba(255,255,255,0.12);

  --text:#eaf0ff;
  --muted: rgba(234,240,255,.65);

  --accent:#5aa9ff;
  --accent2:#1e6bff;

  --shadow: 0 30px 90px rgba(0,0,0,.55);
  --shadow2: 0 20px 60px rgba(0,0,0,.38);

  --r:18px;
  --r2:14px;
}

*{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial;}
html,body{height:100%;}
body{
  margin:0;
  color:var(--text);
  background: radial-gradient(1200px 700px at 60% 15%, rgba(90,169,255,.18), transparent 60%),
              radial-gradient(900px 600px at 15% 25%, rgba(30,107,255,.12), transparent 55%),
              linear-gradient(180deg, var(--bg1), var(--bg0));
  overflow-x:hidden;
}

/* Faux background image blur feel (no external image) */
body::before{
  content:"";
  position:fixed; inset:-40px;
  background:
    radial-gradient(800px 500px at 70% 10%, rgba(255,255,255,.06), transparent 60%),
    radial-gradient(900px 700px at 35% 55%, rgba(255,255,255,.05), transparent 60%),
    radial-gradient(900px 700px at 85% 80%, rgba(255,255,255,.04), transparent 60%);
  filter: blur(18px);
  opacity:.9;
  pointer-events:none;
  z-index:-1;
}

.glass{
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow2);
  backdrop-filter: blur(14px);
}

.lbl{
  display:block;
  font-size:12px;
  color: var(--muted);
  margin:10px 0 6px;
}

input, textarea, select{
  width:100%;
  padding:12px 12px;
  border-radius: 12px;
  border: 1px solid var(--border2);
  background: rgba(6,10,18,.55);
  color: var(--text);
  outline:none;
  user-select:text;
}
input:focus, textarea:focus, select:focus{
  border-color: rgba(90,169,255,.55);
}

.msg{
  min-height:18px;
  margin-top:10px;
  font-size:13px;
  color:#ff6b6b;
}

/* Buttons */
.btnPrimary{
  width:100%;
  margin-top:14px;
  padding:12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(90,169,255,.35);
  background: linear-gradient(180deg, rgba(90,169,255,.95), rgba(30,107,255,.85));
  color:#fff;
  font-weight:900;
  cursor:pointer;
}
.btnPrimary:hover{filter:brightness(1.05);}

.btnGhost{
  padding:10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border2);
  background: rgba(6,10,18,.35);
  color: var(--text);
  font-weight:800;
  cursor:pointer;
}
.btnGhost:hover{border-color: rgba(90,169,255,.45);}

.btnMini{
  padding:10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border2);
  background: rgba(6,10,18,.40);
  color: var(--text);
  cursor:pointer;
  font-weight:900;
  font-size:13px;
}
.btnMini:hover{border-color: rgba(90,169,255,.45);}
.btnMini.danger{border-color: rgba(255,107,107,.35);}
.btnMini.danger:hover{border-color: rgba(255,107,107,.75);}

/* Login */
.loginWrap{
  height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
}
.loginCard{
  width:min(420px, 96vw);
  padding:22px;
}
.loginBrand{
  display:flex; gap:12px; align-items:center;
  margin-bottom:12px;
}
.brandIcon{
  width:42px; height:42px; border-radius:14px;
  background: linear-gradient(180deg, rgba(90,169,255,.95), rgba(30,107,255,.85));
  box-shadow: 0 16px 50px rgba(30,107,255,.18);
}
.brandTitle{font-size:18px; font-weight:900; letter-spacing:.2px;}
.brandSub{font-size:12px; color: var(--muted); margin-top:2px;}

/* App Shell */
.appShell{
  display:flex;
  min-height:100vh;
  gap:14px;
  padding:14px;
}

/* Sidebar */
.sidebar{
  width: 280px;
  min-width: 280px;
  padding:14px;
  display:flex;
  flex-direction:column;
}
.sideTop{padding:6px 6px 12px;}
.sideLogo{display:flex; gap:10px; align-items:center;}
.dot{
  width:12px; height:12px; border-radius:999px;
  background: linear-gradient(180deg, rgba(90,169,255,.95), rgba(30,107,255,.85));
  box-shadow: 0 12px 35px rgba(90,169,255,.18);
}
.sideTitle{font-weight:900; font-size:14px;}
.sideSub{font-size:12px; color:var(--muted); margin-top:2px;}

.sideNav{display:flex; flex-direction:column; gap:6px; padding:8px 6px; flex:1;}
.sideItem{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px;
  padding:12px 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor:pointer;
  font-weight:900;
  text-align:left;
}
.sideItem:hover{
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.07);
  color: var(--text);
}
.sideItem.active{
  background: rgba(90,169,255,.10);
  border-color: rgba(90,169,255,.22);
  color: var(--text);
}
.sideBottom{
  padding:10px 6px 0;
  color: var(--muted);
  font-size:12px;
}

/* Main area */
.mainArea{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:14px;
  min-width: 0;
}
.topbar{
  height:64px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
}
.topCrumb{
  font-weight:900;
  color: var(--text);
  padding:10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
}
.userPill{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 10px;
}
.avatar{
  width:34px; height:34px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.10);
}
.userMeta{display:flex; flex-direction:column; gap:2px; margin-right:8px;}
.userName{font-weight:900; font-size:13px;}
.userRole{font-size:12px; color: var(--muted);}

.content{
  flex:1;
  min-height: 0;
  padding: 0;
}
.view{
  width: 100%;
}

/* Panels used by your modules */
.panel{
  background: var(--glass2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow2);
  backdrop-filter: blur(14px);
  padding:16px;
}
.title{font-weight:900; margin-bottom:12px; font-size:16px;}
.small{font-size:12px; color:var(--muted);}

.row{display:flex; gap:14px; flex-wrap:wrap;}
.col{flex:1; min-width:320px;}

.table{width:100%; border-collapse:collapse; font-size:13px;}
.table th,.table td{
  padding:12px;
  border-bottom:1px solid rgba(255,255,255,.06);
  text-align:left;
}
.cardListItem{
  border:1px solid rgba(255,255,255,.06);
  background: rgba(6,10,18,.35);
  border-radius: 16px;
  padding:14px;
  margin-bottom:10px;
}

/* Modal (used in Rechner) */
.modalOverlay{
  display:none;
  position:fixed; inset:0;
  background: rgba(0,0,0,.62);
  z-index:50;
  align-items:center; justify-content:center;
  padding:18px;
}
.modalBox{
  width:min(820px,94vw);
  max-height:78vh;
  background: var(--glass);
  border: 1px solid rgba(90,169,255,.22);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow:hidden;
  backdrop-filter: blur(16px);
}
.modalHead{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 14px;
  border-bottom:1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.03);
}
.modalTitle{font-weight:900; color: var(--text);}
.modalBody{padding:14px; overflow:auto; max-height:calc(78vh - 56px);}

/* Responsive */
@media (max-width: 980px){
  .appShell{flex-direction:column;}
  .sidebar{width:auto; min-width:0;}
}
