/* 前端后台管理面板 /admin —— 两栏布局：左 list + 右大内容区
 * 主题色紫玻璃 wash + 描边语言；纯玻璃折射，不用单线断色
 */

/* admin 页须满宽：脱离主题 640px 标准内容列，否则整块被挤到右侧且无法居中 */
.page-template-page-admin .wl-container,
.page-template-page-admin .wl-main {
  max-width: none;
  width: 100%;
}

.wl-admin {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 0 0 80px;
  color: var(--wl-ink, #1c1c1e);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  box-sizing: border-box;
}

/* 容器壳：背景透明，让 body mesh 透过 */
.wl-admin__shell {
  position: relative;
  padding: 18px 8px 0;
}

/* 顶部一行：标题 + 「管理员你好，编辑资料」，无任何分割线、无边线、无投影 */
.wl-admin__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 6px 14px 22px;
}
.wl-admin__title {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--wl-accent) 70%, #555);
}
.wl-admin__hello {
  font-size: 12px;
  color: #888;
}
.wl-admin__profile-link {
  color: var(--wl-accent);
  font-weight: 600;
  text-decoration: none;
  padding: 3px 9px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--wl-accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--wl-accent) 18%, transparent);
  margin-left: 4px;
  transition: background .15s;
}
.wl-admin__profile-link:hover {
  background: color-mix(in srgb, var(--wl-accent) 18%, transparent);
}

/* 两栏布局：左 list + 右 content */
.wl-admin__layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
@media (max-width: 880px) {
  .wl-admin__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
}

/* 左侧磁贴列 */
.wl-admin__nav {
  position: sticky;
  top: calc(var(--wl-navbar-h, 56px) + 16px);
}
@media (max-width: 880px) {
  .wl-admin__nav {
    position: static;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -8px;
    padding: 4px 8px;
  }
  .wl-admin__nav::-webkit-scrollbar { display: none; }
}

.wl-admin__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
@media (max-width: 880px) {
  .wl-admin__list {
    flex-direction: row;
    gap: 8px;
    flex-wrap: nowrap;
  }
}

.wl-admin__list-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  white-space: nowrap;
  background: color-mix(in srgb, var(--wl-accent) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--wl-accent) 12%, transparent);
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  transition:
    background .15s,
    border-color .15s,
    color .15s,
    transform .15s,
    box-shadow .15s;
  position: relative;
  font-family: inherit;
  user-select: none;
}
@media (max-width: 880px) {
  .wl-admin__list-item {
    flex: 0 0 auto;
    padding: 9px 12px;
  }
}

.wl-admin__list-item:hover {
  background: color-mix(in srgb, var(--wl-accent) 16%, transparent);
  border-color: color-mix(in srgb, var(--wl-accent) 30%, transparent);
  color: var(--wl-accent);
  transform: translateX(2px);
}
@media (max-width: 880px) {
  .wl-admin__list-item:hover { transform: none; }
}

.wl-admin__list-item.is-active {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--wl-accent) 18%, rgba(255,255,255,.78)),
    color-mix(in srgb, var(--wl-accent) 12%, rgba(255,255,255,.62)));
  border-color: color-mix(in srgb, var(--wl-accent) 38%, transparent);
  color: var(--wl-accent);
  box-shadow:
    0 6px 22px color-mix(in srgb, var(--wl-accent) 22%, transparent),
    inset 0 1px 0 rgba(255,255,255,.65);
}
/* 激活态左侧紫棒（macOS 设置风格） */
.wl-admin__list-item.is-active::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  border-radius: 99px;
  background: var(--wl-accent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--wl-accent) 80%, transparent);
}
@media (max-width: 880px) {
  .wl-admin__list-item.is-active::before { display: none; }
}

.wl-admin__list-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: color-mix(in srgb, var(--wl-accent) 60%, #888);
  flex-shrink: 0;
}
.wl-admin__list-icon svg {
  width: 18px;
  height: 18px;
}
.wl-admin__list-item:hover .wl-admin__list-icon,
.wl-admin__list-item.is-active .wl-admin__list-icon {
  color: var(--wl-accent);
}

.wl-admin__list-label { flex: 1; }
.wl-admin__list-soon {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(0,0,0,.06);
  color: #999;
  letter-spacing: .04em;
}
.wl-admin__list-item.is-soon {
  opacity: .55;
  cursor: default;
}
.wl-admin__list-item.is-soon:hover {
  transform: none;
  background: color-mix(in srgb, var(--wl-accent) 6%, transparent);
  border-color: color-mix(in srgb, var(--wl-accent) 12%, transparent);
  color: #555;
}

/* 旧 class 兼容（保留不报错，但不再被新 JS 渲染）*/
.wl-admin__top, .wl-admin__tabs, .wl-admin__tab, .wl-admin__tab-dot,
.wl-admin__tab-sep, .wl-admin__tab-coming,
.wl-admin__nav-sep, .wl-admin__nav-coming,
.wl-admin__nav-dot, .wl-admin__nav-item,
.wl-admin__nav h1 { display: none; }

