/* ==========================================================================
   AI 私董会 — 全局样式
   设计基调：严肃、正规、庄重。深藏青 + 金色点缀 + 米白纸感背景 + 衬线标题。
   ========================================================================== */

:root {
    /* 色彩 */
    --bg: #f6f4ee;             /* 米白纸感背景 */
    --bg-soft: #efede5;        /* 更深一档的背景 */
    --card: #ffffff;
    --border: #e2ded2;         /* 暖灰细边 */
    --border-strong: #cfc9b8;
    --text: #222930;
    --text-sub: #6a7178;
    --text-faint: #9aa1a9;

    --navy: #1e3a58;           /* 深藏青主色 */
    --navy-deep: #14283d;      /* 更深藏青（顶栏/品牌底） */
    --navy-ink: #0f1f2e;

    --gold: #a9833c;           /* 金色点缀 */
    --gold-soft: #c2a163;
    --gold-bg: #f6efe1;        /* 金色浅底 */

    --danger: #a63d2f;
    --danger-bg: #f7eae7;
    --success: #376247;
    --success-bg: #e8efe9;
    --warn: #9a6b1f;
    --warn-bg: #f6f0e1;

    /* 字体 */
    --font-serif: Georgia, "Times New Roman", "Songti SC", "STSong", "SimSun", serif;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

    /* 圆角 / 阴影 */
    --radius: 4px;
    --radius-lg: 8px;
    --shadow-sm: 0 1px 2px rgba(20, 30, 45, .06);
    --shadow: 0 8px 28px rgba(20, 30, 45, .09);
    --shadow-lg: 0 18px 52px rgba(20, 30, 45, .16);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--navy);
    text-decoration: none;
}

a:hover {
    color: var(--gold);
}

/* 通用居中容器 */
.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 28px;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   按钮
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .5px;
    cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease;
    white-space: nowrap;
    user-select: none;
    font-family: var(--font-sans);
}

.btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--navy);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: var(--navy-deep);
}

.btn-ghost {
    background: transparent;
    color: var(--navy);
    border-color: var(--border-strong);
}

.btn-ghost:hover:not(:disabled) {
    border-color: var(--navy);
    background: var(--bg-soft);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover:not(:disabled) {
    background: #8a3326;
}

.btn-block {
    width: 100%;
}

/* 深色底上的描边按钮（用于顶栏） */
.btn-outline-light {
    background: transparent;
    color: #e8ecf1;
    border-color: rgba(232, 236, 241, .35);
}

.btn-outline-light:hover:not(:disabled) {
    border-color: var(--gold-soft);
    color: var(--gold-soft);
    background: rgba(194, 161, 99, .08);
}

/* ==========================================================================
   表单
   ========================================================================== */
.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-sub);
    letter-spacing: .3px;
}

.input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text);
    background: #fff;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease;
    font-family: var(--font-sans);
}

.input::placeholder {
    color: var(--text-faint);
}

.input:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(30, 58, 88, .10);
}

.input-row {
    display: flex;
    gap: 10px;
}

.input-row .input {
    flex: 1;
}

/* ==========================================================================
   toast 提示（自定义，替代原生 alert）
   ========================================================================== */
.toast-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    font-size: 14px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    border-left: 3px solid var(--navy);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s ease;
    max-width: 82vw;
}

.toast::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--navy);
    flex: none;
}

.toast-show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    border-left-color: var(--success);
}
.toast-success::before {
    background: var(--success);
}

.toast-error {
    border-left-color: var(--danger);
}
.toast-error::before {
    background: var(--danger);
}

.toast-info {
    border-left-color: var(--navy);
}
.toast-info::before {
    background: var(--navy);
}

/* ==========================================================================
   登录页（分栏式：左品牌叙事区 + 右表单区）
   ========================================================================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    background: var(--bg);
}

.auth-shell {
    width: 100%;
    display: grid;
    grid-template-columns: 5fr 7fr;
    min-height: 100vh;
}

/* 左栏：品牌叙事区 */
.auth-hero {
    background: linear-gradient(165deg, var(--navy-deep) 0%, var(--navy-ink) 100%);
    color: #e9edf2;
    padding: 56px 56px 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

/* 金色描边装饰线 */
.auth-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold) 0%, var(--gold-soft) 45%, transparent 90%);
}

