/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --sidebar-width: 260px;
    --header-height: 64px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

/* 应用容器 */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1e1b4b 0%, #312e81 100%);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo i {
    font-size: 28px;
    color: #818cf8;
}

.logo span {
    font-size: 18px;
    font-weight: 600;
}

.nav-menu {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: var(--radius);
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background: var(--primary-color);
    color: white;
}

.nav-item i {
    font-size: 20px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.username {
    font-weight: 500;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.8);
    color: white;
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部栏 */
.header {
    height: var(--header-height);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
}

.search-box input {
    width: 280px;
    padding: 10px 12px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    transition: all 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: var(--danger-color);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 内容区域 */
.content-wrapper {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

/* 页面切换 */
.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.stat-icon.blue {
    background: #dbeafe;
    color: #2563eb;
}

.stat-icon.green {
    background: #d1fae5;
    color: #059669;
}

.stat-icon.orange {
    background: #ffedd5;
    color: #ea580c;
}

.stat-icon.purple {
    background: #ede9fe;
    color: #7c3aed;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 仪表板网格 */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

/* 卡片样式 */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.link:hover {
    text-decoration: underline;
}

/* 数据表格 */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 20px;
    text-align: left;
    font-size: 14px;
}

.data-table th {
    font-weight: 600;
    color: var(--text-secondary);
    background: #f9fafb;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.tracking-no {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--primary-light);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
}

/* 状态标签 */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.delivering {
    background: #dbeafe;
    color: #2563eb;
}

.status-badge.delivered {
    background: #d1fae5;
    color: #059669;
}

.status-badge.pending {
    background: #fef3c7;
    color: #d97706;
}

.status-badge.cancelled {
    background: #fee2e2;
    color: #dc2626;
}

/* 时间线 */
.timeline {
    padding: 20px;
}

.timeline-item {
    display: flex;
    gap: 16px;
    padding-bottom: 20px;
    position: relative;
}

.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 20px;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--border-color);
    flex-shrink: 0;
    margin-top: 2px;
}

.timeline-dot.active {
    background: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.timeline-content {
    flex: 1;
}

.timeline-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.timeline-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.timeline-time {
    font-size: 12px;
    color: var(--text-muted);
}

/* 表单样式 */
.page-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    max-width: 900px;
}

.page-card .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.page-card .subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

.form {
    padding: 24px;
}

.form-section {
    margin-bottom: 32px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.section-title i {
    color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.form-row.three-col {
    grid-template-columns: repeat(3, 1fr);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-group .required {
    color: var(--danger-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.address-input {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 36px;
}

.mt-2 {
    margin-top: 12px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--bg-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-light {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-light:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-large {
    padding: 14px 32px;
    font-size: 16px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.btn-text:hover {
    text-decoration: underline;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

/* 运单追踪 */
.track-search-section {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    text-align: center;
}

.track-search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.track-search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--text-muted);
}

.track-search-box input {
    flex: 1;
    padding: 14px 16px 14px 48px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius) 0 0 var(--radius);
    font-size: 16px;
    transition: all 0.2s ease;
}

.track-search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.track-search-box .btn {
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 14px 32px;
}

.search-tip {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.track-result {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.track-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.track-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tracking-no-large {
    font-family: 'Courier New', monospace;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.track-actions {
    display: flex;
    gap: 12px;
}

.track-progress {
    padding: 32px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.step-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    transition: all 0.3s ease;
}

.step.completed .step-icon {
    background: var(--success-color);
}

.step.active .step-icon {
    background: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.step-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.step.completed .step-label,
.step.active .step-label {
    color: var(--text-primary);
}

.step-time {
    font-size: 12px;
    color: var(--text-muted);
}

.step-line {
    flex: 1;
    height: 3px;
    background: var(--border-color);
    max-width: 100px;
    border-radius: 2px;
}

.step-line.completed {
    background: var(--success-color);
}

.step-line.active {
    background: linear-gradient(90deg, var(--success-color) 0%, var(--border-color) 100%);
}

.track-timeline-card {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.track-timeline-card h4 {
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 600;
}

.track-timeline {
    max-height: 400px;
    overflow-y: auto;
}

.track-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 24px;
}

.detail-card {
    background: var(--bg-color);
    border-radius: var(--radius);
    padding: 20px;
}

.detail-card h5 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.detail-card p {
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.detail-card strong {
    color: var(--text-secondary);
    font-weight: 500;
}

/* 订单管理 */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-input,
.filter-select {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    min-width: 160px;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-actions {
    display: flex;
    gap: 12px;
}

.user-cell {
    display: flex;
    flex-direction: column;
}

.user-cell .name {
    font-weight: 500;
}

.user-cell .phone {
    font-size: 12px;
    color: var(--text-muted);
}

.action-btns {
    display: flex;
    gap: 4px;
}

.checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* 分页 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

.pagination-info {
    font-size: 14px;
    color: var(--text-secondary);
}

.pagination-btns {
    display: flex;
    gap: 6px;
}

.btn-page {
    min-width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.btn-page:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-page.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-page:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    display: flex;
    align-items: center;
    padding: 0 8px;
    color: var(--text-muted);
}

/* 积分充值 */
.recharge-container {
    max-width: 800px;
}

.balance-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, #7c3aed 100%);
    border-radius: var(--radius-md);
    padding: 32px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}

.balance-info {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.balance-label {
    font-size: 14px;
    opacity: 0.9;
}

.balance-value {
    font-size: 48px;
    font-weight: 700;
}

.balance-unit {
    font-size: 16px;
    opacity: 0.9;
}

.balance-actions {
    display: flex;
    gap: 12px;
}

.recharge-options,
.payment-methods,
.recharge-summary {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.recharge-options h4,
.payment-methods h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.amount-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.amount-card {
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.amount-card:hover {
    border-color: var(--primary-color);
}

.amount-card.recommended {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.amount-card.custom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.amount-card.custom input {
    width: 80px;
    padding: 6px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 14px;
}

.badge-hot {
    position: absolute;
    top: -10px;
    right: 10px;
    background: var(--danger-color);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.amount {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.amount-card .unit {
    font-size: 12px;
    color: var(--text-secondary);
}

.price {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 8px;
}

.custom-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.payment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-item:hover {
    border-color: var(--primary-color);
}

.payment-item input[type="radio"] {
    display: none;
}

.payment-item input[type="radio"]:checked + .payment-content + .check-icon,
.payment-item:has(input:checked) {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.payment-item input[type="radio"]:checked + .payment-content + .check-icon {
    display: flex;
}

.payment-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.payment-content i {
    font-size: 28px;
}

.check-icon {
    display: none;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
}

.recharge-summary {
    text-align: center;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-row:last-of-type {
    border-bottom: none;
    margin-bottom: 20px;
}

.summary-row .highlight {
    font-weight: 600;
    color: var(--primary-color);
}

.price-large {
    font-size: 32px;
    font-weight: 700;
    color: var(--danger-color);
}

/* 用户中心 */
.user-profile-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    overflow: hidden;
}

.profile-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #7c3aed 100%);
    padding: 40px;
    display: flex;
    align-items: center;
    gap: 24px;
    color: white;
}

.profile-avatar {
    position: relative;
}

.profile-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
}

.avatar-edit {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
}

.avatar-edit:hover {
    transform: scale(1.1);
}

.profile-info h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-info p {
    opacity: 0.9;
    margin-bottom: 8px;
}

.user-id {
    font-size: 13px;
    opacity: 0.7;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 24px 40px;
}

.profile-stat {
    text-align: center;
    padding: 16px;
    border-right: 1px solid var(--border-color);
}

.profile-stat:last-child {
    border-right: none;
}

.stat-num {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.profile-stat .stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.user-settings {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    padding: 24px;
}

.settings-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.settings-form .form-group {
    margin-bottom: 20px;
}

.settings-form input {
    background: var(--bg-color);
}

.input-with-action {
    display: flex;
    gap: 12px;
}

.input-with-action input {
    flex: 1;
}

.security-list,
.notification-list {
    display: flex;
    flex-direction: column;
}

.security-item,
.notification-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.security-item:last-child,
.notification-item:last-child {
    border-bottom: none;
}

.security-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.security-info i {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.security-title {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
}

.security-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.notification-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notification-title {
    font-weight: 500;
}

.notification-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 开关组件 */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: 0.3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.switch input:checked + .slider {
    background-color: var(--primary-color);
}

.switch input:checked + .slider:before {
    transform: translateX(24px);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .track-details-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .address-input {
        grid-template-columns: 1fr;
    }
    
    .amount-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .progress-steps {
        flex-wrap: wrap;
    }
    
    .step-line {
        display: none;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: column;
    }
    
    .filter-input,
    .filter-select {
        width: 100%;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-stats {
        grid-template-columns: 1fr;
    }
    
    .profile-stat {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .profile-stat:last-child {
        border-bottom: none;
    }
    
    .search-box {
        display: none;
    }
    
    .track-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .balance-card {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* 创建单号页面 - 标签切换 */
.create-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tab-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.tab-btn i {
    font-size: 18px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* 批量上传区域 */
.batch-upload-area {
    padding: 24px;
}

.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-color);
}

.upload-zone:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.upload-zone.dragover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: scale(1.02);
}

.upload-zone i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.upload-zone h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.upload-zone p {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.template-download {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-color);
    border-radius: var(--radius);
}

.template-download i {
    font-size: 32px;
    color: #10b981;
}

.template-download div {
    flex: 1;
}

.template-download span {
    font-weight: 500;
    color: var(--text-primary);
}

.template-download p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.batch-preview {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.batch-preview h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.batch-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.batch-actions span {
    color: var(--text-secondary);
    font-size: 14px;
}

.batch-actions div {
    display: flex;
    gap: 12px;
}

/* 订单列表区域 */
.order-list-section {
    margin-top: 24px;
}

.order-list-section .card-header {
    flex-wrap: wrap;
    gap: 16px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box-small {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box-small i {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 14px;
}

.search-box-small input {
    width: 240px;
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    transition: all 0.2s ease;
}

.search-box-small input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.order-no {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-color);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
}

/* 三列表单行 */
.form-row.three-col {
    grid-template-columns: repeat(3, 1fr);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .create-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
        justify-content: center;
    }
    
    .form-row.three-col {
        grid-template-columns: 1fr;
    }
    
    .header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .search-box-small input {
        width: 100%;
    }
    
    .template-download {
        flex-direction: column;
        text-align: center;
    }
    
    .batch-actions {
        flex-direction: column;
        gap: 16px;
    }
    
    .batch-actions div {
        width: 100%;
    }
    
    .batch-actions .btn {
        flex: 1;
    }
}

/* 输入框提示文字 */
.input-hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* 两列表单行 */
.form-row.two-col {
    grid-template-columns: repeat(2, 1fr);
}

/* 只读输入框样式 */
.readonly-input {
    background-color: #f3f4f6 !important;
    color: #6b7280 !important;
    cursor: not-allowed !important;
    border-color: #e5e7eb !important;
}

.readonly-input:focus {
    box-shadow: none !important;
    border-color: #e5e7eb !important;
}

@media (max-width: 768px) {
    .form-row.two-col {
        grid-template-columns: 1fr;
    }
}
