@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* 蓝白配色系统 */
    --primary: #1e40af;
    --primary-hover: #1e3a8a;
    --primary-light: #dbeafe;
    --primary-dark: #1e3a8a;
    
    /* 背景色 */
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    
    /* 界线与阴影 */
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    --card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08);
    
    /* 文字系统 */
    --text-main: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    /* 状态色 */
    --success: #15803d;
    --warning: #b45309;
    --danger: #b91c1c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-main);
    color: var(--text-secondary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, .logo {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    font-weight: 700;
}

/* 核心容器布局 - 现代白色风格 */
.glass {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.glass:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db;
}

/* 顶部导航栏 - 现代白色风格 */
.topbar {
    height: 64px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px 0 24px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.topbar-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.menu-toggle {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.menu-toggle:hover {
    background: #f3f4f6;
    color: #1e40af;
}

.welcome-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.welcome-text strong {
    color: var(--text-main);
    font-weight: 600;
}

.topbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 16px;
    width: 100%;
    max-width: 500px;
    transition: all 0.2s;
}

.search-box:focus-within {
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.search-box svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.9rem;
    color: var(--text-main);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-shortcut {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: #e5e7eb;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-item {
    position: relative;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    transition: all 0.2s;
}

.topbar-item:hover {
    background: #f3f4f6;
    color: #1e40af;
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #dc2626;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.topbar-divider {
    width: 1px;
    height: 24px;
    background: #e5e7eb;
}

/* 用户下拉菜单 */
.user-dropdown {
    position: relative;
}

.user-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.user-btn:hover {
    background: #f3f4f6;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.user-name {
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 500;
}

.dropdown-arrow {
    color: var(--text-muted);
    transition: transform 0.2s;
}

.user-btn:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
}

.user-dropdown:hover .dropdown-menu,
.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.15s;
}

.dropdown-menu a:hover {
    background: #f3f4f6;
    color: #1e40af;
}

.dropdown-menu a svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.dropdown-menu a:hover svg {
    color: #1e40af;
}

.dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 0;
}

.logout-link {
    color: var(--danger) !important;
}

/* 移动端覆盖层 */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* 侧边栏导航系统 - 白色风格 */
.sidebar {
    width: 240px;
    height: calc(100vh - 64px);
    background: #ffffff;
    position: fixed;
    left: 0;
    top: 64px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e5e7eb;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar.collapsed .logo,
.sidebar.collapsed .nav-links a span:not(.nav-icon),
.sidebar.collapsed .nav-divider {
    display: none;
}

.sidebar.collapsed .nav-links a {
    justify-content: center;
    padding: 15px;
}

.sidebar.collapsed .nav-links a .nav-icon {
    margin: 0;
}

.sidebar.collapsed .sidebar-header {
    padding: 1.5rem 0;
    text-align: center;
}

.sidebar.collapsed .sidebar-logo {
    max-width: 40px;
    height: auto;
}

.sidebar.collapsed .sidebar-footer {
    display: none;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
}

.sidebar-logo {
    max-width: 160px;
    max-height: 40px;
    height: auto;
    display: block;
}

.sidebar .logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
}

.sidebar .logo span {
    color: #93c5fd;
}

.sidebar .nav-links {
    flex: 1;
    padding: 0.75rem 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sidebar .nav-links a {
    color: #4b5563;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 12px 20px;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 3px solid transparent;
    border-radius: 8px 0 0 8px;
    margin: 2px 0;
}

.sidebar .nav-links a .nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar .nav-links a:hover {
    background: #f3f4f6;
    color: #1e40af;
    border-left-color: transparent;
}

.sidebar .nav-links a.active {
    background: #eff6ff;
    color: #1e40af;
    border-left-color: #1e40af;
    font-weight: 600;
}

.nav-divider {
    padding: 1rem 20px 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #f9fafb;
    margin: 0.5rem 0;
}

.sidebar-footer {
    margin-top: auto;
    padding: 0.75rem 0;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

/* 内容区域布局 */
.main-content {
    flex: 1;
    padding: 2rem;
    margin-left: 240px;
    margin-top: 64px;
    width: calc(100% - 240px);
    min-height: calc(100vh - 64px);
    transition: all 0.3s;
}

/* 当侧边栏收起时调整主内容区域 */
.sidebar.collapsed ~ .main-content,
body.collapsed .main-content {
    margin-left: 70px;
    width: calc(100% - 70px);
}

/* 仪表盘统计组件 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.5rem;
    position: relative;
    border-left: 3px solid var(--primary);
}

.stat-card h3 {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
}

/* 表单与输入框 - 现代白色风格 */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.9rem;
    transition: all 0.15s ease;
}

.input-control:focus {
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
    outline: none;
}

/* 按钮组件 - 现代白色风格 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    background: #1e40af;
    color: white;
    font-size: 0.9rem;
    box-shadow: 0 1px 2px rgba(30, 64, 175, 0.1);
}

.btn:hover {
    background: #1e3a8a;
    box-shadow: 0 2px 4px rgba(30, 64, 175, 0.2);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(30, 64, 175, 0.1);
}

/* 列表与表格 - 现代白色风格 */
.table-container {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1rem 1.25rem;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

td {
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-bottom: 1px solid #f1f5f9;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #f9fafb;
}

/* 标签系统 - 现代白色风格 */
.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: #dcfce7;
    color: #15803d;
}

.badge-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-warning {
    background: #fef3c7;
    color: #b45309;
}

/* 模态框 - 现代白色风格 */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: #ffffff;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    padding: 2rem !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid #e5e7eb;
}

