/* 工程算量 · Engineering quantity takeoff */
.eng-page {
  --eng-navy: #06172b;
  --eng-navy-2: #0d355b;
  --eng-blue: #2563eb;
  --eng-ink: #10243a;
  --eng-muted: #73879c;
  --eng-line: #e1eaf3;
  --eng-soft: #f4f8fc;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 28px;
}

.eng-hero {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 24px 26px;
  color: #fff;
  background:
    radial-gradient(circle at 92% 0%, rgba(96, 165, 250, .18), transparent 34%),
    linear-gradient(135deg, var(--eng-navy), var(--eng-navy-2));
  border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: 0 18px 44px rgba(6, 23, 43, .15);
}
.eng-hero::after {
  content: '';
  position: absolute;
  right: -48px;
  bottom: -84px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .09);
}
.eng-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.eng-eyebrow {
  display: flex; align-items: center; gap: 7px;
  color: #60a5fa; font-size: 9px; font-weight: 600;
  letter-spacing: 2.2px; text-transform: uppercase;
}
.eng-eyebrow::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: #60a5fa; box-shadow: 0 0 0 4px rgba(96, 165, 250, .12);
}
.eng-title {
  margin: 14px 0 0;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.2;
}
.eng-sub {
  margin: 8px 0 0;
  max-width: 660px;
  color: #a6c1d9;
  font-size: 12px;
  line-height: 1.7;
}
.eng-hero-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.eng-hero .btn { border-radius: 10px; }
.eng-hero .btn-primary {
  background: #fff;
  color: var(--eng-navy);
  border-color: #fff;
}
.eng-hero .btn-secondary {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .16);
  color: #dbeafe;
}
.eng-hero .btn-secondary:hover { background: rgba(255, 255, 255, .13); }

