/* ==========================================================================
   珠声法务管理系统 · 极简日系·樱青 设计体系
   和纸米白 #faf7f2 / 樱粉 #a87878 / 青磁绿 #4f6b58
   ========================================================================== */

:root {
    --paper:      #faf7f2;   /* 和纸米白 */
    --paper-deep: #f3ede3;
    --card:       #fffdf9;
    --ink:        #3a3530;   /* 墨 */
    --ink-2:      #6f675d;
    --ink-3:      #9a9187;
    --sakura:     #a87878;   /* 樱粉 */
    --sakura-deep:#8f6262;
    --sakura-soft:#f2e6e3;
    --seiji:      #4f6b58;   /* 青磁绿 */
    --seiji-deep: #3c5445;
    --seiji-soft: #e3eae1;
    --line:       #e7dfd2;
    --line-2:     #ddd2c1;
    --gold:       #a9854b;
    --gold-soft:  #f3ebda;
    --red:        #a35b54;
    --red-soft:   #f4e3e0;
    --shadow:     0 1px 2px rgba(58, 53, 48, .04), 0 8px 24px rgba(58, 53, 48, .06);
    --radius:     10px;
    --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
    --font-sans:  "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-sans);
    color: var(--ink);
    background: var(--paper);
    font-size: 14.5px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--seiji); text-decoration: none; transition: color .2s; }
a:hover { color: var(--seiji-deep); }

h1, h2, h3 { font-weight: 600; }

code {
    background: var(--paper-deep);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: .9em;
    color: var(--sakura-deep);
}

/* ---------------- 品牌标记 ---------------- */
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: var(--seiji);
    color: #fff;
    font-family: var(--font-serif);
    font-size: 19px;
    flex-shrink: 0;
}
.brand-mark.lg { width: 54px; height: 54px; border-radius: 12px; font-size: 27px; }

/* ==========================================================================
   认证页 / 公开页
   ========================================================================== */
.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(1100px 500px at 85% -10%, rgba(168, 120, 120, .07), transparent 60%),
        radial-gradient(900px 480px at -10% 110%, rgba(79, 107, 88, .08), transparent 60%),
        var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.auth-wrap { width: 100%; max-width: 410px; }

.auth-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 38px 36px 30px;
}

.auth-brand { text-align: center; margin-bottom: 26px; }
.auth-brand .brand-mark { margin: 0 auto 14px; }
.auth-brand h1 {
    font-family: var(--font-serif);
    font-size: 22px;
    letter-spacing: 4px;
    color: var(--ink);
}
.auth-brand p { font-size: 12.5px; color: var(--ink-3); letter-spacing: 1px; margin-top: 4px; }

.auth-title {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 6px;
    letter-spacing: 2px;
}
.auth-subtitle {
    text-align: center;
    color: var(--ink-3);
    font-size: 13px;
    margin-bottom: 20px;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 18px;
    font-size: 13px;
}
.auth-foot {
    text-align: center;
    margin-top: 22px;
    color: var(--ink-3);
    font-size: 12.5px;
}
.auth-foot a { color: var(--ink-2); margin: 0 6px; }
.auth-foot a:hover { color: var(--seiji); }
.auth-foot span { color: var(--line-2); }

.install-summary {
    list-style: none;
    background: var(--paper);
    border: 1px dashed var(--line-2);
    border-radius: 8px;
    padding: 14px 18px;
    margin: 16px 0;
    font-size: 13px;
    color: var(--ink-2);
}
.install-summary li { padding: 3px 0; }

/* 公开静态页 */
.public-wrap { width: 100%; max-width: 820px; margin: 0 auto; padding: 0 16px 40px; }
.public-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 4px;
}
.public-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--font-serif); font-size: 17px; letter-spacing: 2px; }
.public-topbar nav { display: flex; gap: 18px; align-items: center; font-size: 13.5px; }
.public-topbar nav a { color: var(--ink-2); }
.public-doc {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 42px 46px;
}
.doc-title { font-family: var(--font-serif); font-size: 26px; letter-spacing: 3px; text-align: center; margin-bottom: 6px; }
.doc-updated { text-align: center; color: var(--ink-3); font-size: 12.5px; margin-bottom: 28px; }
.public-doc h2 {
    font-family: var(--font-serif);
    font-size: 16.5px;
    color: var(--seiji-deep);
    margin: 26px 0 10px;
    padding-left: 12px;
    border-left: 3px solid var(--sakura);
}
.public-doc p { color: var(--ink-2); margin-bottom: 10px; }

