/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* v-cloak 隐藏未编译的 Vue 模板 */
[v-cloak] {
    display: none !important;
}

body {
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    background-color: #f5f7fa;
}

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

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

.login-container::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -200px;
    right: -200px;
}

.login-container::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    bottom: -100px;
    left: -100px;
}

.login-box {
    width: 420px;
    padding: 50px 45px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.login-title {
    text-align: center;
    color: #303133;
    margin-bottom: 8px;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 2px;
}

.login-subtitle {
    text-align: center;
    color: #909399;
    font-size: 14px;
    margin-bottom: 35px;
}

.login-form {
    margin-top: 20px;
}

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

.login-switch {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    color: #909399;
}

.login-switch a {
    color: #409eff;
    text-decoration: none;
    margin-left: 4px;
}

.login-switch a:hover {
    text-decoration: underline;
}

.login-tip {
    margin-top: 20px;
    padding: 12px 15px;
    background: #f0f9eb;
    border-radius: 8px;
    font-size: 12px;
    color: #67c23a;
    text-align: center;
}

.login-tip p {
    margin: 0;
}

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

.sidebar {
    background-color: #304156;
    color: #fff;
}

.logo {
    height: 60px;
    line-height: 60px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    background-color: #2b2f3a;
    border-bottom: 1px solid #1f2d3d;
}

.sidebar-menu {
    border-right: none;
    background-color: #304156;
}

.sidebar-menu .el-menu-item,
.sidebar-menu .el-sub-menu__title {
    color: #bfcbd9 !important;
}

.sidebar-menu .el-menu-item .el-icon svg,
.sidebar-menu .el-sub-menu__title .el-icon svg {
    fill: #bfcbd9 !important;
}

.sidebar-menu .el-sub-menu .el-menu-item {
    background-color: #1f2d3d !important;
}

.sidebar-menu .el-menu-item:hover,
.sidebar-menu .el-sub-menu__title:hover {
    background-color: #ecf5ff !important;
    color: #409eff !important;
}

.sidebar-menu .el-menu-item:hover .el-icon svg,
.sidebar-menu .el-sub-menu__title:hover .el-icon svg {
    fill: #409eff !important;
}

.sidebar-menu .el-menu-item.is-active {
    background-color: #409eff !important;
    color: #fff !important;
}

.sidebar-menu .el-menu-item.is-active .el-icon svg {
    fill: #fff !important;
}

.sidebar-menu .el-menu-item.is-active:hover {
    color: #bfcbd9 !important;
}

.sidebar-menu .el-menu-item.is-active:hover .el-icon svg {
    fill: #bfcbd9 !important;
}

.sidebar-menu .el-sub-menu .el-menu-item:hover {
    background-color: #ecf5ff !important;
    color: #409eff !important;
}

.sidebar-menu .el-sub-menu .el-menu-item:hover .el-icon svg {
    fill: #409eff !important;
}

.sidebar-menu .el-sub-menu .el-menu-item.is-active {
    background-color: #409eff !important;
}

.sidebar-menu .el-sub-menu .el-menu-item.is-active .el-icon svg {
    fill: #fff !important;
}

.sidebar-menu .el-sub-menu .el-menu-item.is-active:hover {
    color: #bfcbd9 !important;
}

.sidebar-menu .el-sub-menu .el-menu-item.is-active:hover .el-icon svg {
    fill: #bfcbd9 !important;
}

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

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

.collapse-btn {
    padding: 6px 10px !important;
    font-size: 20px !important;
    color: #bfcbd9 !important;
}

.collapse-btn:hover {
    color: #409eff !important;
    background-color: #ecf5ff !important;
}

.collapse-btn .el-icon svg {
    fill: #bfcbd9 !important;
    width: 20px !important;
    height: 20px !important;
}

.collapse-btn:hover .el-icon svg {
    fill: #409eff !important;
}

.header-title {
    font-size: 18px;
    font-weight: bold;
    color: #303133;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #606266;
}

/* 侧边栏折叠样式 */
.sidebar {
    transition: width 0.25s ease;
    overflow: hidden;
}

.sidebar .logo {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    background-color: #001529;
    border-bottom: 1px solid #1f2d3d;
    transition: all 0.25s ease;
}

.sidebar .logo-collapsed {
    font-size: 22px;
}

.sidebar-collapsed .sidebar-menu {
    border-right: none;
}

.sidebar-collapsed .sidebar-menu .el-menu-item,
.sidebar-collapsed .sidebar-menu .el-sub-menu__title {
    color: #bfcbd9 !important;
}

.sidebar-collapsed .sidebar-menu .el-menu-item .el-icon svg,
.sidebar-collapsed .sidebar-menu .el-sub-menu__title .el-icon svg {
    fill: #bfcbd9 !important;
    width: 20px !important;
    height: 20px !important;
}

.sidebar-collapsed .sidebar-menu .el-menu-item:hover,
.sidebar-collapsed .sidebar-menu .el-sub-menu__title:hover {
    background-color: #ecf5ff !important;
    color: #409eff !important;
}

.sidebar-collapsed .sidebar-menu .el-menu-item:hover .el-icon svg,
.sidebar-collapsed .sidebar-menu .el-sub-menu__title:hover .el-icon svg {
    fill: #409eff !important;
}

.sidebar-collapsed .sidebar-menu .el-menu-item.is-active {
    background-color: #409eff !important;
}

.sidebar-collapsed .sidebar-menu .el-menu-item.is-active .el-icon svg {
    fill: #fff !important;
}

.sidebar-collapsed .sidebar-menu .el-menu-item.is-active:hover {
    color: #bfcbd9 !important;
}

.sidebar-collapsed .sidebar-menu .el-menu-item.is-active:hover .el-icon svg {
    fill: #bfcbd9 !important;
}

.sidebar-collapsed .logo-collapsed {
    color: #bfcbd9 !important;
    font-size: 24px !important;
}

.sidebar-collapsed .logo-collapsed svg {
    fill: #bfcbd9 !important;
    width: 24px !important;
    height: 24px !important;
}

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

/* 表格相关样式 */
.page-toolbar {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.search-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

/* 分页栏 - 左右布局 */
.pagination-bar {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.pagination-right {
    display: flex;
    justify-content: flex-end;
}

/* 表格行高调整 */
.el-table {
    --el-table-row-hover-bg-color: #f5f7fa;
    --el-table-tr-height: 28px !important;
    --el-table-header-bg-color: #fafafa;
}

.el-table td {
    padding: 0 !important;
}

.el-table th {
    padding: 0 !important;
}

.el-table .cell {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    height: 28px !important;
    line-height: 28px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.el-table th .cell {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    height: 32px !important;
    line-height: 32px !important;
}

.el-table .el-table__row {
    height: 28px !important;
}

.el-table__body tr {
    height: 28px !important;
}

/* 行内下拉框高度压缩 */
.el-table .el-select {
    height: 24px !important;
}

.el-table .el-select .el-input__wrapper {
    padding: 0 6px !important;
    min-height: 24px !important;
    height: 24px !important;
    box-shadow: none !important;
}

.el-table .el-select .el-input__inner {
    height: 24px !important;
    line-height: 24px !important;
    font-size: 12px !important;
}

.el-table .el-select .el-input {
    height: 24px !important;
    --el-input-height: 24px;
}

/* 行内标签高度压缩 */
.el-table .el-tag {
    height: 20px !important;
    line-height: 18px !important;
    padding: 0 6px !important;
    font-size: 12px !important;
}

/* 行内操作按钮压缩 */
.el-table .el-button--small {
    padding: 4px 8px !important;
    font-size: 12px !important;
    height: 24px !important;
}

/* 学员表格行样式 */
/* 紫色店铺名字 */
.shop-name-purple {
    color: #909399;
    font-weight: bold;
}

.shop-name-purple.has-no-account {
    color: #8e44ad !important;
    font-weight: bold;
}

/* 业绩进度表列背景色（仅表头） */
th.perf-col-yellow .cell {
    background-color: #fdf6ec !important;
}
th.perf-col-green .cell {
    background-color: #f0f9eb !important;
}
th.perf-col-blue .cell {
    background-color: #ecf5ff !important;
}

/* 业绩进度表提示文字 */
.perf-tip-text {
    font-size: 12px;
    color: #909399;
    padding: 8px 0;
    line-height: 1.5;
}

/* 店铺账号密码表格 - 店铺全名列固定宽度200px */
.shop-accounts-table colgroup col:nth-child(2) {
    width: 200px !important;
}
.shop-accounts-table th.col-shop-name,
.shop-accounts-table td.col-shop-name {
    width: 200px !important;
}

/* 直播备注图标 */
.live-cell {
    display: flex;
    align-items: center;
    gap: 4px;
}

.live-note-icon {
    color: #409eff;
    cursor: pointer;
    font-size: 14px;
}

/* 今日沟通悬停切换 */
.today-comm-cell {
    width: 100%;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.today-comm-cell .today-comm-select {
    width: 100%;
}

.today-comm-cell .today-comm-empty {
    color: #c0c4cc;
    font-size: 12px;
}

.today-comm-cell:hover .today-comm-empty {
    color: #909399;
}

/* 备注行内编辑 */
.remark-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
    padding: 0 4px;
    height: 28px;
}

.remark-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: #606266;
}

.remark-cell:hover .remark-text {
    color: #409eff;
}

.remark-edit-icon {
    font-size: 12px;
    color: #c0c4cc;
    margin-left: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.remark-cell:hover .remark-edit-icon {
    opacity: 1;
    color: #409eff;
}

.remark-input {
    width: 100%;
}

.remark-input .el-textarea__inner {
    padding: 4px 8px;
    font-size: 12px;
    min-height: 50px !important;
}

/* 历史版本弹窗 */
.history-dialog .el-dialog__body {
    padding: 0;
}

.history-container {
    display: flex;
    height: 500px;
}

.history-sidebar {
    width: 260px;
    border-right: 1px solid #e4e7ed;
    background-color: #fafafa;
    overflow-y: auto;
}

.history-list-title {
    padding: 15px 20px;
    font-weight: bold;
    font-size: 14px;
    color: #303133;
    border-bottom: 1px solid #e4e7ed;
}

.history-list {
    padding: 8px 0;
}

.history-item {
    padding: 12px 20px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.history-item:hover {
    background-color: #ecf5ff;
}

.history-item.active {
    background-color: #ecf5ff;
    border-left-color: #409eff;
}

.history-item-time {
    font-size: 13px;
    color: #303133;
    font-weight: 500;
    margin-bottom: 4px;
}

.history-item-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #909399;
    margin-bottom: 4px;
}

.history-item-desc {
    font-size: 12px;
    color: #606266;
    line-height: 1.4;
}

.history-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.history-detail-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e4e7ed;
    background-color: #fff;
}

.history-detail-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: bold;
    color: #303133;
    margin-bottom: 8px;
}

.history-detail-meta {
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: #909399;
}

.history-detail-content {
    flex: 1;
    padding: 15px;
    overflow: auto;
    background-color: #fff;
}

/* 状态标签 */
.status-tag {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.status-active {
    background-color: #67c23a;
    color: #fff;
}

.status-expiring {
    background-color: #e6a23c;
    color: #fff;
}

.status-expired {
    background-color: #f56c6c;
    color: #fff;
}

/* 表单样式 */
.form-dialog .el-form-item {
    margin-bottom: 18px;
}

/* 统计卡片 */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

.stat-card .label {
    color: #909399;
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-card .value {
    color: #303133;
    font-size: 28px;
    font-weight: bold;
}

.stat-card.income .value {
    color: #67c23a;
}

.stat-card.expense .value {
    color: #f56c6c;
}

.stat-card.profit .value {
    color: #409eff;
}

/* 操作记录页面 */
.search-panel {
    background: #fff;
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #e4e7ed;
}

.search-form .el-form-item {
    margin-bottom: 10px;
    margin-right: 10px;
}

.log-stats {
    margin-bottom: 15px;
}

/* 版本号 */
.version-footer {
    position: fixed;
    left: 20px;
    bottom: 10px;
    font-size: 12px;
    color: #c0c4cc;
    z-index: 999;
    user-select: none;
}

/* ========== 营收报表样式 ========== */
.report-container {
    background: #fff;
    padding: 0;
    margin: 0 auto;
    width: fit-content;
    max-width: 100%;
    /* 容器提供外边框，4px加粗 */
    border: 4px solid #000;
}

.report-header {
    color: #fff;
    text-align: center;
    padding: 14px 15px 18px;
    /* header无边框，底部用分隔线和表格分开 */
    border: none;
    border-bottom: 2px solid #000;
}

.report-header.header-week {
    background: #c00;
}

.report-header.header-month {
    background: #1e5fa8;
}

.report-title {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 8px;
    letter-spacing: 6px;
    font-family: "Microsoft YaHei", "微软雅黑", "SimHei", "黑体", sans-serif;
}

.report-subtitle {
    font-size: 24px;
    display: flex;
    justify-content: center;
    gap: 70px;
    font-weight: bold;
    font-family: "Microsoft YaHei", "微软雅黑", "SimHei", "黑体", sans-serif;
}

.report-date {
    font-weight: bold;
    letter-spacing: 1px;
}

.report-table {
    width: auto;
    /* 用separate模式，精细控制边框，避免collapse导致的渲染差异 */
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    font-family: "Microsoft YaHei", "微软雅黑", "SimHei", "黑体", sans-serif;
}

.report-table th {
    background: #fff;
    color: #000;
    font-weight: 900;
    padding: 11px 6px;
    text-align: center;
    /* 只有右边框和下边框（内部分隔线） */
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
    border-top: none;
    border-left: none;
    font-size: 18px;
    white-space: nowrap;
}

.report-table th:last-child {
    border-right: none; /* 最后一列去掉右边框 */
}

.report-table th.uv-th {
    color: #c00;
    font-weight: 900;
}

.report-table td {
    padding: 9px 6px;
    /* 只有右边框和下边框（内部分隔线） */
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
    border-top: none;
    border-left: none;
    text-align: center;
    font-size: 18px;
    color: #000;
    white-space: nowrap;
}

.report-table td:last-child {
    border-right: none; /* 最后一列去掉右边框 */
}

.report-table tr:last-child td {
    border-bottom: none; /* 最后一行去掉下边框 */
}

.report-table .col-name {
    width: 140px;
    text-align: left !important;
    padding-left: 10px !important;
    font-weight: bold;
    white-space: nowrap;
}

.report-table .col-amount {
    width: 105px;
    white-space: nowrap;
}

.report-table .col-count {
    width: 80px;
    white-space: nowrap;
}

.report-table .col-price {
    width: 85px;
    white-space: nowrap;
}

.report-table .col-fans {
    width: 80px;
    white-space: nowrap;
}

.report-table .col-uv {
    width: 85px;
    white-space: nowrap;
}

.report-table .col-num {
    font-size: 18px;
    color: #000;
}

.report-table .uv-value {
    color: #c00;
    font-weight: 900;
    font-size: 19px;
}

.report-table .section-row td {
    font-weight: 900;
    font-size: 20px;
    padding: 13px 6px;
    background: #fff;
    color: #000;
}

.report-table .section-title {
    text-align: left !important;
    padding-left: 12px !important;
    font-size: 20px;
    font-weight: 900;
    color: #000;
}

.report-table .data-row td {
    font-size: 18px;
    padding: 11px 6px;
}

.report-table .assistant-name {
    text-align: center !important;
    padding-left: 0 !important;
    font-size: 18px;
    color: #2c3e50;
    font-weight: normal;
}

.report-table .total-perf {
    font-size: 20px;
    color: #000;
}

.report-table .net-profit-row td {
    font-weight: 900;
    font-size: 18px;
    padding: 15px 6px;
    color: #000;
}

.report-table .expense-row td {
    font-size: 18px;
    padding: 13px 6px;
    color: #000;
}

.report-table .expense-name {
    text-align: center !important;
    font-weight: normal !important;
    padding-left: 0 !important;
}

/* ========== 截图工具样式 ========== */
.screenshot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9999;
    cursor: crosshair;
}

.screenshot-selection {
    position: absolute;
    border: 2px dashed #409eff;
    background: rgba(64, 158, 255, 0.1);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.screenshot-tip {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    pointer-events: none;
    z-index: 10000;
}

/* 截图结果弹窗 */
.screenshot-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screenshot-modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.screenshot-modal-header {
    padding: 12px 16px;
    border-bottom: 1px solid #ebeef5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
}

.screenshot-modal-body {
    padding: 16px;
    overflow: auto;
    display: flex;
    justify-content: center;
}

.screenshot-modal-body img {
    max-width: 100%;
    max-height: calc(90vh - 80px);
    display: block;
}
