/* 项目主样式文件 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
        'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background-color: #f5f5f5;
}

#app {
    width: 100%;
    height: 100vh;
}

/* 公共样式 */
.container {
    width: 100%;
    padding: 20px;
}

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

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

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* 数据看板样式 */
.headquarters-dashboard .stat-card {
    text-align: center;
}

.headquarters-dashboard .stat-content {
    padding: 10px;
}

.headquarters-dashboard .stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #409EFF;
    margin-bottom: 10px;
}

.headquarters-dashboard .stat-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.headquarters-dashboard .stat-detail {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

.headquarters-dashboard .stat-detail span {
    margin: 0 10px;
}

.headquarters-dashboard .stat-up {
    color: #67C23A;
}

.headquarters-dashboard .stat-down {
    color: #F56C6C;
}

/* 搜索表单样式 */
.search-form {
    margin-bottom: 20px;
}

/* 统计卡片通用样式 */
.stat-card {
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #409EFF;
    margin: 10px 0;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.store-dashboard .stat-card--dense {
    text-align: left;
}

.store-dashboard .stat-value--sm {
    font-size: 22px;
}

.store-dashboard .stat-detail--block span {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #606266;
}

/* 门店看板：仅带 stat-card--clickable 的卡片可点，避免其它指标误触暗示 */
.store-dashboard .stat-card:not(.stat-card--clickable) {
    cursor: default;
}

.store-dashboard .stat-card:not(.stat-card--clickable):hover {
    transform: none;
}

.store-dashboard .stat-card.stat-card--clickable {
    cursor: pointer;
}

.store-dashboard .stat-card.stat-card--clickable:hover {
    transform: translateY(-2px);
}

/* 错误页面样式 */
.error-page {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 500px;
}

.error-container {
    width: 100%;
    max-width: 600px;
    padding: 20px;
}

.error-content {
    background: #fff;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.error-icon {
    margin-bottom: 30px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.error-code {
    font-size: 72px;
    font-weight: bold;
    color: #333;
    margin: 0 0 20px 0;
    line-height: 1;
}

.error-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
}

.error-description {
    font-size: 16px;
    color: #666;
    margin: 0 0 10px 0;
    line-height: 1.6;
}

.error-tip {
    font-size: 14px;
    color: #999;
    margin: 0 0 40px 0;
    line-height: 1.6;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.error-actions .el-button {
    min-width: 120px;
}

/* Layout布局样式 */
.layout-container {
    height: 100vh;
}

.layout-aside {
    background-color: #304156;
    overflow: hidden;
    transition: width 0.3s;
}

.layout-aside .logo {
    height: 60px;
    line-height: 60px;
    text-align: center;
    background-color: #2b3a4a;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
}

.layout-aside .logo h2 {
    margin: 0;
    padding: 0;
    font-size: 18px;
    color: #fff;
}

.layout-menu {
    border: none;
    height: calc(100vh - 60px);
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
}

/* 防止菜单项出现横向滚动 */
.layout-menu .el-menu-item,
.layout-menu .el-submenu__title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.layout-menu .el-menu-item span,
.layout-menu .el-submenu__title span {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.layout-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;
}

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

.collapse-btn {
    font-size: 20px;
    margin-right: 20px;
}

.breadcrumb {
    line-height: 60px;
}

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

.user-dropdown {
    cursor: pointer;
}

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

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.username {
    margin-right: 5px;
}

.layout-main {
    background-color: #f5f5f5;
    padding: 20px;
    overflow-y: auto;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .error-content {
        padding: 40px 20px;
    }

    .error-code {
        font-size: 56px;
    }

    .error-title {
        font-size: 20px;
    }

    .error-description {
        font-size: 14px;
    }

    .error-actions {
        flex-direction: column;
    }

    .error-actions .el-button {
        width: 100%;
    }

    .layout-aside {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 1000;
    }

    .layout-header {
        padding: 0 10px;
    }

    .layout-main {
        padding: 10px;
    }
}

/* 登录页面样式 */
.login-container {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 500px;
}

.login-box {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.login-box h2 {
    text-align: center;
    color: #333;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 30px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid #e6e6e6;
}

.login-box .el-tabs {
    margin-top: 10px;
}

.login-box .el-tabs__header {
    margin-bottom: 20px;
}

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

.login-box .el-form-item__label {
    font-weight: 500;
    color: #333;
}

.login-box .el-input__inner {
    height: 40px;
    line-height: 40px;
}

.login-box .el-button {
    height: 40px;
    font-size: 16px;
}

/* 响应式：登录页面 */
@media (max-width: 768px) {
    .login-box {
        max-width: 90%;
        padding: 30px 20px;
    }

    .login-box h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
}

/* 覆盖Element UI的el-col-12样式，调整宽度为49%以增加间距 */
.el-col-12 {
    width: 49%;
}

/* 调整日期范围选择器中间“至”的宽度，避免被遮挡 */
.el-date-editor .el-range-separator {
    width: 15%;
}

/* 去掉 Element 表格单元格的 overflow:hidden，避免表内输入框等被裁剪 */
.el-table .cell {
    overflow: visible;
}

/* 表格列表：按需启用单元格省略（选择器优先级高于上方 .el-table .cell；表内带输入/编辑的表格不要包此容器） */
.table-cell-ellipsis {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}
.table-cell-ellipsis .el-table .cell {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    box-sizing: border-box;
}

/* 会员合同模板：Quill 富文本（弹窗内） */
.member-contract-quill-host .ql-toolbar.ql-snow {
    border-radius: 4px 4px 0 0;
    border-color: #dcdfe6;
    background: #fafafa;
}
.member-contract-quill-host .ql-container.ql-snow {
    border-radius: 0 0 4px 4px;
    border-color: #dcdfe6;
    min-height: 300px;
    font-size: 14px;
}
.member-contract-quill-host .ql-editor {
    min-height: 280px;
}