/* ==========================================================================
   应用布局
   ========================================================================== */
.app-body { background: var(--paper); }

.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 236px;
    flex-shrink: 0;
    background: var(--card);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 40;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 22px 20px 18px;
    border-bottom: 1px solid var(--line);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.brand-text b { font-family: var(--font-serif); font-size: 16px; letter-spacing: 2px; color: var(--ink); white-space: nowrap; }
.brand-text small { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav { flex: 1; padding: 14px 12px; overflow-y: auto; }
.nav-group {
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--ink-3);
    padding: 14px 12px 6px;
}
.nav-group:first-child { padding-top: 4px; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9.5px 12px;
    border-radius: 8px;
    color: var(--ink-2);
    font-size: 14px;
    margin-bottom: 2px;
    position: relative;
}
.nav-link:hover { background: var(--paper); color: var(--ink); }
.nav-link.active {
    background: var(--seiji-soft);
    color: var(--seiji-deep);
    font-weight: 600;
}
.nav-link.active::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 8px; bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--seiji);
}
.nav-icon { width: 20px; text-align: center; color: var(--ink-3); font-size: 15px; }
.nav-link.active .nav-icon { color: var(--seiji); }

.sidebar-foot { padding: 12px; border-top: 1px solid var(--line); }

.main {
    flex: 1;
    margin-left: 236px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 32px;
    background: rgba(250, 247, 242, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.topbar-title h1 {
    font-family: var(--font-serif);
    font-size: 19px;
    letter-spacing: 2px;
}
.topbar-title p { font-size: 12px; color: var(--ink-3); }
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-dot {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--sakura-soft);
    color: var(--sakura-deep);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-serif);
    font-size: 16px;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.3; }
.user-meta b { font-size: 13.5px; }
.user-meta small { font-size: 11.5px; color: var(--ink-3); }

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    width: 38px; height: 36px;
    font-size: 17px;
    color: var(--ink-2);
    cursor: pointer;
}
.sidebar-mask { display: none; }

.content {
    flex: 1;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 32px 48px;
}

.app-footer {
    text-align: center;
    color: var(--ink-3);
    font-size: 12px;
    padding: 20px;
    border-top: 1px solid var(--line);
}

/* ==========================================================================
   组件：卡片 / 统计 / 快捷入口
   ========================================================================== */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px 24px;
    margin-bottom: 20px;
}
.card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 14px;
}
.card-head h3, .card-title {
    font-family: var(--font-serif);
    font-size: 15.5px;
    letter-spacing: 1.5px;
    color: var(--ink);
    margin-bottom: 14px;
}
.card-head .more { font-size: 12.5px; color: var(--ink-3); }
.card-head .more:hover { color: var(--seiji); }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}
.stat-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(58,53,48,.1); }
.stat-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
}
.stat-card b { font-family: var(--font-serif); font-size: 32px; font-weight: 600; line-height: 1.2; }
.stat-card span { font-size: 12.5px; color: var(--ink-3); letter-spacing: 1px; }
.stat-card.sakura::before { background: var(--sakura); }
.stat-card.sakura b { color: var(--sakura-deep); }
.stat-card.seiji::before { background: var(--seiji); }
.stat-card.seiji b { color: var(--seiji-deep); }
.stat-card.ink::before { background: var(--ink-2); }
.stat-card.ink b { color: var(--ink-2); }

.quick-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-2);
    font-size: 13.5px;
    box-shadow: var(--shadow);
    transition: all .2s;
}
.quick-btn:hover { border-color: var(--seiji); color: var(--seiji-deep); background: var(--seiji-soft); }
.quick-btn span { color: var(--sakura); }
.quick-actions.admin { margin-bottom: 0; }

.dash-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.dash-cols .card { margin-bottom: 20px; }

/* ==========================================================================
   组件：徽章 / 按钮
   ========================================================================== */
