:root{
  --bg:#0b1220;
  --card:#111b2e;
  --card-2:#14213a;
  --text:#e9eefc;
  --muted:#a9b6d8;
  --accent:#4ea1ff;
  --accent-strong:#2563eb;
  --danger:#ff5a7a;
  --line:rgba(255,255,255,0.10);
  --line-strong:rgba(255,255,255,0.18);
  --report-bg:#ede9fe;
  --report-border:#c4b5fd;
  --report-text:#5b21b6;
  --current-bg:#2563eb;
  --current-border:#93c5fd;
  --current-text:#ffffff;
  --week-highlight:#eff6ff;
  --week-border:#bfdbfe;
}

*{
  box-sizing:border-box;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
}

.topbar{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  padding:14px 14px;
  border-bottom:1px solid var(--line);
  position:sticky;
  top:0;
  background:rgba(11,18,32,0.95);
  backdrop-filter:blur(8px);
  z-index:10;
}

.title h1{
  margin:0;
  font-size:16px;
}

.subtitle{
  margin-top:2px;
  font-size:12px;
  color:var(--muted);
  line-height:1.4;
}

.controls{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end;
}

button,
select{
  background:var(--card);
  color:var(--text);
  border:1px solid var(--line);
  border-radius:10px;
  padding:8px 10px;
  font-size:14px;
}

button{
  cursor:pointer;
}

button:hover,
select:hover{
  border-color:rgba(255,255,255,0.25);
}

.container{
  max-width:1100px;
  margin:0 auto;
  padding:14px;
}

.monthHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
}

#monthLabel{
  margin:8px 0 12px;
  font-size:18px;
}

.dow,
.grid{
  display:grid;
  grid-template-columns:repeat(7, 1fr);
  gap:8px;
}

.dow{
  direction:ltr;
}

.dow div{
  padding:10px 10px;
  color:var(--muted);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:0.06em;
  text-align:center;
}

.grid{
  direction:ltr;
}

.day{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:14px;
  min-height:150px;
  padding:10px;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  gap:8px;
  transition:background 0.2s ease,border-color 0.2s ease,box-shadow 0.2s ease,transform 0.2s ease;
}

.day:hover{
  border-color:var(--line-strong);
  transform:translateY(-1px);
}

.day.muted{
  opacity:0.45;
}

.day.today{
  outline:2px solid var(--accent);
}

.day.reporting-week{
  background:var(--week-highlight);
  border:2px solid var(--week-border);
}

.day.reporting-thursday{
  background:#dbeafe;
  border:2px solid var(--accent-strong);
  box-shadow:0 0 0 2px rgba(37,99,235,0.12) inset;
}

.day .topRow{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
  flex-wrap:wrap;
}

.day .dateNum{
  font-size:16px;
  font-weight:700;
}

.badge{
  font-size:12px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid var(--line);
  color:var(--text);
  white-space:nowrap;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

button.badge{
  appearance:none;
  -webkit-appearance:none;
}

.badge.week{
  background:rgba(78,161,255,0.10);
  border-color:rgba(78,161,255,0.25);
}

.badge.end{
  background:rgba(255,90,122,0.10);
  border-color:rgba(255,90,122,0.25);
}

.badge.admissions{
  display:inline-flex;
  align-self:flex-start;
  background:var(--report-bg);
  border-color:var(--report-border);
  color:var(--report-text);
  font-size:11px;
  font-weight:700;
  line-height:1.2;
  white-space:normal;
  text-align:left;
  max-width:100%;
}

.badge.current-reporting{
  display:inline-flex;
  align-self:flex-start;
  background:var(--current-bg);
  border-color:var(--current-border);
  color:var(--current-text);
  font-size:11px;
  font-weight:700;
  line-height:1.2;
  white-space:normal;
  text-align:left;
  max-width:100%;
}

.day .meta{
  font-size:12px;
  color:var(--muted);
  line-height:1.35;
}

.day .reportingText{
  margin-top:2px;
  font-size:11px;
  line-height:1.4;
  color:var(--muted);
  font-weight:600;
}

.day.reporting-thursday .reportingText{
  color:var(--accent-strong);
}

.backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.55);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:100;
}

.hidden{
  display:none;
}

.modal{
  width:min(520px, 100%);
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  padding:16px;
  box-shadow:0 20px 50px rgba(0,0,0,0.35);
}

.modal h3{
  margin:0 0 8px;
  font-size:16px;
}

.modal p{
  margin:0 0 14px;
  color:var(--text);
  line-height:1.55;
}

#modalText{
  color:var(--text);
  line-height:1.55;
}

.modalActions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
}

@media (max-width: 720px){
  .topbar{
    flex-direction:column;
    align-items:flex-start;
  }

  .controls{
    width:100%;
    justify-content:flex-start;
  }
}

@media (max-width: 520px){
  .day{
    min-height:132px;
    padding:9px;
  }

  .badge{
    font-size:11px;
    padding:3px 7px;
  }

  .badge.admissions,
  .badge.current-reporting{
    font-size:10px;
  }

  .day .meta{
    font-size:11px;
  }

  .day .reportingText{
    font-size:10px;
  }

  .dow,
  .grid{
    gap:6px;
  }
}
