/* 全局样式 */
:root {
    --primary-color: #1A5276;
    --secondary-color: #294E95;
    --accent-color: #E1251B;
    --success-color: #1A7A3C;
    --warning-color: #B07D00;
    --bg-light: #F2F2F2;
    --text-dark: #1E0013;
    --text-gray: #666666;
    --border-color: #E0E0E0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部 */
.header {
    text-align: center;
    padding: 30px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.header .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 主内容区 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* 输入表单 */
.input-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.input-section h2 {
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg-light);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.form-group .hint {
    display: block;
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-top: 5px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--success-color), #2E8B57);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 122, 60, 0.3);
}

/* 结果展示区 */
.result-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.result-section h2 {
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg-light);
}

/* 总费用卡片 */
.total-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 25px;
}

.total-label {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.total-amount {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.total-note {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 渠道推荐 */
.channel-recommendation {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--accent-color);
}

.channel-recommendation h3 {
    color: var(--text-dark);
    margin-bottom: 15px;
}

/* 费用明细表格 */
.fee-breakdown {
    margin-bottom: 20px;
}

.fee-breakdown h3 {
    color: var(--text-dark);
    margin-bottom: 15px;
}

.fee-table {
    width: 100%;
    border-collapse: collapse;
}

.fee-table th,
.fee-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.fee-table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--primary-color);
}

.fee-table tr:hover {
    background: #f9f9f9;
}

/* 时效信息 */
.transit-info {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.transit-info h3 {
    color: var(--text-dark);
    margin-bottom: 15px;
}

.transit-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.transit-item {
    background: white;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
}

.transit-item .label {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 5px;
}

.transit-item .value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* 重要备注 */
.important-notes {
    background: #FFF8E1;
    border: 2px solid var(--warning-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.important-notes h3 {
    color: var(--warning-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.notes-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notes-list li {
    padding: 8px 0;
    color: var(--text-dark);
    font-size: 0.9rem;
    line-height: 1.5;
    border-bottom: 1px solid rgba(176, 125, 0, 0.2);
}

.notes-list li:last-child {
    border-bottom: none;
}

.notes-list li strong {
    color: var(--text-dark);
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 15px;
}

.btn-export,
.btn-reset {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-export {
    background: var(--primary-color);
    color: white;
}

.btn-export:hover {
    background: var(--secondary-color);
}

.btn-reset {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-reset:hover {
    background: #e0e0e0;
}

/* 底部 */
.footer {
    text-align: center;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 8px;
}

.btn-manage {
    padding: 10px 20px;
    background: var(--text-dark);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-manage:hover {
    background: #333;
}

/* 弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    border-radius: 12px;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--primary-color);
    color: white;
}

.modal-header h2 {
    font-size: 1.5rem;
}

.btn-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(80vh - 70px);
}

/* 标签页 */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-gray);
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 上传区域 */
.upload-area {
    border: 3px dashed var(--border-color);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    background: var(--bg-light);
}

.upload-area input[type="file"] {
    display: none;
}

.upload-area label {
    display: block;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 15px;
}

.btn-upload {
    padding: 12px 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-upload:hover {
    background: var(--secondary-color);
}

/* 规则配置 */
.rules-config {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
}

.rules-config h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.rule-item label {
    flex: 1;
    font-weight: 500;
}

.rule-item input {
    width: 150px;
    padding: 8px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
}

.rule-item span {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-gray);
}

.empty-state .icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--bg-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }

    .total-amount {
        font-size: 2rem;
    }

    .transit-details {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }
}
