:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #172026;
  --muted: #5e6a72;
  --line: #dfe5e8;
  --teal: #0f8f8b;
  --green: #4d9d5b;
  --coral: #d9654f;
  --amber: #b88936;
  --graphite: #26333b;
  --shadow: 0 16px 42px rgba(23, 32, 38, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(246, 247, 249, 0.9);
  border-bottom: 1px solid rgba(223, 229, 232, 0.9);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: var(--graphite);
  border-radius: 8px;
  font-weight: 800;
}

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

.brand strong {
  font-size: 16px;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.topnav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topnav a {
  padding: 8px 10px;
  color: var(--muted);
  border-radius: 7px;
  font-size: 14px;
}

.topnav a:hover {
  color: var(--ink);
  background: #eaf0ef;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(22px, 5vw, 68px);
  align-items: center;
  min-height: calc(100vh - 104px);
  padding: 54px 0 40px;
}

.workspace-copy {
  max-width: 680px;
}

.workspace-no-visual {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
  text-align: center;
}

.workspace-no-visual .workspace-copy {
  max-width: 760px;
}

.workspace-no-visual .lead {
  margin-right: auto;
  margin-left: auto;
}

.workspace-no-visual .quick-actions {
  justify-content: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 750;
}

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: 0;
}

.lead {
  max-width: 560px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 18px;
}

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

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
}

.primary-action {
  color: #fff;
  background: var(--graphite);
}

.secondary-action {
  color: var(--graphite);
  border: 1px solid var(--line);
  background: #fff;
}

.workbench {
  position: relative;
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(234, 239, 238, 0.78)),
    repeating-linear-gradient(90deg, rgba(38, 51, 59, 0.05) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(0deg, rgba(38, 51, 59, 0.04) 0 1px, transparent 1px 34px);
  box-shadow: var(--shadow);
}

.sheet {
  position: absolute;
  background: #fff;
  border: 1px solid #cfd8dc;
  border-radius: 6px;
  box-shadow: 0 18px 34px rgba(23, 32, 38, 0.08);
}

.sheet-a {
  right: 10%;
  top: 14%;
  width: 58%;
  height: 38%;
  transform: rotate(-4deg);
}

.sheet-b {
  left: 8%;
  bottom: 11%;
  width: 54%;
  height: 34%;
  transform: rotate(5deg);
  background: #f6efe2;
}

.dieline {
  position: absolute;
  top: 24%;
  right: 17%;
  display: grid;
  grid-template-columns: repeat(2, 72px);
  gap: 12px;
  transform: rotate(-4deg);
}

.dieline span {
  height: 58px;
  border: 2px dashed var(--teal);
  border-radius: 5px;
  background: rgba(15, 143, 139, 0.05);
}

.gauge {
  position: absolute;
  right: 12%;
  bottom: 16%;
  width: 180px;
  height: 92px;
  padding: 18px;
  border: 1px solid rgba(23, 32, 38, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.gauge i {
  display: block;
  height: 8px;
  margin-bottom: 11px;
  border-radius: 99px;
  background: #dfe5e8;
}

.gauge i:nth-child(1) {
  width: 78%;
  background: var(--teal);
}

.gauge i:nth-child(2) {
  width: 52%;
  background: var(--green);
}

.gauge i:nth-child(3) {
  width: 66%;
  background: var(--coral);
}

.swatches {
  position: absolute;
  left: 14%;
  top: 18%;
  display: flex;
  gap: 8px;
  transform: rotate(7deg);
}

.swatches b {
  display: block;
  width: 42px;
  height: 82px;
  border-radius: 5px;
  border: 1px solid rgba(23, 32, 38, 0.1);
}

.swatches b:nth-child(1) {
  background: var(--teal);
}

.swatches b:nth-child(2) {
  background: var(--amber);
}

.swatches b:nth-child(3) {
  background: var(--coral);
}

.swatches b:nth-child(4) {
  background: var(--graphite);
}

.control-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(360px, 1.2fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 28px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.metric {
  padding: 12px;
  border: 1px solid #edf1f3;
  border-radius: 7px;
  background: #fbfcfc;
}

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

.metric strong {
  font-size: 24px;
}

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

.filters {
  display: grid;
  gap: 12px;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.search-wrap span {
  color: var(--muted);
  font-size: 20px;
}

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

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab {
  min-height: 34px;
  padding: 7px 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.tab.is-active {
  color: #fff;
  border-color: var(--graphite);
  background: var(--graphite);
}

.module-section {
  padding: 38px 0 20px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.section-heading p {
  margin-bottom: 12px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.section-heading h2 {
  margin-bottom: 10px;
  font-size: 26px;
}

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

.module-card {
  display: flex;
  min-height: 210px;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 24px rgba(23, 32, 38, 0.04);
}

.module-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.module-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.module-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  border-radius: 8px;
  background: var(--teal);
  font-weight: 850;
}

.module-card[data-category="tools"] .module-icon {
  background: var(--coral);
}

.status {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.status-online {
  color: #12603a;
  background: #e5f5ec;
}

.status-building {
  color: #80510e;
  background: #fff2d7;
}

.status-planned {
  color: #56636b;
  background: #eef2f4;
}

.module-card h3 {
  margin: 0;
  font-size: 18px;
}

.module-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
}

.tag {
  padding: 4px 7px;
  color: var(--muted);
  border: 1px solid #e7ecef;
  border-radius: 6px;
  background: #fbfcfc;
  font-size: 12px;
}

.open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 34px;
  padding: 7px 10px;
  color: var(--graphite);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 800;
}

.module-card:hover .open-link {
  border-color: var(--graphite);
}

.empty {
  grid-column: 1 / -1;
  padding: 22px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  width: min(1180px, calc(100% - 32px));
  margin: 30px auto 0;
  padding: 22px 0 36px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 13px;
}

@media (max-width: 920px) {
  .workspace,
  .control-panel {
    grid-template-columns: 1fr;
  }

  .workspace {
    min-height: auto;
    padding-top: 34px;
  }

  .workbench {
    min-height: 320px;
  }

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

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topnav {
    width: 100%;
    justify-content: flex-start;
  }

  h1 {
    font-size: 34px;
  }

  .lead {
    font-size: 16px;
  }

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

  .footer {
    flex-direction: column;
  }
}
