﻿/**
 * 会员页面专用样式
 * 统一user/目录下所有页面的UI风格
 */

/* ===== 会员Body ===== */
.member-body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
}

/* ===== 会员Header ===== */
.member-header {
    background: #6344C6;
    padding: 30px 0px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.member-header .header-inner {
    max-width: 1640px;
    margin: 0 auto;
    /*! padding: 0 32px; */
    display: flex;
    align-items: center;
    height: 64px;
}

.member-header .header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    margin-right: 40px;
}

.member-header .header-logo img {
    max-width: 100%;
    max-height: 50px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.member-header .logo-icon {
    font-size: 28px;
}

.member-header .logo-text {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
}

.member-header .header-nav {
    display: flex;
    gap: 4px;
    flex: 1;
}

.member-header .nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s;
}

.member-header .nav-item:hover,
.member-header .nav-item.active {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.member-header .nav-icon {
    font-size: 16px;
}

.member-header .header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.member-header .header-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.member-header .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    border: 2px solid rgba(255,255,255,0.5);
}

.member-header .user-info {
    display: flex;
    flex-direction: column;
}

.member-header .user-name {
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
}

.member-header .user-role {
    color: rgba(255,255,255,0.7);
    font-size: 12px;
}

.member-header .member-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    background: rgba(255,255,255,0.2);
}

.member-header .member-badge.gold {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #fff;
}

.member-header .member-badge.platinum {
    background: linear-gradient(135deg, #e5e4e2, #9b9b9b);
    color: #333;
}

.member-header .btn-outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s;
}

.member-header .btn-outline:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.6);
}

/* ===== 会员主内容区 ===== */
.main-wrap {
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
}

/* ===== 页面标题 ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 20px 24px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.page-header h1 {
    font-size: 1.4rem;
    color: #1a1a2e;
    font-weight: 600;
    margin: 0;
}

.page-actions {
    display: flex;
    gap: 10px;
}

/* ===== 卡片样式 ===== */
.member-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    transition: all 0.3s;
}

.member-card:hover {
    box-shadow: 0 8px 30px rgba(99, 68, 198, 0.15);
    transform: translateY(-2px);
}

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

.member-card-header h3 {
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
    margin: 0;
}

/* ===== 按钮样式 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #4a2d8a 0%, #6344C6 50%, #8b6ce0 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(99, 68, 198, 0.4);
}

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

.btn-success:hover {
    box-shadow: 0 4px 15px rgba(56, 239, 125, 0.4);
}

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

.btn-outline {
    background: transparent;
    border: 1px solid #6344C6;
    color: #6344C6;
}

.btn-outline:hover {
    background: rgba(99, 68, 198, 0.1);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

/* ===== 统计卡片网格 ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

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

@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .stats-grid { grid-template-columns: 1fr; }
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.stat-card.highlight {
    background: linear-gradient(135deg, #6344C6 0%, #4a2d8a 100%);
    color: #fff;
}

.stat-card.highlight .stat-label,
.stat-card.highlight .stat-value {
    color: #fff;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #6344C6;
    margin-bottom: 4px;
}

.stat-label {
    color: #888;
    font-size: 14px;
}

/* ===== 表格样式 ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.data-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    font-size: 14px;
}

.data-table tr:hover {
    background: #f8f9ff;
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* ===== 徽章 ===== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success { background: #d4edda; color: #155724; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-info { background: #d1ecf1; color: #0c5460; }
.badge-primary { background: #cce5ff; color: #004085; }
.badge-purple { background: #e2d9f3; color: #5a3e85; }

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

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

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #6344C6;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* ===== 响应式 ===== */

/* 大屏幕端 (1400px+) */
@media (min-width: 1400px) {
    .member-header .header-inner {
        max-width: 1600px;
    }
    
    .member-header .header-logo img {
        height: 60px;
    }
}

/* 桌面端 (1200px - 1399px) */
@media (max-width: 1399px) and (min-width: 1200px) {
    .member-header .header-inner {
        max-width: 1200px;
    }
}

/* 笔记本端 (1024px - 1199px) */
@media (max-width: 1199px) {
    .member-header .header-inner {
        max-width: 100%;
        padding: 0 24px;
    }
    
    .member-header .header-nav {
        gap: 2px;
    }
    
    .member-header .nav-item {
        padding: 8px 12px;
        font-size: 15px;
    }
}

/* 平板端 (992px - 1023px) */
@media (max-width: 1023px) {
    .member-header .header-nav {
        display: none;
    }
    
    .member-header .header-actions .btn-outline span:first-child {
        display: none;
    }
    
    .member-header .header-inner {
        padding: 0 20px;
    }
    
    .main-wrap {
        padding: 20px;
    }
}

