:root{
  --bg0:#050808;
  --bg1:#070c0b;
  --panel:#0b1410;
  --panel2:#0e1a14;
  --border: rgba(255,255,255,.10);

  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.64);

  --green1:#2ad67a;
  --green2:#19b862;
  --green3:#0ea852;

  --danger:#ff4d4d;
  --warn:#ffcc00;

  --shadow: 0 24px 70px rgba(0,0,0,.60);
  --shadow2: 0 12px 34px rgba(0,0,0,.40);

  --r10:10px;
  --r14:14px;
  --r18:18px;
  --r22:22px;

  --pad: 18px;
  --pad2: 22px;

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 15% -10%, rgba(42,214,122,.18), transparent 60%),
    radial-gradient(1100px 900px at 90% 0%, rgba(25,184,98,.14), transparent 58%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

a{ color: inherit; text-decoration:none; }
a:hover{ text-decoration:none; }

.bg{ min-height:100vh; }

/* ===== Login Center (für <main class="center">) ===== */
.center{
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}

/* ===== Topbar / Navbar ===== */
.topbar{
  position: sticky;
  top:0;
  z-index:50;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding: 14px 18px;
  background: rgba(6,10,9,.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.topbar .left{
  display:flex;
  align-items:center;
  gap:14px;
  min-width: 0;
}

.pill{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: var(--shadow2);
  white-space:nowrap;
}

.pill strong{
  font-weight: 900;
  letter-spacing:.2px;
}

.dot{
  width:10px;height:10px;border-radius:999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.9), rgba(255,255,255,0) 40%),
    linear-gradient(135deg, var(--green1), var(--green2));
  box-shadow: 0 0 0 4px rgba(42,214,122,.12), 0 0 22px rgba(42,214,122,.20);
}

.nav{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap: wrap;
}

.nav a{
  display:inline-flex;
  align-items:center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color: rgba(255,255,255,.80);
  font-weight: 800;
  font-size: 14px;
  letter-spacing:.15px;
  transition: transform .12s ease, background .18s ease, border-color .18s ease, color .18s ease;
}

.nav a:hover{
  transform: translateY(-1px);
  background: rgba(42,214,122,.08);
  border-color: rgba(42,214,122,.22);
  color: rgba(255,255,255,.92);
}

.nav a.active{
  background: linear-gradient(135deg, rgba(42,214,122,.22), rgba(25,184,98,.12));
  border-color: rgba(42,214,122,.35);
  color: rgba(255,255,255,.96);
  box-shadow: 0 10px 24px rgba(42,214,122,.10);
}

.topbar .right{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap: wrap;
}

/* ===== User chip ===== */
.userChip{
  display:flex;
  align-items:center;
  gap:12px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
}

.avatar{
  width:34px;height:34px;border-radius: 12px;
  display:grid;place-items:center;
  font-weight: 1000;
  color: #04100a;
  background: linear-gradient(135deg, var(--green1), var(--green2));
  box-shadow: 0 12px 24px rgba(42,214,122,.16);
}

.userName{
  font-weight: 900;
  font-size: 14px;
  line-height: 1.05;
}

.userRole{
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* ===== Layout ===== */
.wrap{
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px;
}

.hero{
  display:flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  padding: 18px 4px 10px;
  flex-wrap: wrap;
}

.kicker{
  display:inline-block;
  font-weight: 1000;
  letter-spacing: .18em;
  font-size: 12px;
  color: rgba(42,214,122,.90);
  margin-bottom: 8px;
}

.hero h2{
  margin:0;
  font-size: 30px;
  letter-spacing: .2px;
}

.hero p{
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  max-width: 720px;
}

.heroActions{
  display:flex;
  gap:10px;
  flex-wrap: wrap;
  align-items:center;
}

/* ===== Cards ===== */
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--r22);
  padding: var(--pad2);
  box-shadow: var(--shadow);
}

.card h3{
  margin:0;
  font-size: 18px;
  letter-spacing:.2px;
}

/* ===== Login Card (nur fürs Login!) =====
   -> im Login HTML: <section class="card loginCard"> */
.loginCard{
  width: 100%;
  max-width: 360px;
  padding: 18px;
}

.loginCard .form{ gap: 10px; }
.loginCard input{ padding: 10px 12px; font-size: 14px; }
.loginCard .btn{ padding: 10px 14px; }

/* ===== Lists ===== */
.list{ display:flex; flex-direction: column; gap:10px; }

.item{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap:14px;
  padding: 14px 14px;
  border-radius: var(--r18);
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.08);
  transition: transform .12s ease, border-color .18s ease, background .18s ease;
}

.item:hover{
  transform: translateY(-1px);
  background: rgba(42,214,122,.06);
  border-color: rgba(42,214,122,.22);
}

.item .t{
  font-weight: 950;
  font-size: 15px;
}

.item .m{
  margin-top: 6px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
}

.itemActions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn{
  position: relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.92);
  font-weight: 950;
  font-size: 14px;
  cursor: pointer;
  user-select:none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s ease, filter .18s ease, background .18s ease, border-color .18s ease;
}

.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0px) scale(.99); }

.btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgba(42,214,122,.12);
  border-color: rgba(42,214,122,.35);
}

.btn.primary{
  color: #05110a;
  border-color: rgba(42,214,122,.45);
  background: linear-gradient(135deg, rgba(42,214,122,.98), rgba(25,184,98,.92));
  box-shadow: 0 14px 30px rgba(42,214,122,.16);
}

.btn.primary:hover{ filter: brightness(1.05); }