.badge {
    display: inline-block;
    padding: 2.5px 11px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.7;
    white-space: nowrap;
    letter-spacing: .5px;
}
.badge-pending, .badge-suspended { background: var(--sakura-soft); color: var(--sakura-deep); }
.badge-approved, .badge-replied, .badge-closed, .badge-processing { background: var(--seiji-soft); color: var(--seiji-deep); }
.badge-rejected { background: var(--red-soft); color: var(--red); }
.badge-draft { background: #ece7de; color: var(--ink-2); }
.badge-archived { background: #e8e3da; color: var(--ink-3); }
.badge-expired { background: var(--gold-soft); color: var(--gold); }
.badge-soft { background: var(--paper-deep); color: var(--ink-2); }
.badge-seiji { background: var(--seiji); color: #fff; }

.text-seiji { color: var(--seiji-deep); }
.text-sakura { color: var(--sakura-deep); }

.btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 14px;
    font-family: var(--font-sans);
    letter-spacing: 2px;
    cursor: pointer;
    text-align: center;
    transition: all .2s;
    line-height: 1.5;
}
.btn-sm { padding: 7px 14px; font-size: 13px; letter-spacing: 1px; }
.btn-block { display: block; width: 100%; }
.btn-primary { background: var(--seiji); color: #fff; }
.btn-primary:hover { background: var(--seiji-deep); color: #fff; }
.btn-sakura { background: var(--sakura); color: #fff; }
.btn-sakura:hover { background: var(--sakura-deep); color: #fff; }
.btn-ghost { background: var(--card); border-color: var(--line-2); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--seiji); color: var(--seiji-deep); }
.btn-link {
    background: none; border: none; padding: 0;
    color: var(--seiji); font-size: 13px; cursor: pointer;
    font-family: var(--font-sans);
}
.btn-link:hover { color: var(--seiji-deep); text-decoration: underline; }
.btn-link.text-sakura { color: var(--sakura-deep); }

/* ==========================================================================
   组件：表单
   ========================================================================== */
.form { margin: 0; }
.field { display: block; margin-bottom: 16px; }
.field > span {
    display: block;
    font-size: 12.5px;
    color: var(--ink-2);
    letter-spacing: 1px;
    margin-bottom: 6px;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="date"],
.field select,
.field textarea,
.filter-form input,
.filter-form select {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid var(--line-2);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-size: 14px;
    font-family: var(--font-sans);
    transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; line-height: 1.8; }
.field input:focus, .field select:focus, .field textarea:focus,
.filter-form input:focus, .filter-form select:focus {
    outline: none;
    border-color: var(--seiji);
    box-shadow: 0 0 0 3px rgba(79, 107, 88, .12);
}
.field input:disabled { background: var(--paper-deep); color: var(--ink-3); cursor: not-allowed; }

.check-field {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    font-size: 13px;
    color: var(--ink-2);
    margin-bottom: 18px;
    cursor: pointer;
}
.check-field input { margin-top: 4px; accent-color: var(--seiji); }
.check-field a { color: var(--sakura-deep); }

.form-actions { display: flex; gap: 12px; margin-top: 6px; }
.form-row { display: flex; gap: 16px; }
.form-row .field { flex: 1; }
.field-narrow { max-width: 220px; }

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
}
.form-grid .span-2 { grid-column: 1 / -1; }

.form-tip {
    text-align: center;
    color: var(--ink-3);
    font-size: 12px;
    margin-top: 16px;
    line-height: 1.8;
}

.inline-form { display: inline; }

/* ==========================================================================
   组件：提示条
   ========================================================================== */
.flash {
    padding: 11px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    line-height: 1.6;
}
.flash-success { background: var(--seiji-soft); color: var(--seiji-deep); border-color: #cdd9ca; }
.flash-error   { background: var(--red-soft); color: var(--red); border-color: #e6c9c5; }
.flash-warning { background: var(--gold-soft); color: var(--gold); border-color: #e4d5b8; }
.flash-info    { background: var(--paper-deep); color: var(--ink-2); border-color: var(--line-2); }

.empty {
    text-align: center;
    color: var(--ink-3);
    padding: 44px 20px;
    font-size: 13.5px;
    letter-spacing: 1px;
}
.empty::before {
    content: "❋";
    display: block;
    font-size: 22px;
    color: var(--line-2);
    margin-bottom: 8px;
}

/* ==========================================================================
   组件：表格 / 工具条 / 分页
   ========================================================================== */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.filter-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.filter-form input { width: 220px; }
.filter-form select { width: 130px; }

.table-scroll { overflow-x: auto; margin: 0 -24px; padding: 0 24px; }
.table { width: 100%; border-collapse: collapse; }
.table th {
    text-align: left;
    font-size: 11.5px;
    letter-spacing: 2px;
    color: var(--ink-3);
    font-weight: 500;
    padding: 8px 12px;
    border-bottom: 1px solid var(--line-2);
    white-space: nowrap;
}
.table td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
    font-size: 13.5px;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--paper); }
.table-title {
    color: var(--ink);
    font-weight: 600;
    font-size: 14px;
}
.table-title:hover { color: var(--seiji-deep); }
.table-sub { display: block; color: var(--ink-3); font-size: 11.5px; font-weight: 400; margin-top: 1px; }
.td-narrow { white-space: nowrap; }
.td-nowrap { white-space: nowrap; color: var(--ink-2); font-size: 12.5px; }
.td-detail { color: var(--ink-2); font-size: 12.5px; max-width: 320px; }
.td-action { white-space: nowrap; text-align: right; }
.td-action a, .td-action .btn-link { margin-left: 12px; font-size: 13px; }
.td-action a:first-child { margin-left: 0; }

.pager {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    margin: 6px 0 20px;
}
.pager a, .pager .current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 7px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink-2);
    font-size: 13px;
}
.pager a:hover { border-color: var(--seiji); color: var(--seiji-deep); }
.pager .current { background: var(--seiji); border-color: var(--seiji); color: #fff; }
.pager-info { color: var(--ink-3); font-size: 12.5px; margin-left: 10px; }

/* ==========================================================================
   组件：详情 / 时间线 / 问答
   ========================================================================== */
.detail-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}
.detail-title { font-family: var(--font-serif); font-size: 21px; letter-spacing: 1px; }
.detail-sub { color: var(--ink-3); font-size: 12.5px; margin-top: 4px; }

.detail-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 20px;
    align-items: start;
}
.detail-grid .card { margin-bottom: 0; }

.desc-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 18px;
    margin-bottom: 8px;
}
.desc-list > div {
    display: flex;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 13.5px;
}
.desc-list dt { color: var(--ink-3); white-space: nowrap; min-width: 72px; }
.desc-list dd { color: var(--ink); word-break: break-all; }

.prose { color: var(--ink-2); font-size: 14px; line-height: 1.9; }

.timeline { list-style: none; margin: 6px 0 18px; }
.tl-item { position: relative; padding: 0 0 18px 26px; }
.tl-item::before {
    content: "";
    position: absolute;
    left: 6px; top: 16px; bottom: -4px;
    width: 1px;
    background: var(--line-2);
}
.tl-item:last-child::before { display: none; }
.tl-dot {
    position: absolute;
    left: 0; top: 5px;
    width: 13px; height: 13px;
    border-radius: 50%;
    background: var(--paper);
    border: 3px solid var(--seiji);
}
.tl-reject .tl-dot { border-color: var(--sakura); }
.tl-archive .tl-dot { border-color: var(--ink-3); }
.tl-submit .tl-dot { border-color: var(--gold); }
.tl-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.tl-head b { color: var(--ink); font-weight: 600; }
.tl-head span { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.tl-comment {
    margin-top: 5px;
    background: var(--paper);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--ink-2);
    font-size: 13px;
}

.approve-box {
    border-top: 1px dashed var(--line-2);
    padding-top: 16px;
    margin-top: 4px;
}

.back-link { font-size: 13px; color: var(--ink-3); }
.back-link:hover { color: var(--seiji); }

/* 问答 */
.qa-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.qa-item { display: flex; gap: 12px; }
.qa-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--sakura-soft);
    color: var(--sakura-deep);
    font-family: var(--font-serif);
    font-size: 16px;
}
.qa-avatar.seiji { background: var(--seiji); color: #fff; }
.qa-bubble {
    flex: 1;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 4px 12px 12px 12px;
    padding: 12px 16px;
    box-shadow: var(--shadow);
}
.qa-reply .qa-bubble { background: var(--seiji-soft); border-color: #cdd9ca; border-radius: 12px 4px 12px 12px; }
.qa-meta { font-size: 12px; color: var(--ink-3); margin-bottom: 4px; }

/* 公告列表 */
.notice-list { list-style: none; }
.notice-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--line);
}
.notice-list li:last-child { border-bottom: none; }
.notice-list a { color: var(--ink); font-size: 14px; }
.notice-list a:hover { color: var(--seiji-deep); }
.notice-list time { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; }