/* ========= 右侧内容区 ========= */
.wl-admin__content {
  min-width: 0;
}
.wl-admin__panel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 22px; flex-wrap: wrap; gap: 12px;
}
.wl-admin__panel-head h2 { font-size: 26px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.wl-admin__panel-head p { margin: 0; color: #888; font-size: 13px; }

.wl-admin__grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 880px) { .wl-admin__grid { grid-template-columns: 1fr; } }

.wl-card {
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 18px;
  padding: 20px 22px;
  backdrop-filter: blur(10px);
}
.wl-card h3 { font-size: 15px; margin: 0 0 16px; font-weight: 600; }
.wl-field { margin-bottom: 18px; }
.wl-field:last-child { margin-bottom: 0; }
.wl-field > label { display: block; font-size: 13px; color: #555; margin-bottom: 8px; font-weight: 500; }
.wl-field .wl-hint { font-size: 11px; color: #aaa; margin-top: 6px; line-height: 1.5; }

/* 分段控制（强/克制/关闭） */
.wl-seg {
  display: flex; gap: 6px; background: rgba(0,0,0,.05);
  padding: 4px; border-radius: 12px;
}
.wl-seg button {
  flex: 1; border: none; background: transparent; padding: 9px 0;
  border-radius: 9px; font-size: 13px; color: #555; cursor: pointer;
  font-family: inherit; transition: all .15s;
}
.wl-seg button.is-active { background: linear-gradient(135deg, var(--wl-accent, #7f77dd), color-mix(in srgb, var(--wl-accent, #7f77dd) 70%, #6c63d0 30%)); color: #fff; font-weight: 600; box-shadow: 0 8px 22px color-mix(in srgb, var(--wl-accent, #7f77dd) 32%, transparent), inset 0 1px 0 rgba(255,255,255,.25); border: 1px solid color-mix(in srgb, var(--wl-accent, #7f77dd) 42%, transparent); }

/* 滑块 */
.wl-range { width: 100%; accent-color: var(--wl-accent, #ff8200); }
.wl-range-val { float: right; font-variant-numeric: tabular-nums; color: var(--wl-accent, #ff8200); font-weight: 600; }

/* 预设色块 */
.wl-mesh-row { display: flex; gap: 10px; }
.wl-mesh {
  width: 38px; height: 38px; border-radius: 11px; cursor: pointer;
  border: 2px solid transparent; transition: transform .12s;
}
.wl-mesh:hover { transform: scale(1.06); }
.wl-mesh.is-active { border-color: #111; box-shadow: 0 0 0 2px #fff inset; }

/* 每页覆盖表 */
.wl-perpage { width: 100%; border-collapse: collapse; }
.wl-perpage td { padding: 9px 4px; border-bottom: 1px solid rgba(0,0,0,.06); font-size: 13px; }
.wl-perpage td:first-child { color: #444; }
.wl-perpage select {
  font-family: inherit; font-size: 13px; padding: 6px 10px;
  border-radius: 9px; border: 1px solid rgba(0,0,0,.12); background: #fff; cursor: pointer;
}

/* 开关 */
.wl-switch { position: relative; width: 46px; height: 26px; display: inline-block; }
.wl-switch input { display: none; }
.wl-switch span {
  position: absolute; inset: 0; border-radius: 99px; background: rgba(0,0,0,.18);
  transition: background .2s; cursor: pointer;
}
.wl-switch span::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.wl-switch input:checked + span { background: var(--wl-accent, #ff8200); }
.wl-switch input:checked + span::after { transform: translateX(20px); }

/* 实时预览 iframe */
.wl-preview {
  position: sticky; top: calc(var(--wl-navbar-h, 56px) + 28px);
  border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 20px 50px rgba(0,0,0,.12);
  background: #fff;
}
.wl-preview iframe { width: 100%; height: 720px; border: none; display: block; }

.wl-admin__actions { display: flex; gap: 12px; margin-top: 22px; }
.wl-btn {
  font-family: inherit; font-size: 14px; padding: 11px 22px; border-radius: 12px;
  border: none; cursor: pointer; font-weight: 600; transition: all .15s;
}
.wl-btn--primary { background: var(--wl-accent, #ff8200); color: #fff; }
.wl-btn--primary:hover { filter: brightness(1.05); }
.wl-btn--primary:disabled { opacity: .5; cursor: default; }
.wl-btn--ghost { background: transparent; color: #666; border: 1px solid rgba(0,0,0,.15); }
.wl-btn--ghost:hover { background: rgba(0,0,0,.04); }

.wl-saved-tip {
  font-size: 13px; color: #1d9e75; opacity: 0; transition: opacity .3s; font-weight: 600;
}
.wl-saved-tip.show { opacity: 1; }

.wl-coming {
  color: #999; font-size: 14px; padding: 40px 0; text-align: center;
}

/* 主题色模块 */
.wl-theme-swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.wl-theme-swatch {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  cursor: pointer;
  border: 2px solid transparent;
  box-shadow: 0 4px 14px rgba(0,0,0,.10), inset 0 1px 0 rgba(255,255,255,.4);
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.wl-theme-swatch:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.16); }
.wl-theme-swatch.is-active {
  border-color: var(--wl-ink, #1c1c1e);
  box-shadow: 0 6px 20px rgba(0,0,0,.22);
}
.wl-theme-check {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0,0,0,.4);
}

/* 通用 line-only 自绘 SVG 图标（细描边，圆头） */
.wl-icon-line {
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -.125em;
}
