/* 全局样式 - 移动端优先 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f5f7fa;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    padding-bottom: 20px;
}

/* 容器 */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 15px;
}

/* 卡片样式 */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: linear-gradient(180deg, #409eff, #66b1ff);
    border-radius: 2px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 14px;
    color: #606266;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-label .tip {
    color: #909399;
    font-size: 12px;
    font-weight: normal;
}

.form-input {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    font-size: 14px;
    color: #303133;
    background: #fff;
    transition: all 0.3s;
    outline: none;
}

.form-input:focus {
    border-color: #409eff;
    box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.1);
}

.form-input::placeholder {
    color: #c0c4cc;
}

textarea.form-input {
    height: auto;
    padding: 10px 12px;
    resize: vertical;
    min-height: 80px;
}

/* 上传组件 */
.upload-area {
    border: 2px dashed #dcdfe6;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.upload-area:hover {
    border-color: #409eff;
    background: #ecf5ff;
}

.upload-area.has-file {
    border-style: solid;
    border-color: #409eff;
    background: #ecf5ff;
}

.upload-icon {
    font-size: 32px;
    color: #c0c4cc;
    margin-bottom: 8px;
}

.upload-text {
    color: #909399;
    font-size: 13px;
}

.upload-preview {
    max-width: 100%;
    max-height: 150px;
    border-radius: 6px;
    margin-top: 10px;
}

