:root {
  --page-bg: #ffffff;
  --card: #edf3f8;
  --title-bar: #6e4b2a;
  --title-text: #fff4e7;
  --line: #b7c4d0;
  --text: #1c2837;
  --row-light: #eef3f7;
  --row-dark: #d9e3ec;
  --steel: #5f7389;
  --steel-dark: #32414f;
  --panel-inner: #ced9e3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--page-bg);
  color: var(--text);
}

.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 30px;
  min-height: 100vh;
  min-height: 100dvh;
}

.top-bar {
  margin-bottom: 22px;
  padding: 14px 24px 20px;
  border: 1px solid #9eb0c2;
  border-radius: 18px;
  background: linear-gradient(180deg, #f6f9fd 0%, #e4edf6 100%);
  box-shadow: inset 0 0 0 2px #f9fcff, inset 0 0 0 3px #d8e3ec, 0 8px 22px rgba(16, 30, 45, 0.08);
}

.top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.status-lights {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #9eb0c2;
  border-radius: 999px;
  background: #ecf2f8;
}

.light {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.35), 0 0 5px rgba(0, 0, 0, 0.12);
}

.light.green {
  background: #31cf64;
}

.light.yellow {
  background: #f0c246;
}

.light.red {
  background: #db4d4d;
}

.meta-right {
  display: flex;
  gap: 18px;
  align-items: center;
  color: #2f4357;
  font-size: 15px;
}

.meta-right strong {
  color: #0f2941;
}

.meta-kpi strong {
  font-weight: 700;
  color: #0d2742;
  letter-spacing: 0.02em;
}

.main-title {
  margin: 0;
  padding: 12px 16px;
  font-size: clamp(34px, 3.8vw, 66px);
  letter-spacing: 4px;
  text-align: center;
  font-weight: 900;
  color: #0d2742;
  text-shadow: 0 1px 0 #ffffff;
  border: 2px solid #a7bacd;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #edf3f8 100%);
  box-shadow: inset 0 0 0 2px #ffffff;
}

.top-bar p {
  display: none;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(230px, 300px) 1fr;
  gap: 18px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid #9eb0c2;
  border-radius: 16px;
  background: linear-gradient(180deg, #f9fbfd 0%, #e8eef5 100%);
  box-shadow: inset 0 0 0 2px #ffffff, 0 10px 28px rgba(23, 37, 53, 0.07);
}

.machine-side {
  border: 1px solid #8ea1b4;
  border-radius: 14px;
  background: linear-gradient(180deg, #f3f7fb 0%, #dde7f1 100%);
  box-shadow: inset 0 0 0 2px var(--panel-inner), inset 0 0 0 4px #f5f9fc,
    0 8px 24px rgba(23, 37, 53, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  position: relative;
}

.machine-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: contrast(1.04) saturate(0.88);
}

.three-columns {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 20px;
  align-items: stretch;
  min-width: 0;
}

.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
  min-height: 0;
}

.process-panel {
  height: 100%;
  min-height: 0;
}

.panel {
  border: 1px solid #7a8fa3;
  border-radius: 14px;
  background: var(--card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 10px 26px rgba(23, 37, 53, 0.09);
  overflow: hidden;
  position: relative;
}

.panel::before,
.machine-side::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid #b2bfcc;
  border-radius: 10px;
  pointer-events: none;
}

.panel::after,
.machine-side::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 12px 12px, var(--steel-dark) 2.1px, transparent 2.2px),
    radial-gradient(circle at calc(100% - 12px) 12px, var(--steel-dark) 2.1px, transparent 2.2px),
    radial-gradient(circle at 12px calc(100% - 12px), var(--steel-dark) 2.1px, transparent 2.2px),
    radial-gradient(circle at calc(100% - 12px) calc(100% - 12px), var(--steel-dark) 2.1px, transparent 2.2px);
}

.panel h3 {
  margin: 0;
  padding: 12px 14px;
  font-size: 24px;
  color: var(--title-text);
  background: linear-gradient(180deg, #7e5a38 0%, var(--title-bar) 40%, #5a3a1f 100%);
  border-bottom: 1px solid #4a2f18;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  letter-spacing: 1px;
  text-align: center;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #a8b6c4;
}

td {
  padding: 12px 10px;
  font-size: clamp(18px, 1.45vw, 30px);
  border-bottom: 1px solid var(--line);
  background: var(--row-light);
}

tbody tr:nth-child(even) td {
  background: var(--row-dark);
}

td:first-child {
  color: #203244;
  width: 46%;
  border-right: 1px solid #b0bec9;
}

td:last-child {
  color: #0f1f32;
  font-weight: 600;
  min-width: 130px;
}

tr:last-child td {
  border-bottom: none;
}

@media (max-width: 1120px) {
  .top-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .meta-right {
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .machine-side {
    max-height: 360px;
  }

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

  .stats-row {
    grid-template-columns: 1fr;
  }
}
