/*
 * PureAdmin light-layout adaptation.
 * Reference: https://github.com/pure-admin/vue-pure-admin
 * Copyright (c) 2020-present, pure-admin
 *
 * MIT License
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
:root {
  color-scheme: light;
  --workspace-bg: #f0f2f5;
  --sidebar-width: 224px;
  --el-font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body, #app { width: 100%; height: 100%; margin: 0; }
body { color: var(--el-text-color-primary); background: var(--workspace-bg); font: 14px/1.5 var(--el-font-family); }
[v-cloak] { display: none; }
.num, .metric-value, .el-table { font-variant-numeric: tabular-nums; }
.muted { color: var(--el-text-color-secondary); }
.sp { flex: 1; }
.section-gap { margin-bottom: 16px; }
.layout { display: flex; height: 100dvh; overflow: hidden; }
.side { z-index: 20; display: flex; flex: 0 0 var(--sidebar-width); flex-direction: column; min-width: 0; background: var(--el-bg-color); border-right: 1px solid var(--el-border-color-lighter); }
.side-brand { display: flex; align-items: center; flex-shrink: 0; height: 48px; padding: 0 24px; border-bottom: 1px solid var(--el-border-color-lighter); }
.side-brand .name { font-size: 15px; font-weight: 600; white-space: nowrap; }
.side-menu { flex: 1; min-height: 0; overflow: auto; padding: 12px 0; }
.workspace-menu.el-menu {
  border-right: 0;
  --el-menu-item-height: 42px;
  --el-menu-sub-item-height: 42px;
  --el-menu-base-level-padding: 12px;
  --el-menu-level-padding: 23px;
  --el-menu-icon-width: 18px;
  --el-menu-text-color: var(--el-text-color-regular);
  --el-menu-hover-bg-color: var(--el-fill-color-light);
}
.workspace-menu .el-menu-item, .workspace-menu .el-sub-menu__title { margin: 4px 12px; border-radius: var(--el-border-radius-base); }
.workspace-menu > .el-sub-menu > .el-sub-menu__title { font-weight: 500; }
.workspace-menu .el-sub-menu .el-menu-item { min-width: 0; }
.workspace-menu .el-menu-item.is-active { background: var(--el-color-primary-light-9); font-weight: 500; }
.workspace-menu .el-sub-menu.is-active > .el-sub-menu__title { color: var(--el-menu-active-color); }
.workspace-menu .el-menu-item:focus-visible, .workspace-menu .el-sub-menu__title:focus-visible { outline: 2px solid var(--el-color-primary); outline-offset: -2px; }
.side-user { display: flex; flex-shrink: 0; align-items: center; gap: 12px; padding: 16px 20px; border-top: 1px solid var(--el-border-color-lighter); }
.side-user-info { flex: 1; min-width: 0; }
.side-user .n, .side-user .r { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user .n { font-size: 14px; font-weight: 500; }
.side-user .r { margin-top: 2px; color: var(--el-text-color-secondary); font-size: 12px; }
.main { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.topbar { z-index: 10; display: flex; flex-shrink: 0; align-items: center; gap: 12px; height: 48px; padding: 0 16px; background: #fff; box-shadow: 0 1px 4px rgb(0 21 41 / 8%); }
.mobile-menu-btn.el-button { display: none; }
.side-mask { display: none; }
.content { flex: 1; min-height: 0; overflow: auto; padding: 24px; }
.page-fade-enter-active { transition: opacity 180ms ease-out, transform 180ms ease-out; }
.page-fade-leave-active { transition: opacity 90ms ease-in; pointer-events: none; }
.page-fade-enter-from { opacity: 0; transform: translateY(4px); }
.page-fade-leave-to { opacity: 0; }
.mask-fade-enter-active, .mask-fade-leave-active { transition: opacity 180ms ease; }
.mask-fade-enter-from, .mask-fade-leave-to { opacity: 0; }
.filter-card, .panel, .chart-card, .metric-card { min-width: 0; }
.search-form:not(.account-search) { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 24px; }
.search-form .el-form-item { margin: 0; }
.search-form .filter-control { width: 180px; }
.search-form .filter-date { width: 190px; }
.report-precision { width: 180px; }
.search-actions { margin-right: 0; }
.account-filter-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px 24px; }
.account-filter-extra { padding-top: 16px; }
.search-form.account-search .el-form-item { display: block; min-width: 0; margin: 0; }
.account-search .filter-control { width: 100%; }
.account-filter-actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 16px; }
.account-filter-actions > .el-button + .el-button { margin-left: 0; }
.panel-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; min-height: 32px; }
.panel-h .t, .chart-heading h2 { margin: 0; font-size: 16px; font-weight: 600; line-height: 24px; }
.panel-h .sub { color: var(--el-text-color-secondary); font-size: 13px; }
.panel-h .r { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-left: auto; }
.panel-h .r > .el-button + .el-button, .table-actions > .el-button + .el-button { margin-left: 0; }
.panel-b { padding-top: 16px; }
.panel .el-table { --el-table-header-bg-color: var(--el-fill-color-light); --el-table-header-text-color: var(--el-text-color-primary); }
.table-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-bottom: 16px; }
.table-actions .filter-control { width: 160px; }
.page-footer, .table-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 12px; }
.table-footer { justify-content: space-between; color: var(--el-text-color-regular); font-size: 13px; }
.account-editor-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 24px; }
.account-editor-grid .el-select, .account-editor-grid .el-date-editor { width: 100%; }
.el-dialog { max-width: calc(100vw - 32px); }
.role-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.metric-summary { margin-bottom: 16px; }
.metric-strip { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.metric-card { display: flex; flex-direction: column; }
.metric-card .el-card__body { flex: 1; }
.metric-label { color: var(--el-text-color-regular); font-size: 14px; }
.metric-value { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-top: 8px; font-size: clamp(24px,2vw,30px); font-weight: 600; line-height: 1.35; }
.metric-value span { overflow-wrap: anywhere; }
.metric-value small { color: var(--el-text-color-secondary); font-size: 13px; font-weight: 400; }
.metric-foot { color: var(--el-text-color-regular); font-size: 13px; }
.report-chart-grid { display: grid; grid-template-columns: minmax(0,3fr) minmax(0,2fr); gap: 16px; margin-bottom: 16px; }
.chart-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; }
.chart-heading .el-select { width: 132px; }
.chart-unit { color: var(--el-text-color-secondary); font-size: 13px; }
.chart-stage { position: relative; height: 280px; }
.chart-canvas { width: 100%; height: 100%; }
.chart-stage > .el-empty { height: 100%; }
.login-wrap { position: relative; isolation: isolate; display: grid; grid-template: minmax(0,1fr) / minmax(0,1fr); place-items: center; height: 100dvh; min-height: 0; overflow: hidden; padding: clamp(16px,4dvh,48px) clamp(16px,5vw,80px); background: #c5dfec; }
.login-wrap::before { content: ""; position: absolute; z-index: -1; inset: 0; background: #087ca3; clip-path: polygon(0 0,35% 0,50% 100%,0 100%); }
.login-panel { width: min(960px,100%); height: min(600px,100%); min-height: 0; --el-card-border-radius: 16px; --el-card-border-color: transparent; --el-box-shadow-light: var(--el-box-shadow); --el-color-primary: #087ca3; --el-color-primary-light-3: #529fbe; --el-color-primary-light-5: #84bdd1; --el-color-primary-light-7: #b5d8e5; --el-color-primary-light-8: #cde5ee; --el-color-primary-light-9: #e6f2f7; --el-color-primary-dark-2: #066382; --el-border-radius-base: 3px; }
.login-panel-body { height: 100%; min-height: 0; }
.login-panel-grid { display: grid; grid-template-columns: minmax(0,46fr) minmax(0,54fr); height: 100%; min-height: 0; }
.login-art { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #e4f2f8; }
.login-art img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }
.login-brand { position: relative; margin: 0; padding: 28px 24px; color: var(--el-color-primary); font-size: 18px; font-weight: 600; line-height: 1.5; }
.login-side { display: flex; flex-direction: column; align-items: center; min-width: 0; min-height: 0; overflow: auto; padding: clamp(24px,3.5vw,44px); background: var(--el-bg-color); }
.login-content { flex: 0 0 auto; width: 100%; max-width: 320px; margin-block: auto; }
.login-form { min-width: 0; }
.login-title { margin: 0 0 22px; color: var(--el-color-primary); font-size: 22px; font-weight: 600; line-height: 1.4; }
.login-form .el-form-item { margin-bottom: 14px; }
.login-form .el-input { --el-input-height: 42px; --el-input-font-size: 13px; --el-input-bg-color: #eaf2f6; --el-input-border-color: transparent; --el-input-hover-border-color: #8eb6c7; --el-input-focus-border-color: var(--el-color-primary); --el-input-text-color: #27627a; --el-input-placeholder-color: #4b7486; }
.login-submit { width: 144px; max-width: 100%; height: 40px; margin-top: 22px; }
.material-preview { display: flex; align-items: center; justify-content: center; width: 120px; height: 74px; overflow: hidden; background: var(--el-fill-color-light); border-radius: 3px; cursor: pointer; }
.material-preview img, .material-preview video { width: 100%; height: 100%; object-fit: contain; }
.material-drawer-preview { display: flex; justify-content: center; max-height: 400px; background: var(--el-fill-color-light); }
.material-drawer-preview img, .material-drawer-preview video { max-width: 100%; max-height: 400px; object-fit: contain; }
.material-drawer-name { margin: 20px 0; overflow-wrap: anywhere; font-weight: 600; }
.attachment-preview { width: 100%; height: 58vh; background: var(--el-fill-color-light); }
.attachment-preview img { width: 100%; height: 100%; object-fit: contain; }
.attachment-preview iframe { width: 100%; height: 100%; border: 0; }
@media(max-width:1200px) {
  .metric-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:960px) { .report-chart-grid { grid-template-columns: 1fr; } .content { padding: 16px; } }
@media(max-width:1100px) { .account-filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:760px) {
  .login-wrap { padding: 16px; }
  .login-panel { max-width: 420px; height: min(520px,100%); --el-card-border-radius: 12px; }
  .login-panel-grid { grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); }
  .login-art { background: var(--el-bg-color); }
  .login-art img { display: none; }
  .login-brand { padding: 24px 24px 0; font-size: 16px; }
  .login-side { padding: 24px; }
  .login-submit { width: 100%; }
}
@media(max-width:768px) {
  .side { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); transform: translateX(-100%); transition: transform 200ms ease-out; }
  .side.open { transform: translateX(0); }
  .side-mask { z-index: 19; display: block; position: fixed; inset: 0; border: 0; background: rgb(0 0 0 / 30%); }
  .mobile-menu-btn.el-button { display: inline-flex; margin: 0; }
  .content { padding: 12px; }
  .filter-card.el-card, .panel.el-card, .chart-card.el-card, .metric-card.el-card { --el-card-padding: 16px; }
  .search-form .el-form-item { display: flex; width: 100%; }
  .search-form .filter-control, .search-form .filter-date { width: 100%; }
  .search-form .el-form-item__content { min-width: 0; }
  .account-editor-grid { grid-template-columns: 1fr; }
  .panel-h .r { width: 100%; margin-left: 0; }
  .metric-value { font-size: 24px; }
  .chart-stage { height: 260px; }
  .table-actions .sp { display: none; }
  .el-pagination { max-width: 100%; overflow-x: auto; }
}
@media(max-width:520px) { .account-filter-grid, .metric-strip { grid-template-columns: 1fr; } }
@media(max-width:400px) {
  .login-side { padding: 20px; }
  .login-brand { padding-inline: 20px; }
}
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
