/* ═══════════════════════════════════════════════════════════════════════
   用户端皮肤 (site_skin.css) —— 前台与管理端共用同一套设计语言
   ─────────────────────────────────────────────────────────────────────
   用途：在 36 个前台壳页（home / team / contest / train / sign_in /
         upload_file / honour / news / consult / user / agent_* /
         login / register / modify / reset_password / forgot_password …）
         的 </head> 前引用，**顺序固定**：

             bootstrap.min.css
             bootstrap-theme.min.css
             general.css            ← 前台工具类（保留，不动）
             <页面自带 <style>>      ← 页面私有规则（保留，不动）
             /api/static/admin_skin.css   ← 设计令牌 + 组件语言（与管理端同一份）
             /api/static/site_skin.css    ← 本文件：前台专用叠加层

   为什么叠在 admin_skin.css 之上而不是重写一份皮肤：
     后台皮肤里的 :root 令牌、.table / .jumbotron / .panel / .btn / .pagination /
     .alert 规则通用于两侧（Bootstrap 3 底座相同），前台只需要补
     「导航条、认证页、新闻列表、助手页」这些后台没有的版式。
     一份令牌 → 改色只动一处，前后台不会走岔。

   约束：本文件只写视觉，不改任何页面结构；对页面行内 style 用 !important 兜底。
   ═══════════════════════════════════════════════════════════════════════ */

/* ── 版面：内容区留白 / 窄屏流体 ─────────────────────────────────────── */
body {
    padding-bottom: 48px;
}

.container {
    padding-left: 16px;
    padding-right: 16px;
}

@media (max-width: 1199px) {
    .container {
        width: 100%;
        max-width: 100%;
        padding-left: 14px;
        padding-right: 14px;
    }
}

.container > .jumbotron {
    margin-top: 2px;
}

/* ── 前台导航（site_nav.js 注入的 nav#site-nav > ul.nav.nav-pills）─────
   元素上还带着 JS 写的行内 style（background:white; padding:1px 10px），
   admin_skin 已用 !important 接管背景与内边距，这里只补前台特有的效果。

   V2 切页抖动修复：`site_nav.js` 是 defer 运行时插入，sticky 会占文档流、
   把 .container 内容推下约 50px（首屏可见的「跳一下」）。改 fixed 脱离文档流，
   插入时机/位置都不再产生位移；补偿高度由 JS 插入后给 body 打 .nau-nav-ready
   时写入（用 CSS 变量 --nau-nav-h 由 JS 实测，见 site_nav.js）。 ──────── */
#site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    backdrop-filter: saturate(1.4) blur(6px);
}

body.nau-nav-ready {
    padding-top: var(--nau-nav-h, 0px);
}

#site-nav .nav-pills > li > a {
    line-height: 1.4;
}

#site-nav .nav-pills > li.pull-right > a,
#site-nav .nav-pills > li.pull-right > a:focus {
    color: var(--nau-muted) !important;
}

#site-nav .nav-pills > li.pull-right > a:hover {
    background: var(--nau-line-2) !important;
    color: var(--nau-brand) !important;
}

#site-nav #nav-item-me > a {
    font-weight: 600;
    color: var(--nau-brand) !important;
}

#site-nav #nav-item-logout > a:hover {
    background: #fef2f2 !important;
    color: var(--nau-danger) !important;
}

@media (max-width: 767px) {
    #site-nav {
        position: static;
    }

    body.nau-nav-ready {
        padding-top: 0;
    }
}

/* ── 标题层级：首屏大标题 / 分节标题 ─────────────────────────────────── */
.jumbotron > h1:first-child,
.jumbotron > h2:first-child,
.jumbotron > h3:first-child {
    margin-top: 0;
}

.jumbotron h3 {
    margin: 30px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--nau-line-2);
    font-size: 17px;
    font-weight: 700;
    color: var(--nau-ink);
}

.jumbotron h3:first-of-type {
    margin-top: 6px;
}

.jumbotron h3 small {
    margin-left: 6px;
    font-size: 13px;
    font-weight: 400;
    color: var(--nau-muted);
}

.jumbotron h4 {
    font-size: 14.5px;
    font-weight: 600;
}

.jumbotron p {
    color: var(--nau-ink-2);
}

.page-header {
    margin: 6px 0 18px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--nau-line);
}

.page-header h1,
.page-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

/* ── 首页 logo 区（home.html 的 <table class="neauacm_logo">）──────────── */
.neauacm_logo {
    width: auto !important;
    margin: 0 auto 14px !important;
}

