* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-soft: #f0eee8;
  --line: #ded9cf;
  --text: #171717;
  --muted: #6f6a60;
  --green: #0f7a4f;
  --amber: #9a6400;
  --shadow: rgba(35, 31, 26, 0.08);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0d0c;
  --surface: #171716;
  --surface-soft: #22211f;
  --line: #34322e;
  --text: #f4f2ed;
  --muted: #a19b90;
  --green: #42d995;
  --amber: #e7aa45;
  --shadow: rgba(0, 0, 0, 0.28);
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
a {
  font: inherit;
}

.page {
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  width: 260px;
  display: block;
  color: var(--text);
}

.logo {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0.9;
}

.logo-dark {
  display: none;
}

html[data-theme="dark"] .logo-light {
  display: none;
}

html[data-theme="dark"] .logo-dark {
  display: block;
}

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

.links a,
.theme-toggle {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  font-size: 13px;
}

.links a:hover,
.theme-toggle:hover {
  background: var(--surface-soft);
}

.hero {
  min-height: 330px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  font-weight: 560;
  letter-spacing: 0;
}

.hero-status {
  margin-top: 28px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--green);
  font-size: 13px;
  text-transform: uppercase;
  box-shadow: 0 12px 28px var(--shadow);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 28px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}

.metric {
  min-height: 132px;
  display: grid;
  align-content: space-between;
  padding: 20px;
  background: var(--surface);
}

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

.metric strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.06;
  font-weight: 620;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.panel {
  min-height: 300px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 16px 36px var(--shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.panel h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 560;
  letter-spacing: 0;
}

.worker-table,
.events {
  display: grid;
  gap: 8px;
}

.worker-row {
  display: grid;
  grid-template-columns: 1fr 0.8fr 0.8fr 0.9fr;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.worker-row.head {
  min-height: 32px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.worker-row strong {
  color: var(--green);
  font-weight: 600;
}

.events p {
  margin: 0;
  display: flex;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.events span {
  color: var(--amber);
  flex: 0 0 auto;
}

@media (max-width: 820px) {
  .page {
    width: min(100vw - 24px, 1180px);
    padding-top: 18px;
  }

  .topbar,
  .links {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .brand {
    width: 220px;
  }

  .hero {
    min-height: 280px;
  }

  .summary,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: 104px;
  }
}
