/* ============================================================
   Phira Hub UI 优化层（client + admin 共用）
   通过 /assets/custom.css 注入，覆盖主题与组件细节
   ============================================================ */

/* ---- 全局排版 ---- */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, sans-serif;
  letter-spacing: 0.1px;
}

::selection {
  background: var(--bru-accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--bru-accent);
  outline-offset: 2px;
}

/* ---- 滚动条 ---- */
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-thumb {
  background: var(--bru-line);
  border-radius: 4px;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--bru-muted);
}
*::-webkit-scrollbar-track {
  background: transparent;
}

/* ---- 主题微调：暗色下边框更柔和 ---- */
.dark {
  --bru-line: rgba(148, 163, 184, 0.16);
}

/* ---- 卡片 ---- */
.app-card,
.admin-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.app-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 64px -15px rgba(30, 28, 80, 0.28);
  border-color: color-mix(in srgb, var(--bru-accent) 35%, transparent);
}

/* ---- 按钮 ---- */
.download-btn {
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.2s ease;
}
.download-btn:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 12px 28px -8px color-mix(in srgb, var(--bru-accent) 60%, transparent);
}
.download-btn:active {
  transform: translateY(0) scale(0.98);
}

.btn {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}
.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--bru-accent), var(--bru-accent-press));
}
.btn-primary:hover {
  filter: brightness(1.08);
}

/* ---- 表单 ---- */
.form-input:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: var(--bru-accent) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bru-accent) 22%, transparent);
  outline: none;
}

/* ---- 链接 ---- */
a {
  transition: color 0.15s ease;
}

/* ---- 表格/列表 hover ---- */
tr {
  transition: background-color 0.15s ease;
}
tbody tr:hover {
  background: color-mix(in srgb, var(--bru-accent) 5%, var(--bru-paper));
}

/* ---- 徽章/状态圆角统一 ---- */
.rounded-full,
.badge {
  letter-spacing: 0.2px;
}

/* ---- 移动端微调 ---- */
@media (max-width: 640px) {
  .app-card {
    border-radius: 20px;
  }
  .download-btn {
    border-radius: 14px;
    padding: 12px 18px;
  }
}
