/* ==========================================================================
   云枢路由管理系统 —— 设计变量与基础组件
   ========================================================================== */

:root {
  --bg: #f4f6fb;
  --bg-soft: #edf1f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --border: #e4e9f2;
  --border-strong: #d3dbe8;
  --text: #172033;
  --text-soft: #41506b;
  --muted: #7a879c;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --primary-soft: #e8f0ff;
  --success: #15803d;
  --success-soft: #e7f7ee;
  --warning: #b45309;
  --warning-soft: #fdf1df;
  --danger: #dc2626;
  --danger-soft: #fdeaea;
  --info: #0369a1;
  --info-soft: #e5f4fd;
  --sidebar-bg: #0f172a;
  --sidebar-bg-2: #111c31;
  --sidebar-text: #c7d2e2;
  --sidebar-muted: #64748b;

  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 28px 72px rgba(15, 23, 42, 0.22);

  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC",
    "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;
  --nav-width: 236px;
  --top-height: 62px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, p, dl, dd, dt, ul {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

a {
  color: var(--primary);
  text-decoration: none;
}

button {
  font-family: inherit;
}

input,
select,
textarea,
button {
  font-size: 14px;
}

::selection {
  background: rgba(37, 99, 235, 0.18);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: #cdd6e4;
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: #b3bfd2;
  background-clip: content-box;
}

:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.55);
  outline-offset: 1px;
}

/* --------------------------------------------------------------------------
   按钮
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.16s ease;
  user-select: none;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  border-color: #2563eb;
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #4b8ffb 0%, #1d4ed8 100%);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text-soft);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
  border-color: #b9c5d8;
  color: var(--text);
  background: var(--surface-2);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface-3);
  color: var(--text-soft);
}

.btn-danger {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  border-color: #dc2626;
  color: #fff;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.24);
}

.btn-danger:hover:not(:disabled) {
  background: #b91c1c;
}

.btn-success {
  background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
  border-color: #15803d;
  color: #fff;
}

.btn-sm {
  height: 30px;
  padding: 0 10px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-md {
  height: 38px;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.16s ease;
}

.icon-btn:hover {
  background: var(--surface-3);
  color: var(--text);
}

.icon-btn-danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

/* --------------------------------------------------------------------------
   徽标 / 状态点
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
}

.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-primary { background: var(--primary-soft); color: var(--primary-strong); }
.badge-neutral { background: var(--surface-3); color: var(--muted); }

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}

.dot-success { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15); }
.dot-danger { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15); }
.dot-warning { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15); }
.dot-neutral { background: #94a3b8; }

/* --------------------------------------------------------------------------
   表单
   -------------------------------------------------------------------------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 4px;
}

.required-mark {
  color: var(--danger);
  font-weight: 700;
}

.field-hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.input,
.select {
  height: 38px;
  padding: 0 11px;
}

.textarea {
  padding: 9px 11px;
  min-height: 74px;
  resize: vertical;
  line-height: 1.6;
}

.input::placeholder,
.textarea::placeholder {
  color: #a3aec0;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.input:disabled,
.select:disabled,
.textarea:disabled {
  background: var(--surface-3);
  color: var(--muted);
  cursor: not-allowed;
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237a879c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
  cursor: pointer;
}

.search-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
}

.search-box svg {
  position: absolute;
  left: 10px;
  pointer-events: none;
}

.search-input {
  padding-left: 32px;
}

.search-input::-webkit-search-cancel-button {
  cursor: pointer;
}

.form-grid {
  display: grid;
  gap: 16px 18px;
}

.form-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.cols-1 { grid-template-columns: minmax(0, 1fr); }

.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-3 { grid-column: span 3; }
.form-grid .span-full { grid-column: 1 / -1; }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

/* 开关 */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-track {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.18s ease;
  flex: none;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
  transition: transform 0.18s ease;
}

.switch input:checked + .switch-track {
  background: var(--primary);
}

.switch input:checked + .switch-track::after {
  transform: translateX(16px);
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid rgba(37, 99, 235, 0.5);
  outline-offset: 2px;
}

