:root {
  --page-bg: #f3f4f0;
  --page-surface: rgba(255, 255, 255, 0.92);
  --page-surface-soft: rgba(248, 249, 245, 0.82);
  --page-surface-strong: #ffffff;
  --panel-border: rgba(107, 118, 128, 0.18);
  --panel-border-strong: rgba(75, 87, 96, 0.2);
  --text-main: #14181c;
  --text-muted: #6f7880;
  --text-soft: #404850;
  --accent: #6f7d8a;
  --accent-rgb: 111, 125, 138;
  --profit-green: #17824b;
  --profit-green-soft: #2d9a62;
  --shadow-soft: 0 24px 60px rgba(23, 31, 38, 0.07);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(177, 188, 199, 0.16), transparent 24%),
    radial-gradient(circle at top right, rgba(223, 227, 233, 0.9), transparent 26%),
    linear-gradient(180deg, #fbfbf8 0%, var(--page-bg) 46%, #eff1ec 100%);
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select {
  font: inherit;
}

.page-shell {
  width: min(1240px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 0 26px;
}

.brand-mark {
  color: var(--text-main);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.topbar-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.route-current,
.route-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13px;
  letter-spacing: 0.02em;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.route-current {
  border-color: var(--panel-border);
  background: rgba(255, 255, 255, 0.74);
  color: var(--text-main);
}

.route-link {
  color: var(--text-muted);
}

.route-link:hover {
  border-color: rgba(107, 118, 128, 0.14);
  background: rgba(255, 255, 255, 0.54);
  color: var(--text-main);
}

.hero-shell {
  padding: 26px 0 22px;
  border-top: 1px solid rgba(107, 118, 128, 0.12);
  border-bottom: 1px solid rgba(107, 118, 128, 0.12);
}

.hero-copy-block {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.95;
  letter-spacing: -0.065em;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.primary-button {
  background: #171c20;
  color: #f6f7f4;
  box-shadow: 0 10px 24px rgba(23, 28, 32, 0.12);
}

.primary-button:hover {
  transform: translateY(-1px);
  background: #20272d;
}

.secondary-button {
  border-color: var(--panel-border);
  background: rgba(255, 255, 255, 0.76);
  color: var(--text-main);
}

.secondary-button:hover {
  border-color: var(--panel-border-strong);
  background: #ffffff;
}

.empty-state {
  padding: 24px;
  border-radius: 28px;
  border: 1px dashed rgba(107, 118, 128, 0.24);
  background: rgba(255, 255, 255, 0.58);
  color: var(--text-muted);
}

.status-copy {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.catalog-meta-row {
  display: flex;
  justify-content: flex-end;
  padding: 18px 0 8px;
}

.catalog-table-head {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.35fr) minmax(180px, 0.9fr) minmax(140px, auto);
  gap: 24px;
  align-items: end;
  padding: 0 0 12px;
  border-bottom: 1px solid rgba(107, 118, 128, 0.12);
}

.catalog-head-cell {
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.catalog-head-cell.is-profit {
  text-align: right;
}

.status-copy[data-tone="error"] {
  color: #9e4f4a;
}

.workspace-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), 0.36);
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100vw - 28px, 100%);
    padding: 20px 0 36px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 20px;
  }

  .topbar-links {
    justify-content: flex-start;
  }

  .hero-shell {
    padding: 18px 0 22px;
  }

  .catalog-meta-row {
    justify-content: flex-start;
  }

  .catalog-table-head {
    display: none;
  }

  .workspace-modal-actions {
    width: 100%;
  }

  .workspace-modal-actions .primary-button,
  .workspace-modal-actions .secondary-button {
    flex: 1 1 180px;
  }
}