/* 登录模块 - 白色现代化风格 */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #f9fafb;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    background: #ffffff !important;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.auth-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1e40af;
}

.auth-card .btn {
    width: 100%;
    padding: 0.875rem;
    font-size: 0.9rem;
    margin-top: 1rem;
    border-radius: 8px;
}

.auth-card .input-control {
    border-radius: 8px;
}

@media (max-width: 480px) {
    .auth-container {
        padding: 1rem;
    }

    .auth-card {
        padding: 2rem 1.5rem;
    }
}

/* 移动端响应式适配 */
.mobile-header {
    display: none;
    background: #ffffff;
    color: #1e40af;
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 999;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e5e7eb;
    height: 56px;
}

.mobile-header .logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e40af;
}

.mobile-header .logo span {
    color: #6366f1;
    margin-left: 4px;
}

.menu-toggle {
    background: transparent;
    border: none;
    color: #4b5563;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: #f3f4f6;
    color: #1e40af;
}

.menu-toggle:active {
    transform: scale(0.95);
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@media (max-width: 1024px) {
    .sidebar {
        width: 70px;
        background: #ffffff;
        border-right: 1px solid #e5e7eb;
    }

    .sidebar .logo,
    .sidebar .nav-links a span:not(.nav-icon),
    .nav-divider {
        display: none;
    }

    .sidebar .nav-links a {
        justify-content: center;
        padding: 15px;
        background: transparent;
        border-radius: 8px;
        margin: 2px 0;
    }

    .sidebar .nav-links a:hover {
        background: #f3f4f6;
    }

    .sidebar .nav-links a.active {
        background: #eff6ff;
    }

    .sidebar .nav-links a .nav-icon {
        margin: 0;
        color: #4b5563;
    }

    .sidebar .nav-links a:hover .nav-icon,
    .sidebar .nav-links a.active .nav-icon {
        color: #1e40af;
    }

    .topbar {
        left: 70px;
    }

    .main-content {
        margin-left: 70px;
        width: calc(100% - 70px);
        padding: 1.5rem;
    }

    .welcome-text {
        display: none;
    }

    .search-box {
        max-width: 200px;
    }

    .user-name {
        display: none;
    }

    .desktop-menu-toggle {
        display: none;
    }
}

@media (max-width: 768px) {
    .mobile-header {
        display: flex;
        background: #ffffff;
        border-bottom: 1px solid #e5e7eb;
    }

    /* 抽屉式侧边栏 */
    .sidebar {
        position: fixed;
        left: 0;
        top: 56px; /* mobile-header height */
        bottom: 0;
        width: 280px;
        max-width: 85vw;
        height: calc(100vh - 56px);
        transform: translateX(-100%);
        z-index: 1001;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        background: #ffffff;
        border-right: 1px solid #e5e7eb;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar .logo,
    .sidebar .nav-links a span:not(.nav-icon),
    .nav-divider {
        display: block;
    }

    .sidebar .nav-links {
        flex-direction: column;
        overflow-y: auto;
        padding: 0 16px 20px;
    }

    .sidebar .nav-links a {
        justify-content: flex-start;
        background: transparent;
        border-radius: 8px;
        margin: 2px 0;
        padding: 14px 16px;
        gap: 12px;
    }

    .sidebar .nav-links a:hover {
        background: #f3f4f6;
        transform: translateX(4px);
    }

    .sidebar .nav-links a.active {
        background: #eff6ff;
    }

    .sidebar .nav-links a .nav-icon {
        color: #4b5563;
        flex-shrink: 0;
    }

    .sidebar .nav-links a:hover .nav-icon,
    .sidebar .nav-links a.active .nav-icon {
        color: #1e40af;
    }

    /* 抽屉打开状态 */
    .sidebar.sidebar-open {
        transform: translateX(0);
    }

    /* 遮罩层 */
    .mobile-overlay.active {
        display: block;
        opacity: 1;
    }

    /* 隐藏桌面端顶部栏 */
    .topbar {
        display: none !important;
    }

    /* 显示移动端头部 */
    .mobile-header {
        display: flex !important;
    }

    /* 隐藏桌面端菜单按钮 */
    .topbar-left .menu-toggle,
    .topbar-center {
        display: none;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
        margin-top: 64px;
    }

    .search-shortcut {
        display: none;
    }

    .topbar-right {
        gap: 4px;
    }

    .topbar-item {
        width: 36px;
        height: 36px;
    }

    /* 隐藏版权页脚在移动端 */
    .copyright-footer {
        display: none;
    }
}

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1rem;
        width: calc(100% + 2rem);
        padding: 0 1rem;
    }

    table {
        min-width: 600px;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem !important;
        margin: 0 10px;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* 页面标题区移动端优化 */
    .main-content > div:first-child {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start !important;
    }

    .main-content > div:first-child h2 {
        font-size: 1.25rem;
        margin-bottom: 0;
    }

    .main-content > div:first-child .btn {
        width: 100%;
    }

    /* 卡片内边距 */
    .glass {
        padding: 1rem !important;
    }

    /* 按钮组优化 */
    .action-buttons {
        flex-wrap: wrap;
    }

    th, td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }

    th {
        font-size: 0.7rem;
    }

    code {
        font-size: 0.75rem;
    }

    .badge {
        font-size: 0.7rem;
        padding: 2px 6px;
    }

    /* 隐藏次要列 */
    .hide-mobile {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .logo {
        font-size: 1.1rem;
    }
    
    .stat-card .value {
        font-size: 1.5rem;
    }

    .main-content {
        padding: 0.75rem;
    }

    .glass {
        padding: 0.75rem !important;
    }

    .table-container {
        margin: 0 -0.75rem;
        width: calc(100% + 1.5rem);
        padding: 0 0.75rem;
    }

    th, td {
        padding: 0.5rem 0.375rem;
        font-size: 0.75rem;
    }

    th {
        font-size: 0.65rem;
    }

    .modal-content {
        padding: 1rem !important;
        margin: 0 5px;
    }

    .modal-content h2 {
        font-size: 1.1rem;
    }

    .form-group label {
        font-size: 0.8rem;
    }

    .input-control {
        padding: 0.625rem 0.875rem;
        font-size: 0.85rem;
    }

    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
    }
}

