/*
 * LIBRA OS · 青岚秩序 / EMERALD ORDER
 *
 * 设计原则：
 * 1. 暖白与青绿色构成安静、可信的工作环境。
 * 2. 蓝色只表达“可操作、被选中和信息链接”。
 * 3. 绿色只表达品牌与完成；红色只表达风险、失败和不可逆操作。
 * 4. 本文件只负责视觉与交互反馈，不改变任何业务权限和工作流。
 */

:root {
  color-scheme: light;
  --libra-bg:#f3f8f5;
  --libra-panel:#ffffff;
  --libra-panel-soft:#f7fbf9;
  --libra-sidebar:#edf6f1;
  --libra-ink:#17362e;
  --libra-muted:#6d827b;
  --libra-faint:#95a8a1;
  --libra-line:#dce9e3;
  --libra-line-strong:#c9ddd4;
  --libra-primary:#2f6fdf;
  --libra-primary-dark:#2559b8;
  --libra-primary-soft:#edf4ff;
  --libra-brand:#108b6f;
  --libra-brand-dark:#0b6b56;
  --libra-brand-soft:#e9f7f1;
  --libra-cyan:#1d9fb1;
  --libra-green:#108b6f;
  --libra-red:#c6404f;
  --libra-amber:#bf7720;
  --libra-violet:#7867c7;
  --libra-radius:16px;
  --libra-radius-lg:22px;
  --libra-shadow-sm:0 1px 2px rgba(27,70,58,.025),0 7px 20px rgba(30,74,62,.045);
  --libra-shadow:0 18px 50px rgba(24,65,54,.085);
  --sidebar-w:236px;
  --tabbar-h:66px;
  --blue:var(--libra-primary);
  --blue-dark:var(--libra-primary-dark);
  --green:var(--libra-green);
  --red:var(--libra-red);
  --orange:var(--libra-amber);
  --gray:var(--libra-muted);
  --muted:var(--libra-muted);
  --bg:var(--libra-bg);
  --card:var(--libra-panel);
  --line:var(--libra-line);
  --text:var(--libra-ink);
  --text2:var(--libra-muted);
  --radius:var(--libra-radius);
}

html { background:var(--libra-bg); }

body {
  color:var(--libra-ink);
  background:
    radial-gradient(circle at 87% -8%,rgba(56,145,119,.09),transparent 30rem),
    radial-gradient(circle at 24% 108%,rgba(47,111,223,.045),transparent 28rem),
    var(--libra-bg);
  font-family:Inter,"SF Pro Display","SF Pro Text",ui-sans-serif,-apple-system,
    BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",Arial,sans-serif;
  font-variant-numeric:tabular-nums;
  letter-spacing:-.006em;
}

