/* ===== 通用基础样式 ===== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: #1e293b;
  background: #f1f5f9;
  -webkit-text-size-adjust: 100%;
}
a { color: #0d9488; text-decoration: none; }
code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* 表单 */
label { display: block; font-size: 13px; color: #475569; margin-bottom: 6px; font-weight: 500; }
input[type=text], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  outline: none;
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: #0d9488; box-shadow: 0 0 0 3px rgba(13,148,136,.12); }
input:disabled, select:disabled { background: #f8fafc; color: #94a3b8; }
textarea { resize: vertical; min-height: 70px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  border-radius: 7px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { background: #f8fafc; border-color: #94a3b8; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: #0d9488; border-color: #0d9488; color: #fff; }
.btn-primary:hover:not(:disabled) { background: #0f766e; border-color: #0f766e; }
.btn-danger { background: #fff; border-color: #fca5a5; color: #dc2626; }
.btn-danger:hover:not(:disabled) { background: #fef2f2; }
.btn-sm { padding: 5px 11px; font-size: 13px; }

/* 提示条 */
.alert { padding: 10px 13px; border-radius: 7px; font-size: 13px; margin-bottom: 14px; line-height: 1.6; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdfa; color: #0f766e; border: 1px solid #99f6e4; }
.alert-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.alert-warn { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }

/* 表格 */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #e2e8f0; vertical-align: middle; }
th { background: #f8fafc; font-weight: 600; color: #475569; white-space: nowrap; }
tbody tr:hover { background: #f8fafc; }
td .btn + .btn { margin-left: 6px; }

/* 标签 */
.tag { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px; line-height: 18px; }
.tag-green { background: #dcfce7; color: #15803d; }
.tag-gray { background: #f1f5f9; color: #64748b; }
.tag-blue { background: #dbeafe; color: #1d4ed8; }
.tag-red { background: #fee2e2; color: #b91c1c; }
.tag-orange { background: #ffedd5; color: #c2410c; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.5);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal {
  background: #fff; border-radius: 12px; width: 100%; max-width: 520px;
  max-height: 88vh; overflow: auto; box-shadow: 0 20px 50px rgba(0,0,0,.3);
}
.modal header { padding: 18px 22px; border-bottom: 1px solid #e2e8f0; font-size: 16px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.modal .body { padding: 22px; }
.modal footer { padding: 14px 22px; border-top: 1px solid #e2e8f0; display: flex; justify-content: flex-end; gap: 10px; }
.close-x { cursor: pointer; color: #94a3b8; font-size: 22px; line-height: 1; border: none; background: none; }
.close-x:hover { color: #334155; }

/* 工具类 */
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 150px; }
.mt { margin-top: 14px; }
.muted { color: #94a3b8; font-size: 12px; }
.empty { text-align: center; padding: 40px 20px; color: #94a3b8; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
