/* ===== 全局重置与基础变量 ===== */
:root {
    --primary: #0d6efd;
    --primary-dark: #0b5ed7;
    --primary-darker: #084298;
    --primary-light: #cfe2ff;
    --primary-lighter: #e7f1ff;
    --secondary: #3b5998;
    --accent-gold: #f0ad4e;
    --bg: #f0f4f8;
    --bg-white: #ffffff;
    --text: #1a2332;
    --text-secondary: #5a6c7d;
    --text-muted: #8b9bb0;
    --border: #dce4ed;
    --border-light: #eaf0f6;
    --success: #198754;
    --danger: #dc3545;
    --shadow-sm: 0 1px 3px rgba(0,30,80,0.06);
    --shadow: 0 2px 8px rgba(0,30,80,0.08);
    --shadow-lg: 0 8px 24px rgba(0,30,80,0.12);
    --radius: 8px;
    --radius-sm: 4px;
    --sidebar-w: 230px;
    --topbar-h: 56px;
    --font: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', system-ui, sans-serif;
    --font-mono: 'Consolas', 'Courier New', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    overflow: hidden;
}

/* ===== 顶部导航栏 ===== */
.topbar {
    height: var(--topbar-h);
    background: linear-gradient(135deg, var(--primary-darker) 0%, var(--primary) 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 6px rgba(0,30,80,0.15);
    position: relative;
    z-index: 100;
}

.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-text {
    color: white;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-outline {
    background: white;
    color: var(--primary);
    border: 1px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-lighter); }

.btn-ghost {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
}
.btn-ghost:hover { background: rgba(255,255,255,0.25); }

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover { background: #c82333; }

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

/* ===== 主布局 ===== */
.main-layout {
    display: flex;
    height: calc(100vh - var(--topbar-h));
}

/* ===== 侧边栏 ===== */
.sidebar {
    width: var(--sidebar-w);
    background: white;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-section {
    padding: 16px 12px 8px;
}

.sidebar-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 8px 8px;
}

.doc-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.doc-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.15s;
    position: relative;
}

.doc-nav-item svg {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: color 0.15s;
}

.doc-nav-item span {
    font-size: 14px;
    font-weight: 500;
}

.doc-nav-item small {
    font-size: 10px;
    color: var(--text-muted);
    margin-left: auto;
}

.doc-nav-item:hover {
    background: var(--primary-lighter);
    color: var(--primary);
}
.doc-nav-item:hover svg { color: var(--primary); }

.doc-nav-item.active {
    background: var(--primary);
    color: white;
}
.doc-nav-item.active svg { color: white; }
.doc-nav-item.active small { color: rgba(255,255,255,0.7); }

.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: 6px;
}

.sidebar-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-lighter);
}

.sidebar-footer {
    margin-top: auto;
    padding: 12px;
}

.version-tag {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    padding: 8px;
    border-top: 1px solid var(--border-light);
}

/* ===== 主内容区 ===== */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-toolbar {
    height: 48px;
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-shrink: 0;
}

.toolbar-tabs {
    display: flex;
    gap: 4px;
}

.toolbar-tab {
    padding: 8px 20px;
    background: none;
    border: none;
    font-size: 14px;
    font-family: var(--font);
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
}

.toolbar-tab:hover { color: var(--text); }

.toolbar-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.toolbar-actions {
    display: flex;
    gap: 8px;
}

/* ===== 面板 ===== */
.panel {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.panel.active { display: block; }

/* ===== 表单区域 ===== */
.form-section {
    background: white;
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.form-section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-darker);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: var(--primary);
    border-radius: 2px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 12px;
}

.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

.form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-field.full { grid-column: 1 / -1; }

.form-field label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-field label .en {
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 4px;
}

.form-field input,
.form-field select,
.form-field textarea {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font);
    color: var(--text);
    background: white;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13,110,253,0.12);
}

.form-field textarea {
    resize: vertical;
    min-height: 60px;
}

.form-field input[type="number"] { text-align: right; }

/* ===== 物品表格 ===== */
.items-table-wrapper {
    overflow-x: auto;
    margin-top: 8px;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.items-table th {
    background: var(--primary-lighter);
    color: var(--primary-darker);
    padding: 8px 6px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
    border-bottom: 2px solid var(--primary-light);
}

.items-table td {
    padding: 4px 6px;
    border-bottom: 1px solid var(--border-light);
}

.items-table input,
.items-table select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font);
    background: transparent;
    outline: none;
    transition: all 0.15s;
}

