@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,650;9..144,800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --ink: #141414;
  --paper: #faf7f0;
  --paper-2: #f0eadf;
  --line: rgba(20, 20, 20, 0.14);
  --muted: rgba(20, 20, 20, 0.62);
  --violet: #7c3aed;
  --green: #10b981;
  --amber: #d97706;
  --red: #dc2626;
  --white: #fffdf8;
  --shadow: 0 18px 50px rgba(20, 20, 20, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(20, 20, 20, 0.035) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(0deg, rgba(20, 20, 20, 0.035) 1px, transparent 1px) 0 0 / 34px 34px,
    var(--paper);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.command-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto minmax(260px, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 76px;
  padding: 14px 22px;
  border-bottom: 2px solid var(--ink);
  background: rgba(250, 247, 240, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand img {
  flex: 0 0 auto;
}

.brand span {
  display: grid;
  min-width: 0;
}

.brand strong {
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 0.95;
}

.brand small,
.mono,
.eyebrow {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.view-tabs,
.segmented {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  background: var(--white);
}

.tab,
.segment {
  min-height: 34px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-weight: 700;
}

.tab.is-active,
.segment.is-active {
  background: var(--ink);
  color: var(--paper);
}

.bar-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.search {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  width: min(360px, 100%);
  border: 1px solid var(--line);
  background: var(--white);
  padding: 8px 10px;
}

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

.search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.icon-button,
.ghost-action,
.primary-action,
.text-action {
  border: 1px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  min-height: 36px;
  padding: 0 13px;
  font-weight: 800;
}

.icon-button {
  width: 40px;
  padding: 0;
  font-size: 20px;
}

.primary-action {
  background: var(--violet);
  color: white;
  border-color: var(--violet);
}

.text-action {
  min-height: 28px;
  border-color: var(--line);
  padding: 0 8px;
  font-size: 12px;
}

.workspace {
  width: min(1720px, 100%);
  margin: 0 auto;
  padding: 24px 22px 18px;
}

.workspace-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.workspace-head h1 {
  margin: 3px 0 0;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(31px, 5vw, 76px);
  line-height: 0.94;
}

.sync-status {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: var(--white);
  margin-bottom: 18px;
}

.metric {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.metric:last-child {
  border-right: 0;
}

.metric span,
.metric small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin: 7px 0 4px;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1;
}

.view {
  display: none;
}

.view.is-visible {
  display: block;
  animation: rise 180ms ease-out;
}

.board-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
  gap: 18px;
  align-items: start;
}

.resource-board,
.inspector,
.chart-panel,
.import-panel,
.import-log,
.public-board {
  background: rgba(255, 253, 248, 0.82);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.section-head,
.inspector-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.section-head h2,
.chart-panel h2,
.import-panel h2 {
  margin: 3px 0 0;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1;
}

.workflow-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 520px;
}

.workflow-column {
  min-width: 0;
  border-right: 1px solid var(--line);
}

.workflow-column:last-child {
  border-right: 0;
}

.workflow-column header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
  font-weight: 800;
}

.workflow-column header span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.workflow-column header strong {
  color: var(--violet);
}

.column-stack {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.asset-card {
  display: grid;
  gap: 8px;
  width: 100%;
  min-height: 154px;
  text-align: left;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  background: var(--white);
  padding: 13px;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.asset-card:hover,
.asset-card.is-selected {
  transform: translateY(-2px);
  border-color: var(--ink);
  box-shadow: 0 12px 28px rgba(20, 20, 20, 0.12);
}

.asset-card.status-warning {
  border-left-color: var(--amber);
}

.asset-card.status-blocked {
  border-left-color: var(--red);
}

.asset-card.status-idle {
  border-left-color: var(--muted);
}

.asset-kicker,
.asset-card span,
.asset-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.asset-card strong {
  font-size: 17px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.asset-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.asset-stats span {
  display: block;
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 6px;
  color: var(--ink);
  font-weight: 800;
}

.empty-column {
  margin: 0;
  min-height: 120px;
  color: var(--muted);
  font-size: 13px;
}

.inspector {
  position: sticky;
  top: 94px;
}

.inspector-panel {
  padding: 16px;
}

.selected-title {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.selected-title h3 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 28px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.selected-title p,
.recommendation p,
.inspector-section p,
.import-panel p,
.alert-item p,
.public-item p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.status-dot {
  width: 12px;
  height: 12px;
  margin-top: 7px;
  border-radius: 999px;
  background: var(--green);
}

.status-dot.status-warning {
  background: var(--amber);
}

.status-dot.status-blocked {
  background: var(--red);
}

.status-dot.status-idle {
  background: var(--muted);
}

.compact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 0;
  background: var(--line);
}

.compact-grid div {
  background: var(--paper);
  padding: 12px;
}

.compact-grid dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.compact-grid dd {
  margin: 5px 0 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 28px;
  font-weight: 800;
}

.recommendation {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: 14px;
  margin-bottom: 16px;
}

.recommendation span {
  color: rgba(250, 247, 240, 0.68);
  font-size: 12px;
  font-weight: 800;
}

.recommendation p {
  color: var(--paper);
}

.inspector-section {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.inspector-section h4 {
  margin: 0 0 10px;
}

.mini-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  margin: 8px 0;
}

.mini-row p {
  margin: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  padding: 0 8px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.pill.high,
.pill.fail {
  background: #ffe4e6;
  border-color: rgba(220, 38, 38, 0.32);
  color: #9f1239;
}

.pill.medium,
.pill.attention {
  background: #fef3c7;
  border-color: rgba(217, 119, 6, 0.3);
  color: #92400e;
}

.pill.low,
.pill.pass {
  background: #d1fae5;
  border-color: rgba(16, 185, 129, 0.35);
  color: #065f46;
}

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

.analytics-layout,
.import-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
}

.chart-panel,
.import-panel,
.import-log {
  padding: 18px;
}

.stage-chart,
.alert-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(140px, 1.2fr) 72px;
  gap: 14px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.chart-row span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.bar-track {
  height: 14px;
  border: 1px solid var(--line);
  background: var(--paper-2);
}

.bar-track span {
  display: block;
  height: 100%;
  margin: 0;
  background: linear-gradient(90deg, var(--green), var(--violet));
}

.alert-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.import-panel {
  min-height: 280px;
}

.import-panel p {
  max-width: 560px;
}

.import-log {
  min-height: 180px;
}

.public-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.public-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  background: var(--white);
  padding: 16px;
  border-left: 5px solid var(--green);
}

.public-item.status-warning {
  border-left-color: var(--amber);
}

.public-item.status-blocked {
  border-left-color: var(--red);
}

.public-item h3 {
  margin: 3px 0 0;
  font-family: Fraunces, Georgia, serif;
  line-height: 1;
  overflow-wrap: anywhere;
}

.public-progress {
  flex: 0 0 142px;
  display: grid;
  align-content: center;
  text-align: right;
}

.public-progress strong {
  font-family: Fraunces, Georgia, serif;
  font-size: 32px;
}

.public-progress span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.event-stream {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border-top: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: 12px 22px;
}

.event-title {
  display: grid;
}

.event-title .mono {
  color: rgba(250, 247, 240, 0.58);
}

.event-ticker {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.event-chip {
  flex: 0 0 auto;
  max-width: min(460px, 78vw);
  border: 1px solid rgba(250, 247, 240, 0.18);
  background: rgba(250, 247, 240, 0.08);
  padding: 8px 10px;
  color: rgba(250, 247, 240, 0.86);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-chip b {
  margin-right: 6px;
  color: var(--paper);
}

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

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1120px) {
  .command-bar {
    grid-template-columns: 1fr;
  }

  .bar-actions {
    justify-content: stretch;
  }

  .search {
    width: 100%;
  }

  .metric-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .board-layout,
  .analytics-layout,
  .import-layout {
    grid-template-columns: 1fr;
  }

  .inspector {
    position: static;
  }
}

@media (max-width: 820px) {
  .workspace {
    padding: 16px 12px 14px;
  }

  .command-bar {
    padding: 12px;
  }

  .view-tabs {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .workspace-head {
    display: grid;
    align-items: start;
  }

  .metric-strip,
  .workflow-columns,
  .public-list {
    grid-template-columns: 1fr;
  }

  .metric,
  .workflow-column {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .section-head {
    display: grid;
  }

  .segmented {
    overflow-x: auto;
  }

  .chart-row,
  .mini-row {
    grid-template-columns: 1fr;
  }

  .public-item {
    display: grid;
  }

  .public-progress {
    text-align: left;
  }

  .event-stream {
    grid-template-columns: 1fr;
  }
}

