/* ============================================================
   企业综合工作平台 · 视觉规范（对齐企业 VI V3.0）
   佛山超然拿捏金属制品有限公司
   主色 钢岩绿 #0B4B42 ｜ 深绿底 #083832 ｜ 暖金 #D4AF37 ｜ 亮金 #E8B84B
   中文：思源黑体（Noto Sans SC）｜ 英文/数字：Oswald
   ============================================================ */

:root {
  /* 品牌色 */
  --primary: #0B4B42;        /* 钢岩绿（主色） */
  --primary-2: #083832;      /* 深绿底 */
  --primary-3: #12625A;      /* 浅绿（悬停/链接） */
  --accent: #D4AF37;         /* 暖金（强调） */
  --accent-soft: #E8B84B;    /* 亮金 */
  --accent-tint: #F6EED4;    /* 金色浅底 */

  /* 中性 */
  --bg: #FCFBF7;             /* 纸色 */
  --surface: #FFFFFF;
  --surface-2: #F7F9F8;
  --surface-3: #EEF0EE;
  --ink: #1C2522;
  --ink-2: #3A4541;
  --muted: #6B7672;
  --muted-2: #9AA4A0;
  --border: #E3E2DB;
  --border-2: #D8D7CF;

  /* 语义色（金融：红涨绿跌） */
  --red: #C0392B;
  --red-tint: #F9E7E4;
  --green: #1E7D4F;
  --green-tint: #E3F0E9;
  --warn: #B7791F;
  --warn-tint: #F7EEDC;

  /* 字体 */
  --font-ui: "Noto Sans SC", "Source Han Sans SC", "HarmonyOS Sans SC", sans-serif;
  --font-display: "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --font-mono: "Oswald", "Noto Sans", sans-serif;

  /* 尺寸 */
  --sidebar-w: 248px;
  --topbar-h: 64px;
  --radius: 10px;
  --radius-sm: 6px;

  --shadow-sm: 0 1px 2px rgba(28, 37, 34, 0.05);
  --shadow: 0 6px 20px -8px rgba(11, 75, 66, 0.16);
  --shadow-lg: 0 18px 44px -16px rgba(8, 56, 50, 0.24);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* hidden 属性必须压过组件的 display（否则视图切换失效，两套界面会叠加渲染） */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 14px;
  line-height: 1.6;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

i[data-icon] { display: inline-flex; }
i[data-icon] svg { width: 1em; height: 1em; display: block; }

.hidden { display: none !important; }

/* ============================================================
   登录视图
   ============================================================ */
.login-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: stretch;
}

