/* WanLink OA · 2026-11-21 视觉层 v3 「Studio Edition」
   与官网同源的设计语言：瓷白纸面、深墨文字、发丝线、连续曲率 8/12/18/26、
   品牌紫蓝渐变只出现在关键标记处。
   本文件只覆盖视觉：类名、DOM 结构与业务逻辑完全不动。
   叠加在 app.css 之后加载（index.html 里 glass.css 在 app.css 后）。 */

:root {
  /* 设计令牌 · WanLink Studio */
  --accent: #4C6FFF;
  --accent-deep: #2B4BDF;
  --accent-weak: rgba(76, 111, 255, .10);
  --accent-weak-2: rgba(76, 111, 255, .16);
  --grad: linear-gradient(118deg, #7C6AFF 0%, #4C6FFF 52%, #3FB8E8 100%);
  --bg: #F7F8FB;
  --bg-deep: #EEF1F6;
  --card: #FFFFFF;
  --text: #0F1626;
  --text-2: #3C4657;
  --text-3: #8A94A6;
  --line: #E7EBF2;
  --line-strong: #D8DEE9;
  --shadow: 0 1px 2px rgba(16,24,38,.03), 0 10px 28px -18px rgba(16,24,38,.12);
  --shadow-lg: 0 2px 6px rgba(16,24,38,.04), 0 24px 60px -28px rgba(16,24,38,.22);
  --radius: 18px;
  --radius-sm: 12px;
  --r-xs: 8px;
  --r-sm: 12px;
  --r-full: 999px;
  --r-lg: 26px;
  --ok: #178A50;
  --warn: #B07A14;
  --bad: #C0442F;
  --ease-out: cubic-bezier(.22,.68,.16,1);
  --focus-ring: 0 0 0 3px rgba(76,111,255,.16);
}

/* ============ 基础 ============ */
html, body {
  background: var(--bg); color: var(--text);
}
body::before {
  content: ""; position: fixed; inset: -20% -10% auto -10%; height: 72%;
  background:
    radial-gradient(42% 38% at 14% 22%, rgba(124,106,255,.05), transparent 70%),
    radial-gradient(38% 36% at 84% 10%, rgba(63,184,232,.045), transparent 72%);
  pointer-events: none; z-index: 0;
}
a { color: var(--accent-deep); }

::selection { background: rgba(76,111,255,.18); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #D2D9E4; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #B9C3D2; }

/* ============ 登录页 ============ */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 28px 18px; position: relative;
  background:
    radial-gradient(52% 44% at 22% 20%, rgba(124,106,255,.10), transparent 70%),
    radial-gradient(46% 40% at 82% 78%, rgba(63,184,232,.09), transparent 72%),
    radial-gradient(40% 36% at 50% 110%, rgba(76,111,255,.07), transparent 70%);
}
.login-card {
  position: relative; width: 404px; max-width: 100%;
  background: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.9);
  border-radius: var(--r-lg); padding: 36px 34px 28px;
  box-shadow: var(--shadow-lg);
  -webkit-
  overflow: hidden;
  animation: oa-card-in .6s var(--ease-out) both;
}
@keyframes oa-card-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
/* 登录卡顶部品牌渐变发丝线 */
.login-brand { display: flex; align-items: center; gap: 12px; justify-content: center; }
.login-brand .ball {
  width: 52px; height: 52px; object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(15,22,38,.14));
}
.login-brand .txt { display: flex; align-items: baseline; gap: 7px; }
.login-brand .name { font-size: 22px; font-weight: 760; letter-spacing: -.03em; }
.login-brand .oa {
  font-size: 11px; font-weight: 760; letter-spacing: .2em; color: var(--accent-deep);
  padding: 2px 7px; border-radius: 6px; background: var(--accent-weak);
}
.h-sub { text-align: center; color: var(--text-3); font-size: 12.5px; margin: 10px 0 4px; letter-spacing: .04em; }
.err-line {
  margin: 12px 0 2px; padding: 9px 12px; border-radius: var(--r-xs);
  background: rgba(192,68,47,.07); border: 1px solid rgba(192,68,47,.16);
  color: var(--bad); font-size: 12.5px;
}
.field { margin-top: 14px; }
.field label {
  display: block; font-size: 11.5px; font-weight: 660; color: var(--text-2);
  margin-bottom: 6px; letter-spacing: .05em;
}
.input {
  width: 100%; padding: 12px 14px; font-size: 14px; color: var(--text);
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--r-xs);
  outline: none; transition: border-color .2s ease, box-shadow .2s ease;
}
.input::placeholder { color: var(--text-3); }
.input:focus { border-color: var(--accent); box-shadow: var(--focus-ring); }
.btn {
  border: 1px solid var(--line-strong); background: #fff; color: var(--text);
  border-radius: var(--r-xs); font-weight: 640;
  transition: transform .2s var(--ease-out), box-shadow .2s ease, background .2s ease, border-color .2s ease, opacity .2s;
}
.btn:hover { border-color: #B8C4D8; background: #F8FAFD; }
.btn.wide {
  width: 100%; padding: 12px; font-size: 14.5px; font-weight: 680;
  background: var(--text); border-color: var(--text); color: #fff;
  box-shadow: 0 3px 14px -5px rgba(15,22,38,.4);
}
.btn.wide:hover { background: var(--accent-deep); border-color: var(--accent-deep); transform: translateY(-1px); }
.btn.wide:disabled { opacity: .65; transform: none; }
.btn.sm { font-size: 12.5px; padding: 6px 12px; }
.btn.ghost { background: transparent; border-color: var(--line-strong); }
.login-foot {
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line);
  text-align: center; color: var(--text-3); font-size: 11.5px; line-height: 1.9;
}
.login-links { display: flex; justify-content: center; gap: 18px; margin-top: 10px; }
.login-links a { color: var(--text-2); font-size: 12.5px; font-weight: 620; }
.login-links a:hover { color: var(--accent-deep); text-decoration: none; border-bottom: 1.5px solid var(--accent); padding-bottom: 1px; }
.login-legal { display: flex; justify-content: center; gap: 16px; margin-top: 10px; }
.login-legal a { color: var(--text-3); font-size: 11px; text-decoration: none; white-space: nowrap; }
.login-legal a:hover { color: var(--accent-deep); text-decoration: underline; }

