:root {
  --ink: #17202a;
  --muted: #667085;
  --line: #d9dee8;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --accent: #176b87;
  --accent-2: #2f7d32;
  --warn: #9a6700;
  --bad: #b42318;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 14px/1.45 Arial, Helvetica, sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  cursor: pointer;
}

button.secondary,
nav button {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
}

button:hover {
  filter: brightness(0.96);
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.hidden {
  display: none !important;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #eef7f4, #f6f3ea 48%, #eef3fa);
}

.login-panel {
  width: min(440px, 100%);
  display: grid;
  gap: 28px;
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(20, 35, 52, 0.12);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
}

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

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

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #edf2f7;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.badge.hot {
  background: #fff3e0;
  color: var(--warn);
}

.badge.good {
  background: #e7f6ec;
  color: var(--accent-2);
}

.badge.bad {
  background: #fee4e2;
  color: var(--bad);
}

.error {
  color: var(--bad);
  min-height: 20px;
  margin: 0;
}

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

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 236px 1fr;
}

.sidebar {
  background: #ffffff;
  border-right: 1px solid var(--line);
  padding: 18px 12px;
  display: grid;
  align-content: start;
  gap: 20px;
}

.brand {
  display: grid;
  gap: 4px;
  padding: 0 8px 12px;
  border-bottom: 1px solid var(--line);
}

.brand span {
  color: var(--muted);
  font-size: 12px;
}

nav {
  display: grid;
  gap: 4px;
}

nav button {
  justify-content: start;
  text-align: left;
  border-radius: 6px;
}

nav button.active {
  background: #e8f3f0;
  color: var(--accent);
}

.workspace {
  min-width: 0;
  padding: 18px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.topbar {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

.topbar h2 {
  margin-bottom: 2px;
}

.search {
  width: min(520px, 100%);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 18px;
}

.metric-grid,
.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.metric,
.panel,
.table,
.list,
.kanban-column,
.detail-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.metric {
  padding: 16px;
}

.metric strong {
  display: block;
  font-size: 28px;
}

.panel {
  padding: 16px;
}

.status-pill {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfe;
}

.section-actions {
  display: flex;
  justify-content: flex-end;
}

.table {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

tr {
  cursor: pointer;
}

tr:hover {
  background: #f7fafc;
}

.split {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 14px;
}

.detail-card {
  padding: 16px;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.action-grid button {
  width: 100%;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  border-left: 3px solid var(--accent);
  padding: 10px 12px;
  background: #fbfcfe;
}

.timeline-item pre {
  max-width: 100%;
  white-space: pre-wrap;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.kanban-column {
  min-height: 420px;
  padding: 12px;
}

.kanban-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  margin-top: 10px;
  background: #fff;
}

.list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.list-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfe;
}

dialog {
  width: min(520px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.dialog-body {
  display: grid;
  gap: 12px;
}

menu {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0;
  margin: 8px 0 0;
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
  }

  nav {
    grid-auto-flow: column;
    overflow-x: auto;
  }

  .topbar,
  .split {
    grid-template-columns: 1fr;
    display: grid;
  }

  .metric-grid,
  .status-grid {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }
}