.neauacm_logo td {
    padding: 0 14px 0 0;
    vertical-align: middle;
    border: 0;
}

.neauacm_logo h2 {
    margin: 0;
    font-size: 25px;
    font-weight: 700;
    letter-spacing: .4px;
}

.neauacm_logo img {
    border-radius: 20px;
    box-shadow: var(--nau-shadow-sm);
}

/* ── 辅助文本 / 页脚条 ───────────────────────────────────────────────── */
.shell-bar {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--nau-muted);
}

.shell-bar code {
    padding: 1px 6px;
    border-radius: 6px;
    background: #f1f5f9;
    color: var(--nau-ink-2);
}

.muted,
.text-muted {
    color: var(--nau-muted) !important;
}

/* ── 表格：前台宽表与滚动单元格 ─────────────────────────────────────── */
/* 老页面给数据表写了 width="80%" align="center"，在卡片里显得左右缩进、
   与分节标题不对齐；统一拉满卡片宽度（仅内容区表格，不动布局表） */
.jumbotron table.table {
    width: 100% !important;
}

.scrollable,
.neau-scrollable {
    border-radius: var(--nau-radius-sm);
}

.table-scrollable {
    table-layout: fixed;
}

.scrollable-cell {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}

.table > tbody > tr > td .user_name,
.user_name {
    color: var(--nau-ink);
    font-weight: 500;
}

.user_name:hover {
    color: var(--nau-brand) !important;
    text-decoration: none;
}

/* ── 新闻列表（home.html 的 #news-list .media 结构）─────────────────── */
#news-list .media {
    margin: 0;
    padding: 12px 10px;
    border-radius: 10px;
    transition: background .15s ease;
}

#news-list .media:hover {
    background: #f8fafc;
}

#news-list .media-left {
    padding-right: 14px;
}

#news-list .media-left img {
    border-radius: 10px;
    object-fit: cover;
    box-shadow: var(--nau-shadow-sm);
}

#news-list .media-heading {
    margin-bottom: 4px;
    font-size: 15px;
    font-weight: 600;
}

#news-list .media-heading small {
    margin-left: 6px;
    font-weight: 400;
    color: var(--nau-faint);
}

#news-list hr {
    margin: 4px 0;
    border-top: 1px solid var(--nau-line-2);
}

/* ── 徽标：把旧 .label 收成圆角小标签 ────────────────────────────────── */
.label {
    border-radius: 999px;
    padding: 2px 9px;
    font-size: 11.5px;
    font-weight: 600;
    vertical-align: 1px;
}

/* ── 清掉 bootstrap-theme 的旧渐变 ─────────────────────────────────────
   前台页面（不同于后台）多引了 bootstrap-theme.min.css，它给 .btn-* /
   .panel-heading / .navbar 加了 linear-gradient 背景图；background-image
   会盖在 admin_skin 的 background-color 之上，导致按钮颜色不跟令牌走。
   这里统一置 none，颜色回到 admin_skin 的 --nau-* 令牌。 */
.btn,
.button,
.nau-button,
.neau-button,
.btn-default,
.btn-primary,
.btn-warning,
.btn-danger,
.btn-success,
.btn-info,
.panel-heading,
.panel-default > .panel-heading,
.navbar,
.navbar-default,
.label,
.alert,
.progress-bar,
.thumbnail {
    background-image: none !important;
}

/* ── 按钮语义类：general.css 的 .valid / .invalid / .neau-* 收口 ────── */
.valid,
.neau-green,
.neau-valid {
    background-color: var(--nau-brand) !important;
    border-color: var(--nau-brand) !important;
    color: #fff !important;
}

.valid:hover,
.neau-green:hover,
.neau-valid:hover {
    background-color: #0b5f59 !important;
    border-color: #0b5f59 !important;
    color: #fff !important;
}

.invalid,
.neau-invalid {
    background-color: #e5e7eb !important;
    border-color: #e5e7eb !important;
    color: var(--nau-ink-2) !important;
}

.invalid:hover,
.neau-invalid:hover {
    background-color: #d1d5db !important;
    border-color: #d1d5db !important;
    color: var(--nau-ink) !important;
}

.nau-red,
.neau-red {
    background-color: var(--nau-danger) !important;
    border-color: var(--nau-danger) !important;
    color: #fff !important;
}

/* ── 表单：与按钮同排对齐（后台 D14 已定 34px，这里补齐前台选择器）──── */
.form-control {
    border-radius: 10px;
}

