/* Apple高级风格样式 */
:root{
  --bg: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  --text:#1d1d1f;
  --muted:#86868b;
  --primary:#007aff;
  --card: rgba(255,255,255,0.9);
  --border: rgba(255,255,255,0.2);
}

html,body{
  margin:0;padding:0;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  background-attachment: fixed;
  color:var(--text);
  font:14px/1.5 -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","WenQuanYi Micro Hei",sans-serif;
  min-height:100vh;
}

.container{max-width:1440px;margin:0 auto;padding:16px}

.h1{font-size:22px;font-weight:600;margin:0 0 16px;color:#1d1d1f}

/* Apple高级风格顶部标题 */
.header-card{
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  padding: 20px 20px;
  margin-bottom: 8px;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.08),
    0 1px 0 rgba(255,255,255,0.5) inset,
    0 -1px 0 rgba(0,0,0,0.05) inset;
  position: relative;
  overflow: hidden;
}

.header-card::before{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
}

.header-content{
  text-align: center;
  position: relative;
  z-index: 1;
}

.header-title{
  font-size: 26px;
  font-weight: 700;
  background: linear-gradient(135deg, #1d1d1f 0%, #424245 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

/* 删除副标题，不再显示 */
.header-subtitle{display:none}

.header-description{
  font-size: 14px;
  color: #86868b;
  margin: 16px auto 0;
  max-width: 600px;
  line-height: 1.5;
  font-weight: 400;
}

.card{
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius:16px;
  padding:20px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  backdrop-filter: blur(10px);
}
.grid{display:grid;gap:12px}
.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.label{display:block;font-size:12px;color:var(--muted);margin-bottom:8px;font-weight:500}
.input{
  width:100%;
  border:1px solid rgba(0,0,0,0.1);
  border-radius:10px;
  padding:10px 12px;
  margin-top:4px;
  box-sizing:border-box;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
  font-size:14px;
}
.input:focus{
  outline:none;
  border-color:#007aff;
  box-shadow: 0 0 0 3px rgba(0,122,255,0.1);
  background: rgba(255,255,255,0.95);
}
.btn{
  border:0;
  background: linear-gradient(135deg, #007aff 0%, #0051d5 100%);
  color:#fff;
  border-radius:12px;
  padding:12px 16px;
  cursor:pointer;
  font-weight:600;
  font-size:14px;
  box-shadow: 0 2px 8px rgba(0,122,255,0.3);
  transition: all 0.2s ease;
}
.btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,122,255,0.4);
}
.btn.secondary{
  background: rgba(255,255,255,0.9);
  color:var(--text);
  border:1px solid rgba(0,0,0,0.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  backdrop-filter: blur(10px);
}
.btn-compact{
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 10px;
}
.small{font-size:12px;color:var(--muted)}
.flex{display:flex}
.items-end{align-items:end}
.mt-8{margin-top:8px}
.mt-12{margin-top:12px}
.mt-16{margin-top:16px}
.rounded{border-radius:10px}
.text-sm{font-size:12px}
.table{
  width:100%;
  border-collapse:collapse;
  background: rgba(255,255,255,0.6);
  border-radius:12px;
  overflow:hidden;
  backdrop-filter: blur(10px);
}
.table th,.table td{
  border-bottom:1px solid rgba(0,0,0,0.05);
  padding:12px 16px;
  text-align:left;
  font-size:13px;
}
.table th{
  background: rgba(0,0,0,0.02);
  font-weight:600;
  color:#1d1d1f;
}
.badge{
  font-size:11px;
  background: linear-gradient(135deg, #1d1d1f 0%, #48484a 100%);
  color:#fff;
  border-radius:8px;
  padding:4px 8px;
  font-weight:500;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
/* 玻璃拟态轻描 */
.glass{backdrop-filter: blur(6px); background: rgba(255,255,255,0.5)}
.modal{position:fixed;inset:0;display:none;align-items:center;justify-content:center;background:rgba(0,0,0,.35);z-index:1000}
.modal.show{display:flex}
.modal .card{background:white;border-radius:10px;padding:16px;box-shadow:0 4px 12px rgba(0,0,0,.15)}
::-webkit-scrollbar{width:0;height:0}


/* 工艺流程图样式 */
.process-flow{display:flex;flex-direction:column;gap:16px;align-items:center;width:100%;min-width:fit-content}
.flow-row{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;flex-wrap:nowrap;overflow-x:auto;min-width:fit-content;padding:8px 0}
/* Apple风格流程图 */
.flow-inlet,.flow-outlet{
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #1d1d1f;
  min-width: 80px;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}

.flow-stage{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:200px;flex-shrink:0}

.flow-parallel{
  display:flex;flex-direction:column;gap:6px;align-items:center;
  border:1px dashed rgba(0,0,0,0.2);border-radius:12px;padding:12px;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(10px);
  width:100%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.flow-unit{
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 12px;
  padding: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #1d1d1f;
  width: 100%;
  text-align: center;
  position: relative;
  min-height: 120px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.flow-unit:hover{
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.flow-unit canvas{width:100%;height:100px;margin-top:4px;border-radius:8px}
.flow-unit .unit-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px;font-size:11px}
.flow-unit .badge{font-size:9px;padding:2px 4px;white-space:nowrap}
.flow-arrow{color:#86868b;font-size:18px;font-weight:300;margin:0 8px;flex-shrink:0}
.flow-info{font-size:11px;color:var(--muted);text-align:center;min-width:180px;padding:4px}
.badge[data-open-modal]{cursor:pointer}

/* 设备顺序配置样式 */
.equipment-order-list{
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  padding: 4px;
}

.equipment-order-item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  cursor: move;
  transition: all 0.2s ease;
  user-select: none;
}

.equipment-order-item:hover{
  background: rgba(255,255,255,0.95);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.equipment-order-item.dragging{
  opacity: 0.5;
  transform: rotate(2deg);
}

.equipment-order-item .drag-handle{
  color: var(--muted);
  font-size: 14px;
  margin-right: 8px;
}

.equipment-order-item .equipment-name{
  flex: 1;
  font-size: 13px;
  font-weight: 500;
}

.equipment-order-item .equipment-count{
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 768px) {
  .container{padding:12px}
  .flow-row{flex-direction:column;gap:8px;overflow-x:visible}
  .flow-arrow{transform:rotate(90deg)}
  .flow-stage{min-width:160px}

  /* 移动端标题优化 */
  .header-card{
    padding: 24px 20px;
    border-radius: 16px;
  }

  .header-title{
    font-size: 28px;
    letter-spacing: -0.3px;
  }

  .header-description{
    font-size: 13px;
    margin-top: 12px;
  }
}

@media (max-width: 1200px) {
  .flow-row{justify-content:flex-start;padding-left:16px}
}
