.page-header {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header--premium-rate {
    display: block;
    margin-bottom: 0.75rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #495057;
    margin: 0;
}

.page-header p {
    color: #6c757d;
    margin: 0.5rem 0 0 0;
}

.premium-rate-status {
    font-size: 0.8125rem;
    color: #6c757d;
    margin: 0 0 1rem 0;
    min-height: 1.25em;
}

.premium-rate-status--warn {
    color: #856404;
}

.premium-rate-status--empty {
    display: none;
}

table.premium-monitor-table th,
table.premium-monitor-table td {
    text-align: center;
    vertical-align: middle;
}

table.premium-monitor-table {
    table-layout: fixed;
    width: 100%;
    font-size: 0.92rem;
}

@media (max-width: 768px) {
    /* P0: 表格横向滚动 */
    table.premium-monitor-table {
        table-layout: auto;
        min-width: 750px;
    }
    /* P2: 图表展开区域适配 */
    td.premium-chart-cell {
        padding: 0.3rem 0.5rem !important;
    }
    .premium-chart-panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        margin-bottom: 0.2rem;
    }
    .premium-chart-status {
        font-size: 0.75rem;
        flex: unset;
    }
    .premium-chart-wrap {
        height: 170px;
    }
    .premium-chart-range .btn {
        min-width: 3.5rem;
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
    .premium-chart-candles {
        font-size: 0.78rem;
    }
    /* P3: 触控友好增强 */
    table.premium-monitor-table td {
        padding: 0.55rem 0.4rem;
        font-size: 0.87rem;
    }
    table.premium-monitor-table th {
        padding: 0.45rem 0.4rem;
        font-size: 0.78rem;
    }
    .premium-chart-toggle {
        padding: 0.3rem 0.45rem;
        font-size: 1rem;
    }
    .premium-chart-toggle i {
        font-size: 1rem;
    }
    /* 参考资料悬浮提示按钮 */
    .premium-monitor-code-cell .reference-badge {
        font-size: 0.65rem;
        padding: 0.1rem 0.35rem;
    }
    /* 数据行高亮更柔和 */
    .table-primary td {
        background-color: rgba(59, 130, 246, 0.06) !important;
    }
}

table.premium-monitor-table th {
    white-space: nowrap;
}

table.premium-monitor-table th:nth-child(1),
table.premium-monitor-table td:nth-child(1) {
    width: 14%;
    overflow: hidden;
}

table.premium-monitor-table th:nth-child(2),
table.premium-monitor-table td:nth-child(2) {
    width: 15%;
    text-align: left;
}

table.premium-monitor-table th:nth-child(3),
table.premium-monitor-table td:nth-child(3) {
    width: 8%;
}

table.premium-monitor-table th:nth-child(4),
table.premium-monitor-table td:nth-child(4) {
    width: 24%;
}

table.premium-monitor-table th:nth-child(5),
table.premium-monitor-table td:nth-child(5) {
    width: 8%;
}

table.premium-monitor-table th:nth-child(6),
table.premium-monitor-table td:nth-child(6) {
    width: 9%;
}

table.premium-monitor-table th:nth-child(7),
table.premium-monitor-table td:nth-child(7) {
    width: 9%;
}

table.premium-monitor-table th:nth-child(8),
table.premium-monitor-table td:nth-child(8) {
    width: 13%;
}

table.premium-monitor-table td:nth-child(2) {
    white-space: normal;
    line-height: 1.3;
}

table.premium-monitor-table td:nth-child(3),
table.premium-monitor-table td:nth-child(4),
table.premium-monitor-table td:nth-child(5),
table.premium-monitor-table td:nth-child(6),
table.premium-monitor-table td:nth-child(7),
table.premium-monitor-table td:nth-child(8) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

table.premium-monitor-table .premium-hedge-bid-cell {
    text-align: left;
}

.premium-monitor-aux-value {
    display: block;
    margin-top: 0.15rem;
    color: #6c757d;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.premium-monitor-code-cell {
    display: grid;
    grid-template-columns: 1.25rem minmax(0, 1fr);
    align-items: center;
    justify-content: center;
    column-gap: 0.35rem;
    min-width: 0;
}

.premium-monitor-code-cell .premium-chart-toggle {
    line-height: 1;
    min-width: 1.25rem;
    width: 1.25rem;
}

.premium-monitor-code-cell .fund-code {
    overflow: hidden;
    min-width: 0;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

table.premium-monitor-table tr.premium-monitor-group-row td {
    background-color: #f1f5f9;
    color: #495057;
    font-weight: 600;
    text-align: left;
    border-top: 1px solid #d7dee8;
    border-bottom: 1px solid #d7dee8;
    padding: 0.55rem 0.75rem;
}

.premium-monitor-group-name {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.premium-monitor-group-count {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background-color: #ffffff;
    color: #6c757d;
    font-size: 0.75rem;
    font-weight: 600;
}

.data-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.data-card h3 {
    color: #495057;
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.table {
    margin-top: 1rem;
}

.table thead {
    background-color: #f8f9fa;
}

.table th {
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.fund-code {
    font-weight: 600;
    color: #495057;
}

/* 溢价监控：展开行内折线图 */
td.premium-chart-cell {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 0.75rem 1rem !important;
    vertical-align: top;
}

.premium-chart-panel {
    max-width: 100%;
}

.premium-chart-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.premium-chart-status {
    flex: 1 1 14rem;
}

.premium-chart-range {
    flex: 0 0 auto;
}

.premium-chart-range .btn {
    min-width: 4.25rem;
}

.premium-chart-wrap {
    display: none;
    height: 260px;
    position: relative;
}

.premium-chart-toggle {
    min-width: 1.5rem;
    color: #0d6efd !important;
}

.premium-chart-toggle:hover {
    color: #0a58ca !important;
}

.price-bid {
    color: #28a745;
    font-weight: 600;
}

.price-ask {
    color: #dc3545;
    font-weight: 600;
}

.premium-rate-positive {
    color: #dc3545;
    font-weight: 600;
}

.premium-rate-negative {
    color: #28a745;
    font-weight: 600;
}

.premium-rate-zero {
    color: #6c757d;
    font-weight: 600;
}

.reference-valuation {
    color: #007bff;
    font-weight: 600;
}

.badge-type {
    background-color: #6c757d;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* 基金分组卡片样式 */
.fund-group-card {
    transition: box-shadow 0.3s ease;
}

.fund-group-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.fund-group-header {
    cursor: default;
}

.fund-group-content {
    background-color: white;
}

.fund-group-details {
    max-height: 800px;
    overflow-y: auto;
    font-size: 0.75rem;
}

.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.alert-empty {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.info-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.info-badge-success {
    background-color: #d4edda;
    color: #155724;
}

.info-badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

/* 展开/收起按钮样式 */
.btn-expand {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.btn-expand:hover {
    background-color: #e7f3ff;
    color: #0056b3;
    transform: scale(1.1);
}

.btn-expand:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.btn-expand i {
    transition: transform 0.2s ease;
}

/* 详情行样式 */
.details-row {
    background-color: #f8f9fa;
}

.details-row td {
    padding: 1rem !important;
    border-top: 2px solid #dee2e6;
}

.details-content {
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 1rem;
    margin: 0.5rem 0;
}

.details-content h5 {
    color: #495057;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.details-content h5 i {
    color: #007bff;
    margin-right: 0.5rem;
}

.details-json {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 1rem;
    margin: 0;
    font-size: 0.85rem;
    font-family: 'Courier New', Consolas, monospace;
    color: #495057;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.5;
}

.details-json::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.details-json::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.details-json::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.details-json::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 计算详情分组样式 */
.calculation-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.calculation-section-bid {
    border-left-color: #28a745;
}

.calculation-section-ask {
    border-left-color: #dc3545;
}

.calculation-section h6 {
    color: #495057;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.calculation-section h6 i {
    margin-right: 0.5rem;
}

.calculation-section-bid h6 i {
    color: #28a745;
}

.calculation-section-ask h6 i {
    color: #dc3545;
}

/* 参数组样式 */
.param-group {
    margin-bottom: 1rem;
}

.param-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.param-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #007bff;
    margin-bottom: 0.25rem;
}

.param-desc {
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
}

/* 参数项列表 */
.param-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.param-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background-color: white;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.param-name {
    color: #6c757d;
    font-size: 0.85rem;
    font-weight: 500;
}

.param-val {
    color: #495057;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: 'Courier New', Consolas, monospace;
}

/* 计算结果样式 */
.param-result {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background-color: white;
    border-radius: 4px;
    border: 2px solid #007bff;
}

.result-label {
    font-weight: 600;
    color: #495057;
    margin-right: 0.5rem;
}

.result-value {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Courier New', Consolas, monospace;
}

.result-value.premium-rate-positive {
    color: #dc3545;
}

.result-value.premium-rate-negative {
    color: #28a745;
}

/* 公式显示 */
.param-formula {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background-color: white;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.formula-text {
    font-size: 0.85rem;
    color: #495057;
    font-family: 'Courier New', Consolas, monospace;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.formula-calc {
    font-size: 0.85rem;
    color: #6c757d;
    font-family: 'Courier New', Consolas, monospace;
    padding-left: 1rem;
    white-space: pre-wrap;
}

/* 可编辑参数样式 */
.param-items-editable {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.param-item-editable {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.param-item-editable label {
    color: #6c757d;
    font-size: 0.85rem;
    font-weight: 500;
}

.param-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: 'Courier New', Consolas, monospace;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.param-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.param-input[readonly] {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.param-unit {
    color: #6c757d;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* 计算按钮样式 */
.btn-calculate {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-right: 0.5rem;
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-calculate:active {
    transform: translateY(0);
}

.btn-reset {
    background: #6c757d;
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-reset:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

.btn-reset:active {
    transform: translateY(0);
}

.btn-calculate i,
.btn-reset i {
    margin-right: 0.25rem;