.eng-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
  position: relative;
  z-index: 1;
}
.eng-metric {
  padding: 13px 14px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .065);
  border: 1px solid rgba(255, 255, 255, .09);
  backdrop-filter: blur(10px);
}
.eng-metric-label { color: #7e9ab7; font-size: 9.5px; }
.eng-metric-value {
  margin-top: 5px;
  color: #fff;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -.6px;
  line-height: 1.1;
}
.eng-metric-value small { color: #9db7d1; font-size: 10px; font-weight: 500; margin-left: 3px; }

.eng-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.eng-search {
  position: relative;
  flex: 1;
  min-width: 220px;
}
.eng-search svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: #8aa0b5;
}
.eng-search input {
  width: 100%;
  height: 41px;
  border: 1px solid var(--eng-line);
  background: #fff;
  border-radius: 11px;
  padding: 0 13px 0 35px;
  color: var(--eng-ink);
  font: inherit;
  font-size: 12px;
  outline: none;
  box-sizing: border-box;
}
.eng-search input:focus { border-color: #a9c8ee; box-shadow: 0 0 0 3px rgba(37, 99, 235, .07); }
.eng-filter {
  height: 41px;
  border: 1px solid var(--eng-line);
  background: #fff;
  color: var(--eng-muted);
  border-radius: 11px;
  padding: 0 12px;
  font: inherit;
  font-size: 12px;
  outline: none;
}

.eng-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 12px;
}
.eng-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--eng-line);
  border-radius: 16px;
  padding: 17px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  overflow: hidden;
}
.eng-card::before {
  content: '';
  position: absolute; top: 0; left: 0; width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--eng-blue), #60a5fa);
  opacity: .75;
}
.eng-card:hover {
  transform: translateY(-2px);
  border-color: #c8dcf2;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .08);
}
.eng-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.eng-code {
  font-size: 9.5px; color: #8aa0b5; letter-spacing: .7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.eng-status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 8px; border-radius: 6px;
  font-size: 9.5px; font-weight: 600;
  background: #eef5ff; color: var(--eng-blue);
  white-space: nowrap;
}
.eng-status::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.eng-status.archived { background: #f1f5f9; color: #64748b; }
.eng-card-title {
  margin: 12px 0 5px;
  font-size: 16px; font-weight: 700; color: var(--eng-ink);
  line-height: 1.45; letter-spacing: -.25px;
}
.eng-card-meta {
  display: flex; align-items: center; gap: 5px;
  color: var(--eng-muted); font-size: 10.5px;
  min-height: 17px;
}
.eng-card-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; margin-top: 15px;
  background: var(--eng-line);
  border: 1px solid var(--eng-line);
  border-radius: 10px;
  overflow: hidden;
}
.eng-card-stat { padding: 9px 10px; background: #fbfdff; }
.eng-card-stat b { display: block; color: var(--eng-ink); font-size: 15px; line-height: 1.2; }
.eng-card-stat span { display: block; margin-top: 3px; color: #8aa0b5; font-size: 9px; }
.eng-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed #edf2f8;
  color: #8aa0b5; font-size: 9.5px;
}
.eng-card-foot strong { color: #516b84; font-weight: 600; }
.eng-open {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--eng-blue); font-size: 10px; font-weight: 600;
}

.eng-empty {
  padding: 52px 22px;
  text-align: center;
  background: #fff;
  border: 1px dashed #d4e2f0;
  border-radius: 17px;
}
.eng-empty-icon {
  width: 46px; height: 46px; margin: 0 auto 12px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: #eef5ff; color: var(--eng-blue);
}
.eng-empty-icon svg { width: 23px; height: 23px; }
.eng-empty h3 { margin: 0; color: var(--eng-ink); font-size: 15px; }
.eng-empty p { margin: 6px auto 16px; color: var(--eng-muted); font-size: 11px; line-height: 1.7; max-width: 380px; }

.eng-detail-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
}
.eng-back {
  display: inline-flex; align-items: center; gap: 5px;
  border: 0; padding: 0; margin: 0 0 7px;
  background: transparent; color: var(--eng-muted);
  font: inherit; font-size: 11px; cursor: pointer;
}
.eng-back:hover { color: var(--eng-blue); }
.eng-detail-title { margin: 0; color: var(--eng-ink); font-size: 24px; font-weight: 700; letter-spacing: -.7px; line-height: 1.28; }
.eng-detail-meta { margin-top: 6px; color: var(--eng-muted); font-size: 11px; display: flex; gap: 6px; flex-wrap: wrap; }
.eng-hero .eng-detail-title { color: #fff; }
.eng-hero .eng-detail-meta { color: #a6c1d9; }
.eng-hero .eng-detail-meta svg { color: #60a5fa; }
.eng-hero .eng-back { color: #9db7d1; }
.eng-hero .eng-back:hover { color: #fff; }
.eng-detail-actions { display: flex; gap: 7px; flex-wrap: wrap; }

.eng-summary {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.eng-summary-card {
  padding: 14px 15px; border-radius: 13px; background: #fff;
  border: 1px solid var(--eng-line);
}
.eng-summary-label { color: var(--eng-muted); font-size: 9.5px; }
.eng-summary-value { margin-top: 5px; color: var(--eng-ink); font-size: 23px; font-weight: 700; letter-spacing: -.6px; }
.eng-summary-value small { color: #8aa0b5; font-size: 10px; font-weight: 500; margin-left: 3px; }

.eng-categories {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px;
}
.eng-category {
  flex: 0 0 auto; min-width: 140px;
  padding: 11px 13px; border-radius: 11px;
  background: #fff; border: 1px solid var(--eng-line);
}
.eng-category-name { display: flex; align-items: center; gap: 6px; color: var(--eng-ink); font-size: 11px; font-weight: 600; }
.eng-category-name::before { content: ''; width: 6px; height: 6px; border-radius: 2px; background: var(--eng-blue); }
.eng-category-total { margin-top: 6px; color: var(--eng-ink); font-size: 14px; font-weight: 700; }
.eng-category-total span { color: #8aa0b5; font-size: 9px; font-weight: 400; margin-left: 3px; }
.eng-category-sub { margin-top: 3px; color: #8aa0b5; font-size: 9px; }

.eng-tabs {
  display: flex; gap: 2px; border-bottom: 1px solid var(--eng-line);
}
.eng-tab {
  position: relative; border: 0; background: transparent;
  padding: 11px 14px; margin-bottom: -1px;
  color: var(--eng-muted); font: inherit; font-size: 11.5px; font-weight: 500;
  cursor: pointer; border-bottom: 2px solid transparent;
}
.eng-tab.active { color: var(--eng-blue); border-bottom-color: var(--eng-blue); font-weight: 600; }
.eng-tab-count { color: #a3b3c3; font-size: 9px; margin-left: 3px; }

.eng-table-wrap {
  background: #fff; border: 1px solid var(--eng-line);
  border-radius: 14px; overflow: auto;
}
.eng-table { width: 100%; border-collapse: collapse; min-width: 840px; }
.eng-table th {
  padding: 10px 12px; text-align: left;
  background: #f8fbfe; color: #7d91a6;
  font-size: 9.5px; font-weight: 600; letter-spacing: .25px;
  border-bottom: 1px solid var(--eng-line); white-space: nowrap;
}
.eng-table td {
  padding: 11px 12px; border-bottom: 1px solid #eef3f8;
  color: var(--eng-ink); font-size: 11px; vertical-align: middle;
}
.eng-table tr:last-child td { border-bottom: none; }
.eng-table tbody tr:hover td { background: #fbfdff; }
.eng-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.eng-table .strong { font-weight: 600; }
.eng-table .muted { color: var(--eng-muted); font-size: 10px; }
.eng-code-cell { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9.5px; color: #7d91a6; }
.eng-chip {
  display: inline-block; padding: 3px 7px; border-radius: 5px;
  background: #f1f5f9; color: #64748b; font-size: 9px; white-space: nowrap;
}
.eng-chip.blue { background: #eef5ff; color: var(--eng-blue); }
.eng-chip.amber { background: #fff8e8; color: #9a5c00; }
.eng-row-actions { display: flex; gap: 5px; justify-content: flex-end; }
.eng-icon-btn {
  width: 27px; height: 27px; padding: 0;
  border: 1px solid var(--eng-line); border-radius: 7px;
  background: #fff; color: #6f8498; cursor: pointer;
  display: inline-grid; place-items: center;
}
.eng-icon-btn svg { width: 13px; height: 13px; }
.eng-icon-btn:hover { color: var(--eng-blue); border-color: #bfd8f4; background: #f5f9ff; }
.eng-icon-btn.danger:hover { color: #be123c; border-color: #f0cdd5; background: #fff7f8; }
.eng-icon-btn:disabled { opacity: .35; cursor: not-allowed; }

.eng-note {
  padding: 11px 13px; border-radius: 10px;
  background: #f8fbfe; border: 1px solid var(--eng-line);
  color: var(--eng-muted); font-size: 10px; line-height: 1.7;
}
.eng-note b { color: var(--eng-ink); }

.eng-form-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px;
}
.eng-form-grid .full { grid-column: 1 / -1; }
.eng-field label {
  display: block; margin-bottom: 5px; color: #5e7388;
  font-size: 10.5px; font-weight: 600;
}
.eng-field label em { color: #be123c; font-style: normal; margin-left: 2px; }
.eng-field input,
.eng-field select,
.eng-field textarea {
  width: 100%; box-sizing: border-box;
  border: 1px solid #dce8f4; border-radius: 9px;
  background: #fbfdff; color: var(--eng-ink);
  padding: 10px 11px; font: inherit; font-size: 12px;
  outline: none;
}
.eng-field textarea { min-height: 72px; resize: vertical; line-height: 1.55; }
.eng-field input:focus,
.eng-field select:focus,
.eng-field textarea:focus { border-color: #9dc3ec; box-shadow: 0 0 0 3px rgba(37, 99, 235, .06); background: #fff; }
.eng-field .hint { margin-top: 4px; color: #97a8b8; font-size: 9px; line-height: 1.5; }
.eng-calc-preview {
  padding: 10px 12px; border-radius: 9px;
  background: #eef5ff; color: #1d4ed8;
  font-size: 11px; line-height: 1.6;
}
.eng-calc-preview strong { font-size: 16px; margin: 0 3px; }
.eng-form-actions { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 900px) {
  .eng-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .eng-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .eng-hero { padding: 19px 17px; border-radius: 16px; }
  .eng-hero-top { align-items: flex-start; flex-direction: column; }
  .eng-title { font-size: 25px; }
  .eng-metrics { gap: 7px; margin-top: 17px; }
  .eng-metric { padding: 10px 11px; }
  .eng-metric-value { font-size: 19px; }
  .eng-page { gap: 14px; padding-bottom: 18px; }
  .eng-grid { grid-template-columns: 1fr; }
  .eng-summary { gap: 7px; }
  .eng-summary-card { padding: 11px; }
  .eng-summary-value { font-size: 19px; }
  .eng-form-grid { grid-template-columns: 1fr; }
  .eng-detail-title { font-size: 21px; }
  .eng-table { min-width: 760px; }
}
