/* Dashboard 样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #ffffff;
    color: #333333;
}

#app {
    height: 100vh;
    overflow: hidden;
}

.el-container {
    height: 100vh;
}

.el-aside {
    height: 100vh;
    overflow: hidden;
}

.el-container.is-vertical {
    height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    background: #0d0d0e;
    height: 100vh;
    position: relative;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    border-right: 1px solid #34495e;
    overflow: hidden;
    padding: 0;
    transition: width 0.3s ease;
}

/* 侧边栏折叠状态 */
.sidebar.collapsed {
    width: 64px !important;
}

.sidebar.collapsed .user-info {
    display: none;
}

.sidebar.collapsed .sidebar-header {
    padding: 20px 12px;
    text-align: center;
}

.sidebar.collapsed .logo span {
    display: none;
}

.sidebar.collapsed .logo i {
    margin-right: 0;
    font-size: 28px;
}

/* 折叠状态下的菜单项 */
.sidebar.collapsed .sidebar-menu .el-menu-item span,
.sidebar.collapsed .sidebar-menu .el-submenu .el-submenu__title span,
.sidebar.collapsed .sidebar-menu .el-submenu {
    display: none;
}

.sidebar.collapsed .sidebar-menu .el-menu-item {
    text-align: center;
    padding: 0 !important;
    justify-content: center;
}

.sidebar.collapsed .sidebar-menu .el-menu-item i {
    margin-right: 0;
    font-size: 20px;
    width: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
}

.logo i {
    font-size: 24px;
    margin-right: 10px;
    color: #ffffff;
}

.user-info {
    padding: 20px;
    text-align: center;
}

.user-name {
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    margin-top: 10px;
}

.user-role {
    color: #cccccc;
    font-size: 12px;
    margin-top: 5px;
}

.sidebar-menu {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    height: calc(100vh - 140px);
    overflow: hidden;
    width: 100% !important;
    overflow-y: auto !important;
}

.sidebar-menu .el-menu-item {
    height: 48px;
    line-height: 48px;
    margin: 2px 0;
    padding: 0 20px;
    border-radius: 0;
    transition: all 0.3s ease;
    color: #cccccc !important;
}

