/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f7fa;
    color: #333;
}

#app {
    height: 100%;
}

/* 登录页面 */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header .logo {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
}

.login-header h1 {
    font-size: 20px;
    color: #333;
    margin: 0;
}

.login-btn {
    width: 100%;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: #999;
}

/* 布局 */
.layout-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.el-container {
    height: 100%;
}

.sidebar {
    background-color: #2c3e50;
    overflow-y: auto;
    border-right: 1px solid #ecf0f1;
}

.sidebar-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #34495e;
    color: white;
}

.sidebar-logo {
    width: 32px;
    height: 32px;
    margin-right: 10px;
}

.sidebar-title {
    font-size: 14px;
    font-weight: bold;
}

.sidebar-menu {
    border-right: none;
    background-color: #2c3e50;
}

.sidebar-menu .el-menu-item,
.sidebar-menu .el-submenu__title {
    color: #bdc3c7;
    background-color: #2c3e50 !important;
}

.sidebar-menu .el-menu-item:hover,
.sidebar-menu .el-submenu__title:hover {
    color: white;
    background-color: #34495e !important;
}

.sidebar-menu .el-menu-item.is-active {
    color: #409eff;
    background-color: #34495e !important;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    border-bottom: 1px solid #ecf0f1;
    padding: 0 20px;
}

.header-left {
    font-size: 20px;
    cursor: pointer;
    color: #333;
}

.header-right {
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #333;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
}

.main-container {
    flex: 1;
    overflow: hidden;
}

.main-content {
    overflow-y: auto;
    padding: 20px;
}

/* 仪表板 */
.dashboard-container {
    padding: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    margin-right: 20px;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.stat-label {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.chart-card {
    margin-bottom: 20px;
}

/* 表格 */
.el-table {
    font-size: 13px;
}

.el-table th {
    background-color: #f5f7fa;
}

/* 卡片 */
.el-card {
    border: 1px solid #ecf0f1;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* 按钮 */
.el-button {
    border-radius: 4px;
}

.el-button--primary {
    background-color: #409eff;
    border-color: #409eff;
}

.el-button--primary:hover {
    background-color: #66b1ff;
    border-color: #66b1ff;
}

/* 表单 */
.el-form-item {
    margin-bottom: 20px;
}

.el-input__inner {
    border-radius: 4px;
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        width: 100% !important;
        position: absolute;
        left: -200px;
        height: 100%;
        z-index: 999;
        transition: left 0.3s;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .login-box {
        margin: 20px;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 动画 */
.fade-enter-active, .fade-leave-active {
    transition: opacity 0.3s;
}

.fade-enter, .fade-leave-to {
    opacity: 0;
}

.slide-enter-active, .slide-leave-active {
    transition: transform 0.3s;
}

.slide-enter {
    transform: translateX(-100%);
}

.slide-leave-to {
    transform: translateX(100%);
}
