/* 共享 UI 组件库：按钮、卡片、徽章、表单、标签页、表格、提示。
   全部基于 tokens.css；新增组件先在此处沉淀，页面内只写页面专属布局。 */

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.page { padding: 34px 0 80px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; font-size: 13px; color: var(--text-3); }
.crumbs a:hover { color: var(--text); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.h1 { margin: 0; font-size: clamp(26px, 3.4vw, 38px); font-weight: 600; letter-spacing: -.025em; line-height: 1.12; }
.h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.h3 { margin: 0; font-size: 16px; font-weight: 600; }
.lead { margin: 8px 0 0; font-size: 16px; color: var(--text-2); }
.muted { color: var(--text-2); } .faint { color: var(--text-3); }
.mono { font-family: var(--font-mono); } .num { font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 12px; } .between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } .container { padding: 0 16px; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 20px; border: 1px solid transparent; border-radius: var(--r-pill); font-size: 14px; font-weight: 500; white-space: nowrap; transition: background .2s, border-color .2s, transform .18s cubic-bezier(.16, 1, .3, 1), box-shadow .2s; }
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--accent-solid); color: #fff; } .btn--primary:hover { background: var(--accent-solid-hover); }
.btn--soft { border-color: var(--line); background: var(--bg-elevated); color: var(--text); } .btn--soft:hover { box-shadow: var(--shadow-card); }
.btn--ghost { background: none; color: var(--accent); } .btn--ghost:hover { background: var(--accent-tint); }
.btn--danger { border-color: var(--danger-border); background: none; color: var(--danger); } .btn--danger:hover { background: var(--danger-tint); }
.btn--sm { padding: 7px 14px; font-size: 13px; } .btn--lg { padding: 13px 26px; font-size: 16px; } .btn--block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* card */
.card { padding: 20px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-elevated); }
.card--soft { border-color: transparent; background: var(--bg-soft); }
.card--hover { transition: box-shadow .25s, transform .25s; } .card--hover:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.stat .v { font-size: 26px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .l { margin-top: 2px; font-size: 12.5px; color: var(--text-3); }

/* badge */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 600; line-height: 1.4; }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--blue { background: var(--accent-tint); color: var(--accent); }
.badge--green { background: var(--verified-tint-strong); color: var(--verified); }
.badge--amber { background: var(--warn-tint-strong); color: var(--warn); }
.badge--red { background: var(--danger-tint-strong); color: var(--danger); }
.badge--gray { background: var(--bg-soft); color: var(--text-2); }
.badge--gold { background: var(--gold-tint-strong); color: var(--gold); }

/* form */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 13px; font-weight: 500; }
.hint { font-size: 12px; color: var(--text-3); }
.input, .select, .textarea { width: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-elevated); color: var(--text); font-size: 14px; outline: 0; transition: border-color .2s, box-shadow .2s; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.textarea { min-height: 96px; resize: vertical; }

/* tabs / segmented / chips */
.tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.tabs a, .tabs button { margin-bottom: -1px; padding: 11px 14px; border: 0; border-bottom: 2px solid transparent; background: none; font-size: 14.5px; color: var(--text-2); transition: color .2s; }
.tabs a:hover, .tabs button:hover { color: var(--text); }
.tabs .is-active { border-bottom-color: var(--accent); color: var(--text); font-weight: 600; }
.seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--bg-soft); }
.seg button { padding: 7px 14px; border: 0; border-radius: 7px; background: none; font-size: 13px; color: var(--text-2); }
.seg .is-active { background: var(--bg-elevated); color: var(--text); font-weight: 500; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--bg-elevated); font-size: 13px; color: var(--text-2); transition: border-color .2s, background .2s, color .2s; }
.chip:hover { color: var(--text); } .chip.is-active { border-color: var(--accent-border-strong); background: var(--accent-tint); color: var(--accent); }

/* table */
.table-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-elevated); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg-soft); text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--bg-soft); }

/* notice / progress / divider */
.notice { padding: 12px 16px; border: 1px solid var(--accent-border); border-radius: var(--r-sm); background: var(--accent-tint); font-size: 13.5px; }
.notice--warn { border-color: var(--warn-border); background: var(--warn-tint); }
.notice--danger { border-color: var(--danger-border); background: var(--danger-tint); }
.notice--ok { border-color: var(--verified-border); background: var(--verified-tint); }
.progress { height: 6px; overflow: hidden; border-radius: 3px; background: var(--bg-soft); }
.progress i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.divider { height: 1px; margin: 16px 0; background: var(--line-soft); }

/* 宽屏页面容器，需配合 <body data-wide> */
body[data-wide] .container { max-width: 1760px; padding: 0 clamp(20px, 3vw, 48px); }