.sidebar-menu .el-menu-item:hover,
.sidebar-menu .el-menu-item.is-active {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.sidebar-menu .el-menu-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.sidebar-menu .el-submenu .el-submenu__title {
    height: 48px;
    line-height: 48px;
    margin: 2px 0;
    padding: 0 20px;
    border-radius: 0;
    transition: all 0.3s ease;
    color: #cccccc !important;
}

.sidebar-menu .el-submenu .el-submenu__title:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

/* 主内容区域 */
.main-header {
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
    border-bottom: 1px solid #e0e6ed;
    height: 60px;
    flex-shrink: 0;
}

/* 侧边栏切换按钮 */
.sidebar-toggle-btn {
    margin-right: 15px;
    background: #f8f9fa !important;
    border: 1px solid #e0e6ed !important;
    color: #666666 !important;
    transition: all 0.3s ease;
}

.sidebar-toggle-btn:hover {
    background: #e9ecef !important;
    border-color: #d0d7de !important;
    color: #333333 !important;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-left .el-breadcrumb {
    font-size: 16px;
    color: #333333;
}

.header-left .el-breadcrumb .el-breadcrumb__inner {
    color: #333333 !important;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-right .el-button {
    border: none;
    background: #f8f9fa;
    color: #6c757d;
    transition: all 0.3s ease;
}

.header-right .el-button:hover {
    background: #e9ecef;
    color: #495057;
}

.el-dropdown-link {
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* 用户名显示样式 */
.username-display {
    color: #333333;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e0e6ed;
    border-radius: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.username-display:hover {
    background: #e9ecef;
    border-color: #d0d7de;
    color: #495057;
}

/* 调整下拉菜单距离用户名的间距 */
.header-right .el-dropdown-menu {
    margin-top: 2px !important;
    top: calc(100% + 2px) !important;
}

.header-right .el-dropdown {
    line-height: 1;
}

.header-right .el-dropdown .el-dropdown-link {
    display: inline-block;
    vertical-align: middle;
}

/* 全局调整所有下拉菜单的间距 */
.el-popper[x-placement^="bottom"] {
    margin-top: 2px !important;
}

/* 表格卡片样式 */
.table-card {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    border: 1px solid #e0e6ed;
    background: #ffffff;
}

.table-card .el-card__body {
    padding: 20px;
}

/* 工具栏样式 */
.toolbar {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e6ed;
}

/* 主要内容 */
.main-content {
    padding: 20px;
    background: #f8f9fa;
    height: calc(100vh - 60px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* 统计卡片样式 */
.stats-cards {
    margin-bottom: 20px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #d0d7de;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0c0d19 0%, #ffffff 100%);
}

.stat-card-blue::before {
    background: linear-gradient(90deg, #0c0d19 0%, #ffffff 100%);
}

.stat-card-green::before {
    background: linear-gradient(90deg, #0c0d19 0%, #ffffff 100%);
}

.stat-card-orange::before {
    background: linear-gradient(90deg, #0c0d19 0%, #ffffff 100%);
}

.stat-card-purple::before {
    background: linear-gradient(90deg, #0c0d19 0%, #ffffff 100%);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 24px;
    color: #fff;
}

.stat-card-blue .stat-icon {
    background: linear-gradient(135deg, #0c0d19 0%, #0c0d19 100%);
}

.stat-card-green .stat-icon {
    background: linear-gradient(135deg, #0c0d19 0%, #0c0d19 100%);
}

.stat-card-orange .stat-icon {
    background: linear-gradient(135deg, #0c0d19 0%, #0c0d19 100%);
}

.stat-card-purple .stat-icon {
    background: linear-gradient(135deg, #0c0d19 0%, #0c0d19 100%);
}

.stat-content {
    flex: 1;
}

.stat-title {
    font-size: 14px;
    color: #8c8c8c;
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-number {
    font-size: 28px;
    font-weight: bold;
    color: #262626;
}

/* 图表区域样式 */
.charts-section,
.bottom-charts {
    margin-bottom: 20px;
}

.chart-card {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    border: 1px solid #e0e6ed;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.chart-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #d0d7de;
}

.chart-card .el-card__header {
    background: #ffffff;
    border-bottom: 1px solid #f0f2f5;
    padding: 18px 20px;
    color: #333333;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chart-legend {
    display: flex;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #8c8c8c;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.legend-expected {
    background: #ff6b6b;
}

.legend-actual {
    background: #4ecdc4;
}

.chart-card .el-card__body {
    padding: 20px;
    background: #ffffff;
}

/* 图表占位符样式 */
.chart-placeholder {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    border-radius: 8px;
    border: 2px dashed #e0e6ed;
}

.placeholder-content {
    text-align: center;
    color: #8c8c8c;
}

.placeholder-content p {
    margin-top: 10px;
    font-size: 14px;
    color: #8c8c8c;
}

/* 移动端遮罩层 */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.mobile-overlay.active {
    display: block;
}

/* 平板端适配 768px-1024px */
@media (max-width: 1024px) and (min-width: 769px) {
    .sidebar {
        width: 180px !important;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .stat-card {
        padding: 18px;
    }
    
    .chart-legend {
        flex-direction: column;
        gap: 8px;
    }
}

/* 手机端适配 */
@media (max-width: 768px) {
    /* 侧边栏在手机端为固定定位，默认隐藏 */
    .el-aside {
        width: 250px !important;
        position: fixed !important;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1001;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .el-aside.mobile-open {
        transform: translateX(0);
    }
    
    .sidebar {
        position: relative;
        width: 100% !important;
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
    }
    
    /* 主内容区域占满屏幕 */
    .el-container .el-container {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    .main-header {
        padding: 0 15px;
        height: 50px;
    }
    
    .sidebar-toggle-btn {
        margin-right: 10px;
        width: 36px;
        height: 36px;
    }
    
    .header-left .el-breadcrumb {
        font-size: 14px;
    }
    
    .header-right {
        gap: 8px;
    }
    
    .header-right .el-button {
        width: 32px;
        height: 32px;
        padding: 0;
    }
    
    .username-display {
        font-size: 12px !important;
        padding: 6px 8px !important;
    }
    
    .main-content {
        padding: 10px;
        height: calc(100vh - 50px);
    }
    
    .stat-card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 18px;
        margin-right: 12px;
    }
    
    .stat-number {
        font-size: 20px;
    }
    
    .stat-title {
        font-size: 12px;
    }
    
    .chart-card .el-card__header {
        padding: 12px 15px;
    }
    
    .chart-card .el-card__body {
        padding: 15px;
    }
    
    .chart-placeholder {
        height: 250px;
    }
    
    .chart-legend {
        flex-direction: column;
        gap: 8px;
        font-size: 11px;
    }
    
    /* 侧边栏内容适配 */
    .sidebar-header {
        padding: 15px;
    }
    
    .user-info {
        padding: 15px;
    }
    
    .user-info .el-avatar {
        width: 50px !important;
        height: 50px !important;
    }
    
    .user-name {
        font-size: 14px;
    }
    
    .user-role {
        font-size: 11px;
    }
    
    .sidebar-menu .el-menu-item,
    .sidebar-menu .el-submenu .el-submenu__title {
        height: 44px;
        line-height: 44px;
        font-size: 14px;
    }
    
    .sidebar-menu .el-menu-item i {
        font-size: 16px;
    }
}

/* 小屏手机适配 */
@media (max-width: 480px) {
    .main-header {
        padding: 0 10px;
        height: 48px;
    }
    
    .sidebar-toggle-btn {
        width: 32px;
        height: 32px;
        margin-right: 8px;
    }
    
    .header-left .el-breadcrumb {
        font-size: 12px;
    }
    
    .header-right {
        gap: 6px;
    }
    
    .header-right .el-button {
        width: 28px;
        height: 28px;
    }
    
    .username-display {
        font-size: 11px !important;
        padding: 4px 6px !important;
    }
    
    .main-content {
        padding: 8px;
        height: calc(100vh - 48px);
    }
    
    .stats-cards .el-row {
        margin: 0 -5px;
    }
    
    .stats-cards .el-col {
        padding: 0 5px;
        margin-bottom: 10px;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        padding: 12px;
    }
    
    .stat-icon {
        margin-right: 0;
        margin-bottom: 10px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .stat-number {
        font-size: 18px;
    }
    
    .stat-title {
        font-size: 11px;
    }
    
    .chart-card .el-card__header {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .chart-card .el-card__body {
        padding: 12px;
    }
    
    .chart-placeholder {
        height: 200px;
    }
    
    .placeholder-content i {
        font-size: 32px !important;
    }
    
    .placeholder-content p {
        font-size: 12px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stats-cards .el-col,
.chart-card {
    animation: fadeInUp 0.6s ease-out;
}

.stats-cards .el-col:nth-child(2) {
    animation-delay: 0.1s;
}

.stats-cards .el-col:nth-child(3) {
    animation-delay: 0.2s;
}

.stats-cards .el-col:nth-child(4) {
    animation-delay: 0.3s;
}

/* Element UI 黑白主题覆盖 */
.el-menu {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

.el-menu-item,
.el-submenu .el-submenu__title {
    margin: 0 !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    border-radius: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.el-submenu .el-menu-item {
    background-color: #0d0d0e !important;
    color: #bdc3c7 !important;
    margin: 0 !important;
    padding: 0 20px 0 50px !important;
    border-radius: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.el-submenu .el-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.el-submenu__icon-arrow {
    color: #bdc3c7 !important;
}

.el-dropdown-menu {
    background: #ffffff !important;
    border: 1px solid #e0e6ed !important;
}

.el-dropdown-menu__item {
    color: #333333 !important;
}

.el-dropdown-menu__item:hover {
    background: #f8f9fa !important;
    color: #333333 !important;
}

.el-message-box {
    background: #ffffff !important;
    border: 1px solid #e0e6ed !important;
}

.el-message-box__header {
    background: #ffffff !important;
    color: #333333 !important;
}

.el-message-box__content {
    color: #333333 !important;
}

.el-button--primary {
    background: #0d0d0e !important;
    border-color: #0d0d0e !important;
}

.el-button--primary:hover {
    background: #1a1a1a !important;
    border-color: #1a1a1a !important;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 侧边栏隐藏滚动条 */
.sidebar::-webkit-scrollbar,
.sidebar-menu::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

.sidebar {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.sidebar-menu {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

/* ===== 用户管理页面样式优化 ===== */

/* 用户管理头部 */
.user-management-header {
    background: #f5f7fa;
    padding: 20px;
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* 搜索区域 */
.search-section {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.search-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-group label {
    font-size: 14px;
    color: #606266;
    white-space: nowrap;
}

.search-input-compact {
    width: 200px;
}

.search-input-compact .el-input__inner {
    height: 32px;
    font-size: 14px;
}

.status-select-compact {
    width: 120px;
}

.status-select-compact .el-input__inner {
    height: 32px;
    font-size: 14px;
}

.search-buttons {
    display: flex;
    gap: 8px;
}

.search-buttons .el-button {
    height: 32px;
    padding: 0 15px;
    font-size: 14px;
}

/* 操作区域 */
.action-section {
    display: flex;
    gap: 8px;
}

.action-section .el-button {
    height: 32px;
    padding: 0 15px;
    font-size: 14px;
}

/* 表格容器 */
.table-container {
    background: #fff;
    margin-top: 0;
}

/* 紧凑表格 */
.compact-table {
    font-size: 14px;
}

.compact-table .el-table__header th {
    padding: 12px 0;
    height: 40px;
}

.compact-table .el-table__body td {
    padding: 8px 0;
    height: 40px;
}

.compact-table .el-table__header th .cell,
.compact-table .el-table__body td .cell {
    padding: 0 10px;
    line-height: 1.5;
}

/* 用户ID文本 */
.user-id-text {
    font-family: Monaco, Consolas, monospace;
    font-size: 12px;
    color: #909399;
}

/* 分页信息 */
.pagination-info {
    padding: 10px 20px;
    background: #fafbfc;
    border-top: 1px solid #e4e7ed;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: #606266;
}

.pagination-left {
    flex: 1;
}

.pagination-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}



/* 移动端适配 */
@media (max-width: 768px) {
    .user-management-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .search-section {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-group {
        justify-content: space-between;
        width: 100%;
    }
    
    .search-input-compact {
        width: 180px;
    }
    
    .action-section {
        justify-content: center;
    }
    
    .compact-table .el-table__header th .cell,
    .compact-table .el-table__body td .cell {
        padding: 0 5px;
        font-size: 12px;
    }
    
    .pagination-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .pagination-right {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    
    .pagination-right .el-pagination {
        font-size: 12px;
    }
    
    .pagination-right .el-pagination .el-pagination__total,
    .pagination-right .el-pagination .el-pagination__sizes {
        margin-right: 8px;
    }
}

@media (max-width: 480px) {
    .search-input-compact {
        width: 150px;
    }
    
    .status-select-compact {
        width: 100px;
    }
    
    .action-section {
        flex-direction: column;
        gap: 8px;
    }
    
    .action-section .el-button {
        width: 100%;
    }
    
    .compact-table {
        font-size: 12px;
    }
} 