:root{
  --bg:#0b1220;
  --panel:#111b2e;
  --card:#0f1829;

  /* TEXT-HIERARCHIE */
  --text-strong:#f4f8ff;
  --text:#d9e3f8;
  --text-muted:#9fb3d9;

  --line:rgba(255,255,255,.12);

  --brand:#3aa0ff;
  --good:#39d98a;
  --warn:#ffcc66;
  --bad:#ff5d5d;

  --radius:14px;
  --shadow: 0 12px 40px rgba(0,0,0,.35);
  --shadow2: 0 10px 24px rgba(0,0,0,.25);
}

*{box-sizing:border-box}
html,body{height:100%}
html{
  background: var(--bg);
}

body{
  margin:0;
  min-height:100%;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Helvetica,Arial,sans-serif;
  color:var(--text);

  /* KOMPLETT EINHEITLICH */
  background: var(--bg);
}


a{color:inherit; text-decoration:none}
a:hover{opacity:.96}

/* ===== LAYOUT ===== */
.container{
  max-width:1400px;
  margin:0 auto;
  padding:22px 16px;
}


.topbar{
  position:sticky;
  top:0;
  z-index:20;
  backdrop-filter: blur(10px);
  background: rgba(11,18,32,.78);
  border-bottom: 1px solid var(--line);
}

.topbar .inner{
  display:flex;
  gap:14px;
  align-items:center;
  justify-content:space-between;
  padding:14px 16px;
  max-width:1100px;
  margin:0 auto;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:900;
  letter-spacing:.3px;
  color:var(--text-strong);
}

.brand .dot{
  width:10px;
  height:10px;
  border-radius:99px;
  background:var(--brand);
  box-shadow:0 0 0 6px rgba(58,160,255,.18);
}

.nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.nav a{
  padding:10px 12px;
  border:1px solid transparent;
  border-radius:12px;
  color:var(--text);
}

.nav a.active{
  background:rgba(58,160,255,.18);
  border-color:rgba(58,160,255,.35);
  color:var(--text-strong);
}

.nav a:hover{
  background:rgba(255,255,255,.08);
}

/* ===== TYPO ===== */
h1,h2,h3{margin:0; color:var(--text-strong); letter-spacing:.2px}
h1{font-size:28px}
h2{font-size:20px}
h3{font-size:16px}

.sub,.small{color:var(--text-muted); font-size:13px}

.pagehead{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin:18px 0 14px;
}

/* ===== GRID ===== */
.grid{display:grid; gap:14px}
.grid-2{
  display:grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap:14px;
  align-items:start;
}

@media (max-width: 900px){
  .grid-2{ grid-template-columns: 1fr; }
}


/* ===== CARDS ===== */
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
  overflow:hidden;
}

.card .hd{
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.card .hd b,.card .hd strong{color:var(--text-strong)}

.card .bd{padding:14px 16px; line-height:1.45}
.card .bd b{color:var(--text-strong)}

.card .ft{
  padding:12px 16px;
  border-top:1px solid var(--line);
  color:var(--text-muted);
  font-size:13px;
}

/* ===== KPI ===== */
.kpis{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:12px;
}


.kpi{
  padding:14px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.18);
}

.kpi .n{font-size:26px; font-weight:900; color:var(--text-strong)}
.kpi .l{color:var(--text-muted); font-size:13px; margin-top:4px}

/* ===== BUTTONS ===== */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 14px;
  border-radius:12px;
  border:1px solid rgba(58,160,255,.45);
  background: rgba(58,160,255,.18);
  color:var(--text-strong);
  cursor:pointer;
  font-weight:800;
}

.btn:hover{filter:brightness(1.08); box-shadow:0 0 0 2px rgba(255,255,255,.08) inset}

.btn.secondary{
  border-color:rgba(255,255,255,.22);
  background:rgba(255,255,255,.08);
  color:var(--text);
}

.btn.danger{
  border-color:rgba(255,93,93,.45);
  background:rgba(255,93,93,.18);
}

/* ===== BADGES ===== */
.badge{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.10);
  color:var(--text-strong);
  font-size:12px;
  font-weight:700;
}

