:root{
  --bg:#070A10;
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.08);
  --stroke: rgba(255,255,255,.10);
  --stroke2: rgba(255,255,255,.14);
  --text:#EAF0FF;
  --muted: rgba(234,240,255,.65);
  --muted2: rgba(234,240,255,.45);

  --accent:#7C5CFF;
  --accent2:#22D3EE;
  --danger:#FF4D6D;
  --ok:#34D399;
  --warn:#FBBF24;

  --shadow: 0 10px 40px rgba(0,0,0,.55);
  --shadow2: 0 12px 60px rgba(0,0,0,.60);
  --radius: 18px;
  --radius2: 22px;

  --font: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:var(--font);
  background: radial-gradient(1200px 600px at 20% 10%, rgba(124,92,255,.22), transparent 55%),
              radial-gradient(900px 540px at 70% 20%, rgba(34,211,238,.16), transparent 55%),
              radial-gradient(900px 700px at 40% 80%, rgba(255,77,109,.10), transparent 55%),
              var(--bg);
  color:var(--text);
  overflow:hidden;
}

.bg-glow{
  position:fixed; inset:-50px;
  pointer-events:none;
  background: radial-gradient(700px 400px at 30% 40%, rgba(124,92,255,.13), transparent 60%),
              radial-gradient(700px 400px at 70% 60%, rgba(34,211,238,.10), transparent 60%);
  filter: blur(8px);
  opacity:.9;
}

.app{
  display:grid;
  grid-template-columns: 260px 1fr 420px;
  height:100vh;
  width:100vw;
  gap: 14px;
  padding: 14px;
}

.glass{
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  border: 1px solid var(--stroke);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.sidebar{
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border: 1px solid var(--stroke);
  border-radius: var(--radius2);
  box-shadow: var(--shadow2);
  padding: 14px;
  display:flex;
  flex-direction:column;
  gap: 14px;
  overflow:hidden;
}

.brand{
  display:flex;
  gap: 12px;
  align-items:center;
  padding: 8px 8px 10px 8px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.logo{
  width: 42px; height:42px;
  border-radius: 14px;
  display:grid; place-items:center;
  background: radial-gradient(80% 80% at 30% 30%, rgba(255,255,255,.20), transparent 55%),
              linear-gradient(135deg, rgba(124,92,255,.65), rgba(34,211,238,.55));
  font-weight:800;
  letter-spacing:.5px;
}
.logo.big{ width:54px; height:54px; border-radius: 18px; }

.brand-title{ font-weight:800; font-size:14px; }
.brand-sub{ font-size:12px; color:var(--muted); margin-top:2px; }

.nav{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding: 8px 4px;
}
.nav-item{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  cursor:pointer;
  transition: .15s ease;
  text-align:left;
  font-weight:600;
}
.nav-ico{ width: 22px; text-align:center; opacity:.9; }
.nav-item:hover{ background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.10); }
.nav-item.active{
  background: linear-gradient(135deg, rgba(124,92,255,.26), rgba(34,211,238,.12));
  border-color: rgba(124,92,255,.30);
}

.sidebar-footer{
  margin-top:auto;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.user-pill{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: 13px;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.dot{
  width:10px; height:10px; border-radius:999px;
  background: rgba(255,255,255,.25);
  box-shadow: 0 0 0 4px rgba(255,255,255,.08);
}
.user-pill.on .dot{ background: var(--ok); box-shadow: 0 0 0 4px rgba(52,211,153,.20); }
.user-pill.on{ color: var(--text); }

.main{
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius2);
  overflow:hidden;
  position:relative;
  background: rgba(0,0,0,.14);
}

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
}
.top-left{
  display:flex;
  gap:16px;
  align-items:center;
}
.title-block h1{
  margin:0;
  font-size: 22px;
  letter-spacing: .2px;
}
.subtitle{ font-size: 12px; color: var(--muted); margin-top:4px; }

.quarter-switch{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
}
.q-badge{
  padding: 6px 12px;
  border-radius: 14px;
  font-weight:800;
  letter-spacing:.6px;
  background: linear-gradient(135deg, rgba(124,92,255,.35), rgba(34,211,238,.16));
  border: 1px solid rgba(255,255,255,.10);
}

.top-right{
  display:flex;
  flex-direction:column;
  gap: 10px;
  align-items:flex-end;
}
.filters{
  display:flex;
  gap: 8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.search{
  display:flex;
  gap: 10px;
  align-items:center;
}

.content{
  height: calc(100% - 92px);
  overflow:auto;
  padding: 16px;
}
.content::-webkit-scrollbar{ width: 10px; }
.content::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.10);
  border-radius: 20px;
  border: 2px solid rgba(0,0,0,.2);
}
.content::-webkit-scrollbar-thumb:hover{ background: rgba(255,255,255,.16); }