/* 知识库列表 */
.cat-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.cat-tabs a {
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    background: var(--card);
    color: var(--ink-2);
    font-size: 13px;
}
.cat-tabs a:hover { border-color: var(--seiji); color: var(--seiji-deep); }
.cat-tabs a.active { background: var(--seiji); border-color: var(--seiji); color: #fff; }

.article-list { list-style: none; }
.article-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px dashed var(--line);
}
.article-item:last-child { border-bottom: none; }
.article-item-title { flex: 1; color: var(--ink); font-size: 14.5px; font-weight: 500; }
.article-item:hover .article-item-title { color: var(--seiji-deep); }
.article-item time { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; }

.article-head { text-align: center; border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 22px; }
.article-head h2 { font-family: var(--font-serif); font-size: 23px; letter-spacing: 2px; margin: 12px 0 6px; }
.article-meta { color: var(--ink-3); font-size: 12.5px; }
.article-body { font-size: 15px; line-height: 2.1; }

/* 日志列表 */
.log-list { list-style: none; }
.log-list li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 13px;
}
.log-list li:last-child { border-bottom: none; }
.log-action { color: var(--seiji-deep); font-weight: 600; white-space: nowrap; }
.log-detail { color: var(--ink-2); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-meta { color: var(--ink-3); font-size: 12px; white-space: nowrap; }

/* 部门列表 */
.dept-list { list-style: none; }
.dept-list > li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--line);
}
.dept-list > li:last-child { border-bottom: none; }
.dept-form { display: flex; align-items: center; gap: 10px; flex: 1; }
.dept-form input { width: auto; flex: 1; max-width: 220px; padding: 7px 11px; border: 1px solid var(--line-2); border-radius: 7px; font-size: 13.5px; }
.dept-count { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; }