.auth-hero::after {
    content: "";
    position: absolute;
    right: -120px;
    bottom: -120px;
    width: 340px;
    height: 340px;
    border: 1px solid rgba(194, 161, 99, .18);
    border-radius: 50%;
}

.auth-hero-brand {
    position: relative;
    z-index: 1;
}

.auth-hero-logo {
    font-family: var(--font-serif);
    font-size: 40px;
    font-weight: 700;
    letter-spacing: 6px;
    color: #fff;
    margin-bottom: 16px;
}

.auth-hero-logo .accent {
    color: var(--gold-soft);
}

.auth-hero-slogan {
    font-family: var(--font-serif);
    font-size: 17px;
    color: #c9d2dc;
    letter-spacing: 2px;
    line-height: 1.9;
    margin-bottom: 40px;
    max-width: 340px;
}

.auth-hero-steps {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-hero-step {
    display: flex;
    align-items: baseline;
    gap: 16px;
    font-size: 15px;
    color: #dde3ea;
    letter-spacing: 1px;
}

.auth-hero-step .step-no {
    font-family: var(--font-serif);
    font-size: 15px;
    color: var(--gold-soft);
    width: 26px;
    flex: none;
}

.auth-hero-foot {
    position: relative;
    z-index: 1;
    font-size: 12px;
    color: #8b97a5;
    letter-spacing: .5px;
    line-height: 1.8;
    max-width: 320px;
}

/* 右栏：表单区 */
.auth-form-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 28px;
    background: var(--bg);
}

/* 单栏表单（重置密码页）：占满整页并居中 */
.auth-form-wrap--single {
    width: 100%;
    min-height: 100vh;
}

.auth-form {
    width: 100%;
    max-width: 400px;
}

.auth-form-head {
    margin-bottom: 28px;
}

.auth-form-head .eyebrow {
    font-size: 12px;
    letter-spacing: 3px;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.auth-form-head h1 {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0 0 8px;
    color: var(--text);
}

.auth-form-head p {
    margin: 0;
    font-size: 13px;
    color: var(--text-sub);
    line-height: 1.8;
}

/* 下划线式 tab 切换 */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-strong);
    margin-bottom: 26px;
}

.auth-tab {
    flex: 1;
    padding: 12px 0;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-sub);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .16s ease, border-color .16s ease;
}

.auth-tab.active {
    color: var(--navy);
    border-bottom-color: var(--gold);
}

.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
}

/* 后台配置页 tab 栏（复用 auth-tabs 结构，窄版自动宽度） */
.admin-tabs {
    margin-bottom: 20px;
}

.admin-tabs .auth-tab {
    flex: 0 0 auto;
    padding: 10px 24px;
}

.auth-tip {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dashed var(--border-strong);
    text-align: center;
    font-size: 12px;
    color: var(--text-faint);
    line-height: 1.7;
}

/* 表单内联小链接（忘记密码 / 返回登录） */
.auth-link-row {
    margin: -6px 0 14px;
    text-align: right;
}

.auth-link-row a,
.auth-tip a {
    color: var(--navy);
    font-size: 13px;
    text-decoration: none;
}

.auth-link-row a:hover,
.auth-tip a:hover {
    text-decoration: underline;
}

.dev-hint {
    margin-top: 10px;
    padding: 8px 12px;
    border: 1px solid var(--gold-soft);
    background: var(--gold-bg);
    border-radius: var(--radius);
    font-size: 12px;
    color: var(--gold);
    line-height: 1.6;
}

.dev-hint b {
    font-weight: 700;
    letter-spacing: 0.08em;
}

/* ==========================================================================
   私董会页面通用
   ========================================================================== */
.boardroom-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 深色顶栏 */
.br-topbar {
    background: var(--navy-deep);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .15);
}

.br-topbar-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 28px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.br-logo {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #fff;
    text-decoration: none;
}

.br-logo:hover {
    color: var(--gold-soft);
}

.br-logo .accent {
    color: var(--gold-soft);
}

.br-title {
    flex: 1;
    font-size: 13px;
    color: #aeb8c4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: .3px;
}

.br-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.br-user {
    font-size: 13px;
    color: #c7cfd9;
    letter-spacing: .3px;
}

.br-topbar-link {
    font-size: 13px;
    color: #c7cfd9;
    letter-spacing: .5px;
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid rgba(232, 236, 241, .35);
    border-radius: var(--radius);
    transition: border-color .16s ease, color .16s ease;
    white-space: nowrap;
}