.btn{
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor:pointer;
  font-weight:700;
  transition: .15s ease;
}
.btn:hover{ transform: translateY(-1px); border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.09); }
.btn:active{ transform: translateY(0px); }
.btn.small{ padding: 8px 10px; font-size: 12px; border-radius: 12px; }
.btn.ghost{ background: transparent; }
.btn.primary{
  background: linear-gradient(135deg, rgba(124,92,255,.78), rgba(34,211,238,.55));
  border-color: rgba(124,92,255,.55);
}
.btn.danger{
  background: linear-gradient(135deg, rgba(255,77,109,.70), rgba(251,191,36,.15));
  border-color: rgba(255,77,109,.55);
}

.input, .select{
  background: rgba(255,255,255,.05);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  padding: 10px 12px;
  outline:none;
  font-weight:600;
}
.input:focus, .select:focus{ border-color: rgba(124,92,255,.55); box-shadow: 0 0 0 4px rgba(124,92,255,.18); }
.select{ padding-right: 36px; }
.select option{ background: #0B1020; }

.panel{
  padding: 14px;
  border-radius: var(--radius2);
}
.panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom: 10px;
}
.panel-title{ font-weight:900; font-size: 16px; }

.month-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 12px;
}
.month{
  border-radius: var(--radius2);
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  overflow:hidden;
}
.month-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 12px 12px 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
}
.month-title{ font-weight:900; }
.month-sub{ color: var(--muted); font-size: 12px; }
.weekdays{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 10px 12px 0 12px;
  color: var(--muted2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .8px;
}
.days{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 10px 12px 12px 12px;
}
.day{
  min-height: 88px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.10);
  padding: 8px;
  cursor:pointer;
  position:relative;
  overflow:hidden;
  transition: .14s ease;
}
.day:hover{ border-color: rgba(255,255,255,.14); transform: translateY(-1px); }
.day.muted{ opacity:.42; }
.day-num{
  font-weight:900;
  font-size: 12px;
  color: var(--text);
  opacity:.9;
}
.day-badges{
  display:flex;
  gap: 6px;
  margin-top: 6px;
  flex-direction:column;
}
.chip{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  max-width: 100%;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  font-size: 11px;
  font-weight:800;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.chip .dot2{
  width: 8px; height:8px; border-radius:999px;
  background: rgba(255,255,255,.40);
}
.chip.maintenance{ border-color: rgba(124,92,255,.35); background: rgba(124,92,255,.14); }
.chip.maintenance .dot2{ background: rgba(124,92,255,.95); }
.chip.repair{ border-color: rgba(255,77,109,.35); background: rgba(255,77,109,.13); }
.chip.repair .dot2{ background: rgba(255,77,109,.95); }
.chip.holiday{ border-color: rgba(251,191,36,.30); background: rgba(251,191,36,.12); }
.chip.holiday .dot2{ background: rgba(251,191,36,.95); }
.chip.break{ border-color: rgba(34,211,238,.30); background: rgba(34,211,238,.10); }
.chip.break .dot2{ background: rgba(34,211,238,.95); }
.chip.done{ opacity:.55; text-decoration: line-through; }

.sidepanel{
  border-radius: var(--radius2);
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  overflow:hidden;
  box-shadow: var(--shadow2);
  display:flex;
  flex-direction:column;
}
.sidepanel[aria-hidden="true"]{ display:none; }
.sidepanel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 14px 14px 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
}
.sidepanel-title{ font-weight:900; }
.sidepanel-body{
  padding: 14px;
  overflow:auto;
}
.sidepanel-body::-webkit-scrollbar{ width:10px; }
.sidepanel-body::-webkit-scrollbar-thumb{ background: rgba(255,255,255,.10); border-radius: 20px; border:2px solid rgba(0,0,0,.2); }

