body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
}

/* 导航栏美化 */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
}

.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:hover {
    transform: translateY(-2px);
}

/* 卡片美化 */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.card-header {
    border: none;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-header.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.card-header.bg-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
}

.card-header.bg-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
}

.card-header.bg-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
}

.card-body {
    padding: 1.5rem;
}

/* 按钮美化 */
.btn {
    border-radius: 10px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-warning:hover {
    color: white;
    background: linear-gradient(135deg, #de82e9 0%, #e04d60 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

/* 表单美化 */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.form-check-input:checked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

/* 订单卡片美化 */
.order-item {
    border: none;
    border-left: 5px solid;
    border-image: linear-gradient(180deg, #667eea 0%, #764ba2 100%) 1;
    margin-bottom: 1rem;
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.order-item:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
}

/* 徽章美化 */
.status-badge {
    font-size: 0.8rem;
    border-radius: 20px;
    padding: 0.35rem 0.75rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.badge {
    padding: 0.4rem 0.8rem;
    font-weight: 500;
    border-radius: 20px;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
}

.badge.bg-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%) !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
}

/* 地图容器 */
#map, #addressMap {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

#addressMap {
    height: 300px;
    border: none;
}

/* 钱包卡片美化 */
#walletBalance, #walletTotalIncome, #walletTotalExpense {
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 警告提示美化 */
.alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.alert-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #0d47a1;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #e65100;
}

/* 列表组美化 */
.list-group-item {
    border: none;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.list-group-item-warning {
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
}

/* 模态框美化 */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border: none;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px 16px 0 0;
}

.modal-title {
    font-weight: 600;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border: none;
    padding: 1.5rem;
}

/* 小按钮 */
.btn-sm {
    padding: 0.35rem 0.8rem;
    font-size: 0.85rem;
}

/* 渐变色文字 */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 骑手端订单卡片美化 */
.order-card {
    position: relative;
    overflow: hidden;
}

.order-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    z-index: 1;
}

.order-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 50px rgba(0,0,0,0.22), 0 8px 20px rgba(0,0,0,0.12) !important;
}

.order-card .pickup-address:hover,
.order-card .delivery-address:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 10px 25px rgba(255,152,0,0.3), inset 0 3px 0 rgba(255,255,255,0.95) !important;
}

.order-card .delivery-address:hover {
    box-shadow: 0 10px 25px rgba(76,175,80,0.3), inset 0 3px 0 rgba(255,255,255,0.95) !important;
}

.order-card .info-item {
    background: linear-gradient(145deg, #fafafa 0%, #f5f5f5 50%, #eeeeee 100%);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.9);
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.order-card .info-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.9);
}

.order-card .info-item i {
    font-size: 20px;
    color: #616161;
}

.order-card .info-item span {
    color: #333333;
    font-size: 14px;
    font-weight: 500;
}

.order-card .income-item {
    background: linear-gradient(145deg, #e6f9e6 0%, #c8f7c8 50%, #a8e6a8 100%);
    border-color: #4caf50;
}

.order-card .income-item i {
    color: #2e7d32;
}

.order-card .btn:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2) !important;
}

.order-card .btn:active {
    transform: translateY(-1px) scale(1.01);
}

/* 响应式优化 */
@media (max-width: 768px) {
    .card-body {
        padding: 1.25rem;
    }
    
    .btn {
        padding: 0.5rem 1.2rem;
    }
}

/* ===== Flutter 风格骑手端样式 ===== */

/* 骑手端 Flutter 风格头部 */
.flutter-header {
    background: linear-gradient(135deg, #2196F3 0%, #1565C0 100%);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0;
    margin: 0;
}

.flutter-header-title {
    font-size: 24px;
    color: white;
    font-weight: bold;
}

.flutter-online-btn {
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
}

.flutter-online-btn.offline {
    background: #9E9E9E;
}

.flutter-online-btn:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.flutter-online-btn .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: white;
    display: inline-block;
}

.flutter-logout-btn {
    color: white;
    background: transparent;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: background 0.3s;
    box-shadow: none;
}

.flutter-logout-btn:hover {
    background: rgba(255,255,255,0.15);
    transform: none;
}

