:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f6f2;
  color: #1f2933;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 88%), rgb(245 246 242 / 95%)),
    #f5f6f2;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 0 28px;
  border-bottom: 1px solid #d9ddd4;
  background: rgb(255 255 255 / 94%);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand small {
  margin-top: 3px;
  color: #667085;
  font-size: 12px;
}

.mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: #c62828;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
}

.nav {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid #d9ddd4;
  border-radius: 8px;
  background: #f7f8f5;
}

.nav a {
  min-width: 94px;
  padding: 9px 12px;
  border-radius: 6px;
  text-align: center;
  color: #4b5563;
  font-size: 14px;
}

.nav a.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 1px 4px rgb(0 0 0 / 8%);
}

.identity {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: #4b5563;
  font-size: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid #b51f1f;
  background: #c62828;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.button.secondary {
  border-color: #d1d5db;
  background: #fff;
  color: #1f2933;
}

main {
  width: min(1180px, calc(100vw - 40px));
  margin: 32px auto 56px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.12;
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
  letter-spacing: 0;
}

p {
  margin-top: 6px;
  color: #5f6b7a;
  line-height: 1.5;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #c9ced6;
  background: #fff;
  color: #384250;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.pill.ok {
  border-color: #b7d8be;
  background: #edf8ef;
  color: #276738;
}

.pill.warn {
  border-color: #f0d8a8;
  background: #fff7e8;
  color: #8a5a00;
}

.pill.danger {
  border-color: #f2b8b5;
  background: #fff0ef;
  color: #a4262c;
}

.status-grid,
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.work-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.status-card,
.work-tile,
.panel,
.empty-state {
  border: 1px solid #d9ddd4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgb(30 41 59 / 7%);
}

.status-card,
.work-tile {
  min-height: 126px;
  padding: 18px;
}

.status-card strong,
.work-tile strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  letter-spacing: 0;
}

.status-card small,
.work-tile small {
  display: block;
  margin-top: 8px;
  color: #667085;
  line-height: 1.35;
}

.label {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.panel {
  padding: 22px;
}

.action-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.kv {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
}

.kv div {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid #edf0eb;
}

.kv dt {
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.kv dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-family: "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  font-size: 13px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 32px;
  text-align: center;
}

.empty-icon {
  width: 72px;
  height: 72px;
  border: 2px solid #d9ddd4;
  border-radius: 8px;
  background:
    linear-gradient(#d9ddd4 0 0) 18px 20px / 36px 2px no-repeat,
    linear-gradient(#d9ddd4 0 0) 18px 34px / 30px 2px no-repeat,
    linear-gradient(#d9ddd4 0 0) 18px 48px / 22px 2px no-repeat,
    #fff;
}

@media (max-width: 820px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px 20px;
  }

  .nav,
  .identity {
    justify-content: stretch;
    width: 100%;
  }

  .nav a {
    flex: 1;
    min-width: 0;
  }

  .identity {
    justify-content: space-between;
  }

  main {
    width: min(100vw - 28px, 760px);
    margin-top: 24px;
  }

  .page-head,
  .action-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-grid,
  .work-grid {
    grid-template-columns: 1fr;
  }

  .kv div {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}