/* 状态徽章 */
.status-active {
    background: #dcfce7;
    color: #15803d;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-inactive {
    background: #f1f5f9;
    color: #64748b;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* 页面标题样式 */
.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-buttons a,
.action-buttons button {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 0;
}

/* 链接样式 */
a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 页面右下角版权信息 */
.copyright-footer {
    position: fixed;
    right: 20px;
    bottom: 20px;
    font-size: 12px;
    color: var(--text-muted);
    opacity: 0.6;
    z-index: 100;
    pointer-events: none;
    transition: opacity 0.3s;
}

.copyright-footer:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .copyright-footer {
        right: 10px;
        bottom: 10px;
        font-size: 10px;
    }
}

/* 会员中心额外响应式优化 */
@media (max-width: 768px) {
    /* 产品卡片网格 */
    .product-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* 公告区域 */
    .main-content > .glass:first-child {
        padding: 0.75rem 1rem !important;
    }
    
    /* 表格最小宽度适配 */
    table {
        min-width: 500px;
    }
    
    /* 按钮组 */
    .btn-group {
        flex-direction: column;
        gap: 8px !important;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    /* 支付弹窗优化 */
    .payment-dialog {
        width: 95% !important;
        padding: 1.5rem !important;
        max-height: 85vh;
        overflow-y: auto;
    }
    
    .payment-dialog h3 {
        font-size: 1.1rem;
    }
    
    /* 用户信息区域 */
    .user-info-brief {
        padding: 1rem !important;
    }
}

@media (max-width: 480px) {
    table {
        min-width: 400px;
    }
    
    .payment-dialog {
        padding: 1rem !important;
    }
    
    .payment-options {
        gap: 8px !important;
    }
    
    .payment-option {
        padding: 0.75rem !important;
    }
    
    .payment-option .icon {
        font-size: 1.3rem !important;
        margin-right: 0.75rem !important;
    }
    
    .order-summary {
        padding: 0.75rem !important;
    }
    
    .order-summary .row {
        font-size: 0.8rem;
    }
}

/* 用户中心特有样式 */
.user-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
}

