/* ========================================
   365PAY 全局样式 - 完全保留原UI
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f5f7fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #333;
    padding-bottom: 55px;
}

/* ========== 底部导航 ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55px;
    background: #ffffff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    color: #999;
    text-decoration: none;
    font-size: 11px;
    transition: color 0.2s;
}

.nav-item.active {
    color: #f1a650;
}

.nav-item svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}

/* ========== 页面容器 ========== */
.page {
    min-height: 100vh;
    background: #f5f7fa;
    padding-bottom: 10px;
}

/* ========== 导航栏 ========== */
.nav-bar {
    background: white;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid #f0f0f0;
}

.nav-bar .back-btn {
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0 8px;
}

.nav-bar .title {
    font-size: 18px;
    font-weight: 500;
    color: #333;
}

/* ========== 卡片通用样式 ========== */
.card {
    background: white;
    border-radius: 16px;
    margin: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

/* ========== 按钮 ========== */
.btn-primary {
    background: linear-gradient(135deg, #2b56aa, #2f71d5);
    color: white;
    border: none;
    border-radius: 24px;
    padding: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    text-align: center;
    transition: opacity 0.2s;
}

.btn-primary:active {
    opacity: 0.9;
}

.btn-default {
    background: #f5f7fa;
    border: 1px solid #e5e5e5;
    border-radius: 24px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    color: #666;
}

.btn-danger {
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 24px;
    padding: 10px 20px;
    cursor: pointer;
}

/* ========== 表单 ========== */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    display: block;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    background: white;
}

.form-input:focus {
    border-color: #f1a650;
}

.form-input::placeholder {
    color: #ccc;
}

/* ========== 选项卡 ========== */
.tabs {
    display: flex;
    background: white;
    margin: 12px;
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    color: #666;
    border-radius: 8px;
    cursor: pointer;
    background: none;
    border: none;
    transition: all 0.2s;
}

.tab-item.active {
    background: #f1a650;
    color: white;
}

/* ========== 筛选栏 ========== */
.filter-bar {
    background: white;
    padding: 12px 16px;
    display: flex;
    gap: 20px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 8px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    background: none;
    border: none;
}

.filter-item.active {
    color: #f1a650;
}

/* ========== 订单卡片 ========== */
.order-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin: 0 12px 12px;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #f5f5f5;
    margin-bottom: 12px;
}

.order-id {
    font-size: 13px;
    color: #666;
    font-family: monospace;
}

.order-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
}

.order-status.pending {
    background: #fff7e8;
    color: #f1a650;
}

.order-status.completed {
    background: #e8f7ef;
    color: #2ac65f;
}

.order-status.cancelled {
    background: #ffeeed;
    color: #ff6b6b;
}

.info-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
    color: #666;
}

.info-row .commission {
    color: #f1a650;
    font-weight: 500;
}

.order-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f5f5f5;
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 14px;
}

/* ========== 开关 ========== */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    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: #ccc;
    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%;
}

input:checked + .slider {
    background-color: #f1a650;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* ========== 弹窗 ========== */
.mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.mask.show {
    display: block;
}

.popup-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    z-index: 1000;
    max-height: 70%;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.popup-bottom.show {
    transform: translateY(0);
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.popup-header .title {
    font-size: 16px;
    font-weight: bold;
}

.popup-content {
    padding: 16px;
}

/* ========== 支付方式选择 ========== */
.payment-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 12px;
}

.payment-item {
    background: white;
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    border: 1px solid #e5e5e5;
    transition: all 0.2s;
}

.payment-item.active {
    border-color: #f1a650;
    background: #fffaf0;
}

.payment-item .icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.payment-item .name {
    font-size: 12px;
    color: #666;
}

/* ========== 底部版权 ========== */
.footer-info {
    text-align: center;
    padding: 20px 0 30px;
    font-size: 11px;
    color: #ccc;
}

.footer-info span {
    margin: 0 4px;
}

/* ========== 辅助类 ========== */
.text-gold {
    color: #f1a650;
}

.text-red {
    color: #ff6b6b;
}

.text-green {
    color: #2ac65f;
}

.bg-gradient {
    background: linear-gradient(135deg, #2b56aa, #2f71d5);
}

/* ========== 额外组件样式 ========== */
.stats-card {
    background: white;
    border-radius: 16px;
    margin: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-around;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
}

.stat-value.income {
    color: #2ac65f;
}

.stat-value.withdraw {
    color: #ff6b6b;
}

.amount-wrapper {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.currency {
    font-size: 20px;
    font-weight: bold;
    margin-right: 8px;
}

.transfer-input {
    flex: 1;
    border: none;
    font-size: 18px;
    outline: none;
}

.quick-amounts {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.quick-amounts span {
    padding: 6px 16px;
    background: #f5f7fa;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
}

/* 卡包样式 */
.card-list {
    margin: 12px;
}

.card-item {
    background: white;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    cursor: pointer;
    border: 1px solid #e5e5e5;
}

.card-item.active {
    border-color: #f1a650;
    background: #fffaf0;
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.card-info {
    flex: 1;
}

.card-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
}

.card-account {
    font-size: 12px;
    color: #999;
}

.default-badge {
    font-size: 10px;
    background: #f1a650;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
}

.delete-icon {
    color: #ccc;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
}

.add-btn {
    background: white;
    border-radius: 16px;
    margin: 12px;
    padding: 16px;
    text-align: center;
    color: #f1a650;
    cursor: pointer;
    border: 1px dashed #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
</style>