/* 左侧品牌面板 */
.login-brand {
  position: relative;
  background: linear-gradient(150deg, #062E2A 0%, var(--primary) 55%, var(--primary-3) 100%);
  color: #EAF3F0;
  padding: 56px clamp(40px, 5vw, 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.brand-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}
.brand-grid::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(900px 500px at 85% 8%, rgba(212,175,55,0.16), transparent 60%);
}

.brand-logo { position: relative; height: 88px; width: auto; max-width: 100%; margin-bottom: 38px; display: block; align-self: flex-start; }

.brand-copy { position: relative; margin-bottom: 40px; max-width: 520px; }
.brand-copy h1 {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 2.5vw, 38px); line-height: 1.25;
  letter-spacing: 1px; margin-bottom: 14px;
}
.brand-copy h1::after {
  content: ""; display: block; width: 64px; height: 4px; background: var(--accent); margin-top: 18px;
}
.brand-sub { color: #BFD4CE; font-size: 15px; letter-spacing: 1px; }

.brand-features { position: relative; display: grid; gap: 16px; margin-bottom: 40px; max-width: 520px; }
.brand-features li { display: flex; gap: 14px; align-items: flex-start; }
.brand-features li > i {
  width: 34px; height: 34px; flex: none; align-items: center; justify-content: center;
  font-size: 17px; color: var(--accent-soft);
  border: 1px solid rgba(212,175,55,0.35); background: rgba(212,175,55,0.08);
}
.brand-features b { display: block; font-size: 15px; font-weight: 500; color: #fff; line-height: 1.5; }
.brand-features span { font-size: 13px; color: #A8BDB8; line-height: 1.5; }

.brand-foot {
  position: relative; font-size: 12.5px; color: #8FB0A9;
  border-top: 1px solid rgba(255,255,255,0.12); padding-top: 18px; max-width: 520px;
}

/* 右侧登录面板 */
.login-panel {
  background: var(--bg);
  display: flex; align-items: center; justify-content: center; padding: 40px;
}
.login-card {
  width: 100%; max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 38px 38px 28px;
  position: relative;
}
.login-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 24%, transparent 24%, transparent 100%);
}
.login-card-head { display: flex; gap: 16px; align-items: center; margin-bottom: 30px; }
.login-shield { width: 52px; height: auto; flex: none; }
.login-title { font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.login-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

.wecom-qr-wrap { display: flex; flex-direction: column; align-items: center; margin-bottom: 22px; }
.qr-frame {
  width: 196px; height: 196px; padding: 12px;
  border: 1px solid var(--border-2); background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.qr-frame svg { width: 100%; height: 100%; }
.qr-tip {
  margin-top: 14px; display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--ink-2);
}
.wecom-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500; color: #fff;
  background: #0A7A32; padding: 3px 9px;
}
.wecom-badge i { font-size: 13px; }

.login-divider {
  display: flex; align-items: center; gap: 12px; color: var(--muted-2); font-size: 12px;
  margin: 6px 0 18px;
}
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.demo-roles-label { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.demo-roles-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.demo-roles-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.demo-role-btn {
  display: flex; align-items: flex-start; gap: 10px; min-width: 0;
  padding: 12px 14px; border: 1px solid var(--border); background: var(--surface-2);
  text-align: left; transition: all .16s ease;
}
.demo-role-btn:hover { border-color: var(--primary-3); background: #fff; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.demo-role-btn .role-ico {
  width: 30px; height: 30px; flex: none; border-radius: 50%; margin-top: 1px;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; font-weight: 600;
}
.demo-role-btn .role-copy { flex: 1; min-width: 0; }
.demo-role-btn b { display: block; font-size: 13.5px; line-height: 1.4; font-weight: 600; }
.demo-role-btn .role-copy span { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.45; margin-top: 2px; }

.login-note { text-align: center; font-size: 11.5px; color: var(--muted-2); margin-top: 20px; }

/* ============================================================
   主应用视图
   ============================================================ */
.app-view { display: flex; min-height: 100vh; }

/* 侧边栏 */
.sidebar {
  width: var(--sidebar-w); flex: none;
  background: linear-gradient(180deg, #0A423C 0%, var(--primary-2) 100%);
  color: #D6E5E0; position: fixed; top: 0; bottom: 0; left: 0; z-index: 40;
  display: flex; flex-direction: column;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 20px 22px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-logo { height: 56px; width: auto; display: block; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 12px; }
.sidebar-nav::-webkit-scrollbar { width: 0; }
.nav-section { font-size: 11px; color: #6FA096; letter-spacing: 1px; padding: 14px 12px 6px; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; margin: 2px 0; color: #C2D8D2; font-size: 14px;
  position: relative; transition: all .14s ease; text-align: left;
}
.nav-item i { font-size: 17px; flex: none; opacity: .9; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,0.06); }
.nav-item.active {
  color: #fff; background: rgba(212,175,55,0.14);
}
.nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
  background: var(--accent);
}
.nav-item .nav-badge { margin-left: auto; font-size: 11px; background: var(--accent); color: #083832; padding: 1px 7px; font-weight: 600; }

.sidebar-foot { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sidebar-user .avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: rgba(212,175,55,0.22); color: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; font-weight: 600;
}
.sidebar-user b { display: block; font-size: 13.5px; color: #fff; }
.sidebar-user span { font-size: 11.5px; color: #8FB0A9; }
.sidebar-logout {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; color: #8FB0A9; font-size: 13px; text-align: left;
}
.sidebar-logout:hover { color: #fff; background: rgba(255,255,255,0.06); }
.sidebar-logout i { font-size: 15px; }

/* 主区域 */
.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }

/* 顶栏 */
.topbar {
  height: var(--topbar-h); flex: none;
  background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; position: sticky; top: 0; z-index: 30;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.topbar-crumb { font-family: var(--font-display); font-weight: 700; font-size: 17px; white-space: nowrap; }
.topbar-role-chip {
  font-size: 11px; padding: 2px 8px; border-radius: 2px; font-weight: 500;
}
.icon-btn {
  width: 38px; height: 38px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  position: relative; color: var(--ink-2); transition: background .14s;
}
.icon-btn:hover { background: var(--surface-3); }
.icon-btn i { font-size: 19px; }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); border: 2px solid #fff; }
.menu-btn { display: none; }

.topbar-right { display: flex; align-items: center; gap: 10px; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 0 12px; height: 38px; width: 240px; color: var(--muted);
}
.search-box i { font-size: 15px; }
.search-box input { border: none; outline: none; background: none; flex: 1; font-size: 13.5px; color: var(--ink); }
.search-box:focus-within { border-color: var(--primary-3); background: #fff; }

.topbar-user { display: flex; align-items: center; gap: 10px; padding-left: 4px; }
.topbar-user .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px;
}
.topbar-user .uinfo b { display: block; font-size: 13.5px; line-height: 1.2; }
.topbar-user .uinfo span { font-size: 11.5px; color: var(--muted); }

/* 通知弹层 */
.bell-pop {
  position: fixed; top: 58px; right: 90px; width: 320px; z-index: 60;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
.bell-pop-head { padding: 12px 16px; font-weight: 600; font-size: 14px; border-bottom: 1px solid var(--border); }
.bell-pop-list { max-height: 320px; overflow-y: auto; }
.bell-item { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.bell-item:last-child { border-bottom: none; }
.bell-item b { display: block; font-size: 13px; font-weight: 500; }
.bell-item span { font-size: 12px; color: var(--muted); }

/* 内容区 */
.content { flex: 1; padding: 24px; max-width: 1440px; width: 100%; margin: 0 auto; }

/* ============================================================
   通用组件
   ============================================================ */
.page-hero {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  margin-bottom: 22px; position: relative; padding-left: 16px;
}
.page-hero::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px;
  background: var(--accent);
}
.page-hero h2 { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 1.3; }
.page-hero .hero-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.page-hero .hero-actions { display: flex; gap: 10px; flex: none; }

.hero-date { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; font-size: 13.5px; font-weight: 500; transition: all .15s;
}
.btn i { font-size: 15px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); }
.btn-accent { background: var(--accent); color: #083832; font-weight: 600; }
.btn-accent:hover { background: var(--accent-soft); }
.btn-ghost { border: 1px solid var(--border-2); color: var(--ink-2); background: #fff; }
.btn-ghost:hover { border-color: var(--primary-3); color: var(--primary); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); padding: 20px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-head h3 { font-size: 15px; font-weight: 600; }
.card-head .more { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 3px; }
.card-head .more:hover { color: var(--primary); }

.tag { display: inline-flex; align-items: center; font-size: 11.5px; padding: 2px 8px; border-radius: 2px; font-weight: 500; }
.tag-red { color: var(--red); background: var(--red-tint); }
.tag-green { color: var(--green); background: var(--green-tint); }
.tag-warn { color: var(--warn); background: var(--warn-tint); }
.tag-gray { color: var(--muted); background: var(--surface-3); }

/* KPI 卡 */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
/* 6 张 KPI 卡：宽屏排 3×2，避免 4+2 的参差 */
@media (min-width: 1101px) { .kpi-grid.kpi-3 { grid-template-columns: repeat(3, 1fr); } }
.kpi-card {
  background: var(--surface); border: 1px solid var(--border); padding: 18px 20px;
  position: relative; overflow: hidden; box-shadow: var(--shadow-sm);
}
.kpi-card::after {
  content: ""; position: absolute; right: -22px; top: -22px; width: 72px; height: 72px;
  background: var(--surface-3); transform: rotate(45deg); border-radius: 4px;
}
.kpi-card.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.kpi-card.primary::after { background: rgba(255,255,255,0.08); }
.kpi-card.primary .kpi-label { color: #BFD4CE; }
.kpi-card.primary .kpi-trend { color: #fff; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; position: relative; z-index: 1; }
.kpi-ico { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--primary); background: var(--accent-tint); }
.kpi-card.primary .kpi-ico { color: var(--accent-soft); background: rgba(212,175,55,0.16); }
.kpi-label { font-size: 12.5px; color: var(--muted); }
.kpi-value { font-family: var(--font-mono); font-weight: 600; font-size: 26px; line-height: 1.15; letter-spacing: -0.5px; }
.kpi-value small { font-size: 14px; font-weight: 500; }
.kpi-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--muted); position: relative; z-index: 1; }
.kpi-trend { display: inline-flex; align-items: center; gap: 3px; font-weight: 500; font-family: var(--font-mono); }
.kpi-trend.up { color: var(--red); }
.kpi-trend.down { color: var(--green); }
.kpi-card.primary .kpi-trend.up, .kpi-card.primary .kpi-trend.down { color: #fff; }
.kpi-trend i { font-size: 13px; }
.kpi-sub { margin-top: 6px; font-size: 12px; color: var(--muted); position: relative; z-index: 1; }
.kpi-card.primary .kpi-sub { color: #BFD4CE; }

/* 概览快捷入口 */
.quick-row { display: flex; flex-wrap: wrap; gap: 10px; }
.quick-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; color: var(--ink); background: var(--surface); cursor: pointer; transition: .15s; }
.quick-chip i { color: var(--primary); }
.quick-chip:hover { border-color: var(--primary); color: var(--primary); }

/* 网格 */
.grid-8-4 { display: grid; grid-template-columns: 8fr 4fr; gap: 16px; margin-bottom: 20px; }
.grid-6-6 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }

/* 图表 */
.chart-legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); }
.chart-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend .sw { width: 10px; height: 10px; display: inline-block; }
.chart-wrap { width: 100%; }
.chart-wrap svg { width: 100%; height: auto; display: block; }

/* 列表 */
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: none; }
.list-row .lr-ico { width: 34px; height: 34px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--primary); background: var(--surface-3); }
.list-row .lr-main { flex: 1; min-width: 0; }
.list-row .lr-main b { display: block; font-size: 13.5px; font-weight: 500; }
.list-row .lr-main span { font-size: 12px; color: var(--muted); }
.list-row .lr-side { text-align: right; flex: none; }
.list-row .lr-side b { font-family: var(--font-mono); font-size: 13.5px; display: block; }
.list-row .lr-side span { font-size: 11.5px; color: var(--muted); }

.empty { text-align: center; padding: 30px 0; color: var(--muted-2); font-size: 13px; }
.empty i { font-size: 30px; display: block; margin: 0 auto 10px; opacity: .5; }

/* 快捷入口 */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.quick-item {
  display: flex; align-items: center; gap: 12px; padding: 16px;
  background: var(--surface); border: 1px solid var(--border); transition: all .16s;
}
.quick-item:hover { border-color: var(--primary-3); box-shadow: var(--shadow); transform: translateY(-2px); }
.quick-item .qi-ico { width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 19px; color: var(--primary); background: var(--accent-tint); }
.quick-item b { display: block; font-size: 14px; }
.quick-item span { font-size: 11.5px; color: var(--muted); }

/* ============================================================
   模块占位页
   ============================================================ */
.placeholder-hero {
  background: var(--surface); border: 1px solid var(--border); padding: 28px;
  display: flex; gap: 22px; align-items: flex-start; margin-bottom: 20px; position: relative; overflow: hidden;
}
.placeholder-hero::after {
  content: "规划中"; position: absolute; top: 16px; right: 16px;
  background: var(--accent-tint); color: #8A6A12; border: 1px solid rgba(212,175,55,0.55);
  font-size: 11.5px; letter-spacing: 1px; font-weight: 600;
  padding: 3px 10px; line-height: 1.5;
}
.ph-ico { width: 56px; height: 56px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 26px; color: var(--primary); background: var(--accent-tint); }
.ph-main { flex: 1; }
.ph-main h2 { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.ph-main p { color: var(--muted); font-size: 13.5px; margin-top: 6px; max-width: 640px; }
.ph-status { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 12.5px; color: var(--warn); }
.ph-status i { font-size: 15px; }

.planned-section { background: var(--surface); border: 1px solid var(--border); padding: 22px; margin-bottom: 20px; }
.planned-section h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.planned-section .ps-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }
.planned-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.planned-item {
  border: 1px dashed var(--border-2); padding: 16px; background: var(--surface-2);
}
.planned-item .pi-idx { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.planned-item b { display: block; font-size: 14px; margin-top: 4px; }
.planned-item span { font-size: 12px; color: var(--muted); }

/* ============================================================
   系统管理 · 权限矩阵
   ============================================================ */
.role-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 20px; }
.role-card { background: var(--surface); border: 1px solid var(--border); padding: 18px; }
.role-card .rc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.role-card .rc-ico { width: 38px; height: 38px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.role-card b { font-size: 15px; }
.role-card .rc-desc { font-size: 12.5px; color: var(--muted); }
.role-card .rc-count { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-top: 8px; }

.matrix-table { width: 100%; border-collapse: collapse; }
.matrix-table th, .matrix-table td { text-align: left; padding: 11px 14px; font-size: 13px; border-bottom: 1px solid var(--border); }
.matrix-table thead th { background: var(--surface-2); font-weight: 600; color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
/* 40% 只给「权限矩阵」（一格一个勾/叉），数据表禁止套用，否则首列吃满、其余挤扁 */
.matrix-table.perm-table thead th:first-child { width: 40%; }
.matrix-table tbody tr:hover { background: var(--surface-2); }
.matrix-table .mt-mod { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.matrix-table .mt-mod i { font-size: 16px; color: var(--primary); }
.check { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: #fff; font-size: 13px; }
.cross { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); color: var(--muted-2); font-size: 13px; }

/* ============================================================
   移动端底部 Tab
   ============================================================ */
.mobile-tabbar { display: none; }

/* 抽屉遮罩 */
.drawer-mask { display: none; position: fixed; inset: 0; background: rgba(6, 46, 42, 0.5); z-index: 35; }

/* ============================================================
   财务模块 / 激光结算 专用类
   ============================================================ */
/* 数字右对齐（金额列） */
.num { text-align: right; font-family: var(--font-mono); white-space: nowrap; }

/* 模块内 Tab 切换条 */
.tabbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.tabbar .tab { appearance: none; border: none; background: none; cursor: pointer; padding: 9px 16px; font-size: 13.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: .15s; font-family: inherit; }
.tabbar .tab:hover { color: var(--primary); }
.tabbar .tab.on { color: var(--primary); border-bottom-color: var(--accent); font-weight: 600; }

/* 流水筛选条 */
.flt { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.flt input, .flt select { font-size: 13px; padding: 7px 10px; border: 1px solid var(--border-2); border-radius: 6px; background: #fff; color: var(--ink); font-family: inherit; }
.flt .flt-sep { color: var(--muted-2); font-size: 12px; }

/* 内账 · 老板视图 */
.ledger-h { font-size: 14px; font-weight: 600; color: var(--primary); margin: 22px 0 10px; padding-left: 10px; border-left: 3px solid var(--accent); }
.ledger-h:first-of-type { margin-top: 4px; }
.ledger-note { background: var(--accent-tint); border: 1px solid var(--accent-soft); border-radius: 8px; padding: 12px 16px; font-size: 13px; color: var(--ink-2); line-height: 1.7; margin: 18px 0; }
.ledger-note b { color: var(--primary); }
.ledger-disc { font-size: 12px; color: var(--muted-2); text-align: center; padding: 14px 0 4px; border-top: 1px dashed var(--border-2); margin-top: 10px; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-8-4 { grid-template-columns: 1fr; }
  .role-cards { grid-template-columns: repeat(2, 1fr); }
  .planned-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 屏幕高度不足时压缩登录页品牌区，避免内容被裁切 */
@media (max-height: 800px) and (min-width: 761px) {
  .login-brand { padding-top: 40px; padding-bottom: 40px; }
  .brand-logo { height: 72px; margin-bottom: 24px; }
  .brand-copy { margin-bottom: 26px; }
  .brand-copy h1 { font-size: 30px; }
  .brand-features { gap: 12px; margin-bottom: 26px; }
  .brand-features li > i { width: 30px; height: 30px; font-size: 15px; }
  .brand-features b { font-size: 14px; }
  .brand-features span { font-size: 12.5px; }
}

@media (max-height: 640px) and (min-width: 761px) {
  .brand-features { display: none; }
  .brand-foot { display: none; }
}

@media (max-width: 760px) {
  .login-view { grid-template-columns: 1fr; }
  .login-brand { padding: 26px 22px; justify-content: flex-start; }
  .brand-logo { height: 56px; margin-bottom: 16px; }
  .brand-copy { margin-bottom: 0; }
  .brand-copy h1 { font-size: 24px; margin-bottom: 8px; letter-spacing: .5px; }
  .brand-copy h1::after { width: 44px; height: 3px; margin-top: 10px; }
  .brand-sub { font-size: 12.5px; }
  .brand-features { display: none; }
  .brand-foot { display: none; }
  .login-panel { padding: 16px; }
  .login-card { padding: 26px 22px 20px; }
  .login-card-head { margin-bottom: 22px; }
  .qr-frame { width: 168px; height: 168px; }
  .demo-role-btn { padding: 10px 12px; gap: 8px; }
  .demo-role-btn .role-ico { width: 26px; height: 26px; font-size: 13px; }
  .demo-role-btn b { font-size: 13px; }
  .demo-role-btn .role-copy span { font-size: 11px; }

  .sidebar { transform: translateX(-100%); transition: transform .24s ease; width: 264px; }
  .sidebar.open { transform: translateX(0); }
  .drawer-mask.show { display: block; }
  .main { margin-left: 0; }
  .menu-btn { display: flex; }
  .topbar { padding: 0 14px; }
  .search-box { display: none; }
  .topbar-user .uinfo { display: none; }
  .content { padding: 16px; padding-bottom: 84px; }
  .page-hero { flex-direction: column; align-items: flex-start; gap: 10px; }
  .page-hero .hero-actions { width: 100%; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi-card { padding: 14px 14px 12px; }
  .kpi-value { font-size: 21px; }
  .kpi-value small { font-size: 12px; }
  .grid-6-6 { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .planned-grid { grid-template-columns: 1fr; }
  .role-cards { grid-template-columns: 1fr; }
  .bell-pop { right: 14px; width: calc(100vw - 28px); }

  .mobile-tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; height: 64px; z-index: 38;
    background: var(--surface); border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-tabbar .tab-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-size: 10.5px; color: var(--muted); position: relative;
  }
  .mobile-tabbar .tab-item i { font-size: 20px; }
  .mobile-tabbar .tab-item.active { color: var(--primary); }
  .mobile-tabbar .tab-item.active::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; background: var(--accent); }
}

@media (max-width: 340px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   采购模块专用组件
   ============================================================ */
/* 子页签 */
.pur-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.pur-tab {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink-2);
  font-size: 13.5px; font-weight: 500; transition: all .15s;
}
.pur-tab i { font-size: 16px; color: var(--muted); }
.pur-tab:hover { border-color: var(--primary-3); }
.pur-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pur-tab.active i { color: var(--accent-soft); }

/* 通用表格封装（带横向滚动） */
.tbl { width: 100%; overflow-x: auto; overflow-y: visible; }
.tbl table { width: 100%; border-collapse: collapse; min-width: 640px; }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; font-size: 13px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl thead th { background: var(--surface-2); font-weight: 600; color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
/* 固定列宽下：单元格单行 + 省略号，鼠标悬停看全文（TABLE 会自动补 title） */
.tbl td, .matrix-table td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl td.num, .matrix-table td.num { font-variant-numeric: tabular-nums; }
/* 允许换行的列（备注/说明类），加 class="wrap" */
.tbl td.wrap, .matrix-table td.wrap { white-space: normal; line-height: 1.5; }
/* 长表头允许折两行，不撑宽列 */
.tbl thead th.wrap, .matrix-table thead th.wrap {
  white-space: normal; line-height: 1.35; word-break: break-word; padding-top: 8px; padding-bottom: 8px;
}
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl .more { cursor: pointer; color: var(--primary); }
.tbl .more:hover { text-decoration: underline; }

/* ============================================================
   表格增强：可拖拽列宽 + 表头美化
   ============================================================ */
/* 表头：粘顶、细金线、可拖拽手柄 */
.tbl thead th, .matrix-table thead th {
  position: relative;
  user-select: none;
  white-space: nowrap;
  letter-spacing: .2px;
}
.tbl thead th::after, .matrix-table thead th::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, var(--primary) 0%, transparent 55%);
  opacity: .22; pointer-events: none;
}

/* 列宽拖拽手柄 */
.col-rs {
  position: absolute; top: 0; right: -3px; width: 7px; height: 100%;
  cursor: col-resize; z-index: 3; border-radius: 2px;
  background: transparent; transition: background .15s;
}
.col-rs::before {
  content: ''; position: absolute; top: 22%; bottom: 22%; left: 3px; width: 1px;
  background: var(--border-2, rgba(11,75,66,.18)); transition: background .15s, width .15s;
}
.tbl thead th:hover .col-rs::before,
.matrix-table thead th:hover .col-rs::before { background: var(--primary); width: 2px; }
.col-rs.dragging::before { background: var(--gold, #D4AF37) !important; width: 2px; }
.th-resizable:hover { background: var(--surface-3, rgba(11,75,66,.05)); }
body.col-resizing { cursor: col-resize !important; }
body.col-resizing * { cursor: col-resize !important; user-select: none !important; }
body.col-resizing .tbl td, body.col-resizing .matrix-table td { pointer-events: none; }

/* 表格外观：更清晰的斑马纹与行高，数字右对齐等宽 */
.tbl tbody tr:nth-child(even), .matrix-table tbody tr:nth-child(even) { background: rgba(11, 75, 66, 0.018); }
.tbl tbody tr:hover, .matrix-table tbody tr:hover { background: rgba(212, 175, 55, 0.07) !important; }
.tbl td.num, .matrix-table td.num, .tbl th.num, .matrix-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl thead th.num, .matrix-table thead th.num { text-align: right; }

/* 单元格里的次要小字：不再撑高行 */
.tbl td small, .matrix-table td small { display: inline; font-size: 11.5px; color: var(--muted-2, #7b8b86); }

/* 空表提示 */
.tbl td.empty, .matrix-table td.empty { text-align: center; color: var(--muted-2, #7b8b86); padding: 28px 12px; }

/* 表格工具条（列宽重置等） */
.tbl-tools { display: flex; align-items: center; gap: 8px; }
.tbl-tools .hint { font-size: 11.5px; color: var(--muted-2, #7b8b86); }


/* 键值行 / 分段控件 */
.kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.kv:last-of-type { border-bottom: none; }
.kv span { color: var(--muted); }
.kv b { font-family: var(--font-mono); font-weight: 600; }
.sp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 12px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg-btn { padding: 7px 14px; font-size: 13px; background: var(--surface); color: var(--ink-2); }
.seg-btn.active { background: var(--primary); color: #fff; }

/* 时间线（路线步骤） */
.timeline { border-left: 2px solid var(--border-2); padding-left: 14px; }
.timeline-row { display: flex; gap: 10px; align-items: flex-start; position: relative; padding: 5px 0; font-size: 13px; color: var(--ink-2); }
.tl-dot { position: absolute; left: -19px; top: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.timeline-row span { line-height: 1.5; }

/* 风险提示 */
.risk { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; padding: 10px 12px; background: var(--warn-tint); border: 1px solid rgba(183,121,31,.3); color: var(--warn); font-size: 12.5px; border-radius: 8px; }

/* 评分星 */
.stars { white-space: nowrap; }
.stars i { display: inline-block; width: 15px; height: 15px; color: #D8D7CF; }
.stars i.star-on { color: var(--accent); }
.stars i.star-on svg { fill: currentColor; }

/* 模态表单 */
.modal-mask { position: fixed; inset: 0; background: rgba(6,46,42,.45); display: flex; align-items: flex-start; justify-content: center; z-index: 80; padding: 40px 16px; overflow-y: auto; }
.modal { width: 100%; max-width: 560px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-lg); animation: modalIn .18s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 16px; }
.modal-x { font-size: 22px; line-height: 1; color: var(--muted); width: 32px; height: 32px; border-radius: 8px; }
.modal-x:hover { background: var(--surface-3); color: var(--ink); }
.modal-body { padding: 18px 20px 8px; max-height: 70vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 0 14px; margin-top: 8px; }
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border-2); border-radius: 8px; font-size: 13.5px; color: var(--ink); background: var(--surface); outline: none; font-family: var(--font-ui);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary-3); }
.field small { display: block; color: var(--muted-2); font-size: 11.5px; margin-top: 4px; }
.field textarea { resize: vertical; }
.fg-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.loc-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; }
.chk { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); font-weight: 400 !important; }
.chk input { width: auto !important; }
.doc-preview { display: block; margin-top: 6px; font-size: 12.5px; color: var(--primary); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 36px; transform: translate(-50%, 20px); background: var(--primary-2); color: #fff; padding: 11px 20px; border-radius: 10px; font-size: 13.5px; box-shadow: var(--shadow-lg); opacity: 0; transition: all .3s; z-index: 90; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 桌面端采购模块 KPI 网格与看板一致；移动端已在全局响应式处理 */
@media (max-width: 760px) {
  .fg-2 { grid-template-columns: 1fr; }
  .loc-row { grid-template-columns: 1fr 1fr; }
  .loc-row .btn { grid-column: 1 / -1; }
  .modal-mask { padding: 12px 8px; }
  .modal-body { max-height: 80vh; }
}

/* ===== 进销存：流程条与角色标注 ===== */
.role-tag {
  display: inline-block; font-size: 11px; line-height: 1.6; padding: 1px 8px;
  border-radius: 999px; background: var(--accent-tint); color: var(--primary);
  font-weight: 600; white-space: nowrap; vertical-align: middle;
}
.role-tag.rt-gold { background: #F3E9CE; color: #6E5418; }
.role-tag.rt-gray { background: #ECEBE4; color: #5E6E6A; }

.flow-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.flow-step {
  flex: 1 1 118px; min-width: 118px; background: var(--surface-2);
  border: 1px solid var(--border); padding: 10px 12px;
}
.flow-step b { display: block; font-size: 13px; line-height: 1.45; margin-bottom: 5px; color: var(--ink); }
.flow-step .fs-role { display: block; font-size: 11.5px; color: var(--primary); font-weight: 600; }
.flow-step.is-hub { background: #fff; border-color: var(--primary-3); }
.flow-step.is-optional { border-style: dashed; }

/* 收款进度条 */
.pay-bar { height: 6px; background: #E9E7DE; border-radius: 999px; overflow: hidden; min-width: 56px; }
.pay-bar i { display: block; height: 100%; background: var(--primary); }
.pay-bar.full i { background: var(--primary); }
.pay-cell { display: flex; flex-direction: column; gap: 4px; min-width: 84px; }
.pay-cell span { font-size: 11.5px; color: var(--muted); }

/* 提示条 */
.hint-bar {
  display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px;
  background: var(--surface-2); border-left: 3px solid var(--primary-3);
  font-size: 12.5px; color: var(--ink-2); line-height: 1.6; margin-bottom: 12px;
}
.hint-bar i { color: var(--primary); flex: none; margin-top: 2px; }

@media (max-width: 760px) {
  .flow-step { flex: 1 1 100%; }
  .role-tag { font-size: 10.5px; }
}

/* ===== 工资核算模块 ===== */
.msel {
  padding: 8px 12px; border: 1px solid var(--border-2); border-radius: 8px;
  font-size: 13px; background: var(--surface); color: var(--ink); font-family: var(--font-ui);
}
.msel:focus { border-color: var(--primary-3); outline: none; }

.pay-type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pay-type-card {
  border: 1px solid var(--border); background: var(--surface-2); padding: 14px 16px;
}
.pay-type-card .ptc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.pay-type-card .ptc-top b { font-size: 13.5px; color: var(--ink); }
.pay-type-card .ptc-desc { font-size: 12px; color: var(--muted); line-height: 1.6; }

.pay-legend {
  display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px;
  font-size: 12px; color: var(--muted);
}
.pay-legend span::before { content: "·"; margin-right: 6px; color: var(--primary-3); }

.calc-line {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 7px 0; border-bottom: 1px dashed var(--border);
  font-size: 13px; color: var(--ink-2);
}
.calc-line b { font-family: var(--font-mono); font-size: 13px; color: var(--ink); }
.calc-line.calc-total {
  border-bottom: none; border-top: 2px solid var(--primary-3);
  margin-top: 8px; padding-top: 12px; font-weight: 600; color: var(--primary);
}
.calc-line.calc-total b { font-size: 17px; color: var(--primary); }

/* 工资条选择 */
.slip-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.slip-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 13px; border: 1px solid var(--border-2); border-radius: 999px;
  background: var(--surface); font-size: 13px; color: var(--muted);
  cursor: pointer; transition: all .14s ease;
}
.slip-chip:hover { border-color: var(--primary-3); color: var(--ink); }
.slip-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.slip-chip i { font-size: 12px; display: inline-flex; }

/* 工资条本体 */
.payslip-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.payslip {
  border: 1px solid var(--border-2); background: #fff; padding: 16px 18px;
  break-inside: avoid; page-break-inside: avoid;
}
.payslip .ps-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  border-bottom: 2px solid var(--primary); padding-bottom: 8px; margin-bottom: 10px;
}
.payslip .ps-head b { display: block; font-size: 13px; color: var(--ink); }
.payslip .ps-head span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.payslip .ps-no { font-size: 11.5px; color: var(--primary); font-weight: 600; white-space: nowrap; }
.payslip .ps-meta {
  display: flex; flex-wrap: wrap; gap: 4px 16px;
  font-size: 11.5px; color: var(--ink-2); margin-bottom: 10px;
}
.payslip .ps-meta b { color: var(--ink); }

/* 31 天考勤日历打卡格（工资条与录入弹窗共用，全局） */
.ps-cal { margin-bottom: 4px; }
.ps-cal-week {
  display: grid; grid-template-columns: repeat(7, 1fr);
  border: 1px solid #D8D6CC; border-bottom: none; background: #F4F3EC;
}
.ps-cal-week span {
  text-align: center; font-size: 9.5px; color: var(--muted);
  padding: 2px 0; border-left: 1px solid #E5E3D8;
}
.ps-cal-week span:first-child { border-left: none; }
.ps-cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  border: 1px solid #D8D6CC; border-top: none;
}
.ps-cell {
  min-height: 28px; border: 1px solid #E5E3D8;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 10px; line-height: 1.1; color: var(--ink); box-sizing: border-box;
}
.ps-cell--empty { background: #FAF9F5; }
.ps-cell .ps-d { font-size: 9px; color: var(--muted); }
.ps-cell .ps-s { font-size: 12px; font-weight: 600; }
.ps-cell.ps-sun .ps-d { color: #C0392B; }
.ps-cell.ps-work .ps-s { color: #0B4B42; }
.ps-cell.ps-rest .ps-s { color: #9AA0A6; }
.ps-cell.ps-late .ps-s { color: #C77B00; }
.ps-cell.ps-personal .ps-s,
.ps-cell.ps-sick .ps-s,
.ps-cell.ps-public .ps-s { color: #2F6FB0; }
.ps-cell.ps-absent .ps-s { color: #C0392B; }
.ps-cal-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px;
  margin-top: 4px; font-size: 9.5px; color: var(--muted-2);
}
.ps-sum { flex: 1 1 auto; }
.ps-legend { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ps-legend .ps-lg { font-style: normal; font-weight: 600; margin-right: 1px; }

/* 模态内：考勤日历编辑 */
.cal-edit { border: 1px solid var(--border-2); border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; background: var(--surface-2); }
.cal-edit-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cal-edit-head b { font-size: 13px; color: var(--ink); }
.cal-edit-actions { display: flex; gap: 6px; }
.cal-edit .ps-cal-grid .ps-cell { cursor: pointer; transition: background .12s; }
.cal-edit .ps-cal-grid .ps-cell:hover { background: #EAF2EF; }
.cal-edit .ps-cal-grid .ps-cell--empty:hover { background: #F2F1EA; }
.cal-hint { font-size: 11px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.btn-xs { padding: 4px 9px; font-size: 11.5px; }

/* 实发金额块（只显示钱，不列构成） */
.payslip .ps-net-box {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 9px; padding: 7px 12px;
  border: 1.5px solid var(--primary); background: #F2F7F5;
}
.payslip .ps-net-box span { font-size: 11.5px; color: var(--primary); letter-spacing: 1px; flex: none; }
.payslip .ps-net-box b {
  font-family: var(--font-mono); font-size: 23px; line-height: 1.1;
  color: var(--primary); letter-spacing: -0.5px;
}

.payslip .ps-note {
  margin-top: 6px; font-size: 10px; color: var(--muted);
  line-height: 1.5; padding-left: 2px;
}

.payslip .ps-sign {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: 12px; padding-top: 8px; border-top: 1px dashed var(--border);
  font-size: 11px; color: var(--muted-2);
}

@media (max-width: 1100px) {
  .pay-type-grid { grid-template-columns: 1fr; }
  .payslip-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .pay-legend { gap: 10px; font-size: 11.5px; }
  .msel { font-size: 12px; padding: 7px 9px; }
}

/* ============================================================
   大窗口预览（台账 / 报表 / 结算单 / 档案 / 工资条 / 入职表 等所有单据）
   设计目标：大气、简洁、留白充足，纸面居中如置于案头
   ============================================================ */
#print-root { display: none; }              /* 打印目标，屏幕上隐藏，仅打印时可见 */
body.print-doc-mode .pp-mask { display: none !important; }  /* 打印时仅出单据，隐藏预览外壳 */

.pp-mask {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(8, 56, 50, 0.52);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 28px;
  animation: ppFade .2s ease;
}
@keyframes ppFade { from { opacity: 0; } to { opacity: 1; } }

.pp-sheet {
  width: 100%; max-width: 1080px;
  max-height: 92vh; display: flex; flex-direction: column;
  background: var(--surface); border-radius: 18px; overflow: hidden;
  box-shadow: 0 40px 120px -32px rgba(8, 56, 50, 0.55);
  animation: ppPop .22s cubic-bezier(.2, .8, .25, 1);
}
@keyframes ppPop { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

.pp-bar {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 28px; background: linear-gradient(180deg, #FFFFFF, #FCFBF7);
  border-bottom: 1px solid var(--border);
}
.pp-bar::after {
  content: ""; position: absolute; left: 28px; right: 28px; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(212, 175, 55, 0));
}
.pp-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pp-title .pp-mark { width: 9px; height: 26px; border-radius: 3px; background: var(--accent); flex: none; box-shadow: 0 0 0 3px var(--accent-tint); }
.pp-title b { font-size: 17px; font-weight: 600; color: var(--primary); letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.pp-hint { font-size: 12px; color: var(--muted-2); white-space: nowrap; }

.pp-scroll {
  flex: 1; overflow: auto; padding: 34px;
  background:
    radial-gradient(circle at 1px 1px, rgba(11, 75, 66, 0.05) 1px, transparent 0) 0 0 / 22px 22px,
    #EEEDE7;
}
.pp-scroll > * { margin: 0 auto; }
.pp-scroll .print-doc {
  background: #fff; padding: 16mm 14mm;
  box-shadow: 0 8px 28px -12px rgba(8, 56, 50, 0.30);
  border-radius: 2px;
}
/* 预览时纸面自适应窗口宽度（宽表不挤），打印仍按 A4 输出 */
.pp-mask .pp-scroll .print-doc {
  width: auto; max-width: 1240px; min-width: 0;
}

@media (max-width: 760px) {
  .pp-mask { padding: 0; }
  .pp-sheet { max-width: 100%; max-height: 100vh; height: 100vh; border-radius: 0; }
  .pp-bar { padding: 12px 16px; flex-wrap: wrap; gap: 10px; }
  .pp-bar::after { left: 16px; right: 16px; }
  .pp-hint { display: none; }
  .pp-scroll { padding: 16px; }
  .pp-title b { font-size: 15px; }
}

/* 打印：按 body 上的类决定输出内容（工资条 / 入职登记表 / 通用单据） */
@media print {
  body * { visibility: hidden !important; }

  body.print-slip #payslip-print,
  body.print-slip #payslip-print * { visibility: visible !important; }
  body.print-slip #payslip-print { position: absolute; left: 0; top: 0; width: 100%; display: block; background: #fff; }

  body.print-reg #regform-blank,
  body.print-reg #regform-blank * { visibility: visible !important; }
  body.print-reg #regform-blank { position: absolute; left: 0; top: 0; width: 100%; display: block; background: #fff; }

  body.print-doc-mode #print-root,
  body.print-doc-mode #print-root * { visibility: visible !important; }
  body.print-doc-mode #print-root { position: absolute; left: 0; top: 0; width: 100%; display: block; background: #fff; }

  .payslip {
    border: 1px solid #999; margin: 0 0 10mm 0; padding: 8mm 10mm;
    page-break-inside: avoid; break-inside: avoid;
  }
  .payslip .ps-net-box { border-color: #000; background: #fff; }
  .payslip .ps-net-box span, .payslip .ps-net-box b { color: #000; }
  @page { size: A4; margin: 10mm; }

  /* 通用单据分页 */
  .print-doc tr { page-break-inside: avoid; break-inside: avoid; }
  .print-doc .pd-sec { page-break-after: avoid; break-after: avoid; }
  .print-doc .pd-signs, .print-doc .pd-foot { page-break-inside: avoid; break-inside: avoid; }
}

/* ===== 人力行政：员工档案 ===== */
.emp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.emp-card {
  border: 1px solid var(--border); background: var(--surface); padding: 16px;
  cursor: pointer; transition: all .16s ease;
}
.emp-card:hover { border-color: var(--primary-3); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.ec-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ec-avatar {
  width: 44px; height: 44px; flex: none; border-radius: 50%; overflow: hidden;
  background: var(--accent-tint); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 600;
}
.ec-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ec-name { flex: 1; min-width: 0; }
.ec-name b { display: block; font-size: 15px; color: var(--ink); line-height: 1.3; }
.ec-name span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.ec-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px;
  padding-top: 10px; border-top: 1px dashed var(--border);
}
.ec-meta div { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; }
.ec-meta span { color: var(--muted); }
.ec-meta b { color: var(--ink-2); font-weight: 500; }
.ec-foot { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.emp-head {
  display: flex; align-items: center; gap: 14px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.eh-avatar {
  width: 64px; height: 64px; flex: none; border-radius: 50%; overflow: hidden;
  background: var(--accent-tint); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 600;
}
.eh-avatar img { width: 100%; height: 100%; object-fit: cover; }
.eh-main { flex: 1; min-width: 180px; }
.eh-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.eh-line b { font-size: 17px; color: var(--ink); }
.eh-sub { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.hr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.hr-cols > .card { margin-bottom: 0; }
.kv2 {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 7px 0; border-bottom: 1px dashed var(--border);
  font-size: 12.5px;
}
.kv2:last-child { border-bottom: none; }
.kv2 span { color: var(--muted); flex: none; }
.kv2 b { color: var(--ink); font-weight: 500; text-align: right; word-break: break-all; }

.hr-bar { height: 6px; background: #E9E7DE; border-radius: 999px; overflow: hidden; min-width: 70px; }
.hr-bar i { display: block; height: 100%; background: var(--primary); }

.file-list { display: flex; flex-wrap: wrap; gap: 10px; }
.file-chip {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); background: var(--surface-2);
  padding: 8px 10px; max-width: 260px;
}
.file-chip img { width: 44px; height: 44px; object-fit: cover; cursor: zoom-in; border: 1px solid var(--border); }
.file-chip > i { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--primary); background: var(--accent-tint); }
.fc-info { flex: 1; min-width: 0; }
.fc-info b { display: block; font-size: 12px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-info span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.fc-del {
  border: none; background: transparent; color: var(--muted-2); font-size: 16px;
  cursor: pointer; padding: 0 4px; line-height: 1;
}
.fc-del:hover { color: var(--red); }

.hr-lightbox {
  position: fixed; inset: 0; background: rgba(8,56,50,.82); z-index: 120;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.hr-lightbox .lb-inner { position: relative; max-width: 92vw; max-height: 92vh; }
.hr-lightbox img { max-width: 92vw; max-height: 88vh; display: block; background: #fff; }
.hr-lightbox .lb-close {
  position: absolute; right: -8px; top: -34px; background: transparent; border: none;
  color: #fff; font-size: 28px; line-height: 1; cursor: pointer;
}

/* 员工档案表单 */
.form-sec { background: var(--surface); border: 1px solid var(--border); padding: 18px 20px; margin-bottom: 14px; }
.fs-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.fs-head b { font-size: 14px; color: var(--primary); }
.fs-head span { font-size: 12px; color: var(--muted); }
.fg-3, .fg-4 { display: grid; gap: 12px; }
.fg-3 { grid-template-columns: repeat(3, 1fr); }
.fg-4 { grid-template-columns: repeat(4, 1fr); }
.form-sec .field { margin-bottom: 12px; }
.form-sec .fg-3 .field, .form-sec .fg-4 .field, .form-sec .fg-2 .field { margin-bottom: 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 8px 0 24px; }
.row-del {
  border: 1px solid var(--border-2); background: var(--surface); color: var(--muted);
  width: 24px; height: 24px; line-height: 1; cursor: pointer; font-size: 14px;
}
.row-del:hover { color: var(--red); border-color: var(--red); }
.form-sec .tbl { margin-bottom: 8px; }
.hr-file-inline { font-size: 12px; }

.reg-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.reg-sec { border-left: 3px solid var(--primary-3); padding: 6px 12px; background: var(--surface-2); }
.reg-sec b { display: block; font-size: 13px; color: var(--ink); margin-bottom: 4px; }
.reg-sec span { font-size: 11.5px; color: var(--muted); line-height: 1.6; }

@media (max-width: 1100px) {
  .hr-cols { grid-template-columns: 1fr; }
  .fg-3, .fg-4 { grid-template-columns: repeat(2, 1fr); }
  .reg-sections { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .fg-3, .fg-4 { grid-template-columns: 1fr; }
  .emp-grid { grid-template-columns: 1fr; }
  .form-sec { padding: 14px 12px; }
}

/* ===== 空白《员工入职登记表》打印版 ===== */
#regform-blank { display: none; }
body.print-reg #regform-blank { display: block; }
.regform { width: 190mm; margin: 0 auto; color: #000; font-size: 11pt; line-height: 1.5; }
.regform .rf-title { text-align: center; margin-bottom: 6mm; }
.regform .rf-title h1 { font-size: 18pt; letter-spacing: 4px; margin: 0 0 2mm; font-weight: 600; }
.regform .rf-title p { font-size: 10pt; margin: 0; color: #333; }
.regform .rf-sec {
  font-weight: 600; font-size: 11pt; margin: 4mm 0 1.5mm;
  padding-left: 2mm; border-left: 3px solid #0B4B42;
}
.rf-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.rf-table td, .rf-table th {
  border: 1px solid #666; padding: 1.6mm 2mm; font-size: 10pt;
  height: 8mm; vertical-align: middle; word-break: break-all;
}
.rf-table th { background: #F2F1EA; font-weight: 500; font-size: 9.5pt; }
.rf-table .rf-l { width: 22mm; background: #FAFAF6; text-align: center; font-size: 9.5pt; }
.rf-table .rf-v { }
.rf-table .rf-photo { width: 26mm; text-align: center; color: #888; font-size: 9pt; }
.rf-fill td { height: 9mm; }
.regform .rf-mats { display: flex; flex-wrap: wrap; gap: 3mm 8mm; font-size: 10pt; padding: 1mm 0; }
.regform .rf-promise {
  border: 1px solid #666; padding: 3mm; font-size: 10pt; line-height: 1.9; min-height: 18mm;
}
.regform .rf-sign {
  display: flex; justify-content: space-between; gap: 10mm;
  margin-top: 6mm; font-size: 10.5pt;
}
.regform .rf-company { margin-top: 8mm; }

/* 登记表分页控制：表格不跨页断行、区块标题不落单 */
@media print {
  .regform tr { page-break-inside: avoid; break-inside: avoid; }
  .regform .rf-sec { page-break-after: avoid; break-after: avoid; }
  .regform .rf-table { page-break-inside: auto; }
  .regform .rf-sign, .regform .rf-promise { page-break-inside: avoid; break-inside: avoid; }
}

/* ===== 通用打印单据（PRINT.doc） ===== */
#print-root { display: none; }
body.print-doc-mode #print-root { display: block; }

.print-doc {
  width: 190mm; margin: 0 auto; color: #1C2522;
  font-size: 10.5pt; line-height: 1.55;
  font-family: "Noto Sans SC", "Source Han Sans SC", system-ui, sans-serif;
  background: #fff;
}
.print-doc[data-orient="landscape"] { width: 277mm; }

.pd-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8mm;
  padding-bottom: 3mm; border-bottom: 2px solid #0B4B42; margin-bottom: 4mm;
}
.print-doc .pd-brand { display: flex; align-items: center; gap: 4mm; }
.print-doc .pd-brand img { height: 11mm; width: auto; display: block; }
.print-doc .pd-brand-txt b { display: block; font-size: 9.5pt; letter-spacing: .3px; }
.print-doc .pd-brand-txt span { display: block; font-size: 7.5pt; color: #666; margin-top: .6mm; }
.print-doc .pd-title { text-align: right; }
.print-doc .pd-title h1 { font-size: 16pt; font-weight: 500; letter-spacing: 3px; margin: 0 0 1.5mm; color: #0B4B42; }
.print-doc .pd-title span { font-size: 8.5pt; color: #555; }

.print-doc .pd-kv { width: 100%; border-collapse: collapse; margin-bottom: 4mm; table-layout: fixed; }
.print-doc .pd-kv th, .print-doc .pd-kv td {
  border: 1px solid #999; padding: 1.6mm 2mm; font-size: 9pt; vertical-align: middle;
}
.print-doc .pd-kv th { background: #F5F4EE; font-weight: 500; width: 22mm; text-align: center; color: #444; white-space: nowrap; }
.print-doc .pd-kv td { word-break: break-all; }

.print-doc .pd-sec {
  font-size: 10pt; font-weight: 500; color: #0B4B42;
  border-left: 3px solid #0B4B42; padding-left: 2mm;
  margin: 4mm 0 2mm;
}

.print-doc .pd-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.print-doc .pd-table th, .print-doc .pd-table td {
  border: 1px solid #999; padding: 1.5mm 1.8mm; font-size: 8.5pt;
  word-break: break-all; vertical-align: middle;
}
.print-doc .pd-table th { background: #F5F4EE; font-weight: 500; color: #333; }
.print-doc .pd-table tbody tr:nth-child(even) td { background: #FCFCFA; }
.print-doc .pd-table tfoot td { background: #F5F4EE !important; font-weight: 500; }

.print-doc .pd-text {
  border: 1px solid #999; padding: 2.5mm; font-size: 9pt;
  min-height: 12mm; line-height: 1.8; white-space: pre-wrap;
}
.print-doc .pd-note { font-size: 8pt; color: #666; margin-top: 2mm; line-height: 1.7; }
.print-doc .pd-html table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.print-doc .pd-html th, .print-doc .pd-html td { border: 1px solid #999; padding: 1.5mm 1.8mm; font-size: 8.5pt; }
.print-doc .pd-html th { background: #F5F4EE; font-weight: 500; }
.print-doc .pd-html .tag { border: none; background: transparent; padding: 0; color: #333; font-size: 8.5pt; }

.print-doc .pd-signs {
  display: flex; justify-content: space-between; gap: 6mm; flex-wrap: wrap;
  margin-top: 8mm; padding-top: 4mm; border-top: 1px dashed #999;
  font-size: 9.5pt;
}
.print-doc .pd-signs span { flex: 1; min-width: 40mm; }
.print-doc .pd-signs i { display: inline-block; min-width: 30mm; border-bottom: 1px solid #666; height: 5mm; }

.print-doc .pd-foot {
  display: flex; justify-content: space-between; gap: 4mm;
  margin-top: 5mm; padding-top: 2mm; border-top: 1px solid #ccc;
  font-size: 7.5pt; color: #777;
}

/* 屏幕上的附件组件 */
.att-list { display: flex; flex-wrap: wrap; gap: 8px; }
.att-chip {
  display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--border); background: var(--surface-2);
  padding: 7px 9px; max-width: 270px;
}
.att-chip img { width: 42px; height: 42px; object-fit: cover; cursor: zoom-in; border: 1px solid var(--border); background: #fff; }
.att-chip .att-file {
  width: 42px; height: 42px; flex: none; display: flex; align-items: center; justify-content: center;
  background: var(--accent-tint); color: var(--primary); font-size: 19px;
}
.att-info { flex: 1; min-width: 0; }
.att-info b { display: block; font-size: 12px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-info span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.att-del {
  border: none; background: transparent; color: var(--muted-2);
  font-size: 16px; line-height: 1; cursor: pointer; padding: 0 3px;
}
.att-del:hover { color: var(--red); }
.att-empty { font-size: 12.5px; color: var(--muted-2); padding: 12px 0; }
.att-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11.5px; color: var(--primary); cursor: pointer;
}
.att-badge:hover { text-decoration: underline; }
.att-badge.zero { color: var(--muted-2); }

/* ===== 智能识别（OCR） ===== */
.ocr-drop {
  border: 2px dashed var(--border-2); background: var(--surface-2);
  padding: 26px 16px; text-align: center; cursor: pointer; transition: all .16s ease;
}
.ocr-drop:hover, .ocr-drop.on { border-color: var(--primary-3); background: var(--accent-tint); }
.ocr-drop i { display: block; font-size: 30px; color: var(--primary); margin-bottom: 8px; }
.ocr-drop b { display: block; font-size: 13.5px; color: var(--ink); margin-bottom: 4px; }
.ocr-drop span { display: block; font-size: 11.5px; color: var(--muted); }

.ocr-thumb { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 8px; border: 1px solid var(--border); background: var(--surface); }
.ocr-thumb img { width: 90px; height: 66px; object-fit: cover; border: 1px solid var(--border); }
.ocr-thumb span { font-size: 11.5px; color: var(--muted); }

.ocr-status {
  display: flex; align-items: flex-start; gap: 9px;
  margin-top: 12px; padding: 11px 13px;
  background: var(--surface-2); border-left: 3px solid var(--primary-3);
  font-size: 12.5px; color: var(--ink-2); line-height: 1.6;
}
.ocr-status i { color: var(--primary); flex: none; margin-top: 1px; }
.ocr-spin {
  width: 13px; height: 13px; flex: none; margin-top: 3px;
  border: 2px solid var(--primary-3); border-top-color: transparent;
  border-radius: 50%; animation: ocrspin .8s linear infinite;
}
@keyframes ocrspin { to { transform: rotate(360deg); } }

.ocr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.ocr-head b { font-size: 13.5px; color: var(--ink); }
.ocr-head .more { font-size: 11.5px; color: var(--muted); margin-left: 8px; }

.ocr-table td { font-size: 12.5px; vertical-align: middle; }
.ocr-table input[type="checkbox"] { width: auto; }
.ocr-group td {
  background: var(--surface-2) !important; font-size: 11.5px;
  font-weight: 600; color: var(--primary); padding: 5px 8px;
}
.ocr-old { color: var(--muted); text-decoration: line-through; }
.ocr-arrow { color: var(--primary); margin: 0 3px; }
.ocr-note { font-size: 11px; color: var(--muted); line-height: 1.5; }

.ocr-raw { margin-top: 12px; }
.ocr-raw summary { font-size: 12px; color: var(--primary); cursor: pointer; }
.ocr-raw pre {
  margin-top: 8px; padding: 10px; max-height: 200px; overflow: auto;
  background: var(--surface-3); border: 1px solid var(--border);
  font-size: 11.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-all;
  font-family: var(--font-mono);
}

.id-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }

@media (max-width: 760px) {
  .ocr-table td, .ocr-table th { font-size: 11.5px; }
  .ocr-table .ocr-note { display: none; }
}

/* ============================================================
   云端登录（2026-11-02）：真实账号密码
   ============================================================ */
.login-form { display: flex; flex-direction: column; gap: 16px; }

.lf-field { display: block; }
.lf-label {
  display: block; font-size: 12px; font-weight: 500;
  color: var(--muted); letter-spacing: .04em; margin-bottom: 7px;
}
.lf-field input {
  width: 100%; height: 46px; padding: 0 14px;
  font-family: var(--font-ui); font-size: 14.5px; color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  outline: none; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.lf-field input::placeholder { color: var(--muted-2); }
.lf-field input:focus {
  background: #fff; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 75, 66, .10);
}
.lf-field input:disabled { opacity: .6; }

.lf-error {
  font-size: 12.5px; line-height: 1.55; color: var(--red);
  background: var(--red-tint); border-left: 3px solid var(--red);
  padding: 9px 12px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.lf-submit {
  height: 48px; margin-top: 4px; width: 100%;
  font-family: var(--font-ui); font-size: 15px; font-weight: 600; letter-spacing: .18em;
  color: #fff; background: var(--primary);
  border: 0; border-radius: var(--radius-sm); cursor: pointer;
  transition: background .16s ease, transform .16s ease;
}
.lf-submit:hover { background: var(--primary-3); }
.lf-submit:active { transform: translateY(1px); }
.lf-submit:disabled { background: var(--muted-2); cursor: not-allowed; letter-spacing: .05em; }

.login-note {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  text-align: center; font-size: 11.5px; color: var(--muted-2); margin-top: 22px;
}
.login-note i { font-size: 13px; color: var(--accent); }

/* 启动遮罩 */
.cloud-boot {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: rgba(8, 56, 50, .92);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  color: #FCFBF7; font-size: 13.5px; letter-spacing: .08em;
}
.cloud-boot .cb-ring {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid rgba(212, 175, 55, .25);
  border-top-color: var(--accent);
  animation: cbSpin .9s linear infinite;
}
@keyframes cbSpin { to { transform: rotate(360deg); } }

/* 轻提示 */
.cloud-toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%);
  z-index: 10000; max-width: min(560px, 92vw);
  padding: 12px 18px; border-radius: var(--radius-sm);
  font-size: 13px; line-height: 1.6; color: #fff;
  background: var(--primary-2); box-shadow: var(--shadow-lg);
  opacity: 0; transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.cloud-toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.cloud-toast.is-error { background: #8E2A1E; }
.cloud-toast.is-ok { background: #14603F; }

/* 顶部提示条（未改初始密码 / 同步异常） */
.cloud-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; font-size: 12.5px;
  background: var(--accent-tint); color: #6B5312;
  border-bottom: 1px solid #E8DDB6;
}
.cloud-banner b { font-weight: 600; }
.cloud-banner button {
  margin-left: auto; font-size: 12px; font-weight: 500;
  color: var(--primary); background: #fff; border: 1px solid var(--border-2);
  padding: 4px 11px; border-radius: var(--radius-sm); cursor: pointer;
}
.cloud-banner button:hover { border-color: var(--primary); }