.switch-label {
  font-size: 13px;
  color: var(--text-soft);
}

/* --------------------------------------------------------------------------
   卡片 / 页面
   -------------------------------------------------------------------------- */
.page {
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: page-in 0.22s ease both;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: 0.2px;
  color: var(--text);
}

.page-desc {
  margin-top: 5px;
  font-size: 13px;
  color: var(--muted);
  max-width: 760px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.page-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  min-width: 0;
}

.grid > *,
.page-body > *,
.form-grid > * {
  min-width: 0;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 0;
}

.card-title-wrap {
  min-width: 0;
}

.card-title {
  font-size: 16px;
  font-weight: 650;
  color: var(--text);
}

.card-desc {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--muted);
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-body {
  padding: 16px 20px 20px;
}

.card-body.no-pad {
  padding: 8px 0 0;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.4px;
  margin-bottom: 10px;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* --------------------------------------------------------------------------
   统计卡片
   -------------------------------------------------------------------------- */
.stat {
  display: flex;
  gap: 14px;
  padding: 17px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  flex: none;
}

.stat-icon-primary { background: var(--primary-soft); color: var(--primary); }
.stat-icon-success { background: var(--success-soft); color: var(--success); }
.stat-icon-warning { background: var(--warning-soft); color: var(--warning); }
.stat-icon-danger { background: var(--danger-soft); color: var(--danger); }
.stat-icon-info { background: var(--info-soft); color: var(--info); }

.stat-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 12.5px;
  color: var(--muted);
}

.stat-value {
  font-size: 24px;
  font-weight: 650;
  line-height: 1.25;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.stat-unit {
  margin-left: 4px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}

.stat-hint {
  font-size: 12px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   表格
   -------------------------------------------------------------------------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-soft);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover td {
  background: #f9fbff;
}

.data-table tbody tr.is-clickable {
  cursor: pointer;
}

.data-table tbody tr.is-clickable:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.4);
  outline-offset: -2px;
}

.data-table.dense td {
  padding: 8px 12px;
}

.data-table .align-right { text-align: right; }
.data-table .align-center { text-align: center; }

.table-empty-cell {
  padding: 8px 14px 18px !important;
}

.skeleton-row td {
  padding: 13px 14px;
}

.skeleton {
  height: 13px;
  border-radius: 6px;
  background: linear-gradient(90deg, #eef2f8 25%, #f8fafc 37%, #eef2f8 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}

@keyframes shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* --------------------------------------------------------------------------
   弹窗 / 抽屉
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.modal-backdrop.open {
  opacity: 1;
}

.modal {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: calc(100vh - 48px);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: translateY(10px) scale(0.985);
  transition: transform 0.18s ease;
  overflow: hidden;
}

.modal-backdrop.open .modal {
  transform: none;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 19px 22px 6px;
}

.modal-title {
  font-size: 17px;
  font-weight: 650;
}

.modal-body {
  padding: 12px 22px 20px;
  overflow-y: auto;
}

.modal-body-text {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.75;
}

.modal-error {
  margin: 0 22px 12px;
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px 20px;
  border-top: 1px solid var(--border);
}

.confirm-text {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.75;
}

/* --------------------------------------------------------------------------
   轻提示
   -------------------------------------------------------------------------- */
.toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 240px;
  max-width: 400px;
  padding: 11px 13px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  box-shadow: var(--shadow);
  transform: translateX(16px);
  opacity: 0;
  transition: all 0.2s ease;
}

.toast.show {
  transform: none;
  opacity: 1;
}

.toast.leaving {
  opacity: 0;
  transform: translateX(12px);
}

.toast-success { border-left-color: var(--success); }
.toast-success .toast-icon { color: var(--success); }
.toast-danger { border-left-color: var(--danger); }
.toast-danger .toast-icon { color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info { border-left-color: var(--info); }
.toast-info .toast-icon { color: var(--info); }

.toast-icon {
  flex: none;
  margin-top: 1px;
  color: var(--primary);
}

.toast-text {
  flex: 1;
  font-size: 13.5px;
  color: var(--text-soft);
  line-height: 1.5;
  word-break: break-word;
}

.toast-close {
  flex: none;
  display: inline-flex;
  border: none;
  background: none;
  color: var(--muted);
  padding: 1px;
  border-radius: 5px;
  cursor: pointer;
}

.toast-close:hover {
  background: var(--surface-3);
  color: var(--text);
}

/* --------------------------------------------------------------------------
   代码块
   -------------------------------------------------------------------------- */
.code-block {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid #1e293b;
  background: #0f172a;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 9px 8px 14px;
  background: #131f35;
  border-bottom: 1px solid #1e293b;
}

.code-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

.code-head .btn-ghost {
  color: #94a3b8;
}

.code-head .btn-ghost:hover {
  background: rgba(148, 163, 184, 0.14);
  color: #e2e8f0;
}

.code-pre {
  margin: 0;
  padding: 13px 16px;
  overflow: auto;
  max-height: 360px;
}

.code-pre code {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: #d7e2f5;
  white-space: pre;
}

/* --------------------------------------------------------------------------
   标签页 / 空态 / 加载 / 进度 / 键值表
   -------------------------------------------------------------------------- */
.tab-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.tab {
  border: none;
  background: none;
  padding: 10px 13px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}

.tab:hover {
  color: var(--text-soft);
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-panel {
  padding-top: 16px;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 16px;
  gap: 7px;
}

.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--muted);
  margin-bottom: 4px;
}

.empty-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-soft);
}

