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

body {
    font-family: "Microsoft YaHei", "SimSun", Arial, sans-serif;
    background: #f5f5f5;
    padding: 20px;
    line-height: 1.6;
}

/* 打印控制按钮 */
.print-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.print-btn,
.home-btn {
    padding: 12px 24px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.print-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

.print-btn:active {
    transform: translateY(0);
}

.home-btn {
    background: #6c757d;
}

.home-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

.home-btn:active {
    transform: translateY(0);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* 左侧主合同区域 */
.contract-main {
    flex: 1;
    background: #fff;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.contract-title-wrapper {
    position: relative;
    margin-bottom: 30px;
}

.contract-title {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 0;
    color: #333;
    padding-bottom: 15px;
    border-bottom: 2px solid #333;
}

.package-switch-btn {
    position: absolute;
    top: 0;
    right: 0;
    padding: 8px 16px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.package-switch-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.package-switch-btn:active {
    transform: translateY(0);
}

.parties {
    margin-bottom: 30px;
}

.party {
    margin-bottom: 15px;
    font-size: 16px;
}

.party strong {
    color: #333;
}

.editable-field {
    display: inline-block;
    min-width: 200px;
    padding: 0;
    margin: 0;
    outline: none;
    cursor: text;
    text-align: left;
}

.editable-field:empty:before {
    content: "_________________";
    color: #999;
    white-space: nowrap;
}

#party-a.editable-field:empty:before {
    content: "";
    display: inline-block;
    width: 200px;
    height: 1px;
    border-bottom: 1px solid #999;
    vertical-align: bottom;
    margin-bottom: -1px;
}

#domain-name.editable-field {
    min-width: 0;
    width: auto;
    display: inline-block;
    overflow: visible;
    white-space: nowrap;
}

#domain-name.editable-field:empty:before {
    content: "";
    display: inline-block;
    width: 150px;
    height: 1px;
    border-bottom: 1px solid #999;
    vertical-align: bottom;
    margin-bottom: -1px;
}

#style-reference.editable-field {
    min-width: 0;
    width: auto;
    display: inline-block;
    overflow: visible;
    white-space: nowrap;
}

#domain-provider.editable-field {
    display: inline-block;
    min-width: 100px;
    padding: 2px 4px;
    outline: none;
    border-bottom: 1px dashed #999;
    transition: all 0.3s;
}

#domain-provider.editable-field:focus {
    border-bottom-color: #4CAF50;
    background: #f9f9f9;
}

#style-reference.editable-field:empty:before {
    content: "";
    display: inline-block;
    width: 200px;
    height: 1px;
    border-bottom: 1px solid #999;
    vertical-align: bottom;
    margin-bottom: -1px;
}

.editable-field:focus {
    background: #f9f9f9;
}

#package-duration.editable-field {
    min-width: 0;
    display: inline-block;
    font-weight: bold;
}

#package-price.editable-field {
    min-width: 0;
    display: inline-block;
    font-weight: bold;
}

/* 发票类型可编辑且自适应宽度 */
#invoice-type.invoice-type-field {
    display: inline-block;
    min-width: 0;
    width: auto;
    white-space: nowrap;
    padding: 0 2px;
    border-bottom: 1px dashed #999;
}

#invoice-type.invoice-type-field:focus {
    border-bottom-color: #4CAF50;
    background: #f9f9f9;
    outline: none;
}

/* 违约责任条款可编辑且自适应 */
.clause-edit {
    display: inline-block;
    min-width: 0;
    width: auto;
    white-space: normal;
    padding: 0 2px;
    border-bottom: 1px dashed #999;
}

.clause-edit:focus {
    border-bottom-color: #4CAF50;
    background: #f9f9f9;
    outline: none;
}

/* 续费金额自适应宽度 */
#renewal-price.editable-field {
    min-width: 0;
    width: auto;
    display: inline-block;
    white-space: nowrap;
    font-weight: bold;
    padding: 0;
}

.date-picker-display {
    display: inline-block;
    padding: 2px 5px;
    min-width: 120px;
    text-align: center;
}

.date-picker-display:hover {
    background: #f9f9f9;
    border-bottom-color: #4CAF50;
}

/* 公司切换按钮样式 */
.company-switch-btn {
    margin-left: 10px;
    padding: 4px 12px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    vertical-align: middle;
}

.company-switch-btn:hover {
    background: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.company-switch-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 自定义日期选择器样式 */
.custom-date-picker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.custom-date-picker {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 20px;
    min-width: 320px;
    max-width: 400px;
}

.custom-date-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4CAF50;
}