.br-topbar-link:hover {
    border-color: var(--gold-soft);
    color: var(--gold-soft);
}

.br-main {
    padding-top: 44px;
    padding-bottom: 72px;
}

/* Hero 标题区 */
.br-hero {
    margin-bottom: 32px;
}

.br-hero .eyebrow {
    font-size: 12px;
    letter-spacing: 3px;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.br-hero h1 {
    font-family: var(--font-serif);
    font-size: 32px;
    letter-spacing: 2px;
    margin: 0 0 12px;
    color: var(--text);
}

.br-hero p {
    color: var(--text-sub);
    max-width: 660px;
    margin: 0;
    font-size: 15px;
    line-height: 1.9;
}

/* 发起咨询卡片 */
.br-create {
    background: var(--card);
    border: 1px solid var(--border);
    border-top: 3px solid var(--gold);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    margin-bottom: 36px;
    box-shadow: var(--shadow-sm);
}

.br-create-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.br-create-head .mark {
    font-family: var(--font-serif);
    font-size: 15px;
    color: var(--gold);
    font-weight: 700;
}

.br-create-head h2 {
    font-family: var(--font-serif);
    font-size: 17px;
    letter-spacing: 1px;
    margin: 0;
    color: var(--text);
}

.br-textarea {
    resize: vertical;
    min-height: 96px;
    line-height: 1.7;
}

.br-create-actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
}

/* 讨论模式选择 */
.br-mode {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.br-mode-option {
    position: relative;
    display: flex;
    cursor: pointer;
}

.br-mode-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.br-mode-card {
    position: relative;
    display: block;
    flex: 1;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    padding: 14px 16px;
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.br-mode-card strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 15px;
    letter-spacing: .5px;
    color: var(--text);
}

.br-mode-card em {
    display: block;
    margin-top: 6px;
    font-style: normal;
    font-size: 12px;
    color: var(--text-sub);
    line-height: 1.6;
}

.br-mode-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    border-radius: 3px;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .5px;
    color: var(--gold);
    background: var(--gold-bg);
    vertical-align: 2px;
}

.br-mode-option:hover .br-mode-card {
    border-color: var(--navy);
}

.br-mode-option input:checked + .br-mode-card {
    border-color: var(--gold);
    background: var(--gold-bg);
    box-shadow: 0 0 0 3px rgba(169, 131, 60, .22);
}

.br-mode-option input:checked + .br-mode-card::after {
    content: '✓';
    position: absolute;
    top: 12px;
    right: 14px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gold);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
}

/* 历史会议 */
.br-history-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.br-history-head h2 {
    font-family: var(--font-serif);
    font-size: 20px;
    letter-spacing: 1px;
    margin: 0;
    color: var(--text);
}

.br-count {
    font-size: 12px;
    color: var(--text-faint);
    letter-spacing: .5px;
}

.br-empty {
    color: var(--text-sub);
    padding: 56px 0;
    text-align: center;
    background: var(--bg-soft);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    font-size: 14px;
    letter-spacing: .5px;
}

.br-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.br-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    text-decoration: none;
    color: var(--text);
    transition: border-color .16s ease, box-shadow .16s ease;
}

.br-item:hover {
    border-color: var(--navy);
    box-shadow: var(--shadow);
}

.br-item-main {
    flex: 1;
    min-width: 0;
}

.br-item-title {
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.br-item-meta {
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-sub);
    letter-spacing: .3px;
}

/* 状态徽章（正式方块标签） */
.br-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .5px;
    border: 1px solid transparent;
    flex: none;
}

