/*
 * 后端共用样式
 * 适用于PC管控平台端的所有页面
 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #F5F7FA;
    color: #333333;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 布局样式 */
.container {
    display: flex;
    flex: 1;
}

/* 侧边栏样式 */
.sidebar {
    width: 240px;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #E5E6EB;
}

.sidebar-logo {
    font-size: 18px;
    font-weight: 600;
    color: #165DFF;
}

.logo {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    vertical-align: middle;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 16px;
}

.logo-icon {
    color: #0E4A40; /* 国家电网绿色 */
    margin-right: 10px;
    vertical-align: middle;
    background-color: white;
    padding: 5px;
    border-radius: 5px;
}

.sidebar-menu, .menu-list {
    padding: 10px 0;
}

.sidebar-item, .menu-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333333;
    display: flex;
    align-items: center;
}

.sidebar-item:hover, .menu-item:hover {
    background-color: #F5F7FA;
    color: #165DFF;
}

.sidebar-item.active, .menu-item.active {
    background-color: rgba(22, 93, 255, 0.1);
    color: #165DFF;
    border-left: 4px solid #165DFF;
}

.sidebar-item-icon, .menu-icon {
    margin-right: 12px;
    font-size: 18px;
}

.menu-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    width: 100%;
}

/* 主内容区样式 */
.main-content {
    flex: 1;
    margin-left: 240px;
    padding: 24px;
}

/* 顶部栏样式 */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #E5E6EB;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: #1D2129;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #165DFF;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 16px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #165DFF;
    color: white;
}

.btn-primary:hover {
    background-color: #0E42D2;
}

.btn-warning {
    background-color: #FF7D00;
    color: white;
}

.btn-warning:hover {
    background-color: #E56A00;
}

.btn-danger {
    background-color: #F53F3F;
    color: white;
}

.btn-danger:hover {
    background-color: #D93030;
}

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

.btn-outline:hover {
    background-color: #F5F7FA;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 24px;
    margin-bottom: 24px;
}

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

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1D2129;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #E5E6EB;
}

.table th {
    background-color: #F5F7FA;
    font-weight: 600;
    color: #1D2129;
}

.table tr:hover {
    background-color: #F5F7FA;
}

.table .sortable {
    cursor: pointer;
}

.table .sortable:hover {
    color: #165DFF;
}

/* Element UI 表格统一样式 */
.el-table {
    width: 100%;
    border: none !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

.el-table th {
    background-color: #F5F7FA !important;
    font-weight: 600 !important;
    color: #1D2129 !important;
    border-bottom: 1px solid #E5E6EB !important;
    padding: 12px 16px !important;
}

.el-table td {
    border-bottom: 1px solid #E5E6EB !important;
    padding: 12px 16px !important;
}

.el-table tr:hover td {
    background-color: #F7FAFF !important;
}

/* 表格容器样式 */
.task-table, .user-table, .report-table {
    background-color: white !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05) !important;
    overflow: hidden !important;
    margin-bottom: 24px !important;
}

/* 输入框样式 */
.input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #E5E6EB;
    border-radius: 4px;
    font-size: 14px;
}

.input:focus {
    outline: none;
    border-color: #165DFF;
    box-shadow: 0 0 0 2px rgba(22, 93, 255, 0.2);
}

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

.pagination-item {
    padding: 8px 12px;
    border: 1px solid #E5E6EB;
    border-radius: 4px;
    margin-right: 8px;
    cursor: pointer;
}

.pagination-item:hover {
    background-color: #F5F7FA;
}

.pagination-item.active {
    background-color: #165DFF;
    color: white;
    border-color: #165DFF;
}

/* 弹窗样式 */
.task-dialog .el-dialog__header {
    background-color: #165DFF;
    color: white;
}

.task-dialog .el-dialog__title {
    color: white;
}

.task-dialog .el-dialog__body {
    padding: 20px;
    background-color: white;
}

.task-dialog .el-dialog__footer {
    padding: 15px 20px;
    border-top: 1px solid #E5E6EB;
    background-color: #F5F7FA;
}

/* 确保弹窗居中显示 */
.el-dialog {
    display: flex;
    flex-direction: column;
    margin: 0 !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-height: calc(100% - 30px);
    max-width: calc(100% - 30px);
}

.el-dialog__body {
    flex: 1;
    overflow-y: auto;
}
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    padding: 24px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1D2129;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999999;
}

.modal-close:hover {
    color: #333333;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(22, 93, 255, 0.3);
    border-radius: 50%;
    border-top-color: #165DFF;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 提示消息 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast.show {
    opacity: 1;
}

.toast-success {
    background-color: #00B42A;
}

.toast-error {
    background-color: #F53F3F;
}

.toast-warning {
    background-color: #FF7D00;
}

/* 图片样式 */
.img-responsive {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* 搜索框样式 */
.search-box {
    display: flex;
    align-items: center;
    background-color: white;
    border: 1px solid #E5E6EB;
    border-radius: 4px;
    padding: 4px 12px;
}

.search-input {
    border: none;
    outline: none;
    flex: 1;
    padding: 8px 0;
}

.search-icon {
    color: #999999;
}

/* 搜索筛选区域统一样式 */
.search-filter {
    display: flex !important;
    margin-bottom: 24px !important;
    background-color: white !important;
    padding: 16px !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05) !important;
    flex-wrap: wrap !important;
}

.filter-item {
    margin-right: 24px !important;
    margin-bottom: 16px !important;
    display: flex !important;
    align-items: center !important;
}

.filter-label {
    margin-right: 8px !important;
    color: #4E5969 !important;
    font-size: 14px !important;
    white-space: nowrap !important;
}

.el-input {
    width: 180px !important;
    border-radius: 4px !important;
}

.el-select {
    width: 180px !important;
    border-radius: 4px !important;
}

.action-buttons {
    display: flex !important;
    margin-left: auto !important;
    margin-bottom: 16px !important;
}

.action-buttons .el-button {
    margin-left: 10px !important;
}

.action-buttons .el-button:first-child {
    margin-left: 0 !important;
}

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

.tag-primary {
    background-color: rgba(22, 93, 255, 0.1);
    color: #165DFF;
}

.tag-success {
    background-color: rgba(0, 180, 42, 0.1);
    color: #00B42A;
}

.tag-warning {
    background-color: rgba(255, 125, 0, 0.1);
    color: #FF7D00;
}

.tag-danger {
    background-color: rgba(245, 63, 63, 0.1);
    color: #F53F3F;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .sidebar {
        width: 200px;
    }
    .main-content {
        margin-left: 200px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .menu-toggle {
        display: block;
    }
}

/* 隐藏菜单切换按钮，仅在小屏幕显示 */
.menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 200;
    background-color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.header {
        position: fixed;
        top: 0;
        left: 240px;
        right: 0;
        height: 64px;
        background-color: #fff;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        padding: 0 24px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        z-index: 999;
        transition: left 0.3s;
}


      /* 任务管理页面专属样式 */
        .main-content {
            padding: 20px;
            padding-top: 100px;
        }