
*, *::before, *::after { box-sizing: border-box; }

html {
  font-family: "Inter var", "Inter", -apple-system, BlinkMacSystemFont,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  background: #f5f6f8;
  color: #1a1a1a;
  min-height: 100vh;
}

#app {
  min-height: 100vh;
  background: #f5f6f8;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d9d9d9; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #bfbfbf; }

/* ── Sidebar brand ── */
.tcy-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
  padding: 0 20px;
  box-sizing: border-box;
  text-decoration: none;
  border-bottom: 1px solid #e7e9ee;
  height: 60px;
}
.tcy-brand-icon {
    display: none;
  }
.tcy-brand-text {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* ── Page content ── */
.tcy-content {
  padding: 20px 24px 28px;
  max-width: 1480px;
}

/* ── Footer ── */
.tcy-footer {
  padding: 12px 24px;
  text-align: center;
  font-size: 12px;
  color: #bfbfbf;
  border-top: 1px solid #e9ecf1;
}

/* ── 授权码面板 ── */
.license-panel {
  width: 100%;
}
.license-panel .n-input {
  --n-border-radius: 4px;
}

/* ── Login page ── */
.tcy-login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 24px;
}

/* ── Table utils ── */
.mono { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 12px; }
.clip1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; display: block; }
.clip2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Avatar ── */
.uavatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid #f0f0f0;
  background: #fafafa;
  flex-shrink: 0;
}
.thumb {
  width: 40px; height: 40px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #f0f0f0;
}

/* ── Dashboard stat cards ── */
.tcy-stat-number {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: #1a1a1a;
}
.tcy-stat-label {
  font-size: 13px;
  color: #8c8c8c;
  margin-bottom: 8px;
}
.tcy-stat-sub {
  font-size: 12px;
  color: #bfbfbf;
  margin-top: 6px;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .tcy-content { padding: 12px 16px; }
}

/* 超小屏：隐藏顶栏管理员名，避免与标题挤压 */
@media (max-width: 420px) {
  .tcy-admin-name { display: none; }
  .tcy-content { padding: 10px 12px; }
}

/* 移动端底部安全区（iPhone 刘海/Home 指示条） */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .tcy-footer { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .n-layout-sider .tcy-brand { padding-left: max(20px, env(safe-area-inset-left)); }
}

/* 抽屉滚动更顺滑 */
.n-layout-sider .n-scrollbar-content { -webkit-overflow-scrolling: touch; }

/* ── Animations ── */
@keyframes tcyFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tcy-fadein { animation: tcyFadeIn 0.2s ease-out both; }

/* ── Naive UI admin shell overrides ── */
.n-layout { background: #f5f6f8 !important; }
.n-layout-sider { background: #f8f9fb !important; }
.n-layout-header { background: #ffffff !important; }
.n-data-table { background: #ffffff !important; }
.n-card {
  background: #ffffff !important;
  border: 1px solid #e9ecf1 !important;
  box-shadow: none !important;
}
.n-menu { background: transparent !important; }
.n-scrollbar-content { background: transparent !important; }
.n-menu .n-menu-item-content {
  border-radius: 8px !important;
  margin: 2px 10px !important;
}
.n-data-table .n-data-table-th {
  font-weight: 700 !important;
}