.br-badge::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.br-badge-pending { background: var(--bg-soft); color: var(--text-sub); border-color: var(--border-strong); }
.br-badge-parsing, .br-badge-discussing, .br-badge-briefing { background: var(--warn-bg); color: var(--warn); border-color: #e4d5b0; }
.br-badge-completed { background: var(--success-bg); color: var(--success); border-color: #cfe0d3; }
.br-badge-failed { background: var(--danger-bg); color: var(--danger); border-color: #e5c9c3; }

/* ==========================================================================
   会议实况页
   ========================================================================== */
.br-meeting {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    padding-top: 24px;
    padding-bottom: 48px;
    align-items: stretch;
}

.br-main-col {
    min-width: 0;
    display: flex;
    gap: 16px;
    align-items: stretch;
}

.br-main-body {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 左侧九步骤时间轴 */
.br-rail {
    position: relative;
    flex: none;
    width: 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 0 18px;
}

.br-rail::before {
    content: "";
    position: absolute;
    left: 44px;
    top: 24px;
    bottom: 24px;
    width: 2px;
    transform: translateX(-50%);
    background: var(--border-strong);
    border-radius: 1px;
}

.br-rail-step {
    position: relative;
    z-index: 1;
    flex: none;
    height: 18px;
}

.br-rail-label {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    line-height: 1;
    color: var(--text-sub);
    white-space: nowrap;
    transition: color .2s ease;
}

.br-rail-step.is-current .br-rail-label {
    color: var(--success);
    font-weight: 600;
}

.br-rail-dot {
    position: absolute;
    left: 44px;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    width: 18px;
    height: 5px;
    border-radius: 3px;
    border: none;
    padding: 0;
    background: var(--border-strong);
    cursor: pointer;
    transition: background .2s ease, width .2s ease, height .2s ease, border-radius .2s ease, box-shadow .2s ease;
}

.br-rail-dot:hover {
    background: var(--gold-soft);
}

.br-rail-dot.is-done {
    background: var(--gold);
}

.br-rail-dot.is-current {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(55, 98, 71, .18);
}

.br-statusbar {
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--navy);
    border-radius: var(--radius-lg);
    padding: 12px 18px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-sub);
    display: flex;
    align-items: center;
    gap: 10px;
}

.br-step {
    flex: none;
    font-family: var(--font-serif);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .5px;
    color: #fff;
    background: var(--gold);
    padding: 2px 10px;
    border-radius: 999px;
}

.br-statusbar .pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    flex: none;
    animation: br-pulse 1.4s ease-in-out infinite;
}

@keyframes br-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .3; }
}

.br-statusbar.is-done {
    border-left-color: var(--success);
}

.br-statusbar.is-done .pulse {
    background: var(--success);
    animation: none;
}

.br-transcript {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px 28px;
    flex: 1 1 0;
    min-height: 74vh;
    overflow-y: auto;
    box-shadow: var(--shadow-sm);
}

/* 阶段标题 */
.br-stage {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 28px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.br-stage:first-child {
    margin-top: 0;
}

.br-stage-num {
    font-family: var(--font-serif);
    font-size: 13px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 1px;
    flex: none;
}

.br-stage-name {
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text);
}

