/* 主控出勤公示 - 只读公示页样式 */

:root {
    --primary: #0E448C;
    --primary-dark: #0A3470;
    --bg: #f5f7fa;
    --card-bg: #ffffff;
    --border: #e0e4e8;
    --text: #1a1a1a;
    --text-muted: #6b7280;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --badge-plan: #3b82f6;
    --badge-overdue: #f59e0b;
    --badge-done: #10b981;
    --danger: #dc2626;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* 顶部标题栏 */
.pub-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
}

.pub-header h1 {
    font-size: 22px;
    font-weight: 600;
}

/* 页头标题组：logo + 标题文字（允许收缩换行，避免长标题溢出截断） */
.pub-header-title {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1 1 auto;
    min-width: 0;
}

.pub-header-title h1 {
    min-width: 0;
    overflow-wrap: break-word;
    line-height: 1.35;
}

/* 页头 logo：蓝色徽章在深蓝渐变底上加白色细描边保证清晰 */
.pub-header-logo {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.85);
    background: #fff;
    object-fit: contain;
    display: block;
}

.pub-update-time {
    font-size: 13px;
    opacity: 0.85;
    flex: 0 0 auto;
    margin-left: 16px;
}

/* 公告 + 排班并排布局 */
.pub-cols {
    display: flex;
    gap: 12px;
    padding: 12px 24px;
    max-width: 100%;
    align-items: flex-start;
}