.custom-date-picker-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.custom-date-picker-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.custom-date-picker-close:hover {
    background: #f0f0f0;
    color: #333;
}

.custom-date-picker-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.custom-date-picker-nav-btn {
    background: #4CAF50;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.custom-date-picker-nav-btn:hover {
    background: #45a049;
}

.custom-date-picker-nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.custom-date-picker-month-year {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    text-align: center;
    flex: 1;
}

.custom-date-picker-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.custom-date-picker-weekday {
    text-align: center;
    font-weight: bold;
    color: #666;
    font-size: 14px;
    padding: 8px 0;
}

.custom-date-picker-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.custom-date-picker-day {
    text-align: center;
    padding: 10px 0;
    cursor: pointer;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s;
    color: #333;
}

.custom-date-picker-day:hover {
    background: #f0f0f0;
}

.custom-date-picker-day.other-month {
    color: #ccc;
}

.custom-date-picker-day.today {
    background: #e3f2fd;
    color: #1976d2;
    font-weight: bold;
}

.custom-date-picker-day.selected {
    background: #4CAF50;
    color: #fff;
    font-weight: bold;
}

.custom-date-picker-day.disabled {
    color: #ccc;
    cursor: not-allowed;
}

.custom-date-picker-day.disabled:hover {
    background: transparent;
}

.purpose {
    margin-bottom: 30px;
    font-size: 16px;
    color: #555;
}

.notes {
    background: #f9f9f9;
    padding: 8px 15px;
    margin-bottom: 16px;
    border-left: 4px solid #4CAF50;
    font-size: 14px;
    color: #666;
}

.notes ul {
    margin-left: 20px;
    margin-top: 6px;
}

/* 备注区域列表行距更紧凑 */
.notes ul li {
    margin: 6px 0;
    line-height: 1.6;
}

.article {
    margin-bottom: 30px;
}

.article-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

/* 文章内容段落和列表整体行距稍紧凑一点 */
.article p {
    margin: 6px 0 !important;
}

.article ul {
    margin: 6px 0 !important;
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    margin: 20px 0 15px 0;
    color: #444;
}

.project-list {
    list-style: none;
    padding-left: 0;
}

.project-list li {
    padding: 6px 0;
    padding-left: 25px;
    position: relative;
    font-size: 15px;
    color: #555;
    line-height: 1.6;
}

.project-list li:before {
    content: counter(item) ".";
    counter-increment: item;
    position: absolute;
    left: 0;
    color: #4CAF50;
    font-weight: bold;
}

.project-list {
    counter-reset: item;
}

/* 项目列表项样式 */
.project-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    position: relative;
}

.project-content {
    flex: 1;
    min-height: 24px;
    outline: none;
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.3s;
}

.project-content:focus {
    background: #f9f9f9;
    border: 1px dashed #4CAF50;
}

.delete-item-btn {
    background: #ff4444;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    opacity: 0.7;
}

.delete-item-btn:hover {
    background: #cc0000;
    opacity: 1;
    transform: scale(1.1);
}