/* 单条发言 */
.br-msg {
    border-left: 3px solid var(--border-strong);
    padding: 12px 16px;
    margin-bottom: 14px;
    background: var(--bg);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.br-msg-host { border-left-color: var(--navy); }
.br-msg-expert { border-left-color: var(--gold); }
.br-msg-guest { border-left-color: var(--danger); }

.br-msg-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.br-msg-name {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .5px;
    color: var(--text);
}

.br-msg-role-tag {
    font-size: 11px;
    color: var(--text-sub);
    border: 1px solid var(--border-strong);
    padding: 1px 7px;
    border-radius: 3px;
    letter-spacing: .5px;
}

.br-msg-title {
    font-size: 12px;
    color: var(--text-faint);
    letter-spacing: .3px;
}

.br-msg-content {
    font-size: 14px;
    line-height: 1.9;
    white-space: pre-wrap;
    word-break: break-word;
    color: #343b43;
}

/* 右侧栏 */
.br-sidebar {
    position: sticky;
    top: 84px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* 决策简报面板沉底，与主内容列底部对齐 */
.br-sidebar .br-panel:last-child {
    margin-top: auto;
}

.br-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
}

.br-panel-title {
    font-family: var(--font-serif);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.br-panel-title::before {
    content: "";
    width: 3px;
    height: 14px;
    background: var(--gold);
}

.br-hint {
    color: var(--text-faint);
    font-size: 13px;
    letter-spacing: .3px;
}

.br-expert {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.br-expert:last-child {
    border-bottom: none;
}

.br-expert-name {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .5px;
    color: var(--text);
}

.br-expert-title {
    font-size: 12px;
    color: var(--text-sub);
    margin-top: 3px;
    letter-spacing: .3px;
    line-height: 1.7;
}

.br-brief-content {
    font-size: 13px;
    line-height: 1.9;
    white-space: pre-wrap;
    word-break: break-word;
    color: #343b43;
}

/* 决策简报：摘要 + 完整查看 + 另存为 / 分享 */
.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
}

.br-brief-teaser {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-sub);
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.br-brief-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.br-brief-actions .btn {
    flex: 1;
}

.br-brief-full {
    font-size: 14px;
    line-height: 1.85;
    color: #343b43;
    word-break: break-word;
}

.br-brief-full h1,
.br-brief-full h2,
.br-brief-full h3,
.br-brief-full h4 {
    font-family: var(--font-serif);
    color: var(--text);
    margin: 20px 0 10px;
    line-height: 1.5;
}

.br-brief-full h1 { font-size: 22px; }
.br-brief-full h2 {
    font-size: 19px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gold);
    margin-top: 26px;
}
.br-brief-full h2:first-child { margin-top: 0; }
.br-brief-full h3 { font-size: 17px; }
.br-brief-full h4 { font-size: 15px; }

.br-brief-full p { margin: 10px 0; }

.br-brief-full ul,
.br-brief-full ol { margin: 10px 0; padding-left: 24px; }

.br-brief-full li { margin: 7px 0; }

.br-brief-full code {
    background: var(--bg-soft);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

.br-brief-full strong { font-weight: 700; }

.br-brief-full em { font-style: normal; color: var(--gold); }

.br-brief-full blockquote {
    margin: 14px 0;
    padding: 14px 18px;
    background: var(--bg-soft);
    border-left: 3px solid var(--gold);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: #5a4a2f;
}

.br-brief-full table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: 13px;
}

.br-brief-full th,
.br-brief-full td {
    padding: 10px 12px;
    border: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.br-brief-full th {
    background: var(--navy);
    color: #fff;
    font-weight: 600;
}

.br-brief-full tr:nth-child(even) td {
    background: var(--bg-soft);
}

.br-brief-full hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 16px 0;
}

/* ==========================================================================
   价格清单页（仅展示付费模式）
   ========================================================================== */
.br-pricing {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    align-items: stretch;
}

.br-price-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px 26px 22px;
    box-shadow: var(--shadow-sm);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.br-price-card:hover {
    border-color: var(--border-strong);
}

.br-price-card.is-highlight {
    border: 1px solid var(--gold-soft);
    border-top: 3px solid var(--gold);
    box-shadow: var(--shadow);
}

.br-price-card.is-selected {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(30, 58, 88, .10);
}

.br-price-card.is-current {
    border-color: var(--navy);
}

.br-price-tag {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 12px;
    letter-spacing: 1px;
    color: #fff;
    background: var(--gold);
    padding: 3px 10px;
    border-radius: 999px;
}

.br-price-name {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text);
    margin-bottom: 14px;
}

.br-price-amount {
    display: flex;
    align-items: baseline;
    font-family: var(--font-serif);
    font-size: 42px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 10px;
}

.br-price-cur {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 700;
    margin-right: 2px;
}

.br-price-period {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 400;
    color: var(--text-sub);
    margin-left: 6px;
}

.br-price-tagline {
    font-size: 13px;
    color: var(--text-sub);
    margin-bottom: 16px;
}

.br-price-features {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    flex: 1;
}

.br-price-features li {
    position: relative;
    padding: 7px 0 7px 22px;
    font-size: 13px;
    color: var(--text-sub);
    border-bottom: 1px dashed var(--border);
}

.br-price-features li::before {
    content: "◆";
    position: absolute;
    left: 0;
    top: 7px;
    font-size: 10px;
    color: var(--gold);
}

.br-price-action {
    margin-top: auto;
}

.br-pricing-note {
    margin-top: 26px;
    text-align: center;
    font-size: 13px;
    color: var(--text-faint);
    letter-spacing: .3px;
}

.br-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.br-modal {
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(15, 23, 42, .25);
    width: 100%;
    max-width: 1120px;
    height: 94vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.br-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.br-modal-title {
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .5px;
}

.br-modal-close {
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--text-faint);
    cursor: pointer;
    padding: 0 4px;
}

.br-modal-close:hover { color: var(--text); }

.br-modal-body {
    padding: 28px 36px;
    overflow-y: auto;
}

.br-modal-foot {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
}

/* 紧凑型确认弹窗（用于后台操作二次确认） */
.br-modal--confirm {
    max-width: 440px;
    height: auto;
}

.br-modal--confirm .br-modal-body {
    padding: 24px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-sub);
}

/* ==========================================================================
   LLM 模型配置管理页
   ========================================================================== */
.admin-main {
    padding-top: 40px;
    padding-bottom: 72px;
}

