/* 全局样式 */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#app {
    height: 100%;
}

/* 登录页样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    background: #f0f2f5;
    background-image: url('https://gw.alipayobjects.com/zos/rmsportal/TVYTbAXWheQpRcWDaDMu.svg');
    background-repeat: no-repeat;
    background-position: center 110px;
    background-size: 100%;
}

.login-box {
    width: 368px;
    margin: 0 auto;
    padding: 32px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

.login-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 28px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.85);
}

.login-box .el-form-item {
    margin-bottom: 24px;
}

/* 布局样式 */
.el-container {
    height: 100%;
}

.el-aside {
    background-color: #001529;
    color: #fff;
}

.el-header {
    background-color: #fff;
    border-bottom: 1px solid #e6e6e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 60px;
    line-height: 60px;
}

/* Logo样式 */
.logo {
    height: 60px;
    line-height: 60px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    background-color: #002140;
    overflow: hidden;
}

/* 菜单样式 */
.el-menu {
    border-right: none;
}

.el-menu-item.is-active {
    background-color: rgba(64, 158, 255, 0.3) !important;
    color: #ffffff !important;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

/* 菜单项选中时的文字和图标颜色 */
.el-menu-item.is-active span,
.el-menu-item.is-active i,
.el-menu-item.is-active .el-icon {
    color: #ffffff !important;
}

/* 子菜单选中状态 */
.el-submenu .el-menu-item.is-active {
    background-color: rgba(64, 158, 255, 0.3) !important;
    color: #ffffff !important;
}

/* 确保菜单图标和文字不倾斜 */
.el-menu-item [class^="el-icon-"],
.el-submenu [class^="el-icon-"],
.el-menu-item i,
.el-submenu i,
.el-menu-item span,
.el-submenu span,
.el-menu-item .el-icon,
.el-submenu .el-icon {
    font-style: normal !important;
}

/* 额外确保菜单图标和文字不倾斜 */
.el-menu-item,
.el-submenu__title {
    font-style: normal !important;
}

.el-menu-item i,
.el-submenu__title i,
.el-menu-item span,
.el-submenu__title span {
    display: inline-block;
    vertical-align: middle;
    font-style: normal !important;
    font-weight: normal !important;
}

/* 头部样式 */
.header-left {
    display: flex;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #333;
}

.user-info .el-icon {
    margin-left: 5px;
}

/* 内容区样式 */
.el-main {
    background-color: #f0f2f5;
    padding: 20px;
}

.content-header {
    margin-bottom: 20px;
}

.content-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
}

/* 卡片样式 */
.el-card {
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.card-body h3 {
    margin: 0;
    font-size: 24px;
    color: #1890ff;
}

/* 工具栏样式 */
.toolbar {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

/* 表格样式 */
.el-table {
    margin-top: 20px;
}

/* 表格优化样式 - 防止自动换行 */
.el-table .cell {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.el-table th,
.el-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 表格容器样式 */
.el-table__body-wrapper {
    overflow-x: auto;
}

/* 确保表格宽度足够显示所有列 */
.el-table {
    min-width: 100%;
    table-layout: auto;
}

/* 按钮样式 */
.el-button--primary {
    background-color: #165DFF;
}

.el-button--primary:hover {
    background-color: #4080FF;
}

/* 响应式布局 */
@media screen and (max-width: 768px) {
    .login-box {
        width: 90%;
        margin: 0 20px;
    }
    
    .el-aside {
        width: 80px !important;
    }

    .logo {
        font-size: 16px;
    }
}

/* 头像上传样式 */
.avatar-uploader {
    text-align: center;
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-uploader:hover {
    border-color: #409EFF;
}

.avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 100px;
    height: 100px;
    text-align: center;
    line-height: 100px;
}

.avatar {
    width: 100px;
    height: 100px;
    display: block;
    object-fit: cover;
}

/* 企业管理相关样式 */
.companies-container .logo-image,
.companies-container .license-image,
.companies-container .qrcode-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 1px solid #eee;
    border-radius: 4px;
}

.companies-container .logo-tip,
.companies-container .license-tip,
.companies-container .qrcode-tip,
.companies-container .photos-tip {
    font-size: 12px;
    color: #909399;
    margin-top: 5px;
}

.companies-container .logo-uploader,
.companies-container .license-uploader,
.companies-container .qrcode-uploader {
    width: 100px;
    height: 100px;
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.companies-container .logo-uploader:hover,
.companies-container .license-uploader:hover,
.companies-container .qrcode-uploader:hover {
    border-color: #409EFF;
}

.companies-container .upload-icon {
    font-size: 28px;
    color: #8c939d;
}

.companies-container .photos-uploader .el-upload {
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.companies-container .photos-uploader .el-upload:hover {
    border-color: #409EFF;
}