.items-table input:hover { border-color: var(--border); }
.items-table input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 2px rgba(13,110,253,0.08);
}

.items-table input[type="number"] {
    text-align: right;
}

.items-table .col-action {
    width: 40px;
    text-align: center;
}

.btn-remove-row {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}

.btn-remove-row:hover { background: rgba(220,53,69,0.1); }

.btn-add-row {
    margin-top: 8px;
    padding: 6px 16px;
    background: var(--primary-lighter);
    color: var(--primary);
    border: 1px dashed var(--primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-family: var(--font);
    transition: all 0.15s;
}

.btn-add-row:hover {
    background: var(--primary-light);
}

/* ===== 预览区域 ===== */
.preview-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    box-shadow: var(--shadow-lg);
    border-radius: 4px;
    overflow: hidden;
}

/* ===== 单证文档样式（预览 + 打印共用） ===== */
.doc-page {
    padding: 48px 56px;
    min-height: 800px;
    font-family: var(--font);
    color: #222;
    font-size: 13px;
    line-height: 1.6;
}

.doc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--primary);
}

.doc-header-left {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.doc-logo {
    max-height: 70px;
    max-width: 180px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 2px;
}

.doc-header-text {
    flex: 1;
}

.doc-company-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-darker);
    margin-bottom: 4px;
}

.doc-company-info {
    font-size: 11px;
    color: #666;
    line-height: 1.5;
}

.doc-header-right {
    text-align: right;
    flex-shrink: 0;
}

.doc-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.doc-title small {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: #999;
    letter-spacing: 1px;
    margin-top: 2px;
}

.doc-meta {
    margin-bottom: 24px;
}

.doc-meta-row {
    display: flex;
    margin-bottom: 4px;
    font-size: 12px;
}

.doc-meta-label {
    width: 100px;
    color: #888;
    font-weight: 500;
}

.doc-meta-value {
    flex: 1;
    color: #333;
    font-weight: 500;
}

.doc-parties {
    display: flex;
    gap: 32px;
    margin-bottom: 24px;
}

.doc-party {
    flex: 1;
}

.doc-party-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #ddd;
}

.doc-party-content {
    font-size: 12px;
    line-height: 1.6;
    color: #333;
}

.doc-party-content strong {
    font-size: 13px;
    color: var(--primary-darker);
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 12px;
}

.doc-table th {
    background: var(--primary);
    color: white;
    padding: 8px 6px;
    text-align: center;
    font-weight: 600;
    font-size: 11px;
    white-space: nowrap;
}

.doc-table th:first-child { border-top-left-radius: 4px; }
.doc-table th:last-child { border-top-right-radius: 4px; }

.doc-table td {
    padding: 7px 6px;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
}

.doc-table td.text-left { text-align: left; }
.doc-table td.text-right { text-align: right; }

.doc-table tfoot td {
    border-bottom: none;
    border-top: 2px solid var(--primary);
    font-weight: 600;
    background: var(--primary-lighter);
}

.doc-totals {
    margin-left: auto;
    width: 300px;
    margin-bottom: 24px;
}

.doc-totals-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 12px;
    border-bottom: 1px solid #eee;
}

.doc-totals-row.grand {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-darker);
    border-top: 2px solid var(--primary);
    border-bottom: none;
    padding-top: 8px;
    margin-top: 4px;
}

.doc-totals-label { color: #555; }
.doc-totals-value { font-weight: 600; }

.doc-notes {
    margin-top: 20px;
    font-size: 11px;
    line-height: 1.7;
    color: #555;
}

.doc-notes-title {
    font-weight: 700;
    color: var(--primary-darker);
    margin-bottom: 4px;
    font-size: 12px;
}

.doc-signatures {
    display: flex;
    justify-content: space-between;
    margin-top: 48px;
    padding-top: 24px;
}

.doc-sig-block {
    text-align: center;
    width: 240px;
    position: relative;
}

.doc-sig-line {
    border-top: 1px solid #999;
    margin-top: 40px;
    padding-top: 4px;
    font-size: 11px;
    color: #888;
}

/* 公章 */
.doc-seal {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%) rotate(-12deg);
    width: 110px;
    height: 110px;
    object-fit: contain;
    opacity: 0.85;
    pointer-events: none;
    z-index: 5;
}

