﻿:root {
  --bg: #e7ecf3;
  --panel: #ffffff;
  --ink: #17212b;
  --ink-2: #5b6b7c;
  --ink-3: #8a99a8;
  --line: #e6ebf1;
  --brand: #0f7f74;
  --brand-2: #12a396;
  --brand-soft: #e6f5f2;
  --warn: #c9761a;
  --warn-soft: #fdf3e6;
  --danger: #c0392b;
  --danger-soft: #fdecea;
  --ok: #2b7a4b;
  --ok-soft: #e9f6ee;
  --shadow: 0 1px 2px rgba(16, 32, 48, .04), 0 8px 24px rgba(16, 32, 48, .05);
  --radius: 12px;
}

* { box-sizing: border-box; }
/* 身份未确定前先隐藏主界面，避免入口页出现前闪一下中台 */
body.auth-pending .app { visibility: hidden; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.55 "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.app { display: flex; min-height: 100vh; }

/* ---------------- 侧边栏 ---------------- */
.sidebar {
  width: 224px;
  flex: 0 0 224px;
  background:
    radial-gradient(520px 300px at 15% -8%, rgba(18, 163, 150, .30), transparent 62%),
    radial-gradient(460px 260px at 110% 42%, rgba(61, 143, 209, .18), transparent 60%),
    linear-gradient(180deg, #0c1c26 0%, #0a1620 55%, #07121a 100%);
  overflow: hidden;
  color: #cfdae4;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 8px 6px 20px; }
.logo {
  width: 120px; height: 120px; border-radius: 24px;
  background: linear-gradient(135deg, var(--brand-2), #0a5f57);
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 52px; overflow: hidden;
}
.brand-text { text-align: center; }
.brand-title { font-size: 17px; font-weight: 600; color: #fff; letter-spacing: .3px; }
.brand-sub { font-size: 11px; color: #7c8fa0; }

.sidebar > * { position: relative; z-index: 1; }

/* 细网格 + 边缘光带：远看是深色，近看有科技纹理 */
.sidebar::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(80, 200, 190, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 200, 190, .07) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.95) 0%, rgba(0,0,0,.35) 55%, transparent 85%);
          mask-image: linear-gradient(180deg, rgba(0,0,0,.95) 0%, rgba(0,0,0,.35) 55%, transparent 85%);
}
.sidebar::after {
  content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 1px; pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(53, 211, 195, .45) 30%, rgba(61, 143, 209, .25) 60%, transparent 100%);
}

.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  background: none; border: 0; color: #a9bac8; text-align: left;
  padding: 10px 12px; border-radius: 9px; font-size: 13.5px; cursor: pointer;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #e8f1f7; }
.nav-item.active { background: linear-gradient(90deg, rgba(18,163,150,.22), rgba(18,163,150,.06)); color: #fff; box-shadow: inset 2px 0 0 var(--brand-2), 0 0 18px rgba(18,163,150,.18); }
.nav-item .ico { width: 16px; opacity: .85; font-size: 13px; }

.sidebar-foot { margin-top: auto; font-size: 11.5px; color: #7c8fa0; padding: 10px 6px; border-top: 1px solid rgba(255,255,255,.07); }
.foot-row { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; color: #b9c8d4; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #7c8fa0; }
.dot.ok { background: #35c07f; box-shadow: 0 0 0 3px rgba(53,192,127,.16); }
.dot.err { background: #e05545; }

/* ---------------- 主区 ---------------- */
.main {
  flex: 1; min-width: 0; padding: 22px 26px 40px;
  background-color: var(--bg);
  /* 纸纹噪点 + 极淡斜纹，替代原来的点阵（点阵容易被看成小数点） */
  background-image:
    radial-gradient(900px 420px at 88% -12%, rgba(18, 163, 150, .075), transparent 60%),
    radial-gradient(760px 400px at -5% 0%, rgba(61, 143, 209, .06), transparent 58%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.16'/></svg>");
  box-shadow: inset 0 40px 80px -60px rgba(15, 40, 50, .25);
  background-size: auto, auto, 180px 180px;
  background-attachment: fixed, fixed, fixed;
}

.topbar { display: flex; justify-content: flex-end; align-items: center; margin-bottom: 16px; gap: 16px; }
.topbar h1 { font-size: 20px; margin: 0 0 3px; letter-spacing: .2px; }
.topbar .sub { color: var(--ink-2); font-size: 12.5px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.btn {
  border: 1px solid transparent; background: var(--brand); color: #fff;
  padding: 7px 14px; border-radius: 8px; font-size: 13px; cursor: pointer;
  transition: filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: #f7f9fb; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sm { padding: 4px 10px; font-size: 12px; border-radius: 7px; }

.pill { font-size: 12px; color: var(--ink-2); background: #fff; border: 1px solid var(--line); padding: 5px 10px; border-radius: 999px; }

/* ---------------- 卡片 ---------------- */
.tab { display: none; }
.tab.active { display: block; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 16px;
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h2 { font-size: 14.5px; margin: 0; font-weight: 600; }
.hint { color: var(--ink-3); font-size: 12px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1180px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------------- KPI ---------------- */
.kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 1400px) { .kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }

.kpi {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 14px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.kpi::after { content: ""; position: absolute; left: 0; top: 0; width: 3px; height: 100%; background: var(--brand-2); opacity: .8; }
.kpi.watch::after { background: var(--warn); }
.kpi .k-name { font-size: 12px; color: var(--ink-2); }
.kpi .k-val { font-size: 23px; font-weight: 650; margin: 5px 0 2px; letter-spacing: -.3px; }
.kpi .k-val small { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 3px; }
.kpi .k-foot { font-size: 11.5px; color: var(--ink-3); display: flex; justify-content: space-between; }
.kpi .up { color: var(--ok); } .kpi .down { color: var(--danger); }

/* ---------------- 图表 ---------------- */
.chart { height: 240px; width: 100%; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; }
.table-wrap.small { max-height: 320px; overflow-y: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 12.8px; }
.table th {
  text-align: left; color: var(--ink-2); font-weight: 500; font-size: 12px;
  padding: 8px 10px; border-bottom: 1px solid var(--line); background: #fbfcfd; white-space: nowrap;
}
.table td { padding: 9px 10px; border-bottom: 1px solid #f0f4f7; vertical-align: middle; }
.table tr:hover td { background: #fafcfd; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 12px; }

.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; border: 1px solid transparent; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--danger-soft); color: var(--danger); }
.tag.info { background: var(--brand-soft); color: var(--brand); }
.tag.mute { background: #f1f4f7; color: var(--ink-2); }

/* ---------------- 统计条 ---------------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 900px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat .s-label { font-size: 12px; color: var(--ink-2); }
.stat .s-value { font-size: 24px; font-weight: 650; margin-top: 4px; }
.stat .s-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }

/* ---------------- 操作行 ---------------- */
.action-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }

/* ---------------- 甘特 ---------------- */
.gantt { margin-top: 6px; }
.gantt-row { display: grid; grid-template-columns: 118px 1fr; align-items: center; gap: 10px; margin-bottom: 6px; }
.gantt-label { font-size: 12px; color: var(--ink-2); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gantt-track { position: relative; height: 30px; background: repeating-linear-gradient(90deg, #f6f9fb 0 1px, #fff 1px 100%); border-radius: 6px; border: 1px solid #eef2f6; }
.gantt-bar {
  position: absolute; top: 4px; height: 22px; border-radius: 5px; background: var(--brand-2);
  color: #fff; font-size: 11px; display: flex; align-items: center; padding: 0 6px; overflow: hidden; white-space: nowrap;
}
.gantt-bar.late { background: var(--danger); }
.gantt-bar.muted { background: #b9c8d4; }
.gantt-axis { display: grid; grid-template-columns: 118px 1fr; gap: 10px; font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.gantt-axis .ticks { display: flex; justify-content: space-between; }

/* ---------------- AI ---------------- */
.ai-layout { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; }
@media (max-width: 1180px) { .ai-layout { grid-template-columns: 1fr; } }

.chat-card { display: flex; flex-direction: column; min-height: 620px; }
.chat { flex: 1; overflow-y: auto; padding: 6px 2px 12px; display: flex; flex-direction: column; gap: 12px; max-height: 470px; }
.msg { max-width: 86%; padding: 10px 13px; border-radius: 12px; font-size: 13px; white-space: pre-wrap; line-height: 1.65; }
.msg.user { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: #f7fafc; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg .meta { display: block; margin-top: 8px; font-size: 11px; color: var(--ink-3); }
.msg .toolchip { display: inline-block; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; margin: 2px 4px 0 0; font-size: 11px; color: var(--ink-2); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chip { background: var(--brand-soft); color: var(--brand); border: 0; border-radius: 999px; padding: 5px 11px; font-size: 12px; cursor: pointer; }
.chip:hover { background: #d7efe9; }

.chat-input { display: flex; gap: 8px; margin-top: 8px; }
.chat-input input {
  flex: 1; padding: 10px 13px; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; outline: none;
}
.chat-input input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(18,163,150,.1); }

.tool-list { display: flex; flex-direction: column; gap: 8px; }
.tool { border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; }
.tool .t-name { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--brand); }
.tool .t-desc { font-size: 11.5px; color: var(--ink-2); margin-top: 2px; }

.evidence { font-size: 12px; color: var(--ink-2); max-height: 260px; overflow-y: auto; }
.evidence .ev { border-left: 2px solid var(--brand-2); padding: 4px 10px; margin-bottom: 8px; background: #fafcfd; }
.evidence .ev b { color: var(--ink); font-weight: 600; }

/* ---------------- 指标卡 ---------------- */
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 900px) { .metric-grid { grid-template-columns: 1fr; } }
.metric { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fcfdfe; }
.metric .m-head { display: flex; justify-content: space-between; align-items: baseline; }
.metric .m-name { font-weight: 600; font-size: 13.5px; }
.metric .m-code { font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: var(--ink-3); }
.metric .m-formula { margin: 8px 0 4px; font-size: 12.5px; color: var(--brand); background: var(--brand-soft); padding: 5px 9px; border-radius: 6px; }
.metric .m-detail { font-size: 11.8px; color: var(--ink-2); }
.metric .m-owner { font-size: 11px; color: var(--ink-3); margin-top: 6px; }

.probe { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; background: #0e1b24; color: #b7e4dc; border-radius: 9px; padding: 12px; overflow: auto; max-height: 300px; white-space: pre-wrap; }

/* ---------------- 术语解释 ---------------- */
.gl { border-bottom: 1px dashed rgba(91, 107, 124, .45); cursor: help; }
.gl i { font-style: normal; font-weight: 400; color: var(--ink-3); font-size: .92em; }
.kpi .k-name .gl { border-bottom-color: rgba(91, 107, 124, .3); }

.tip {
  position: fixed; max-width: 340px; background: #0e1b24; color: #e8f1f7;
  padding: 9px 12px; border-radius: 8px; font-size: 12px; line-height: 1.65;
  opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s;
  pointer-events: none; z-index: 200; box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
}
.tip.show { opacity: 1; transform: none; }

/* ---------------- 弹窗 ---------------- */
.modal { position: fixed; inset: 0; background: rgba(10, 20, 30, .45); display: none; padding: 24px; z-index: 150; }
.modal.show { display: grid; place-items: center; }
.modal-box {
  background: #fff; border-radius: 14px; width: min(900px, 100%); max-height: 82vh;
  display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 15px; margin: 0; }
.modal-body { padding: 6px 20px 16px; overflow: auto; }
.modal-foot { padding: 11px 20px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 12px; }
.g-short { color: var(--brand); white-space: nowrap; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(.96);
  background: rgba(14, 27, 36, .95); color: #fff; padding: 14px 26px; border-radius: 12px;
  font-size: 14px; opacity: 0; transition: all .22s; pointer-events: none; max-width: 460px;
  text-align: center; z-index: 400; box-shadow: 0 16px 48px rgba(0, 0, 0, .35);
}
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.toast.err { background: #8f2b20; }
/* ---------------- 登录 ---------------- */
.mask {
  position: fixed; inset: 0; background: radial-gradient(1200px 600px at 50% 0%, #12313b 0%, #0b141b 60%);
  display: none; place-items: center; z-index: 300; padding: 24px;
}
.mask.show { display: grid; }
#login-mask .login-card {
  opacity: 0; visibility: hidden;
  transition: opacity .18s ease;
  width: min(760px, 100%); background: #fff; border-radius: 16px; padding: 30px 34px 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
}
#login-mask .login-card.ready { opacity: 1; visibility: visible; }
.login-brand { text-align: center; margin-bottom: 22px; }
.login-logo {
  width: 88px; height: 88px; margin: 0 auto 12px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-2), #0a5f57); color: #fff; font-size: 38px; font-weight: 700;
  overflow: hidden;
}
.login-logo img { width: 100%; height: 100%; object-fit: cover; }
.login-brand h1 { font-size: 19px; margin: 0 0 4px; }
.login-sub { color: var(--ink-3); font-size: 13px; margin: 0; }
.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 720px) { .role-grid { grid-template-columns: repeat(2, 1fr); } }
.role-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 15px; cursor: pointer; text-align: left;
  background: #fcfdfe; transition: all .15s;
}
.role-card:hover { border-color: var(--brand-2); background: var(--brand-soft); transform: translateY(-1px); }
.role-card .r-name { font-weight: 600; font-size: 14px; }
.role-card .r-desc { font-size: 12px; color: var(--ink-2); margin-top: 4px; line-height: 1.5; }
.role-card .r-lock { font-size: 11px; color: var(--warn); margin-top: 6px; }
.login-pwd { display: flex; gap: 8px; margin-top: 16px; }
.login-pwd[hidden] { display: none; }
.login-pwd input {
  flex: 1; padding: 10px 13px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; outline: none;
}
.login-pwd input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(18,163,150,.12); }
.login-foot { display: flex; justify-content: space-between; margin-top: 18px; font-size: 12px; }
.login-foot code { background: #f1f4f7; padding: 1px 6px; border-radius: 5px; }
/* ---------------- 维护端表单 ---------------- */
.panel { display: none; }
.panel.active { display: block; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 900px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid label, .card > label {
  display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--ink-2);
}
.form-grid input, .form-grid select, textarea {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 13.5px;
  outline: none; font-family: inherit; background: #fff;
}
.form-grid input:focus, textarea:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(18,163,150,.1); }
textarea { resize: vertical; width: 100%; }
.logo-row { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.logo-preview {
  width: 72px; height: 72px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-2), #0a5f57); color: #fff; font-size: 26px; font-weight: 700;
  overflow: hidden; flex: 0 0 72px;
}
/* ---------------- 老板大屏（科技感） ---------------- */
.boss {
  min-height: calc(100vh - 150px);
  display: flex; flex-direction: column;
  background: radial-gradient(1000px 500px at 20% -10%, #10394a 0%, transparent 60%),
              radial-gradient(800px 400px at 90% 0%, #0b3b33 0%, transparent 55%),
              #08131a;
  border-radius: 16px; padding: 22px 22px 18px; color: #d8e6ef;
  box-shadow: inset 0 0 0 1px rgba(80, 200, 190, .15), 0 20px 60px rgba(0,0,0,.35);
}
.boss-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.boss-title { font-size: 20px; font-weight: 600; letter-spacing: 2px; color: #eaf7ff; }
.boss-title span { color: #35d3c3; }
.boss-clock { font-family: ui-monospace, Consolas, monospace; color: #6fd6c9; font-size: 13px; letter-spacing: 1px; }
.boss-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1100px) { .boss-kpis { grid-template-columns: repeat(2, 1fr); } }
.boss-kpi {
  position: relative; border-radius: 12px; padding: 14px 16px; overflow: hidden;
  background: linear-gradient(160deg, rgba(30,80,95,.55), rgba(12,30,40,.6));
  border: 1px solid rgba(80, 200, 190, .18);
}
.boss-kpi::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(53,211,195,.08), transparent);
  transform: translateX(-100%); animation: sweep 4.5s linear infinite;
}
@keyframes sweep { to { transform: translateX(100%); } }
.boss-kpi .bk-label { font-size: 12px; color: #8fb3c4; letter-spacing: .5px; }
.boss-kpi .bk-value { font-size: 34px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.2; text-shadow: 0 0 18px rgba(53,211,195,.35); }
.boss-kpi .bk-value small { font-size: 13px; color: #7fd8cc; margin-left: 4px; font-weight: 500; }
.boss-kpi .bk-foot { font-size: 11.5px; color: #6f93a5; display: flex; justify-content: space-between; }
.boss-kpi .bk-foot .up { color: #4bd6a3; } .boss-kpi .bk-foot .down { color: #ff8b7a; }
.boss-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-top: 14px; }
@media (max-width: 1100px) { .boss-grid { grid-template-columns: 1fr; } }
.boss-panel {
  background: rgba(10, 26, 34, .72); border: 1px solid rgba(80, 200, 190, .14);
  border-radius: 12px; padding: 12px 14px;
}
.boss-panel h3 { margin: 0 0 8px; font-size: 13px; color: #9fc4d4; font-weight: 500; letter-spacing: 1px; }
.boss-chart { height: 230px; }
.boss-risk-item { display: flex; justify-content: space-between; font-size: 12.5px; padding: 7px 0; border-bottom: 1px dashed rgba(120,180,200,.14); }
.boss-risk-item .lv { color: #ff8b7a; }
.boss-head-right { display: flex; align-items: center; gap: 14px; }
.boss-modes { display: flex; gap: 3px; background: rgba(255,255,255,.06); padding: 3px; border-radius: 9px; }
.boss-modes button { background: none; border: 0; color: #8fb3c4; font-size: 12px; padding: 5px 11px; border-radius: 7px; cursor: pointer; }
.boss-modes button:hover { color: #dff4ff; }
.boss-modes button.active { background: rgba(53,211,195,.18); color: #eaf7ff; }
.boss-slides { position: relative; flex: 1; }
.boss-slide { display: none; }
.boss-slide.active { display: block; animation: slideIn .55s ease; }
@keyframes slideIn { from { transform: translateY(8px); } to { transform: none; } }
.promo { position: relative; height: 560px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; }
.promo-bg {
  position: absolute; inset: 0;
  background: radial-gradient(700px 380px at 25% 20%, rgba(53,211,195,.28), transparent 60%),
              radial-gradient(600px 360px at 80% 75%, rgba(61,143,209,.25), transparent 60%),
              linear-gradient(160deg, #061019, #0c2630 55%, #07161d);
  animation: breathe 9s ease-in-out infinite;
}
@keyframes breathe { 0%,100% { opacity: .85; } 50% { opacity: 1; } }
.promo-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.promo-content { position: relative; z-index: 2; text-align: center; padding: 20px; }
.promo-logo {
  width: 92px; height: 92px; margin: 0 auto 18px; border-radius: 20px; display: grid; place-items: center;
  background: linear-gradient(135deg, #12a396, #0a5f57); color: #fff; font-size: 40px; font-weight: 700;
  overflow: hidden; box-shadow: 0 0 40px rgba(53,211,195,.35);
}
.promo-logo img { width: 100%; height: 100%; object-fit: cover; }
.promo-content h2 { font-size: 30px; letter-spacing: 3px; color: #f2fbff; margin: 0 0 10px; text-shadow: 0 0 24px rgba(53,211,195,.3); }
.promo-sub { color: #9fc4d4; font-size: 14px; letter-spacing: 2px; margin: 0 0 26px; }
.promo-stats { display: flex; gap: 44px; justify-content: center; margin-bottom: 24px; }
.promo-stats div { text-align: center; }
.promo-stats b { display: block; font-size: 30px; color: #35d3c3; font-weight: 700; letter-spacing: 1px; }
.promo-stats span { font-size: 12px; color: #7fa5b6; }
.promo-note { color: #6f93a5; font-size: 12.5px; letter-spacing: 2px; }
.boss-ticker { margin-top: 12px; font-size: 12px; color: #7fd8cc; overflow: hidden; white-space: nowrap; }
.boss-ticker span { display: inline-block; padding-left: 100%; animation: ticker 22s linear infinite; }
@keyframes ticker { to { transform: translateX(-100%); } }

/* ---------------- 角色首页通用 ---------------- */
.home-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
@media (max-width: 1100px) { .home-grid { grid-template-columns: 1fr; } }
.home-stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.home-stat .hs-label { font-size: 12px; color: var(--ink-2); }
.home-stat .hs-value { font-size: 26px; font-weight: 650; margin-top: 2px; }
.home-stat .hs-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }

/* ---------------- 知识页 ---------------- */
.kb-results { margin-top: 12px; max-height: 320px; overflow-y: auto; }
.kb-hit { border-left: 2px solid var(--brand-2); background: #fafcfd; padding: 8px 12px; margin-bottom: 8px; border-radius: 0 8px 8px 0; }
.kb-hit .kh-title { font-weight: 600; font-size: 13px; }
.kb-hit .kh-meta { font-size: 11px; color: var(--ink-3); margin: 2px 0 4px; }
.kb-hit .kh-text { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; max-height: 96px; overflow: hidden; }

/* ---------------- 轮播指示点 ---------------- */
.boss-dots { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.boss-dot {
  width: 26px; height: 4px; border-radius: 2px; background: rgba(120,180,200,.25);
  border: 0; cursor: pointer; transition: all .25s;
}
.boss-dot.active { background: linear-gradient(90deg, #35d3c3, #3d8fd1); box-shadow: 0 0 10px rgba(53,211,195,.6); width: 40px; }
.boss-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
@media (max-width: 1100px) { .boss-strip { grid-template-columns: repeat(2, 1fr); } }
.boss-mini {
  background: rgba(10,26,34,.6); border: 1px solid rgba(80,200,190,.12); border-radius: 10px;
  padding: 10px 12px; font-size: 12px; color: #8fb3c4;
}
.boss-mini b { display: block; font-size: 20px; color: #eaf7ff; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* ---------------- 业务协同 ---------------- */
.subtabs { display: flex; gap: 6px; margin-bottom: 14px; }
.subtab {
  background: #fff; border: 1px solid var(--line); color: var(--ink-2);
  padding: 7px 16px; border-radius: 999px; font-size: 13px; cursor: pointer;
}
.subtab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.upload-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ---------------- 登录背景图 ---------------- */
.login-bg {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  background-size: cover; background-position: center center; background-repeat: no-repeat;
  background-color: #0b141b;
  z-index: 299; display: none;
}
.login-bg.show { display: block; }
.login-bg::after { content: ""; position: absolute; inset: 0; background: rgba(6, 18, 26, .45); }

/* ---------------- 模块页面 ---------------- */
.module-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.module-head h2 { font-size: 18px; margin: 0; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; font-size: 13px; }
.kv div { display: flex; justify-content: space-between; border-bottom: 1px dashed #eef2f6; padding: 6px 0; }
.kv span { color: var(--ink-2); }
.kv b { font-weight: 600; }

/* 操作说明 */
.guide-steps { margin: 0 0 18px; padding-left: 20px; font-size: 13.5px; line-height: 2; color: var(--ink-2); }
.guide-flow {
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 10px; align-items: stretch;
  background: #fafcfd; border: 1px solid var(--line); border-radius: 10px; padding: 14px;
  font-size: 12.5px; line-height: 1.8; color: var(--ink-2);
}
.guide-flow b { color: var(--ink); }
.guide-arrow { display: grid; place-items: center; color: var(--brand-2); font-size: 18px; }

/* 维护端：带标题的顶栏；表单字段竖排 */
.topbar.with-title { justify-content: space-between; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--ink-2); margin-top: 14px; }
.field input { padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 13.5px; }

/* 知识 Wiki 卡片 */
.wiki-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.wiki-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fbfdfe; }
.wiki-topic { font-weight: 600; margin-bottom: 6px; }
.wiki-summary { font-size: 13px; color: var(--ink-2); line-height: 1.8; }
.wiki-points { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-2); line-height: 1.9; }
.wiki-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 11.5px; color: #8a99a8; }

.gap-banner {
  background: #fff8e8; border: 1px solid #f2d9a8; color: #8a5b12;
  border-radius: 10px; padding: 10px 14px; font-size: 12.5px; margin-bottom: 12px;
}
.gap-banner a { color: #0f7f74; font-weight: 600; }

/* 知识问答结果 */
.kb-answer { background: #f3faf9; border: 1px solid #cfe9e5; border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.kb-answer-head { font-weight: 600; margin-bottom: 8px; color: var(--ink); }
.kb-answer-head .hint { font-weight: 400; margin-left: 8px; }
.kb-answer-body { white-space: pre-wrap; line-height: 1.95; font-size: 13.5px; color: var(--ink); }
.kb-src-head { font-size: 12.5px; color: var(--ink-2); margin: 4px 0 8px; }

/* ---------------- 企业协同 ---------------- */
.collab { display: grid; grid-template-columns: 1fr; gap: 0; height: calc(100vh - 168px); }
.collab-main {
  background: #fff; border: 1px solid #e8eef3; border-radius: 16px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 1px 3px rgba(16,40,60,.04);
}
.collab-head { padding: 12px 16px; border-bottom: 1px solid #eef3f7; display: flex; justify-content: space-between; align-items: center; background: #fff; }
.collab-head .ch-name { font-size: 14px; font-weight: 600; color: #1d2b36; }
.collab-head .ch-sub { font-size: 11px; color: #93a4b1; margin-top: 2px; }
.collab-messages { flex: 1; overflow: auto; padding: 12px 16px 4px; background: linear-gradient(180deg, #fbfdfe 0%, #f7fafb 100%); }
.day-sep { text-align: center; margin: 6px 0 12px; }
.day-sep span { background: rgba(16,40,60,.05); color: #7b8b98; font-size: 10.5px; padding: 2px 9px; border-radius: 9px; }

.collab-msg { display: flex; gap: 7px; margin-bottom: 7px; align-items: flex-start; }
.collab-msg .avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: 0 0 28px; display: grid; place-items: center;
  color: #fff; font-size: 11.5px; font-weight: 600; margin-top: 1px;
}
.collab-msg .bubble-wrap { max-width: min(400px, 60%); position: relative; }
.collab-msg.mine .bubble-wrap { position: relative; }
.collab-msg .meta-line { display: flex; gap: 6px; align-items: baseline; margin-bottom: 3px; }
.collab-msg .meta-line .n { font-size: 11px; color: #7b8b98; }
.collab-msg .meta-line .t { font-size: 10px; color: #a9b7c2; }
.collab-msg .bubble {
  min-height: 0 !important;
  background: #fff; border: 1px solid #e9eff4; border-radius: 3px 11px 11px 11px;
  padding: 4px 9px; font-size: 12.5px; line-height: 1.45; color: #1d2b36;
  white-space: pre-wrap; word-break: break-word;
  box-shadow: 0 1px 2px rgba(16,40,60,.03);
}




.collab-msg .fed { font-size: 10px; color: #12a396; margin-top: 3px; }

.collab-msg.mine { flex-direction: row; justify-content: flex-end; }

/* 气泡侧边的行内操作：悬停才出现，不占位 */
.msg-actions {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: flex; gap: 4px; opacity: 0; transition: opacity .15s;
}
.collab-msg:not(.mine) .msg-actions { left: 100%; margin-left: 6px; }
.collab-msg.mine .msg-actions { right: 100%; margin-right: 6px; }
.collab-msg:hover .msg-actions { opacity: 1; }
.msg-actions a {
  padding: 4px 9px; border-radius: 12px; white-space: nowrap;
  background: #fff; border: 1px solid #e2eaf0; color: #5b6b7c; font-size: 11.5px; text-decoration: none;
  box-shadow: 0 1px 2px rgba(16,40,60,.06);
}
.msg-actions a:hover { color: #0f7f74; border-color: #bfe6df; background: #f0faf8; }
.collab-msg.mine .bubble-wrap { text-align: right; }
.collab-msg.mine .meta-line { justify-content: flex-end; }
.collab-msg.mine .bubble { background: #e4f5f1; border-color: #c7e9e1; border-radius: 11px 3px 11px 11px; text-align: left; }

.collab-input { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid #eef3f7; background: #fff; align-items: flex-end; }
.collab-input textarea {
  flex: 1; resize: none; min-height: 38px; max-height: 110px; padding: 9px 12px;
  border: 1px solid #e4ebf1; border-radius: 10px; font-size: 13px; font-family: inherit; line-height: 1.6;
  background: #fbfdfe;
}
.collab-input textarea:focus { outline: none; border-color: var(--brand-2); background: #fff; box-shadow: 0 0 0 3px rgba(18,163,150,.09); }
.collab-input .send-btn { height: 38px; padding: 0 18px; font-size: 13px; }
.collab-input .img-btn { height: 38px; padding: 0 12px; }
.collab-empty { text-align: center; color: #a3b2be; font-size: 12.5px; padding: 60px 0; }

.badge { background: #e5533d; color: #fff; border-radius: 9px; padding: 0 5px; font-size: 10px; margin-left: 4px; }

/* 侧边栏频道列表（QQ 式） */
.sidebar-channels { margin-top: 10px; border-top: 1px solid rgba(255,255,255,.08); padding-top: 8px; max-height: 34vh; overflow: auto; flex: 0 0 auto; }
.sidebar-channels .sc-title { font-size: 11px; color: #6f8794; padding: 0 6px 6px; letter-spacing: 1px; }
.channel-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 8px; color: #b9cbd6; font-size: 13px; cursor: pointer; }
.channel-item:hover { background: rgba(255,255,255,.06); }
.channel-item.active { background: rgba(18,163,150,.22); color: #fff; box-shadow: inset 2px 0 0 var(--brand-2); }
.channel-item .unread { background: #e5533d; color: #fff; border-radius: 9px; padding: 0 6px; font-size: 10px; }

.todo-banner {
  background: #fff8e8; border: 1px solid #f2d9a8; color: #8a5b12;
  border-radius: 10px; padding: 9px 14px; font-size: 12.5px; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.todo-banner a { margin-left: auto; color: #0f7f74; font-weight: 600; text-decoration: none; }

/* 文件气泡 */
.filecard {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 6px;
  border: 1px solid #d7e3ec; border-radius: 10px; background: #f6fafc;
  color: #1d2b36; text-decoration: none; min-width: 210px; max-width: 300px;
  box-shadow: 0 1px 2px rgba(16,40,60,.05);
}
.filecard:hover { border-color: var(--brand-2); background: #eef9f7; }
.filecard .fc-icon {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 8px;
  background: linear-gradient(135deg, #dfeaf2, #cfdde9); color: #43607a;
  display: grid; place-items: center; font-size: 10px; font-weight: 700; letter-spacing: .5px;
}
.filecard .fc-main { display: flex; flex-direction: column; line-height: 1.5; overflow: hidden; }
.filecard .fc-main b { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filecard .fc-main i { font-style: normal; font-size: 11px; color: #93a4b1; }
.filecard .fc-dl { margin-left: auto; color: #0f7f74; font-size: 14px; }
.filecard:hover { border-color: var(--brand-2); background: #f0faf8; }
.filecard span { color: #93a4b1; font-size: 11px; }


.quote { border-left: 2px solid #cfe3df; padding: 2px 8px; margin-bottom: 4px; font-size: 11.5px; color: #7b8b98; background: rgba(15,127,116,.05); border-radius: 4px; }
.reply-chip { background: #eef7f5; border: 1px solid #cfe8e2; color: #0f7f74; font-size: 12px; padding: 5px 9px; border-radius: 8px; margin: 0 12px 6px; }
.reply-chip a { float: right; color: #7b8b98; }
.search-hit { background: #fff; border: 1px solid #e9eff4; border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; }

/* 图片大图 */
.lightbox {
  position: fixed; inset: 0; background: rgba(8,16,22,.86); z-index: 500;
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.lightbox.show { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }

/* ---------------- H5 / 窄屏 ---------------- */
@media (max-width: 980px) {
  .app { height: auto !important; min-height: 100vh; }
  .sidebar { max-height: 46vh; overflow: auto; }
  .main { width: 100%; flex: 1 1 auto; }
  .brand-text { display: none; }

  .app { flex-direction: column; }
  .sidebar { width: 100%; flex: 0 0 auto; position: static; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; }
  .brand { flex-direction: row; align-items: center; gap: 10px; padding: 0; }
  .logo { width: 48px; height: 48px; border-radius: 12px; font-size: 22px; }
  .brand-text { text-align: left; }
  .brand-title { font-size: 14px; }
  .brand-sub { font-size: 11px; }
  .nav { flex-direction: row; flex-wrap: wrap; gap: 4px; margin: 0; flex: 1 1 100%; }
  .nav-item { padding: 7px 10px; font-size: 12.5px; }
  .sidebar-channels { flex: 1 1 100%; max-height: none; border-top: 0; padding-top: 0; display: flex; gap: 6px; overflow-x: auto; }
  .sidebar-channels .sc-title { display: none; }
  .channel-item { white-space: nowrap; }
  .sidebar-foot { display: none; }
  .main { padding: 12px; }
  .topbar { flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
  .grid-2, .home-grid { grid-template-columns: 1fr !important; }
  .collab { height: auto; }
  .collab-messages { max-height: 58vh; }
  .collab-msg .bubble-wrap { max-width: 78%; }
  .table-wrap { overflow-x: auto; }
  .card { padding: 12px; }
  .modal-box { width: 96vw !important; height: auto !important; max-height: 92vh; }
}

@media (max-width: 560px) {
  .nav-item { font-size: 12px; padding: 6px 8px; }
  .collab-head .ch-sub { display: none; }
  .collab-msg .bubble { font-size: 12px; }
}

/* ============ 企业协同：左侧窄频道栏（科技感） ============ */
.collab {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 12px;
  height: calc(100vh - 168px);
}

.collab-channels {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 10px;
  border-radius: 14px;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(47, 211, 184, .13), transparent 60%),
    linear-gradient(180deg, #0d2b3a 0%, #0a1f2b 100%);
  border: 1px solid rgba(47, 211, 184, .16);
  box-shadow: 0 10px 26px rgba(10, 34, 46, .18), inset 0 1px 0 rgba(255, 255, 255, .04);
  overflow: auto;
  align-self: stretch;
}

.collab-channels .card-head {
  padding: 0 4px 10px !important;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  margin-bottom: 6px;
}

.collab-channels .card-head h2 {
  color: #7fd6c8;
  font-size: 11px;
  letter-spacing: .18em;
  font-weight: 600;
  margin: 0;
}

.collab-channels .channel-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  color: #a9c1cd;
  font-size: 12.5px;
  cursor: pointer;
  position: relative;
  transition: background .15s, color .15s, transform .15s;
}

.collab-channels .channel-item::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: #2f6a78;
  transition: background .15s, box-shadow .15s;
}

.collab-channels .channel-item:hover {
  background: rgba(255, 255, 255, .05);
  color: #e8f6f3;
}

.collab-channels .channel-item.active {
  background: linear-gradient(90deg, rgba(47, 211, 184, .26), rgba(47, 211, 184, .04));
  color: #ffffff;
  box-shadow: inset 2px 0 0 #2fd3b8, 0 0 0 1px rgba(47, 211, 184, .12) inset;
  transform: translateX(1px);
}

.collab-channels .channel-item.active::before {
  background: #2fd3b8;
  box-shadow: 0 0 8px rgba(47, 211, 184, .9);
}

.collab-channels .channel-item .unread {
  margin-left: auto;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 8px;
  background: #e0663f;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

@media (max-width: 980px) {
  .collab { grid-template-columns: 1fr; }
  .collab-channels { flex-direction: row; overflow-x: auto; padding: 8px; }
  .collab-channels .card-head { display: none; }
  .collab-channels .channel-item { white-space: nowrap; }
}

/* 铃铛角标 */
.nav-item { position: relative; }
.nav-item .badge {
  margin-left: auto;
  min-width: 17px; height: 17px; padding: 0 5px;
  border-radius: 9px; background: #e0663f; color: #fff;
  font-size: 10.5px; line-height: 17px; text-align: center;
  box-shadow: 0 0 0 2px rgba(10, 30, 40, .55);
}
.nav-item .ico { filter: grayscale(.2); }

/* 子页签角标 */
.subtab { position: relative; }
.subtab .badge {
  display: inline-block; margin-left: 5px; min-width: 16px; height: 16px; padding: 0 5px;
  border-radius: 8px; background: #e0663f; color: #fff; font-size: 10px; line-height: 16px;
  text-align: center; vertical-align: 1px;
}

/* 生产状态图 */
.lt-wrap { padding: 4px 2px; }
.lt-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.lt-head b { font-size: 13.5px; }
.lt-row { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.lt-line { width: 84px; flex: 0 0 84px; font-size: 12px; color: #5b6b7c; font-family: ui-monospace, monospace; }
.lt-track { position: relative; flex: 1; height: 26px; background: #eef3f7; border-radius: 6px; overflow: hidden; }
.lt-seg {
  position: absolute; top: 3px; bottom: 3px; border-radius: 4px; overflow: hidden;
  display: flex; align-items: center; padding: 0 6px; font-size: 10.5px; color: #fff;
  white-space: nowrap;
}
.lt-seg span { overflow: hidden; text-overflow: ellipsis; }
.lt-seg.done { background: linear-gradient(180deg, #7fa8c4, #6b93ae); }
.lt-seg.live {
  background: linear-gradient(90deg, #17b89f, #2fd3b8);
  box-shadow: 0 0 10px rgba(47, 211, 184, .55);
  animation: ltPulse 2.2s ease-in-out infinite;
}
.lt-seg.plan {
  background: repeating-linear-gradient(45deg, #cfe0ea, #cfe0ea 6px, #dde9f1 6px, #dde9f1 12px);
  color: #5b7b90;
}
.lt-seg.stop { background: linear-gradient(180deg, #e0663f, #c9502c); }
@keyframes ltPulse { 0%,100% { box-shadow: 0 0 8px rgba(47,211,184,.45);} 50% { box-shadow: 0 0 16px rgba(47,211,184,.85);} }
.lt-now { position: absolute; top: 0; bottom: 0; width: 2px; background: #e0663f; box-shadow: 0 0 6px rgba(224,102,63,.8); }
.lt-axis { position: relative; margin-left: 94px; display: flex; justify-content: space-between; font-size: 11px; color: #93a4b1; margin-top: 8px; height: 16px; }
.lt-axis .lt-now-label {
  position: absolute; transform: translateX(-50%); white-space: nowrap;
  color: #e0663f; font-weight: 600; background: #fff; padding: 0 4px;
}
.lt-now-label { color: #e0663f; font-weight: 600; }
.lt-pauses { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.lt-pause-tag { font-size: 11px; color: #8a3b1f; background: #fdeee7; border: 1px solid #f6d3c5; border-radius: 6px; padding: 3px 8px; }

.lt-pause {
  position: absolute; top: 0; bottom: 0; z-index: 2;
  background: repeating-linear-gradient(45deg, rgba(224,102,63,.85) 0 5px, rgba(224,102,63,.55) 5px 10px);
  border-left: 1px solid rgba(224,102,63,.9);
  pointer-events: none;
}
.lt-line { display: flex; align-items: center; gap: 6px; }
.lt-chip { font-size: 10px; padding: 1px 5px; border-radius: 6px; font-family: inherit; }
.lt-chip.ok { background: #e3f7f2; color: #0f7f74; }
.lt-chip.bad { background: #fdeee7; color: #b2431c; }
.lt-chip.idle { background: #eef2f6; color: #7b8b98; }
.lt-pause-tag.live { background: #fdeee7; border-color: #e0663f; color: #b2431c; font-weight: 600; }

/* 缩放按钮 */
.lt-zoom { display: flex; gap: 4px; margin-left: auto; }
.lt-zoom button {
  border: 1px solid #d6e3ec; background: #fff; color: #5b7b90;
  font-size: 11.5px; padding: 3px 9px; border-radius: 7px; cursor: pointer;
}
.lt-zoom button.on { background: #0f7f74; border-color: #0f7f74; color: #fff; }

/* 科技感轨道 */
.lt-track {
  background:
    linear-gradient(90deg, rgba(255,255,255,0) 0 49.7%, rgba(15,127,116,.06) 49.7% 50.3%, rgba(255,255,255,0) 50.3%),
    repeating-linear-gradient(90deg, #eef4f8 0 1px, transparent 1px 56px),
    #f4f8fb;
  border: 1px solid #e2ecf3;
  box-shadow: inset 0 1px 3px rgba(16,40,60,.05);
}
.lt-seg { transition: filter .2s; }
.lt-seg:hover { filter: brightness(1.08) saturate(1.1); }
.lt-seg.live::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  transform: translateX(-100%);
  animation: ltSweep 2.6s linear infinite;
}
@keyframes ltSweep { to { transform: translateX(100%); } }
.lt-chg {
  position: absolute; top: 4px; bottom: 4px; z-index: 3;
  background: repeating-linear-gradient(45deg, #f0b429 0 3px, #f7d774 3px 6px);
  border-radius: 2px; pointer-events: auto;
}

.lt-tip {
  position: fixed; z-index: 999; display: none;
  background: rgba(16,40,60,.92); color: #eaf6f4; font-size: 11.5px;
  padding: 3px 8px; border-radius: 6px; pointer-events: none;
  font-family: ui-monospace, monospace;
}
.lt-hint { font-size: 11px; color: #93a4b1; margin-top: 6px; }

/* 换型号：左侧细线；同型号紧接：无分隔 */
.lt-seg.newmodel { box-shadow: inset 2px 0 0 rgba(255,255,255,.85); }
.lt-seg.cont { border-radius: 0; }

/* 换型号调机 = 黄色块 */
.lt-seg.changeover {
  background: repeating-linear-gradient(45deg, #f0b429 0 6px, #f7d774 6px 12px) !important;
  color: #6b4a06; font-weight: 600;
}
/* 设备故障维修 = 红色块（停工） */
.lt-seg.stop { background: repeating-linear-gradient(45deg, #e0663f 0 6px, #f29a7c 6px 12px) !important; color: #fff; }

/* 顺延提醒 */
.cascade-tip {
  position: fixed; right: 22px; bottom: 22px; z-index: 900; width: 340px;
  background: #fff8e8; border: 1px solid #f2d9a8; border-radius: 12px;
  box-shadow: 0 12px 30px rgba(16,40,60,.18); padding: 12px 14px;
}
.cascade-tip .ct-head { font-weight: 600; color: #8a5b12; font-size: 13px; margin-bottom: 6px; }
.cascade-tip .ct-body { font-size: 12px; color: #6b5a3a; line-height: 1.7; }
.cascade-tip .ct-body b { color: #8a5b12; }
.cascade-tip .ct-close {
  margin-top: 8px; border: 1px solid #e6c98d; background: #fff; color: #8a5b12;
  font-size: 12px; padding: 3px 10px; border-radius: 7px; cursor: pointer;
}

/* ===== 生产状态大屏样式 ===== */
.lt-wrap {
  position: relative;
  padding: 20px 22px 16px;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(47, 211, 184, .10), transparent 55%),
    radial-gradient(90% 70% at 100% 0%, rgba(63, 127, 191, .12), transparent 60%),
    linear-gradient(160deg, #08212c 0%, #06161f 45%, #04101a 100%);
  border: 1px solid rgba(47, 211, 184, .20);
  box-shadow:
    0 24px 60px rgba(4, 18, 26, .35),
    inset 0 1px 0 rgba(255, 255, 255, .06),
    inset 0 0 60px rgba(47, 211, 184, .05);
}

/* 网格 + 扫描光 */
.lt-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(120, 220, 210, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 220, 210, .04) 1px, transparent 1px);
  background-size: 100% 28px, 56px 100%;
  pointer-events: none;
  opacity: .7;
}

.lt-wrap::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -30%;
  width: 40%;
  height: 180%;
  background: linear-gradient(100deg, transparent, rgba(47, 211, 184, .07), transparent);
  transform: rotate(8deg);
  animation: ltScan 9s linear infinite;
  pointer-events: none;
}

@keyframes ltScan {
  0% { left: -40%; }
  100% { left: 130%; }
}

.lt-wrap > * { position: relative; z-index: 1; }

.lt-head { align-items: center; gap: 12px; margin-bottom: 14px; }
.lt-head b {
  font-size: 14.5px;
  letter-spacing: .08em;
  color: #e8fbf7;
  text-shadow: 0 0 14px rgba(47, 211, 184, .35);
}
.lt-head .hint { color: #6f95a2; font-size: 11px; }

.lt-plant {
  background: rgba(9, 39, 52, .9);
  border: 1px solid rgba(47, 211, 184, .28);
  color: #bfeee7;
  border-radius: 9px;
  padding: 5px 10px;
  font-size: 12px;
  outline: none;
}

.lt-zoom button {
  background: rgba(9, 39, 52, .85);
  border: 1px solid rgba(47, 211, 184, .22);
  color: #8fc8bf;
  border-radius: 9px;
  padding: 4px 11px;
  font-size: 11.5px;
  cursor: pointer;
  transition: all .18s;
}
.lt-zoom button:hover { border-color: rgba(47, 211, 184, .55); color: #d9fbf5; }
.lt-zoom button.on {
  background: linear-gradient(180deg, #17b89f, #0d8c7c);
  border-color: #2fd3b8;
  color: #fff;
  box-shadow: 0 0 16px rgba(47, 211, 184, .45);
}

.lt-row { gap: 12px; margin-bottom: 9px; }

.lt-line {
  width: 118px;
  flex: 0 0 118px;
  white-space: nowrap;
  font-size: 11.5px;
  color: #9fe0d6;
  font-family: ui-monospace, SFMono-Regular, monospace;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.lt-line::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, #2fd3b8, rgba(47, 211, 184, .15));
  box-shadow: 0 0 8px rgba(47, 211, 184, .7);
}

.lt-chip {
  white-space: nowrap;
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 5px;
  letter-spacing: .05em;
  font-family: ui-monospace, monospace;
}
.lt-chip.ok { background: rgba(47, 211, 184, .16); color: #5ff0d6; box-shadow: 0 0 10px rgba(47, 211, 184, .25) inset; }
.lt-chip.bad { background: rgba(224, 102, 63, .18); color: #ff9d7a; box-shadow: 0 0 10px rgba(224, 102, 63, .25) inset; }
.lt-chip.idle { background: rgba(120, 150, 165, .14); color: #8aa6b3; }

.lt-track {
  background:
    repeating-linear-gradient(90deg, rgba(120, 220, 210, .07) 0 1px, transparent 1px 56px),
    linear-gradient(180deg, rgba(6, 30, 40, .95), rgba(4, 22, 31, .95));
  border: 1px solid rgba(47, 211, 184, .14);
  border-radius: 8px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, .45);
}

.lt-seg {
  border-radius: 5px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28),
    inset 0 -8px 14px rgba(0, 0, 0, .18),
    0 2px 6px rgba(0, 0, 0, .25);
  transition: filter .18s, transform .18s;
}
.lt-seg:hover { filter: brightness(1.15) saturate(1.15); transform: translateY(-1px); }

.lt-seg.done { opacity: .92; }

.lt-seg.live {
  box-shadow:
    0 0 18px rgba(47, 211, 184, .55),
    inset 0 1px 0 rgba(255, 255, 255, .35);
  animation: ltPulse 2.4s ease-in-out infinite;
}

.lt-seg.plan {
  border-style: dashed;
  box-shadow: inset 0 0 12px rgba(120, 220, 210, .08);
}

.lt-seg.stop {
  box-shadow: 0 0 14px rgba(224, 102, 63, .5), inset 0 1px 0 rgba(255, 255, 255, .2);
}

.lt-seg.changeover {
  box-shadow: 0 0 14px rgba(240, 180, 41, .5), inset 0 1px 0 rgba(255, 255, 255, .3);
}

.lt-now {
  width: 2px;
  background: linear-gradient(180deg, #ff8a5c, #e0663f);
  box-shadow: 0 0 12px rgba(255, 120, 70, .95);
  animation: ltNowPulse 1.8s ease-in-out infinite;
}
.lt-now::after {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff8a5c;
  box-shadow: 0 0 10px #ff8a5c;
}
@keyframes ltNowPulse { 0%,100% { opacity: .85; } 50% { opacity: 1; } }

.lt-axis { color: #5f8794; font-size: 10.5px; letter-spacing: .04em; }
.lt-axis .lt-now-label {
  background: rgba(255, 138, 92, .14);
  border: 1px solid rgba(255, 138, 92, .35);
  color: #ffb08c;
  padding: 1px 8px;
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(255, 138, 92, .25);
}

.lt-hint { color: #527783; font-size: 10.5px; }
.lt-pause-tag.live {
  background: rgba(224, 102, 63, .16);
  border-color: rgba(224, 102, 63, .45);
  color: #ffab8c;
}

/* 极窄的调机/停工块给个最小可见宽度 */
.lt-seg.changeover, .lt-seg.stop { min-width: 6px; }

.lt-track { min-height: 34px; }

/* 顶部数字卡 */
.lt-stats { display: flex; gap: 12px; margin: 4px 0 16px; }
.lt-stat {
  flex: 0 0 auto; min-width: 132px; padding: 9px 14px; border-radius: 12px;
  background: linear-gradient(150deg, rgba(47,211,184,.12), rgba(8,40,54,.5));
  border: 1px solid rgba(47,211,184,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 20px rgba(0,0,0,.22);
}
.lt-stat i { display: block; font-style: normal; font-size: 10.5px; color: #7fb8ae; letter-spacing: .12em; }
.lt-stat b { font-size: 22px; color: #eafcf8; font-family: ui-monospace, monospace; letter-spacing: .02em; }
.lt-stat b.bad { color: #ff9d7a; }
.lt-stat em { font-style: normal; font-size: 10.5px; color: #5f8794; margin-left: 4px; }

/* 在产块流动光带 */
.lt-seg.live::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.55) 50%, transparent 80%);
  transform: translateX(-120%);
  animation: ltFlow 2.8s linear infinite;
}
@keyframes ltFlow { to { transform: translateX(120%); } }

/* 停工块闪烁边框 */
.lt-seg.stop { animation: ltStopBlink 1.6s ease-in-out infinite; }
@keyframes ltStopBlink {
  0%, 100% { box-shadow: 0 0 10px rgba(224,102,63,.45); }
  50% { box-shadow: 0 0 22px rgba(224,102,63,.95), inset 0 0 12px rgba(255,150,110,.35); }
}

/* 全屏大屏模式：隐藏导航与侧栏，只留生产大屏 */
body.dashboard-mode .sidebar,
body.dashboard-mode .topbar,
body.dashboard-mode .subtabs,
body.dashboard-mode .module-head,
body.dashboard-mode .manual-plan,
body.dashboard-mode #plan-assignments,
body.dashboard-mode .hero,
body.dashboard-mode .kpi-grid { display: none !important; }

body.dashboard-mode .main { padding: 10px 16px !important; max-width: none !important; }
body.dashboard-mode #tab-dashboard { max-width: none !important; }
body.dashboard-mode .lt-wrap { min-height: calc(100vh - 60px); }
body.dashboard-mode .lt-row { margin-bottom: 14px; }
body.dashboard-mode .lt-track { min-height: 46px; }

.lt-fullscreen {
  margin-left: auto;
  background: rgba(9, 39, 52, .9);
  border: 1px solid rgba(47, 211, 184, .35);
  color: #8fe6d8;
  border-radius: 9px;
  padding: 5px 12px;
  font-size: 11.5px;
  cursor: pointer;
  transition: all .18s;
}
.lt-fullscreen:hover { border-color: #2fd3b8; color: #eafffb; box-shadow: 0 0 14px rgba(47,211,184,.35); }
.lt-zoom { margin-left: 8px; }

/* 大屏时钟 */
.lt-clock {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.15;
  padding: 2px 12px 2px 0;
  border-right: 1px solid rgba(47, 211, 184, .18);
}
.lt-clock .d { font-size: 11px; color: #6fa3ad; letter-spacing: .08em; }
.lt-clock .t {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 17px; color: #d9fbf5; letter-spacing: .06em;
  text-shadow: 0 0 12px rgba(47, 211, 184, .45);
}

body.dashboard-mode .lt-clock .t { font-size: 30px; }
body.dashboard-mode .lt-clock .d { font-size: 13px; }

/* 今日经营摘要 */
.boss-today {
  margin: 0 0 14px;
  padding: 12px 16px;
  border-radius: 14px;
  background: linear-gradient(120deg, rgba(47,211,184,.10), rgba(9,39,52,.55));
  border: 1px solid rgba(47,211,184,.22);
}
.boss-today .bt-title { font-size: 11.5px; color: #7fb8ae; letter-spacing: .12em; margin-bottom: 8px; }
.boss-today .bt-items { display: flex; gap: 26px; flex-wrap: wrap; }
.boss-today .bt-item i { display: block; font-style: normal; font-size: 10.5px; color: #6f95a2; }
.boss-today .bt-item b { font-size: 22px; font-family: ui-monospace, monospace; color: #eafcf8; }
.boss-today .bt-item b.bad { color: #ff9d7a; }
.boss-today .bt-item em { font-style: normal; font-size: 10.5px; color: #5f8794; margin-left: 3px; }
