:root {
  color-scheme: light;
  --brand-primary: #3b9e3e;
  --brand-secondary: #76bb78;
  --brand-tint: #edf8ee;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-subtle: #f9fafb;
  --border: #dfe5e8;
  --border-strong: #c9d3d8;
  --text: #172026;
  --muted: #63717b;
  --muted-strong: #45535d;
  --accent: var(--brand-primary);
  --accent-soft: var(--brand-tint);
  --danger: #b42318;
  --danger-soft: #fee4e2;
  --warning: #f59e0b;
  --warning-soft: #fef3c7;
  --nav: #132025;
  --nav-muted: #8fa0a8;
  --shadow: 0 18px 50px rgba(21, 32, 38, 0.08);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-size-base: 14px;
  --line-height-base: 1.45;
  --text-body-weight: 400;
  --text-semibold: 600;
  --text-bold: 700;
  --text-heavy: 800;
  --text-helper-size: 13px;
  --text-label-size: 11px;
  --letter-label: 0.08em;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1024px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  font-weight: var(--text-body-weight);
  line-height: var(--line-height-base);
  letter-spacing: 0;
}

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

.shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px 18px;
  background: var(--nav);
  color: #eef5f7;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 8px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.brand-mark img {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brand-name {
  font-size: 15px;
  font-weight: var(--text-heavy);
}

.brand-subtitle {
  margin-top: 2px;
  color: var(--nav-muted);
  font-size: var(--text-helper-size);
  font-weight: var(--text-semibold);
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #d8e2e6;
  font-size: var(--font-size-base);
  font-weight: var(--text-semibold);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.nav-item:hover,
.nav-item:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-item.is-active {
  background: var(--brand-tint);
  color: var(--nav);
  box-shadow: inset 4px 0 0 var(--brand-primary), 0 12px 28px rgba(0, 0, 0, 0.18);
}

.nav-item.is-active .nav-icon {
  color: var(--brand-primary);
  font-weight: var(--text-heavy);
}

.nav-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: inherit;
  font-size: 15px;
  font-weight: var(--text-bold);
  line-height: 1;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 14px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--nav-muted);
  font-size: var(--text-helper-size);
  font-weight: var(--text-semibold);
}

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

.workspace {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 104px;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  font-weight: var(--text-bold);
  line-height: 1.15;
}

.user-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.user-pill,
.panel-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted-strong);
  font-size: var(--text-helper-size);
  font-weight: var(--text-bold);
}

.user-pill {
  background: var(--accent-soft);
  border-color: #cbe8cc;
  color: #246c28;
}

.main-content {
  display: grid;
  gap: 24px;
  padding: 28px 32px 36px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.summary-card,
.panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.summary-card {
  display: grid;
  gap: 8px;
  min-height: 128px;
  padding: 20px;
}

.summary-label {
  color: var(--muted);
  font-size: var(--text-label-size);
  font-weight: var(--text-bold);
  letter-spacing: var(--letter-label);
  text-transform: uppercase;
}

.summary-card strong {
  font-size: 32px;
  font-weight: var(--text-heavy);
  line-height: 1;
}

.summary-card:first-child strong,
.summary-card:nth-child(3) strong {
  color: var(--brand-primary);
}

.summary-note {
  align-self: end;
  color: var(--muted);
  font-size: var(--text-helper-size);
  font-weight: var(--text-body-weight);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 18px;
}

.panel {
  min-height: 260px;
  padding: 22px;
}

.priority-panel {
  min-height: 0;
  grid-row: span 2;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.panel h2 {
  font-size: 18px;
  font-weight: var(--text-bold);
  line-height: 1.25;
}

.panel p {
  margin-top: 6px;
  color: var(--muted);
  font-size: var(--text-helper-size);
  font-weight: var(--text-body-weight);
  line-height: 1.45;
}

.stack-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.work-card,
.departure-card,
.metric-row {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  text-align: left;
}

.work-card {
  display: grid;
  gap: 10px;
  padding: 14px 14px 12px;
  border-left: 4px solid var(--border-strong);
}

.work-card.sev-high-border {
  border-left-color: var(--danger);
}

.work-card.sev-medium-border {
  border-left-color: var(--warning);
}

.work-card.sev-low-border {
  border-left-color: var(--border-strong);
}

.card-top,
.card-bottom,
.card-actions,
.departure-meta,
.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title,
.departure-date {
  color: var(--text);
  font-size: 14px;
  font-weight: var(--text-bold);
  line-height: 1.25;
}

.card-reason {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted-strong);
  font-size: var(--font-size-base);
  font-weight: var(--text-body-weight);
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta,
.departure-meta {
  color: var(--muted);
  font-size: var(--text-helper-size);
  font-weight: var(--text-body-weight);
}

.severity-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: var(--text-label-size);
  font-weight: var(--text-bold);
  white-space: nowrap;
  letter-spacing: var(--letter-label);
  text-transform: uppercase;
}

.sev-high {
  background: var(--danger);
  color: #ffffff;
}

.sev-medium {
  background: var(--warning-soft);
  color: #92400e;
}

.sev-low {
  background: #edf1f3;
  color: var(--muted-strong);
}

.action-button {
  display: inline-flex;
  height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: #f4f6f7;
  color: #5f6b73;
  font-size: var(--text-helper-size);
  font-weight: var(--text-bold);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.action-button.primary {
  border-color: #2f8232;
  background: var(--brand-primary);
  color: #ffffff;
}

.action-button:hover,
.action-button:focus-visible {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(118, 187, 120, 0.22);
}

.departure-card {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
}

.departure-title {
  color: var(--muted-strong);
  font-size: var(--font-size-base);
  font-weight: var(--text-semibold);
  line-height: 1.35;
}

.metric-row {
  min-height: 44px;
  padding: 10px 12px;
}

.metric-label {
  color: var(--muted);
  font-size: var(--text-helper-size);
  font-weight: var(--text-body-weight);
}

.metric-value {
  color: var(--brand-primary);
  font-size: 18px;
  font-weight: var(--text-heavy);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 230px;
  padding: 24px;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  margin-top: 18px;
  background: var(--surface-subtle);
  text-align: center;
}

.empty-state.compact {
  min-height: 148px;
}

.empty-title {
  color: var(--text);
  font-size: 14px;
  font-weight: var(--text-bold);
}

.empty-state p {
  max-width: 360px;
}

@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 232px minmax(0, 1fr);
  }

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

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

  .priority-panel {
    grid-row: auto;
  }
}
