:root {
  --bg: #f8f9fa;
  --panel: #ffffff;
  --line: #dee2e6;
  --ink: #212529;
  --muted: #6c757d;
  --brand: #e85d04;
  --brand-2: #d45103;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.shell {
  width: min(1220px, 96vw);
  margin: 16px auto 20px;
}

.top {
  background: linear-gradient(120deg, #1a1d21 0%, #252a30 100%);
  color: #fff;
  padding: 14px 16px;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.top h1 { margin: 0; }
.top p { margin: 4px 0 0; opacity: 0.9; }
.published-at {
  font-size: .82rem;
  opacity: 0.95;
}

.controls {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  position: sticky;
  top: 8px;
  z-index: 20;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
}

.mode, .nav { display: flex; gap: 8px; align-items: center; }
.filter { display: flex; gap: 8px; align-items: center; }
.filter label { font-weight: 700; color: #334155; font-size: .9rem; }

.filter select {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 7px 10px;
  font-weight: 600;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.2;
  color: #0f172a;
  min-width: 180px;
}

.btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn:hover {
  background: #f8f9fa;
  border-color: var(--brand);
}
.mode-btn.active { background: #fff3e8; color: #9a3412; border-color: #ffd3b5; }
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }

#content {
  margin-top: 10px;
}

.week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.day {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  min-height: 180px;
}

.day.today { outline: 2px solid #60a5fa; }

.day-head {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  font-weight: 800;
  font-size: .9rem;
}

.day-body { padding: 8px; }

.shift {
  border-radius: 8px;
  padding: 6px 8px;
  margin-bottom: 6px;
  color: #fff;
  font-size: .8rem;
}

.month {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.month-head {
  text-align: center;
  font-size: .8rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  position: sticky;
  top: 68px;
  z-index: 15;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 0;
}

.cell {
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 128px;
  background: #fff;
  padding: 8px;
}

.cell.outside { opacity: .5; }
.cell.today { outline: 2px solid #60a5fa; }
.cell-head { font-weight: 800; margin-bottom: 6px; }

.small {
  font-size: .72rem;
  padding: 3px 6px;
  border-radius: 7px;
  color: #fff;
  margin-bottom: 4px;
}

@media (max-width: 980px) {
  .week, .month { grid-template-columns: 1fr; }
  .filter { width: 100%; }
  .filter select { width: 100%; min-width: 0; }
}
