* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, sans-serif;
  font-size: 13px;
  color: #333;
  background: #f3f3f4;
}

.page { padding: 10px 12px 24px; }

.panel {
  background: #fff;
  border: 1px solid #e7eaec;
  border-radius: 2px;
  margin-bottom: 10px;
  padding: 12px 14px 16px;
}

.section-title {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  font-weight: 700;
  color: #333;
}
.section-title b {
  display: inline-block;
  min-width: 72px;
  padding-right: 8px;
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #1ab394;
  margin-left: 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px 10px;
  align-items: center;
}
.form-grid .label { text-align: right; color: #555; white-space: nowrap; }
.form-grid .field { grid-column: span 1; }
.form-grid .field-wide { grid-column: span 2; }

input, select {
  width: 100%;
  height: 30px;
  border: 1px solid #e5e6e7;
  border-radius: 2px;
  padding: 4px 8px;
  font-size: 13px;
  background: #fff;
}
input:focus, select:focus {
  outline: none;
  border-color: #1ab394;
}

.toolbar { text-align: center; margin-top: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 72px;
  height: 30px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 13px;
  cursor: pointer;
}
.btn-primary { background: #1ab394; border-color: #1ab394; color: #fff; }
.btn-primary:hover { background: #18a689; }
.btn-default { background: #fff; border-color: #ddd; color: #333; }
.btn-default:hover { background: #f7f7f7; }
.btn-link {
  background: none; border: none; color: #337ab7; min-width: auto; height: auto; padding: 0 4px;
}
.btn-link:hover { text-decoration: underline; }

.table-wrap { overflow: auto; border: 1px solid #e7eaec; }
table.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1200px;
}
table.data-table th {
  background: #f5f5f6;
  border-bottom: 1px solid #e7eaec;
  padding: 8px 6px;
  text-align: center;
  font-weight: 600;
  white-space: nowrap;
}
table.data-table td {
  border-top: 1px solid #e7eaec;
  padding: 7px 6px;
  text-align: center;
  vertical-align: middle;
}
table.data-table tbody tr:nth-child(even) { background: #f9f9f9; }
table.data-table tbody tr:hover { background: #f0faf8; }
table.data-table tbody tr.active { background: #e8f8f4; }

.ops { white-space: nowrap; }
.table-footer {
  padding: 8px 4px 0;
  color: #666;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px 14px;
}
.detail-item label {
  display: block;
  margin-bottom: 4px;
  color: #666;
}
.detail-item input, .detail-item select {
  background: #fafafa;
}

.body-toolbar { margin-bottom: 8px; display: flex; gap: 8px; }

.topbar {
  background: #fff;
  border-bottom: 1px solid #e7eaec;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar h1 { margin: 0; font-size: 16px; font-weight: 700; }
.topbar .meta { color: #888; font-size: 12px; }

.loading-mask {
  position: fixed; inset: 0; background: rgba(255,255,255,.55);
  display: none; align-items: center; justify-content: center; z-index: 99;
}
.loading-mask.show { display: flex; }
.loading-box {
  background: #fff; border: 1px solid #ddd; padding: 16px 24px; border-radius: 4px;
}

.toast {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  background: #fff3cd; border: 1px solid #ffeeba; color: #856404;
  padding: 10px 16px; border-radius: 4px; display: none; z-index: 100;
}
.toast.error { background: #f8d7da; border-color: #f5c6cb; color: #721c24; }
.toast.show { display: block; }

@media (max-width: 1100px) {
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid .label { text-align: left; }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
}