.add-item-btn {
    margin-top: 10px;
    padding: 8px 16px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.add-item-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.add-item-btn:active {
    transform: translateY(0);
}

.package-cost {
    background: #f7f9fc;
    padding: 18px 20px;
    margin: 20px 0;
    border-radius: 10px;
    border: 1px solid #e0e6ed;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
    color: #2c3e50;
    font-size: 16px;
}

.package-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.package-row:last-child {
    margin-bottom: 0;
}

.package-label {
    min-width: 90px;
    font-weight: 600;
    color: #1f2d3d;
}

.package-value {
    flex: 1;
    color: #34495e;
}

.package-value .date-picker-display {
    margin-left: 0;
    padding-left: 0;
    display: inline-block;
}

.package-price-main {
    font-size: 22px;
    font-weight: 700;
    color: #e67e22;
}

.package-note {
    margin-top: 12px;
    font-size: 14px;
    color: #576574;
    line-height: 1.5;
    border-top: 1px dashed #e0e6ed;
    padding-top: 10px;
}

/* 续费范围可编辑且自适应宽度 */
.package-note-edit {
    display: inline-block;
    min-width: 0;
    width: auto;
    white-space: nowrap;
    padding: 0;
    border-bottom: 1px dashed #999;
}

.package-note-edit:focus {
    border-bottom-color: #4CAF50;
    background: #f9f9f9;
    outline: none;
}

.package-main-price {
    font-size: 32px;
    font-weight: bold;
    color: #ff4757;
    margin: 10px 0;
}

.package-detail {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ffc107;
    font-size: 15px;
    line-height: 1.6;
    text-align: left;
}

/* 右侧促销框 */
.promo-box {
    width: 350px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 20px;
}

/* 多套餐时仅展示当前激活的卡片 */
.promo-box[data-package] {
    display: none;
}

/* 套餐选中态 */
.promo-box.active {
    box-shadow: 0 0 0 3px #4caf50 inset, 0 6px 18px rgba(0, 0, 0, 0.18);
    display: block;
}

.promo-banner {
    background: #ff4757;
    color: #fff;
    text-align: center;
    padding: 8px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 10px 10px 0 0;
}

/* 3880套餐斜角横幅（蓝色） */
.promo-box[data-package="3880"] {
    position: relative;
    overflow: visible;
}

.promo-box[data-package="3880"] .promo-banner {
    position: absolute;
    top: 12px;
    right: -58px;
    left: auto;
    width: 180px;
    padding: 10px 0;
    background: #4a90e2;
    transform: rotate(45deg);
    transform-origin: center;
    text-align: center;
    font-weight: bold;
    letter-spacing: 1px;
    border-radius: 0;
}

.promo-box[data-package="3880"] .promo-content {
    padding-top: 35px;
}

/* 2380套餐使用金色横幅 */
.promo-box[data-package="2380"] .promo-banner {
    background: #e9a837;
}

/* 2380套餐斜角横幅 */
.promo-box[data-package="2380"] {
    position: relative;
    overflow: visible;
}

.promo-box[data-package="2380"] .promo-banner {
    position: absolute;
    top: 14px;
    right: -60px;
    width: 180px;
    padding: 10px 0;
    transform: rotate(45deg);
    transform-origin: center;
    text-align: center;
    font-weight: bold;
    letter-spacing: 1px;
    border-radius: 0;
}

.promo-box[data-package="2380"] .promo-content {
    padding-top: 35px;
}

.promo-content {
    padding: 25px;
    background: #fff;
    border-radius: 0 0 10px 10px;
}

.promo-title {
    font-size: 22px;
    font-weight: bold;
    margin: 0 auto 15px;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-align: center;
    width: 100%;
}

.promo-title #promo-title-main {
    display: inline-block;
}

.promo-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #eba640;
    color: #fff;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.1;
}

.promo-price {
    text-align: center;
    margin-bottom: 20px;
}

.price-main {
    font-size: 32px;
    font-weight: bold;
    color: #ff4757;
}

.price-unit {
    font-size: 16px;
    color: #666;
}

.promo-slogan {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 5px;
}

.promo-activity {
    text-align: center;
    color: #ff4757;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 20px;
    padding: 10px;
    background: #fff3cd;
    border-radius: 5px;
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.features-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4CAF50;
    font-weight: bold;
    font-size: 16px;
}

.features-list li.asterisk {
    color: #ff4757;
}

.features-list li.asterisk:before {
    content: "*";
    color: #ff4757;
}

