/* Shared light-blue theme for every admin route and teleported overlay. */
.app-shell { height: 100%; min-width: 0; }
.brand-mark, .sidebar-footer { display: none; }
.shell-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-left: 20px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: inherit; font-size: 20px; cursor: pointer; }
.shell-menu-toggle:hover { background: rgb(255 255 255 / 12%); }
.shell-menu-toggle:focus-visible, .user-chip:focus-visible { outline: 2px solid #8dbfff; outline-offset: 2px; }
.shell-breadcrumb { display: flex; align-items: center; margin-left: 16px; gap: 12px; font-size: 13px; }
.shell-breadcrumb > span { color: #c4d6f2; }
.topbar .user-chip { background: transparent; border: 0; color: white; font: inherit; font-size: 13px; }
.user-avatar { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; background: #d7e7ff; color: #28466d; border: 2px solid rgb(255 255 255 / 45%); border-radius: 50%; }
.nav-collapsed .sidebar { width: 0; padding: 0; overflow: hidden; visibility: hidden; }

.admin-theme {
  --admin-text: #172b50;
  --admin-muted: #617697;
  --admin-accent: #347cff;
  --admin-line: rgb(116 145 191 / 13%);
  --admin-shadow: 0 6px 22px rgb(43 82 143 / 7%);
  position: relative;
  isolation: isolate;
  color: var(--admin-text);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  background: radial-gradient(ellipse at 92% 10%, #fff5df 0, transparent 28%), radial-gradient(ellipse at 20% 28%, #a8d0f6 0, transparent 45%), linear-gradient(160deg, #acc8ec 0%, #d3e3f7 32%, #edf2fc 65%, #e2eafa 100%);
}
/* Static snow silhouettes are the asset-free fallback; no image requests. */
.admin-theme::before, .admin-theme::after { content: ""; position: absolute; pointer-events: none; left: 245px; right: 0; top: 60px; height: 390px; z-index: -1; }
.admin-theme::before { background: linear-gradient(165deg, #f9fcff 2%, #a8c2e1 40%, rgb(227 237 250 / 20%) 90%); clip-path: polygon(0 49%, 4% 40%, 9% 44%, 16% 25%, 20% 34%, 25% 20%, 30% 30%, 38% 9%, 42% 20%, 45% 14%, 52% 38%, 59% 29%, 66% 43%, 72% 35%, 80% 53%, 90% 42%, 100% 57%, 100% 100%, 0 100%); opacity: .8; }
.admin-theme::after { background: linear-gradient(155deg, rgb(255 255 255 / 90%), rgb(220 234 251 / 30%)); clip-path: polygon(16% 25%, 20% 34%, 18% 33%, 16% 30%, 12% 43%, 25% 20%, 30% 30%, 27% 28%, 25% 25%, 22% 36%, 38% 9%, 42% 20%, 40% 19%, 38% 15%, 35% 31%, 45% 14%, 52% 38%, 47% 29%, 45% 21%, 43% 31%, 59% 29%, 66% 43%, 60% 36%, 57% 41%, 72% 35%, 80% 53%, 73% 42%, 69% 48%, 100% 70%, 100% 100%, 0 100%, 0 70%); opacity: .55; }
.admin-theme .topbar { height: 54px; padding: 0 24px 0 0; background: linear-gradient(105deg, rgb(34 60 98 / 96%) 0 245px, rgb(43 91 163 / 82%) 245px, rgb(81 132 212 / 60%) 67%, rgb(153 166 207 / 40%)); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid rgb(255 255 255 / 18%); }
.admin-theme .topbar .brand { display: flex; align-items: center; gap: 12px; width: 245px; flex-shrink: 0; padding-left: 24px; font-size: 16px; letter-spacing: 0; }
.admin-theme .brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 34px; flex-shrink: 0; border-radius: 9px; background: linear-gradient(145deg, #246dff, #40c5fa); box-shadow: 0 3px 14px rgb(34 112 246 / 30%); font-size: 26px; }
.admin-theme .shell-breadcrumb { padding-left: 20px; border-left: 1px solid rgb(255 255 255 / 24%); font-weight: 600; }
.admin-theme .shell-breadcrumb > span { font-weight: 400; }
.admin-theme .layout { height: calc(100% - 54px); min-width: 0; }
.admin-theme .sidebar { display: flex; flex-direction: column; position: relative; width: 245px; padding: 16px 10px; color: #d5e3f7; background: linear-gradient(180deg, rgb(26 48 81 / 96%), rgb(34 55 89 / 94%)); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.admin-theme .sidebar .nav-item, .admin-theme .sidebar .nav-group-toggle { height: 46px; gap: 14px; padding: 0 16px; border-radius: 9px; font-size: 14px; transition: background-color 180ms, box-shadow 180ms, color 180ms; }
.admin-theme .sidebar .nav-group-toggle { margin-top: 4px; }
.admin-theme .sidebar .el-icon { font-size: 19px; flex-shrink: 0; }
.admin-theme .sidebar .nav-item.active { border-left: 3px solid #49b3ff; background: linear-gradient(100deg, rgb(45 125 247 / 66%), rgb(123 163 227 / 32%)); color: white; box-shadow: inset 0 0 0 1px rgb(135 186 255 / 36%), 0 4px 16px rgb(16 92 197 / 14%); }
.admin-theme .sidebar .nav-child { font-size: 13px; padding-left: 40px; height: 42px; font-weight: 400; }
.admin-theme .sidebar .nav-child .el-icon { font-size: 16px; }
.admin-theme .sidebar-footer { position: relative; display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding: 140px 18px 10px; flex-shrink: 0; color: #9eb1cf; font-size: 12px; overflow: hidden; }
.admin-theme .sidebar-footer small { font-size: 11px; opacity: .72; }
.film-decoration { position: absolute; width: 180px; height: 180px; top: -4px; left: -12px; border-radius: 50%; border: 12px double rgb(136 174 230 / 8%); transform: rotate(-24deg) scaleY(.7); background: radial-gradient(circle at 50% 22%, transparent 12%, rgb(137 176 234 / 7%) 13%, transparent 20%), radial-gradient(circle at 22% 56%, transparent 12%, rgb(137 176 234 / 7%) 13%, transparent 20%), radial-gradient(circle at 75% 62%, transparent 12%, rgb(137 176 234 / 7%) 13%, transparent 20%); box-shadow: 0 0 0 8px rgb(135 174 232 / 3%); pointer-events: none; }
.admin-theme.nav-collapsed .sidebar { width: 0; padding: 0; }
.admin-theme .main { min-width: 0; padding: 24px; background: linear-gradient(180deg, rgb(243 247 255 / 10%), rgb(243 247 255 / 72%) 470px); }

/* Body tokens also reach Element Plus dialogs/selects teleported outside the shell. */
body.admin-theme-active {
  --el-color-primary: #347cff;
  --el-color-primary-light-3: #71a4ff;
  --el-color-primary-light-5: #9bbfff;
  --el-color-primary-light-7: #c2d8ff;
  --el-color-primary-light-8: #d8e6ff;
  --el-color-primary-light-9: #edf4ff;
  --el-color-primary-dark-2: #2360ce;
  --el-text-color-primary: #172b50;
  --el-text-color-regular: #405b80;
  --el-text-color-secondary: #617697;
  --el-text-color-placeholder: #7b90af;
  --el-border-color: #d1def1;
  --el-border-color-light: #dfe8f6;
  --el-border-color-lighter: #e8eef8;
  --el-fill-color: #e8f0fc;
  --el-fill-color-light: #eff5fe;
  --el-fill-color-lighter: #f5f8ff;
  --el-fill-color-blank: #f9fbff;
  --el-bg-color: #f7faff;
  --el-bg-color-overlay: #f7faff;
  --el-border-radius-base: 9px;
  --el-box-shadow-light: 0 6px 22px rgb(43 82 143 / 10%);
  --el-box-shadow: 0 12px 36px rgb(43 82 143 / 16%);
  color: #172b50;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
}
.admin-theme .module-main > :first-child { min-width: 0; padding: 20px; border: 1px solid rgb(255 255 255 / 80%); border-radius: 16px; background: rgb(255 255 255 / 73%); box-shadow: var(--admin-shadow); }
.admin-theme .main h2 { color: var(--admin-text); font-size: 24px; font-weight: 700; line-height: 1.35; margin: 0 0 14px; letter-spacing: -.5px; }
.admin-theme .main .page-title { gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-theme .main .page-title h2 { margin: 0; }
.admin-theme .module-main .page-title > div { min-width: 0; }
.admin-theme .muted { color: var(--admin-muted); line-height: 1.6; }
.admin-theme .module-main .panel { padding: 16px; margin-bottom: 16px; border: 1px solid rgb(220 232 250 / 80%); border-radius: 14px; background: rgb(247 251 255 / 70%); box-shadow: 0 3px 12px rgb(43 82 143 / 4%); min-width: 0; }
.admin-theme .module-main .panel-title { color: var(--admin-text); font-size: 15px; }
.admin-theme .module-main .el-table {
  --el-table-header-bg-color: #eaf2ff;
  --el-table-tr-bg-color: rgb(255 255 255 / 78%);
  --el-table-bg-color: #f7faff;
  --el-table-border-color: #e1eaf8;
  --el-table-row-hover-bg-color: #edf4ff;
  --el-table-current-row-bg-color: #e6f0ff;
  --el-table-text-color: #405b80;
  --el-table-header-text-color: #526b91;
  font-size: 13px;
  border: 1px solid #e1eaf8;
  border-radius: 12px;
}
.admin-theme .module-main .el-table th.el-table__cell { font-weight: 600; padding: 12px 0; }
.admin-theme .module-main .el-table td.el-table__cell { padding: 10px 0; }
.admin-theme-active .el-button { border-radius: 9px; font-weight: 500; }
.admin-theme-active .el-button:not(.is-link):not(.is-text):not(.is-disabled):hover { box-shadow: 0 3px 10px rgb(52 124 255 / 10%); }
.admin-theme-active .el-button--primary:not(.is-plain):not(.is-link):not(.is-text) { box-shadow: 0 3px 10px rgb(52 124 255 / 16%); }
.admin-theme-active .el-button.is-disabled { box-shadow: none; }
.admin-theme-active .el-button.is-link { border-radius: 4px; }
.admin-theme-active .el-input__wrapper, .admin-theme-active .el-select__wrapper, .admin-theme-active .el-textarea__inner { background: rgb(255 255 255 / 92%); border-radius: 9px; }
.admin-theme-active .el-form-item__label { color: #405b80; font-weight: 500; }
.admin-theme-active .el-form-item__content { min-width: 0; }
.admin-theme-active .el-input-number { max-width: 100%; }
.admin-theme .module-main :is(.el-input, .el-select, .el-date-editor) { max-width: 100%; }
.admin-theme-active .el-tag { border-radius: 6px; }
.admin-theme .module-main .el-tabs__header { margin-bottom: 20px; }
.admin-theme .module-main .el-tabs__nav-wrap::after { background: #dfe9f8; height: 1px; }
.admin-theme .module-main .el-tabs__item { font-weight: 500; }
.admin-theme .module-main .el-pagination { padding-top: 16px; }
.admin-theme .module-main .el-pagination .el-input { --el-input-bg-color: #fff; }
.admin-theme-active .el-dialog, .admin-theme-active .el-message-box { max-width: calc(100vw - 32px); border: 1px solid rgb(255 255 255 / 90%); border-radius: 16px; background: linear-gradient(150deg, #fafdff, #f0f6ff); box-shadow: 0 18px 60px rgb(33 65 118 / 20%); }
/* Message boxes use width:100% upstream; retain their component width cap. */
.admin-theme-active .el-message-box { max-width: min(var(--el-messagebox-width, 420px), calc(100vw - 32px)); }
.admin-theme-active .el-dialog { display: flex; flex-direction: column; padding: 24px; margin-top: min(var(--el-dialog-margin-top, 15vh), 48px); max-height: calc(100dvh - 96px); }
.admin-theme-active .el-dialog__header { padding-bottom: 16px; border-bottom: 1px solid #dfe9f8; margin-bottom: 20px; }
.admin-theme-active .el-dialog__title, .admin-theme-active .el-drawer__title { color: #172b50; font-size: 18px; font-weight: 600; }
.admin-theme-active .el-dialog__footer { border-top: 1px solid #dfe9f8; padding-top: 16px; margin-top: 20px; }
.admin-theme-active .el-dialog__body { min-height: 0; overflow: auto; overflow-wrap: anywhere; }
.admin-theme-active .el-dialog__header, .admin-theme-active .el-dialog__footer { flex-shrink: 0; }
.admin-theme-active .el-overlay { background-color: rgb(26 48 81 / 32%); }
.admin-theme-active .el-drawer { max-width: 100vw; background: linear-gradient(150deg, #fafdff, #eef5ff); border-left: 1px solid #d8e5fa; box-shadow: -12px 0 40px rgb(33 65 118 / 15%); transition: transform 180ms ease, opacity 180ms ease; }
.admin-theme-active .el-drawer__header { padding-bottom: 16px; border-bottom: 1px solid #dfe9f8; margin-bottom: 0; }
.admin-theme-active .el-popper.is-light { border: 1px solid #dce7f8; border-radius: 10px; box-shadow: 0 8px 28px rgb(43 82 143 / 12%); }
.admin-theme-active .el-select-dropdown__item.is-hovering, .admin-theme-active .el-dropdown-menu__item:not(.is-disabled):hover { background: #e9f2ff; }
.admin-theme-active .el-empty { --el-empty-fill-color-1: #e5f0ff; --el-empty-fill-color-2: #d9eaff; --el-empty-fill-color-3: #f0f7ff; --el-empty-fill-color-4: #d3e5ff; --el-empty-fill-color-5: #ecf4ff; --el-empty-fill-color-6: #c9dfff; --el-empty-fill-color-7: #dbeaff; --el-empty-fill-color-8: #c4dcff; --el-empty-fill-color-9: #b8d3fa; }
.admin-theme .main .json-view { background: #eaf2fe; color: #304d78; border: 1px solid #d5e3f8; border-radius: 12px; }
.admin-theme .floor-item, .admin-theme .pit-card { border-color: #dce7f8; background: rgb(255 255 255 / 85%); border-radius: 10px; }
.admin-theme .floor-item.active { border-color: #7aaaff; box-shadow: 0 0 0 2px rgb(52 124 255 / 12%); }
.admin-theme .channel-chip { border-radius: 9px; border-color: #d1def1; color: #405b80; }
.admin-theme .channel-chip.active { background: #347cff; border-color: #347cff; color: white; }
.admin-theme .module-main .editor-grid { grid-template-columns: minmax(190px, .75fr) minmax(260px, 1fr) minmax(300px, 1.5fr); }
.admin-theme-active .login-wrap { padding: 24px; background: radial-gradient(ellipse at 85% 15%, #fff4dc, transparent 35%), radial-gradient(ellipse at 15% 20%, #a5cff7, transparent 55%), linear-gradient(150deg, #bfd6f2, #edf3ff); }
.admin-theme-active .login-card { width: 390px; max-width: 100%; border: 1px solid rgb(255 255 255 / 85%); border-radius: 18px; background: rgb(255 255 255 / 78%); box-shadow: 0 14px 48px rgb(43 82 143 / 14%); }
.admin-theme-active .login-title { color: #172b50; margin-bottom: 24px; }
@media (max-width: 1500px) {
  .admin-theme .module-main .editor-grid { grid-template-columns: minmax(190px, .75fr) minmax(260px, 1.25fr); }
  .admin-theme .module-main .editor-preview-col { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .admin-theme .module-main > :first-child { padding: 14px; }
  .admin-theme .module-main > :first-child > div { min-width: 0; flex-wrap: wrap; }
  .admin-theme .module-main .editor-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-theme-active .el-drawer.rtl { width: 100% !important; }
  .admin-theme-active .el-dialog { padding: 18px; }
  .admin-theme-active .el-dialog__body { max-height: 65vh; overflow-y: auto; }
  .admin-theme-active .login-card { padding: 28px 24px; }
}

@media (max-width: 900px) {
  .admin-theme .sidebar { width: 72px; padding: 12px 6px; }
  .admin-theme .sidebar .nav-label, .admin-theme .nav-group-toggle > span, .admin-theme .sidebar-footer { display: none; }
  .admin-theme .sidebar .nav-group-toggle, .admin-theme .sidebar .nav-item, .admin-theme .sidebar .nav-child { padding: 0; justify-content: center; }
  .admin-theme .topbar .brand { width: 72px; padding-left: 20px; font-size: 0; }
  .admin-theme .topbar { padding-right: 12px; }
  .admin-theme .main { padding: 18px; }
  .admin-theme::before, .admin-theme::after { left: 72px; }
  .admin-theme .shell-breadcrumb { margin-left: 8px; padding-left: 12px; }
  .admin-theme .shell-menu-toggle { margin-left: 8px; }
}
@media (max-width: 560px) {
  .admin-theme .main { padding: 14px 12px; }
  .admin-theme .shell-breadcrumb { display: none; }
  .admin-theme .user-chip { gap: 6px; font-size: 11px; }
  .admin-theme .user-avatar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .admin-theme-active *, .admin-theme-active *::before, .admin-theme-active *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