/* ============ 外壳 ============ */
.shell { background: transparent; }
/* 全屏水印：覆盖侧栏与所有内容之上（原 app.css 即 9000），透明度降调 */
.wm-layer { z-index: 9000; opacity: .58; }

/* 侧栏 */
.sidebar {
  width: 240px; padding: 20px 14px 16px;
  border-right: 1px solid var(--line);
  background: rgba(255,255,255,.86);
  -webkit-
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 2px;
  z-index: 2;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 10px 20px; }
.brand-mark {
  width: 34px; height: 34px; flex: none;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: none;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-name { font-size: 15px; font-weight: 720; letter-spacing: -.02em; }
.brand-sub { font-size: 11px; color: var(--text-3); margin-top: -1px; }

.nav-group {
  font-size: 10.5px; font-weight: 730; color: var(--text-3); letter-spacing: .18em;
  padding: 14px 12px 8px;
}
.nav-item {
  position: relative; display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: var(--r-xs); font-size: 13.5px; font-weight: 570;
  color: var(--text-2); cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.nav-item:hover { background: rgba(76,111,255,.06); color: var(--text); }
.nav-item.on { background: var(--accent-weak); color: var(--accent-deep); font-weight: 680; }
.nav-item svg { opacity: .85; }
.nav-item.on svg { opacity: 1; }
.nav-badge {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--r-full); background: var(--accent); color: #fff;
  font-size: 10.5px; font-weight: 730; display: flex; align-items: center; justify-content: center;
}
.side-company {
  margin: 10px 6px 8px; padding: 12px 14px;
  border-radius: var(--r-sm); background: var(--bg-deep);
  border: 1px solid var(--line);
}
.sc-label { font-size: 10px; color: var(--text-3); letter-spacing: .14em; font-weight: 700; }
.sc-name { font-size: 13px; font-weight: 680; margin-top: 3px; }
.side-company .tag { margin-top: 8px; }

/* 主区 */
.main { position: relative; z-index: 1; }
.content { padding: 24px 30px 60px; max-width: 1160px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 30px; height: 58px; border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky; top: 0; z-index: 10;
}
.topbar .tt { font-size: 15px; font-weight: 700; letter-spacing: -.015em; }
.topbar-right { display: flex; align-items: center; gap: 9px; }
.tag {
  display: inline-flex; align-items: center; padding: 3px 10px;
  border-radius: var(--r-full); font-size: 11px; font-weight: 660;
  background: var(--bg-deep); color: var(--text-2);
  border: 1px solid var(--line);
}
.tag.company { background: var(--accent-weak); color: var(--accent-deep); border-color: transparent; }
.tag.me { background: var(--accent-weak); color: var(--accent-deep); border-color: transparent; }
.tb-no { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ============ 工作台 ============ */
.hello { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.hello h1 { font-size: 24px; font-weight: 740; letter-spacing: -.03em; margin: 0; }
.hello .d { color: var(--text-3); font-size: 12.5px; margin-top: 6px; }
.hello .tag { flex: none; }

.clock-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; border-radius: var(--radius);
  background: var(--text); color: #fff; position: relative; overflow: hidden;
  border: 1px solid var(--text);
}
.clock-card::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 90% at 88% 10%, rgba(124,106,255,.35), transparent 62%),
    radial-gradient(50% 80% at 70% 110%, rgba(63,184,232,.22), transparent 60%);
  pointer-events: none;
}
.clock-card .lab { font-size: 11.5px; letter-spacing: .1em; opacity: .78; position: relative; }
.clock-card .big {
  font-size: 30px; font-weight: 740; letter-spacing: -.02em; margin-top: 3px;
  font-variant-numeric: tabular-nums; position: relative;
}
.clock-card .btn {
  background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); color: #fff;
  position: relative; padding: 10px 20px; font-weight: 660;
 
}
.clock-card .btn:hover { background: rgba(255,255,255,.24); border-color: rgba(255,255,255,.5); }
.clock-card .btn:disabled { opacity: .55; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 14px 0; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 16px 18px; cursor: pointer; position: relative; overflow: hidden;
  transition: transform .25s var(--ease-out), box-shadow .25s ease, border-color .25s ease;
}
.stat::after {
  content: ""; position: absolute; right: 14px; top: 16px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--line-strong);
  transition: background .25s ease, transform .25s var(--ease-out);
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.stat:hover::after { background: var(--accent); transform: scale(1.25); }
.stat .n { font-size: 27px; font-weight: 760; letter-spacing: -.025em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.stat.hot::after { background: #E8618C; animation: oa-pulse 2s ease-in-out infinite; }
.stat.hot .n { color: var(--accent-deep); }
@keyframes oa-pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: .6; } }

