﻿/* ============================================================
   DXTool（大雄工具）设计系统（参考 Code Times 设计规范）
   主色 #4C58BE ｜ 渐变 #6B4FBE ｜ 背景 #F6F7F9
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* 色板（方案 C：降亮度 + 分层） */
    --primary: #4C58BE;
    --primary-dark: #3E489E;
    --primary-light: #7A84D2;
    --gradient: linear-gradient(90deg, #4C58BE, #6B4FBE);
    --gradient-bg: linear-gradient(135deg, #EEF0F7 0%, #F3F0F8 55%, #F1EDF8 100%);
    --text-title: #1F2937;
    --text-body: #333D4B;
    --text-secondary: #5A6472;
    --text-muted: #697380;
    --bg: #F6F7F9;
    --bg-card: #ffffff;
    --bg-subtle: #EEF1F5;
    --border: #E1E5EB;
    --border-light: #ECEFF3;
    --tag-bg: #EAEDF9;
    --success: #52c41a;
    --warning: #faad14;
    --danger: #ef4444;

    /* 语义层：组件只认这几个名字，换肤只改这里 */
    --surface: var(--bg-card);          /* 卡片 / 面板底色 */
    --surface-sunken: var(--bg);        /* 页面底色，比卡片低一层 */
    --surface-hover: var(--bg-subtle);  /* 悬停 / 次级填充 */

    /* 代码工作区（浅色）：只作用于 .tool-workspace，与页面底色解耦
       取值对齐 IntelliJ IDEA Light：白底、浅灰面板、深色正文、浅灰边框、强调蓝
       正文 #1F1F1F 对白底 15.9:1；次要 #6E6E6E 5.1:1 */
    --code-bg: #FFFFFF;
    --code-bg-alt: #F2F2F2;
    --code-head-bg: #F2F2F2;
    --code-gutter-bg: #F2F2F2;
    /* 行号：#6E6E6E 在 #F2F2F2 槽底上 4.6:1，达到正文 AA */
    --code-gutter-text: #6E6E6E;
    --code-text: #1F1F1F;
    --code-muted: #6E6E6E;
    --code-border: #D1D1D1;
    --code-btn-bg: #F2F2F2;
    --code-btn-border: #C9C9C9;
    /* 语义色：浅底上的可读版本（错误 5.7:1 / 警告 5.9:1 / 成功 6.5:1 / 强调蓝 6.4:1，均对白底） */
    --code-accent: #1F5FA8;
    --code-danger: #C7222D;
    --code-warning: #8A5A00;
    --code-success: #146C2E;
    /* 语法高亮（IntelliJ Light 内置方案） */
    --code-kw: #0033B3;
    --code-str: #067D17;
    --code-num: #1750EB;
    --code-nul: #871094;

    /* 正文代码块（文章 / 速查共用）：与工具面板同一套 Darcula 底色，但独立成组，
       便于以后单独调阅读区的密度与配色 */
    --snippet-bg: #2B2B2B;
    --snippet-text: #A9B7C6;
    --snippet-border: #323232;

    /* 字号 */
    --fs-body: 14px;
    --fs-section: 20px;
    --fs-page: 24px;
    --fs-hero: 32px;

    /* 圆角 */
    --radius-card: 12px;
    --radius-btn: 8px;
    --radius-tag: 6px;
    --radius-pill: 999px;

    /* 面包屑页面统一上间距：导航底边 → 面包屑顶边（桌面 28 / 移动 20） */
    --breadcrumb-gap: 28px;

    /* 全屏布局：左右留白与左侧分类导航宽度（侧栏宽 + 主内容区 = 100%） */
    --pad-x: 24px;
    --sider-w: 240px;
    --nav-h: 64px;
    --bottom-bar-h: 56px;
}

/* 宽屏加大留白，窄屏收紧但不小于 20px */
@media (min-width: 1440px) {
    :root { --pad-x: 32px; }
}
@media (max-width: 480px) {
    :root { --pad-x: 20px; }
}

@media (max-width: 768px) {
    :root { --breadcrumb-gap: 20px; }
}

/* 防止整站横向滑动：优先用 clip，它不创建滚动容器，避免破坏 position:sticky（文章目录依赖）；
   旧浏览器不支持 clip 时回退到 hidden */
html, body { overflow-x: hidden; overflow-x: clip; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text-title);
    font-size: var(--fs-body);
    line-height: 1.6;
    /* 站点主布局：撑满视高的纵向弹性容器，内容不足一屏时页脚贴底；
       内容超过一屏时页脚跟随内容，不固定、不产生双层滚动 */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 主体区占满剩余空间（前后台通用：后台无 main，走自身 admin-layout 布局）；
   页脚贴底由这里撑开实现，footer 保留自身 48px 上间距，不能再加 margin-top:auto 覆盖 */
body > main { flex: 1 0 auto; }

a { text-decoration: none; color: inherit; cursor: pointer; }

/* ===== 原型标注面板（非设计部分） ===== */
.annotation {
    position: fixed; top: 0; right: 0; width: 300px; height: 100vh;
    background: #fffbe6; border-left: 2px solid #ffe58f;
    padding: 16px; overflow-y: auto; font-size: 13px; line-height: 1.8; z-index: 999;
}
.annotation h3 { font-size: 14px; color: #d48806; margin-bottom: 12px; border-bottom: 1px solid #ffe58f; padding-bottom: 8px; }
.annotation h4 { font-size: 13px; color: #333; margin: 14px 0 6px; }
.annotation p, .annotation li { color: #666; }
.annotation ul { padding-left: 18px; }
.annotation code { background: #f0f0f0; padding: 1px 5px; border-radius: 3px; font-size: 12px; }
.annotation .tag { display: inline-block; background: var(--primary); color: #fff; font-size: 11px; padding: 0 6px; border-radius: 3px; margin-right: 4px; }
.annotation .tag.new { background: var(--success); }
.annotation .tag.change { background: #fa8c16; }
.annotation .tag.fix { background: #ff4d4f; }
.annotation .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 3px; border: 1px solid rgba(0,0,0,.08); }

/* ===== 布局 ===== */
/* 内容区不再设上限：宽度吃满剩余空间，靠左右 padding 控制留白 */
.page { min-height: 100vh; display: flex; flex-direction: column; }
/* 注意：container 上不要加 overflow-x:hidden，它会让内部的 position:sticky 失效
   （文章页右侧目录依赖 sticky），且会静默裁掉溢出内容掩盖真实布局问题 */
.container { max-width: none; margin: 0 auto; padding: 0 var(--pad-x); width: 100%; }
/* 纯阅读页（隐私政策、用户协议、工单等）：内容限宽居中，不铺满宽屏 */
.container.narrow { max-width: 800px; }
main { flex: 1; }

/* ===== 顶部导航 ===== */
.nav {
    position: sticky; top: 0; z-index: 50; height: 64px;
    background: rgba(255,255,255,.95); backdrop-filter: blur(8px);
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.nav-inner { max-width: none; margin: 0 auto; padding: 0 var(--pad-x); height: 100%; display: flex; align-items: center; gap: 16px; position: relative; }
.brand {
    display: flex; align-items: center; gap: 8px;
    border-radius: 8px; transition: opacity .15s;
}
.brand:hover .brand-name { color: var(--primary); }
.brand:hover .logo { box-shadow: 0 4px 12px rgba(76,88,190,.35); transform: translateY(-1px); }
.brand:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.logo {
    width: 28px; height: 28px; border-radius: 8px; background: var(--gradient);
    color: #fff; font-size: 12px; letter-spacing: -0.3px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    transition: box-shadow .15s, transform .15s;
}
.brand-name { font-size: 18px; font-weight: 700; transition: color .15s; }
.nav-links { display: flex; gap: 24px; font-size: 14px; font-weight: 500; color: var(--text-body); align-items: center; margin-left: auto; }
.nav-links a { transition: color .15s; white-space: nowrap; }
.nav-links a:hover { color: var(--primary); }
.nav-links a.active { color: var(--primary); font-weight: 700; }
.nav-login-btn {
    padding: 7px 20px; border-radius: var(--radius-btn); background: var(--gradient);
    color: #fff !important; font-weight: 600; font-size: 13px;
    box-shadow: 0 2px 8px rgba(76,88,190,.25); transition: all .2s;
}
.nav-login-btn:hover { box-shadow: 0 4px 14px rgba(76,88,190,.45); transform: translateY(-1px); }

/* ===== 导航内全站搜索（桌面绝对居中；≤768 内联在 logo 与登录之间） ===== */
.nav-search {
    display: flex; align-items: center; flex: none; width: 320px;
    position: absolute; left: 50%; transform: translateX(-50%);
}
.nav-search-panel { width: 100%; }
.nav-search .dx-search { margin: 0; }
.nav-search .dx-search-box { width: 100%; max-width: none; height: 36px; padding: 0 10px; }

/* ===== 按钮 ===== */
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 24px; border-radius: var(--radius-btn); background: var(--gradient);
    color: #fff; font-size: 14px; font-weight: 500; border: none; cursor: pointer;
    transition: all .2s;
}
.btn-primary:hover { box-shadow: 0 6px 16px rgba(76,88,190,.35); transform: translateY(-1px); }
.btn-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 24px; border-radius: var(--radius-btn); background: var(--surface);
    color: var(--text-body); font-size: 14px; border: 1px solid var(--border);
    cursor: pointer; transition: all .2s;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 4px 12px; font-size: 12px; line-height: 1.4; }

/* ===== 卡片 ===== */
.card {
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius-card); transition: box-shadow .2s, transform .2s, border-color .2s;
}
.card.hoverable:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(17,24,39,.08); }

/* ===== Tag ===== */
.tag-purple { display: inline-block; padding: 2px 8px; border-radius: var(--radius-tag); background: var(--tag-bg); color: var(--primary); font-size: 12px; }
.tag-green { display: inline-block; padding: 2px 8px; border-radius: var(--radius-tag); background: #f6ffed; color: var(--success); font-size: 12px; border: 1px solid #b7eb8f; }
.tag-hot   { display: inline-block; padding: 2px 8px; border-radius: var(--radius-tag); background: #fff7e6; color: #d4380d; font-size: 12px; border: 1px solid #ffd591; white-space: nowrap; }
.tag-gray { display: inline-block; padding: 2px 8px; border-radius: var(--radius-tag); background: #fafafa; color: var(--text-muted); font-size: 12px; border: 1px solid var(--border); }

/* ===== 页头 ===== */
.page-head { background: var(--surface); border-bottom: 1px solid var(--border-light); padding: var(--breadcrumb-gap) 0 16px; }
.page-head h1 { font-size: var(--fs-page); font-weight: 700; }
.page-head .sub { margin-top: 6px; font-size: 13px; color: var(--text-secondary); }

/* ===== 面包屑：内容区顶部、标题之上，字号低于标题 ===== */
.breadcrumb {
    font-size: 13px; line-height: 20px; font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 12px;
}
.breadcrumb ol { display: flex; align-items: center; flex-wrap: nowrap; list-style: none; margin: 0; padding: 0; min-width: 0; }
.breadcrumb li { display: flex; align-items: center; white-space: nowrap; min-width: 0; }
/* 分隔符独立成层：比文字更浅，不参与 hover */
.breadcrumb li + li::before {
    content: "/"; margin: 0 8px;
    color: var(--border); font-weight: 400;
}
/* 可跳转层级：次级文字色 + hover 主色下划线（下划线不撑高行盒） */
.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color .15s;
}
.breadcrumb a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
/* 当前页：不可点、颜色更浅（弱于可点层级） */
.breadcrumb li:last-child { flex: 1 1 auto; color: var(--text-muted); }
.breadcrumb li:last-child a,
.breadcrumb li:last-child span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); }
/* 无 page-head 包裹的面包屑容器（工具详情 / 文章详情 / 速查详情）：统一顶部留白 */
.breadcrumb-holder { padding-top: var(--breadcrumb-gap); }
@media (max-width: 768px) {
    /* 移动端再降一档，但不小于 11px；允许省略中间层级：首页 / 当前页 */
    .breadcrumb { font-size: 12px; line-height: 18px; margin-bottom: 10px; }
    .breadcrumb li + li::before { margin: 0 6px; }
    .breadcrumb .breadcrumb-mid { display: none; }
}

/* ===== 分类 Tab（胶囊） ===== */
.tab-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tab-chip {
    display: inline-flex; align-items: center; padding: 5px 12px; border-radius: var(--radius-pill);
    border: 1px solid var(--border); background: var(--surface); font-size: 13px; color: var(--text-body);
    transition: all .15s; cursor: pointer; font-family: inherit; line-height: 1.4;
}
.tab-chip:hover { border-color: var(--primary); color: var(--primary); }
.tab-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 500; }

/* ===== 工具卡片 ===== */
/* 高密度：桌面 4 列，1200px 首屏可容纳 12–15 张卡 */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 14px; }
/* 分类筛选的承载层：display:contents 不参与网格，只用来挂 data-cat */
.tool-cell { display: contents; }
.tool-cell[hidden] { display: none; }
/* 分类筛选后的空态提示 */
.cat-empty { padding: 40px 0; text-align: center; font-size: 13px; color: var(--text-muted); }
.tool-card {
    background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius-card);
    padding: 12px 14px 12px; display: flex; flex-direction: column; align-items: flex-start;
    box-shadow: 0 1px 2px rgba(17,24,39,.04);
    transition: all .25s; cursor: pointer;
}
.tool-card:hover { border-color: var(--primary-light); box-shadow: 0 8px 20px rgba(76,88,190,.12); transform: translateY(-2px); }
.tool-card-head { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-bottom: 8px; }
.tool-icon {
    width: 30px; height: 30px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; color: #fff; font-weight: 600;
}
.tool-icon.blue { background: #4C58BE; }
.tool-icon.purple { background: #722ed1; }
.tool-icon.cyan { background: #13c2c2; }
.tool-icon.green { background: #52c41a; }
.tool-icon.orange { background: #fa8c16; }
.tool-icon.red { background: #f5222d; }
.tool-icon.magenta { background: #eb2f96; }
.tool-icon.geekblue { background: #2f54eb; }
.tool-icon.gray { background: #bfbfbf; }
.tool-name { font-size: 16px; line-height: 1.4; font-weight: 600; color: var(--text-title); margin-bottom: 2px; }
/* 描述固定两行截断（超出省略），既压缩高度又让同行卡片等高 */
.tool-desc {
    font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 8px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tool-footer { margin-top: auto; width: 100%; display: flex; justify-content: space-between; align-items: center; }
/* 卡片内按钮固定 26px：避免 UA 行高差异把卡片撑高，三类卡片按钮高度一致 */
.tool-card .btn-sm { height: 26px; padding: 0 12px; }
.tool-foot-note { font-size: 11px; color: var(--text-muted); }

/* ===== Hero ===== */
.hero {
    position: relative; overflow: hidden; background: var(--gradient-bg);
    text-align: center; padding: 64px 16px 80px;
}
.hero::before { content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: rgba(76,88,190,.08); top: -160px; right: -80px; }
.hero::after { content: ''; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: rgba(107,79,190,.07); bottom: -120px; left: -60px; }
.hero-inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.hero h1 { font-size: var(--fs-hero); font-weight: 700; color: var(--text-title); }
.hero .sub { margin-top: 12px; font-size: 16px; color: var(--text-secondary); line-height: 1.8; }
.hero-cta { margin-top: 28px; display: flex; justify-content: center; gap: 12px; }
.hero-search {
    margin: 28px auto 0; max-width: 520px; display: flex;
    background: var(--surface); border-radius: var(--radius-pill); overflow: hidden;
    box-shadow: 0 4px 20px rgba(76,88,190,.12); border: 1px solid var(--border);
}
.hero-search input {
    flex: 1; border: none; outline: none; padding: 13px 22px; font-size: 14px;
}
.hero-search button {
    border: none; background: var(--gradient); color: #fff; padding: 0 28px;
    font-size: 14px; font-weight: 500; cursor: pointer;
}

/* ===== 统计条 ===== */
.stats { margin-top: -32px; position: relative; z-index: 5; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.stat { padding: 20px 16px; text-align: center; display: block; text-decoration: none; }
.stat-num { font-size: 24px; font-weight: 700; color: var(--primary); }
.stat-label { margin-top: 4px; font-size: 13px; color: var(--text-secondary); }
/* 副标（如「31 个分类」）：字号更小、不换行，保证三张卡视觉高度一致 */
.stat-sub { margin-top: 2px; font-size: 11px; line-height: 1.4; color: var(--text-muted); white-space: nowrap; }

/* ===== 区块 ===== */
.section { margin-top: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; }
.section-head h2 { font-size: var(--fs-section); font-weight: 600; }
.more { font-size: 13px; color: var(--primary); }
.more:hover { text-decoration: underline; }

/* ===== 文章卡片 ===== */
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 16px; }
.doc-card { display: block; padding: 16px; }
.doc-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(17,24,39,.08); }
/* 卡片封面：负 margin 抵消 padding，贴到卡片边缘并保留圆角 */
.doc-cover {
    position: relative;
    margin: -16px -16px 12px; border-radius: 11px 11px 0 0; overflow: hidden;
    background: var(--bg-subtle); aspect-ratio: 1200 / 630;
}
/* 封面图铺满；加载失败时移除 img，露出底层分类占位块 */
.doc-cover img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.doc-title { font-size: 16px; font-weight: 600; line-height: 1.5; }
.doc-summary { margin-top: 8px; font-size: 13px; color: var(--text-secondary); line-height: 1.7; }
.doc-meta { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; }
.doc-date { font-size: 12px; color: var(--text-muted); }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== 胶囊 chips ===== */
.chips { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.chip {
    display: inline-flex; align-items: center; padding: 8px 18px; border-radius: var(--radius-pill);
    border: 1px solid var(--border); background: var(--surface); font-size: 14px; color: var(--text-body);
    transition: all .15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); background: var(--tag-bg); }

/* ===== 页脚 ===== */
.footer { background: var(--bg-subtle); border-top: 1px solid var(--border); margin-top: 48px; }
.footer-inner {
    max-width: none; margin: 0 auto; padding: 24px var(--pad-x);
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    font-size: 13px; color: var(--text-secondary);
}
.footer-links { display: flex; gap: 20px; }
.footer-links a:hover { color: var(--primary); }
/* 备案行：ICP 与公安备案同行展示，窄屏自动换行不溢出 */
.footer-icp { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; text-align: center; }
.footer-icp a { color: var(--text-secondary); display: inline-flex; align-items: center; gap: 5px; }
.footer-icp a:hover { color: var(--primary); }
/* 公安备案图标：与文字同行，窄屏随整条链接换行，不单独掉到文字外 */
.footer-icp-icon { width: 16px; height: 16px; flex-shrink: 0; vertical-align: middle; }
.footer-icp-sep { color: var(--text-secondary); opacity: .55; }

/* ===== 登录/注册（左右分栏） ===== */
.auth-page { display: flex; min-height: 100vh; }
.auth-brand {
    width: 45%; min-height: 100vh; background: linear-gradient(135deg, #4C58BE 0%, #6B4FBE 100%);
    color: #fff; display: flex; flex-direction: column; justify-content: center; align-items: center;
    position: relative; overflow: hidden;
}
.auth-brand::before { content: ""; position: absolute; width: 600px; height: 600px; border-radius: 50%; background: rgba(255,255,255,.05); top: -210px; right: -210px; }
.auth-brand::after { content: ""; position: absolute; width: 400px; height: 400px; border-radius: 50%; background: rgba(255,255,255,.07); bottom: -96px; left: -96px; }
.auth-brand-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; z-index: 2; }
.auth-brand-logo .icon {
    width: 48px; height: 48px; border-radius: 12px; background: rgba(255,255,255,.2);
    backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: bold;
}
.auth-brand-logo .name { font-size: 28px; font-weight: 600; letter-spacing: 1px; }
.auth-brand-slogan { font-size: 15px; opacity: .82; margin-bottom: 60px; z-index: 2; }
.auth-brand-points { z-index: 2; font-size: 14px; line-height: 2.6; opacity: .92; }
.auth-brand-points div { display: flex; align-items: center; gap: 12px; }
.auth-brand-points .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--surface); }
.auth-form-side { flex: 1; background: var(--surface); display: flex; flex-direction: column; justify-content: center; padding: 48px 64px; }
.auth-form-box { max-width: 380px; width: 100%; margin: 0 auto; }
.auth-title { font-size: 24px; font-weight: 600; color: #262626; margin-bottom: 8px; }
.auth-sub { font-size: 14px; color: #8c8c8c; margin-bottom: 32px; }
.auth-field { margin-bottom: 20px; }
.auth-field label { display: block; font-size: 14px; color: #262626; margin-bottom: 6px; }
.auth-field label .req { color: var(--danger); margin-right: 4px; }
.auth-input {
    width: 100%; height: 42px; border: 1px solid #d9d9d9; border-radius: 7px;
    padding: 0 12px; font-size: 14px; transition: all .2s;
}
.auth-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(76,88,190,.13); }
.auth-btn-main {
    width: 100%; height: 44px; border: none; border-radius: 7px; background: var(--primary);
    color: #fff; font-size: 15px; cursor: pointer; transition: background .2s;
}
.auth-btn-main:hover { background: #6C7BEA; }
.auth-form-foot { text-align: center; margin-top: 24px; font-size: 14px; color: #8c8c8c; }
.auth-link { color: var(--primary); }
.auth-link:hover { text-decoration: underline; }

/* ===== 表单通用 ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: var(--radius-btn); font-size: 14px; font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(76,88,190,.13);
}

/* ===== 响应式 ===== */
/* 卡片列数全部交给 auto-fill，断点里只调间距与导航密度 */
/* 平板宽度：压缩导航间距与搜索框宽度，避免右侧挤压溢出 */
@media (max-width: 1024px) and (min-width: 769px) {
    .nav-links { gap: 12px; font-size: 13px; }
    .nav-search { width: 240px; }
}
@media (max-width: 860px) and (min-width: 769px) {
    .nav-links { gap: 8px; }
    .nav-search { width: 210px; }
}
@media (max-width: 768px) {
    .grid-4, .grid-3 { grid-template-columns: 1fr; }
    .tool-grid { gap: 12px; }
    /* 移动端压缩上下留白，单列时一屏能看到更多卡片 */
    .page-head { padding: var(--breadcrumb-gap) 0 20px; }
    .section { margin-top: 32px; }
    .auth-brand { display: none; }
    .hero h1 { font-size: 24px; }

    /* 移动端导航：logo + 搜索框 + 登录状态同处一行，高度固定 64px，不换行、不叠行 */
    .nav, .nav-inner { height: 64px; min-height: 64px; }
    .nav-inner { flex-wrap: nowrap; gap: 8px; }
    /* 收藏与 EXE 下载只在桌面导航出现，移动端彻底隐藏（不占位、不进 Tab 顺序） */
    .nav-links .nav-fav-btn, .nav-links .nav-download-link { display: none; }

    /* 无抽屉：.nav-links 回到导航行内的普通容器，只承载登录/用户区 */
    .nav-links {
        position: static; order: 3; flex: none; width: auto; height: auto; max-height: none;
        flex-direction: row; align-items: center; gap: 0;
        padding: 0; margin: 0; background: transparent; box-shadow: none;
        transform: none; overflow: visible; z-index: auto;
    }
    .nav-links .nav-login-btn {
        margin: 0; padding: 6px 14px; font-size: 13px; white-space: nowrap;
    }
    .nav-links .nav-login-btn:hover { transform: none; }

    /* 搜索框常驻并内联在 logo 与登录之间，吃掉剩余宽度；保底 96px 不被挤没 */
    .nav-search {
        display: block; order: 2; flex: 1 1 auto; min-width: 96px;
        position: static; left: auto; transform: none; width: auto;
    }
    .nav-search-panel { display: block; width: 100%; padding: 0; }
    .nav-search .dx-search-box { height: 34px; padding: 0 8px; }
    .nav-search .dx-search-submit { height: 24px; padding: 0 9px; font-size: 12px; }

    /* 移动端页脚：链接换行居中 */
    .footer-links { flex-wrap: wrap; justify-content: center; gap: 12px 16px; }
}

/* ===== 小屏微调（≤480px） ===== */
@media (max-width: 480px) {
    .hero { padding: 44px 16px 64px; }
    .hero h1 { font-size: 22px; }
    .hero-search button { padding: 0 18px; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stats { margin-top: -20px; }
    .stat { padding: 14px 12px; }
    .stat-num { font-size: 20px; }
    .stat-label { font-size: 12px; }
    .stat-sub { font-size: 10.5px; }
    .section-head h2 { font-size: 17px; }
    /* 极窄屏：区块标题独占一行，右侧「查看全部」自动换到下一行，标题不再被挤断 */
    .section-head { flex-wrap: wrap; gap: 4px 12px; }
    .section-head h2 { flex: 1 0 100%; }
    /* 登录/注册缩成图标按钮，把宽度留给搜索框 */
    .nav-links .nav-login-btn {
        width: 34px; height: 34px; padding: 0; font-size: 0;
        display: inline-flex; align-items: center; justify-content: center;
    }
    .nav-links .nav-login-btn::after { content: "👤"; font-size: 15px; line-height: 1; }
    /* 极窄屏：品牌只留方形图标，把宽度让给搜索框，避免三样互相挤压 */
    .brand-name { display: none; }
    .nav-inner { gap: 6px; }
}

/* ============================================================
   前台左侧分类导航 + 移动端抽屉 + 底部栏
   ============================================================ */
/* 桌面 ≥1400：侧栏常驻，主内容整体右移 240，顶部导航反向铺满整宽 */
.sider { display: none; }
@media (min-width: 1400px) {
    body:has(> .sider) { padding-left: var(--sider-w); }
    /* 导航条向左溢出到侧栏上方区域，保持通栏 */
    body:has(> .sider) > .nav { margin-left: calc(-1 * var(--sider-w)); }
    .sider {
        display: flex; flex-direction: column;
        position: fixed; top: var(--nav-h); left: 0; bottom: 0; width: var(--sider-w);
        background: var(--surface); border-right: 1px solid var(--border-light); z-index: 45;
    }
}
/* 窄屏：侧栏变抽屉，默认完全移出视口，收起时不留阴影 */
.sider-mask { display: none; }
@media (max-width: 1399px) {
    .sider {
        display: flex; flex-direction: column;
        position: fixed; top: var(--nav-h); left: 0; bottom: 0; width: min(280px, 82vw);
        background: var(--surface); border-right: 1px solid var(--border-light); z-index: 90;
        transform: translateX(-100%); transition: transform .25s ease; box-shadow: none;
    }
    .sider.open { transform: none; box-shadow: 8px 0 24px rgba(17,24,39,.12); }
    .sider-mask { position: fixed; inset: var(--nav-h) 0 0; background: rgba(17,24,39,.38); z-index: 85; }
    .sider-mask.show { display: block; }
    body.sider-open { overflow: hidden; }
}

.sider-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 12px 18px; }
.sider-quick { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; margin-bottom: 6px; border-bottom: 1px solid var(--border-light); }
.sider-quick a { padding: 8px 10px; border-radius: 8px; font-size: 14px; color: var(--text-body); transition: background .15s, color .15s; }
.sider-quick a:hover { background: var(--bg); color: var(--primary); }
.sider-quick a.active { background: var(--tag-bg); color: var(--primary); font-weight: 600; }
/* 主题平铺：主题 36px 行 → 子项 32px 行，靠字号、颜色、缩进三层拉开层级 */
.sider-topics { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; }
.sider-topic {
    display: flex; align-items: center; gap: 9px;
    min-height: 36px; padding: 0 10px; border-left: 3px solid transparent; border-radius: 8px;
    font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--text-title);
    transition: background .15s, color .15s;
}
.sider-topic-icon { width: 16px; height: 16px; flex-shrink: 0; color: currentColor; }
/* 展开箭头：当前主题朝下，其余朝右；纯样式实现，不额外加节点 */
.sider-topic::after {
    content: ''; width: 7px; height: 7px; margin-left: auto; flex-shrink: 0;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg); opacity: .55; transition: transform .15s;
}
.sider-topic.active::after { transform: rotate(45deg); opacity: .9; }
.sider-topic:hover { background: var(--bg); color: var(--primary); }
/* 当前主题：强调竖条 + 强调色/加粗 + 比悬停更淡的浅底，整体像一个可展开的组 */
.sider-topic.active {
    border-left-color: var(--primary); color: var(--primary); font-weight: 600;
    background: color-mix(in srgb, var(--primary) 5%, var(--surface));
}
.sider-link { display: block; padding: 6px 10px; font-size: 13px; line-height: 1.5; color: var(--text-secondary); border-radius: 6px; }
.sider-link:hover { color: var(--primary); background: var(--bg); }
.sider-link.active { color: var(--primary); background: var(--tag-bg); font-weight: 600; }
.sider-sub { margin: 4px 0 8px; }
/* 分组标记：11px 浅灰、字距略放开，只做标识，不可点击 */
.sider-sub-title {
    display: block; margin: 8px 0 4px; padding-left: 32px;
    font-size: 11px; font-weight: 500; letter-spacing: .06em; color: var(--text-muted);
}
/* 子项：字号降一级、颜色退到次要文字色、行高 32px，左内边距对齐主题图标右缘 */
.sider-link--sub {
    height: 32px; padding: 0 10px 0 32px; font-size: 13px; line-height: 32px;
    color: var(--text-secondary);
}
.sider-link--sub:not(.active):hover { background: color-mix(in srgb, var(--bg-subtle) 45%, var(--surface)); }
/* 键盘可达：主题行与子项统一焦点轮廓 */
.sider-topic:focus-visible,
.sider-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* 抽屉底部入口（EXE 下载 / 收藏）：手机端把原本隐藏的两项补回 */
.sider-foot { display: none; }

/* 汉堡按钮：仅侧栏收起时出现 */
.nav-toggle {
    display: none; width: 34px; height: 34px; flex-shrink: 0;
    align-items: center; justify-content: center;
    border: 1px solid var(--border); background: var(--surface); border-radius: 8px;
    font-size: 17px; line-height: 1; color: var(--text-body); cursor: pointer;
}
.nav-toggle:hover { border-color: var(--primary); color: var(--primary); }

/* ===== 移动端底部栏（≤768 显示，桌面完全不占空间） ===== */
.bottom-bar { display: none; }
@media (max-width: 1399px) {
    .nav-toggle { display: inline-flex; }
}
@media (max-width: 768px) {
    .nav-toggle { width: 32px; height: 32px; font-size: 16px; }
    .sider-quick { display: none; }
    .sider-foot {
        display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--border-light); background: var(--surface);
    }
    .sider-foot a, .sider-foot button {
        flex: 1; display: inline-flex; align-items: center; justify-content: center;
        height: 36px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
        font-size: 13px; font-family: inherit; color: var(--text-body); cursor: pointer;
    }
    .sider-foot a:hover, .sider-foot button:hover { border-color: var(--primary); color: var(--primary); }
    .sider-foot a.active { border-color: var(--primary); color: var(--primary); background: var(--tag-bg); }

    .bottom-bar {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
        height: calc(var(--bottom-bar-h) + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        background: rgba(255,255,255,.97); backdrop-filter: blur(8px);
        border-top: 1px solid var(--border);
    }
    .bottom-bar a {
        flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
        gap: 2px; font-size: 11px; line-height: 1.2; color: var(--text-secondary);
    }
    .bottom-bar svg { width: 22px; height: 22px; }
    .bottom-bar a.active { color: var(--primary); font-weight: 600; }
    /* 主体让出底栏高度，避免内容被压住 */
    body:has(> .bottom-bar) { padding-bottom: calc(var(--bottom-bar-h) + env(safe-area-inset-bottom)); }
}

/* ============================================================
   管理后台布局（参考 Code Times PR 系列：深色侧边栏）
   ============================================================ */
/* overflow-x: clip 而非 hidden：避免创建滚动容器导致内部 position:sticky 失效 */
.admin-layout { min-height: 100vh; background: #f0f2f5; overflow-x: clip; }
.admin-header {
    height: 64px; background: var(--surface); box-shadow: 0 1px 4px rgba(0,21,41,.08);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; position: sticky; top: 0; z-index: 10;
}
/* 注意：前台品牌图标也用 .logo 类（28×28 渐变方块），此处需重置，避免后台 header 被渲染成紫色色带 */
.admin-header .logo {
    display: flex; align-items: center; gap: 10px; min-width: 0;
    width: auto; height: auto; border-radius: 0; background: none;
    color: inherit; font-size: inherit; letter-spacing: normal; font-weight: inherit;
}
.admin-header .logo-icon {
    width: 32px; height: 32px; background: #001529; color: #fff; border-radius: 6px;
    display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: bold;
    flex-shrink: 0;
}
.admin-header .logo-text {
    font-size: 18px; font-weight: 600; color: #262626;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.admin-header .admin-user { display: flex; align-items: center; gap: 8px; cursor: pointer; color: #595959; font-size: 14px; flex-shrink: 0; }
.admin-header .avatar {
    width: 32px; height: 32px; border-radius: 50%; background: var(--primary);
    color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px;
}
/* 移动端侧栏开关（桌面隐藏） */
.admin-sider-toggle {
    display: none; align-items: center; justify-content: center;
    width: 34px; height: 34px; margin-right: 10px; border: 1px solid #e5e7eb;
    border-radius: 6px; background: var(--surface); color: #262626; font-size: 17px; cursor: pointer;
}
.admin-sider-toggle:hover { border-color: var(--primary); color: var(--primary); }
.admin-sider-mask { display: none; }
/* 左侧深色列用 body 渐变铺满整页高度：长列表滚动时侧栏下方不再露白；
   sider 本身 sticky + 视口高度，菜单随滚动常驻可见 */
.admin-body {
    display: flex; align-items: stretch; min-height: calc(100vh - 64px);
    width: 100%; max-width: 100%;
    background: linear-gradient(to right, #001529 0, #001529 208px, #f0f2f5 208px, #f0f2f5 100%);
}
.admin-sider {
    width: 208px; height: calc(100vh - 64px); background: #001529; padding: 16px 0;
    flex-shrink: 0; display: flex; flex-direction: column; overflow-y: auto;
    position: sticky; top: 64px;
}
.admin-menu-item {
    height: 40px; line-height: 40px; padding: 0 24px; color: rgba(255,255,255,.65);
    font-size: 14px; cursor: pointer; display: block;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.admin-menu-item:hover { color: #fff; }
.admin-menu-item.active { background: var(--primary); color: #fff; }
.admin-content { flex: 1 1 0; min-width: 0; max-width: 100%; padding: 24px; }

.admin-card { background: var(--surface); border-radius: 8px; padding: 20px 24px; min-width: 0; width: 100%; max-width: 100%; }
.admin-page-title { font-size: 16px; font-weight: 600; color: #262626; margin-bottom: 16px; }

/* 查询表单 */
.query-form { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; padding-bottom: 16px; border-bottom: 1px solid #f0f0f0; }
.query-item label { display: block; font-size: 13px; color: #595959; margin-bottom: 6px; }
.query-input, .query-select {
    width: 180px; height: 32px; border: 1px solid #d9d9d9; border-radius: 6px;
    padding: 0 11px; font-size: 14px;
}
.query-input:focus, .query-select:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 2px rgba(76,88,190,.2); }
.query-btns { display: flex; gap: 8px; }
.admin-btn {
    height: 32px; padding: 0 15px; border-radius: 6px; font-size: 14px; cursor: pointer;
    border: 1px solid transparent; display: inline-flex; align-items: center;
    justify-content: center; text-decoration: none; white-space: nowrap;
}
.admin-btn.primary { background: var(--primary); color: #fff; }
.admin-btn.primary:hover { background: #6C7BEA; }
.admin-btn.default { background: var(--surface); border-color: #d9d9d9; color: #595959; }
.admin-btn.default:hover { border-color: var(--primary); color: var(--primary); }
.admin-btn.danger { background: var(--surface); border-color: #ffccc7; color: #ff4d4f; }
.admin-btn.danger:hover { background: #ff4d4f; color: #fff; }

/* 工具栏 */
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; }
.admin-toolbar-title { font-size: 15px; font-weight: 600; color: #262626; }

/* 表格 */
/* 所有后台表格统一套滚动容器，窄屏只横向滚动表格，不撑破页面 */
.admin-table-wrap { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* table-layout: fixed：列宽由 th 决定，长文本可被 nowrap + ellipsis 截断，避免单元格撑高行 */
.admin-table { width: 100%; min-width: 720px; table-layout: fixed; border-collapse: collapse; font-size: 14px; }
.admin-table thead th {
    background: #fafafa; color: #262626; font-weight: 600; text-align: left;
    padding: 10px 12px; border-bottom: 1px solid #f0f0f0; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.admin-table tbody td {
    padding: 6px 12px; border-bottom: 1px solid #f0f0f0; color: #595959;
    vertical-align: middle; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.admin-table tbody tr:hover { background: #f5f9ff; }
/* 操作列：禁止省略号裁剪按钮，按钮不压缩；列宽由 th 显式指定（2 按钮 ≥100px、3-4 按钮 ≥160px） */
.admin-table td.col-actions { white-space: nowrap; overflow: visible; text-overflow: clip; }
.admin-table td.col-actions .op-group,
.admin-table td.col-actions .op-btn,
.admin-table td.col-actions .op-link { flex-shrink: 0; }
/* 文章列表封面缩略图：有封面显示图，无封面显示弱化占位，便于批量补封面 */
.a-title-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.a-title-cell > a {
    min-width: 0; max-width: 380px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.a-cover-thumb, .a-cover-none {
    width: 40px; height: 24px; border-radius: 4px; flex-shrink: 0;
}
.a-cover-thumb { object-fit: cover; border: 1px solid #f0f0f0; }
.a-cover-none {
    background: #f0f2f5; border: 1px solid #e5e7eb; color: #b0b3ba;
    font-size: 10px; display: inline-flex; align-items: center; justify-content: center;
}
/* 无封面时按分类给弱色块，避免像加载失败 */
.a-cover-none.blue { background: #f0f5ff; border-color: #d6e4ff; color: #7f93d6; }
.a-cover-none.orange { background: #fff7e6; border-color: #ffe7ba; color: #d48806; font-size: 13px; }
.a-cover-none.red { background: #fff2f0; border-color: #ffccc7; color: #ff7875; font-size: 13px; }
.admin-tag { display: inline-block; font-size: 12px; padding: 0 7px; height: 22px; line-height: 20px; border-radius: 4px; border: 1px solid; white-space: nowrap; }
.admin-tag.blue { color: var(--primary); background: #e6f7ff; border-color: #91d5ff; }
.admin-tag.green { color: #52c41a; background: #f6ffed; border-color: #b7eb8f; }
.admin-tag.red { color: #ff4d4f; background: #fff2f0; border-color: #ffccc7; }
.admin-tag.orange { color: #fa8c16; background: #fff7e6; border-color: #ffd591; }
.admin-tag.gray { color: #8c8c8c; background: #fafafa; border-color: #e5e7eb; }
/* 分类标签弱化：避免被误认成可点击按钮 */
.admin-tag.cat { color: #8c8c8c; background: transparent; border-color: #e5e7eb; font-weight: 400; }
.op-link { color: var(--primary); cursor: pointer; margin-right: 12px; white-space: nowrap; }
.op-link:hover { color: #6C7BEA; }
.op-link.danger { color: #ff4d4f; }
.op-link.danger:hover { color: #ff7875; }
/* 操作按钮组 */
.op-group { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.op-btn {
    display: inline-flex; align-items: center; height: 26px; padding: 0 9px;
    border: 1px solid #e5e7eb; border-radius: 5px; background: var(--surface); color: #595959;
    font-size: 12.5px; line-height: 1; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.op-btn:hover { border-color: var(--primary); color: var(--primary); }
.op-btn.danger:hover { border-color: #ff4d4f; color: #ff4d4f; background: #fff2f0; }
/* 列表状态 / 时间列禁止折行 */
.col-nowrap { white-space: nowrap; }

/* 键盘可达性 */
.admin-menu-item:focus-visible,
.op-link:focus-visible,
.op-btn:focus-visible,
.admin-switch:focus-visible,
.admin-btn:focus-visible,
.admin-page-btn:focus-visible,
.admin-sider-toggle:focus-visible {
    outline: 2px solid var(--primary); outline-offset: 2px;
}
.admin-sider .admin-menu-item:focus-visible { outline-color: #fff; }

/* 后台轻提示 toast */
.dx-toast-wrap {
    position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
    z-index: 9999; display: flex; flex-direction: column; align-items: center;
    gap: 8px; pointer-events: none;
}
.dx-toast {
    max-width: calc(100vw - 32px); padding: 9px 16px; border-radius: 6px;
    background: #262626; color: #fff; font-size: 13.5px; line-height: 1.5;
    box-shadow: 0 6px 20px rgba(0,0,0,.18);
    opacity: 0; transform: translateY(-6px); transition: opacity .2s, transform .2s;
}
.dx-toast.show { opacity: 1; transform: translateY(0); }
.dx-toast.error { background: #ff4d4f; }
.dx-toast.success { background: #52c41a; }

/* 后台分页 */
.admin-pagination { display: flex; justify-content: flex-end; align-items: center; gap: 6px; padding-top: 16px; font-size: 14px; color: #595959; flex-wrap: wrap; }
.admin-page-info { margin-right: auto; color: #8c8c8c; font-size: 13px; }
.admin-page-btn {
    min-width: 32px; height: 32px; line-height: 30px; text-align: center;
    border: 1px solid #d9d9d9; border-radius: 6px; cursor: pointer; background: var(--surface); padding: 0 8px;
    color: #595959; text-decoration: none;
}
.admin-page-btn.active { border-color: var(--primary); color: var(--primary); background: #f5f7ff; }
/* 单页时上一页/下一页置灰但仍可见 */
.admin-page-btn.disabled { color: #bfbfbf; cursor: not-allowed; background: #f5f5f5; border-color: #e8e8e8; pointer-events: none; }
.page-ellipsis { min-width: 24px; text-align: center; color: #bfbfbf; user-select: none; }
.admin-page-size {
    height: 32px; padding: 0 8px; border: 1px solid #d9d9d9; border-radius: 6px;
    background: var(--surface); color: #595959; font-size: 13px; cursor: pointer; outline: none;
}
.admin-page-size:focus { border-color: var(--primary); }

/* ===== 列表页视口内自适应：筛选/统计固定，表格区可滚动，分页条吸底，整页不出现纵向滚动条 =====
   用法：在列表页的 .admin-layout 上加 class="admin-list-page"；长内容页（如文章编辑）不加。 */
.admin-list-page { height: 100vh; overflow: hidden; }
.admin-list-page .admin-body { height: calc(100vh - 64px); min-height: 0; }
.admin-list-page .admin-content {
    display: flex; flex-direction: column; height: 100%; min-height: 0; box-sizing: border-box;
}
.admin-list-page .admin-card { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
/* 卡片内除表格/分页外的子元素（标题、查询、工具栏、Tab 头）不参与收缩 */
.admin-list-page .admin-card > * { flex-shrink: 0; }
/* 普通列表页：表格容器直接作为卡片子元素，flex:1 占满剩余空间并内部滚动 */
.admin-list-page .admin-card > .admin-table-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; }
/* 速查页：Tab 面板作为卡片子元素，需自身也是 flex 列，内部再放查询/表格/分页 */
.admin-list-page .admin-card > [id^="tab-"] {
    flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0;
}
.admin-list-page .admin-card > [id^="tab-"] > * { flex-shrink: 0; }
.admin-list-page .admin-table-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; }
.admin-list-page .admin-pagination { flex-shrink: 0; }
/* 表头吸顶：表格区内部滚动时表头常驻可见 */
.admin-list-page .admin-table thead th { position: sticky; top: 0; z-index: 2; }

/* 开关 */
.admin-switch {
    position: relative; width: 44px; height: 22px; background: var(--primary);
    border-radius: 11px; cursor: pointer; display: inline-block; vertical-align: middle;
    transition: background .2s; border: none;
}
.admin-switch::after {
    content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%;
    background: var(--surface); top: 2px; left: 24px; transition: left .2s;
}
.admin-switch.off { background: #bfbfbf; }
.admin-switch.off::after { left: 2px; }

/* ===== 后台响应式 ===== */
@media (max-width: 1024px) {
    .admin-sider { width: 176px; }
    .admin-body { background: linear-gradient(to right, #001529 0, #001529 176px, #f0f2f5 176px, #f0f2f5 100%); }
    .admin-menu-item { padding: 0 16px; }
    .admin-content { padding: 16px; }
    .admin-card { padding: 16px; }
    .admin-header { padding: 0 16px; }
    .admin-header .logo-text { font-size: 16px; }
}
@media (max-width: 768px) {
    .admin-header { padding: 0 12px; }
    .admin-header .logo { min-width: 0; flex: 1 1 auto; }
    .admin-header .logo-text { display: none; }
    .admin-sider-toggle { display: inline-flex; }
    .admin-body { display: block; width: 100%; max-width: 100%; background: #f0f2f5; }
    .admin-sider {
        display: none; position: fixed; top: 64px; bottom: 0; left: 0; width: 208px;
        min-height: 0; z-index: 20;
    }
    .admin-sider.open { display: flex; }
    .admin-sider-mask {
        display: none; position: fixed; top: 64px; right: 0; bottom: 0; left: 0;
        background: rgba(0,0,0,.35); z-index: 15;
    }
    .admin-sider-mask.show { display: block; }
    .admin-content { width: 100%; max-width: 100%; padding: 12px; }
    .admin-card { padding: 12px; }
    .admin-page-title { font-size: 15px; }
    .admin-toolbar { flex-wrap: wrap; gap: 8px; padding: 12px 0; }
    .admin-toolbar > span:last-child { margin-left: 0 !important; }
    .admin-toolbar-title { white-space: normal; word-break: break-word; }
    .admin-header .admin-user #adminUserName { display: none; }
    .admin-header .admin-user a { margin-left: 4px !important; font-size: 12px; }
    .query-form { display: block; width: 100%; max-width: 100%; }
    .query-input, .query-select { width: 100% !important; max-width: 100% !important; }
    .query-row { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; max-width: 100%; }
    .query-row > * { flex: 1 1 100%; width: 100%; max-width: 100%; }
    .admin-table-wrap { width: 100% !important; max-width: 100% !important; }
    /* 小屏下列表页恢复自然滚动，不强制视口内自适应 */
    .admin-list-page { height: auto; min-height: 100vh; overflow: visible; }
    .admin-list-page .admin-body { height: auto; min-height: calc(100vh - 64px); }
    .admin-list-page .admin-content { height: auto; display: block; }
    .admin-list-page .admin-card { display: block; }
    .admin-list-page .admin-card > [id^="tab-"] { display: block; }
}

/* ============================================================
   工单页（前台公开站风格）
   ============================================================ */
.ticket-tabs { display: flex; gap: 8px; margin-top: 20px; border-bottom: 1px solid var(--border-light); }
.ticket-tab {
    padding: 10px 20px; font-size: 14.5px; font-weight: 500; color: var(--text-secondary);
    cursor: pointer; border-bottom: 2px solid transparent; transition: all .15s;
}
.ticket-tab:hover { color: var(--primary); }
.ticket-tab.active { color: var(--primary); font-weight: 700; border-bottom-color: var(--primary); }

.ticket-card { background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius-card); padding: 24px; margin-top: 20px; }

.ticket-form-item { margin-bottom: 18px; }
.ticket-form-label { display: block; font-size: 13.5px; color: var(--text-body); margin-bottom: 8px; font-weight: 500; }
.ticket-form-label .required { color: #ff4d4f; margin-right: 2px; }
.ticket-input, .ticket-textarea, .ticket-select {
    width: 100%; border: 1px solid #d9dce5; border-radius: 10px; padding: 10px 14px;
    font-size: 14px; font-family: inherit; color: var(--text-title);
    transition: border-color .2s, box-shadow .2s;
}
.ticket-input:focus, .ticket-textarea:focus, .ticket-select:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(76,88,190,.15);
}
.ticket-textarea { height: 140px; resize: vertical; line-height: 1.7; }
.ticket-form-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* 工单状态标签 */
.tk-status { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 6px; border: 1px solid; }
.tk-pending { color: #fa8c16; background: #fff7e6; border-color: #ffd591; }
.tk-processing { color: var(--primary); background: var(--tag-bg); border-color: #c5cbf2; }
.tk-resolved { color: #52c41a; background: #f6ffed; border-color: #b7eb8f; }
.tk-closed { color: #8c8c8c; background: #fafafa; border-color: var(--border); }

/* 工单列表行 */
.tk-row { display: flex; align-items: center; gap: 16px; padding: 16px 4px; border-bottom: 1px solid var(--border-light); }
.tk-row:last-child { border-bottom: none; }
.tk-main { flex: 1; min-width: 0; }
.tk-title { font-size: 14.5px; font-weight: 600; color: var(--text-title); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.tk-op { flex-shrink: 0; font-size: 13px; color: var(--primary); font-weight: 500; cursor: pointer; }
.tk-op:hover { text-decoration: underline; }