.user-balance span:first-child {
    color: var(--text-muted);
    font-weight: 500;
}

.user-balance span:last-child {
    font-weight: 700;
    font-size: 1rem;
}

/* 用户中心顶部导航栏特殊处理 */
.member-center .topbar {
    padding: 0 20px;
}

.member-center .topbar-left {
    gap: 12px;
}

.member-center .topbar-right {
    gap: 12px;
}

/* 用户中心侧边栏样式调整 */
.member-center .sidebar {
    background: #1e40af;
    color: white;
}

.member-center .sidebar a {
    color: rgba(255, 255, 255, 0.8);
}

.member-center .sidebar a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.member-center .sidebar a.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.member-center .nav-divider {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 16px 12px 8px;
}

.member-center .nav-icon {
    color: rgba(255, 255, 255, 0.7);
}

.member-center .sidebar a:hover .nav-icon,
.member-center .sidebar a.active .nav-icon {
    color: white;
}

.member-center .sidebar-footer a {
    color: rgba(255, 255, 255, 0.8);
}

.member-center .sidebar-footer a:hover {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.1);
}

@media (max-width: 1024px) {
    .member-center .sidebar {
        background: #ffffff;
        border-right: 1px solid #e5e7eb;
    }

    .member-center .sidebar a {
        color: #4b5563;
    }

    .member-center .sidebar a:hover {
        background: #f3f4f6;
        color: #1e40af;
    }

    .member-center .sidebar a.active {
        background: #eff6ff;
    }

    .member-center .nav-icon {
        color: #4b5563;
    }

    .member-center .sidebar a:hover .nav-icon,
    .member-center .sidebar a.active .nav-icon {
        color: #1e40af;
    }
}

