/* ============================================================
   工具箱 · 界面美化增强层 (custom.css)
   覆盖并增强 Element Plus + 既有组件样式
   加载于主样式之后，同优先级靠后声明即可生效
   ============================================================ */

:root {
  --th-primary: #409eff;
  --th-bg: #f5f7fa;
  --th-sidebar-bg: #1f2d3d;
  --th-sidebar-hover: #2b3c4f;
  --th-grad: linear-gradient(135deg, #409eff, #3f7dfe 55%, #6a5cff);
  --th-radius: 14px;
  --th-shadow: 0 10px 30px rgba(30, 60, 120, 0.10);
}

/* ---------- 全局细节 ---------- */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* 细滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c0c8d8; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #9aa6bd; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 登录页：毛玻璃 + 动感背景 ---------- */
.login-page {
  background: linear-gradient(135deg, #0f2027 0%, #203a43 45%, #2c5364 100%) !important;
}
.login-page::before,
.login-page::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}
.login-page::before {
  width: 420px; height: 420px;
  left: -80px; top: -80px;
  background: rgba(64, 158, 255, 0.35);
  animation: th-float 9s ease-in-out infinite alternate;
}
.login-page::after {
  width: 460px; height: 460px;
  right: -100px; bottom: -100px;
  background: rgba(106, 92, 255, 0.28);
  animation: th-float 11s ease-in-out infinite alternate-reverse;
}
@keyframes th-float {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(24px, -18px) scale(1.08); }
}
.login-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 18px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35) !important;
  backdrop-filter: blur(12px);
  overflow: hidden;
  animation: th-card-in 0.5s ease-out;
}
@keyframes th-card-in {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.login-logo {
  background: var(--th-grad) !important;
  box-shadow: 0 8px 20px rgba(64, 158, 255, 0.35);
}
.login-title { color: #1f2d3d !important; letter-spacing: 1px; }
.login-subtitle { color: #6b7a90 !important; }

/* 登录按钮渐变 */
.login-btn {
  background: var(--th-grad) !important;
  border: none !important;
  border-radius: 10px !important;
  box-shadow: 0 6px 16px rgba(64, 158, 255, 0.35);
  transition: all 0.25s !important;
}
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(64, 158, 255, 0.45) !important; }

/* 登录页输入框圆角 */
.login-card .el-input__wrapper { border-radius: 10px; }

/* ---------- 首页欢迎横幅 ---------- */
.welcome-banner {
  background: linear-gradient(120deg, #eef6ff 0%, #ffffff 55%, #f0f2ff 100%) !important;
  border: 1px solid #d6e9ff !important;
  border-radius: var(--th-radius) !important;
  position: relative;
  overflow: hidden;
}
.welcome-banner::after {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(64, 158, 255, 0.16), transparent 70%);
  pointer-events: none;
}
.welcome-title { color: #203a43 !important; }
.welcome-sub { color: #5d6b80 !important; }
.welcome-icon { color: var(--th-primary) !important; filter: drop-shadow(0 4px 8px rgba(64,158,255,0.3)); }

/* ---------- 工具卡片 ---------- */
.tool-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important; }
.tool-card {
  border-radius: var(--th-radius) !important;
  border: 1px solid #e6ebf4 !important;
  background: #fff;
  transition: all 0.25s ease !important;
}
.tool-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 14px 30px rgba(30, 60, 120, 0.14) !important;
  border-color: #a6c8ff !important;
}
.tool-icon {
  border-radius: 12px !important;
  box-shadow: 0 6px 14px rgba(30, 60, 120, 0.18);
}
.tool-card-empty .tool-icon { box-shadow: none; }

/* ---------- 侧边栏 ---------- */
.sidebar {
  background: linear-gradient(180deg, #1a2536 0%, #141d2b 100%) !important;
}
.brand { border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important; }
.brand-name { background: var(--th-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.side-menu .el-menu-item { border-radius: 8px; margin: 2px 8px; }
.side-menu .el-menu-item.is-active {
  background: var(--th-grad) !important;
  box-shadow: 0 4px 12px rgba(64, 158, 255, 0.35) !important;
}

/* ---------- 顶栏 ---------- */
.topbar { background: rgba(255, 255, 255, 0.92) !important; backdrop-filter: blur(8px); }
.user-avatar { background: var(--th-grad) !important; box-shadow: 0 3px 8px rgba(64,158,255,0.3); }

/* ---------- 通用卡片 & 表格圆角 ---------- */
.section-card, .el-card {
  border-radius: var(--th-radius) !important;
  border-color: #e6ebf4 !important;
  box-shadow: 0 4px 16px rgba(30, 60, 120, 0.06) !important;
}
.el-table { border-radius: 10px; overflow: hidden; }
.el-table th.el-table__cell { background: #f4f7fb !important; color: #3a4758 !important; font-weight: 600; }
.el-table tr:hover > td { background: #f2f7ff !important; }

/* ---------- 按钮统一圆角 ---------- */
.el-button { border-radius: 8px !important; }
.el-button--primary { box-shadow: 0 4px 10px rgba(64, 158, 255, 0.25); }

/* ---------- 对话框 ---------- */
.el-dialog { border-radius: var(--th-radius) !important; }
.el-dialog__header { border-bottom: 1px solid #eef1f6; padding-bottom: 14px !important; }

/* ---------- 标签 / 徽章 ---------- */
.el-tag { border-radius: 6px !important; }

/* ---------- 分区标题 ---------- */
.section-title { color: #2a3a52 !important; }
