/* 全局字体与背景 */
body {
    font-family: "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    margin: 0;
    padding: 0;
}

.header {
    background-color: #fff;
    border-bottom: 1px solid #eaeaea;
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: bold;
    color: #d32f2f;
}

.nav a {
    margin-left: 1.5rem;
    text-decoration: none;
    color: #333;
    font-size: 1rem;
}

.nav a:hover,
.nav a.active {
    color: #d32f2f;
}

/* 主体容器 */
.main-container {
    max-width: 1000px;
    margin: 1.5rem auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

/* 主内容区域 - 减少顶部空白 */
.main-content {
    padding: 10px 5px 20px 5px;
    width: 100%;
}

/* 包裹信息样式 */
.package-group {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    background-color: #f8f9fa;
    margin-bottom: 1rem;
}

.package-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.package-title {
    margin: 0;
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
}

.package-material .badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

.logistics-item {
    background-color: #fff;
    border-radius: 6px;
    padding: 1rem;
    border: 1px solid #e9ecef;
}

.logistics-header {
    margin-bottom: 0.8rem;
}

.tracking-number {
    font-weight: 600;
    color: #495057;
    font-size: 1rem;
}

.logistics-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
}

.logistics-time,
.logistics-description,
.logistics-weight,
.logistics-material {
    margin-bottom: 0.5rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.logistics-time span,
.logistics-description span,
.logistics-weight span,
.logistics-material span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.location {
    color: #6c757d;
    font-size: 0.9rem;
}

.no-logistics {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
    border-radius: 6px;
    padding: 1rem;
}
    box-sizing: border-box;
    max-width: 100%;
}

/* 标题样式 */
h2, h3, h4 {
    color: #222;
    margin-top: 0;
}

/* 按钮基础样式 */
.btn, .btn-primary, .btn-sm, .btn-info {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    color: #fff;
    background-color: #d32f2f;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover,
.btn-primary:hover,
.btn-sm:hover,
.btn-info:hover {
    background-color: #b71c1c;
}

.btn-sm {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
}

.btn-info {
    background-color: #007bff;
}

.btn-info:hover {
    background-color: #0056b3;
}

/* 状态标签样式 */
.status-tag {
    padding: 4px 10px;
    font-size: 0.85rem;
    border-radius: 4px;
    font-weight: 500;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-paid {
    background-color: #d4edda;
    color: #155724;
}

.status-cancelled {
    background-color: #f8d7da;
    color: #721c24;
}

.badge.bg-warning,
.badge.bg-info,
.badge.bg-primary,
.badge.bg-secondary {
    color: #333 !important;
}

.badge.bg-success,
.badge.bg-danger {
    color: #fff !important;
}

/* 表格样式 */
.order-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.order-table thead {
    background-color: #f1f1f1;
    font-weight: bold;
    color: #555;
}

.order-table th,
.order-table td {
    padding: 0.8rem;
    border-bottom: 1px solid #eee;
}

.order-table tr:hover {
    background-color: #fbfbfb;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .order-table thead {
        display: none;
    }

    .order-table tbody tr {
        display: block;
        border-bottom: 1px solid #ddd;
        padding: 0.8rem 0;
    }

    .order-table tbody td {
        display: block;
        padding: 0.4rem 0.8rem;
        border: none;
        text-align: right;
    }

    .order-table tbody td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        color: #555;
    }
    
    .header {
        padding: 0.6rem 1rem;
    }
    
    .main-content {
        padding: 5px 2px 15px 2px;
    }
}

/* 空状态提示 */
.empty-state {
    text-align: center;
    padding: 2rem 0;
    color: #999;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 0.8rem;
    color: #ccc;
}

.empty-text {
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

/* 底部样式 */
.footer {
    text-align: center;
    margin-top: 2rem;
    color: #999;
    font-size: 0.9rem;
    padding: 1.5rem 0;
}

/* 物流公司选择样式 */
.carrier-selection {
    margin-top: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.carrier-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.carrier-option {
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    transition: all 0.3s ease;
}

.carrier-option:hover {
    border-color: #007bff;
    box-shadow: 0 2px 4px rgba(0,123,255,0.1);
}

.carrier-option input[type="radio"] {
    display: none;
}

.carrier-option label {
    display: block;
    padding: 12px 15px;
    cursor: pointer;
    margin: 0;
}

.carrier-option input[type="radio"]:checked + label {
    background-color: #e3f2fd;
    border-color: #007bff;
}

.carrier-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.carrier-name {
    font-weight: 600;
    color: #333;
    flex: 1;
}

.carrier-fee {
    font-weight: 600;
    color: #dc3545;
    font-size: 1.1em;
}

.carrier-days {
    color: #666;
    font-size: 0.9em;
}

.carrier-recommended {
    background-color: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

/* 运费选择对话框样式优化 */
.shipping-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.shipping-dialog-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.shipping-dialog-header {
    text-align: center;
    margin-bottom: 25px;
}

.shipping-dialog-header h3 {
    color: #333;
    margin: 0;
    font-size: 1.5em;
}

.shipping-method-options {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-bottom: 20px;
}

.shipping-option {
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 0;
}

.shipping-option:hover {
    border-color: #007bff;
}

.shipping-option input[type="radio"] {
    display: none;
}

.shipping-option label {
    display: block;
    padding: 15px;
    cursor: pointer;
    margin: 0;
    text-align: center;
    height: 100%;
    box-sizing: border-box;
}

.shipping-option input[type="radio"]:checked + label {
    background-color: #e3f2fd;
}

.shipping-option:has(input[type="radio"]:checked),
.shipping-option.selected {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.option-title {
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 4px;
}

.option-desc {
    color: #666;
    font-size: 0.9em;
}

.total-calculation {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.total-calculation h4 {
    margin-top: 0;
    color: #333;
    font-size: 1.1em;
}

.fee-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 5px 0;
}

.fee-item.total-fee {
    border-top: 2px solid #007bff;
    padding-top: 10px;
    margin-top: 10px;
    font-weight: 600;
    font-size: 1.1em;
    color: #dc3545;
}

.delivery-time {
    color: #666;
    font-size: 0.9em;
    margin-top: 10px;
}

.shipping-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

/* 快递/物流子选项样式 - 横排显示在底部 */
.shipping-sub-options {
    display: flex;
    flex-direction: row;
    gap: 8px;
    justify-content: center;
    padding: 8px 15px;
    margin-top: 10px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    border-radius: 0 0 6px 6px;
}

.sub-option {
    flex: 1;
    max-width: 80px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    transition: all 0.2s ease;
}

.sub-option:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

.sub-option input[type="radio"] {
    display: none;
}

.sub-option-label {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    cursor: pointer;
    margin: 0;
    font-size: 12px;
    gap: 4px;
}

.sub-option-icon {
    font-size: 14px;
}

.sub-option-text {
    font-weight: 500;
    color: #666;
}

.sub-option input[type="radio"]:checked + .sub-option-label {
    background: #e3f2fd;
}

.sub-option:has(input[type="radio"]:checked),
.sub-option.selected {
    border-color: #007bff;
    background: #e3f2fd;
}

.sub-option:has(input[type="radio"]:checked) .sub-option-text,
.sub-option.selected .sub-option-text {
    color: #007bff;
    font-weight: 600;
}

/* 配送方式响应式设计：在小屏幕上改为列布局 */
@media (max-width: 768px) {
    .shipping-method-options {
        flex-direction: column;
    }
    
    .shipping-option {
        flex: none;
    }
    
    .shipping-option label {
        text-align: left;
    }
    
    .shipping-sub-options {
        justify-content: flex-start;
    }
}