textarea.form-control {
    height: auto;
    min-height: 72px;
}

.jumbotron .form-control {
    max-width: 100%;
}

/* ── 认证页（login / register / modify / reset_password / forgot_password）
      这 5 页不用 .jumbotron，是 .wrap > .card 结构，且自带 nav.top ───── */
.wrap {
    max-width: 460px;
    margin: 46px auto 0;
    padding: 0 4vw;
}

.wrap .card {
    padding: 26px 26px 22px;
    border: 1px solid var(--nau-line);
    border-radius: var(--nau-radius);
    background: var(--nau-card);
    box-shadow: var(--nau-shadow);
}

.wrap .card h2 {
    margin: 0 0 18px;
    font-size: 19px;
    font-weight: 700;
    color: var(--nau-ink);
}

.wrap .card input,
.wrap .card select,
.wrap .card textarea {
    width: 100%;
    box-sizing: border-box;
    height: 38px;
    margin-bottom: 12px;
    padding: 6px 12px;
    border: 1px solid var(--nau-line);
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.wrap .card textarea {
    height: auto;
    min-height: 72px;
}

.wrap .card input:focus,
.wrap .card select:focus,
.wrap .card textarea:focus {
    outline: none;
    border-color: var(--nau-brand-2);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, .16);
}

.wrap .card button,
.wrap .card .btn {
    width: 100%;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: var(--nau-brand);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease;
}

.wrap .card button:hover,
.wrap .card .btn:hover {
    background: #0b5f59;
}

.wrap .links,
.links {
    margin: 14px 0 0;
    text-align: center;
    font-size: 13px;
}

.wrap .links a,
.links a {
    margin: 0 8px;
    color: var(--nau-brand);
    text-decoration: none;
}

.wrap .hint,
.hint {
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--nau-muted);
}

nav.top {
    padding: 12px 4vw;
    border: 0;
    border-bottom: 1px solid var(--nau-line);
    background: var(--nau-card) !important;
    box-shadow: var(--nau-shadow-sm);
}

nav.top a {
    display: inline-block;
    margin: 2px 10px 2px 0;
    padding: 4px 12px;
    border-radius: 999px;
    color: var(--nau-ink-2);
    font-size: 13.5px;
    text-decoration: none;
}

nav.top a:hover {
    background: var(--nau-brand-soft);
    color: var(--nau-brand);
}

/* ══════════════════════════════════════════════════════════════════════
   助手页（agent_help.html 用户端 / agent_mgmt.html 管理端）共用版式
   ──────────────────────────────────────────────────────────────────────
   两页结构一致：.agent-shell > (.agent-side 历史侧栏 | .agent-main 对话区)
   颜色语义：用户端品牌青绿；管理端在 .agent-main 上加 .is-mgmt 变琥珀色
   （写操作 = 需要人确认的动作，用警示色区分）。
   ══════════════════════════════════════════════════════════════════════ */
.agent-shell {
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

@media (max-width: 991px) {
    .agent-shell {
        grid-template-columns: 1fr;
    }
}

.agent-side {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--nau-line);
    border-radius: var(--nau-radius);
    background: var(--nau-card);
    box-shadow: var(--nau-shadow-sm);
}

.agent-side h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .3px;
    color: var(--nau-muted);
    text-transform: uppercase;
}

.agent-side .side-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.agent-main {
    display: flex;
    flex-direction: column;
    min-height: 600px;
    overflow: hidden;
    border: 1px solid var(--nau-line);
    border-radius: var(--nau-radius);
    background: var(--nau-card);
    box-shadow: var(--nau-shadow);
}

.agent-head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--nau-line);
    background: linear-gradient(180deg, #fbfdfd 0%, #f6f9f9 100%);
}

.agent-head .ah-title {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--nau-ink);
}

.agent-head .ah-title .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--nau-brand-2);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, .16);
}

.agent-head .ah-sub {
    font-size: 12.5px;
    font-weight: 400;
    color: var(--nau-muted);
}

#meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    font-size: 12px;
    color: var(--nau-muted);
}

#meta .badge-nau {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--nau-brand-soft);
    color: #0b5f59;
    font-size: 11.5px;
    font-weight: 600;
}

#meta .badge-nau.warn {
    background: var(--nau-accent-soft);
    color: #b45309;
}

#meta .badge-nau.off {
    background: #f3f4f6;
    color: var(--nau-muted);
}

