:root {
  --green: #19be6b;
  --blue: #2d8cf0;
  --red: #ed4014;
  --orange: #ff9900;
  --gray: #909399;
  --bg: #f5f7fa;
  --text: #2c3e50;
  --border: #e6e8ed;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.4 "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  padding-bottom: 72px;
}

.app {
  padding: 16px;
}


.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
  background-image: linear-gradient(180deg, #ffffff, #f7f9fc);
}

.header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid #dfe3e8;
  background: linear-gradient(180deg, #fafbfc, #f3f5f7);
  color: #374151;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  transition: .2s ease;
}

.chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .08);
  background: linear-gradient(180deg, #ffffff, #f6f8fa);
}

.chip.primary {
  background: linear-gradient(180deg, #eaf7f1, #def3e9);
  border-color: var(--green);
  color: #0f9b54;
  box-shadow: 0 4px 10px rgba(25, 190, 107, .12);
}

.chip .count {
  background: #fff;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid #e6e8ed;
  font-weight: 600;
  color: #303133;
}

.spacer {
  flex: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: #fff;
  color: #303133;
  cursor: pointer;
}

.btn.green {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(245,247,250,.8), rgba(255,255,255,.8));
  backdrop-filter: saturate(1.2) blur(6px);
}

.search {
  margin-left: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.search::before {
  content: "🔍";
  position: absolute;
  left: 12px;
  color: #909399;
  font-size: 14px;
}

.search input {
  width: 300px;
  padding: 10px 36px 10px 32px;
  border: 1px solid #dfe3e8;
  border-radius: 24px;
  background: #fff;
  outline: none;
  transition: .2s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .03);
}

.search input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(45, 140, 240, .15);
}

/* override for rounded button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #fff;
  color: #303133;
  cursor: pointer;
  transition: .2s ease;
}

.btn:hover {
  box-shadow: 0 6px 16px rgba(45, 140, 240, .18);
  transform: translateY(-1px);
  background-image: linear-gradient(180deg, #ffffff, #f6f8fa);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, #f7f9fc, #eef3f8);
  font-weight: 700;
  font-size: 16px;
  color: #303133;
  border-bottom: 1px solid var(--border);
  padding: 12px;
  backdrop-filter: saturate(1.1);
}

tbody td {
  border-bottom: 1px solid #eceff3;
  padding: 14px 12px;
  vertical-align: middle;
}

tbody tr {
  transition: background .2s ease, box-shadow .2s ease;
}

tbody tr:nth-child(odd) {
  background: linear-gradient(180deg, #fcfdff, #f5f7fb);
}

tbody tr:hover {
  background: linear-gradient(180deg, #f6f9ff, #eef5ff);
  box-shadow: 0 0 0 1px rgba(45, 140, 240, .12), 0 8px 20px rgba(45, 140, 240, .12);
}

.no {
  color: #2d8cf0;
  text-decoration: none;
}

.no:hover {
  color: #1e6bd6;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  transition: .2s ease;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}

.badge.gray {
  background: linear-gradient(180deg, #eceff3, #e6eaef);
  color: #5f6b7a;
}

.badge.blue {
  background: linear-gradient(180deg, #e6f0ff, #dce9ff);
  color: #2d8cf0;
  box-shadow: 0 0 0 1px rgba(45, 140, 240, .15) inset;
}

.badge.green {
  background: linear-gradient(180deg, #eaf7f1, #def3e9);
  color: #19be6b;
  box-shadow: 0 0 0 1px rgba(25, 190, 107, .18) inset;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 12px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}

.tag.green {
  background: #e9f8f0;
  color: #0f9b54;
}

.tag.red {
  background: #ffecec;
  color: #c0392b;
}

.tag.orange {
  background: #fff4e6;
  color: #b36b00;
}

.due-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: inherit;
  border: 1px solid #e6e8ed;
}

.due-green {
  background: #eaf7f1;
  border-color: #ccead8;
}

.due-yellow {
  background: #fff8e1;
  border-color: #f5d481;
}

.due-red {
  background: #ffecec;
  border-color: #f2b8b8;
}

.progress-steps {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  position: relative;
}

.step[data-type]::after {
  content: attr(data-type);
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  border: 1px solid #e6e8ed;
}

.step[data-type="自制"]::after {
  background: linear-gradient(180deg, #eaf7f1, #def3e9);
  border-color: #ccead8;
  color: #0f9b54;
}

.step[data-type="委外"]::after {
  background: linear-gradient(180deg, #fff4e6, #ffe9cc);
  border-color: #f5d481;
  color: #b36b00;
}

.circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #dcdfe6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #606266;
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, .03);
}

.circle.complete {
  border-color: var(--green);
  color: var(--green);
  box-shadow: 0 0 8px rgba(25, 190, 107, .25), inset 0 0 8px rgba(0, 0, 0, .03);
}

.circle.blue {
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: 0 0 8px rgba(45, 140, 240, .25), inset 0 0 8px rgba(0, 0, 0, .03);
}

.thumbs {
  display: flex;
  gap: 8px;
}

.thumb {
  width: 52px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background-image: linear-gradient(180deg, #f8fafc, #eef3f8),
    repeating-linear-gradient(90deg, rgba(45, 140, 240, .06), rgba(45, 140, 240, .06) 1px, transparent 1px, transparent 6px);
  background-blend-mode: multiply;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .03);
  transition: .2s ease;
}

.thumb:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(45, 140, 240, .18);
}

.ops a {
  margin-right: 8px;
  color: #2d8cf0;
  text-decoration: none;
}

.kkey {
  color: #606266;
}

.nowrap {
  white-space: nowrap;
}

/* removed 序号列样式 */

