/* ============================================================
   知识库问答系统 - 全局样式
   现代蓝 #2563eb + 白/浅灰/淡蓝（清爽年轻化配色）
   思源黑体正文
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* ── 主色：沉稳蓝（原 #2563eb 偏亮，降一档） ── */
    --primary: #1d4ed8;
    --primary-dark: #1e40af;
    --primary-light: #eff6ff;
    --primary-rgb: 29, 78, 216;

    /* ── 辅助：淡蓝（原金色已移除） ── */
    --accent: #2563eb;
    --accent-light: #dbeafe;
    --accent-dark: #1e3a8a;

    /* ── 消息区文字蓝（比主色更暗，避免标题/加粗文字刺眼） ── */
    --text-blue: #1e3a8a;

    /* ── 兼容旧变量名（淡蓝色系，chat.css/admin.css 的 var(--gold*) 引用自动跟随） ── */
    --gold: #2563eb;
    --gold-light: #eff6ff;
    --gold-dark: #1e3a8a;
    --gold-rgb: 37, 99, 235;

    /* ── 背景 ── */
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-warm: #f8fafc;
    --surface-hover: #f1f5f9;

    /* ── 文字 ── */
    --text: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;

    /* ── 边框 ── */
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    /* ── 状态 ── */
    --accent-green: #16a34a;
    --accent-red: #dc2626;

    /* ── 阴影（淡蓝灰） ── */
    --shadow-sm: 0 1px 2px rgba(15,23,42,0.05);
    --shadow: 0 2px 8px rgba(15,23,42,0.07);
    --shadow-md: 0 4px 12px rgba(15,23,42,0.09);
    --shadow-lg: 0 8px 30px rgba(15,23,42,0.12);

    /* ── 圆角 ── */
    --radius: 6px;
    --radius-sm: 4px;
    --radius-lg: 12px;

    /* ── 字体 ── */
    --font-serif: "STSong", "Songti SC", "SimSun", "宋体", "Noto Serif SC", serif;
    --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", "Noto Sans SC", sans-serif;
    --font: var(--font-sans);

    /* ── 布局 ── */
    --sidebar-width: 260px;
}

html { height: 100%; scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── 链接 ── */
a { color: var(--primary); text-decoration: none; transition: color 0.2s, opacity 0.2s; }
a:hover { color: var(--gold); text-decoration: underline; }

/* ── 表单元素 ── */
button { cursor: pointer; border: none; font-family: inherit; font-size: inherit; outline: none; background: none; }
button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

textarea, input, select {
    font-family: inherit;
    font-size: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
textarea:focus, input:focus, select:focus {
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 3px rgba(var(--gold-rgb), 0.15);
}

/* ── 自定义滚动条 ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ── 通用工具 ── */
.gold-accent { color: var(--gold); }
.serif { font-family: var(--font-serif); }