#chat-box {
    flex: 1 1 auto;
    min-height: 360px;
    max-height: 62vh;
    overflow-y: auto;
    padding: 18px 18px 8px;
    background: #fbfcfe;
    scroll-behavior: smooth;
}

#chat-box::-webkit-scrollbar {
    width: 10px;
}

#chat-box::-webkit-scrollbar-thumb {
    border: 3px solid transparent;
    border-radius: 999px;
    background-clip: content-box;
    background-color: #cbd5e1;
}

/* 消息气泡：左右分栏 + 头像 */
.msg {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    margin: 0 0 14px;
}

.msg .ava {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--nau-brand) 0%, var(--nau-brand-2) 100%);
    box-shadow: var(--nau-shadow-sm);
}

.msg.user {
    flex-direction: row-reverse;
}

.msg.user .ava {
    background: #e5e7eb;
    color: var(--nau-ink-2);
}

.msg .bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 14px 14px 14px 4px;
    border: 1px solid var(--nau-line);
    background: #fff;
    color: var(--nau-ink);
    font-size: 14px;
    line-height: 1.68;
    word-break: break-word;
    box-shadow: var(--nau-shadow-sm);
}

.msg.user .bubble {
    border-color: transparent;
    border-radius: 14px 14px 4px 14px;
    background: linear-gradient(135deg, var(--nau-brand) 0%, #128c82 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(15, 118, 110, .22);
}

.msg .bubble > :first-child {
    margin-top: 0;
}

.msg .bubble > :last-child {
    margin-bottom: 0;
}

.msg .bubble p {
    margin: 0 0 8px;
}

.msg .bubble h1,
.msg .bubble h2,
.msg .bubble h3,
.msg .bubble h4 {
    margin: 12px 0 6px;
    font-size: 15px;
    font-weight: 700;
}

.msg .bubble ul,
.msg .bubble ol {
    margin: 6px 0;
    padding-left: 20px;
}

.msg .bubble li {
    margin: 2px 0;
}

.msg .bubble code {
    padding: 1px 5px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #0f172a;
    font-size: 12.5px;
}

.msg .bubble pre {
    padding: 10px 12px;
    border-radius: 10px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 12.5px;
    overflow-x: auto;
}

.msg .bubble pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.msg .bubble blockquote {
    margin: 8px 0;
    padding: 6px 12px;
    border-left: 3px solid var(--nau-line);
    color: var(--nau-muted);
}

.msg .bubble table {
    margin: 8px 0;
    font-size: 13px;
}

.msg .bubble a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.msg.user .bubble code {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

/* 引用来源 / 工具轨迹 */
.cites {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed var(--nau-line-2);
    font-size: 12px;
    color: var(--nau-muted);
}

.cites summary {
    cursor: pointer;
    outline: none;
    color: var(--nau-brand);
    font-weight: 600;
}

.cites ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.cites li {
    margin: 2px 0;
}

.trace-line {
    margin-top: 6px;
    font-size: 11.5px;
    color: var(--nau-faint);
}

.att-line {
    margin-top: 6px;
    font-size: 12px;
    opacity: .9;
}

/* 输入中指示器 */
#typing {
    display: none;
    margin: 0 18px 6px;
    font-size: 12.5px;
    color: var(--nau-muted);
}

#typing::after {
    content: "";
    display: inline-block;
    width: 18px;
    text-align: left;
    animation: nau-dots 1.2s steps(4, end) infinite;
}

@keyframes nau-dots {
    0% { content: ""; }
    25% { content: "."; }
    50% { content: ".."; }
    75% { content: "..."; }
}

/* 输入区 */
#composer {
    padding: 12px 16px 14px;
    border-top: 1px solid var(--nau-line);
    background: #fff;
}

#composer textarea {
    min-height: 66px;
    resize: vertical;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
}

#composer .composer-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

#composer .composer-bar .spacer {
    flex: 1 1 auto;
}

#composer .composer-bar .btn {
    height: 34px;
    padding: 0 18px;
}

#composer .composer-hint {
    margin-top: 8px;
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--nau-faint);
}

/* 快速提问 */
.quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 10px;
}

.quick button {
    margin: 0;
    border: 1px dashed var(--nau-line);
    border-radius: 999px;
    background: #fff;
    color: var(--nau-ink-2);
    font-size: 12px;
}

.quick button:hover {
    border-color: var(--nau-brand-2);
    background: var(--nau-brand-soft);
    color: var(--nau-brand);
}

