/* Daily-summary calendar — themed to match the rest of monitor-ui (dark/light)
   rather than the purple-gradient look of the original BJS page. */

.report-main {
  flex: 1;
  overflow-y: auto;
  padding: 22px 24px 40px;
}

.report-meta {
  max-width: 1400px;
  margin: 0 auto 20px;
}
.report-meta h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}
.report-meta .muted {
  font-family: var(--font-mono);
  font-size: 12px;
}

.calendars {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.month {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-2);
}
.month-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.month-head .title {
  font-size: 15px;
  font-weight: 700;
}
.month-head .sub {
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-mono);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--border);
  gap: 1px;
}
.cal-dow {
  background: var(--bg-3);
  text-align: center;
  padding: 8px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.cal-cell {
  background: var(--bg);
  min-height: 138px;
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cal-cell.empty { background: transparent; }
.cal-cell.has-data { cursor: pointer; transition: background 0.12s; }
.cal-cell.has-data:hover { background: var(--bg-2); }
/* Health tints — subtle background so the pip / numbers stay legible. */
.cal-cell.health-ok       { background: linear-gradient(180deg, rgba(52,211,153,0.08), transparent 60%), var(--bg); }
.cal-cell.health-warning  { background: linear-gradient(180deg, rgba(245,158,11,0.13), transparent 60%), var(--bg); }
.cal-cell.health-critical { background: linear-gradient(180deg, rgba(248,113,113,0.16), transparent 60%), var(--bg); }
.cal-cell.health-none     { background: var(--bg); opacity: 0.65; }
.cal-cell.is-today        { outline: 2px solid var(--accent); outline-offset: 1px; }

.health-pip {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pip-ok       { background: var(--result, #34d399); }
.pip-warning  { background: var(--tool, #f59e0b); }
.pip-critical { background: var(--warn, #f87171); }
.pip-none     { background: var(--muted-2); opacity: 0.5; }

.cal-legend {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 6px 4px;
  font: 11px var(--font-mono);
  color: var(--muted);
}
.cal-legend .lg-item { display: inline-flex; align-items: center; gap: 6px; }


.cal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.cal-head .day {
  font-weight: 700;
  color: var(--text);
}
.cal-head .day.weekend { color: var(--accent); }
.cal-head .open-link {
  font-size: 10px;
  color: var(--muted);
  text-decoration: none;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.cal-head .open-link:hover { color: var(--accent); border-color: var(--accent); }

.metric-rows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 8px;
  font-size: 11px;
}
.metric-rows .m {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.metric-rows .m .label {
  color: var(--muted-2);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.metric-rows .m .value {
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
}
.metric-rows .m.ok    .value { color: var(--result); }
.metric-rows .m.warn  .value { color: var(--tool); }
.metric-rows .m.err   .value { color: var(--warn); }
.metric-rows .m.zero  .value { color: var(--muted-2); }

.report-meta .source {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  margin-left: 6px;
}
.env-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.env-badge.is-prod {
  color: var(--warn);
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.08);
}
.env-badge.is-staging {
  color: var(--accent);
  border-color: rgba(167, 139, 250, 0.4);
  background: rgba(167, 139, 250, 0.08);
}

@media (max-width: 768px) {
  .report-main { padding: 16px 12px 32px; }
  .cal-cell { min-height: 110px; padding: 6px; }
  .metric-rows { font-size: 10px; }
  .metric-rows .m .value { font-size: 11px; }
}
