:root {
  --bg: #f3f5f2;
  --surface: #ffffff;
  --surface-soft: #f8faf7;
  --text: #18212f;
  --muted: #647082;
  --line: #d8ded5;
  --brand: #184e45;
  --brand-strong: #0f342f;
  --brand-soft: #e6f2ee;
  --accent: #b2452f;
  --accent-soft: #faebe6;
  --ok: #1f7a4d;
  --warn: #936000;
  --risk: #a43b45;
  font-family: "Segoe UI", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: linear-gradient(180deg, #f7f8f3 0%, var(--bg) 46%, #eef3f0 100%);
  color: var(--text);
}

a { color: inherit; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 16px 28px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.brand,
.top-actions,
.toolbar,
.panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-actions { justify-content: flex-end; flex-wrap: wrap; }

.logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
}

h1, h2, h3, h4, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 19px; }
h2 { margin-bottom: 12px; font-size: clamp(28px, 3.4vw, 44px); line-height: 1.12; letter-spacing: 0; max-width: 900px; }
h3 { margin-bottom: 0; font-size: 21px; letter-spacing: 0; }
h4 { margin-bottom: 10px; font-size: 16px; }

.eyebrow {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.demo-badge,
.status,
.link-button {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  background: var(--brand-soft);
  color: var(--brand-strong);
  text-decoration: none;
}

.status.pass { background: #e7f5ec; color: var(--ok); }
.status.needs { background: #fff2d4; color: var(--warn); }

main {
  width: min(1240px, calc(100% - 32px));
  margin: 24px auto 56px;
}

.command-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: stretch;
  padding: 30px 0 18px;
}

.lead {
  max-width: 880px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.status-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-content: start;
}

.status-board div,
.metric-card,
.side-panel,
.panel,
.notice-band {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(24, 33, 47, 0.06);
}

.status-board div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
}

.status-board span,
.metric-card span,
.metric-card em,
.toolbar-note,
.flow-item span,
.issue span,
.stack-list span,
.client-grid span,
.priority-list span,
.safe-box span {
  color: var(--muted);
}

.status-board strong { color: var(--brand); }

.toolbar {
  flex-wrap: wrap;
  padding: 12px;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.button {
  border: 0;
  border-radius: 8px;
  padding: 11px 14px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  font-weight: 800;
  font-size: 14px;
}

.button.ghost { background: var(--accent-soft); color: var(--accent); }
.button.secondary { background: #eef1ec; color: var(--text); }
.toolbar-note { margin-left: auto; font-size: 13px; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.metric-card {
  padding: 18px;
  min-height: 126px;
}

.metric-card strong {
  display: block;
  margin: 8px 0 5px;
  font-size: 28px;
  line-height: 1;
}

.metric-card em {
  display: block;
  font-style: normal;
  font-size: 12px;
  line-height: 1.45;
}

.ops-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.side-panel {
  padding: 18px;
  position: sticky;
  top: 86px;
}

.priority-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 18px 0;
  list-style: none;
}

.priority-list li {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-left: 4px solid var(--brand);
  background: var(--surface-soft);
  border-radius: 6px;
}

.safe-box {
  display: grid;
  gap: 6px;
  padding: 13px;
  background: var(--brand-soft);
  border-radius: 6px;
}

.work-area { min-width: 0; }

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.tab {
  min-width: 82px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  font-weight: 800;
  color: var(--muted);
}

.tab.active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.panel {
  display: none;
  padding: 22px;
  min-height: 460px;
}

.panel.active { display: block; }
.panel-head { justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }

.flow-grid,
.issue-list,
.stack-list,
.client-grid {
  display: grid;
  gap: 10px;
}

.flow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.flow-item,
.issue,
.stack-list div,
.client-grid div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.flow-item { display: grid; gap: 5px; border-left-width: 5px; }
.flow-item.pass { border-left-color: var(--ok); }
.flow-item.warn { border-left-color: var(--warn); }
.flow-item.risk { border-left-color: var(--risk); }

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
}

th,
td {
  padding: 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #eef3ef;
  color: var(--muted);
  font-size: 13px;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.kanban article {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 8px;
  padding: 16px;
}

.notice {
  padding: 13px;
  border-radius: 8px;
  background: #fff2d4;
  color: var(--warn);
  margin-bottom: 14px;
}

.notice-band {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  margin-top: 16px;
  padding: 18px;
}

footer {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 980px) {
  .command-strip,
  .ops-layout,
  .notice-band {
    grid-template-columns: 1fr;
  }

  .side-panel { position: static; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .flow-grid { grid-template-columns: 1fr; }
  .toolbar-note { margin-left: 0; width: 100%; }
}

@media (max-width: 640px) {
  .topbar,
  .brand,
  .top-actions,
  .panel-head,
  .flow-item,
  .issue,
  .stack-list div,
  .client-grid div {
    display: block;
  }

  .top-actions { margin-top: 10px; }
  .demo-badge { margin-top: 8px; }
  h2 { font-size: 28px; }
  .summary-grid { grid-template-columns: 1fr; }
  .toolbar .button { width: 100%; text-align: center; }
  .kanban { grid-template-columns: 1fr; }
  th, td { padding: 11px; }
}

@media print {
  .topbar,
  .toolbar,
  .tabs,
  footer {
    display: none;
  }

  body { background: #fff; }
  main { width: 100%; margin: 0; }
  .panel { display: block !important; min-height: auto; margin-bottom: 12px; }
  .side-panel,
  .panel,
  .metric-card,
  .notice-band {
    box-shadow: none;
  }
}
