:root {
  --primary: #0d69ac;
  --primary-dark: #084c7d;
  --gold: #c5a059;
  --ink: #172033;
  --muted: #6b7280;
  --surface: #ffffff;
  --background: #f4f7fb;
  --border: #e3e8ef;
  --danger: #b42318;
  --danger-bg: #fff1f0;
  --success: #137333;
  --success-bg: #eef8f0;
  --warning: #9a6700;
  --warning-bg: #fff8e8;
  --info: #0d69ac;
  --info-bg: #eef7fd;
  --shadow: 0 14px 35px rgba(23, 32, 51, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--background);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 250px;
  padding: 26px 20px;
  background: #082f4b;
  color: white;
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.65);
  display: grid;
  place-items: center;
  font-family: "Source Serif 4", serif;
  font-size: 24px;
  font-weight: 700;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 14px;
  letter-spacing: .04em;
}

.brand span {
  margin-top: 3px;
  font-size: 12px;
  color: rgba(255,255,255,.65);
}

.nav {
  margin-top: 28px;
  display: grid;
  gap: 8px;
}

.nav-item {
  color: rgba(255,255,255,.72);
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 10px;
  transition: .2s ease;
}

.nav-item:hover,
.nav-item.active {
  color: white;
  background: rgba(255,255,255,.11);
}

.sidebar-footer {
  margin-top: auto;
  font-size: 12px;
  color: rgba(255,255,255,.65);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.main {
  margin-left: 250px;
  padding: 28px;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.eyebrow.light {
  color: #d6eaff;
}

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

h1 {
  margin-bottom: 0;
  font-size: 30px;
  font-family: "Source Serif 4", serif;
}

h2 {
  margin-bottom: 10px;
  font-size: 28px;
  font-family: "Source Serif 4", serif;
}

h3 {
  margin-bottom: 0;
  font-size: 19px;
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

.primary-btn,
.secondary-btn {
  border-radius: 9px;
  padding: 10px 16px;
  cursor: pointer;
  border: 1px solid transparent;
}

.primary-btn {
  color: white;
  background: var(--primary);
}

.secondary-btn {
  background: white;
  border-color: var(--border);
  color: var(--ink);
}

.hero {
  padding: 30px;
  border-radius: 18px;
  color: white;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: flex;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow);
}

.hero p:not(.eyebrow) {
  max-width: 720px;
  margin-bottom: 0;
  color: rgba(255,255,255,.82);
  line-height: 1.65;
}

.hero-meta {
  min-width: 160px;
  padding-left: 24px;
  border-left: 1px solid rgba(255,255,255,.2);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-meta span {
  color: rgba(255,255,255,.65);
  font-size: 12px;
}

.hero-meta strong {
  margin-top: 6px;
  font-size: 14px;
}

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

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

.metric-card {
  padding: 20px;
  border-radius: 14px;
  border-top-width: 3px;
}

.metric-card.danger { border-top-color: var(--danger); }
.metric-card.success { border-top-color: var(--success); }
.metric-card.warning { border-top-color: var(--warning); }
.metric-card.info { border-top-color: var(--info); }

.metric-label,
.metric-note {
  display: block;
}

.metric-label {
  font-size: 13px;
  color: var(--muted);
}

.metric-value {
  display: block;
  margin: 10px 0 4px;
  font-size: 34px;
  line-height: 1;
}

.metric-note {
  font-size: 12px;
  color: var(--muted);
}

.content-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 18px;
}

.panel {
  border-radius: 16px;
  padding: 22px;
}

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

.text-btn {
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
}

.task-list,
.workflow-list {
  display: grid;
  gap: 12px;
}

.task-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.task-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-weight: 700;
}

.danger-icon { color: var(--danger); background: var(--danger-bg); }
.success-icon { color: var(--success); background: var(--success-bg); }
.warning-icon { color: var(--warning); background: var(--warning-bg); }

.task-copy strong,
.task-copy span {
  display: block;
}

.task-copy strong {
  font-size: 13px;
}

.task-copy span {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
}

.danger-pill { color: var(--danger); background: var(--danger-bg); }
.success-pill { color: var(--success); background: var(--success-bg); }
.warning-pill { color: var(--warning); background: var(--warning-bg); }
.neutral-pill { color: #475467; background: #f2f4f7; }

.workflow-row {
  display: grid;
  grid-template-columns: 150px 1fr 28px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}

.progress {
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: #edf1f5;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.table-panel {
  margin-top: 18px;
}

.search-input {
  width: 220px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: none;
}

.search-input:focus {
  border-color: var(--primary);
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 13px;
}

th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

footer {
  padding: 22px 2px 2px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 1100px) {
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .sidebar {
    position: static;
    width: auto;
    min-height: auto;
  }

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

  .sidebar-footer {
    margin-top: 24px;
  }

  .main {
    margin-left: 0;
    padding: 18px;
  }

  .topbar,
  .hero,
  footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-meta {
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,.2);
    padding: 18px 0 0;
  }

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

  .workflow-row {
    grid-template-columns: 120px 1fr 24px;
  }
}