.btn.ghost{
  background: rgba(255,255,255,.03);
}

.btn.danger{
  border-color: rgba(255,77,77,.35);
  background: rgba(255,77,77,.08);
}

.btn.tiny{
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13px;
}

/* ===== Forms ===== */
.form{ display:flex; flex-direction: column; gap:12px; margin-top: 10px; }

label span{
  display:block;
  font-size: 13px;
  font-weight: 900;
  color: rgba(255,255,255,.78);
  margin-bottom: 6px;
}

input, textarea, select{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.20);
  color: var(--text);
  outline: none;
  font-size: 14.5px;
}

textarea{ resize: vertical; min-height: 90px; }

input:focus, textarea:focus, select:focus{
  border-color: rgba(42,214,122,.35);
  box-shadow: 0 0 0 4px rgba(42,214,122,.10);
}

.grid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ===== Toast ===== */
.toast{
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.88);
}

.toast.good{
  border-color: rgba(42,214,122,.35);
  background: rgba(42,214,122,.10);
}

.toast.bad{
  border-color: rgba(255,77,77,.35);
  background: rgba(255,77,77,.10);
}

/* ===== Calendar ===== */
.calendar{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.dayHead{
  padding: 10px 10px;
  border-radius: 14px;
  text-align:center;
  font-weight: 1000;
  color: rgba(255,255,255,.78);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
}

.cell{
  min-height: 104px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(0,0,0,.18);
  transition: transform .12s ease, border-color .18s ease, background .18s ease;
  cursor: pointer;
}

.cell:hover{
  transform: translateY(-1px);
  background: rgba(42,214,122,.06);
  border-color: rgba(42,214,122,.22);
}

.cell.today{
  border-color: rgba(42,214,122,.40);
  box-shadow: 0 0 0 4px rgba(42,214,122,.08);
}

.mutedDay{ opacity: .55; }

.cell .n{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  font-weight: 1000;
  color: rgba(255,255,255,.92);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}

.pips{
  margin-top: 10px;
  display:flex;
  gap:6px;
  flex-wrap: wrap;
}

.pip{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.25);
  border: 1px solid rgba(255,255,255,.12);
}

.cell:hover .pip{
  background: linear-gradient(135deg, rgba(42,214,122,.9), rgba(25,184,98,.75));
  border-color: rgba(42,214,122,.30);
}

/* =========================
   MODAL / POPUP (KLEINER)
   ========================= */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal.open { display: flex; }

.modal .backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

.modal .sheet {
  position: relative;
  z-index: 2;

  width: 100%;
  max-width: 520px;
  padding: 28px 30px;

  border-radius: 18px;
  background: #111815;
  border: 1px solid rgba(255,255,255,0.08);

  box-shadow:
    0 30px 80px rgba(0,0,0,0.7),
    0 0 0 1px rgba(42,214,122,0.08);

  animation: modalFade .18s ease-out;
}

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

/* Header */
.sheetHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.sheetHead h3 {
  margin: 0;
  font-size: 20px;
}

/* Formular kompakter */
.modal .form label { margin-bottom: 16px; }

.modal .form input,
.modal .form textarea,
.modal .form select {
  padding: 12px 14px;
  font-size: 14px;
}

/* Grid bei Start/Ende */
.modal .grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Buttons */
.modal .btn {
  padding: 10px 16px;
  font-size: 14px;
}

/* Toast im Modal */
.modal .toast { margin-top: 14px; }

/* ===== Tables ===== */
.tableWrap{
  overflow:auto;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  -webkit-overflow-scrolling: touch;
}

table{
  width:100%;
  border-collapse: collapse;
  min-width: 860px;
}

thead th{
  text-align:left;
  font-size: 12.5px;
  letter-spacing:.08em;
  color: rgba(255,255,255,.70);
  padding: 12px 12px;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.08);
  white-space: nowrap;
}

tbody td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  color: rgba(255,255,255,.86);
  vertical-align: top;
}

tbody tr:hover td{ background: rgba(42,214,122,.04); }

/* ===== Small utilities used by pages (safe) ===== */
code{
  color: rgba(234,246,240,.92);
  background: rgba(255,255,255,.06);
  padding: 2px 6px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.08);
}

/* ===== Responsive (all devices) ===== */
@media (max-width: 1100px){
  .wrap{ padding: 14px; }
  table{ min-width: 760px; }
}

@media (max-width: 980px){
  .hero{ flex-direction: column; align-items:flex-start; }
  .grid2{ grid-template-columns: 1fr; }
  .topbar{ flex-direction: column; align-items:flex-start; gap:12px; }
  .topbar .right{ width:100%; justify-content: space-between; }
  .nav{ width:100%; }
}

@media (max-width: 680px){
  .pill{ width:100%; justify-content: space-between; }
  .userChip{ width:100%; justify-content: space-between; }
  .btn{ width:auto; }
  .calendar{ gap:8px; }
  .cell{ min-height: 92px; padding: 10px; }
}

@media (max-width: 420px){
  .wrap{ padding: 12px; }
  .hero h2{ font-size: 24px; }
  .nav a{ padding: 9px 12px; font-size: 13px; }
  .cell .n{ width: 30px; height: 30px; border-radius: 11px; }
  .pip{ width: 9px; height: 9px; }
}

/* Mobile Modal */
@media (max-width: 600px) {
  .modal .sheet {
    max-width: 92%;
    padding: 22px;
    border-radius: 14px;
  }
  .modal .grid2 { grid-template-columns: 1fr; }
}