/*
 * admin-schools.html 页面专属样式（P-Refactor：由页内 5 个 <style> 块合并抽出）。
 * 顺序与原内联块保持一致：Popover 弹层 → 侧边栏/主区布局 → 主题预设 → glass-table 等。
 */
      /* 登录样式 · 图形化编辑模式（DS-LOGIN-GRAPHIC） */
      #loginStylePreview.ls-graphical .ls-card { cursor: move; outline: 2px dashed rgba(99,102,241,.55); outline-offset: 4px; transition: outline-color .15s ease; }
      #loginStylePreview.ls-graphical .ls-card:hover { outline-color: rgba(99,102,241,.9); }
      #loginStylePreview.ls-graphical [data-ls-edit] { cursor: text; border-radius: 4px; transition: background .15s ease, box-shadow .15s ease; }
      #loginStylePreview.ls-graphical [data-ls-edit]:hover { background: rgba(99,102,241,.10); box-shadow: 0 0 0 2px rgba(99,102,241,.25); }
      #loginStylePreview.ls-graphical [data-ls-edit].ls-editing { background: #fff; box-shadow: 0 0 0 2px #6366f1; cursor: text; }
      #loginStylePreview.ls-graphical .ls-resize-handle { position: absolute; top: 0; right: -6px; width: 12px; height: 100%; cursor: ew-resize; border-radius: 6px; }
      #loginStylePreview.ls-graphical .ls-resize-handle::after { content: ""; position: absolute; top: 50%; right: 4px; transform: translateY(-50%); width: 4px; height: 40px; border-radius: 4px; background: rgba(99,102,241,.85); }
      /* ====== 统一编辑弹层（字段规则 / 类型统计）====== */
      .sc-popover{background:#fff;border:1px solid #e5e7eb;border-radius:14px;box-shadow:0 12px 32px rgba(0,0,0,.16);padding:14px;}
      /* TD-PopoverAutoSize: 字段管理弹窗宽度按视口自适应（由 JS 在打开时设置 --sp-width）；
         内部 padding / gap 跟随宽度调整（窄屏紧凑、宽屏舒展），避免内容紧密堆叠。 */
      .sc-popover--auto {
          width: var(--sp-width, 540px);
          min-width: 360px;
          max-width: min(96vw, 800px);
          padding: clamp(12px, 1.2vw, 20px);
      }
      .sc-popover--auto .tree-card { padding: clamp(8px, 0.8vw, 14px); }
      .sc-popover--auto .tree-card .flex.items-center.gap-2 { gap: clamp(6px, 0.6vw, 10px); }
      .sc-popover--auto #spTreeList { gap: clamp(6px, 0.6vw, 10px); }
      .sc-popover--auto .sp-child-chip { padding: clamp(4px, 0.4vw, 8px) clamp(6px, 0.6vw, 12px); }
      /* 大屏（>1200px）进一步放松间距，让选项不再紧密；窄屏保持紧凑以容纳更多内容 */
      @media (min-width: 1200px) {
          .sc-popover--auto { padding: 18px 22px; }
          .sc-popover--auto #spTreeList { gap: 10px; }
          .sc-popover--auto .tree-card { padding: 14px; }
          .sc-popover--auto .tree-card .flex.items-center.gap-2 { gap: 10px; }
          .sc-popover--auto input.tree-value,
          .sc-popover--auto input.tree-label { padding: 8px 12px; }
          .sc-popover--auto .sp-child-chip { padding: 6px 10px; font-size: 12.5px; }
      }
      /* 极窄屏：退化为通栏弹窗，宽度几乎占满视口 */
      @media (max-width: 640px) {
          .sc-popover--auto { width: calc(100vw - 16px) !important; min-width: 0; }
      }
      /* ====== P-Sidebar: 平台超管控制台 — 左侧功能菜单 + 主区多视图布局 ======
         - 两栏布局：固定宽侧栏 240px（可折叠到 64px 仅图标），主区自适应；
         - 玻璃深色：与现有顶部 nav 视觉一致；
         - 移动端 (<1024px)：侧栏整体可被收纳，默认图标态 + 浮层 nav；
         - P-ReportsFill / P-WidthFill：max-width 放宽到 2000px（不再 1280px 限制），
           让所有视图在大屏（1920~2400px）下都能舒展展开，窄屏（<1400px）保持单列合理留白。
           各视图内部的 .container mx-auto max-w-7xl 会自动把内容限定在 1280px 内做阅读舒适度，
           但工具栏/KPI 卡/侧栏可以更宽。 */
      .admin-layout {
          display: flex;
          gap: 20px;
          max-width: 2000px;
          margin: 0 auto;
          padding: 20px 16px;
          align-items: flex-start;
      }
      .admin-sidebar {
          position: sticky;
          top: 80px;
          width: 240px;
          flex-shrink: 0;
          background: rgba(255, 255, 255, 0.55);
          backdrop-filter: blur(14px) saturate(150%);
          -webkit-backdrop-filter: blur(14px) saturate(150%);
          border-radius: 18px;
          box-shadow: 0 6px 22px rgba(30, 44, 80, 0.10);
          padding: 16px 12px;
          max-height: calc(100vh - 100px);
          overflow-y: auto;
          transition: width 0.25s ease, padding 0.25s ease;
      }
      .admin-sidebar__brand {
          display: flex;
          align-items: center;
          gap: 10px;
          padding: 6px 6px 14px 6px;
          border-bottom: 1px solid rgba(30, 44, 80, 0.08);
          margin-bottom: 12px;
      }
      .admin-sidebar__brand-icon {
          width: 36px; height: 36px;
          border-radius: 10px;
          background: linear-gradient(135deg, rgba(59, 130, 246, 0.85), rgba(99, 102, 241, 0.85));
          display: flex; align-items: center; justify-content: center;
          color: #fff; font-size: 16px;
          box-shadow: 0 2px 8px rgba(59, 130, 246, 0.28);
      }
      .admin-sidebar__brand-text {
          font-weight: 700;
          color: #1f2937;
          font-size: 14px;
          flex: 1;
          white-space: nowrap;
          overflow: hidden;
      }
      .admin-sidebar__collapse-btn {
          width: 28px; height: 28px;
          border-radius: 8px;
          border: none;
          background: rgba(0, 0, 0, 0.04);
          color: #6b7280;
          cursor: pointer;
          transition: background 0.15s;
          flex-shrink: 0;
      }
      .admin-sidebar__collapse-btn:hover { background: rgba(0, 0, 0, 0.08); }
      .admin-sidebar__nav {
          display: flex;
          flex-direction: column;
          gap: 4px;
      }
      .admin-sidebar__item {
          display: flex;
          align-items: center;
          gap: 12px;
          padding: 10px 12px;
          border-radius: 10px;
          border: none;
          background: transparent;
          color: #374151;
          font-size: 14px;
          cursor: pointer;
          text-align: left;
          transition: background 0.15s, color 0.15s, transform 0.1s;
          width: 100%;
          white-space: nowrap;
          overflow: hidden;
      }
      .admin-sidebar__item:hover {
          background: rgba(59, 130, 246, 0.08);
          color: #1e40af;
      }
      .admin-sidebar__item.active {
          background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(99, 102, 241, 0.12));
          color: #1e3a8a;
          font-weight: 600;
          box-shadow: inset 3px 0 0 #3b82f6;
      }
      .admin-sidebar__item i {
          width: 20px;
          text-align: center;
          font-size: 15px;
          flex-shrink: 0;
      }
      .admin-sidebar__item-label {
          flex: 1;
          overflow: hidden;
          text-overflow: ellipsis;
      }
      .admin-sidebar__badge {
          background: #ef4444;
          color: #fff;
          font-size: 11px;
          padding: 1px 7px;
          border-radius: 10px;
          font-weight: 600;
          min-width: 20px;
          text-align: center;
      }
      .admin-sidebar__chevron {
          width: 16px;
          text-align: center;
          font-size: 11px;
          color: #9ca3af;
          transition: transform 0.18s;
          flex-shrink: 0;
      }
      .admin-sidebar__item.expanded .admin-sidebar__chevron { transform: rotate(90deg); color: #1e3a8a; }
      /* ====== 二级菜单（subnav）====== */
      .admin-sidebar__subnav {
          display: none;                 /* 默认收起；切换一级菜单时由 JS 控制 */
          flex-direction: column;
          gap: 2px;
          padding: 4px 0 6px 12px;
          border-left: 1px dashed rgba(30, 44, 80, 0.12);
          margin: 2px 10px 4px 22px;
      }
      .admin-sidebar__subnav.expanded { display: flex; }
      .admin-sidebar__subitem {
          display: flex;
          align-items: center;
          gap: 8px;
          padding: 7px 10px;
          border-radius: 8px;
          border: none;
          background: transparent;
          color: #4b5563;
          font-size: 13px;
          cursor: pointer;
          text-align: left;
          transition: background 0.15s, color 0.15s;
          width: 100%;
          white-space: nowrap;
          overflow: hidden;
      }
      .admin-sidebar__subitem:hover {
          background: rgba(59, 130, 246, 0.08);
          color: #1e40af;
      }
      .admin-sidebar__subitem.active {
          background: rgba(59, 130, 246, 0.12);
          color: #1e3a8a;
          font-weight: 600;
      }
      .admin-sidebar__subitem i { width: 16px; text-align: center; font-size: 12px; flex-shrink: 0; }
      .admin-sidebar__subitem-label {
          overflow: hidden; text-overflow: ellipsis; flex: 1;
      }
      /* 学校分组标题：分隔「当前学校」配置项 */
      .admin-sidebar__group-title {
          font-size: 10px;
          font-weight: 700;
          color: #9ca3af;
          text-transform: uppercase;
          letter-spacing: 0.05em;
          padding: 10px 10px 4px 10px;
          display: flex; align-items: center; gap: 6px;
          white-space: nowrap;
          overflow: hidden;
      }
      .admin-sidebar__group-title .code {
          color: #1e3a8a;
          font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
          font-size: 11px;
          letter-spacing: 0;
          background: rgba(59, 130, 246, 0.10);
          padding: 1px 6px;
          border-radius: 5px;
          text-transform: none;
      }
      .admin-sidebar__group-title .close-school {
          margin-left: auto;
          width: 18px; height: 18px;
          display: flex; align-items: center; justify-content: center;
          border-radius: 5px;
          border: none; background: transparent;
          color: #9ca3af; cursor: pointer; font-size: 11px;
      }
      .admin-sidebar__group-title .close-school:hover { background: rgba(239, 68, 68, 0.10); color: #dc2626; }
      .admin-sidebar__footer {
          margin-top: 16px;
          padding-top: 12px;
          border-top: 1px dashed rgba(30, 44, 80, 0.10);
          color: #9ca3af;
          font-size: 11px;
          line-height: 1.5;
      }
      /* 折叠态（仅图标） */
      .admin-sidebar.collapsed {
          width: 68px;
          padding: 16px 8px;
      }
      .admin-sidebar.collapsed .admin-sidebar__brand-text,
      .admin-sidebar.collapsed .admin-sidebar__item-label,
      .admin-sidebar.collapsed .admin-sidebar__footer,
      .admin-sidebar.collapsed .admin-sidebar__badge,
      .admin-sidebar.collapsed .admin-sidebar__chevron,
      .admin-sidebar.collapsed .admin-sidebar__subnav,
      .admin-sidebar.collapsed .admin-sidebar__group-title {
          display: none;
      }
      .admin-sidebar.collapsed .admin-sidebar__item {
          justify-content: center;
          gap: 0;
          padding: 12px 0;
      }
      .admin-sidebar.collapsed .admin-sidebar__brand {
          justify-content: center;
      }
      /* 折叠态下 hover/展开时，二级菜单以浮层形式出现在右侧 */
      .admin-sidebar.collapsed .admin-sidebar__item.has-subnav {
          position: relative;
      }
      .admin-sidebar.collapsed .admin-sidebar__item.has-subnav:hover .admin-sidebar__subnav,
      .admin-sidebar.collapsed .admin-sidebar__item.has-subnav.expanded .admin-sidebar__subnav {
          display: flex;
          position: absolute;
          left: calc(100% + 6px);
          top: 0;
          margin: 0;
          padding: 6px 6px 6px 14px;
          width: 200px;
          background: rgba(255, 255, 255, 0.96);
          backdrop-filter: blur(10px);
          box-shadow: 0 6px 22px rgba(30, 44, 80, 0.15);
          border-radius: 12px;
          border-left: 1px solid rgba(30, 44, 80, 0.10);
          z-index: 50;
      }
      .admin-main {
          flex: 1;
          min-width: 0;  /* 重要：让 flex item 在内容超长时允许截断而非撑爆父容器 */
      }
      .admin-view { display: block; }
      .admin-view.hidden { display: none; }
      /* 平台总览 / 跳转卡 — 视觉一致的大卡片 */
      .admin-kpi-grid {
          display: grid;
          grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
          gap: 16px;
          margin-bottom: 20px;
      }
      .admin-kpi-card {
          background: rgba(255, 255, 255, 0.65);
          backdrop-filter: blur(10px);
          -webkit-backdrop-filter: blur(10px);
          border-radius: 16px;
          padding: 18px;
          box-shadow: 0 4px 14px rgba(30, 44, 80, 0.08);
          border: 1px solid rgba(255, 255, 255, 0.5);
      }
      .admin-kpi-label {
          font-size: 12px;
          color: #6b7280;
          margin-bottom: 6px;
      }
      .admin-kpi-value {
          font-size: 28px;
          font-weight: 700;
          color: #1f2937;
          line-height: 1.1;
      }
      .admin-kpi-sub {
          font-size: 12px;
          color: #9ca3af;
          margin-top: 4px;
      }
      .admin-card {
          background: rgba(255, 255, 255, 0.65);
          backdrop-filter: blur(10px);
          -webkit-backdrop-filter: blur(10px);
          border-radius: 18px;
          padding: 20px;
          box-shadow: 0 6px 18px rgba(30, 44, 80, 0.08);
          margin-bottom: 16px;
          /* 创建新的 stacking context，防止内部按钮被外部 fixed 元素（浏览器扩展等）遮挡 */
          isolation: isolate;
      }
      /* FIX: 表格操作列按钮在全宽大屏下被遮挡无法点击
         原因：backdrop-filter 劫持了 fixed 元素的包含块 + 浏览器扩展注入的 fixed 覆盖层
         方案：给表格容器和每个操作按钮创建独立 stacking context 并提升层级 */
      .admin-card .overflow-x-auto {
          position: relative;
          z-index: 1;
      }
      .admin-card table {
          position: relative;
          z-index: 2;
      }
      /* 操作列 td 内的按钮：强制提升到最上层 stacking context */
      .admin-card td:last-child,
      .admin-card td:has(> button[data-act]) {
          position: relative;
          z-index: 10;
      }
      .admin-card button[data-act],
      .admin-card button[data-sa-act] {
          position: relative;
          z-index: 100;
          pointer-events: auto !important;
      }
      .admin-card h3 {
          font-size: 16px;
          font-weight: 700;
          color: #1f2937;
          margin-bottom: 12px;
          display: flex; align-items: center; gap: 8px;
      }
      .admin-link-card {
          display: flex; align-items: center; gap: 14px;
          padding: 14px 16px;
          border-radius: 12px;
          background: rgba(255, 255, 255, 0.55);
          text-decoration: none;
          color: inherit;
          transition: background 0.15s, transform 0.1s;
          border: 1px solid rgba(59, 130, 246, 0.18);
      }
      .admin-link-card:hover { background: rgba(59, 130, 246, 0.08); transform: translateX(2px); }
      .admin-link-card .icon {
          width: 44px; height: 44px;
          border-radius: 12px;
          display: flex; align-items: center; justify-content: center;
          color: #fff;
          font-size: 18px;
          flex-shrink: 0;
      }
      .admin-link-card .meta { flex: 1; }
      .admin-link-card .title { font-weight: 600; color: #1f2937; }
      .admin-link-card .desc { font-size: 12px; color: #6b7280; margin-top: 2px; }
      .admin-link-card .arrow { color: #9ca3af; }
      /* 单点备份：学校选择卡片 — 与恢复管理「目标学校」完全一致的视觉规格 */
      .single-school-card {
          display: flex;
          align-items: center;
          gap: 0.5rem;
          width: 100%;
          padding: 0.625rem 0.75rem;
          border-radius: 0.5rem;
          border: 1px solid #e5e7eb;
          background: #ffffff;
          transition: all .15s ease;
          cursor: pointer;
          text-align: left;
      }
      .single-school-card:hover { border-color: #93c5fd; background: #eff6ff; }
      .single-school-card.active { border-color: #3b82f6; background: #eff6ff; box-shadow: 0 0 0 2px #bfdbfe; }
      .single-school-radio {
          width: 0.875rem;
          height: 0.875rem;
          border-color: #d1d5db;
          color: #3b82f6;
          accent-color: #3b82f6;
          flex-shrink: 0;
          margin: 0;
      }
      .single-school-card .title { font-size: 0.75rem; font-weight: 600; color: #374151; line-height: 1.25; }
      .single-school-card .code { font-size: 0.625rem; color: #6b7280; margin-top: 1px; }
      /* ====== 恢复管理：源切换 / 备份可选行 / 上传 drop 高亮 ====== */
      .restore-source-tab {
          background: rgba(255,255,255,0.6);
          color: #4b5563;
          transition: background 0.15s, color 0.15s;
      }
      .restore-source-tab:hover { background: rgba(243,244,246,0.9); }
      .restore-source-tab.active {
          background: linear-gradient(135deg, #3b82f6, #1d4ed8);
          color: #fff;
          font-weight: 500;
      }
      .restore-source-tab.active i { color: #fff; }
      .restore-source-pane { animation: fadeIn 0.18s ease; }
      @keyframes fadeIn { from { opacity: 0; transform: translateY(2px);} to { opacity: 1; transform: none;} }
      /* 可选备份行：单选按钮风格 + hover/选中态 */
      #bkRestoreList tr.is-selectable { cursor: pointer; }
      #bkRestoreList tr.is-selected {
          background: linear-gradient(90deg, rgba(59,130,246,0.06), rgba(59,130,246,0.12)) !important;
          box-shadow: inset 3px 0 0 #3b82f6;
      }
      #bkRestoreList .restore-radio {
          width: 16px; height: 16px;
          border: 2px solid #d1d5db; border-radius: 50%;
          display: inline-flex; align-items: center; justify-content: center;
          transition: all 0.15s;
      }
      #bkRestoreList tr.is-selected .restore-radio {
          border-color: #3b82f6;
          background: #3b82f6;
      }
      #bkRestoreList tr.is-selected .restore-radio::after {
          content: '';
          width: 6px; height: 6px;
          background: #fff;
          border-radius: 50%;
      }
      #bkRestoreList tr.is-disabled {
          opacity: 0.45; cursor: not-allowed;
          background: repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(239,68,68,0.04) 6px, rgba(239,68,68,0.04) 12px);
      }
      /* drop-zone 高亮 */
      #restoreLocalDropZone.is-dragover {
          border-color: #3b82f6;
          background: rgba(59,130,246,0.08);
      }
      /* 响应式：移动端侧栏改为左侧抽屉 */
      .admin-sidebar-backdrop { display: none; }
      @media (max-width: 1023px) {
          .admin-layout { display: block; padding: 12px; }
          .admin-main { width: 100%; }

          /* 侧栏抽屉：默认藏到屏幕左侧外 */
          .admin-sidebar {
              position: fixed;
              top: 0;
              left: 0;
              width: 260px !important;
              height: 100vh;
              max-height: none;
              margin-bottom: 0;
              border-radius: 0 18px 18px 0;
              z-index: 70;
              transform: translateX(-100%);
              transition: transform .25s ease;
              box-shadow: 6px 0 24px rgba(30, 44, 80, .18);
          }
          .admin-sidebar.admin-sidebar--open { transform: translateX(0); }
          .admin-sidebar.collapsed { width: 260px !important; padding: 16px; }
          .admin-sidebar.collapsed .admin-sidebar__brand-text,
          .admin-sidebar.collapsed .admin-sidebar__item-label,
          .admin-sidebar.collapsed .admin-sidebar__badge,
          .admin-sidebar.collapsed .admin-sidebar__footer { display: initial; }
          .admin-sidebar.collapsed .admin-sidebar__item { justify-content: flex-start; gap: 12px; padding: 10px 12px; }
          .admin-sidebar.collapsed .admin-sidebar__brand { justify-content: flex-start; }
          .admin-sidebar__nav {
              flex-direction: column;
              overflow-y: auto;
              overflow-x: hidden;
              gap: 4px;
              max-height: calc(100vh - 160px);
              padding-bottom: 0;
          }
          .admin-sidebar__nav .admin-sidebar__item {
              flex-shrink: 0;
              padding: 10px 12px;
          }
          .admin-sidebar__subnav {
              flex-direction: column;
              padding: 4px 0 4px 8px;
              border-left: 2px dashed rgba(30, 44, 80, 0.12);
              border-top: none;
              margin: 2px 0 4px 0;
              overflow-x: hidden;
          }
          .admin-sidebar__subitem { flex-shrink: 0; width: auto; }
          .admin-sidebar__group-title { padding: 8px 0 2px 0; }
          .admin-sidebar__brand .admin-sidebar__collapse-btn { display: none; }

          /* 抽屉蒙版 */
          .admin-sidebar-backdrop {
              display: block;
              position: fixed;
              inset: 0;
              background: rgba(0, 0, 0, .35);
              backdrop-filter: blur(2px);
              z-index: 60;
              opacity: 0;
              transition: opacity .2s ease;
              pointer-events: none;
          }
          .admin-sidebar-backdrop:not(.hidden) {
              opacity: 1;
              pointer-events: auto;
          }
          body.admin-sidebar-open { overflow: hidden; }
      }
      /* ====== 平台超管顶部：当前用户 + token 倒计时徽章（P-IdleCountdown） ======
         玻璃深色导航上：默认用半透明白底（与「平台超管」徽章视觉一致），
         临近过期（≤5 分钟）切换为告警色 + 脉动，提示用户即将自动登出。 */
      #adminIdleBadge {
          background-color: rgba(255, 255, 255, 0.20);
          transition: background-color 0.2s ease, color 0.2s ease;
      }
      #adminIdleBadge.admin-idle-warn {
          background-color: rgba(239, 68, 68, 0.85); /* red-500 */
          color: #fff;
      }
      @keyframes admin-idle-pulse {
          0%, 100% { opacity: 1; }
          50%      { opacity: 0.55; }
      }
      #adminIdleBadge.admin-idle-warn {
          animation: admin-idle-pulse 1.2s ease-in-out infinite;
      }
        /* ====== 预设主题选择卡片 ====== */
        #themePresets {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 14px;
        }
        .theme-swatch {
            position: relative;
            border: none;
            padding: 0;
            background: none;
            cursor: pointer;
            text-align: left;
            outline: none;
            -webkit-tap-highlight-color: transparent;
        }
        .theme-swatch .swatch-wall {
            position: relative;
            display: block;
            height: 88px;
            border-radius: 14px;
            overflow: hidden;
            box-shadow: 0 2px 10px rgba(30, 44, 80, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.55);
            transition: transform .22s cubic-bezier(.2,.8,.3,1.1), box-shadow .22s ease;
        }
        .theme-swatch .swatch-aurora {
            position: absolute;
            inset: -18%;
            filter: blur(10px) saturate(160%);
            transition: transform .5s ease;
        }
        .theme-swatch:hover .swatch-wall { transform: translateY(-2px) scale(1.02); box-shadow: 0 8px 22px rgba(30, 44, 80, 0.20), inset 0 0 0 1px rgba(255,255,255,.6); }
        .theme-swatch:hover .swatch-aurora { transform: scale(1.08) rotate(1.5deg); }
        /* 迷你玻璃导航条：预览玻璃质感 */
        .theme-swatch .swatch-glassbar {
            position: absolute;
            left: 10px; right: 10px; top: 10px;
            height: 20px;
            border-radius: 7px;
            backdrop-filter: blur(6px) saturate(150%);
            -webkit-backdrop-filter: blur(6px) saturate(150%);
            border: 1px solid rgba(255,255,255,0.28);
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
            display: flex; align-items: center; gap: 4px; padding: 0 7px;
        }
        .theme-swatch .swatch-glassbar i { font-size: 8px; color: rgba(255,255,255,0.9); }
        .theme-swatch .swatch-glassbar .bar-line { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.65); }
        /* 迷你白玻璃卡片 */
        .theme-swatch .swatch-card {
            position: absolute;
            left: 10px; right: 34px; top: 40px; bottom: 10px;
            border-radius: 9px;
            background: rgba(255,255,255,0.55);
            backdrop-filter: blur(5px);
            -webkit-backdrop-filter: blur(5px);
            border: 1px solid rgba(255,255,255,0.7);
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
        }
        /* 强调色圆点（右下角，模拟按钮） */
        .theme-swatch .swatch-accent {
            position: absolute;
            right: 10px; bottom: 10px;
            width: 18px; height: 18px;
            border-radius: 50%;
            box-shadow: 0 1px 4px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.5);
        }
        /* 选中态 */
        .theme-swatch.selected .swatch-wall {
            box-shadow: 0 0 0 2.5px var(--sw-accent, #1a73e8), 0 8px 22px rgba(30,44,80,0.22);
        }
        .theme-swatch .swatch-check {
            position: absolute;
            top: -6px; right: -6px;
            width: 22px; height: 22px;
            border-radius: 50%;
            background: var(--sw-accent, #1a73e8);
            color: #fff;
            display: none;
            align-items: center; justify-content: center;
            font-size: 11px;
            box-shadow: 0 2px 6px rgba(0,0,0,0.25);
            z-index: 2;
        }
        .theme-swatch.selected .swatch-check { display: flex; }
        .theme-swatch .swatch-meta { display: block; padding: 7px 2px 0; }
        .theme-swatch .swatch-name { font-size: 13px; font-weight: 600; color: #1f2937; line-height: 1.2; }
        .theme-swatch .swatch-desc { font-size: 11px; color: #9ca3af; margin-top: 1px; }
/* ====== 测试报告二级子视图（iframe）======
   P-ReportsLayout v2:
   - 取消外层 max-w-7xl；reports-container 占满 admin-main 全部宽度
   - 顶部"内容卡片"由大块 glass 卡片改为紧凑一行横向条 (.reports-bar)，节省纵向空间
   - iframe 占满主区剩余高度，避免双层滚动条 + 底部留白
   每个 subview 仅渲染一个 iframe，切换由 sidebar.js 控制 .hidden 来完成。 */
.reports-container {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* 16px 内边距让大屏下 iframe 边沿不贴死视口 */
    padding: 0 20px 20px;
}
.reports-bar {
    /* 紧凑横向条：浅色背景 + 圆角，对齐 admin-schools 其他视图的工具栏视觉 */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(30, 44, 80, 0.08);
    border-radius: 14px;
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    box-shadow: 0 4px 14px rgba(30, 44, 80, 0.06);
    min-height: 44px;
    flex-wrap: wrap;
}
.reports-bar__left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}
.reports-bar__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 14px;
    flex-shrink: 0;
}
.reports-bar__title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.2;
    margin: 0;
    /* 副标题（描述）已移除，这里只保留标题 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.reports-bar__right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.reports-bar__btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid rgba(30, 44, 80, 0.14);
    background: rgba(255, 255, 255, 0.85);
    color: #4b5563;
    font-size: 13px;
    border-radius: 8px;
    transition: background-color .15s ease, border-color .15s ease;
    text-decoration: none;
    cursor: pointer;
}
.reports-bar__btn:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.35);
    color: #4f46e5;
}
/* P-Fix: 上方 .reports-bar__btn 的 `display: inline-flex` 会覆盖浏览器默认的 [hidden] 选择器
   （特异度均为 0,1,0，CSS 规则晚于 UA 样式 → 用户声明胜出），导致 sidebar.js 第 57 行
   `syncBtn.hidden = (target !== 'submit')` 设置的 HTML 属性无效。需要显示/隐藏同步
   按钮（adminReportsSync）的场合统一靠这个规则兜底。与同文件第 619 行
   `.reports-subview.hidden { display: none !important; }` 用法保持一致。 */
.reports-bar__btn[hidden] {
    display: none !important;
}
.reports-frame-wrap {
    /* iframe 外层：玻璃质感 + 圆角 + overflow hidden，配合 iframe 内部滚动避免双层滚动条 */
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(30, 44, 80, 0.10);
    border-radius: 16px;
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    box-shadow: 0 6px 22px rgba(30, 44, 80, 0.08);
    overflow: hidden;
    /* 占满主区剩余高度：
       100vh - 顶部 nav 高度(~64px) - admin-layout 上下 padding(40px) - 内容条高度(56px) - gap(12px) ≈ 828px；
       设置 min-height 保证小屏也能完整展开。 */
    height: calc(100vh - 200px);
    min-height: 520px;
    position: relative;
}
.reports-subview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.reports-subview.hidden { display: none !important; }
.reports-iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
    /* 让 iframe 内部滚动，避免和外层窗体滚动打架 */
    overflow: auto;
}
/* 窄屏：内容条 + iframe 容器都要更紧凑 */
@media (max-width: 1023px) {
    .reports-container { padding: 0 12px 12px; }
    .reports-bar { padding: 8px 12px; }
    .reports-frame-wrap { height: calc(100vh - 180px); min-height: 480px; }
}

/* ====== 响应式表格：防止窄屏下列被压扁、文字竖排 ====== */
.admin-card .glass-table,
.overflow-x-auto .glass-table {
    min-width: max-content;
}
.admin-card .glass-table th,
.admin-card .glass-table td,
.overflow-x-auto .glass-table th,
.overflow-x-auto .glass-table td {
    white-space: nowrap;
    vertical-align: middle;
}
.admin-card .overflow-x-auto,
.overflow-x-auto {
    -webkit-overflow-scrolling: touch;
}
@media (max-width: 1023px) {
    .admin-card .glass-table th,
    .admin-card .glass-table td,
    .overflow-x-auto .glass-table th,
    .overflow-x-auto .glass-table td { padding: 10px 12px; }
}
@media (max-width: 639px) {
    .admin-card .glass-table th,
    .admin-card .glass-table td,
    .overflow-x-auto .glass-table th,
    .overflow-x-auto .glass-table td { padding: 8px 10px; font-size: 13px; }
}

/* 顶部移动端菜单按钮：默认显示，桌面端隐藏 */
.admin-mobile-menu-btn { display: inline-flex; }
@media (min-width: 1024px) {
    .admin-mobile-menu-btn { display: none; }
}

/* 学校列表搜索框：窄屏占满，宽屏固定宽度 */
.admin-search-input { width: 100%; }
@media (min-width: 640px) {
    .admin-search-input { width: 16rem; }
}