.hm-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 14px; }
.hm-panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 16px 18px; cursor: pointer;
  transition: transform .25s var(--ease-out), box-shadow .25s ease, border-color .25s ease;
}
.hm-panel:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.hm-pv { font-size: 19px; font-weight: 720; letter-spacing: -.02em; margin: 5px 0 8px; }
.bar-track { height: 6px; border-radius: 99px; background: var(--bg-deep); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: var(--grad); transition: width .6s var(--ease-out); }

.sec-title {
  font-size: 11px; font-weight: 730; letter-spacing: .2em; color: var(--text-3);
  text-transform: uppercase; margin: 22px 0 12px;
  display: flex; align-items: center; gap: 10px;
}
.sec-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 16px; cursor: pointer;
  transition: transform .25s var(--ease-out), box-shadow .25s ease, border-color .25s ease;
}
.quick:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(76,111,255,.3); }
.qi {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--accent-weak); color: var(--accent-deep);
  display: flex; align-items: center; justify-content: center;
}
.quick span { font-size: 13px; font-weight: 620; }

.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.list .row {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  border-bottom: 1px solid var(--line); cursor: pointer; transition: background .18s ease;
}
.list .row:last-child { border-bottom: 0; }
.list .row:hover { background: #FAFBFE; }
.grow { flex: 1; min-width: 0; }
.t1 { font-size: 13.5px; font-weight: 660; }
.t2 { font-size: 12px; color: var(--text-3); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { width: 8px; height: 14px; color: var(--text-3); flex: none; transition: transform .2s var(--ease-out); }
.list .row:hover .chev { transform: translateX(3px); color: var(--accent); }

.hm-admin {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 18px; padding: 14px 18px;
  border-radius: var(--r-sm); border: 1px dashed var(--line-strong);
  background: linear-gradient(118deg, rgba(124,106,255,.05), rgba(76,111,255,.05));
}
.mini { font-size: 12px; color: var(--text-3); }

.empty {
  text-align: center; color: var(--text-3); font-size: 13px; padding: 30px 18px;
}
.empty::before {
  content: ""; display: block; width: 34px; height: 34px; margin: 0 auto 10px;
  border-radius: 50%; border: 1.5px dashed var(--line-strong);
}

/* ============ 通用组件 ============ */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.page-title { font-size: 20px; font-weight: 730; letter-spacing: -.025em; margin: 0 0 4px; }
.page-sub { color: var(--text-3); font-size: 12.5px; margin: 0 0 18px; }
.kv { display: flex; gap: 10px; font-size: 13px; }
.kv .k { color: var(--text-3); flex: none; }

/* 抽屉/弹层 */
.sheet-mask {
  position: fixed; inset: 0; background: rgba(15,22,38,.36);
 
  z-index: 60;
}
.sheet {
  background: #fff; border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: 0 -24px 60px -20px rgba(15,22,38,.3);
}
.sheet-hd { padding: 20px 22px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.sheet-bd { padding: 18px 22px; }
.sheet-ft { padding: 14px 22px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }

/* 审批图标 */
.appr-icon {
  width: 34px; height: 34px; border-radius: 11px; flex: none;
  background: var(--accent-weak); color: var(--accent-deep);
  display: flex; align-items: center; justify-content: center;
}

/* 表格 */
.cmp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cmp-table th {
  text-align: left; font-size: 11px; color: var(--text-3); font-weight: 700;
  letter-spacing: .08em; padding: 10px 10px; border-bottom: 1px solid var(--line-strong);
}
.cmp-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); }
.cmp-table tr:last-child td { border-bottom: 0; }
.cmp-table tbody tr { transition: background .15s ease; }
.cmp-table tbody tr:hover { background: #FAFBFE; }

/* 状态标签 */
.st-n { font-size: 26px; font-weight: 760; color: var(--text); line-height: 1.2; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(8px);
  background: var(--text); color: #fff; padding: 11px 20px; border-radius: var(--r-full);
  font-size: 13px; font-weight: 620; box-shadow: var(--shadow-lg);
  opacity: 0; transition: opacity .25s ease, transform .25s var(--ease-out);
  pointer-events: none; z-index: 200;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ 移动端 ============ */
.tabbar { display: none; }
@media (max-width: 860px) {
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; background: rgba(255,255,255,.96);
  border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 0; color: var(--text-3); cursor: pointer; font-size: 10.5px; font-weight: 610; position: relative; }
.tab.on { color: var(--accent-deep); font-weight: 700; }
.dotb { position: absolute; top: 4px; right: calc(50% - 14px); width: 7px; height: 7px; border-radius: 50%; background: #E8618C; }

@media (max-width: 760px) {
  .sidebar { display: none; }
  .topbar { display: flex; }
  .content { padding: 18px 16px calc(76px + env(safe-area-inset-bottom)); }
  .topbar { padding: 0 16px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .hm-panels { grid-template-columns: 1fr; }
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .topbar-right .tag, .topbar-right .tb-no { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
