@import url('https://fonts.googleapis.com/css2?family=DIN+Condensed:wght@400;700&family=Inter:wght@400;600;700&display=swap');

:root {
  --bg: #0b1220;
  --panel: #111a2b;
  --panel-2: #0f1726;
  --accent: #4cc9ff;
  --accent-2: #6ee7ff;
  --green: #35d07f;
  --red: #ff5c77;
  --yellow: #ffd166;
  --text: #d9e6ff;
  --muted: #7f91b2;
  /* 布局高度控制 */
  --header-h: 64px;
  --top-h: 120px;
  --vpad: 40px; /* main 上下 padding 合计 */
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.page-bg {
  position: fixed; inset: 0; pointer-events: none;
  background-image: radial-gradient(transparent 40%, rgba(255,255,255,0.04) 41%),
                    linear-gradient(135deg, rgba(76,201,255,0.08), rgba(0,0,0,0) 60%),
                    linear-gradient(45deg, rgba(0,180,255,0.08), rgba(0,0,0,0) 65%);
  background-size: 40px 40px, 100% 100%, 100% 100%;
}

.header {
  display: flex; justify-content: space-between; align-items: center;
  height: var(--header-h); padding: 0 24px; border-bottom: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0));
}
.logo {
  font-family: 'DIN Condensed', sans-serif; font-weight: 700; letter-spacing: 2px;
  font-size: 28px; color: #e6f2ff; text-shadow: 0 0 18px rgba(76,201,255,0.4);
}
.header-right {
  color: var(--muted); font-weight: 600;
}

.main { padding: 16px 24px 24px; }

.top-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 16px; height: var(--top-h);
}
.stat-card {
  background: var(--panel); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px;
  padding: 16px 18px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center;
}
.stat-card::after {
  content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px;
  background: radial-gradient(circle at center, rgba(76,201,255,0.25), rgba(76,201,255,0));
}
.stat-title { font-size: 14px; color: var(--muted); }
.stat-value {
  font-family: 'DIN Condensed', sans-serif; font-size: 64px; line-height: 1;
  margin: 10px 0; letter-spacing: 2px; color: #eaffff;
}
.stat-sub { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.stat-sub .up { color: var(--green); }
.stat-sub .down { color: var(--red); }

.grid {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 16px;
  height: calc(100vh - var(--header-h) - var(--top-h) - var(--vpad));
  min-height: 0;
}

.panel { background: var(--panel-2); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; height: 100%; display: flex; flex-direction: column; min-height: 0; }
.panel-head { display: flex; align-items: baseline; gap: 10px; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.panel-title { font-weight: 700; font-size: 16px; }
.panel-sub { color: var(--muted); font-size: 12px; }
.panel-extra { margin-left: auto; color: var(--yellow); font-size: 12px; }

/* 左侧订单卡片 */
.orders {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 14px; overflow: auto; flex: 1; min-height: 0;
}
.order-card {
  background: #0e1a2a; border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; padding: 12px;
}
.order-head { display: flex; justify-content: space-between; align-items: center; }
.order-code { font-weight: 700; }
.order-tag { font-size: 12px; color: white; padding: 2px 8px; border-radius: 999px; }
.tag-red { background: #e84d6e; }
.tag-orange { background: #ff9f43; }
.order-meta { color: var(--muted); font-size: 12px; margin: 6px 0; }
.order-progress {
  height: 8px; border-radius: 6px; background: #0a1424; overflow: hidden; border: 1px solid rgba(255,255,255,0.06);
}
.order-progress-bar {
  height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.order-footer { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--muted); }

/* 中部任务进度 */
.tasks { padding: 10px 14px 16px; overflow: auto; flex: 1; min-height: 0; }
.task-row { display: grid; grid-template-columns: 80px 1fr 80px; align-items: center; gap: 12px; padding: 10px 0; }
.task-name { color: #cfe7ff; }
.task-progress { height: 10px; background: #0a1424; border-radius: 6px; overflow: hidden; border: 1px solid rgba(255,255,255,0.06); }
.task-bar { height: 100%; background: linear-gradient(90deg, #3ddcf0, #1aa7ec); }
.task-rate { text-align: right; color: var(--muted); }

/* 右侧图表 */
.charts { padding: 8px 12px 16px; display: grid; grid-template-rows: repeat(3, 1fr); gap: 12px; flex: 1; min-height: 0; }
.chart-block { background: #0e1a2a; border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; display: flex; flex-direction: column; min-height: 0; }
.chart-block .panel-head { border-bottom: 1px solid rgba(255,255,255,0.06); }
.chart { flex: 1; min-height: 0; }

/* 响应式适配 */
@media (max-width: 1400px) {
  .stat-value { font-size: 52px; }
  .grid { grid-template-columns: 1fr; height: auto; }
}