.admin-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 24px;
}

.admin-head .eyebrow {
    font-size: 12px;
    letter-spacing: 3px;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.admin-head h1 {
    font-family: var(--font-serif);
    font-size: 28px;
    letter-spacing: 2px;
    margin: 0;
    color: var(--text);
}

.llm-current {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 13px 18px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--gold);
    border-radius: var(--radius);
    background: var(--gold-bg);
    margin-bottom: 22px;
    font-size: 13px;
    color: var(--text);
}

.llm-current .tag {
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 1px;
    flex: none;
}

.llm-current .sep {
    color: var(--text-faint);
}

.llm-current span {
    word-break: break-all;
}

.admin-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.admin-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.admin-card-head .mark {
    font-family: var(--font-serif);
    font-size: 15px;
    color: var(--gold);
    font-weight: 700;
}

.admin-card-head h2 {
    font-family: var(--font-serif);
    font-size: 17px;
    letter-spacing: 1px;
    margin: 0;
    color: var(--text);
}

.admin-hint {
    font-size: 12px;
    color: var(--text-faint);
    letter-spacing: .3px;
    margin-left: auto;
}

.llm-models {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 12px;
}

.llm-model {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
    user-select: none;
}

.llm-model:hover {
    border-color: var(--navy);
}

.llm-model.active {
    border-color: var(--gold);
    background: var(--gold-bg);
    box-shadow: 0 0 0 3px rgba(169, 131, 60, .12);
}

.llm-model-name {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .5px;
    color: var(--text);
}

.llm-model-desc {
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-sub);
    line-height: 1.6;
}

.llm-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 18px;
}

.llm-form-grid .field-full {
    grid-column: 1 / -1;
}

.llm-configs {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.llm-config {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    padding: 16px 18px;
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.llm-config.is-active {
    border-color: var(--gold);
    background: var(--gold-bg);
    box-shadow: 0 0 0 3px rgba(169, 131, 60, .10);
}

.llm-config-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border);
}

.llm-radio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.llm-radio input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.llm-radio-mark {
    width: 16px;
    height: 16px;
    flex: none;
    border: 2px solid var(--border-strong);
    border-radius: 50%;
    transition: border-color .16s ease, background-color .16s ease;
}

.llm-radio input:checked + .llm-radio-mark {
    border-color: var(--gold);
    background: radial-gradient(circle, var(--gold) 0 45%, transparent 55%);
}

.llm-config-name {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .5px;
    color: var(--text);
}

.llm-config-desc {
    font-size: 12px;
    color: var(--text-sub);
    line-height: 1.5;
}

.llm-config-body {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 18px;
}

.llm-config-body .field-full {
    grid-column: 1 / -1;
}

.llm-save-bar {
    margin-top: 18px;
    text-align: right;
}

/* LLM 连接卡片（通用连接 + 增强连接池） */
.llm-conn {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    padding: 16px 18px;
}

.llm-conn-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border);
}

.llm-conn-title {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .5px;
    color: var(--text);
}

.llm-conn-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 18px;
}

.llm-conn-fields .field {
    margin-bottom: 14px;
}

.llm-conn-fields .field-full {
    grid-column: 1 / -1;
}