/* 骑手端 Flutter 风格订单标签 */
.flutter-order-tabs {
    background: #f5f5f5;
    border-radius: 25px;
    padding: 4px;
    display: flex;
    margin: 12px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.flutter-order-tab {
    flex: 1;
    min-width: fit-content;
    padding: 8px 14px;
    text-align: center;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 500;
    color: #757575;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
}

.flutter-order-tab.active {
    background: #2196F3;
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(33,150,243,0.3);
}

.flutter-order-tab:hover {
    transform: none;
}

/* 骑手端 Flutter 风格订单卡片 */
.flutter-order-card {
    background: white;
    border-radius: 12px;
    margin: 0 16px 12px;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border: none;
}

.flutter-order-card:hover {
    transform: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.flutter-order-card .order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.flutter-order-card .order-id {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.flutter-order-card .status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.flutter-order-card .address-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #555;
}

.flutter-order-card .address-row .icon {
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.flutter-order-card .address-row .label {
    font-size: 12px;
    color: #999;
}

.flutter-order-card .address-row .addr {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flutter-order-card .price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.flutter-order-card .distance {
    font-size: 14px;
    color: #666;
}

.flutter-order-card .price {
    font-size: 20px;
    font-weight: bold;
    color: #4CAF50;
}

.flutter-order-card .action-btn {
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    border-radius: 8px;
    border: none;
    font-size: 15px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
}

.flutter-order-card .action-btn:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.flutter-order-card .action-btn.grab {
    background: #4CAF50;
}

.flutter-order-card .action-btn.dispatch {
    background: #FF5722;
}

.flutter-order-card .action-btn.primary {
    background: #2196F3;
}

/* 骑手端 Flutter 底部导航栏 */
.flutter-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 8px 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    display: flex;
    justify-content: space-around;
}

.flutter-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 12px;
    cursor: pointer;
    border: none;
    background: transparent;
    border-radius: 12px;
    transition: all 0.3s ease;
    min-width: 60px;
}

.flutter-nav-item:hover {
    transform: none;
    background: transparent;
}

.flutter-nav-item .nav-icon {
    font-size: 22px;
    color: #9E9E9E;
    transition: color 0.3s ease;
}

.flutter-nav-item .nav-label {
    font-size: 11px;
    color: #9E9E9E;
    font-weight: 500;
    transition: color 0.3s ease;
}

.flutter-nav-item.active .nav-icon {
    color: #2196F3;
}

.flutter-nav-item.active .nav-label {
    color: #2196F3;
    font-weight: bold;
}

/* 底部导航对应内容区域 */
.flutter-page-section {
    display: none;
}

.flutter-page-section.active {
    display: block;
}

/* 骑手端页面底部间距（给底部导航留空间） */
.rider-page-wrapper {
    padding-bottom: 80px;
}

/* 骑手端 Flutter 风格收入卡片 */
.flutter-income-card {
    background: linear-gradient(135deg, #1565C0 0%, #2196F3 100%);
    border-radius: 16px;
    padding: 24px;
    color: white;
    margin: 0 16px 16px;
    box-shadow: 0 4px 20px rgba(33,150,243,0.3);
}

.flutter-income-card .income-title {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.flutter-income-card .income-amount {
    font-size: 32px;
    font-weight: bold;
}

.flutter-income-card .income-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.flutter-income-card .stat-item {
    text-align: center;
}

.flutter-income-card .stat-value {
    font-size: 18px;
    font-weight: bold;
}

.flutter-income-card .stat-label {
    font-size: 12px;
    opacity: 0.8;
}

/* 骑手端 Flutter 风格列表卡片 */
.flutter-list-card {
    background: white;
    border-radius: 12px;
    margin: 0 16px 12px;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border: none;
}

.flutter-list-card .list-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.flutter-list-card .list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.flutter-list-card .list-item:last-child {
    border-bottom: none;
}

.flutter-list-card .list-item .label {
    font-size: 14px;
    color: #666;
}

.flutter-list-card .list-item .value {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* ===== Flutter 风格商家端样式 ===== */

/* 商家端 Flutter 底部导航栏 */
.merchant-flutter-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #E8F0FE;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 8px 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.merchant-flutter-nav .nav-row {
    display: flex;
    width: 100%;
    justify-content: space-around;
    padding: 0 8px;
}

.merchant-flutter-nav .nav-row:first-child {
    margin-bottom: 4px;
}

.merchant-flutter-nav .nav-row + .nav-row {
    border-top: 1px solid rgba(0,0,0,0.08);
    padding-top: 4px;
}

.merchant-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    cursor: pointer;
    border: none;
    background: transparent;
    border-radius: 10px;
    transition: all 0.3s ease;
    min-width: 50px;
}

.merchant-nav-item:hover {
    transform: none;
    background: transparent;
}

.merchant-nav-item .nav-icon {
    font-size: 20px;
    color: #9E9E9E;
    transition: color 0.3s ease;
}

.merchant-nav-item .nav-label {
    font-size: 10px;
    color: #9E9E9E;
    font-weight: 500;
    transition: color 0.3s ease;
}

.merchant-nav-item.active {
    background: rgba(33,150,243,0.1);
    border: 1px solid rgba(33,150,243,0.2);
}

.merchant-nav-item.active .nav-icon {
    color: #2196F3;
}

.merchant-nav-item.active .nav-label {
    color: #2196F3;
    font-weight: bold;
}

/* 商家端页面底部间距 */
.merchant-page-wrapper {
    padding-bottom: 100px;
}

/* 商家端 Flutter 风格标签切换 */
.merchant-section {
    display: none;
}

.merchant-section.active {
    display: block;
}

/* 通用 Flutter 风格卡片 */
.flutter-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border: none;
    overflow: hidden;
    margin-bottom: 16px;
}

.flutter-card .card-flutter-header {
    padding: 16px 20px;
    font-weight: 600;
    font-size: 16px;
    border-bottom: 1px solid #f0f0f0;
    background: white;
}

.flutter-card .card-flutter-body {
    padding: 16px 20px;
}

/* 商家端菜单按钮样式 */
.merchant-tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: left;
    box-shadow: none;
}

.merchant-tab-btn:hover {
    border-color: #2196F3;
    color: #2196F3;
    transform: none;
}

.merchant-tab-btn.active {
    border-color: #2196F3;
    background: #E3F2FD;
    color: #2196F3;
    font-weight: bold;
}

.merchant-tab-btn .btn-icon {
    font-size: 20px;
}

/* 隐藏 Bootstrap 原生标签页中的导航 */
.hide-native-tabs .nav-tabs {
    display: none !important;
}