.pub-ann-area {
    flex: 0 0 80%;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.pub-sched-area {
    flex: 0 0 calc(20% - 12px);
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* 折叠区域通用样式 */
.pub-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    cursor: pointer;
    user-select: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.pub-section-header:hover { background: #eef2f9; }

.pub-announcement-badge {
    display: inline-block;
    padding: 1px 8px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    line-height: 1.6;
}

.pub-collapse-arrow {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

/* 折叠状态：箭头旋转 */
.pub-section-header.is-collapsed .pub-collapse-arrow {
    transform: rotate(-90deg);
}

.pub-collapse-body {
    display: flex;
    flex-direction: column;
    min-height: min(300px, 30vh);
    max-height: min(300px, 30vh);
    overflow: hidden;
    opacity: 1;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), min-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.pub-collapse-body.collapsed {
    max-height: 0;
    min-height: 0;
    opacity: 0;
}

/* 排班列表样式 */
.sched-list {
    padding: 8px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

/* v2.28: 排班公示按活动分隔——活动头 + 人员芯片平铺 */
.sched-activity-block {
    padding: 6px 4px;
    border-bottom: 1px dashed var(--border);
}

.sched-activity-block:last-child { border-bottom: none; }

.sched-activity-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 6px;
    font-size: 13px;
}

.sched-activity-name {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    color: var(--primary-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sched-members {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 6px 2px 6px;
}

.sched-member {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f0f4fa;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.sched-status { flex-shrink: 0; font-size: 12px; font-weight: 600; padding: 1px 6px; border-radius: 3px; }
.sched-status.plan { background: #FEF3C7; color: #F59E0B; }
.sched-status.completed { background: #DCFCE7; color: #16A34A; }
.sched-status.pending { background: #FEE2E2; color: #e04040; }

/* Tab 导航 */
.pub-tabs {
    display: flex;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
}

.pub-tab {
    padding: 14px 24px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 15px;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.pub-tab:hover { color: var(--primary); }

.pub-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

/* 面板切换 */
.pub-panel { display: none; }
.pub-panel.active { display: block; }

/* 日志公示 - 双栏布局 */
.pub-layout {
    display: flex;
    gap: 16px;
    padding: 16px 24px;
    min-height: calc(100vh - 140px);
}

.pub-sidebar {
    width: 300px;
    flex-shrink: 0;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow-y: auto;
    max-height: calc(100vh - 160px);
}

.pub-content {
    flex: 1;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: auto;
    max-height: calc(100vh - 160px);
    padding: 20px;
}

/* 侧边栏日期组 */
.log-date-group { border-bottom: 1px solid var(--border); }
.log-date-group:last-child { border-bottom: none; }

.log-date-header {
    padding: 10px 16px;
    font-weight: 600;
    font-size: 14px;
    color: var(--primary-dark);
    background: #eef2f9;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.log-date-header:hover { background: #e2e8f4; }

/* v2.28: 组头显示完整活动名，过长省略 */
.log-date-header .log-date-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.log-date-header .arrow { transition: transform 0.3s ease; }
.log-date-group.expanded .log-date-header .arrow { transform: rotate(90deg); }

/* 丝滑展开/折叠动画：max-height + opacity + transform 配合 transition */
.log-records {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease,
                transform 0.3s ease;
}
.log-date-group.expanded .log-records {
    max-height: 2000px;
    opacity: 1;
    transform: translateY(0);
}

.log-record {
    padding: 8px 16px 8px 24px;
    border-top: 1px solid #f0f0f0;
}

.log-record-info {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.log-record-info .callsign {
    font-weight: 600;
    color: var(--text);
}

.log-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    margin: 2px 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
    transition: background 0.15s;
}

.log-file-item:hover { background: #e8eef8; }
.log-file-item.active { background: #d6e0f2; font-weight: 500; }

.log-file-icon { font-size: 16px; }
.log-file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 内容区占位/加载 */
.pub-placeholder, .pub-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
    color: var(--text-muted);
    font-size: 15px;
}

/* 表格展示 */
.pub-table-container {
    overflow-x: auto;
}

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

.pub-data-table th {
    background: #eef2f9;
    color: var(--primary-dark);
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--primary);
    white-space: nowrap;
    position: sticky;
    top: 0;
}

.pub-data-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.pub-data-table tr:hover td { background: #f8fafb; }

.pub-data-table .row-num {
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
    width: 40px;
}

/* 图片展示 */
.pub-image-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.pub-image-item {
    max-width: 100%;
    text-align: center;
}

.pub-image-item img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.pub-image-caption {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

/* 文件信息条 */
.pub-file-info {
    padding: 8px 12px;
    background: #eef2f9;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pub-file-info .file-name {
    font-weight: 600;
    color: var(--text);
}

.pub-file-info .file-meta {
    margin-left: auto;
    font-size: 12px;
}

/* 排班公示 */
.pub-toolbar {
    padding: 16px 24px 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pub-search {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    width: 300px;
    outline: none;
    transition: border-color 0.2s;
}

.pub-search:focus { border-color: var(--primary); }

.pub-count {
    font-size: 13px;
    color: var(--text-muted);
}

.pub-table-wrap {
    padding: 0 24px 24px;
    overflow-x: auto;
}

/* 状态徽章 */
.pub-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.pub-badge-done { background: #DCFCE7; color: #16A34A; }
.pub-badge-plan { background: #FEF3C7; color: #F59E0B; }
.pub-badge-overdue { background: #FEE2E2; color: #e04040; }

/* v2.21 备用主控徽章（灰色小号，排班活动名称后） */
.pub-badge-reserve {
    display: inline-block;
    padding: 0 5px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 500;
    line-height: 16px;
    white-space: nowrap;
    background: #E5E7EB;
    color: #6B7280;
    vertical-align: middle;
    margin-left: 2px;
}

/* 呼号状态徽章 */
.pub-callsign-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 4px;
}

.pub-callsign-badge.formal { background: #e0e7ff; color: #3730a3; }
.pub-callsign-badge.reserve { background: #fef3c7; color: #92400e; }
.pub-callsign-badge.trainee { background: #e0f2fe; color: #075985; }
.pub-callsign-badge.suspended { background: #fee2e2; color: #991b1b; }

/* 错误提示 */
.pub-error {
    padding: 16px;
    background: #fee2e2;
    border-radius: 6px;
    color: #991b1b;
    font-size: 14px;
    text-align: center;
}

/* 文本展示 */
.pub-text-content {
    white-space: pre-wrap;
    word-break: break-all;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.5;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
    overflow-x: auto;
}

/* PDF / 下载 */
.pub-pdf-frame {
    width: 100%;
    height: calc(100vh - 220px);
    border: none;
    border-radius: 4px;
}

.pub-download-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.2s;
}

.pub-download-link:hover { background: var(--primary-dark); }

/* ---------- v2.20 日志勘误：附件预览底部（文字 + "联系我们"按钮） ---------- */
.pub-erratum-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--border, #e2e8f0);
}

.pub-erratum-text {
    font-size: 13px;
    color: var(--text-muted, #64748b);
}

.pub-erratum-btn {
    padding: 7px 22px;
    background: #fff;
    color: #b45309;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.pub-erratum-btn:hover {
    background: #fffbeb;
    color: #92400e;
}

/* ---------- v2.6 音频回放 ---------- */
/* 回放容器：居中卡片布局 */
.pub-audio-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 24px;
    margin: 0 24px 24px;
    background: #f8f9fa;
    border: 1px solid var(--border);
    border-radius: 8px;
}

/* 原生音频控件：限制最大宽度，移动端自适应 */
.pub-audio-player {
    width: 100%;
    max-width: 560px;
    height: 40px;
}

/* 回放提示 */
.pub-audio-hint {
    font-size: 12px;
    color: var(--text-muted);
}

/* 回放失败提示（浏览器不支持的音频格式） */
.pub-audio-error {
    font-size: 13px;
    color: #d97706;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 6px 14px;
}

.pub-audio-error.hidden {
    display: none;
}

/* ---------- v2.7 波形音频播放器 ---------- */
/* v2.9: 波形高度 200px、宽度撑满容器；播放按钮扁平化 */
/* 布局：播放按钮 + 波形画布 + 时间 */
.pub-wave-player {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

/* 扁平圆形播放按钮（SVG 图标） */
.pub-wave-btn {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    padding: 0;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.pub-wave-btn:hover {
    background: #1d4ed8;
}

.pub-wave-btn-icon {
    display: block;
}

/* 波形容器（画布 + 加载提示） */
.pub-wave-main {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 200px;
    background: #eef1f5;
    border-radius: 6px;
    overflow: hidden;
}

.pub-wave-canvas {
    display: block;
    width: 100%;
    height: 200px;
    cursor: pointer;
}

/* 波形未生成完成前隐藏画布（避免空白闪烁） */
.pub-wave-canvas:not(.is-ready) {
    visibility: hidden;
}

.pub-wave-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-muted);
}

.pub-wave-loading.hidden {
    display: none;
}

/* 时间显示（等宽字体防跳动） */
.pub-wave-time {
    flex-shrink: 0;
    font-size: 12px;
    font-family: Consolas, Monaco, monospace;
    color: var(--text-muted);
    min-width: 92px;
    text-align: right;
}

.pub-wave-player.hidden,
.pub-wave-main.hidden,
.pub-wave-btn.hidden {
    display: none;
}

/* ---------- v2.17 底部悬浮音频播放条 ---------- */
/* 全页唯一 <audio> 挂载于此；切换附件不打断播放，切换音频自动接续 */
.pub-float-player {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 16px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(720px, calc(100vw - 32px));
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(15, 32, 62, 0.18);
}

.pub-float-player.hidden {
    display: none;
}

/* 播放/暂停按钮（复用大波形按钮的扁平风格，尺寸缩小） */
.pub-fp-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.pub-fp-btn:hover {
    background: #1d4ed8;
}

/* 标题 + 进度条 */
.pub-fp-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pub-fp-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* v2.21 悬浮条小波形（v2.31: 26px → 48px 加大，峰值就绪后替换进度条） */
.pub-fp-wave {
    display: none;
    width: 100%;
    height: 48px;
    cursor: pointer;
}

.pub-fp-wave.is-ready {
    display: block;
}

.pub-fp-bar.hidden {
    display: none;
}

.pub-fp-bar {
    position: relative;
    height: 6px;
    border-radius: 3px;
    background: #e4e9f0;
    cursor: pointer;
}

.pub-fp-bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    border-radius: 3px;
    background: var(--primary);
    pointer-events: none;
}

/* 时间（等宽防跳动） */
.pub-fp-time {
    flex-shrink: 0;
    font-size: 12px;
    font-family: Consolas, Monaco, monospace;
    color: var(--text-muted);
    min-width: 92px;
    text-align: right;
}

/* 关闭按钮 */
.pub-fp-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.pub-fp-close:hover {
    background: #f1f4f8;
    color: var(--danger);
}

/* 窄屏适配 */
@media (max-width: 560px) {
    .pub-float-player {
        bottom: 8px;
        gap: 8px;
        padding: 8px 10px;
    }
    .pub-fp-time {
        display: none;
    }
}

/* 空状态 */
.pub-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 15px;
}

/* v2.6 主控附件分区标题（日志公示侧栏内，与日期分组区分） */
.log-cs-section-title {
    margin: 14px 12px 6px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.06);
    border-radius: 6px;
}

/* 公告卡片 */
.announcement-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 20px 24px;
    margin-bottom: 16px;
}

.announcement-card.pinned {
    border-left: 4px solid var(--primary);
}

.announcement-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.announcement-content {
    color: var(--text);
    font-size: 14px;
    line-height: 1.8;
    word-break: break-word;
}

.announcement-content img,
.announcement-content video,
.announcement-content iframe {
    max-width: 100%;
}

.announcement-content img {
    height: auto;
    border-radius: 4px;
}

.announcement-content p {
    margin: 8px 0;
}

.announcement-content a {
    color: var(--primary);
}

.announcement-card .new-badge {
    display: inline-block;
    padding: 1px 8px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    margin-left: 8px;
    line-height: 1.6;
    vertical-align: middle;
}

.announcement-meta {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
}

.announcement-meta .author {
    font-weight: 500;
    color: var(--text);
}

.announcement-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 15px;
}

/* 公告左右布局 */
.ann-layout {
    display: flex;
    flex: 1;
    min-height: 0;
    gap: 16px;
    padding: 12px;
}

.ann-sidebar {
    flex: 0 0 30%;
    min-height: 0;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
}

.ann-sidebar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 4px;
    transition: background 0.2s;
    white-space: nowrap;
    overflow: hidden;
}

.ann-sidebar-item:hover { background: #f0f4fa; }

.ann-sidebar-item.active { background: var(--primary); color: #fff; }

.ann-sidebar-item.pinned::before { content: '\1F4CC '; }

.ann-sidebar-item .new-badge {
    display: inline-block;
    padding: 1px 6px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    border-radius: 8px;
    margin-left: 6px;
    line-height: 1.5;
    vertical-align: middle;
}

.ann-sidebar-item-title {
    flex: 1;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ann-sidebar-item-date {
    flex-shrink: 0;
    font-size: 12px;
    opacity: 0.7;
}

.ann-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0 8px;
}

.ann-content-card {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
}

.ann-content-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--text);
}

.ann-content-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    line-height: 1.7;
    color: var(--text);
    font-size: 14px;
    word-break: break-word;
}

.ann-content-body img { max-width: 100%; height: auto; border-radius: 4px; }
.ann-content-body video,
.ann-content-body iframe { max-width: 100%; }
.ann-content-body p { margin: 8px 0; }
.ann-content-body a { color: var(--primary); }

.ann-content-meta {
    flex-shrink: 0;
    color: #888;
    font-size: 13px;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

/* 底部 */
.pub-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 14px 24px;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

.pub-footer-left {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 0 24px;
    min-width: 0;
}

.pub-footer-note { opacity: 0.75; }

.pub-footer-right {
    display: flex;
    gap: 16px;
}

.pub-footer-right a {
    color: var(--primary);
    text-decoration: none;
}

.pub-footer-right a:hover { text-decoration: underline; }

/* ========== 联系我们 ========== */

/* 头部右侧容器 */
.pub-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 弹窗遮罩 */
.pub-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 1000;
}

.pub-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.pub-modal {
    position: relative;
    width: min(440px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
    padding: 24px;
}

.pub-modal h3 {
    font-size: 18px;
    margin-bottom: 6px;
    color: var(--text);
}

.pub-modal-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.pub-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
}

.pub-modal-close:hover { background: #f0f4fa; color: var(--text); }

.pub-form-group { margin-bottom: 14px; }

.pub-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.pub-form-group input,
.pub-form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pub-form-group textarea {
    min-height: 110px;
    resize: vertical;
}

.pub-form-group input:focus,
.pub-form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 68, 140, 0.12);
}

.pub-modal-submit {
    width: 100%;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.pub-modal-submit:hover { background: var(--primary-dark); }

.pub-modal-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 全局提示 toast */
.pub-toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%) translateY(12px);
    padding: 10px 22px;
    border-radius: 8px;
    background: rgba(26, 26, 26, 0.92);
    color: #fff;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 1100;
    max-width: 86vw;
}

.pub-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========== 隐私声明页 ========== */

.pub-back-link {
    color: #fff;
    font-size: 13px;
    text-decoration: none;
    opacity: 0.9;
}

.pub-back-link:hover { opacity: 1; text-decoration: underline; }

.privacy-main {
    max-width: 860px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

.privacy-card {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 32px 36px;
}

.privacy-updated {
    font-size: 13px;
    color: var(--text-muted);
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.privacy-card p {
    font-size: 14px;
    line-height: 1.9;
    color: var(--text);
    margin: 10px 0;
}

.privacy-card h2 {
    font-size: 17px;
    margin: 26px 0 10px;
    padding-left: 10px;
    border-left: 4px solid var(--primary);
    color: var(--text);
}

.privacy-card h3 {
    font-size: 15px;
    margin: 16px 0 6px;
    color: var(--text);
}

.privacy-card ul {
    margin: 8px 0 8px 22px;
}

.privacy-card li {
    font-size: 14px;
    line-height: 1.9;
    color: var(--text);
}

.privacy-card a { color: var(--primary); }

.privacy-footer-line {
    margin-top: 28px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

/* 响应式 */
@media (max-width: 768px) {
    .pub-layout { flex-direction: column; padding: 12px; }
    .pub-sidebar { width: 100%; max-height: 250px; }
    .pub-content { max-height: none; }
    .pub-search { width: 100%; }
    /* 窄屏页头：logo 缩小，标题允许换行 */
    .pub-header { padding: 12px 14px; }
    .pub-header-logo { width: 36px; height: 36px; flex-basis: 36px; }
    .pub-header-title { gap: 10px; }
    .pub-header h1 { font-size: 16px; }
}

/* 公告左右布局：窄屏改为上下布局 */
@media (max-width: 640px) {
    .ann-layout { flex-direction: column; }
    .ann-sidebar {
        width: 100%;
        flex: 0 0 auto;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        max-height: 200px;
    }
}