::selection { color:#fff; background:rgba(16,139,111,.78); }
::-webkit-scrollbar-thumb { background:#bdd2c8; border-color:transparent; }
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline-color:rgba(47,111,223,.32);
}

/* ===== 全局骨架 ===== */
.topbar {
  min-height:66px;
  color:var(--libra-ink);
  background:rgba(250,253,251,.88);
  border-bottom-color:rgba(201,221,212,.72);
  box-shadow:0 1px 0 rgba(255,255,255,.72);
  backdrop-filter:saturate(145%) blur(22px);
  -webkit-backdrop-filter:saturate(145%) blur(22px);
}
.topbar h1 { font-weight:740; letter-spacing:-.025em; }
.topbar .back { color:#607a71; }
.topbar .back:hover { color:var(--libra-primary); background:var(--libra-primary-soft); }
.topbar .right { color:#42665b; font-weight:650; }
.topbar .right:hover { color:var(--libra-primary); }
.top-icon {
  color:#617c72;
  background:rgba(255,255,255,.86);
  border-color:var(--libra-line);
  border-radius:12px;
  box-shadow:0 5px 16px rgba(31,75,62,.055);
}
.top-icon:hover { color:var(--libra-primary); border-color:#bdd2ef; background:#f4f8ff; }

.page { animation-duration:.34s; }
.card,.list-item {
  background:rgba(255,255,255,.96);
  border-color:rgba(207,225,216,.9);
  border-radius:var(--libra-radius);
  box-shadow:var(--libra-shadow-sm);
}
.card { padding:18px; margin-bottom:14px; }
.card h3 { color:var(--libra-ink); font-weight:720; }
.card[style*="cursor:pointer"]:hover,.list-item:hover {
  border-color:#b7d7c8;
  box-shadow:0 13px 32px rgba(27,81,65,.075);
  transform:translateY(-2px);
}
.hint { color:var(--libra-muted); }
.more,.card .more { color:var(--libra-primary); }
.notice {
  position:relative;
  min-height:46px;
  padding:12px 14px 12px 43px;
  color:#49675e;
  background:linear-gradient(135deg,#f0f8f4,#f7fbf9);
  border:1px solid #d3e6dc;
  border-radius:13px;
  font-size:12.5px;
  line-height:1.65;
  box-shadow:0 5px 16px rgba(30,74,61,.035);
}
.notice:before {
  content:"i";
  position:absolute;
  left:14px;
  top:13px;
  width:20px;
  height:20px;
  display:grid;
  place-items:center;
  color:var(--libra-primary);
  background:#e6efff;
  border-radius:50%;
  font-family:Georgia,serif;
  font-size:12px;
  font-weight:700;
}

/* ===== 导航体系 ===== */
.libra-mark {
  border-color:rgba(47,111,223,.22);
  background:linear-gradient(145deg,#3f82ea 0%,#2f6fdf 58%,#178e89 125%);
  box-shadow:0 9px 24px rgba(47,111,223,.21);
}
.libra-sidebar-brand { color:var(--libra-ink); }
.libra-brand-name { color:#153c32; }
.libra-brand-sub { color:#829a91; }
.libra-nav { padding:17px 14px 20px; }
.libra-nav-group { margin-top:17px; }
.libra-nav-label { color:#88a097; font-size:9px; letter-spacing:.16em; }
.libra-nav-item {
  min-height:44px;
  padding:0 12px;
  color:#58736a;
  border-radius:12px;
  font-weight:620;
}
.libra-nav-item:hover {
  color:#255b4c;
  background:rgba(255,255,255,.68);
  border-color:rgba(207,225,216,.75);
}
.libra-nav-item.on {
  color:var(--libra-primary);
  background:rgba(255,255,255,.96);
  border-color:#d6e5f5;
  box-shadow:0 7px 20px rgba(30,76,62,.065);
}
.libra-nav-item.on svg { color:var(--libra-primary); }
.libra-finance-item {
  min-height:36px;
  margin-bottom:2px;
  padding:0 9px;
  gap:8px;
  font-size:11px;
  border-radius:10px;
}
.libra-finance-step {
  width:25px;
  height:22px;
  display:grid;
  place-items:center;
  flex:none;
  color:#769087;
  background:rgba(255,255,255,.66);
  border:1px solid #d9e7e1;
  border-radius:7px;
  font-size:8px;
  font-weight:800;
  font-variant-numeric:tabular-nums;
}
.libra-finance-item.on .libra-finance-step {
  color:#fff;
  background:linear-gradient(145deg,#2f78e7,#2b68d4);
  border-color:transparent;
}
.libra-finance-scope {
  margin:15px 0 4px;
  padding:10px 7px 8px;
  background:rgba(255,255,255,.48);
  border:1px solid #d9e8e1;
  border-radius:14px;
}
.libra-finance-scope .libra-nav-label { padding-left:5px; }
.libra-scope-item { min-height:38px; padding:4px 6px; gap:8px; }
.libra-scope-mark {
  width:25px;
  height:25px;
  display:grid;
  place-items:center;
  flex:none;
  color:#16755f;
  background:#e5f5ee;
  border-radius:8px;
  font-size:9px;
  font-weight:800;
}
.libra-scope-item.on .libra-scope-mark { color:#fff; background:#16866d; }
.libra-scope-copy { min-width:0; flex:1; display:block; }
.libra-scope-copy b,.libra-scope-copy small {
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.libra-scope-copy b { color:inherit; font-size:10.5px; }
.libra-scope-copy small { margin-top:1px; color:#91a49d; font-size:7.7px; }
.libra-sidebar-user {
  width:calc(100% - 24px);
  font-family:inherit;
  text-align:left;
  cursor:pointer;
  color:#49675d;
  background:rgba(255,255,255,.78);
  border-color:#d6e7df;
  box-shadow:0 8px 22px rgba(25,71,57,.055);
}
.libra-sidebar-user>svg { width:14px;height:14px;flex:none;color:#8ba097; }
.libra-avatar {
  color:#fff;
  background:linear-gradient(145deg,#149579,#0d715b);
  box-shadow:0 6px 14px rgba(16,139,111,.18);
}
.libra-user-name { color:#24473d; }
.libra-user-role { color:#7c958c; }
.libra-mobile-account { margin:0 11px calc(12px + env(safe-area-inset-bottom,0px));padding:10px;display:flex;align-items:center;gap:9px;color:#365c50;background:rgba(255,255,255,.82);border:1px solid #d6e6df;border-radius:13px;font-family:inherit;text-align:left; }
.libra-mobile-account>span:nth-child(2) { min-width:0;flex:1; }
.libra-mobile-account b,.libra-mobile-account small { display:block; }
.libra-mobile-account b { overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap; }
.libra-mobile-account small { margin-top:2px;color:#82978f;font-size:9px; }
.libra-mobile-account>svg { width:14px;height:14px;color:#8da198; }
.libra-account-sheet { max-width:430px; }
.libra-account-heading { margin:3px 0 16px;display:flex;align-items:center;gap:11px; }
.libra-account-heading h3,.libra-account-heading p { margin:0; }
.libra-account-heading p { margin-top:3px;color:#7b9189;font-size:11px; }
.libra-account-link { width:100%;min-height:58px;padding:9px 7px;display:flex;align-items:center;gap:11px;color:#365c50;background:transparent;border:0;border-top:1px solid #e0ebe6;font-family:inherit;text-align:left;text-decoration:none;cursor:pointer; }
.libra-account-link>svg:first-child { width:19px;height:19px;flex:none;color:var(--libra-primary); }
.libra-account-link>svg:last-child { width:14px;height:14px;flex:none;color:#9aada5; }
.libra-account-link>span { min-width:0;flex:1; }
.libra-account-link b,.libra-account-link small { display:block; }
.libra-account-link b { font-size:12.5px; }
.libra-account-link small { margin-top:3px;color:#85988f;font-size:9.5px; }
.libra-account-link:disabled { cursor:default;opacity:.58; }
.libra-account-note { margin:12px 0;padding:10px 11px;color:#95611e;background:#fff8ea;border:1px solid #f1dfb8;border-radius:11px;font-size:10.5px;line-height:1.55; }
.libra-account-password { padding:12px 4px;border-top:1px solid #e0ebe6; }
.libra-account-logout { margin-top:14px; }

.tabbar {
  height:calc(var(--tabbar-h) + env(safe-area-inset-bottom,0px));
  background:rgba(251,253,252,.94);
  border-top-color:rgba(201,221,212,.85);
  box-shadow:0 -10px 28px rgba(25,70,57,.065);
  backdrop-filter:saturate(145%) blur(22px);
  -webkit-backdrop-filter:saturate(145%) blur(22px);
}
.tabbar a { color:#81978f; }
.tabbar a.on { color:var(--libra-primary); }
.tabbar a.on .ti { background:#edf4ff; }

/* ===== 首页 / 岗位工作台 ===== */
.libra-hero {
  color:var(--libra-ink);
  background:
    radial-gradient(circle at 92% 10%,rgba(47,111,223,.09),transparent 17rem),
    linear-gradient(135deg,#eef8f3 0%,#f7fbf8 54%,#edf7f3 100%);
  border:1px solid #d2e6dc;
  box-shadow:0 16px 42px rgba(30,79,63,.075);
}
.libra-hero:before {
  right:-140px;
  top:-230px;
  border-color:rgba(16,139,111,.13);
  box-shadow:0 0 0 44px rgba(16,139,111,.025),0 0 0 88px rgba(47,111,223,.018);
}
.libra-eyebrow { color:var(--libra-primary); }
.libra-hero h2 { color:#173f34; }
.libra-hero p { color:#657f76; }
.libra-hero-chip {
  color:#496c60;
  background:rgba(255,255,255,.68);
  border-color:#d3e7dd;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.78);
}

.libra-kpi {
  position:relative;
  overflow:hidden;
  min-height:112px;
  background:#fff;
  border-color:#d8e7e0;
  border-radius:17px;
  box-shadow:0 7px 22px rgba(32,78,64,.052);
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.libra-kpi:after {
  content:"";
  position:absolute;
  left:17px;
  bottom:0;
  width:42px;
  height:3px;
  border-radius:999px 999px 0 0;
  background:var(--libra-brand);
}
.libra-kpi:nth-child(2n):after { background:var(--libra-primary); }
.libra-kpi:nth-child(3n):after { background:#829a91; }
.libra-kpi:nth-child(4n):after { background:var(--libra-amber); }
.libra-kpi[style*="cursor:pointer"]:hover {
  transform:translateY(-2px);
  border-color:#b8d5c8;
  box-shadow:0 13px 30px rgba(28,81,64,.075);
}
.libra-kpi-top { color:#73887f; }
.libra-kpi-icon { color:var(--libra-primary); background:#edf4ff; }
.libra-kpi-value { color:#173d33; font-weight:745; }
.libra-kpi-note { color:#82968f; }
.libra-section-title h3 { color:#1d4439; }
.libra-section-kicker { color:#81958e; }

.workbench-card { border-color:#d4e5dd; }
.workbench-head {
  background:linear-gradient(135deg,#edf8f3 0%,#fbfdfc 78%);
  border-bottom-color:#dceae4;
}
.work-item { border-bottom-color:#e3eee9; }
.work-item:hover { background:#f4faf7; }
.work-icon { color:var(--libra-primary); background:#edf4ff; }
.work-title { color:#23463c; }
.work-due { color:#758b82; }
.work-due span { color:var(--libra-primary); }

.libra-module-link,.libra-quick {
  color:#38584e;
  background:#f7fbf9;
  border-color:#dbe9e3;
  border-radius:13px;
}
.libra-module-link:hover,.libra-quick:hover {
  color:var(--libra-primary);
  background:#f4f8ff;
  border-color:#c9daef;
  box-shadow:0 8px 20px rgba(47,111,223,.065);
}
.libra-module-link .libra-module-icon {
  color:var(--libra-brand-dark);
  background:#e9f7f1;
}
.libra-quick svg { color:var(--libra-brand); }
.libra-company-row,.libra-compact-row,.libra-ann-row { border-bottom-color:#e1ece7; }
.libra-company-row:hover { background:#f4faf7; }
.libra-company-mark {
  color:var(--libra-brand-dark);
  background:var(--libra-brand-soft);
}
.libra-company-money { color:#24473d; }

.board-company { border-color:#d4e5dd; }
.board-company-code {
  color:#0d755e !important;
  background:#e8f7f0 !important;
  border:1px solid #cfe9dd;
}
.board-metric {
  background:#f6faf8 !important;
  border-color:#dce9e3 !important;
  border-radius:12px !important;
  transition:background .16s,border-color .16s,transform .16s;
}
.board-metric:hover {
  background:#f3f8ff !important;
  border-color:#cbdcf0 !important;
  transform:translateY(-1px);
}
.board-links a {
  color:var(--libra-primary) !important;
  background:#edf4ff !important;
  border:1px solid #dce8f7;
}

/* ===== 组件系统 ===== */
.grid .cell {
  color:#38574e;
  background:#f7fbf9;
  border-color:#dbe9e3;
  border-radius:13px;
}
.grid .cell:hover {
  color:var(--libra-primary);
  border-color:#c5d8ef;
  background:#f3f7ff;
}
.cell .ico {
  color:var(--libra-brand-dark);
  background:linear-gradient(145deg,#effaf5,#e4f4ed);
  border-color:#d0e8dd;
}

.field>label { color:#567168; font-weight:650; }
.field input[type=text],.field input[type=number],.field input[type=date],
.field input[type=month],.field input[type=time],.field input[type=datetime-local],
.field input[type=tel],.field input[type=password],.field select,.field textarea {
  min-height:46px;
  color:#17362e;
  background:#fff;
  border-color:#cbded5;
  border-radius:12px;
  box-shadow:inset 0 1px 1px rgba(24,67,55,.018);
}
.field input::placeholder,.field textarea::placeholder { color:#a0b0aa; }
.field input:focus,.field select:focus,.field textarea:focus {
  border-color:#76a5e9;
  box-shadow:0 0 0 4px rgba(47,111,223,.1);
}
.field input:disabled,.field select:disabled,.field textarea:disabled {
  color:#70867e;
  background:#f4f8f6;
}
.opts .opt {
  color:#4e6b61;
  background:#fff;
  border-color:#cbded5;
  border-radius:10px;
}
.opts .opt:hover { color:var(--libra-primary); border-color:#a9c5e7; }
.opts .opt.on {
  color:#fff;
  background:linear-gradient(135deg,#3c7ae1,#2c66ca);
  border-color:#2f6fdf;
  box-shadow:0 7px 16px rgba(47,111,223,.17);
}

.btn { min-height:46px; border-radius:12px; font-weight:690; }
.btn-primary {
  background:linear-gradient(135deg,#3979e3,#2b66cd);
  box-shadow:0 9px 20px rgba(47,111,223,.19);
}
.btn-primary:hover:not(:disabled) { box-shadow:0 12px 27px rgba(47,111,223,.24); }
.btn-green {
  background:linear-gradient(135deg,#169777,#0d755e);
  box-shadow:0 8px 18px rgba(16,139,111,.18);
}
.btn-red { background:#c6404f; }
.btn-ghost { color:#49675e; background:#fff; border-color:#cbded5; }
.btn-ghost:hover:not(:disabled) { color:var(--libra-primary); background:#f4f8ff; border-color:#aec9e8; }
.mini-btn { color:var(--libra-primary); border-color:#b8d0ec; border-radius:10px; }

.seg {
  padding:5px;
  background:#eaf2ee;
  border-color:#dae8e1;
  border-radius:13px;
}
.seg div { color:#6e847b; border-radius:9px; font-weight:620; }
.seg div.on {
  color:#24483e;
  background:#fff;
  box-shadow:0 5px 14px rgba(27,72,58,.07);
}

.st-draft,.st-withdrawn { background:#f1f5f3; color:#70857e; }
.st-pending { background:#edf4ff; color:#2b60bd; }
.st-approved,.st-paid,.st-posted { background:#e9f7f1; color:#0c755c; }
.st-rejected { background:#fff0f1; color:#b52f40; }
.st-voided { background:#f1f4f2; color:#8fa19a; }

table { color:#2c4c42; }
th { color:#6e837b; background:#f3f8f5; }
th,td { border-bottom-color:#dfebe5; }
tbody tr:hover { background:#f5faf7; }

.timeline .tl-item:before { border-color:#fff; }
.timeline .tl-item.now:before { background:var(--libra-primary); box-shadow:0 0 0 4px #dce9fb; }
.timeline .tl-item.ok:before { background:var(--libra-green); box-shadow:0 0 0 1px var(--libra-green); }
.timeline .tl-item:after { background:#dbe8e2; }
.thumbs .th,.thumbs .th-add { background:#f7fbf9; border-color:#cddfd7; }

.mask { background:rgba(16,41,34,.42); backdrop-filter:blur(7px); -webkit-backdrop-filter:blur(7px); }
.sheet {
  background:#fbfdfc;
  border-color:rgba(255,255,255,.8);
  border-radius:24px;
  box-shadow:0 30px 90px rgba(11,47,37,.23);
}
.sheet:before { background:#ccdcd5; }
.libra-sheet-close { color:#698078; background:#f3f8f5; border-color:#d8e7e0; }
.libra-sheet-close:hover { color:var(--libra-primary); background:#edf4ff; border-color:#c9daf0; }
.notif-row { border-bottom-color:#dfeae5; }
.notif-row.unread { background:#f0f6ff; }
.notif-ico { color:var(--libra-primary); background:#e7f0ff; }
.notif-title { color:#38584e; }

#toast {
  color:#f7fffb;
  background:rgba(20,55,46,.95);
  border-color:rgba(255,255,255,.12);
  border-radius:12px;
  box-shadow:0 16px 40px rgba(10,42,33,.24);
}

/* ===== 业务页信息架构：岗位、范围和可信边界先于功能 ===== */
.libra-module-hero {
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:14px 24px;
  overflow:hidden;
  margin-bottom:16px;
  padding:22px 24px 17px;
  background:
    radial-gradient(circle at 96% -18%,rgba(47,111,223,.105),transparent 17rem),
    linear-gradient(135deg,#edf8f3 0%,#f9fcfa 72%,#edf6f2 100%);
  border:1px solid #d1e5db;
  border-radius:var(--libra-radius-lg);
  box-shadow:0 14px 38px rgba(27,76,60,.065);
}
.libra-module-copy { min-width:0; }
.libra-module-copy h2 {
  margin:5px 0 6px;
  color:#173f34;
  font-size:24px;
  line-height:1.24;
  letter-spacing:-.035em;
}
.libra-module-copy p {
  max-width:760px;
  margin:0;
  color:#657f76;
  font-size:13px;
  line-height:1.65;
}
.libra-module-context {
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:center;
  gap:6px;
  min-width:190px;
}
.libra-module-context span {
  max-width:300px;
  padding:5px 10px;
  color:#486c60;
  background:rgba(255,255,255,.78);
  border:1px solid #d5e7de;
  border-radius:999px;
  font-size:11px;
  line-height:1.3;
  text-align:right;
}
.libra-trust-strip {
  grid-column:1/-1;
  display:flex;
  gap:18px;
  padding-top:12px;
  border-top:1px solid rgba(201,221,212,.75);
  color:#71887f;
  font-size:10.5px;
  letter-spacing:.01em;
}
.libra-trust-strip span:before {
  content:"";
  display:inline-block;
  width:5px;
  height:5px;
  margin:0 7px 1px 0;
  background:var(--libra-brand);
  border-radius:50%;
  box-shadow:0 0 0 3px rgba(16,139,111,.1);
}

/* 二级导航与筛选器保持在可见区，让长页面不必反复回到顶部。
   各页的 .seg 位于 .page 直接子级或视图容器（.page > div）内，两种位置都要覆盖。 */
body:not([data-libra-page="home"]):not([data-libra-page="admin"]) #app>.page>.seg,
body:not([data-libra-page="home"]):not([data-libra-page="admin"]) #app>.page>div>.seg {
  position:sticky;
  top:84px;
  z-index:8;
  margin-bottom:16px;
  padding:6px;
  background:rgba(234,242,238,.9);
  border:1px solid rgba(211,228,219,.92);
  box-shadow:0 8px 24px rgba(25,70,57,.055);
  backdrop-filter:blur(18px) saturate(135%);
  -webkit-backdrop-filter:blur(18px) saturate(135%);
}
body[data-libra-page="approval"] .amount-input {
  min-height:62px !important;
  color:#173d33 !important;
  font-size:27px !important;
  font-weight:720;
  letter-spacing:-.035em;
}
body[data-libra-page="approval"] .timeline,
body[data-libra-page="payroll"] .timeline { padding-left:4px; }
body[data-libra-page="finance"] .sumcard,
body[data-libra-page="inventory"] .sumcard { min-height:48px; }
body[data-libra-page="finance"] .sumcard .num { font-variant-numeric:tabular-nums; }
body[data-libra-page="payroll"] .grid-scroll,
body[data-libra-page="shift"] [style*="overflow-x:auto"],
body[data-libra-page="patrol"] [style*="overflow-x:auto"],
body[data-libra-page="inventory"] [style*="overflow-x:auto"] {
  border:1px solid var(--libra-line);
  border-radius:14px;
  background:#fff;
  box-shadow:inset -14px 0 18px -20px rgba(18,57,46,.35);
}
body[data-libra-page="payroll"] table.board th,
body[data-libra-page="payroll"] table.sheet-tb th,
body[data-libra-page="shift"] .attgrid th,
body[data-libra-page="patrol"] .gridtbl th {
  position:sticky;
  top:0;
  z-index:3;
  color:#5c766d;
  background:#f2f8f5 !important;
}
body[data-libra-page="payroll"] table.board td.today { background:#eef5ff; }
body[data-libra-page="shift"] .punchbtn {
  min-height:92px;
  border-radius:18px;
  box-shadow:0 12px 28px rgba(47,111,223,.15);
  transition:transform .16s ease,box-shadow .16s ease;
}
body[data-libra-page="shift"] .punchbtn:active { transform:scale(.985); }
body[data-libra-page="shift"] .punch-in { background:linear-gradient(135deg,#3979e3,#2c66cd); }
body[data-libra-page="shift"] .punch-out { background:linear-gradient(135deg,#169777,#0d755e); }
body[data-libra-page="patrol"] .bigok {
  background:linear-gradient(145deg,#f4fbf7,#fff);
  border-color:#d4e8de;
}
body[data-libra-page="patrol"] .scanbox .tip {
  margin:0 18px;
  padding:11px 14px;
  background:rgba(13,39,32,.68);
  border:1px solid rgba(255,255,255,.18);
  border-radius:12px;
  backdrop-filter:blur(12px);
}
.empty {
  min-height:58px;
  color:#80958d;
  line-height:1.6;
}
.list-item {
  border-color:#d9e8e1;
  border-radius:14px;
  box-shadow:0 5px 16px rgba(28,76,61,.035);
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.list-item:hover {
  transform:translateY(-1px);
  border-color:#c1d9ce;
  box-shadow:0 10px 24px rgba(28,76,61,.06);
}

/* ===== 岗位专属工作台 ===== */
.libra-role-actions {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}
.libra-role-action {
  display:flex;
  align-items:center;
  gap:11px;
  min-width:0;
  padding:13px 14px;
  color:#36574c;
  background:rgba(255,255,255,.72);
  border:1px solid #d7e7df;
  border-radius:14px;
  cursor:pointer;
  font:inherit;
  text-align:left;
  transition:transform .16s ease,border-color .16s ease,background .16s ease;
}
.libra-role-action:hover { transform:translateY(-1px); background:#fff; border-color:#bcd8cb; }
.libra-role-action svg { flex:none; width:19px; height:19px; color:var(--libra-primary); stroke-width:1.8; }
.libra-role-action-copy { min-width:0; }
.libra-role-action-copy b,.libra-role-action-copy span { display:block; }
.libra-role-action-copy b { color:#24483d; font-size:13px; }
.libra-role-action-copy span { overflow:hidden; margin-top:2px; color:#81958e; font-size:10.5px; text-overflow:ellipsis; white-space:nowrap; }

/* ===== 趋势、异常与数据下钻 ===== */
.libra-insight-grid { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(240px,.7fr); gap:14px; }
.libra-trend-chart { min-width:0; }
.libra-trend-legend { display:flex; align-items:center; gap:16px; color:#71877f; font-size:11px; }
.libra-trend-legend i { display:inline-block; width:18px; height:3px; margin-right:5px; border-radius:999px; vertical-align:middle; }
.libra-trend-svg { display:block; width:100%; min-height:190px; margin-top:8px; overflow:visible; }
.libra-trend-grid { stroke:#dfeae5; stroke-width:1; }
.libra-trend-income { fill:none; stroke:var(--libra-brand); stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
.libra-trend-expense { fill:none; stroke:var(--libra-primary); stroke-width:2.5; stroke-linecap:round; stroke-linejoin:round; }
.libra-trend-dot-income { fill:#fff; stroke:var(--libra-brand); stroke-width:2; }
.libra-trend-dot-expense { fill:#fff; stroke:var(--libra-primary); stroke-width:2; }
.libra-trend-label { fill:#80958d; font-size:10px; }
.libra-risk-list { display:flex; flex-direction:column; gap:8px; margin-top:12px; }
.libra-risk-row {
  display:flex;
  align-items:center;
  gap:10px;
  min-height:50px;
  padding:10px 12px;
  background:#f7fbf9;
  border:1px solid #dce9e3;
  border-radius:12px;
  cursor:pointer;
}
.libra-risk-row:hover { background:#fff; border-color:#c8ddd3; }
.libra-risk-row strong { min-width:34px; color:#b53948; font-size:18px; text-align:center; }
.libra-risk-row span { color:#4f6e63; font-size:12px; }
.libra-data-provenance {
  margin-top:10px;
  color:#83978f;
  font-size:10.5px;
  line-height:1.55;
}

/* ===== 网络、请求进度与可访问性 ===== */
.libra-request-progress {
  position:fixed;
  z-index:120;
  top:0;
  left:0;
  width:100%;
  height:3px;
  pointer-events:none;
  opacity:0;
  transform:scaleX(.06);
  transform-origin:left;
  background:linear-gradient(90deg,var(--libra-brand),var(--libra-primary),var(--libra-brand));
  background-size:180% 100%;
  transition:opacity .16s ease,transform .45s ease;
}
.libra-api-busy .libra-request-progress {
  opacity:1;
  transform:scaleX(.78);
  animation:libra-progress 1.3s linear infinite;
}
.libra-network-state {
  display:none;
  position:fixed;
  z-index:118;
  top:8px;
  left:50%;
  width:min(620px,calc(100% - 24px));
  padding:10px 13px;
  color:#7e4d11;
  background:#fff9ea;
  border:1px solid #e9cd8d;
  border-radius:12px;
  box-shadow:0 12px 32px rgba(72,50,16,.14);
  transform:translateX(-50%);
  font-size:12px;
}
.libra-network-state b { margin-right:10px; }
.libra-offline .libra-network-state { display:block; }
@keyframes libra-progress { from{background-position:100% 0} to{background-position:-80% 0} }

/* ===== 组织与治理 ===== */
.org-hero,.rules-hero,.access-hero {
  color:var(--libra-ink) !important;
  background:
    radial-gradient(circle at 94% 4%,rgba(47,111,223,.09),transparent 15rem),
    linear-gradient(135deg,#edf8f3,#f7fbf9 62%,#eef7f3) !important;
  border:1px solid #d1e5db !important;
  box-shadow:0 15px 38px rgba(27,76,60,.07) !important;
}
.org-hero:after,.rules-hero:after,.access-hero:after {
  border-color:rgba(16,139,111,.14) !important;
  box-shadow:0 0 0 38px rgba(16,139,111,.025),0 0 0 76px rgba(47,111,223,.018) !important;
}
.org-hero .hint,.rules-hero .hint,.access-hero .hint { color:#687f77 !important; }
.rules-lock {
  color:#356357;
  background:rgba(255,255,255,.7);
  border-color:#cfe2d9;
}
.access-stat {
  color:#1e463a;
  background:rgba(255,255,255,.76);
  border-color:#d4e5dd;
  box-shadow:0 5px 15px rgba(28,77,61,.04);
}
.access-stat span { color:#71867e; }
.access-toolbar input {
  min-height:44px;
  padding:9px 12px;
  color:var(--libra-ink);
  background:#fff;
  border:1px solid #cbded5;
  border-radius:11px;
  outline:none;
  box-shadow:inset 0 1px 1px rgba(24,67,55,.018);
}
.access-toolbar input:focus {
  border-color:#76a5e9;
  box-shadow:0 0 0 4px rgba(47,111,223,.1);
}
.org-unit,.policy-card,.access-card { border-color:#d7e7df; }
.org-unit-icon,.branch-code,.access-section-code,.level-badge,.rule-count,.access-section-count {
  color:#0d755e !important;
  background:#e8f7f0 !important;
}
.holder { background:#f6faf8 !important; border-color:#dfebe5 !important; }
.vacant { color:#9a6317; background:#fffaed; border-color:#e9c986; }
.flow-node,.policy-flow .flow-node {
  color:#275da9;
  background:#edf4ff;
  border-color:#cadcf2;
}
.scope-chip { color:#587168; border-color:#d4e5dd; }
.scope-chip.on {
  color:#fff;
  border-color:#2f6fdf;
  background:linear-gradient(135deg,#3c7ae1,#2c65cb);
  box-shadow:0 7px 18px rgba(47,111,223,.17);
}
.policy-lock { color:#0d755e; background:#e9f7f1; border-color:#cbe9dc; }
.policy-kv,.access-meta>div,.access-cap { background:#f5faf7; }
.access-module { color:#35574c; background:#eef6f2; }
.access-profile span { color:#365ba8; background:#edf2ff; }

/* ===== 登录页 ===== */
body.libra-login-page {
  padding:0;
  background:#f2f8f4 !important;
}
.login-shell { background:#f2f8f4; }
.login-story {
  color:var(--libra-ink) !important;
  background:
    radial-gradient(circle at 80% 16%,rgba(47,111,223,.1),transparent 25rem),
    linear-gradient(145deg,#e8f6ef 0%,#f3f9f6 62%,#e8f3ef 100%) !important;
  border-right:1px solid #d5e7de;
}
.login-story:before {
  border-color:rgba(16,139,111,.13) !important;
  box-shadow:0 0 0 70px rgba(16,139,111,.025),0 0 0 140px rgba(47,111,223,.018) !important;
}
.login-brand-name { color:#143d31; }
.login-brand-sub { color:#7c958c !important; }
.login-kicker { color:var(--libra-primary) !important; }
.login-message h1 { color:#153e32; }
.login-message p { color:#657f76 !important; }
.company-tags span {
  color:#4f6d63 !important;
  background:rgba(255,255,255,.64) !important;
  border-color:#d3e5dc !important;
}
.login-form-side { background:#f8fbf9 !important; }
.login-heading .eyebrow { color:var(--libra-brand) !important; }
.login-heading h2 { color:#173b31; }
.panel {
  background:rgba(255,255,255,.96) !important;
  border-color:#d4e5dd !important;
  border-radius:20px !important;
  box-shadow:0 22px 60px rgba(28,75,60,.09) !important;
}
.login-foot { color:#83988f !important; }
.login-foot i { background:var(--libra-brand) !important; box-shadow:0 0 0 3px #d9f2e7 !important; }

/* 财务总览保持高信息密度，但不使用旧版整块深蓝。 */
body[data-libra-page="finance"] .finance-summary-card {
  color:#173d33 !important;
  background:
    radial-gradient(circle at 93% -40%,rgba(47,111,223,.11),transparent 14rem),
    linear-gradient(135deg,#edf8f3,#f8fbf9) !important;
  border-color:#d1e5db !important;
}
body[data-libra-page="finance"] .finance-summary-card .kpi {
  padding:4px 8px;
}
body[data-libra-page="finance"] .finance-summary-card .kpi+.kpi {
  border-left:1px solid #d6e6de;
}
body[data-libra-page="finance"] .finance-summary-card .kpi .l {
  color:#72877f !important;
}

/* ===== 调试环境和可信提示 ===== */
.libra-debug-banner,.login-debug {
  color:#8d5712;
  background:linear-gradient(90deg,#fff9ec,#fffdf7);
  border-color:#edd49d;
}
.libra-debug-banner b,.login-debug b { background:#b96e18; }
.libra-debug-banner em { color:#9a641e; border-left-color:#e5c37e; }

/* ===== 桌面端 ===== */
@media(min-width:900px) {
  /* 专业财务目录有 18 个流程页与账套范围，比全局 272px 再宽一档。 */
  body[data-libra-page="accounting"] { --sidebar-w:288px; }
  .libra-sidebar {
    background:
      radial-gradient(circle at 15% 0%,rgba(47,111,223,.055),transparent 17rem),
      linear-gradient(180deg,#eff7f3 0%,#f5faf7 56%,#edf6f1 100%);
    border-right:1px solid #d5e5dd;
    box-shadow:8px 0 30px rgba(29,70,58,.045);
  }
  .topbar { min-height:72px; padding:13px 28px; }
  .page { padding:26px 28px 44px; }
  .card { padding:20px; margin-bottom:16px; }
  .sheet {
    background:#fbfdfc;
    border-left:1px solid #d7e5df;
    border-radius:24px 0 0 24px;
  }
}

/* ===== 手机端：独立工作台而非缩小桌面 ===== */
@media(max-width:899px) {
  body {
    background:
      radial-gradient(circle at 88% -2%,rgba(16,139,111,.07),transparent 19rem),
      #f4f8f6;
  }
  .topbar { background:rgba(250,253,251,.94); }
  .libra-hero { padding:21px 18px; border-radius:18px; }
  .libra-hero p { max-width:92%; }
  .libra-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .libra-kpi { min-height:100px; }
  .libra-kpi:after { left:13px; width:34px; }
  .sheet { background:#fbfdfc; }
  body:not([data-libra-page="home"]):not([data-libra-page="admin"]) #app>.page>.seg,
  body:not([data-libra-page="home"]):not([data-libra-page="admin"]) #app>.page>div>.seg {
    top:68px;
    overflow-x:auto;
    justify-content:flex-start;
  }
  .libra-module-hero { grid-template-columns:1fr; padding:18px; }
  .libra-module-context { flex-direction:row; align-items:center; justify-content:flex-start; flex-wrap:wrap; min-width:0; }
  .libra-module-context span { max-width:100%; text-align:left; }
  .libra-trust-strip { overflow-x:auto; gap:14px; padding-bottom:2px; white-space:nowrap; }
  .libra-role-actions { grid-template-columns:1fr; }
  .libra-insight-grid { grid-template-columns:1fr; }
}

@media(max-width:520px) {
  .page { padding:12px 12px 18px; }
  .topbar { min-height:58px; }
  .card { padding:15px; border-radius:15px; }
  .libra-hero { padding:20px 16px; }
  .libra-hero h2 { font-size:22px; }
  .libra-hero-meta { margin-top:14px; gap:6px; }
  .libra-hero-chip { padding:4px 8px; font-size:10px; }
  .libra-kpi-grid { gap:9px; }
  .libra-kpi { min-height:98px; padding:14px; border-radius:15px; }
  .libra-kpi-value { font-size:19px; }
  .libra-module-grid { grid-template-columns:1fr; }
  .board-metric { padding:9px !important; }
  .sumcard {
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:7px 10px !important;
    align-items:center;
  }
  .sumcard>b { grid-column:1/-1; font-size:14px; }
  .sumcard .num { min-width:0; font-size:12px !important; white-space:nowrap; }
  .seg { margin-bottom:12px; }
  .seg div { padding:8px 10px; }
  .sheet { border-radius:22px 22px 8px 8px; }
  .panel { padding:23px 19px !important; }
  .libra-module-hero { margin-bottom:12px; padding:16px; border-radius:17px; }
  .libra-module-copy h2 { font-size:20px; }
  .libra-module-copy p { font-size:12px; }
  .libra-module-context span:nth-child(2) { max-width:100%; }
  .libra-trend-svg { min-height:150px; }
}

@media(prefers-contrast:more) {
  :root { --libra-line:#aebfb8; --libra-line-strong:#8fa69c; }
  .card,.list-item,.libra-kpi { box-shadow:none; }
  .hint,.libra-muted { color:#526860; }
}

@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}

/* ===== 2026-09 · 全局多级目录 ===== */
:root { --sidebar-w:272px; }
/* 页内横向一级菜单已从各页删除；此守卫保留，防止再次出现与左侧目录并存的第二套导航。 */
.libra-primary-tabs { display:none !important; }
.libra-nav-category,.libra-nav-module,.libra-nav-subgroup { display:block;margin:0;border:0; }
.libra-nav-category>summary,.libra-nav-module>summary,.libra-nav-subgroup>summary { list-style:none;cursor:pointer;user-select:none; }
.libra-nav-category>summary::-webkit-details-marker,
.libra-nav-module>summary::-webkit-details-marker,
.libra-nav-subgroup>summary::-webkit-details-marker { display:none; }
.libra-nav-category { margin-bottom:8px; }
.libra-nav-category-summary { min-height:30px;padding:0 8px;display:flex;align-items:center;gap:7px;color:#82988f;font-size:9px;font-weight:800;letter-spacing:.16em; }
.libra-nav-category-summary>span:first-child { flex:1; }
.libra-nav-category.active>.libra-nav-category-summary { color:#3f685b; }
.libra-nav-category-body { padding:2px 0 3px; }
.libra-nav-module { margin-bottom:3px; }
.libra-nav-module-summary { min-height:43px;padding:0 10px;display:flex;align-items:center;gap:10px;color:#58736a;border:1px solid transparent;border-radius:12px;font-size:12.5px;font-weight:700;transition:color .16s,background .16s,border-color .16s; }
.libra-nav-module-summary>svg { width:17px;height:17px;flex:none;stroke-width:1.8; }
.libra-nav-module-summary:hover { color:#255b4c;background:rgba(255,255,255,.72);border-color:#dbe8e2; }
.libra-nav-module.active>.libra-nav-module-summary { color:var(--libra-primary);background:rgba(255,255,255,.96);border-color:#d6e5f5;box-shadow:0 7px 20px rgba(30,76,62,.055); }
.libra-nav-module.active>.libra-nav-module-summary>svg { color:var(--libra-primary); }
.libra-nav-caret { width:16px;height:16px;display:grid;place-items:center;flex:none;color:#96aaa2;transition:transform .18s ease; }
.libra-nav-caret svg { width:13px;height:13px;stroke-width:2; }
.libra-nav-category[open]>.libra-nav-category-summary>.libra-nav-caret,
.libra-nav-module[open]>.libra-nav-module-summary>.libra-nav-caret,
.libra-nav-subgroup[open]>summary>.libra-nav-caret { transform:rotate(90deg); }
.libra-nav-children { margin:3px 0 6px 19px;padding:2px 0 2px 10px;border-left:1px solid #d5e4dd; }
.libra-nav-item.libra-nav-leaf { min-height:34px;margin:1px 0;padding:0 9px;gap:8px;color:#6b8179;border-radius:9px;font-size:11px;font-weight:620; }
.libra-nav-item.libra-nav-leaf:hover { color:#245d4d;background:rgba(255,255,255,.72); }
.libra-nav-item.libra-nav-leaf.on { color:#255ebd;background:#f8fbff;border-color:#d7e5f5;box-shadow:none; }
.libra-nav-dot { width:5px;height:5px;flex:none;border-radius:50%;background:#b6c8c1; }
.libra-nav-leaf.on .libra-nav-dot { background:var(--libra-primary);box-shadow:0 0 0 3px #e7f0ff; }
.libra-nav-subgroup { margin:3px 0; }
.libra-nav-subgroup>summary { min-height:30px;padding:0 8px;display:flex;align-items:center;gap:7px;color:#70877f;font-size:10px;font-weight:760; }
.libra-nav-subgroup>summary>span:first-child { flex:1; }
.libra-nav-subgroup.active>summary { color:#315f52; }
.libra-nav-subgroup-body { padding-left:3px; }
.libra-finance-scope { margin:3px 0;padding:0;background:transparent;border:0;border-radius:0; }
.libra-finance-scope .libra-scope-item { min-height:39px;padding:4px 7px; }
.libra-nav-module-link { font-weight:700; }
.libra-sidebar .libra-nav { padding:13px 12px 18px; }
.libra-sidebar-user { margin-top:4px; }

.libra-mobile-menu-button,.libra-mobile-drawer { display:none; }
.libra-economic-toolbar { margin:14px 0 12px;padding:11px 13px;display:flex;align-items:center;gap:12px;background:rgba(255,255,255,.74);border:1px solid #d9e8e1;border-radius:14px;box-shadow:var(--libra-shadow-sm); }
.libra-economic-toolbar>div:first-child { min-width:0;flex:1; }
.libra-economic-toolbar b,.libra-economic-toolbar span { display:block; }
.libra-economic-toolbar b { color:#24483d;font-size:12.5px; }
.libra-economic-toolbar span { margin-top:2px;color:#81948d;font-size:9.5px; }
.libra-period-switch { padding:3px;display:flex;gap:3px;background:#edf4f1;border:1px solid #dce8e3;border-radius:10px; }
.libra-period-switch button { min-width:62px;height:32px;padding:0 12px;color:#71877f;background:transparent;border:0;border-radius:8px;font-size:11px;font-weight:700;cursor:pointer; }
.libra-period-switch button.on { color:#245f50;background:#fff;box-shadow:0 3px 10px rgba(30,74,62,.08); }
.libra-economic-kpis { margin-bottom:14px; }
.libra-economic-companies { margin-top:14px; }
.libra-cash-difference { margin-top:10px;padding:7px 9px;color:#a45b18;background:#fff8eb;border:1px solid #f1ddb5;border-radius:9px;font-size:10.5px; }
.libra-workbench-followup { margin-top:14px; }
.libra-workbench-followup>.card+.card { margin-top:14px; }
@media(max-width:899px) {
  body.libra-mobile-nav-open { overflow:hidden; }
  .libra-mobile-menu-button { width:38px;height:38px;display:grid;place-items:center;flex:none;color:#41655a;background:#fff;border:1px solid #d8e6df;border-radius:11px;box-shadow:var(--libra-shadow-sm);cursor:pointer; }
  .libra-mobile-menu-button svg { width:18px;height:18px; }
  .libra-mobile-drawer { position:fixed;inset:0;z-index:110;display:block;visibility:hidden;pointer-events:none; }
  .libra-mobile-drawer.open { visibility:visible;pointer-events:auto; }
  .libra-mobile-drawer-mask { position:absolute;inset:0;border:0;background:rgba(10,30,24,.38);opacity:0;transition:opacity .2s; }
  .libra-mobile-drawer.open .libra-mobile-drawer-mask { opacity:1; }
  .libra-mobile-drawer-panel { position:absolute;inset:0 auto 0 0;width:min(88vw,370px);display:flex;flex-direction:column;background:linear-gradient(180deg,#eff7f3,#eaf4ef);border-right:1px solid #d4e4dc;box-shadow:24px 0 60px rgba(20,54,43,.2);transform:translateX(-102%);transition:transform .24s cubic-bezier(.2,.75,.25,1); }
  .libra-mobile-drawer.open .libra-mobile-drawer-panel { transform:none; }
  .libra-mobile-drawer-head { min-height:68px;padding:10px 13px;display:flex;align-items:center;gap:10px;border-bottom:1px solid #dbe8e2; }
  .libra-mobile-drawer-head>span:nth-child(2) { min-width:0;flex:1; }
  .libra-mobile-drawer-head b,.libra-mobile-drawer-head small { display:block; }
  .libra-mobile-drawer-head b { color:#21483d;font-size:14px; }
  .libra-mobile-drawer-head small { margin-top:2px;color:#789087;font-size:9.5px; }
  .libra-mobile-drawer-close { width:36px;height:36px;display:grid;place-items:center;color:#6f857d;background:#fff;border:1px solid #d9e7e1;border-radius:10px; }
  .libra-mobile-drawer-close svg { width:16px;height:16px; }
  .libra-mobile-drawer .libra-nav { padding:12px 11px calc(92px + env(safe-area-inset-bottom,0px)); }
  .libra-economic-toolbar { align-items:stretch;flex-direction:column; }
  .libra-period-switch button { min-width:0;flex:1; }
}
