/* 企业合规运维系统 · 全站样式（平台型 · 自适应） */
* { margin:0; padding:0; box-sizing:border-box; font-family:"Microsoft YaHei","PingFang SC","Segoe UI",sans-serif; }
:root {
  --navy:#0B2A4A; --navy2:#14365C; --red:#D9403A; --bg:#F4F6FA;
  --card:#fff; --txt:#1a2b3c; --sub:#7a8ba0; --line:#e8edf3; --green:#1E9E6A;
}
html,body { height:100%; }
body { background:var(--bg); color:var(--txt); font-size:14px; }
a { color:inherit; text-decoration:none; }
button { cursor:pointer; font-family:inherit; }
input,select { font-family:inherit; font-size:14px; outline:none; }
input { padding:10px 12px; border:1px solid #d6dee8; border-radius:8px; background:#fff; transition:border .15s; width:100%; }
input:focus { border-color:var(--navy2); }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; border:none; border-radius:8px; padding:10px 18px; font-size:14px; background:var(--navy); color:#fff; transition:.15s; }
.btn:hover { background:var(--navy2); }
.btn.red { background:var(--red); } .btn.red:hover { background:#b73530; }
.btn.ghost { background:#fff; color:var(--navy); border:1px solid #d6dee8; }
.btn.ghost:hover { border-color:var(--navy); }
.btn.sm { padding:6px 12px; font-size:12px; border-radius:6px; }
.btn:disabled { opacity:.5; cursor:not-allowed; }

/* ===== 登录门 ===== */
.gate { min-height:100vh; display:flex; flex-direction:column; background:linear-gradient(135deg,#0B2A4A 0%,#14365C 55%,#1B4470 100%); position:relative; overflow:hidden; }
.gate::before { content:""; position:absolute; width:560px; height:560px; border-radius:50%; background:radial-gradient(circle,rgba(217,64,58,.18),transparent 65%); top:-180px; right:-120px; }
.gate::after { content:""; position:absolute; width:420px; height:420px; border-radius:50%; background:radial-gradient(circle,rgba(255,255,255,.06),transparent 60%); bottom:-140px; left:-100px; }
.gate-head { text-align:center; padding:9vh 16px 0; color:#fff; position:relative; z-index:2; }
.gate-logo { width:52px; height:52px; margin:0 auto 14px; border-radius:13px; background:linear-gradient(135deg,#D9403A,#a5322e); display:flex; align-items:center; justify-content:center; font-size:26px; font-weight:bold; color:#fff; box-shadow:0 8px 24px rgba(217,64,58,.35); }
.gate-head h1 { font-size:26px; letter-spacing:2px; }
.gate-head .sub { color:#9db8d6; font-size:13px; margin-top:8px; letter-spacing:4px; }
.gate-card { position:relative; z-index:2; width:min(420px,92vw); margin:5vh auto 0; background:#fff; border-radius:16px; padding:26px 24px 22px; box-shadow:0 20px 60px rgba(0,0,0,.25); }
.gate-roles { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-bottom:18px; }
.gate-role { border:1.5px solid #e2e8f0; border-radius:10px; background:#f8fafc; padding:11px 4px; text-align:center; font-size:13px; color:#5a6b80; transition:.15s; }
.gate-role .ico { display:block; font-size:20px; margin-bottom:4px; }
.gate-role:hover { border-color:#c3cede; }
.gate-role.on { border-color:var(--navy); background:linear-gradient(180deg,#EEF3F9,#E2EBF5); color:var(--navy); font-weight:bold; }
.gate-form { display:none; flex-direction:column; gap:12px; }
.gate-form.show { display:flex; }
.gate-row { display:flex; gap:10px; }
.gate-row input { flex:1; }
.gate-row .btn { white-space:nowrap; }
.gate-tip { font-size:12px; color:var(--sub); text-align:center; min-height:16px; }
.gate-tip.err { color:var(--red); }
.gate-foot { text-align:center; color:#6d87a5; font-size:12px; padding:26px 0 18px; position:relative; z-index:2; }

/* ===== 布局框架 ===== */
.layout { display:flex; min-height:100vh; }
/* 左侧导航：与老板端（驾驶舱、风险管控）统一为白底卡片风格，深蓝高亮当前项 */
.side { width:216px; background:#fff; color:#41556E; display:flex; flex-direction:column; position:fixed; top:0; bottom:0; left:0; z-index:20; border-right:1px solid var(--line); box-shadow:2px 0 12px rgba(11,42,74,.05); }
.side .brand { padding:16px 16px; border-bottom:1px solid var(--line); display:flex; align-items:center; gap:10px; }
.side .brand .logo { width:34px; height:34px; border-radius:9px; flex:0 0 34px; background:linear-gradient(135deg,#0B2A4A,#1F5C99); color:#fff; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; }
.side .brand .t { font-size:13.5px; font-weight:700; color:var(--navy); letter-spacing:.2px; }
.side .brand .s { font-size:11px; color:#9AA9BB; margin-top:3px; }
.side nav { padding:10px 10px; flex:1; overflow-y:auto; }
.side nav a { display:flex; align-items:center; gap:9px; padding:10px 10px; border-radius:9px; font-size:13px; margin-bottom:2px; color:#41556E; transition:.12s; }
.side nav a:hover { background:#F2F6FB; color:var(--navy); }
.side nav a.on { background:linear-gradient(135deg,#0B2A4A,#164A7E); color:#fff; font-weight:600; box-shadow:0 2px 8px rgba(11,42,74,.28); }
.side .foot { padding:12px 16px; font-size:11px; color:#9AA9BB; border-top:1px solid var(--line); line-height:1.7; }
.main { flex:1; margin-left:216px; display:flex; flex-direction:column; min-width:0; }
.topbar { height:58px; background:#fff; border-bottom:1px solid var(--line); display:flex; align-items:center; padding:0 22px; gap:14px; position:sticky; top:0; z-index:15; }
.topbar .pg { font-size:16px; font-weight:bold; color:var(--navy); }
.topbar .sp { flex:1; }
.topbar .who { display:flex; align-items:center; gap:10px; }
.avatar { width:34px; height:34px; border-radius:50%; background:linear-gradient(135deg,#0B2A4A,#2a5a94); color:#fff; display:flex; align-items:center; justify-content:center; font-size:14px; font-weight:bold; cursor:pointer; }
.who .nm { font-size:13px; color:#33465c; }
.content { padding:20px 22px 40px; flex:1; min-width:0; }

/* 菜单弹层 */
.sheet-mask { position:fixed; inset:0; background:rgba(10,20,35,.45); z-index:50; display:none; }
.sheet-mask.show { display:block; }
.sheet { position:fixed; top:0; right:-340px; width:320px; max-width:88vw; bottom:0; background:#fff; z-index:51; transition:right .22s; padding:22px 20px; overflow-y:auto; }
.sheet.show { right:0; }
.sheet h3 { font-size:15px; color:var(--navy); margin-bottom:14px; }
.sheet .row { display:flex; justify-content:space-between; padding:9px 0; border-bottom:1px dashed var(--line); font-size:13px; }
.sheet .row b { color:var(--txt); }

/* ===== 卡片与表格 ===== */
.panel { background:var(--card); border-radius:14px; box-shadow:0 2px 10px rgba(11,42,74,.06); padding:18px; margin-bottom:16px; }
.panel h3 { font-size:15px; color:var(--navy); margin-bottom:14px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.panel h3::before { content:""; width:4px; height:15px; background:var(--red); border-radius:2px; }
.panel h3 .hint { font-size:12px; color:var(--sub); font-weight:normal; }
.tbl { width:100%; border-collapse:collapse; font-size:13px; }
.tbl th { text-align:left; color:var(--sub); font-weight:normal; padding:9px 8px; border-bottom:1px solid var(--line); white-space:nowrap; }
.tbl td { padding:10px 8px; border-bottom:1px solid #f0f3f7; vertical-align:middle; }
.tbl tr:hover td { background:#f8fafc; }
.tag { display:inline-block; padding:3px 9px; border-radius:20px; font-size:12px; }
.tag.g { background:#E5F5EE; color:var(--green); }
.tag.r { background:#FDECEB; color:var(--red); }
.tag.b { background:#E8F0FA; color:#2a5a94; }
.tag.y { background:#FBF3E0; color:#B7791F; }
.empty { text-align:center; color:var(--sub); font-size:13px; padding:26px 0; }
.form-row { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
.form-row input,.form-row select { width:auto; flex:1; min-width:130px; }
.chips { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
.chip { background:#fff; border:1px solid var(--line); border-radius:10px; padding:10px 14px; font-size:13px; }
.chip b { font-size:20px; color:var(--navy); display:block; }
.chip .r { color:var(--red); } .chip .g { color:var(--green); }

/* ===== 驾驶舱（老板端） ===== */
.boss-wrap { max-width:1080px; margin:0 auto; padding-bottom:50px; }
.boss-hero { background:linear-gradient(135deg,#0B2A4A 0%,#14365C 60%,#1B4470 100%); color:#fff; padding:26px 22px 30px; border-radius:0 0 22px 22px; position:relative; overflow:hidden; }
.boss-hero::after { content:""; position:absolute; width:420px; height:420px; border-radius:50%; background:radial-gradient(circle,rgba(217,64,58,.22),transparent 65%); top:-160px; right:-80px; }
.boss-hero .co { font-size:20px; font-weight:bold; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.boss-hero .co .tag { position:relative; z-index:1; }
.boss-hero .sub { color:#9db8d6; font-size:12px; margin-top:6px; }
.oneline { margin-top:16px; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.15); border-radius:12px; padding:13px 16px; font-size:13.5px; line-height:1.9; position:relative; z-index:1; }
.oneline b { color:#FFD2CE; }
.oneline .warn { color:#FF8A80; font-weight:bold; }
.kpi-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
.kpi { background:#fff; border-radius:14px; padding:16px; box-shadow:0 2px 10px rgba(11,42,74,.06); border-top:3px solid var(--navy2); }
.kpi .label { font-size:12px; color:var(--sub); }
.kpi .num { font-size:26px; font-weight:bold; color:var(--navy); margin-top:6px; font-variant-numeric:tabular-nums; }
.kpi .num small { font-size:12px; font-weight:normal; color:var(--sub); }
.kpi .delta { font-size:11.5px; margin-top:5px; color:var(--sub); }
.up { color:var(--red); } .down { color:var(--green); } .danger { color:var(--red); font-weight:bold; }
.alert-item { display:flex; gap:10px; padding:11px 0; border-bottom:1px dashed var(--line); font-size:13px; }
.alert-item:last-child { border:none; }
.alert-item .dot { flex:none; width:9px; height:9px; border-radius:50%; margin-top:5px; }
.dot.red { background:#E5484D; } .dot.yellow { background:#E7A500; } .dot.green { background:var(--green); }
.bar-line { height:9px; background:#EDF1F6; border-radius:6px; overflow:hidden; display:flex; }
.bar-line i { display:block; height:100%; }
.rate-scale { position:relative; height:14px; border-radius:7px; background:linear-gradient(90deg,#1E9E6A 0%,#1E9E6A 50%,#E7A500 50%,#E7A500 70%,#E5484D 70%); opacity:.85; }
.rate-pin { position:absolute; top:-7px; width:3px; height:28px; background:var(--navy); border-radius:2px; }
.mini-tbl { width:100%; font-size:13px; }
.mini-tbl td { padding:9px 6px; border-bottom:1px dashed var(--line); }
.mini-tbl tr:last-child td { border-bottom:none; }
.mini-tbl .amt { font-weight:bold; color:var(--navy); text-align:right; font-variant-numeric:tabular-nums; }
.flow3 { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:12px; }
.flow3 .f { background:#F7F9FC; border-radius:10px; padding:11px; text-align:center; font-size:12px; color:var(--sub); }
.flow3 .f b { display:block; font-size:17px; color:var(--navy); margin-top:3px; }
.trend { display:flex; align-items:flex-end; gap:14px; height:150px; padding:6px 4px 0; }
.trend .col { flex:1; display:flex; flex-direction:column; align-items:center; gap:6px; height:100%; justify-content:flex-end; }
.trend .bar { width:55%; background:linear-gradient(180deg,#2a5a94,#0B2A4A); border-radius:5px 5px 0 0; }
.trend .col.cur .bar { background:linear-gradient(180deg,#e05550,#D9403A); }
.trend .val { font-size:11px; color:var(--navy); font-weight:bold; }
.trend .mon { font-size:11px; color:var(--sub); }
.legend { font-size:11px; color:var(--sub); margin-top:8px; }
.legend i { display:inline-block; width:9px; height:9px; border-radius:2px; margin-right:4px; }

/* 弹窗 */
.modal-mask { position:fixed; inset:0; background:rgba(10,20,35,.5); z-index:60; display:none; align-items:center; justify-content:center; padding:16px; }
.modal-mask.show { display:flex; }
.modal { background:#fff; border-radius:14px; width:min(480px,94vw); max-height:88vh; overflow-y:auto; padding:22px; }
.modal h3 { font-size:15px; color:var(--navy); margin-bottom:14px; }
.modal .fld { margin-bottom:12px; }
.modal .fld label { display:block; font-size:12px; color:var(--sub); margin-bottom:5px; }
.modal .acts { display:flex; gap:10px; justify-content:flex-end; margin-top:16px; }

/* 多单位老板：登录后先选公司 */
.co-pick .co-hint { font-size:12px; color:var(--sub); line-height:1.75; margin:-6px 0 14px; }
.co-pick .co-list { display:flex; flex-direction:column; gap:9px; }
.co-pick .co-item { display:flex; align-items:center; gap:10px; width:100%; text-align:left; background:#F7FAFD; border:1px solid #E3EAF3; border-radius:10px; padding:12px 14px; font-size:13px; color:#0B2A4A; cursor:pointer; font-family:inherit; transition:border-color .12s, background .12s; }
.co-pick .co-item:hover { border-color:#0B5FA5; background:#EFF6FD; }
.co-pick .co-item b { font-weight:600; flex:1; min-width:0; }
.co-pick .co-item span { font-size:11px; color:#5a6b80; background:#E6ECF3; border-radius:8px; padding:2px 9px; flex:none; }
.co-pick .co-tip { font-size:11px; color:#8a9aae; margin-top:12px; line-height:1.7; }

/* 响应式 */
@media (max-width:860px) {
  .kpi-grid { grid-template-columns:1fr 1fr; }
  .side { width:64px; }
  .side .brand .t,.side .brand .s { display:none; }
  .side .brand { padding:16px 0; text-align:center; justify-content:center; }
  .side nav a { justify-content:center; padding:12px 0; font-size:17px; }
  .side nav a span.t { display:none; }
  .side .foot { display:none; }
  .main { margin-left:64px; }
  .content { padding:14px 12px 30px; }
}
@media (max-width:560px) {
  .gate-head h1 { font-size:21px; }
  .kpi-grid { grid-template-columns:1fr 1fr; gap:9px; }
  .kpi .num { font-size:21px; }
  .flow3 { grid-template-columns:1fr 1fr 1fr; gap:7px; }
  .topbar { padding:0 12px; }
  .who .nm { display:none; }
  .tbl { font-size:12px; }
  .tbl th,.tbl td { padding:8px 5px; }
}

/* ===== 侧边栏栏目拖动排序 ===== */
.zy-nav-sort > a, .zy-nav-sort > .nav-div { cursor: grab; }
.zy-nav-sort > a:active { cursor: grabbing; }
.zy-nav-sort > .zy-dragging { opacity: .4; }
.zy-nav-tools { font-size: 10px; color: #9AAABD; padding: 10px 14px 4px; line-height: 1.7; user-select: none; }
.zy-nav-tools a { color: #3D6FB4; cursor: pointer; text-decoration: none; }
.zy-nav-tools a:hover { text-decoration: underline; }
.zy-nav-sort > a:active { cursor: grabbing; }
.zy-grid-tools { padding: 4px 6px; margin-top: -8px; }