.empty-desc {
  font-size: 12.5px;
  color: var(--muted);
  max-width: 420px;
  line-height: 1.7;
}

.empty-action {
  margin-top: 10px;
}

.loading-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 56px 16px;
  color: var(--muted);
  font-size: 13.5px;
}

.spinner {
  display: inline-block;
  border: 2px solid rgba(37, 99, 235, 0.18);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
  transition: width 0.4s ease;
}

.progress-bar.tone-success { background: linear-gradient(90deg, #22c55e, #15803d); }
.progress-bar.tone-warning { background: linear-gradient(90deg, #f59e0b, #b45309); }
.progress-bar.tone-danger { background: linear-gradient(90deg, #f87171, #dc2626); }
.progress-bar.tone-primary { background: linear-gradient(90deg, #60a5fa, #2563eb); }

.kv-grid {
  display: grid;
  gap: 13px 24px;
}

.kv-grid.cols-1 { grid-template-columns: minmax(0, 1fr); }
.kv-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kv-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.kv-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.kv-label {
  font-size: 12px;
  color: var(--muted);
}

.kv-value {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-soft);
  word-break: break-word;
}

.list-group {
  display: flex;
  flex-direction: column;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-soft);
}

.list-item:last-child {
  border-bottom: none;
}

.list-item.is-clickable {
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding-left: 8px;
  padding-right: 8px;
}

.list-item.is-clickable:hover {
  background: var(--surface-2);
}

.list-icon {
  display: inline-flex;
  color: var(--muted);
}

.list-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 1px;
  min-width: 0;
}

.list-desc {
  font-size: 12px;
  color: var(--muted);
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.65;
}

.alert svg { flex: none; margin-top: 2px; }
.alert-info { background: var(--info-soft); color: #075985; }
.alert-success { background: var(--success-soft); color: #166534; }
.alert-warning { background: var(--warning-soft); color: #92400e; }
.alert-danger { background: var(--danger-soft); color: #991b1b; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   通用工具类
   -------------------------------------------------------------------------- */
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.w-full { width: 100%; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flex-center { display: flex; align-items: center; gap: 8px; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.hidden { display: none !important; }
.break-all { word-break: break-all; }

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4,
  .form-grid.cols-2,
  .form-grid.cols-3,
  .kv-grid.cols-2,
  .kv-grid.cols-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-grid .span-2,
  .form-grid .span-3 {
    grid-column: auto;
  }

  .page-title { font-size: 19px; }
  .page-head { align-items: flex-start; }
}