/* 合同附件 */
.attach-card { margin-top: 20px; }
.card-title-extra {
    font-family: var(--font-sans);
    font-size: 12.5px;
    font-weight: 400;
    color: var(--ink-3);
    margin-left: 10px;
    letter-spacing: 0;
}
.attach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
    margin: 16px 0 4px;
}
.attach-thumb {
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, border-color .2s;
}
.attach-thumb:hover { box-shadow: 0 6px 18px rgba(74, 92, 78, .10); border-color: var(--line-2); }
.attach-thumb a { display: block; background: var(--paper-deep); }
.attach-thumb img {
    display: block;
    width: 100%;
    height: 132px;
    object-fit: cover;
    cursor: zoom-in;
}
.attach-thumb figcaption {
    padding: 8px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.attach-fname {
    font-size: 12.5px;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
a.attach-fname:hover { color: var(--seiji-deep); }
.attach-thumb figcaption small {
    font-size: 11.5px;
    color: var(--ink-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.attach-del { display: inline; }
.link-danger {
    background: none;
    border: none;
    padding: 0;
    margin-top: 2px;
    font-size: 12px;
    color: var(--sakura);
    cursor: pointer;
    align-self: flex-start;
}
.link-danger:hover { color: var(--sakura-deep); text-decoration: underline; }

.attach-file {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}
.attach-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: var(--sakura-soft);
    color: var(--sakura-deep);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.attach-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.attach-meta .attach-fname { font-size: 14px; font-weight: 500; }
.attach-meta small { font-size: 12px; color: var(--ink-3); }
.attach-ops { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.upload-box {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--line-2);
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}
.upload-field { flex: 1; min-width: 240px; }
.upload-field input[type="file"] {
    font-size: 13px;
    padding: 8px;
    border: 1px dashed var(--line-2);
    border-radius: 8px;
    background: var(--paper);
    width: 100%;
}
.field-hint { display: block; margin-top: 5px; font-size: 12px; color: var(--ink-3); }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1020px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-grid, .dash-cols { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: 0 0 40px rgba(58,53,48,.15);
    }
    body.sidebar-open .sidebar { transform: translateX(0); }
    body.sidebar-open .sidebar-mask {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(58, 53, 48, .35);
        z-index: 35;
    }
    .main { margin-left: 0; }
    .menu-toggle { display: block; }
    .content { padding: 20px 16px 40px; }
    .topbar { padding: 14px 16px; }
    .user-meta { display: none; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .span-2 { grid-column: 1; }
    .public-doc { padding: 28px 22px; }
    .desc-list { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { padding: 14px 16px; }
    .stat-card b { font-size: 24px; }
    .auth-card { padding: 30px 22px 24px; }
    .form-row { flex-direction: column; gap: 0; }
    .filter-form input, .filter-form select { width: 100%; }
    .toolbar { flex-direction: column; align-items: stretch; }
}