.badge.good{
  background:rgba(57,217,138,.22);
  border-color:rgba(57,217,138,.45);
  box-shadow:0 0 0 3px rgba(57,217,138,.15);
}

.badge.warn{
  background:rgba(255,204,102,.22);
  border-color:rgba(255,204,102,.45);
}

.badge.bad{
  background:rgba(255,93,93,.22);
  border-color:rgba(255,93,93,.45);
  box-shadow:0 0 0 3px rgba(255,93,93,.15);
}

/* ===== TABLE ===== */
.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:14px;
}

.table th,.table td{
  padding:12px 12px;
  border-bottom:1px solid var(--line);
  text-align:left;
  vertical-align:top;
}

.table th{
  font-size:12px;
  letter-spacing:.35px;
  text-transform:uppercase;
  color:var(--text-muted);
  background:rgba(255,255,255,.05);
}

.table tr:hover td{background:rgba(255,255,255,.04)}
.table tr:last-child td{border-bottom:none}

/* ===== FORMS ===== */
.input, select, textarea{
  width:100%;
  padding:11px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(0,0,0,.22);
  color:var(--text);
  outline:none;
}

.input:focus, select:focus, textarea:focus{
  border-color: rgba(58,160,255,.55);
  box-shadow:0 0 0 3px rgba(58,160,255,.22);
}

.row{display:flex; gap:12px; flex-wrap:wrap}
.row > *{flex:1}

.hr{height:1px; background:var(--line); margin:16px 0}

/* ===== FOOTER ===== */
.app-footer{
  margin-top:80px;
  padding:40px 16px 28px;
  border-top:1px solid var(--line);

  background:
    radial-gradient(900px 260px at 50% 120%, rgba(58,160,255,.22), transparent 70%),
    linear-gradient(180deg, rgba(11,18,32,1), rgba(11,18,32,.96));
}

.footer-inner{
  max-width:1100px;
  margin:0 auto;
  text-align:center;

  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}

.footer-brand{
  font-weight:900;
  color:var(--text-strong);
  letter-spacing:.4px;
}

.footer-meta{
  margin-top:6px;
  font-size:13px;
  color:var(--text-muted);
}

/* Station-Highlight wenn aktueller User eingeteilt ist */
.card.is-mine{
  border-color: rgba(58,160,255,.55);
  box-shadow: 0 0 0 2px rgba(58,160,255,.18), var(--shadow2);
}

.mine-badge{
  border-color: rgba(58,160,255,.55) !important;
  background: rgba(58,160,255,.18) !important;
}


/*Station-Detail */
.iconbtn{
  width:38px;
  height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.08);
  color:var(--text-strong);
  font-weight:900;
  line-height:1;
  user-select:none;
}

.iconbtn:hover{
  background:rgba(255,255,255,.12);
  box-shadow:0 0 0 2px rgba(255,255,255,.08) inset;
}

.iconbtn.disabled{
  opacity:.6;
  cursor:not-allowed;
}

.card.sticky{
  position:sticky;
  top:92px; /* unter Topbar */
}

/* ===== SELECT DROPDOWN FIX (Dark UI) ===== */
select option {
  background-color: #ffffff;
  color: #000000;
}

/* ===== Notifications Popout ===== */
.notif-wrap { position: relative; }

.notif-btn {
  position: relative;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 18px;
  padding: 6px 8px;
  border-radius: 10px;
}

.notif-btn:hover { background: rgba(255,255,255,.06); }

.notif-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: 700;
}

.notif-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 360px;
  max-width: 92vw;
  background: rgba(15, 23, 42, .98);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
  overflow: hidden;
  z-index: 999;
}

.notif-pop-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.notif-pop-bd {
  max-height: 420px;
  overflow: auto;
}

.notif-item {
  display: block;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  text-decoration: none;
  color: inherit;
}

.notif-item:hover { background: rgba(255,255,255,.06); }

.notif-item .t { font-weight: 600; margin-bottom: 2px; }
.notif-item .m { opacity: .85; font-size: 13px; }
.notif-item .d { opacity: .6; font-size: 12px; margin-top: 6px; }


/*Wissensdatenbank Kategorien*/
.wdb-catlist a { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.wdb-catcount {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(34,197,94,.18);
  border: 1px solid rgba(34,197,94,.35);
}

.card a.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}
