/* 全局样式文件 - 精准教学系统 */

/* Vue v-cloak 指令样式 - 防止Vue未加载时的闪烁 */
[v-cloak] {
    display: none !important;
}

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background-color: #f5f7fa;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 通用工具类 */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

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

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.pull-left {
    float: left;
}

.pull-right {
    float: right;
}

/* 布局容器 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 页面布局 */
.page-layout {
    display: flex;
    min-height: 100vh;
}

.page-sidebar {
    width: 240px;
    background: #304156;
    color: #fff;
    flex-shrink: 0;
    transition: width 0.3s;
}

.page-sidebar.collapsed {
    width: 64px;
}

.page-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.page-header {
    height: 60px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,21,41,.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-shrink: 0;
}

.page-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f0f2f5;
}

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

.card-header {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ebeef5;
}

/* 表格样式 */
.table-container {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.1);
    overflow: hidden;
}

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

.table-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

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

/* 表单样式 */
.form-container {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.1);
    padding: 20px;
}

.form-section {
    margin-bottom: 20px;
}

.form-section-title {
    font-size: 14px;
    font-weight: 500;
    color: #606266;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 3px solid #409EFF;
}

/* 按钮组 */
.button-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

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

.status-tag.active {
    background: #f0f9ff;
    color: #409EFF;
    border: 1px solid #b3d8ff;
}

.status-tag.inactive {
    background: #fef0f0;
    color: #F56C6C;
    border: 1px solid #fbc4c4;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-sidebar {
        position: fixed;
        left: -240px;
        top: 0;
        bottom: 0;
        z-index: 1000;
    }
    
    .page-sidebar.mobile-open {
        left: 0;
    }
    
    .page-main {
        margin-left: 0;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .button-group {
        flex-wrap: wrap;
    }
}

/* Element Plus 样式覆盖 */
.el-button--small {
    padding: 8px 15px;
    font-size: 12px;
}

.el-table {
    font-size: 13px;
}

.el-table th {
    background: #f5f7fa;
    color: #606266;
    font-weight: 500;
}

.el-dialog__header {
/*    padding: 15px 20px;*/
    border-bottom: 1px solid #ebeef5;
}

.el-dialog__body {
    padding: 20px;
}

.el-dialog__footer {
    padding: 15px 20px;
    border-top: 1px solid #ebeef5;
}

/* 动画效果 */
.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.3s;
}

.fade-enter-from,
.fade-leave-to {
    opacity: 0;
}

.slide-enter-active,
.slide-leave-active {
    transition: transform 0.3s;
}

.slide-enter-from,
.slide-leave-to {
    transform: translateX(-100%);
}