@font-face {
  font-family: "ZhuZiAWan";
  src: url("/assets/fonts/ZhuZiAWan2.woff2?v=1.9.8") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-main: "ZhuZiAWan", "Microsoft YaHei", Arial, sans-serif;
  --bg: #edf3f9;
  --panel: #edf3f9;
  --panel-soft: #f6f9fc;
  --panel-deep: #dfe8f1;
  --text: #172033;
  --muted: #66758a;
  --line: rgba(125, 145, 166, 0.24);
  --accent: #2f82ff;
  --accent-2: #32d6b0;
  --accent-3: #8a66ff;
  --danger: #ff5d7a;
  --shadow-raised: 14px 14px 30px rgba(153, 169, 188, 0.38), -14px -14px 28px rgba(255, 255, 255, 0.96);
  --shadow-soft: 9px 9px 20px rgba(153, 169, 188, 0.32), -9px -9px 18px rgba(255, 255, 255, 0.9);
  --shadow-inset: inset 7px 7px 16px rgba(153, 169, 188, 0.26), inset -7px -7px 16px rgba(255, 255, 255, 0.92);
}

:root[data-theme="dark"] {
  --bg: #07111f;
  --panel: #0b1728;
  --panel-soft: #101f34;
  --panel-deep: #07101d;
  --text: #e8f1ff;
  --muted: #7e90ab;
  --line: rgba(72, 112, 158, 0.28);
  --accent: #2f82ff;
  --accent-2: #22d3a6;
  --accent-3: #8b5cf6;
  --danger: #ff5d7a;
  --shadow-raised: 14px 14px 30px rgba(1, 6, 14, 0.72), -10px -10px 24px rgba(31, 54, 84, 0.34);
  --shadow-soft: 9px 9px 20px rgba(1, 6, 14, 0.58), -8px -8px 18px rgba(34, 59, 91, 0.28);
  --shadow-inset: inset 7px 7px 16px rgba(1, 6, 14, 0.62), inset -7px -7px 16px rgba(36, 63, 98, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  letter-spacing: 0;
}

body,
html {
  min-height: 100%;
}

#app {
  min-height: 100vh;
}

.login-page {
  display: grid;
  place-items: center;
  min-height: auto;
  padding: 34px;
  background: transparent;
}

.login-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 18%, rgba(47, 130, 255, 0.18), transparent 28%),
    radial-gradient(circle at 86% 72%, rgba(50, 214, 176, 0.16), transparent 30%),
    var(--bg);
}

.login-hero,
.login-panel,
.el-card {
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  background: var(--panel) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow-raised) !important;
}

.login-hero,
.login-panel {
  padding: 28px;
  margin: auto;
}

.login-hero {
  display: grid;
  min-height: 420px;
  align-content: space-between;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-brand strong,
.login-brand small {
  display: block;
}

.login-brand strong {
  font-size: 22px;
}

.login-brand small {
  margin-top: 4px;
  color: var(--muted);
}

.login-copy h1 {
  margin: 0 0 12px;
  font-size: 42px;
}

.login-copy p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.login-panel {
  width: min(440px, 100%);
}

.login-error {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 93, 122, 0.45);
  border-radius: 8px;
  color: var(--danger);
  background: rgba(255, 93, 122, 0.08);
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.login-form input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: var(--panel-deep);
  color: var(--text);
  font-family: var(--font-main);
  box-shadow: var(--shadow-inset);
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 10px;
}

.captcha-button {
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel-deep);
  cursor: pointer;
  box-shadow: var(--shadow-inset);
}

.captcha-button img {
  display: block;
  width: 100%;
  height: 100%;
}

.login-submit {
  height: 46px;
  margin-top: 6px;
}

.el-card__header {
  border-bottom: 1px solid var(--line) !important;
  color: var(--text);
  font-weight: 800;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.brand-mark,
.sider-logo em {
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: #fff;
  box-shadow: 0 10px 26px rgba(47, 130, 255, 0.34);
}

.brand-mark {
  width: 42px;
  height: 42px;
  font-size: 22px;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
}

#app > .admin-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

#app > .admin-layout > .admin-layout {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

.admin-sider {
  flex: 0 0 220px;
  min-height: 100vh;
  padding: 12px 10px;
  background: var(--panel-deep) !important;
  border-right: 1px solid var(--line);
  box-shadow: 10px 0 26px rgba(0, 0, 0, 0.22);
}

.admin-menu {
  border-right: 0 !important;
  background: transparent !important;
}

.admin-menu .el-menu-item {
  height: 44px;
  margin: 7px 2px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
}

.admin-menu .el-menu-item:hover,
.admin-menu .el-menu-item.is-active {
  background: var(--panel-soft);
  color: var(--text);
  box-shadow: var(--shadow-inset);
}

.admin-menu .el-menu-item.is-active {
  border-left: 3px solid var(--accent);
  color: var(--accent);
}

.sider-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 64px;
  padding: 0 8px 10px;
  color: var(--text);
  font-weight: 900;
}

