:root {
    --brand: #0f5ba8;
    --brand-dark: #083a70;
    --brand-light: #e8f1fb;
    --text-main: #23262e;
    --text-sub: #7a8091;
    --line: #eceef3;
    --bg: #f4f5f8;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

[v-cloak] {
    display: none;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

.page {
    max-width: 760px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    padding-bottom: 24px;
}

/* ---------- 头部 ---------- */
.hero {
    position: relative;
    background: linear-gradient(150deg, #1b74c9 0%, var(--brand) 45%, var(--brand-dark) 100%);
    color: #fff;
    padding: 15px 16px 30px;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    right: -70px;
    top: -60px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0));
}

.hero-top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.brand-logo {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}

.brand-logo img {
    width: 31px;
    height: 31px;
}

.brand-text {
    min-width: 0;
}

.brand-text .t1 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .4px;
}

.brand-text .t2 {
    font-size: 10.5px;
    opacity: .88;
    letter-spacing: .5px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-submit {
    flex: 0 0 auto;
    background: #fff;
    color: var(--brand);
    font-size: 13px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}

.hero-title {
    position: relative;
    z-index: 2;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: .5px;
    margin-top: 20px;
}

.hero-sub {
    position: relative;
    z-index: 2;
    font-size: 12px;
    opacity: .88;
    margin-top: 5px;
    letter-spacing: .5px;
}

.main {
    padding: 0 12px;
    margin-top: -14px;
    position: relative;
    z-index: 3;
}

/* ---------- 简介 ---------- */
.intro-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(15, 60, 120, .08);
    padding: 14px 16px;
    margin-bottom: 14px;
}

.intro-head {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.6;
}

.intro-head .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand);
    margin-top: 8px;
    flex: 0 0 7px;
}

.intro-body {
    margin-top: 8px;
    color: #5b6273;
    font-size: 12.5px;
    line-height: 1.75;
    white-space: pre-wrap;
    max-height: 84px;
    overflow: hidden;
}

.intro-body.expanded {
    max-height: none;
}

.intro-more {
    color: var(--brand);
    font-size: 12px;
    margin-top: 6px;
    cursor: pointer;
}

.intro-contact {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--line);
    font-size: 12px;
    color: var(--text-sub);
    line-height: 1.6;
}

/* ---------- 列表 ---------- */
.loading, .empty {
    background: #fff;
    border-radius: 14px;
    padding: 30px 16px;
    text-align: center;
    color: var(--text-sub);
    font-size: 13.5px;
    box-shadow: 0 4px 18px rgba(15, 60, 120, .06);
}

.empty-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    margin: 0 auto 10px;
    background: var(--brand-light);
    color: var(--brand);
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-btn {
    display: inline-block;
    margin-top: 14px;
    color: #fff;
    background: var(--brand);
    border-radius: 20px;
    padding: 9px 18px;
    font-size: 13px;
}

.topic-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(15, 60, 120, .08);
    padding: 15px 16px;
    margin-bottom: 12px;
}

.topic-top {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.topic-top h3 {
    margin: 0;
    flex: 1;
    font-size: 16.5px;
    line-height: 1.5;
    font-weight: 700;
}

.topic-time {
    flex: 0 0 auto;
    font-size: 11px;
    color: #a4aab6;
    margin-top: 3px;
}

.topic-summary {
    margin: 8px 0 0;
    font-size: 13px;
    color: #55617a;
    line-height: 1.65;
}

.topic-content-preview {
    margin: 7px 0 0;
    font-size: 12.5px;
    color: var(--text-sub);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: pre-wrap;
}

.att-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.att-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    background: #f4f7fb;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 11.5px;
    color: #55617a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.att-more {
    font-size: 11.5px;
    color: var(--brand);
    padding: 4px 2px;
}

.topic-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.btn-primary, .btn-ghost {
    flex: 1;
    text-align: center;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 0;
    border: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #1b74c9, var(--brand-dark));
    color: #fff;
    box-shadow: 0 4px 12px rgba(15, 91, 168, .24);
}