@media (max-width: 768px) {
    .member-center .mobile-header {
        background: #ffffff;
        border-bottom: 1px solid #e5e7eb;
    }

    .member-center .sidebar {
        background: #1e40af;
        border-right: 1px solid #e5e7eb;
    }

    .member-center .sidebar a {
        color: rgba(255, 255, 255, 0.8);
    }

    .member-center .sidebar a:hover {
        background: rgba(255, 255, 255, 0.1);
        color: white;
    }

    .member-center .sidebar a.active {
        background: rgba(255, 255, 255, 0.15);
        color: white;
    }

    .member-center .nav-icon {
        color: rgba(255, 255, 255, 0.7);
    }

    .member-center .sidebar a:hover .nav-icon,
    .member-center .sidebar a.active .nav-icon {
        color: white;
    }

    .member-center .nav-divider {
        color: rgba(255, 255, 255, 0.6);
    }

    .user-balance {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .user-balance span:last-child {
        font-size: 0.9rem;
    }
}

/* ============================================
   增强版移动端适配 - 所有后台页面
   ============================================ */

@media (max-width: 768px) {
    /* 页面头部区域 */
    .page-header {
        flex-direction: column !important;
        gap: 1rem;
        align-items: flex-start !important;
    }

    .page-header h2 {
        font-size: 1.25rem !important;
    }

    .page-header p {
        font-size: 0.8rem !important;
    }

    .page-header .btn {
        width: 100%;
        font-size: 0.85rem;
    }

    /* 卡片网格布局 */
    .info-grid,
    .card-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* 信息卡片优化 */
    .info-card {
        padding: 1rem !important;
    }

    .info-card-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .info-card-title {
        font-size: 1rem !important;
    }

    /* Tab 导航优化 */
    .settings-tabs,
    .tab-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
        margin-bottom: 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .tab-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* 设置区域 */
    .settings-section {
        padding-bottom: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .section-title {
        font-size: 1rem !important;
        margin-bottom: 1rem !important;
    }

    /* 上传区域 */
    .upload-area {
        padding: 1.5rem 1rem !important;
    }

    /* 搜索和筛选 */
    .search-filter-bar,
    .filter-section {
        flex-direction: column;
        gap: 0.75rem;
    }

    .search-filter-bar .input-control,
    .search-filter-bar select {
        width: 100%;
    }

    /* 按钮组 */
    .btn-group,
    .action-buttons {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .btn-group .btn,
    .action-buttons .btn {
        flex: 1;
        min-width: calc(50% - 0.5rem);
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }

    /* 双列布局 */
    .dual-col {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* 金额预设按钮 */
    .amount-presets {
        justify-content: flex-start;
    }

    .amount-preset {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    /* 统计卡片 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-card h3 {
        font-size: 0.65rem;
    }

    .stat-card .value {
        font-size: 1.5rem;
    }

    /* 表单组 */
    .form-group label {
        font-size: 0.8rem;
    }

    .form-group .input-control {
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
    }

    textarea.input-control {
        height: 80px;
    }

    /* 表格响应式 */
    .table-container {
        margin: 0 -1rem;
        width: calc(100% + 2rem);
        padding: 0;
        border-radius: 0;
    }

    .table-container table {
        min-width: 500px;
    }

    /* 隐藏次要表格列 */
    .hide-on-mobile {
        display: none !important;
    }

    /* 表格内按钮 */
    td .btn,
    td button {
        padding: 4px 8px;
        font-size: 0.7rem;
    }

    /* 弹窗优化 */
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .modal-content {
        max-width: 100%;
        width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 85vh;
        padding: 1.25rem !important;
        margin: 0;
    }

    .modal-content h3 {
        font-size: 1.1rem;
    }

    /* 权限配置区域 */
    .permission-grid {
        grid-template-columns: 1fr !important;
    }

    .module-card {
        padding: 1rem;
    }

    .permission-levels {
        flex-wrap: wrap;
    }

    .permission-levels label {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }

    /* 产品选择区域 */
    #productList {
        max-height: 150px;
    }

    /* 分页优化 */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }

    .pagination a,
    .pagination span {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    /* 状态徽章 */
    .status-badge {
        font-size: 0.7rem;
        padding: 4px 8px;
    }

    /* 通知列表 */
    .notice-item {
        padding: 0.75rem;
    }

    .notice-header {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }

    .notice-title {
        font-size: 0.85rem;
    }

    .notice-content {
        font-size: 0.8rem;
    }

    /* 环境信息网格 */
    .env-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .env-item {
        padding: 0.75rem;
    }

    .env-label {
        font-size: 0.7rem;
    }

    .env-value {
        font-size: 0.8rem;
    }

    /* 用户下拉菜单 */
    .dropdown-menu {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 16px 16px 0 0;
        max-width: 100%;
    }

    /* 授权信息显示 */
    .license-display {
        padding: 1rem;
    }

    .license-key {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }

    /* 更新输入组 */
    .update-input-group {
        flex-direction: column;
    }

    .update-input-group input,
    .update-input-group .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    /* 更小屏幕优化 */
    .main-content {
        padding: 0.6rem;
    }

    .glass {
        padding: 0.6rem !important;
    }

    h2 {
        font-size: 1.1rem !important;
    }

    /* 单列统计 */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 0.75rem;
    }

    .stat-card .value {
        font-size: 1.25rem;
    }

    /* 表格更紧凑 */
    .table-container table {
        min-width: 350px;
    }

    th, td {
        padding: 0.4rem 0.3rem;
        font-size: 0.7rem;
    }

    th {
        font-size: 0.6rem;
    }

    /* 弹窗 */
    .modal-content {
        padding: 1rem !important;
        max-height: 90vh;
    }

    /* 按钮 */
    .btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    /* 表单 */
    .form-group .input-control {
        padding: 0.5rem 0.7rem;
        font-size: 0.8rem;
    }

    /* 环境信息单列 */
    .env-grid {
        grid-template-columns: 1fr;
    }

    /* Tab 按钮 */
    .tab-btn {
        padding: 0.5rem 0.6rem;
        font-size: 0.75rem;
    }

    /* 隐藏更多列 */
    .hide-on-small {
        display: none !important;
    }

    /* 代码块 */
    code, pre {
        font-size: 0.7rem;
    }
}

/* ============================================
   通用移动端工具类
   ============================================ */

/* 移动端隐藏 */
@media (max-width: 768px) {
    .mobile-hidden { display: none !important; }
}

/* 小屏幕隐藏 */
@media (max-width: 480px) {
    .small-hidden { display: none !important; }
}

/* 移动端显示 */
@media (min-width: 769px) {
    .mobile-only { display: none !important; }
}

@media (max-width: 768px) {
    .mobile-only { display: block !important; }
}

/* 移动端全宽 */
@media (max-width: 768px) {
    .mobile-full-width {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* 移动端文字居中 */
@media (max-width: 768px) {
    .mobile-text-center { text-align: center !important; }
}

/* 移动端堆叠布局 */
@media (max-width: 768px) {
    .mobile-stack {
        flex-direction: column !important;
        align-items: stretch !important;
    }
}

/* 触摸友好的按钮 */
@media (max-width: 768px) {
    .touch-friendly {
        min-height: 44px;
        min-width: 44px;
    }
}

/* 安全区域适配 (iPhone X 等) */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .main-content {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    .modal-content {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom)) !important;
    }
}