.llm-pool {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.llm-pool-empty {
    color: var(--text-sub);
    padding: 28px 0;
    text-align: center;
    background: var(--bg-soft);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    font-size: 13px;
    letter-spacing: .5px;
}

.llm-pool-actions {
    margin-top: 14px;
}

/* ==========================================================================
   用户管理
   ========================================================================== */
.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-table th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .5px;
    color: var(--text-faint);
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.admin-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr:hover td {
    background: var(--bg-soft);
}

.admin-table .num {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.admin-table .muted {
    color: var(--text-sub);
    font-size: 12px;
    white-space: nowrap;
}

.admin-table .num-col,
.admin-table td.num {
    text-align: right;
}

.admin-table .op-col {
    text-align: right;
}

.user-cell {
    min-width: 200px;
}

.user-cell-email {
    font-weight: 600;
    color: var(--text);
    word-break: break-all;
}

.user-cell-nick {
    font-size: 12px;
    color: var(--text-sub);
    margin-top: 3px;
}

.user-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .5px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.user-status::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.user-status-on { background: var(--success-bg); color: var(--success); border-color: #cfe0d3; }
.user-status-off { background: var(--bg-soft); color: var(--text-sub); border-color: var(--border-strong); }

.user-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}

.user-toggle--disable { color: var(--danger); border-color: #e5c9c3; }
.user-toggle--disable:hover:not(:disabled) { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.user-toggle--enable { color: var(--success); border-color: #cfe0d3; }
.user-toggle--enable:hover:not(:disabled) { background: var(--success-bg); border-color: var(--success); color: var(--success); }

/* 用户等级徽章 */
.user-tier {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .5px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.user-tier-super { background: var(--gold-bg); color: var(--gold); border-color: #e2d2b0; }
.user-tier-paid { background: var(--warn-bg); color: var(--warn); border-color: #e4d5b0; }
.user-tier-normal { background: var(--bg-soft); color: var(--text-sub); border-color: var(--border-strong); }

button.user-tier-toggle {
    cursor: pointer;
    font-family: var(--font-sans);
}
button.user-tier-toggle:hover:not(:disabled) {
    border-color: var(--navy);
    color: var(--navy);
}

/* 用户等级下拉选择 */
.user-tier-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 4px 28px 4px 11px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .5px;
    border: 1px solid var(--border-strong);
    background-color: var(--bg);
    color: var(--text);
    cursor: pointer;
    font-family: var(--font-sans);
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236b7280' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 10px 6px;
    white-space: nowrap;
}
.user-tier-select:hover { border-color: var(--navy); }
.user-tier-select:focus { outline: none; border-color: var(--navy); }
.user-tier-select:disabled { cursor: not-allowed; opacity: .6; }

.tier-select-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-sub);
}

/* 用户详情 */
.admin-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px 24px;
}

.info-item {
    padding: 12px 0;
    border-bottom: 1px dashed var(--border);
}

.info-item label {
    display: block;
    font-size: 12px;
    color: var(--text-faint);
    letter-spacing: .5px;
    margin-bottom: 6px;
}

.info-value {
    font-size: 14px;
    color: var(--text);
    word-break: break-all;
    line-height: 1.5;
}

.admin-info-actions {
    margin-top: 18px;
    display: flex;
    gap: 10px;
}

/* 提问记录卡片 */
.question-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
}

.question-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.question-text {
    font-family: var(--font-serif);
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
    word-break: break-word;
    flex: 1;
    min-width: 0;
}

.question-meta {
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-sub);
    letter-spacing: .3px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 14px;
}

/* ==========================================================================
   错误页
   ========================================================================== */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 40px 20px;
    text-align: center;
}

.error-box {
    max-width: 440px;
}

.error-code {
    font-family: var(--font-serif);
    font-size: 96px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: 4px;
    line-height: 1;
}

.error-box .divider {
    width: 48px;
    height: 3px;
    background: var(--gold);
    margin: 24px auto;
}

.error-box h1 {
    font-family: var(--font-serif);
    font-size: 22px;
    letter-spacing: 2px;
    margin: 0 0 10px;
    color: var(--text);
}

.error-box p {
    color: var(--text-sub);
    font-size: 14px;
    line-height: 1.9;
    margin: 0 0 28px;
}

.error-detail {
    font-family: var(--font-sans);
    font-size: 12px;
    color: var(--text-faint);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    margin-bottom: 28px;
    word-break: break-all;
    line-height: 1.7;
}

.error-box .btn {
    text-decoration: none;
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }
    .auth-hero {
        padding: 40px 32px;
        min-height: auto;
    }
    .auth-hero-slogan {
        margin-bottom: 28px;
    }
    .auth-hero-steps {
        display: none;
    }
    .auth-hero-foot {
        margin-top: 20px;
    }

    .br-meeting {
        grid-template-columns: 1fr;
    }
    .br-sidebar {
        position: static;
    }
}

@media (max-width: 560px) {
    .container {
        padding: 0 18px;
    }
    .br-topbar-inner {
        padding: 0 18px;
    }
    .br-title {
        display: none;
    }
    .br-hero h1 {
        font-size: 26px;
    }
    .br-main {
        padding-top: 32px;
    }
    .br-transcript {
        padding: 18px;
    }
    .auth-hero-logo {
        font-size: 30px;
    }
    .llm-form-grid,
    .llm-config-body,
    .llm-conn-fields {
        grid-template-columns: 1fr;
    }
    .br-mode {
        grid-template-columns: 1fr;
    }
    .admin-hint {
        display: none;
    }
    .admin-card {
        padding: 18px 16px;
    }
}