.btn-primary.full {
    width: 100%;
}

.btn-ghost {
    background: #fff;
    color: var(--brand);
    border: 1px solid #cfe0f3;
}

/* 附件类型标记 */
.file-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-style: normal;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .2px;
    color: #fff;
    border-radius: 4px;
    padding: 2px 4px;
    min-width: 26px;
    line-height: 1.2;
}

.badge-pdf { background: #d84545; }
.badge-docx, .badge-doc-text { background: #2b579a; }
.badge-excel { background: #217346; }
.badge-image { background: #8a5cd6; }
.badge-txt { background: #6b7485; }
.badge-download { background: #7a8091; }

.footer {
    text-align: center;
    color: #9aa1af;
    font-size: 11.5px;
    line-height: 1.8;
    padding: 18px 8px 10px;
}

.footer a {
    color: var(--brand);
    display: inline-block;
    margin-top: 4px;
}

/* ---------- 弹层 ---------- */
.mask {
    position: fixed;
    inset: 0;
    background: rgba(10, 24, 44, .55);
    z-index: 100;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.sheet {
    width: 100%;
    max-width: 760px;
    max-height: 88vh;
    background: #fff;
    border-radius: 18px 18px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: sheetUp .22s ease-out;
}

@keyframes sheetUp {
    from { transform: translateY(24px); opacity: .6; }
    to { transform: translateY(0); opacity: 1; }
}

.sheet-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 16px 10px;
    border-bottom: 1px solid var(--line);
}

.sheet-title {
    flex: 1;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.5;
}

.close-btn {
    border: none;
    background: #f2f4f8;
    color: #7a8091;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    flex: 0 0 30px;
}

.sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    -webkit-overflow-scrolling: touch;
}

.detail-meta {
    font-size: 11.5px;
    color: #a4aab6;
  margin-bottom: 10px;
}

.detail-summary {
    font-size: 13.5px;
    color: #55617a;
    background: #f4f7fb;
    border-radius: 8px;
    padding: 10px 12px;
    line-height: 1.7;
    margin-bottom: 12px;
}

.detail-content {
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.85;
    white-space: pre-wrap;
    word-break: break-word;
}

.detail-section-title {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: 14px;
    font-weight: 700;
}

.no-att {
    font-size: 12px;
    color: var(--text-sub);
    font-weight: 400;
    margin-left: 6px;
}

.att-list {
    margin-top: 10px;
}

.att-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--line);
}

.att-row:last-child {
    border-bottom: none;
}

.att-info {
    flex: 1;
    min-width: 0;
}

.att-name {
    font-size: 13px;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.att-size {
    font-size: 11px;
    color: #a4aab6;
    margin-top: 2px;
}

.att-actions {
    display: flex;
    gap: 6px;
    flex: 0 0 auto;
}

.att-btn {
    border: 1px solid #cfe0f3;
    background: #fff;
    color: var(--brand);
    border-radius: 7px;
    font-size: 12px;
    padding: 5px 10px;
    display: inline-block;
}

.att-btn.download {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.sheet-footer {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: #fff;
}

/* ---------- 预览 ---------- */
.preview-mask {
    align-items: center;
    padding: 10px;
    z-index: 120;
}

.preview-box {
    width: 100%;
    max-width: 960px;
    height: 92vh;
    background: #fff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.preview-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    background: #f8fafc;
}

.preview-title {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
}

.preview-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-head-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.preview-body {
    flex: 1;
    overflow: auto;
    background: #eef1f6;
    padding: 10px;
    -webkit-overflow-scrolling: touch;
}

.preview-loading, .preview-error {
    background: #fff;
    border-radius: 10px;
    padding: 30px 18px;
    text-align: center;
    color: var(--text-sub);
    font-size: 13px;
    line-height: 1.8;
}

.preview-error .att-btn {
    margin-top: 10px;
}

.preview-image {
    display: block;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 6px;
    background: #fff;
}

.preview-text {
    margin: 0;
    background: #fff;
    border-radius: 8px;
    padding: 14px 16px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 13px;
    line-height: 1.8;
    color: #333a46;
    white-space: pre-wrap;
    word-break: break-word;
}

.preview-note {
    margin-top: 8px;
    background: #fff8e6;
    border: 1px solid #f3e3bd;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 11.5px;
    color: #8a6414;
    line-height: 1.6;
}

.pdf-wrap {
    text-align: center;
    min-width: 100%;
}

.pdf-wrap canvas {
    display: block;
    max-width: none;
    height: auto;
    margin: 0 auto 10px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(15, 60, 120, .08);
}

.pdf-toolbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid #e3e8f0;
    border-radius: 10px;
    padding: 7px 10px;
    margin: 0 auto 10px;
    max-width: 420px;
    box-shadow: 0 3px 12px rgba(15, 60, 120, .08);
    backdrop-filter: blur(6px);
}

.pdf-zoom-btn {
    width: 33px;
    height: 33px;
    border-radius: 8px;
    border: 1px solid #cfe0f3;
    background: #f7fafd;
    color: var(--brand);
    font-size: 20px;
    line-height: 1;
    font-weight: 600;
}

.pdf-zoom-btn:disabled {
    opacity: .35;
}

.pdf-zoom-text {
    min-width: 48px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.pdf-fit-btn {
    border: 1px solid #cfe0f3;
    background: #fff;
    color: var(--brand);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
}

.office-wrap {
    background: #fff;
    border-radius: 8px;
    padding: 14px;
    min-height: 100%;
}

.doc-html {
    color: #23262e;
    font-size: 14px;
    line-height: 1.85;
    word-break: break-word;
}

.doc-html img {
    max-width: 100%;
    height: auto;
}

.doc-html table {
    border-collapse: collapse;
    max-width: 100%;
}

.doc-html td, .doc-html th {
    border: 1px solid #dfe4ec;
    padding: 5px 7px;
    font-size: 13px;
}

.sheet-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.sheet-tab {
    border: 1px solid #dfe4ec;
    background: #f7f9fc;
    color: #55617a;
    border-radius: 6px;
    font-size: 12px;
    padding: 5px 10px;
}

.sheet-tab.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.excel-html {
    overflow: auto;
}

.excel-html table {
    border-collapse: collapse;
    min-width: 100%;
    background: #fff;
}

.excel-html td, .excel-html th {
    border: 1px solid #dfe4ec;
    padding: 5px 8px;
    font-size: 12.5px;
    white-space: nowrap;
}

.excel-html tr:first-child td {
    background: #f4f7fb;
    font-weight: 600;
}

/* ---------- toast ---------- */
.cb-toast {
    position: fixed;
    left: 50%;
    top: 24px;
    transform: translate(-50%, -10px);
    max-width: 88%;
    background: rgba(32, 40, 54, .92);
    color: #fff;
    font-size: 13px;
    line-height: 1.5;
    padding: 9px 14px;
    border-radius: 8px;
    z-index: 300;
    opacity: 0;
    transition: all .25s;
    pointer-events: none;
}

.cb-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (min-width: 900px) {
    .mask {
        align-items: center;
        padding: 16px;
    }

    .sheet {
        max-height: 86vh;
        border-radius: 14px;
    }

    .preview-box {
        height: 88vh;
    }
}

@media (max-width: 360px) {
    .hero-title {
        font-size: 21px;
    }

    .main {
        padding: 0 10px;
    }
}
/*
 * 微信分享缩略图占位：放在 v-cloak 容器之外（见 index.html），
 * 微信抓取分享封面时不执行页面 JS；若放在 v-cloak 里会被 display:none 隐藏。
 * 视觉上移到屏幕外，不影响正常页面显示。
 */
.share-thumb-holder {
    position: absolute;
    top: 0;
    left: -9999px;
    width: 300px;
    height: 300px;
    overflow: hidden;
}

.share-thumb-holder img {
    display: block;
    width: 300px;
    height: 300px;
}