.features-list li.renewal-info {
    color: #1e90ff;
    font-weight: bold;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

/* 响应式设计 */
@media (max-width: 968px) {
    .container {
        flex-direction: column;
    }

    .promo-box {
        width: 100%;
        position: relative;
    }
}

.signature-section {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 2px solid #ddd;
}

.signature-row {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.signature-item {
    flex: 1;
    text-align: center;
}

.signature-item:first-child {
    margin-right: 40px;
}

.signature-label {
    margin-bottom: 60px;
    font-size: 16px;
    color: #333;
}

/* 甲方（第一个签名项）的标签向左移动 */
.signature-item:first-child .signature-label {
    margin-left: -100px;
}

/* 乙方（第二个签名项）的标签向右移动 */
.signature-item:last-child .signature-label {
    padding-left: 100px;
}

.date-label {
    font-size: 16px;
    color: #333;
    position: relative;
    z-index: 1;
    display: inline-block;
    margin-top: 0;
}

/* 日期标签包装器，用于定位电子章 */
.date-label-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    margin-top: -8px;
    min-height: 110px;
    /* 为电子章预留空间（适当缩小高度，方便与正文同页） */
}

/* 签名信息区域 */
.signature-info {
    margin-bottom: 0;
    text-align: right;
    display: block;
    width: 100%;
}

/* 左侧（甲方）签名信息保持左对齐 */
.signature-item:first-child .signature-info {
    text-align: left;
}

.signature-info-item {
    display: block;
    margin-bottom: 10px;
    font-size: 16px;
    color: #333;
}

.signature-info .date-label {
    display: block;
    margin-bottom: 0;
    font-size: 16px;
    color: #333;
}

/* 左侧（甲方）的字段左对齐 */
.signature-item:first-child .signature-info-item,
.signature-item:first-child .signature-info .date-label {
    text-align: left;
}

/* 右侧（乙方）的字段右对齐 */
.signature-item:last-child .signature-info-item,
.signature-item:last-child .signature-info .date-label {
    text-align: right;
}

.signature-info-item .editable-field {
    display: inline-block;
    min-width: 100px;
    padding: 2px 5px;
    outline: none;
}

.signature-info-item .editable-field:focus {
    background: #f9f9f9;
}

/* 公司电子章样式 - 骑年盖月 */
.company-seal {
    position: absolute;
    width: 160px;
    height: 160px;
    top: -80px;
    right: 10px;
    z-index: 1000;
    pointer-events: none;
    /* 不阻挡日期选择器的点击 */
    opacity: 0.9;
    /* 稍微透明，可以看到下面的文字 */
}

/* 银行账户信息区域样式 */
.bank-info-box {
    margin: 20px 0;
    padding: 12px 15px;
    background: #f7f9fc;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e0e6ed;
}

.bank-info-header {
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid #4CAF50;
}

.bank-info-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    display: inline-block;
    padding: 4px 12px;
    background: #4CAF50;
    color: #fff;
    border-radius: 5px;
}