/* 附件 chip */
#chips {
    display: none;
    margin: 0 0 8px;
}

.chip {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    margin: 0 6px 6px 0;
    padding: 3px 10px;
    border: 1px solid var(--nau-line);
    border-radius: 999px;
    background: #f8fafc;
    font-size: 12px;
    color: var(--nau-ink-2);
}

.chip a {
    color: var(--nau-danger);
    text-decoration: none;
}

/* 历史会话列表 */
#hist-panel {
    margin: 0;
    font-size: 13px;
}

#hist-panel > summary {
    display: none;
}

#hist-list {
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid var(--nau-line-2);
    border-radius: 10px;
    background: #fff;
}

.hist-item {
    padding: 8px 10px;
    border-bottom: 1px solid var(--nau-line-2);
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--nau-ink-2);
    cursor: pointer;
    transition: background .12s ease;
}

.hist-item:last-child {
    border-bottom: 0;
}

.hist-item:hover {
    background: #f5f9f8;
}

.hist-item.active {
    background: var(--nau-brand-soft);
    box-shadow: inset 3px 0 0 var(--nau-brand);
    color: #0b5f59;
    font-weight: 600;
}

.hist-item .t {
    display: inline-block;
    color: var(--nau-faint);
    font-size: 11.5px;
    font-weight: 400;
}

/* 管理端：写操作方案卡片（琥珀语义） */
.agent-main.is-mgmt .agent-head {
    background: linear-gradient(180deg, #fffdf8 0%, #fdf7ec 100%);
}

.agent-main.is-mgmt .agent-head .ah-title .dot {
    background: var(--nau-accent);
    box-shadow: 0 0 0 4px rgba(217, 119, 6, .16);
}

.agent-main.is-mgmt .msg .ava {
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
}

.agent-main.is-mgmt #meta .badge-nau {
    background: var(--nau-accent-soft);
    color: #b45309;
}

.agent-main.is-mgmt #meta .badge-nau.off {
    background: #f3f4f6;
    color: var(--nau-muted);
}

.agent-main.is-mgmt .msg.user .bubble {
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
    box-shadow: 0 4px 14px rgba(217, 119, 6, .22);
}

.proposal {
    margin: 2px 0;
    padding: 12px 14px;
    border: 1px solid #fcd34d;
    border-left: 4px solid var(--nau-accent);
    border-radius: 10px;
    background: #fffdf7;
}

.proposal .p-head {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #b45309;
}

.proposal pre,
.msg .bubble .proposal pre {
    margin: 0 0 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--nau-ink-2);
    font-family: inherit;
    font-size: 13px;
    white-space: pre-wrap;
    word-break: break-word;
}

.proposal .p-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.proposal .p-actions .btn {
    height: 30px;
    padding: 0 14px;
    font-size: 12.5px;
}

.proposal.done {
    border-color: #86efac;
    border-left-color: #16a34a;
    background: #f6fff9;
}

.proposal.done .p-head {
    color: #15803d;
}

.proposal.cancelled,
.proposal.failed {
    border-color: #fecaca;
    border-left-color: var(--nau-danger);
    background: #fff7f7;
}

.proposal.cancelled .p-head,
.proposal.failed .p-head {
    color: var(--nau-danger);
}

.p-result {
    margin-top: 8px;
    font-size: 12.5px;
    white-space: pre-wrap;
    color: var(--nau-ink-2);
}

/* 登录提示态（fail() 会隐藏 #composer、显示 #err） */
#err {
    border-radius: var(--nau-radius-sm);
}

/* 助手页的 #err 由脚本用行内 display:block 打开，默认必须隐藏（页面已无 inline style） */
.agent-main > #err {
    display: none;
    margin: 14px 18px 0;
}

@media (max-width: 767px) {
    .agent-main {
        min-height: 520px;
    }

    #chat-box {
        max-height: none;
        padding: 14px 12px 4px;
    }

    .msg .bubble {
        max-width: 86%;
    }
}

/* ═══ 助手页「功能未开放」引导卡 ═════════════════════════════════════
   403 不再只弹「请求失败（403）」（用户分不清是没权限还是页面不存在），
   改为一张说明卡。★2026-10-21 口径：卡里**只讲「找谁开通」**，不写等级
   数字、门限值、后台操作路径 —— 那些是运维口径，不给用户看。
   ═══════════════════════════════════════════════════════════════════ */
