/* 静态控制台页面共用的补充样式：窄屏把侧边栏变成抽屉 + 汉堡按钮
   （lanox 原版靠 React 控制的 MuiDrawer，静态页里由 static-shell.js 接管） */
.oj-nav-toggle { display: none; }
/* 账号 / 语言下拉：按 lanox 控制台那张菜单的样子做 */
.oj-menu-card {
  position: fixed; min-width: 252px; padding: 10px 8px 8px; z-index: 3000;
  background: #fff; border: 1px solid #e8ecf4; border-radius: 14px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
  font-family: inherit;
}
.oj-menu-card[hidden] { display: none; }
.oj-menu-label { font-size: 12px; color: #94a3b8; padding: 2px 10px 8px; }
.oj-menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  padding: 9px 10px; border: 0; border-radius: 10px; background: transparent;
  cursor: pointer; font-size: 14px; line-height: 1.4; color: #334155;
}
.oj-menu-item:hover { background: #f4f6fb; }
.oj-menu-divider { height: 1px; background: #eef2f7; margin: 8px 4px; }
.oj-account-row {
  display: flex; align-items: center; gap: 10px; padding: 6px 10px 10px;
}
.oj-menu-avatar {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #6b4ef0, #3b82f6); color: #fff;
  font-size: 14px; font-weight: 600;
}
.oj-account-meta { min-width: 0; display: flex; flex-direction: column; }
.oj-account-name { font-size: 14px; font-weight: 600; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 108px; }
.oj-account-mail { font-size: 12px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 108px; }
.oj-account-tag {
  margin-left: auto; font-size: 11px; font-style: normal; color: #6366f1;
  background: #eef2ff; border-radius: 999px; padding: 3px 8px; white-space: nowrap;
}
.oj-menu-item.oj-account-logout { color: #dc2626; border-top: 1px solid #eef2f7; border-radius: 0 0 10px 10px; margin-top: 6px; padding-top: 11px; }
.oj-menu-item.oj-account-logout:hover { background: #fef2f2; }
.oj-locale-badge {
  width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #eef2ff; color: #4f46e5; font-size: 12px; font-weight: 600;
}
.oj-locale-item.is-current { background: #f4f6fb; color: #4f46e5; font-weight: 600; }
.oj-nav-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease; z-index: 1250;
}
@media (max-width: 900px) {
  .oj-nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; margin-right: 10px; padding: 0;
    border: 0; border-radius: 10px; background: transparent;
    color: #334155; font-size: 19px; line-height: 1; cursor: pointer;
  }
  .oj-nav-toggle:hover { background: rgba(15, 23, 42, 0.06); }
  .page-shell aside[class*="mui-"] {
    position: fixed !important; top: 0; left: 0; bottom: auto;
    /* 注意：不要用 display:flex —— 里面那列在 flex 行容器里会缩成内容宽（248px），
       抽屉右边就会露出 24px 白条；改成 block 让它撑满抽屉宽度。 */
    display: block !important;
    width: min(272px, 82vw) !important;
    /* 抽屉高度贴着「看得见的那块屏」：手机地址栏收起/展开时也刚好，不会被切掉底部 */
    height: 100vh !important; height: 100dvh !important; min-height: 0 !important;
    overflow: hidden; background: #e6f1ff; z-index: 1300;
    transform: translateX(-104%); transition: transform 0.22s ease;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  }
  /* 抽屉里那一列跟着抽屉高度（而不是 100vh），并且内部自己滚 */
  .page-shell aside[class*="mui-"] > * {
    width: 100% !important; height: 100% !important; min-height: 0 !important;
    overflow: hidden !important;
  }
  /* 菜单本身要能上下滑，否则「工单支持」这些靠下的项根本点不到。
     [data-oj-nav-scroll] 由 static-shell.js 按结构打上（包住菜单项的那层，
     类名是 emotion 哈希、每页不一定一样）。 */
  .page-shell aside[class*="mui-"] [data-oj-nav-scroll] {
    flex: 1 1 auto !important; min-height: 0 !important;
    overflow-y: auto !important; overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    padding-bottom: 26px;
  }
  .page-shell aside[class*="mui-"] [data-oj-nav-scroll]::-webkit-scrollbar { width: 0; height: 0; }
  /* 兜底：万一没打上标记，整个 frame 也能滚 */
  .page-shell aside[class*="mui-"] [data-console-sidebar-scroll-frame] {
    overflow-y: auto !important; overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  }
  body.oj-nav-open aside[class*="mui-"] { transform: translateX(0); }
  body.oj-nav-open .oj-nav-backdrop { opacity: 1; pointer-events: auto; }
}

/* ---------------------------------- 轻提示 ----------------------------------
   static-shell.js 里的 ojToast 用它（复制成功/失败这类反馈）。
   控制台页面是 http 站点，浏览器原生的复制提示/权限框都不会出现，
   所以复制结果必须自己弹一个，否则用户点了按钮会以为没反应。 */
.oj-toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 10px);
  max-width: min(88vw, 560px); padding: 11px 18px; border-radius: 12px;
  background: rgba(15, 23, 42, 0.94); color: #fff;
  font-size: 13px; font-weight: 600; line-height: 1.45; text-align: center;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.28);
  opacity: 0; pointer-events: none; z-index: 4000;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.oj-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.oj-toast-err { background: rgba(185, 28, 28, 0.96); }
@media (max-width: 900px) {
  .oj-toast { bottom: 22px; }
}