.bank-info-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bank-info-row {
    display: flex;
    align-items: flex-start;
    padding: 4px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

.bank-info-label {
    font-weight: bold;
    color: #1f2d3d;
    min-width: 80px;
    flex-shrink: 0;
    font-size: 15px;
}

.bank-info-value {
    color: #34495e;
    flex: 1;
    font-size: 15px;
    word-break: break-all;
}

.bank-info-note-row {
    display: flex;
    align-items: flex-start;
    padding: 2px 0;
    margin-top: -4px;
    margin-left: 80px;
}

.bank-info-note {
    color: #999;
    font-size: 12px;
    font-style: italic;
    line-height: 1.4;
}

.bank-code-note {
    color: #999;
    font-size: 12px;
    font-style: italic;
}

/* 手写字体样式 */
.handwriting-font {
    font-family: "楷体", "KaiTi", "STKaiti", "华文楷体", "SimKai", "行楷", "XingKai", "STXingkai", "Brush Script MT", "Lucida Handwriting", cursive;
    font-style: italic;
    letter-spacing: 1px;
}

/* 打印样式 */
@media print {

    /* 隐藏打印按钮和不需要的元素 */
    .print-controls,
    .print-btn,
    .home-btn,
    .package-switch-btn,
    .company-switch-btn,
    .delete-item-btn,
    .add-item-btn {
        display: none !important;
    }

    /* 页面设置 */
    @page {
        margin: 1cm;
        size: A4;
    }

    /* 确保背景色和文字颜色打印 */
    body {
        background: #fff !important;
        color: #000 !important;
        padding: 0 !important;
        margin: 0 !important;
        line-height: 1.4 !important;
    }

    .container {
        max-width: 100% !important;
        display: block !important;
        gap: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .contract-main {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* 打印时显示当前激活的促销卡片并单列展示 */
    .promo-box {
        width: 100% !important;
        display: none !important;
        margin-top: 20px !important;
        position: relative !important;
        top: auto !important;
        box-shadow: none !important;
    }

    .promo-box.active {
        display: block !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .promo-content {
        border-radius: 0 0 10px 10px !important;
    }

    /* 确保促销横幅背景色可打印 */
    .promo-banner,
    .promo-activity {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* 确保文字颜色 */
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    p,
    div,
    span,
    li,
    td,
    th,
    .article,
    .section-title,
    .article-title {
        color: #000 !important;
    }

    /* 保持必要的背景色（如银行信息框） */
    .bank-info-box {
        background: #f9f9f9 !important;
        border: 1px solid #ddd !important;
        page-break-inside: avoid;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .bank-info-title {
        background: #4CAF50 !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* 避免在关键位置分页 */
    .signature-section {
        page-break-inside: avoid;
    }

    /* 允许正文内容在页内自动断页，避免首页留白 */
    .article {
        page-break-inside: auto;
        break-inside: auto;
    }

    /* 费用小计允许换页，避免整块挪到下一页造成空白 */
    .package-cost {
        page-break-inside: auto;
        break-inside: auto;
    }

    /* 确保电子章在打印时显示 */
    .company-seal {
        opacity: 1 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* 确保所有内容可见 */
    * {
        visibility: visible !important;
        overflow: visible !important;
        max-width: 100% !important;
    }

    /* 优化间距 */
    .article {
        margin-bottom: 15px !important;
        padding: 0 !important;
    }

    /* 确保日期选择器显示正常 */
    .date-picker-display {
        color: #000 !important;
        display: inline !important;
    }

    /* 确保可编辑字段显示 */
    .editable-field {
        color: #000 !important;
        border: none !important;
        background: transparent !important;
        display: inline !important;
    }

    /* 确保列表正常显示 */
    ul,
    ol {
        margin: 4px 0 !important;
        padding-left: 20px !important;
    }

    li {
        margin: 2px 0 !important;
        display: list-item !important;
    }

    /* 打印时恢复右侧促销框列表的原始行间距 */
    .features-list li {
        padding: 4px 0 !important;
        padding-left: 30px !important;
        line-height: 1.4 !important;
    }

    /* 打印时恢复备注区域的原始行间距 */
    .notes ul li {
        margin: 2px 0 !important;
        line-height: 1.3 !important;
    }

    /* 打印时恢复项目列表的原始行间距 */
    .project-list li {
        padding: 2px 0 !important;
        padding-left: 30px !important;
        line-height: 1.4 !important;
    }

    /* 确保打印时序号位置正确，不与文字重叠 */
    .project-list li:before {
        left: 0 !important;
    }

    /* 确保电子章在打印时显示 */
    .company-seal {
        opacity: 1 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* 确保所有内容可见 */
    * {
        visibility: visible !important;
        overflow: visible !important;
        max-width: 100% !important;
    }

    /* 确保表格和所有元素正常显示 */
    table,
    tr,
    td,
    th {
        border: 1px solid #000 !important;
        border-collapse: collapse !important;
    }

    /* 确保图片正常显示 */
    img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* 确保签名区域完整显示 */
    .signature-section {
        margin-top: 16px !important;
        padding-top: 10px !important;
        page-break-inside: avoid !important;
        page-break-before: avoid !important;
        break-before: avoid !important;
    }

    .signature-row {
        display: flex !important;
        justify-content: space-between !important;
    }

    .signature-item {
        flex: 1 !important;
        page-break-inside: avoid !important;
    }

    /* 确保银行信息完整显示 */
    .bank-info-content {
        display: flex !important;
        flex-direction: column !important;
    }

    .bank-info-row {
        display: flex !important;
        page-break-inside: avoid !important;
    }

    /* 确保项目列表正常显示 */
    .project-item {
        display: flex !important;
        align-items: flex-start !important;
    }

    .project-content {
        flex: 1 !important;
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
    }
}


/* ================= 导出 / PDF / 打印统一样式 ================= */
.export-pdf {
    width: 210mm;
    margin: 0 auto;
    background: #fff;
}

/* 统一字体与行高（关键） */
.export-pdf,
.export-pdf * {
    font-family: "Microsoft YaHei", Arial, sans-serif !important;
    line-height: 1.6 !important;
    letter-spacing: 0 !important;
}

/* 去掉浮动 / 动画 / 阴影 */
.export-pdf * {
    box-shadow: none !important;
    animation: none !important;
    transition: none !important;
}

/* 隐藏非合同内容 */
.export-pdf .promo-box,
.export-pdf .print-controls {
    display: none !important;
}

/* 防止内容被截断 */
.export-pdf .article,
.export-pdf .signature-section {
    page-break-inside: avoid;
}

/* 图片不溢出 */
.export-pdf img {
    max-width: 100%;
    height: auto;
}
/* ================= 合同 PDF / 打印 专用版式 ================= */
.export-pdf {
    width: 210mm;
    margin: 0 auto;
    padding: 20mm 18mm;
    box-sizing: border-box;
    background: #fff;
}

/* 所有文本统一排版 */
.export-pdf {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.8;
    color: #000;
}

/* 签字页强制新起一页 */
.export-pdf .signature-section {
    page-break-before: always;
    margin-top: 40mm;
}

