/* 骑手端样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 
                 'Microsoft YaHei', sans-serif;
    background: #f5f5f5;
    color: #333;
    padding-bottom: 60px;
}

.rider-container {
    max-width: 750px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
}

/* 顶部状态栏 */
.top-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.status-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.online-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255,255,255,0.3);
    transition: 0.4s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #52c41a;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

#online-text {
    font-weight: 600;
    font-size: 16px;
}

#online-text.online {
    color: #52c41a;
}

#online-text.offline {
    color: #999;
}

.rider-info {
    font-size: 16px;
    font-weight: 500;
}

/* 今日数据 */
.today-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: white;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #999;
}

/* 标签页 */
.tabs {
    display: flex;
    background: white;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.tab.active {
    color: #667eea;
    font-weight: 600;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: #667eea;
    border-radius: 3px 3px 0 0;
}

.tab .badge {
    position: absolute;
    top: 8px;
    right: 20px;
    background: #ff4757;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
}

/* 内容区 */
.content {
    background: #f5f5f5;
    min-height: calc(100vh - 200px);
}

.tab-content {
    display: none;
    padding: 15px;
}

.tab-content.active {
    display: block;
}

/* 订单列表 */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.order-no {
    font-weight: 600;
    font-size: 14px;
}

.order-status {
    color: #667eea;
    font-size: 12px;
}

.order-shop {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.shop-name {
    font-weight: 500;
    font-size: 15px;
}

.distance {
    color: #999;
    font-size: 12px;
}

.order-address {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 13px;
}

.address-label {
    color: #999;
    margin-bottom: 5px;
}

.address-text {
    color: #333;
    line-height: 1.5;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.delivery-fee {
    font-size: 18px;
    font-weight: 600;
    color: #ff4757;
}

.order-actions {
    display: flex;
    gap: 8px;
}

/* 按钮 */
.btn-primary,
.btn-success,
.btn-secondary {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:active {
    background: #5568d3;
}

.btn-success {
    background: #52c41a;
    color: white;
}

.btn-success:active {
    background: #49aa17;
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.btn-secondary:active {
    background: #e8e8e8;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-text {
    color: #999;
    font-size: 14px;
}

/* 筛选栏 */
.filter-bar {
    padding: 15px;
    background: white;
    margin-bottom: 15px;
    border-radius: 12px;
}

.filter-bar select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

/* 收入明细 */
.date-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: white;
    margin-bottom: 15px;
    border-radius: 12px;
}

.date-filter input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.income-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.summary-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.summary-item .label {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.summary-item .value {
    font-size: 24px;
    font-weight: 600;
    color: #667eea;
}

.income-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.income-item {
    background: white;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.income-date {
    font-size: 14px;
    color: #666;
}

.income-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.income-orders {
    font-size: 12px;
    color: #999;
}

.income-amount {
    font-size: 16px;
    font-weight: 600;
    color: #ff4757;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 750px;
    margin: 0 auto;
    background: white;
    display: flex;
    border-top: 1px solid #f0f0f0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    color: #999;
    text-decoration: none;
    transition: all 0.3s;
}

.nav-item.active {
    color: #667eea;
}

.nav-item .icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.nav-item span:last-child {
    font-size: 12px;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 20% auto;
    max-width: 90%;
    border-radius: 12px;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
    font-size: 16px;
}

.close {
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0;
}

.modal-footer button {
    width: 100%;
}

/* 响应式 */
@media (max-width: 480px) {
    .today-stats {
        padding: 15px 10px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .order-item {
        padding: 12px;
    }
}

