:root{
  --sidebar-w: 270px;
  --bg: #f4f7ff;
  --card: #ffffff;
  --text: #0b1220;
  --muted: #5b6576;
  --brand: #081a33; /* dark blue */
  --brand2: #0d2b57;
  --line: rgba(13,43,87,.14);
  --r: 18px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,Helvetica,sans-serif;
  background:var(--bg);
  color:var(--text);
}
.map-wrapper svg {
  width: 100%;
  max-width: 800px;
  height: auto;
}

.netz {
  fill: #b8c0d9;
  stroke: #ffffff;
  stroke-width: 1.5;
  cursor: pointer;
  transition: fill 0.2s ease;
}

.netz:hover {
  fill: #3556d8;
}

/* ===== Strecke Tabelle ===== */
.strecke-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

/* Kopf */
.strecke-table thead th {
  background: #eef2f7;
  color: #1f2a44;
  padding: 8px 6px;
  text-align: left;
  border-bottom: 2px solid #d7deea;
  white-space: nowrap;
}

/* Zeilen – abwechselnd hell / hellblau */
.strecke-table tbody tr:nth-child(odd) {
  background: #ffffff;
}

.strecke-table tbody tr:nth-child(even) {
  background: #f3f7fd;
}

/* Zellen */
.strecke-table td {
  padding: 6px 6px;
  vertical-align: middle;
  border-bottom: 1px solid #e3e8f0;
  white-space: nowrap;
}

/* Hover – dezent */
.strecke-table tbody tr:hover {
  background: #e9f0ff;
}

/* Inputs kompakt */
.strecke-table select,
.strecke-table input[type="text"] {
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 4px;
  border: 1px solid #cdd6e6;
  background: #fff;
}

.strecke-table textarea {
  font-size: 12px;
  padding: 4px 6px;
  min-height: 22px;
  resize: vertical;
}

/* Checkboxen sauber */
.strecke-table input[type="checkbox"] {
  transform: scale(0.9);
  cursor: pointer;
}

/* Zentrierte Spalten */
.strecke-table .center {
  text-align: center;
}

.sidebar{
  position:fixed; inset:0 auto 0 0;
  width:var(--sidebar-w);
  background:linear-gradient(180deg,var(--brand),var(--brand2));
  color:#fff;
  padding:18px 14px;
  display:flex; flex-direction:column;
  border-right:1px solid rgba(255,255,255,.12);
}
.sidebar__brand{display:flex;gap:12px;align-items:center;padding:8px 8px 16px 8px}
.sidebar__logo{
  width:42px;height:42px;border-radius:14px;
  background:rgba(255,255,255,.14);
  display:grid;place-items:center;font-weight:800;letter-spacing:.6px;
}
.sidebar__title{font-weight:700;line-height:1.1}
.sidebar__nav{display:flex;flex-direction:column;gap:6px;padding:10px 6px}
.nav__item{
  text-decoration:none;color:#fff;
  padding:12px 12px;border-radius:14px;
  background:transparent;
  border:1px solid transparent;
}
.nav__item:hover{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.10)}

.sidebar__footer{margin-top:auto;padding:10px 8px;display:flex;flex-direction:column;gap:10px}
.userchip{padding:10px 12px;border-radius:14px;background:rgba(255,255,255,.10)}
.userchip__name{font-weight:700}
.userchip__role{font-size:12px;opacity:.85}

.main{margin-left:var(--sidebar-w);min-height:100%}
.topbar{
  position:sticky;top:0;z-index:20;
  display:flex;align-items:center;gap:12px;
  padding:14px 18px;
  background:rgba(244,247,255,.92);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.topbar__crumb{font-weight:700;color:var(--text)}
.iconbtn{
  width:40px;height:40px;border-radius:14px;
  border:1px solid var(--line);
  background:var(--card);
  font-size:18px;
}

.page{padding:18px;max-width:1100px}
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--r);
  padding:16px;
  box-shadow: 0 10px 24px rgba(11,18,32,.06);
}
.grid{display:grid;gap:14px}
.grid--2{grid-template-columns:repeat(2,minmax(0,1fr))}
@media (max-width: 980px){.grid--2{grid-template-columns:1fr}}

.h1{font-size:24px;margin:0 0 10px 0}
.p{margin:0;color:var(--muted)}

.table{width:100%;border-collapse:separate;border-spacing:0}
.table th,.table td{padding:12px 10px;border-bottom:1px solid var(--line);text-align:left}
.table th{font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}

.btn{
  display:inline-flex;align-items:center;justify-content:center;
  padding:10px 12px;border-radius:14px;
  border:1px solid var(--line);
  background:var(--card);
  text-decoration:none;color:var(--text);
  font-weight:600;
}
.btn:hover{transform:translateY(-1px)}
.btn--primary{background:var(--brand);border-color:rgba(255,255,255,.12);color:#fff}
.btn--ghost{background:rgba(255,255,255,.10);border-color:rgba(255,255,255,.14);color:#fff}

.input{width:100%;padding:12px 12px;border-radius:14px;border:1px solid var(--line);background:#fff}
.label{font-size:12px;color:var(--muted);margin:0 0 6px 2px}
.formrow{display:grid;gap:10px;margin-top:12px}

.alert{padding:12px 14px;border-radius:14px;margin-bottom:12px;border:1px solid var(--line);background:#fff}
.alert--success{border-color:rgba(46,125,50,.25)}
.alert--error{border-color:rgba(211,47,47,.25)}
.alert--info{border-color:rgba(25,118,210,.25)}

/* Mobile: sidebar stays left, but becomes slide-in */
@media (max-width: 820px){
  .main{margin-left:0}
  .sidebar{transform:translateX(-105%);transition:transform .22s ease;box-shadow: 20px 0 40px rgba(0,0,0,.18)}
  .sidebar.is-open{transform:translateX(0)}
  .iconbtn{display:inline-flex}
}
@media (min-width: 821px){
  .iconbtn{display:none}
}
