:root {
  --ink: #121417;
  --muted: #667085;
  --line: #d7dde6;
  --paper: #f5f7fa;
  --card: #ffffff;
  --blue: #2f6f9f;
  --green: #2f7d57;
  --orange: #a7651d;
  --red: #a84337;
  --shadow: 0 10px 24px rgba(18, 20, 23, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

body.drawer-open {
  overflow: hidden;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: end;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

@media (min-width: 760px) {
  .hero { grid-template-columns: 1fr auto; }
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }

h1 {
  margin-bottom: 10px;
  font-size: clamp(42px, 8vw, 92px);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: 20px;
}

.subtitle {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
}

.health {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.health.ok { color: var(--green); border-color: rgba(47, 125, 87, 0.35); }
.health.warn { color: var(--orange); border-color: rgba(167, 101, 29, 0.35); }

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

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 18px 0;
}

@media (min-width: 840px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
}

.stat, .panel, .controls {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stat {
  padding: 18px;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  line-height: 1;
}

.controls {
  display: grid;
  gap: 12px;
  align-items: end;
  padding: 16px;
  margin-bottom: 18px;
}

@media (min-width: 860px) {
  .controls { grid-template-columns: 1fr 180px 180px auto; }
}

label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

input, select, button {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

button {
  cursor: pointer;
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  font-weight: 800;
}

.secondary-button {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.button-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.today-grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

@media (min-width: 940px) {
  .today-grid { grid-template-columns: 1.25fr 1fr; }
  .maintenance-panel { grid-column: 1 / -1; }
}

.today-brief {
  display: grid;
  gap: 14px;
}

.today-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 640px) {
  .today-cards { grid-template-columns: repeat(4, 1fr); }
}

.today-cards div {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e4e9f0;
  border-radius: 8px;
  background: #fbfcfe;
}

.maintenance-brief {
  display: grid;
  gap: 14px;
}

.maintenance-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 780px) {
  .maintenance-cards { grid-template-columns: repeat(4, 1fr); }
}

.maintenance-cards div {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e4e9f0;
  border-radius: 8px;
  background: #fbfcfe;
}

.maintenance-cards span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.maintenance-cards strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.maintenance-action,
.warning-list {
  padding: 12px;
  border: 1px solid #e4e9f0;
  border-radius: 8px;
  background: #fbfcfe;
}

.maintenance-action p {
  margin: 6px 0 0;
  color: #344054;
}

.warning-list ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--orange);
}

.action-panel {
  display: grid;
  align-content: start;
}

.action-queue {
  display: grid;
  gap: 12px;
}

.queue-counts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.queue-counts span,
.action-status {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  background: #edf0f4;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.action-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.action-list li {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e4e9f0;
  border-radius: 8px;
  background: #fbfcfe;
}

.action-list li > div {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.action-list strong {
  line-height: 1.25;
}

.action-list p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-lane {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.today-cards span,
.today-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.today-cards strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.today-list {
  padding-top: 2px;
}

.today-list > strong {
  display: block;
  margin-bottom: 8px;
}

.today-list ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.today-list li {
  color: var(--muted);
}

.today-list button {
  width: auto;
  min-height: 0;
  margin-right: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  text-align: left;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media (min-width: 560px) {
  .filter-grid { grid-template-columns: repeat(3, 1fr); }
}

.filter-button {
  min-height: 38px;
  padding: 0 10px;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

.filter-button.active {
  border-color: rgba(47, 111, 159, 0.45);
  background: #edf3f8;
  color: var(--blue);
}

.layout {
  display: grid;
  gap: 18px;
}

@media (min-width: 980px) {
  .layout { grid-template-columns: 280px 1fr; }
}

.panel {
  padding: 18px;
}

.panel-title {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
}

.panel-title span {
  color: var(--muted);
  font-size: 13px;
}

.stack {
  display: grid;
  gap: 8px;
}

.project-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid #edf0f4;
  color: var(--muted);
}

.project-row strong { color: var(--ink); }

.events {
  display: grid;
  gap: 12px;
}

.event {
  padding: 16px;
  border: 1px solid #e4e9f0;
  border-radius: 8px;
  background: #fbfcfe;
}

.event-head {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 8px;
  background: #edf3f8;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.pill.risk { background: #fae9e7; color: var(--red); }
.pill.verify { background: #e5f3ec; color: var(--green); }

.event h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.event p {
  margin-bottom: 12px;
  color: #344054;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 13px;
}

.event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.compact-button {
  width: auto;
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

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

.details summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--ink);
}

.copy-button {
  width: auto;
  min-height: 34px;
  margin: 10px 0 2px;
  padding: 0 10px;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

.details ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.muted {
  color: var(--muted);
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  visibility: hidden;
}

.drawer.open {
  pointer-events: auto;
  visibility: visible;
}

.drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(18, 20, 23, 0.42);
  opacity: 0;
  transition: opacity 160ms ease;
}

.drawer.open .drawer-overlay {
  opacity: 1;
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(680px, 100%);
  height: 100%;
  padding: 22px;
  overflow: auto;
  background: var(--card);
  box-shadow: -18px 0 36px rgba(18, 20, 23, 0.18);
  transform: translateX(100%);
  transition: transform 180ms ease;
}

.drawer.open .drawer-panel {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.drawer-head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.12;
}

.icon-button {
  width: 40px;
  min-height: 40px;
  padding: 0;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 16px;
}

.drawer-body {
  display: grid;
  gap: 16px;
  padding-top: 16px;
}

.drawer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.drawer-meta span {
  display: inline-flex;
  padding: 6px 8px;
  border-radius: 999px;
  background: #edf0f4;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.drawer-copy {
  width: fit-content;
}

.drawer-section {
  padding: 14px;
  border: 1px solid #e4e9f0;
  border-radius: 8px;
  background: #fbfcfe;
}

.drawer-section h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.drawer-section strong {
  display: block;
  margin: 10px 0 4px;
}

.drawer-section ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  color: #344054;
  overflow-wrap: anywhere;
}