/* 手机端 (768px - 991px) */
@media (max-width: 991px) {
    .main-wrap {
        padding: 16px;
    }
    
    .page-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .member-header .header-actions {
        display: none;
    }
    
    .member-header .header-logo {
        margin-right: 0;
        flex: 1;
    }
    
    .member-header .header-logo img {
        max-height: 48px;
        max-width: 180px;
        height: auto;
        width: auto;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
}

/* 大手机端 (576px - 767px) */
@media (max-width: 767px) {
    body.member-body {
        padding-top: 56px;
    }
    
    .mobile-top-header {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: none !important;
    }
    
    .member-header {
        display: none;
    }
    
    .member-header .header-inner {
        padding: 0 16px;
        height: 56px;
    }
    
    .member-header .logo-icon {
        font-size: 24px;
    }
    
    .member-header .logo-text {
        font-size: 16px;
    }
    
    .member-header .header-logo img {
        max-height: 44px;
        max-width: 160px;
    }
    
    .main-wrap {
        padding: 12px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .quick-actions {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

/* 小屏手机 (480px - 575px) */
@media (max-width: 575px) {
    .member-header .header-inner {
        padding: 0 12px;
        height: 52px;
    }
    
    .member-header .header-logo img {
        max-height: 40px;
        max-width: 140px;
    }
    
    .main-wrap {
        padding: 10px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .page-header {
        padding: 14px 16px;
        margin-bottom: 16px;
    }
    
    .page-header h1 {
        font-size: 1.2rem;
    }
}

/* 折叠屏 / 超小屏幕 (321px - 480px) */
@media (max-width: 480px) {
    .member-header .header-inner {
        padding: 0 10px;
        height: 48px;
    }
    
    .member-header .logo-icon {
        font-size: 20px;
    }
    
    .member-header .header-logo img {
        max-height: 36px;
        max-width: 120px;
    }
    
    .member-header .user-avatar {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .main-wrap {
        padding: 8px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-value {
        font-size: 1.6rem;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .quick-action-item {
        padding: 16px 10px;
    }
    
    .quick-action-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    
    .page-header {
        padding: 12px 14px;
        margin-bottom: 12px;
    }
    
    .page-header h1 {
        font-size: 1.1rem;
    }
}

/* iPhone SE / 超小屏幕 (320px及以下) */
@media (max-width: 320px) {
    .member-header .header-inner {
        padding: 0 8px;
        height: 44px;
    }
    
    .member-header .header-logo img {
        max-height: 32px;
        max-width: 100px;
    }
    
    .member-header .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
    
    .main-wrap {
        padding: 6px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-value {
        font-size: 1.4rem;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .quick-action-item {
        padding: 12px 8px;
    }
    
    .quick-action-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .quick-action-label {
        font-size: 12px;
    }
    
    .page-header {
        padding: 10px 12px;
        margin-bottom: 10px;
    }
    
    .page-header h1 {
        font-size: 1rem;
    }
}

/* ===== 功能菜单卡片 ===== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 1200px) {
    .quick-actions { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .quick-actions { grid-template-columns: repeat(2, 1fr); }
}

.quick-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    background: #fff;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s;
}

.quick-action-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.2);
}

.quick-action-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 12px;
}

.quick-action-icon.purple { background: linear-gradient(135deg, #6344C6 0%, #4a2d8a 100%); color: #fff; }
.quick-action-icon.green { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); color: #fff; }
.quick-action-icon.orange { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); color: #fff; }
.quick-action-icon.blue { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); color: #fff; }
.quick-action-icon.yellow { background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%); color: #fff; }
.quick-action-icon.red { background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%); color: #fff; }

.quick-action-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* ===== 移动端顶部导航栏 ===== */
.mobile-top-header {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: linear-gradient(135deg, #6344C6 0%, #4a2d8a 100%);
    z-index: 1001;
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
}

.mobile-top-header .mobile-top-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    max-width: calc(100% - 60px);
    overflow: hidden;
}

.mobile-top-header .mobile-top-logo img {
    height: 32px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.mobile-top-header .mobile-top-menu-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    border: none;
    padding: 0;
}

.mobile-top-header .mobile-top-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}

/* ===== 移动端菜单 ===== */
.mobile-menu-btn {
    display: none !important;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1001;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #6344C6 0%, #4a2d8a 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.mobile-nav {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: #fff;
    z-index: 1000;
    transition: left 0.3s;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}

body.menu-open .mobile-overlay {
    display: block;
}

body.menu-open .mobile-nav {
    left: 0;
}

.mobile-nav-header {
    padding: 24px;
    background: linear-gradient(135deg, #6344C6 0%, #4a2d8a 100%);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-nav-header .user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
}

.mobile-nav-header .user-name {
    font-weight: 600;
    font-size: 16px;
}

.mobile-nav-header .user-role {
    font-size: 12px;
    opacity: 0.8;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    border-bottom: 1px solid #f5f5f5;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    background: #f8f9ff;
    color: #6344C6;
}

.mobile-nav-item span:first-child {
    font-size: 18px;
}

.mobile-nav-item.logout {
    color: #dc3545;
    margin-top: 20px;
    border-top: 1px solid #eee;
    border-bottom: none;
}

.mobile-nav-divider {
    height: 8px;
    background: #f5f5f5;
}

/* ===== Toast提示 ===== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: #333;
    color: #fff;
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease;
}

.toast.success { background: #28a745; }
.toast.error { background: #dc3545; }
.toast.warning { background: #ffc107; color: #333; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 16px;
    margin-bottom: 20px;
}

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

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #6344C6;
    background: #fff;
    font-size: 14px;
    transition: all 0.3s;
}

.pagination a:hover {
    background: rgba(102, 126, 234, 0.1);
}

.pagination .active {
    background: linear-gradient(135deg, #6344C6 0%, #4a2d8a 100%);
    color: #fff;
}
