/* ═══════════════════════════════════════════════════════
   向阳学术 · 公共组件样式
   导航栏、报价卡片、预览操作区、checkbox 组
   ═══════════════════════════════════════════════════════ */

/* ── 导航栏（由 nav.js 动态生成） ── */
.header-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.header-nav a {
    font-size: 12px;
    color: var(--primary-color);
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid var(--primary-color);
    border-radius: 3px;
    transition: all 0.2s;
}

.header-nav a:hover,
.header-nav a.active {
    background: var(--primary-color);
    color: #fff;
}

.system-time {
    font-size: 12px;
    color: var(--text-muted);
}

/* ── 报价单/单据卡片（所有业务页面共用） ── */
.invoice-card-wrapper {
    width: 100%;
    overflow-x: auto;
}

.invoice-card {
    background: #ffffff;
    border: 1px solid #000000;
    padding: 25px;
    color: #000000;
    font-family: "SimSun", "Songti SC", serif;
    min-width: 550px;
}

.invoice-header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.invoice-title {
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 2px;
    border-bottom: 3px double #000;
    padding-bottom: 8px;
    display: inline-block;
}

.invoice-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-top: 12px;
    font-family: Arial, sans-serif;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    font-size: 13px;
    table-layout: fixed;
}

.invoice-table th,
.invoice-table td {
    border: 1px solid #000000;
    padding: 8px 10px;
    text-align: left;
    word-wrap: break-word;
    word-break: break-all;
}

.invoice-table th {
    background-color: #f2f2f2;
    font-weight: bold;
    width: 23%;
}

.invoice-table td.value-cell {
    width: 27%;
}

.invoice-table td.full-cell {
    width: 77%;
}

.price-highlight {
    font-size: 20px;
    font-weight: bold;
    color: #e53e3e;
}

.invoice-footer-note {
    margin-top: 15px;
    font-size: 11px;
    text-align: center;
    color: #444;
    border-top: 1px dashed #000;
    padding-top: 8px;
}

/* ── 预览区 ── */
.preview-section {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    padding: 20px;
    position: sticky;
    top: 15px;
    align-self: start;
}

.preview-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

/* ── checkbox 组 ── */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 6px 0;
}

.checkbox-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
    background: #f8fafc;
    padding: 8px;
    border: 1px solid #edf2f7;
}

.checkbox-item input {
    margin-right: 8px;
    width: 16px;
    height: 16px;
}

/* ── 响应式 ── */
@media (max-width: 1024px) {
    .system-time {
        font-size: 11px;
    }

    .preview-section {
        position: static;
        align-self: stretch;
        padding: 15px;
    }

    .preview-actions {
        display: none; /* 手机端用底部悬浮栏代替 */
    }

    .checkbox-group {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .checkbox-item {
        font-size: 13px;
        padding: 10px 8px;
    }

    .checkbox-item input {
        width: 18px;
        height: 18px;
    }

    .invoice-card {
        min-width: 0;
        padding: 15px;
    }

    .invoice-title {
        font-size: 18px;
        letter-spacing: 1px;
    }

    .invoice-meta {
        flex-direction: column;
        gap: 4px;
        font-size: 11px;
    }

    .invoice-table {
        font-size: 12px;
    }

    .invoice-table th,
    .invoice-table td {
        padding: 6px 8px;
    }

    .price-highlight {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .invoice-table th {
        width: 20%;
    }

    .invoice-table td.value-cell {
        width: 30%;
    }
}