.form{ display:flex; flex-direction:column; gap: 10px; }
.field{ display:flex; flex-direction:column; gap: 6px; }
.field > span{ font-size: 12px; color: var(--muted); font-weight:700; }
.row{ display:grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3{ display:grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.textarea{ min-height: 92px; resize: vertical; }

.inline-error{
  border: 1px solid rgba(255,77,109,.35);
  background: rgba(255,77,109,.12);
  color: rgba(255,220,230,.95);
  padding: 10px 12px;
  border-radius: 14px;
  font-weight:700;
  font-size: 13px;
}

.kv{
  display:grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.kv:last-child{ border-bottom: 0; }
.k{ color: var(--muted); font-weight:800; font-size: 12px; }
.v{ font-weight:700; }

.table{
  display:flex;
  flex-direction:column;
  gap: 8px;
}
.table-row{
  display:grid;
  grid-template-columns: 120px 1fr 140px 120px 120px;
  gap: 10px;
  align-items:center;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}
.table-row.small{
  grid-template-columns: 1fr 1fr 160px;
}
.th{
  color: var(--muted2);
  font-weight:900;
  font-size: 11px;
  letter-spacing:.8px;
  text-transform:uppercase;
  border: 0;
  background: transparent;
  padding: 0 12px 6px 12px;
}
.cell{ font-weight:700; }
.cell.muted{ color: var(--muted); font-weight:700; }
.badge{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight:900;
  font-size: 11px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
}
.badge.planned{ border-color: rgba(124,92,255,.35); background: rgba(124,92,255,.14); }
.badge.done{ border-color: rgba(52,211,153,.35); background: rgba(52,211,153,.12); }

.login-overlay{
  position: absolute;
  inset: 0;
  display:grid;
  place-items:center;
  background: radial-gradient(900px 500px at 50% 30%, rgba(0,0,0,.55), rgba(0,0,0,.80));
  z-index: 100;
}
.login-card{
  width: min(460px, 92vw);
  padding: 18px;
}
.login-head{
  display:flex;
  gap: 12px;
  align-items:center;
  margin-bottom: 12px;
}
.login-title{ font-size: 18px; font-weight: 900; }
.login-sub{ color: var(--muted); margin-top: 2px; }
.hint{
  color: var(--muted2);
  font-size: 12px;
  line-height: 1.35;
}
code{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  padding: 2px 6px;
  border-radius: 10px;
}

.settings{ display:flex; flex-direction:column; gap: 14px; }
.setting-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}
.setting-title{ font-weight:900; }
.setting-desc{ color: var(--muted); font-size: 12px; margin-top: 4px; max-width: 520px; }

.toasts{
  position: fixed;
  right: 18px;
  bottom: 18px;
  display:flex;
  flex-direction:column;
  gap: 10px;
  z-index: 9999;
}
.toast{
  width: 360px;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.28);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.toast-title{ font-weight:900; }
.toast-msg{ color: var(--muted); margin-top: 3px; font-weight:700; }
.toast.ok{ border-color: rgba(52,211,153,.35); }
.toast.bad{ border-color: rgba(255,77,109,.35); }
.toast.warn{ border-color: rgba(251,191,36,.35); }

@media (max-width: 1200px){
  .app{ grid-template-columns: 240px 1fr 380px; }
  .month-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 980px){
  body{ overflow:auto; }
  .app{ grid-template-columns: 1fr; height:auto; }
  .sidepanel{ position: fixed; right: 14px; left: 14px; bottom: 14px; top: 14px; z-index: 200; }
  .sidebar{ position: sticky; top: 14px; z-index: 5; }
}


/* NO_LOGIN_MVP: Login-Overlay hart deaktivieren */
#loginModal, #login-overlay, #authModal, [data-overlay="login"] { display: none !important; }
.modal-backdrop, .backdrop, .overlay, .scrim { display: none !important; }


/* NO_LOGIN_MVP V3: extrem hartes Overlay-Blocking */
[role="dialog"] input[type="password"] { pointer-events: auto; }
[role="dialog"]:has(input[type="password"]), .modal:has(input[type="password"]), .dialog:has(input[type="password"]) { display:none !important; }


/* ===== NO_LOGIN FINAL: UI niemals sperren ===== */
html[data-nologin="1"] #loginModal,
html[data-nologin="1"] #login-overlay,
html[data-nologin="1"] #authModal,
html[data-nologin="1"] [data-overlay="login"],
html[data-nologin="1"] .modal-backdrop,
html[data-nologin="1"] .backdrop,
html[data-nologin="1"] .overlay,
html[data-nologin="1"] .scrim,
html[data-nologin="1"] [data-overlay],
html[data-nologin="1"] [data-backdrop] { display: none !important; }

html[data-nologin="1"] body,
html[data-nologin="1"] main,
html[data-nologin="1"] #app,
html[data-nologin="1"] .app,
html[data-nologin="1"] .shell,
html[data-nologin="1"] .layout,
html[data-nologin="1"] .content { 
  pointer-events: auto !important;
  filter: none !important;
  opacity: 1 !important;
}

html[data-nologin="1"] body.modal-open,
html[data-nologin="1"] body.locked { overflow: auto !important; }