.upload-input {
    display: none;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, #409eff, #66b1ff);
    color: #fff;
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #66b1ff, #409eff);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(64, 158, 255, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-success {
    background: linear-gradient(135deg, #67c23a, #85ce61);
    color: #fff;
    box-shadow: 0 4px 12px rgba(103, 194, 58, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #f56c6c, #f78989);
    color: #fff;
    box-shadow: 0 4px 12px rgba(245, 108, 108, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #e6a23c, #ebb563);
    color: #fff;
    box-shadow: 0 4px 12px rgba(230, 162, 60, 0.3);
}

.btn-default {
    background: #fff;
    color: #606266;
    border: 1px solid #dcdfe6;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-sm {
    height: 32px;
    padding: 0 12px;
    font-size: 13px;
    border-radius: 6px;
}

/* 余额卡片 */
.balance-card {
    background: linear-gradient(135deg, #409eff 0%, #66b1ff 50%, #79bbff 100%);
    color: #fff;
    border-radius: 12px;
    padding: 24px 20px;
    margin-bottom: 15px;
    box-shadow: 0 8px 24px rgba(64, 158, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.balance-card::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.balance-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.balance-amount {
    font-size: 36px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.balance-amount .unit {
    font-size: 16px;
    font-weight: 400;
    margin-left: 4px;
}

.balance-info {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    position: relative;
    z-index: 1;
}

.balance-info-item {
    text-align: center;
}

.balance-info-label {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 4px;
}

.balance-info-value {
    font-size: 16px;
    font-weight: 600;
}

/* 标签/状态 */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.tag-primary {
    background: #ecf5ff;
    color: #409eff;
}

.tag-success {
    background: #f0f9eb;
    color: #67c23a;
}

.tag-warning {
    background: #fdf6ec;
    color: #e6a23c;
}

.tag-danger {
    background: #fef0f0;
    color: #f56c6c;
}

.tag-info {
    background: #f4f4f5;
    color: #909399;
}

/* 列表项 */
.list-item {
    padding: 12px 0;
    border-bottom: 1px solid #f2f6fc;
}

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

.list-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.list-item-title {
    font-size: 14px;
    font-weight: 500;
    color: #303133;
}

.list-item-content {
    font-size: 13px;
    color: #606266;
    word-break: break-all;
}

.list-item-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #909399;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #909399;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-text {
    font-size: 14px;
}

/* 提示消息 */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

.alert-success {
    background: #f0f9eb;
    color: #67c23a;
    border: 1px solid #e1f3d8;
}

.alert-error {
    background: #fef0f0;
    color: #f56c6c;
    border: 1px solid #fde2e2;
}

.alert-warning {
    background: #fdf6ec;
    color: #e6a23c;
    border: 1px solid #faecd8;
}

.alert-info {
    background: #ecf5ff;
    color: #409eff;
    border: 1px solid #d9ecff;
}

/* 导航栏 */
.navbar {
    background: #fff;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-title {
    font-size: 16px;
    font-weight: 600;
    color: #303133;
}

.navbar-back {
    color: #409eff;
    font-size: 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Tab 切换 */
.tabs {
    display: flex;
    background: #fff;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 14px;
    color: #606266;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
    text-decoration: none;
}

.tab-item.active {
    background: #409eff;
    color: #fff;
    font-weight: 500;
}

/* 价格说明 */
.price-info {
    background: linear-gradient(135deg, #f0f9eb, #e8f7dd);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-around;
}

.price-item {
    text-align: center;
}

.price-label {
    font-size: 12px;
    color: #67c23a;
    margin-bottom: 4px;
}

.price-value {
    font-size: 18px;
    font-weight: 700;
    color: #67c23a;
}

.price-value .unit {
    font-size: 12px;
    font-weight: 400;
}

/* 管理后台样式 */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 200px;
    background: #001529;
    color: #fff;
    padding: 20px 0;
}

.admin-logo {
    padding: 0 20px 20px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.admin-menu {
    list-style: none;
}

.admin-menu-item {
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: block;
}

.admin-menu-item:hover,
.admin-menu-item.active {
    background: #1890ff;
    color: #fff;
}

.admin-content {
    flex: 1;
    padding: 20px;
    background: #f0f2f5;
}

.admin-header {
    background: #fff;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-title {
    font-size: 18px;
    font-weight: 600;
    color: #303133;
}

.admin-table {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.admin-table th {
    background: #fafafa;
    font-weight: 600;
    color: #606266;
    font-size: 14px;
}

.admin-table td {
    font-size: 14px;
    color: #303133;
}

.admin-table tr:hover {
    background: #fafafa;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-label {
    font-size: 14px;
    color: #909399;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #303133;
}

.stat-value.primary { color: #409eff; }
.stat-value.success { color: #67c23a; }
.stat-value.warning { color: #e6a23c; }
.stat-value.danger { color: #f56c6c; }

/* 登录页 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 12px;
    padding: 40px 30px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.login-title {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #303133;
    margin-bottom: 8px;
}

.login-subtitle {
    text-align: center;
    color: #909399;
    font-size: 14px;
    margin-bottom: 30px;
}

/* 响应式 */
@media (max-width: 768px) {
    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        padding: 10px 0;
    }

    .admin-menu {
        display: flex;
        overflow-x: auto;
    }

    .admin-menu-item {
        white-space: nowrap;
        padding: 8px 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-table {
        font-size: 12px;
    }

    .admin-table th,
    .admin-table td {
        padding: 8px 10px;
    }
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    gap: 8px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    padding: 6px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    text-decoration: none;
    color: #606266;
    font-size: 14px;
}

.pagination .current {
    background: #409eff;
    color: #fff;
    border-color: #409eff;
}

/* 图片预览 */
.qrcode-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 400px;
    width: 100%;
    max-height: 80vh;
    overflow: auto;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #909399;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.hidden {
    display: none !important;
}

/* 公告栏样式 */
.notice-bar {
    background: linear-gradient(135deg, #fff1f0, #ffebe9);
    border: 1px solid #ffccc7;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.notice-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}
.notice-content {
    flex: 1;
    font-size: 13px;
    color: #cf1322;
    line-height: 1.6;
    word-break: break-all;
}

/* 收款码绑定样式 */
.qrcode-bound {
    text-align: center;
    padding: 16px;
    background: #f0f9eb;
    border: 1px solid #e1f3d8;
    border-radius: 8px;
}
.qrcode-preview {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.bound-tip {
    font-size: 13px;
    color: #67c23a;
    font-weight: 500;
}

/* 图片预览遮罩 */
.image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    cursor: zoom-out;
}
.image-preview-overlay img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    object-fit: contain;
}