.doc-contract-body {
    font-size: 12px;
    line-height: 1.8;
    color: #333;
}

.doc-contract-body h4 {
    color: var(--primary-darker);
    margin: 16px 0 8px;
    font-size: 13px;
    font-weight: 600;
}

.doc-contract-body p {
    margin-bottom: 8px;
}

.doc-contract-body ol {
    padding-left: 20px;
    margin-bottom: 8px;
}

.doc-contract-body ol li {
    margin-bottom: 4px;
}

.doc-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 80px;
    font-weight: 900;
    color: rgba(13,110,253,0.04);
    pointer-events: none;
    z-index: 0;
}

/* ===== 弹窗 ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,20,50,0.4);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.modal-overlay.show { display: flex; }

.modal {
    background: white;
    border-radius: var(--radius);
    width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.modal-lg { width: 800px; }

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-darker);
}

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.modal-close:hover { color: var(--danger); }

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.modal-footer {
    padding: 12px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ===== 历史记录列表 ===== */
.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.history-item:hover {
    border-color: var(--primary);
    background: var(--primary-lighter);
}

.history-item-info {
    flex: 1;
}

.history-item-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

.history-item-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.history-item-actions {
    display: flex;
    gap: 6px;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: rgba(13,30,60,0.9);
    color: white;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success { background: rgba(25,135,84,0.95); }
.toast.error { background: rgba(220,53,69,0.95); }

/* ===== 客户选择器 ===== */
.client-selector {
    display: flex;
    gap: 6px;
    align-items: flex-end;
}

.client-selector .form-field { flex: 1; }

.client-selector button {
    padding: 8px 12px;
    background: var(--primary-lighter);
    border: 1px solid var(--primary-light);
    border-radius: var(--radius-sm);
    color: var(--primary);
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
    height: 35px;
}

.client-selector button:hover { background: var(--primary-light); }

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c0ccd8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a0b0c0; }

/* ===== 主题选择器 ===== */
.theme-selector-wrap {
    position: relative;
}

.theme-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0,20,50,0.15);
    border: 1px solid var(--border);
    padding: 16px 18px;
    z-index: 100;
    min-width: 240px;
}

.theme-dropdown.show { display: block; }

.theme-dropdown-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.theme-swatches {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.theme-swatch {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.15s;
    border: 1px solid transparent;
}

.theme-swatch:hover {
    background: var(--bg);
    color: var(--text);
}

.theme-swatch.active {
    background: var(--primary-lighter);
    color: var(--primary-darker);
    border-color: var(--primary-light);
    font-weight: 600;
}

.theme-swatch-color {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* ===== 单证视觉增强（跟随主题色） ===== */
.doc-page {
    background: linear-gradient(180deg, var(--primary-lighter) 0%, #ffffff 200px);
}

.doc-meta {
    background: var(--primary-lighter);
    border-left: 3px solid var(--primary);
    padding: 10px 14px;
    border-radius: 0 4px 4px 0;
}

.doc-parties .doc-party {
    background: linear-gradient(180deg, var(--primary-lighter) 0%, #ffffff 100%);
    border: 1px solid var(--primary-light);
    border-left: 3px solid var(--primary);
    padding: 12px 14px;
    border-radius: 0 6px 6px 0;
}

.doc-table tbody tr:nth-child(even) {
    background: var(--primary-lighter);
}

.doc-table tbody tr:hover {
    background: var(--primary-light);
}

.doc-totals {
    background: linear-gradient(135deg, var(--primary-lighter) 0%, var(--primary-light) 100%);
    border: 1px solid var(--primary-light);
    border-radius: 6px;
    padding: 10px 16px;
}

.doc-notes {
    background: linear-gradient(180deg, var(--primary-lighter) 0%, #ffffff 100%);
    border-left: 3px solid var(--primary);
    padding: 10px 14px;
    border-radius: 0 4px 4px 0;
}

.doc-signatures {
    border-top: 2px solid var(--primary-light);
    background: linear-gradient(180deg, transparent 0%, var(--primary-lighter) 100%);
    padding: 24px 16px 16px;
    border-radius: 6px;
}

.doc-watermark {
    color: var(--primary);
    opacity: 0.04;
}

.doc-contract-body h4 {
    border-left: 3px solid var(--primary);
    padding-left: 10px;
}

/* ===== 平台封面介绍页 ===== */
.intro-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9999;
    overflow-y: auto;
    background: #f8fbff;
    transition: opacity 0.3s;
}

.intro-overlay.hide {
    opacity: 0;
    pointer-events: none;
}

.intro-bg {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 420px;
    background: linear-gradient(135deg, #084298 0%, #0d6efd 60%, #3584e4 100%);
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

.intro-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255,215,0,0.08) 0%, transparent 50%);
}

.intro-content {
    position: relative;
    max-width: 1080px;
    margin: 0 auto;
    padding: 60px 32px 40px;
}

.intro-header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.intro-logo {
    display: inline-block;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
}

.intro-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 2px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.intro-subtitle {
    font-size: 13px;
    letter-spacing: 4px;
    opacity: 0.85;
    margin-bottom: 16px;
    font-weight: 500;
}

.intro-tagline {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 13px;
    backdrop-filter: blur(10px);
}

.intro-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 36px;
}

.intro-feature {
    background: white;
    border-radius: 10px;
    padding: 22px 20px;
    box-shadow: 0 4px 16px rgba(13,30,80,0.06);
    border: 1px solid #eaf0f6;
    transition: transform 0.2s;
}

.intro-feature:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(13,30,80,0.1);
}

.intro-feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.intro-feature h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-darker);
    margin-bottom: 6px;
}