.deny-card {
    max-width: 640px;
    margin: 20px auto;
    padding: 20px 22px;
    background: var(--nau-card);
    border: 1px solid var(--nau-line);
    border-left: 4px solid var(--nau-accent);
    border-radius: var(--nau-radius);
    box-shadow: var(--nau-shadow-sm);
    text-align: left;
}

.deny-card h4 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: var(--nau-ink);
}

.deny-card p {
    margin: 0 0 10px;
    color: var(--nau-ink-2);
}

.deny-card p:last-child {
    margin-bottom: 0;
}

.deny-card .deny-kv {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    row-gap: 8px;
    margin: 0 0 14px;
}

.deny-card .deny-kv dt {
    font-weight: 500;
    color: var(--nau-muted);
}

.deny-card .deny-kv dd {
    margin: 0;
    color: var(--nau-ink);
}

.deny-card .lv-chip {
    display: inline-block;
    padding: 1px 9px;
    margin-right: 6px;
    border-radius: 999px;
    font-size: 12.5px;
    background: #f1f5f9;
    color: var(--nau-ink-2);
}

.deny-card .lv-chip.now {
    background: var(--nau-accent-soft);
    color: #92400e;
}

.deny-card .lv-chip.need {
    background: var(--nau-brand-soft);
    color: var(--nau-brand);
}

.deny-card ol {
    margin: 0 0 12px;
    padding-left: 20px;
    color: var(--nau-ink-2);
}

.deny-card ol li {
    margin: 6px 0;
}

.deny-card .deny-note {
    margin: 0;
    padding-top: 11px;
    border-top: 1px dashed var(--nau-line);
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--nau-muted);
}

.deny-card code {
    padding: 1px 5px;
    border-radius: 4px;
    background: #f1f5f9;
    font-size: 12.5px;
    color: var(--nau-ink-2);
}

/* ═══ 队伍组成页（team.html）「普通用户」组名单默认收起 ═══════════════
   这一组 3400+ 人，是整页最长的一段。标题右侧给一个「显示名单 / 隐藏名单」
   小按钮控制它的展示：默认收起（脚本连节点都不建，点开才画），
   其余等级与筛选下拉照旧。按钮挂在 h2.group-head 里，靠 flex 与组名同行。
   ═══════════════════════════════════════════════════════════════════ */
.group-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.group-head .group-toggle {
    margin-left: 14px;
    color: var(--nau-brand) !important;
    background: #fff !important;
    border: 1px solid var(--nau-brand) !important;
    border-radius: 999px;
    font-weight: 600;
    vertical-align: middle;
}

.group-head .group-toggle:hover,
.group-head .group-toggle:focus {
    background: var(--nau-brand-soft) !important;
    color: var(--nau-brand) !important;
}

/* h2 里的按钮走 24px 档，别被 .btn 的 34px 高度把标题行顶散 */
.group-head .group-toggle.btn.btn-xs {
    height: 24px;
    line-height: 16px;
    padding: 3px 12px !important;
}

/* `hidden` 属性要压过元素自身的 display（.group-body 有 line-height 版式，
   且 Bootstrap 的 [hidden] 兜不住 flex/block 混排）—— 收起态靠这条收口。 */
#plain-body[hidden] {
    display: none !important;
}

/* ── V1 跨文档视图过渡（全站切页丝滑化 · 第 1 层）────────────────────
   与 admin_skin.css 末尾同款规则，叠在其上（顺序固定 admin_skin → site_skin），
   幂等无冲突；前台不支持的浏览器同样自动降级为普通跳转。
   ★安全口径同 admin_skin：只淡出旧页、新页用浏览器默认（自愈），
   绝不让 `::view-transition-new` 停在 opacity:0 造成白屏。 ──────────── */
@view-transition {
    navigation: auto;
}

::view-transition-old(root) {
    animation: nau-vt-out .22s ease-out both;
}

::view-transition-new(root) {
    animation-duration: .26s;
    animation-timing-function: ease-out;
}

@keyframes nau-vt-out {
    to {
        opacity: 0;
    }
}

body.nau-leaving {
    opacity: .6;
    transition: opacity .18s ease-out;
}

body.nau-leaving::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 2147483000;
    background: var(--nau-brand, #0f766e);
    animation: nau-vt-progress .5s ease-out both;
}

@keyframes nau-vt-progress {
    from {
        transform: scaleX(0);
        transform-origin: left;
    }

    to {
        transform: scaleX(1);
        transform-origin: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation: none;
    }

    body.nau-leaving {
        opacity: 1;
    }

    body.nau-leaving::before {
        animation: none;
    }
}