.sider-logo em {
  width: 34px;
  height: 34px;
  font-style: normal;
}

.admin-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 78px;
  padding: 14px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.admin-header h1 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 20px;
}

.admin-content {
  flex: 1;
  min-width: 0;
  padding: 22px;
  overflow: auto;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
  /*max-width: 1180px;*/
}

.content-grid.three {
  grid-template-columns: 280px minmax(0, 1fr) 320px;
}

.full-row {
  grid-column: 1 / -1;
}

.stack {
  display: grid;
  gap: 14px;
}

.array-card,
.preview-box,
.file-card,
.case-list button,
.sort-list-item button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.array-card {
  padding: 14px;
}

.array-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.inline-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.inline-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.mini-program-box {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid rgba(47, 130, 255, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(47, 130, 255, 0.1), rgba(50, 214, 176, 0.08));
}

.section-title {
  margin-bottom: 10px;
  color: var(--text);
  font-weight: 900;
}

.case-list {
  display: grid;
  gap: 10px;
}

.case-list button,
.sort-list-item button {
  width: 100%;
  min-height: 58px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.case-list button.is-active,
.sort-list-item button.is-active {
  border-color: rgba(47, 130, 255, 0.68);
  background: linear-gradient(135deg, rgba(47, 130, 255, 0.24), rgba(34, 211, 166, 0.1));
  box-shadow: var(--shadow-inset);
}

.sort-list-item {
  display: grid;
  gap: 6px;
}

.sort-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.theme-switch {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-inset);
}

.theme-switch button {
  min-width: 54px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-main);
  cursor: pointer;
}

.theme-switch button.active {
  background: linear-gradient(135deg, var(--accent), #1f5eff);
  color: #fff;
  box-shadow: 0 8px 18px rgba(47, 130, 255, 0.28);
}

.preview-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
}

.preview-hero {
  min-height: 120px;
  border-radius: 8px;
  background: var(--preview-bg, linear-gradient(135deg, #071832, #1f5eff));
}

.image-preview,
.file-thumb {
  width: 180px;
  height: 120px;
  margin: 8px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: var(--panel-deep);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  box-shadow: var(--shadow-inset);
}

.image-preview.small {
  width: 96px;
  height: 96px;
}

.image-preview.tiny {
  width: 56px;
  height: 56px;
}

.image-preview.logo {
  width: 320px;
  height: 80px;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  /*max-width: 1180px;*/
}

.file-card {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.file-card b {
  word-break: break-all;
  font-size: 12px;
}

.file-thumb {
  width: 100%;
  margin: 0;
}

.file-doc {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.el-button,
.el-input__wrapper,
.el-textarea__inner,
.el-input-number,
.el-select__wrapper {
  font-family: var(--font-main) !important;
}

.el-button {
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  background: var(--panel) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow-soft) !important;
}

.el-button--primary {
  border-color: rgba(47, 130, 255, 0.75) !important;
  background: linear-gradient(135deg, var(--accent), #1f5eff) !important;
  color: #fff !important;
}

.el-button--danger {
  border-color: rgba(255, 93, 122, 0.55) !important;
  color: var(--danger) !important;
}

.el-button.is-block {
  width: 100%;
}

.el-button.is-dashed {
  border-style: dashed !important;
}

.el-input__wrapper,
.el-textarea__inner,
.el-select__wrapper {
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  background: var(--panel-deep) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow-inset) !important;
}

.el-input__inner,
.el-textarea__inner,
.el-select__placeholder,
.el-select__selected-item {
  color: var(--text) !important;
}

.el-form-item__label,
.el-statistic-title {
  color: var(--muted) !important;
  font-weight: 700;
}

.upload-widget {
  margin: 8px 0 12px;
}

.upload-widget .el-upload-list--picture-card .el-upload-list__item,
.upload-widget .el-upload--picture-card {
  width: 104px;
  height: 104px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-deep);
  box-shadow: var(--shadow-inset);
}

.upload-plus {
  color: var(--muted);
  font-size: 28px;
  line-height: 1;
}

.upload-tip {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.upload-progress {
  display: grid;
  gap: 6px;
  max-width: 520px;
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  box-shadow: var(--shadow-soft);
}

.upload-progress span {
  color: var(--muted);
  font-size: 12px;
}

.global-progress {
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-video {
  display: block;
  width: 100%;
  max-height: 280px;
  margin: 8px 0 12px;
  border-radius: 8px;
  background: #111827;
}

.el-statistic-lite {
  padding: 8px 0;
}

.el-statistic-value {
  margin-top: 8px;
  color: var(--text);
  font-size: 28px;
  font-weight: 900;
}

@media (max-width: 1000px) {
  #app > .admin-layout {
    display: block;
  }

  .admin-sider {
    min-height: auto;
  }

  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .login-page,
  .content-grid,
  .content-grid.three,
  .inline-two,
  .inline-three {
    grid-template-columns: 1fr;
  }

  .login-page {
    padding: 18px;
  }

  .login-hero {
    min-height: 260px;
  }
}