.intro-feature p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.intro-use-guide {
    background: white;
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 28px;
    box-shadow: 0 4px 16px rgba(13,30,80,0.06);
    border: 1px solid #eaf0f6;
}

.intro-use-guide h3 {
    font-size: 20px;
    color: var(--primary-darker);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-light);
    position: relative;
}

.intro-use-guide h3::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--primary);
}

.intro-guide-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.intro-guide-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.intro-guide-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
}

.intro-guide-item strong {
    display: block;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 4px;
}

.intro-guide-item p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.intro-contact {
    background: linear-gradient(135deg, #f0f7ff 0%, #e7f1ff 100%);
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    border: 1px solid var(--primary-light);
}

.intro-contact-text {
    flex: 1;
}

.intro-contact-text h3 {
    font-size: 22px;
    color: var(--primary-darker);
    margin-bottom: 8px;
}

.intro-contact-text p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.intro-contact-name {
    margin-top: 12px !important;
    font-size: 15px !important;
    font-weight: 600;
    color: var(--primary);
}

.intro-qr-wrap {
    flex-shrink: 0;
    text-align: center;
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(13,30,80,0.08);
}

.intro-qr {
    width: 160px;
    height: 160px;
    border-radius: 4px;
    display: block;
}

.intro-qr-tip {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

.intro-footer {
    text-align: center;
    padding: 16px 0 32px;
}

.btn-lg {
    padding: 12px 40px;
    font-size: 15px;
    font-weight: 600;
}

.intro-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 16px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
}

.intro-checkbox input { cursor: pointer; }

@media (max-width: 768px) {
    .intro-features { grid-template-columns: 1fr; }
    .intro-guide-grid { grid-template-columns: 1fr; }
    .intro-contact { flex-direction: column; text-align: center; }
    .intro-title { font-size: 30px; }
}

/* ===== 打印样式 ===== */
@media print {
    @page {
        size: A4;
        margin: 0;
    }
    body { background: white; overflow: visible; }
    body * { visibility: hidden; }
    .preview-container, .preview-container * { visibility: visible; }
    .preview-container {
        position: absolute;
        left: 0; top: 0;
        box-shadow: none;
        border-radius: 0;
        width: 100%;
        max-width: none;
    }
    .doc-page {
        padding: 24mm 20mm;
        min-height: auto;
    }
    .content-toolbar, .sidebar, .topbar { display: none !important; }
    .panel { padding: 0; }
    /* 确保彩色背景在 PDF 中保留 */
    .doc-page, .doc-meta, .doc-party, .doc-table th, .doc-table tbody tr:nth-child(even),
    .doc-totals, .doc-notes, .doc-signatures, .doc-contract-body h4, .doc-seal {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}
