/* ================================================================
   全站基础兼容层（精装版配套）
   - 只统一字体、圆角、阴影、交互反馈等视觉细节
   - 不改变首页 / 用户中心原有的结构、栅格与布局
   ================================================================ */
:root {
    --brand: #2563eb;
    --brand-2: #7c3aed;
    --brand-soft: #eff6ff;
    --ink-900: #0f172a;
    --ink-600: #475569;
    --line-soft: #e6eaf2;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-soft: 0 8px 24px rgba(15, 23, 42, .06);
    --shadow-hover: 0 14px 32px rgba(15, 23, 42, .10);
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--ink-900);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(37, 99, 235, .18);
    color: var(--ink-900);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 8px;
    border: 2px solid #f1f5f9;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

a {
    transition: color .18s ease, opacity .18s ease;
}

.btn,
button.btn {
    border-radius: var(--radius-sm);
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.btn:hover,
button.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}
.btn:active,
button.btn:active {
    transform: translateY(0);
}

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

img {
    max-width: 100%;
}

h1, h2, h3 {
    letter-spacing: .2px;
}

.card,
.panel,
.list-group-item {
    border-radius: var(--radius-md);
}

/* 统一的来源标签 */
.badge-source {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.6;
    white-space: nowrap;
}
.badge-source.main {
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}
.badge-source.agent {
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}
.badge-source.custom {
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}