.popover {
  position: fixed;
  z-index: 10000;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  padding: 12px;
  display: none;
  max-height: 60vh;
  overflow: auto;
  transform: translateZ(0);
  will-change: transform, opacity;
}

.popover .content > div {
  margin: 4px 0;
}

.popover .content { max-height: 60vh; overflow: auto; }

.popover.bottom .arrow {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #fff;
  filter: drop-shadow(0 -1px 0 var(--border));
}

.popover.top .arrow {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #fff;
  filter: drop-shadow(0 -1px 0 var(--border));
}

.popover.due-green {
  background: #e9f8f0;
}

.popover.due-yellow {
  background: #fff8e1;
}

.popover.due-red {
  background: #ffecec;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal .backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .35);
}

.modal .dialog {
  position: relative;
  width: 860px;
  max-width: 92vw;
  max-height: 88vh;
  overflow: auto;
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  border-radius: 10px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, .25);
  border: 1px solid var(--border);
}

.modal .dialog .hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(245,247,250,.8), rgba(255,255,255,.8));
  backdrop-filter: saturate(1.2) blur(6px);
  position: sticky;
  top: 0;
  z-index: 1;
}

.modal .dialog .bd {
  padding: 16px 18px;
}

.modal .close {
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  color: #606266;
}

.modal .dialog.due-green {
  background: #e9f8f0;
}

.modal .dialog.due-yellow {
  background: #fff8e1;
}

.modal .dialog.due-red {
  background: #ffecec;
}

.work-orders th,
.work-orders td {
  text-align: center;
}

.work-orders {
  background: linear-gradient(180deg, #ffffff, #fafbff);
}

.work-orders tbody {
  font-size: 1.2em;
}

.work-orders tbody tr td:first-child {
  border-left: 3px solid transparent;
}

.work-orders tbody tr:hover td:first-child {
  border-left-color: var(--blue);
}

.work-orders th:nth-child(11),
.work-orders td:nth-child(11) {
  display: none;
}

.content {
  padding: 8px 16px;
}

.panel-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.section-title {
  color: var(--blue);
  margin: 8px 0 6px 0;
  position: relative;
  padding-left: 10px;
}
.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, #2d8cf0, #19be6b);
}

.kv {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 30px;
  gap: 8px;
}

.kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 8px 0 12px 0;
}

.kv-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  box-shadow: 0 6px 16px rgba(0,0,0,.06);
  position: relative;
}

.kv-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
  background: linear-gradient(180deg, #2d8cf0, #19be6b);
}

.kv-label {
  color: #606266;
  font-size: 12px;
}

.kv-value {
  color: #303133;
  font-size: 16px;
  font-weight: 600;
}

.order-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid #e6e8ed;
}

.order-status.urgent {
  background: #ffecec;
  color: var(--red);
  border-color: #f2b8b8;
}

.order-status.normal {
  background: #e9f8f0;
  color: #0f9b54;
  border-color: #ccead8;
}
.pagination {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -10px 20px rgba(0,0,0,.06);
  padding: 10px 16px;
}

.pagination .page-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pagination .pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.pagination select,
.pagination input[type="number"] {
  height: 32px;
  border: 1px solid #dfe3e8;
  border-radius: 6px;
  padding: 0 10px;
  outline: none;
}

.pagination input[type="number"] {
  width: 80px;
}
