/* ============================================================
   三人行 OA · 美化叠加层（theme.css） v1
   策略：叠加于 oa.css 之上，不改原文件一行，可一键回退
   仅增强视觉质感 + 登录页分屏，不改动任何 DOM 类名 / JS 钩子
   回退方式：从 index.html / login.html 摘掉 <link rel="stylesheet" href="/theme.css">
   ============================================================ */

:root {
  /* 补充原 oa.css 引用但未定义的品牌变量（修复 --blue 失效导致子菜单/标签页高亮丢色） */
  --blue: #2563EB;
  --blue-soft: #EFF4FF;

  /* 升级主色为更通透的企业蓝（全站自动换装，零 DOM 改动） */
  --primary: #2F6BFF;
  --primary-hover: #1E54E8;
  --primary-strong: #1B3FAE;
  --primary-soft: #EEF3FF;
  --primary-ring: rgba(47, 107, 255, .22);
  --shadow-blue: 0 10px 26px rgba(47, 107, 255, .38);

  /* 登录页品牌渐变 */
  --brand-grad: linear-gradient(150deg, #1E3A8A 0%, #2563EB 52%, #3B82F6 100%);
}

/* ===== 侧边栏顶部品牌光条 ===== */
.sidebar-logo { position: relative; }
.sidebar-logo::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #2F6BFF, #06B6D4 55%, #E8A82A);
  border-radius: 0 0 2px 2px;
}
.nav-item.active { box-shadow: 0 6px 16px rgba(47, 107, 255, .12); }

/* ===== 顶栏微渐变（玻璃拟态上叠极淡蓝，更通透） ===== */
.topbar {
  background: linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(255, 255, 255, .78));
}

/* ===== 卡片质感增强（hover 浮起 + 品牌光晕） ===== */
.card { transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease; }
.card:hover {
  transform: translateY(-2px);
  border-color: #CBD8F5;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .09), 0 4px 10px rgba(47, 107, 255, .10);
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, .12), 0 6px 14px rgba(47, 107, 255, .14);
  border-color: #B9CBF2;
}

/* ===== 按钮微交互（登录主按钮轻微放大） ===== */
.btn.primary { transition: all .16s ease, transform .12s ease; }
.btn.primary:hover { transform: translateY(-1px) scale(1.01); }
.btn:active { transform: translateY(0) scale(.985); }

/* ===== 全局焦点环更精致 ===== */
.field input:focus, .field select:focus, .field textarea:focus,
.topbar-search:focus-within { box-shadow: 0 0 0 3px var(--primary-ring); }

/* ============================================================
   登录页 · 分屏式（左品牌区 + 右表单）
   ============================================================ */
.login-body {
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(47, 107, 255, .12), transparent 60%),
    radial-gradient(820px 620px at 112% 114%, rgba(6, 182, 212, .07), transparent 55%),
    linear-gradient(160deg, #EEF3FD 0%, #E7ECF7 55%, #E2E8F4 100%);
}
.login-card {
  width: 420px;
  max-width: 92vw;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 38px 38px 34px;
  overflow: hidden;
  min-height: 0;
  grid-template-columns: none;
}

/* 左：品牌展示区 */
.login-aside {
  position: relative;
  background: var(--brand-grad);
  color: #fff;
  padding: 46px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.login-aside::before {
  content: '';
  position: absolute; top: -120px; right: -120px;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 70%);
}
.login-aside::after {
  content: '';
  position: absolute; bottom: -140px; left: -80px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, .30), transparent 70%);
}
.la-top { position: relative; z-index: 1; }
.la-logo-box {
  display: inline-flex; align-items: center;
  background: #fff; padding: 9px 13px; border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
  margin-bottom: 14px;
}
.la-logo { height: 34px; width: auto; display: block; }
.la-company { font-size: 13px; color: rgba(255, 255, 255, .72); letter-spacing: .3px; }

.la-mid { position: relative; z-index: 1; margin: 18px 0; }
.la-title {
  font-size: 30px; font-weight: 800; line-height: 1.32; letter-spacing: .5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}
.la-desc { margin-top: 16px; font-size: 14px; line-height: 1.8; color: rgba(255, 255, 255, .82); }

.la-feats { position: relative; z-index: 1; list-style: none; display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.la-feats li { display: flex; align-items: center; gap: 11px; font-size: 13.5px; color: rgba(255, 255, 255, .92); }
.la-feats svg { width: 18px; height: 18px; flex-shrink: 0; stroke: #fff; opacity: .95; }

.la-foot {
  position: relative; z-index: 1; font-size: 12px; color: rgba(255, 255, 255, .6);
  padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .16);
}

/* 右：表单区 */
.login-form {
  background: #fff;
  padding: 46px 44px;
  display: flex; flex-direction: column; justify-content: center;
}
.login-form .login-h1 { text-align: left; font-size: 24px; }
.login-form .sub { text-align: left; margin-top: 8px; }
.login-form .field { margin-bottom: var(--sp-4); }
.login-form .login-btn { margin-top: var(--sp-2); }

/* 响应式：窄屏 */
@media (max-width: 760px) {
  .login-card { width: 92vw; padding: 30px 26px; }
}

/* 简洁登录页：透明底 LOGO，直接浮于白卡，不套白盒子 */
.login-logo {
  display: block;
  width: 100%;
  max-width: 248px;
  height: auto;
  margin: 2px auto 22px;
}
.login-h1 { text-align: center; font-size: 22px; margin-bottom: 22px; }

/* 顶栏用户下拉菜单（退出登录） */
.topbar-user { position: relative; cursor: pointer; }
.user-menu {
  position: absolute; top: calc(100% + 12px); right: 0;
  min-width: 150px;
  background: #fff;
  border: 1px solid #E6EBF2;
  border-radius: 12px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .16);
  padding: 6px;
  z-index: 60;
}
.user-menu[hidden] { display: none; }
.user-menu button {
  display: flex; align-items: center; gap: 9px;
  width: 100%; text-align: left;
  padding: 10px 12px; border: 0; background: transparent;
  border-radius: 8px; font-size: 14px; color: #334155; cursor: pointer;
  font-family: inherit;
}
.user-menu button:hover { background: #EEF3FF; color: #2F6BFF; }
.user-menu button svg { width: 16px; height: 16px; }
