/* ============================================================
   OCEAN X 进销存 —— OCEAN COMMAND DECK
   深海底色 · 海面青碧 / 远海蓝 · 玻璃拟态 · 数据流
   上海江南水声机器人科技有限公司
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #02101c;
  --bg-2: #031626;
  --card: rgba(6, 32, 52, .72);
  --card-solid: #06233a;
  --line: rgba(96, 178, 216, .13);
  --line-2: rgba(96, 178, 216, .07);
  --txt: #e4f6ff;
  --txt-2: #8fb6cc;
  --txt-3: #527a94;
  --navy-900: #02101c;
  --navy-800: #062238;
  --navy-700: #0a2e4a;
  --navy-600: #10406a;
  --brand: #48d6ee;
  --brand-d: #1e82c8;
  --brand-grad: linear-gradient(120deg, #48d6ee 0%, #2e9be0 45%, #1e82c8 100%);
  --blue: #2e9bd4;
  --blue-d: #2e9be0;
  --green: #21dfa6;
  --red: #FF5C6C;
  --amber: #FFB020;
  --purple: #5fb6da;
  --cyan: #48d6ee;
  --violet: #1e82c8;
  --mint: #35e2c6;
  --glow: 0 0 0 1px rgba(72,214,238,.28), 0 0 26px rgba(72,214,238,.14);
  --radius: 14px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

html { background: var(--bg); }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--txt); font-size: 14px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative; min-height: 100vh;
  overflow-x: hidden;
}
/* 背景：海面实拍（浅滩青碧 + 阳光碎金）+ 深海压膜 + 光晕 */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 620px at 12% -8%, rgba(72,214,238,.12), transparent 62%),
    radial-gradient(820px 560px at 92% 4%, rgba(30,130,200,.16), transparent 60%),
    radial-gradient(700px 520px at 60% 108%, rgba(53,226,198,.08), transparent 62%),
    linear-gradient(165deg, rgba(2,16,28,.68) 0%, rgba(3,22,36,.60) 42%, rgba(2,16,28,.76) 100%),
    url("ocean-bg.jpg?v=6") center / cover no-repeat fixed;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .4;
  background-image:
    linear-gradient(rgba(96,178,216,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96,178,216,.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(1200px 800px at 50% 0%, #000 20%, transparent 82%);
  mask-image: radial-gradient(1200px 800px at 50% 0%, #000 20%, transparent 82%);
}
::selection { background: rgba(72,214,238,.28); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(96,178,216,.18); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(72,214,238,.38); background-clip: padding-box; }

/* ---------- 布局 ---------- */
#app { display: flex; min-height: 100vh; position: relative; z-index: 1; }

.side {
  width: 218px; flex-shrink: 0; height: 100vh; position: sticky; top: 0;
  display: flex; flex-direction: column; color: var(--txt-2);
  background: linear-gradient(180deg, rgba(4,26,44,.88) 0%, rgba(3,20,34,.92) 60%, rgba(2,16,28,.95) 100%);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.side .logo { padding: 14px 14px 12px; border-bottom: 1px solid var(--line-2); }
.side .logo .lg {
  position: relative; padding: 2px 0 0;
  background: transparent;
}
.side .logo .lg img {
  width: 100%; height: auto; display: block;
  filter: drop-shadow(0 0 16px rgba(72, 214, 238, .22)) drop-shadow(0 2px 6px rgba(0,0,0,.4));
}
.side .logo .sub {
  font-size: 10.5px; color: rgba(127,168,190,.75); letter-spacing: 1.5px; margin-top: 9px;
  line-height: 1.4;
  display: flex; align-items: center; gap: 6px;
}
.side .logo .sub::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan); animation: pulse 2s infinite;
}
.nav { flex: 1; overflow-y: auto; padding: 10px 8px 14px; }
.nav::-webkit-scrollbar { width: 4px; }
.nav .grp {
  font-size: 10px; color: rgba(78,116,140,.9); padding: 14px 12px 6px;
  letter-spacing: 3px; font-weight: 600;
}
.nav a {
  position: relative; display: flex; align-items: center; gap: 9px;
  padding: 8px 11px; border-radius: 9px; margin-bottom: 2px;
  color: var(--txt-2); text-decoration: none; font-size: 14px; cursor: pointer;
  transition: .16s; border: 1px solid transparent;
}
.nav a:hover {
  background: rgba(72,214,238,.06); color: #e2f7ff;
  border-color: rgba(72,214,238,.14);
}
.nav a.on {
  color: #fff; border-color: rgba(72,214,238,.34);
  background: linear-gradient(90deg, rgba(72,214,238,.17), rgba(30,130,200,.13));
  box-shadow: inset 0 0 22px rgba(72,214,238,.10), 0 0 18px rgba(72,214,238,.10);
}
.nav a.on::before {
  content: ""; position: absolute; left: -8px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 3px;
  background: var(--brand-grad); box-shadow: 0 0 12px var(--cyan);
}
.nav a .ico { width: 18px; text-align: center; font-size: 15px; opacity: .8; color: var(--cyan); }
.nav a.on .ico { opacity: 1; text-shadow: 0 0 10px rgba(72,214,238,.8); }
.nav a .badge {
  margin-left: auto; border-radius: 8px; padding: 0 6px; font-size: 11.5px; line-height: 17px;
  color: #062238; font-weight: 700; background: linear-gradient(120deg, #48d6ee, #1e82c8);
  box-shadow: 0 0 12px rgba(72,214,238,.35);
}
.nav a.on .badge { background: #fff; color: #062238; }
.side .foot { padding: 12px 14px; border-top: 1px solid var(--line-2); font-size: 11px; color: var(--txt-3); }
.side .foot .uinfo b { display: block; color: #d2eef8; font-size: 12.5px; font-weight: 500; line-height: 1.5; }
.side .foot .btnrow { display: flex; gap: 6px; margin: 8px 0; }

/* 侧栏底部：声呐环 + 数据流 */
.side::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 190px; z-index: 0; pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 218 190'%3E%3Cg fill='none' stroke='%2322E6FF' stroke-width='.8'%3E%3Ccircle cx='176' cy='44' r='13' opacity='.20'/%3E%3Ccircle cx='176' cy='44' r='30' opacity='.13'/%3E%3Ccircle cx='176' cy='44' r='50' opacity='.08'/%3E%3Ccircle cx='176' cy='44' r='72' opacity='.05'/%3E%3C/g%3E%3Ccircle cx='176' cy='44' r='2.4' fill='%237C5CFF' opacity='.55'/%3E%3Cg stroke='%237C5CFF' stroke-width='.8' opacity='.16' fill='none'%3E%3Cpath d='M0 120h52l14-14h44l10 10h60'/%3E%3Cpath d='M0 148h34l16 12h60l12-12h96'/%3E%3C/g%3E%3C/svg%3E") no-repeat center bottom / 100% 190px,
    linear-gradient(0deg, rgba(72,214,238,.06), transparent 70%);
}
.side .logo, .nav, .side .foot { position: relative; z-index: 1; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.top {
  height: 58px; padding: 0 22px; display: flex; align-items: center; gap: 14px;
  position: sticky; top: 0; z-index: 60;
  background: rgba(3,20,34,.64); backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(72,214,238,.45), rgba(30,130,200,.35), transparent);
  opacity: .8;
}
.top h2 { font-size: 16.5px; font-weight: 600; letter-spacing: 1px; display: flex; align-items: center; }
.top h2::before {
  content: ""; display: inline-block; width: 3px; height: 16px; margin-right: 11px; border-radius: 2px;
  background: var(--brand-grad); box-shadow: 0 0 12px rgba(72,214,238,.8);
}
.top .sp { flex: 1; }
.top .daterange { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--txt-2); }
.top .daterange input { height: 30px; font-size: 12.5px; padding: 2px 8px; }
.top .company-tag {
  font-size: 11px; color: var(--txt-3); letter-spacing: 1.6px;
  font-family: var(--mono); padding: 3px 9px; border-radius: 6px;
  border: 1px solid var(--line); background: rgba(72,214,238,.04);
}

.page { padding: 18px 22px 54px; flex: 1; animation: fadeUp .3s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- 仪表盘横幅：AI 指挥舱 ---------- */
.hero {
  position: relative; overflow: hidden; margin-bottom: 16px; min-height: 148px;
  border-radius: var(--radius); display: flex; align-items: center; color: #fff;
  border: 1px solid rgba(72,214,238,.20);
  background:
    radial-gradient(620px 320px at 86% 34%, rgba(30,130,200,.30), transparent 62%),
    radial-gradient(480px 280px at 18% 118%, rgba(72,214,238,.20), transparent 58%),
    linear-gradient(120deg, rgba(5,30,48,.82) 0%, rgba(4,26,44,.72) 55%, rgba(3,22,36,.85) 100%),
    url("ocean-bg.jpg?v=6") center / cover no-repeat;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 16px 48px rgba(0,0,0,.45);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(96,178,216,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96,178,216,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(620px 400px at 70% 40%, #000 20%, transparent 78%);
  mask-image: radial-gradient(620px 400px at 70% 40%, #000 20%, transparent 78%);
}
.hero .scanline {
  position: absolute; top: 0; bottom: 0; width: 160px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(72,214,238,.10), rgba(30,130,200,.10), transparent);
  animation: sweep 7s linear infinite;
}
@keyframes sweep { 0% { left: -180px; } 100% { left: 105%; } }
.hero .mesh { position: absolute; right: 0; top: 0; height: 100%; width: 56%; opacity: .6; pointer-events: none; }
.hero .htxt { position: relative; z-index: 2; padding: 22px 0 22px 28px; }
.hero .kick {
  font-size: 10.5px; font-weight: 700; letter-spacing: 2.6px; color: var(--cyan);
  margin-bottom: 10px; display: flex; align-items: center; gap: 9px;
  font-family: var(--mono);
}
.hero .kick::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan); animation: pulse 1.8s infinite;
}
.hero .t1 {
  font-size: 25px; font-weight: 700; letter-spacing: 2px; line-height: 1.3;
  background: linear-gradient(100deg, #FFFFFF 0%, #c8f0fa 46%, #a5d8f2 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .t2 { font-size: 12px; color: rgba(127,168,190,.9); letter-spacing: 2px; margin-top: 9px; font-family: var(--mono); }
.hero .hicons { position: relative; z-index: 2; margin-left: auto; padding-right: 30px; display: flex; gap: 12px; }
.hero .hi {
  display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 96px;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(5,28,46,.55); border: 1px solid rgba(96,178,216,.14);
  backdrop-filter: blur(6px);
}
.hero .hi b {
  font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums;
  font-family: var(--mono); color: #e2f7ff; text-shadow: 0 0 18px rgba(72,214,238,.45);
}
.hero .hi span { font-size: 10.5px; color: var(--txt-3); letter-spacing: 1px; }
.hero .hi b.o { color: #FFC978; text-shadow: 0 0 18px rgba(255,176,32,.45); }
@media (max-width: 1180px) { .hero .hicons { display: none; } .hero .mesh { width: 46%; } }

/* ---------- AI 智能洞察 ---------- */
.ai-band {
  position: relative; overflow: hidden; margin-bottom: 16px; padding: 14px 18px 15px;
  border-radius: var(--radius); border: 1px solid rgba(72,214,238,.22);
  background:
    linear-gradient(120deg, rgba(72,214,238,.07), rgba(30,130,200,.07) 55%, rgba(4,24,40,.6)),
    rgba(4,24,40,.75);
  box-shadow: 0 0 0 1px rgba(30,130,200,.08), 0 10px 34px rgba(0,0,0,.32);
}
.ai-band::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--brand-grad); box-shadow: 0 0 16px var(--cyan);
}
.ai-band::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(30,130,200,.20), transparent 68%);
  animation: float 9s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(10px); } }
.ai-band .ai-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; flex-wrap: wrap; }
.ai-band .ai-hd h3 { font-size: 14px; font-weight: 600; letter-spacing: 1px; display: flex; align-items: center; gap: 8px; }
.ai-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700;
  letter-spacing: 1.6px; padding: 2.5px 9px; border-radius: 20px; font-family: var(--mono);
  color: #021826; background: linear-gradient(110deg, #48d6ee, #1e82c8);
  box-shadow: 0 0 16px rgba(72,214,238,.4);
}
.ai-badge::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: #021826;
  animation: pulse 1.6s infinite;
}
.ai-band .ai-sub { font-size: 11.5px; color: var(--txt-3); font-family: var(--mono); }
.ai-band .ai-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 10px; position: relative; z-index: 1; }
.ai-item {
  position: relative; padding: 10px 13px 11px 15px; border-radius: 10px;
  background: rgba(3,20,34,.55); border: 1px solid var(--line);
  transition: .16s; overflow: hidden;
}
.ai-item:hover { border-color: rgba(72,214,238,.32); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0,0,0,.35); }
.ai-item::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; border-radius: 2px;
  background: var(--cyan); box-shadow: 0 0 10px currentColor;
}
.ai-item.s-warn::before { background: var(--amber); color: var(--amber); }
.ai-item.s-risk::before { background: var(--red); color: var(--red); }
.ai-item.s-good::before { background: var(--green); color: var(--green); }
.ai-item .ai-t { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; color: #e2f7ff; }
.ai-item .ai-t .tag {
  font-size: 9.5px; letter-spacing: 1px; padding: 1px 6px; border-radius: 4px; font-family: var(--mono);
  color: var(--cyan); border: 1px solid rgba(72,214,238,.3); background: rgba(72,214,238,.08);
}
.ai-item.s-warn .ai-t .tag { color: var(--amber); border-color: rgba(255,176,32,.32); background: rgba(255,176,32,.08); }
.ai-item.s-risk .ai-t .tag { color: #FF9099; border-color: rgba(255,92,108,.32); background: rgba(255,92,108,.08); }
.ai-item.s-good .ai-t .tag { color: #5bf0c0; border-color: rgba(33,223,166,.3); background: rgba(33,223,166,.08); }
.ai-item .ai-d { font-size: 12.5px; color: var(--txt-2); margin-top: 5px; line-height: 1.62; }
.ai-item .ai-d b { color: #d4f0fa; font-variant-numeric: tabular-nums; font-family: var(--mono); }
.ai-item .ai-act {
  margin-top: 7px; font-size: 11.5px; color: var(--cyan); cursor: pointer; display: inline-flex;
  align-items: center; gap: 5px; letter-spacing: .4px;
}
.ai-item .ai-act:hover { text-shadow: 0 0 10px rgba(72,214,238,.7); }

/* AI 助手入口（顶栏） */
.ai-entry {
  display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 10px;
  border-radius: 20px; cursor: pointer; font-size: 12.5px; letter-spacing: .6px;
  color: #d8f6fa; border: 1px solid rgba(72,214,238,.32);
  background: linear-gradient(110deg, rgba(72,214,238,.12), rgba(30,130,200,.14));
  transition: .16s;
}
.ai-entry:hover { box-shadow: 0 0 20px rgba(72,214,238,.28); border-color: rgba(72,214,238,.6); }
.ai-entry .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--mint);
  box-shadow: 0 0 9px var(--mint); animation: pulse 1.6s infinite;
}
.ai-entry kbd {
  font-family: var(--mono); font-size: 10px; color: var(--txt-3); border: 1px solid var(--line);
  border-radius: 4px; padding: 0 4px; margin-left: 2px;
}

/* AI 助手抽屉 */
.ai-mask {
  position: fixed; inset: 0; z-index: 260; background: rgba(1,10,18,.62);
  backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: .22s;
}
.ai-mask.on { opacity: 1; pointer-events: auto; }
.ai-drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: 430px; max-width: 94vw; z-index: 261;
  display: flex; flex-direction: column; transform: translateX(102%); transition: transform .28s cubic-bezier(.3,.8,.3,1);
  background: linear-gradient(170deg, rgba(4,26,44,.98), rgba(2,16,28,.99));
  border-left: 1px solid rgba(72,214,238,.24);
  box-shadow: -24px 0 70px rgba(0,0,0,.6);
}
.ai-drawer.on { transform: none; }
.ai-drawer::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, transparent, var(--cyan), var(--violet), transparent);
  opacity: .7;
}
.ai-drawer .dh { padding: 15px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.ai-drawer .dh .orb {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 34% 30%, #ccf6f4, #48d6ee 40%, #1e82c8 78%);
  box-shadow: 0 0 18px rgba(72,214,238,.5);
  animation: pulse 3s infinite;
}
.ai-drawer .dh b { font-size: 14px; letter-spacing: 1px; display: block; }
.ai-drawer .dh span { font-size: 10.5px; color: var(--txt-3); font-family: var(--mono); letter-spacing: 1px; }
.ai-drawer .dh .x { margin-left: auto; cursor: pointer; color: var(--txt-3); font-size: 20px; line-height: 1; }
.ai-drawer .dh .x:hover { color: #fff; }
.ai-body { flex: 1; overflow-y: auto; padding: 16px 16px 8px; }
.ai-msg { margin-bottom: 13px; display: flex; gap: 9px; }
.ai-msg .av {
  width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0; margin-top: 2px;
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-family: var(--mono);
  color: #021826; background: linear-gradient(130deg, #48d6ee, #1e82c8); font-weight: 700;
}
.ai-msg .bubble {
  padding: 9px 13px; border-radius: 10px; font-size: 12.8px; line-height: 1.72;
  background: rgba(8,34,54,.9); border: 1px solid var(--line); color: var(--txt);
  max-width: 320px; word-break: break-word;
}
.ai-msg.me { flex-direction: row-reverse; }
.ai-msg.me .bubble { background: linear-gradient(120deg, rgba(72,214,238,.16), rgba(30,130,200,.18)); border-color: rgba(72,214,238,.3); }
.ai-msg.me .av { background: rgba(96,178,216,.16); color: var(--txt-2); }
.ai-msg .bubble b { color: #fff; font-variant-numeric: tabular-nums; font-family: var(--mono); }
.ai-msg .bubble .kvline { display: flex; justify-content: space-between; gap: 14px; padding: 2.5px 0; border-bottom: 1px dashed rgba(96,178,216,.10); font-size: 12px; }
.ai-msg .bubble .kvline:last-child { border-bottom: none; }
.ai-msg .bubble .kvline span:first-child { color: var(--txt-2); }
.ai-msg .bubble .kvline span:last-child { font-family: var(--mono); color: #d4f0fa; }
.ai-typing { display: inline-flex; gap: 4px; align-items: center; height: 14px; }
.ai-typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); animation: blink 1.1s infinite; }
.ai-typing i:nth-child(2) { animation-delay: .18s; }
.ai-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%,100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }
.ai-quick { display: flex; gap: 7px; flex-wrap: wrap; padding: 0 16px 10px; }
.ai-chip {
  font-size: 11.5px; padding: 4px 10px; border-radius: 20px; cursor: pointer;
  color: var(--txt-2); border: 1px solid var(--line); background: rgba(72,214,238,.05);
  transition: .14s;
}
.ai-chip:hover { color: #fff; border-color: rgba(72,214,238,.42); background: rgba(72,214,238,.12); }
.ai-input { padding: 10px 14px 14px; border-top: 1px solid var(--line); display: flex; gap: 8px; }
.ai-input input { flex: 1; height: 36px; border-radius: 20px; padding: 6px 14px; }
.ai-input button { flex-shrink: 0; }

@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.82); } }

/* ---------- 组件 ---------- */
.btn {
  border: 1px solid var(--line); background: rgba(96,178,216,.05); color: var(--txt);
  padding: 6px 14px; border-radius: 8px; font-size: 13.5px; cursor: pointer;
  font-family: inherit; white-space: nowrap; transition: .14s;
}
.btn:hover {
  border-color: rgba(72,214,238,.55); color: #e4faff; background: rgba(72,214,238,.10);
  box-shadow: 0 0 16px rgba(72,214,238,.16);
}
.btn.pri {
  background: var(--brand-grad); border-color: transparent; color: #021826; font-weight: 600;
  box-shadow: 0 3px 16px rgba(72,214,238,.28);
}
.btn.pri:hover { filter: brightness(1.08); color: #021826; box-shadow: 0 4px 22px rgba(72,214,238,.4); }
.btn.blue { background: linear-gradient(120deg, #2e9bd4, #2e9be0); border-color: transparent; color: #03202e; font-weight: 600; }
.btn.blue:hover { filter: brightness(1.08); color: #03202e; }
.btn.danger { color: #FF8C97; border-color: rgba(255,92,108,.32); background: rgba(255,92,108,.07); }
.btn.danger:hover { background: rgba(255,92,108,.16); border-color: rgba(255,92,108,.6); color: #FFB6BD; }
.btn.sm { padding: 3px 10px; font-size: 12px; border-radius: 7px; }
.btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }

input, select, textarea {
  font-family: inherit; font-size: 13.5px; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: rgba(2,18,30,.72);
  color: var(--txt); width: 100%; outline: none; transition: .14s;
}
input::placeholder, textarea::placeholder { color: #46647c; }
input:focus, select:focus, textarea:focus {
  border-color: rgba(72,214,238,.62); box-shadow: 0 0 0 3px rgba(72,214,238,.12), 0 0 18px rgba(72,214,238,.12);
  background: rgba(3,24,40,.9);
}
input[readonly] { background: rgba(96,178,216,.05); color: var(--txt-2); }
select option { background: #06233a; color: var(--txt); }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.72) sepia(.4) saturate(4) hue-rotate(155deg); cursor: pointer; }
input[type="checkbox"] { accent-color: #48d6ee; }
textarea { resize: vertical; }
label.f { display: block; margin-bottom: 12px; }
label.f > span { display: block; font-size: 12px; color: var(--txt-2); margin-bottom: 5px; letter-spacing: .4px; }

/* KPI */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(172px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi {
  position: relative; overflow: hidden; padding: 15px 16px 16px; border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(8,38,62,.76), rgba(3,22,36,.82));
  border: 1px solid var(--line); transition: .18s;
}
.kpi::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(72,214,238,.55), transparent);
  opacity: .55;
}
.kpi::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 96px; height: 96px; border-radius: 50%;
  background: radial-gradient(circle, rgba(72,214,238,.14), transparent 68%); pointer-events: none;
}
.kpi:hover { transform: translateY(-2px); border-color: rgba(72,214,238,.3); box-shadow: 0 12px 34px rgba(0,0,0,.4), 0 0 22px rgba(72,214,238,.08); }
.kpi .lb { font-size: 11.5px; color: var(--txt-2); margin-bottom: 6px; letter-spacing: 1px; }
.kpi .lb::before { content: "▎"; color: var(--cyan); margin-right: 5px; font-size: 10px; }
.kpi .vl { font-size: 19px; font-weight: 600; letter-spacing: -.2px; font-variant-numeric: tabular-nums; font-family: var(--mono); color: #e2f7ff; white-space: nowrap; }
.kpi .sub { font-size: 11.5px; color: var(--txt-3); margin-top: 5px; }
.kpi.g .vl { color: var(--green); text-shadow: 0 0 20px rgba(33,223,166,.3); }
.kpi.r .vl { color: #FF7C89; text-shadow: 0 0 20px rgba(255,92,108,.28); }
.kpi.b .vl { color: #76d9f0; text-shadow: 0 0 20px rgba(72,214,238,.3); }
.kpi.o .vl { color: #FFC978; text-shadow: 0 0 20px rgba(255,176,32,.26); }
.kpi.navy {
  background: linear-gradient(150deg, rgba(72,214,238,.16), rgba(30,130,200,.18) 60%, rgba(4,24,40,.9));
  border-color: rgba(72,214,238,.3); box-shadow: inset 0 0 26px rgba(72,214,238,.08);
}
.kpi.navy .vl { color: #fff; }

/* 面板 */
.panel {
  position: relative; border-radius: var(--radius); margin-bottom: 16px; overflow: hidden;
  background: linear-gradient(170deg, rgba(6,34,56,.72), rgba(3,22,36,.8));
  border: 1px solid var(--line);
  box-shadow: 0 10px 34px rgba(0,0,0,.34);
}
.panel > .hd {
  padding: 12px 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(72,214,238,.045), transparent);
}
.panel > .hd h3 { font-size: 14px; font-weight: 600; letter-spacing: .6px; color: #d4f0fa; }
.panel > .hd h3::before { content: "◈"; color: var(--cyan); font-size: 11px; margin-right: 8px; text-shadow: 0 0 10px rgba(72,214,238,.7); }
.panel > .hd .sp { flex: 1; }
.panel > .bd { padding: 0; overflow-x: auto; }
.panel > .bd.pad { padding: 15px; }
.panel > .bd > table { min-width: max-content; width: 100%; }
.panel > .bd::-webkit-scrollbar { height: 9px; }
.panel > .bd::-webkit-scrollbar-thumb { background: rgba(96,178,216,.22); border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }

.panel > .hd input.psearch {
  min-width: 200px; max-width: 280px; height: 30px; padding: 4px 11px; font-size: 12.5px;
  border-radius: 20px;
}
.panel > .hd input:not([type="checkbox"]), .panel > .hd select { width: auto; }
.panel > .hd .flt { font-size: 12.5px; height: 30px; padding: 3px 9px; max-width: 176px; border-radius: 8px; }

/* 表格 */
table { border-collapse: collapse; width: 100%; }
th {
  text-align: left; font-size: 11.5px; font-weight: 500; color: var(--txt-3);
  padding: 10px 12px; background: rgba(3,20,34,.6); border-bottom: 1px solid var(--line);
  white-space: nowrap; letter-spacing: 1px;
}
th[data-sk] { cursor: pointer; user-select: none; }
th[data-sk]:hover { color: var(--cyan); }
td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); font-size: 13px; vertical-align: middle; color: #cfe9f2; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: rgba(72,214,238,.05); }
tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 var(--cyan); }
tbody tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 12.5px; }
tfoot td { padding: 10px 12px; font-weight: 600; background: rgba(72,214,238,.05); border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 12.5px; }
tr.total-row td { font-weight: 600; background: rgba(72,214,238,.05); }

.chip {
  display: inline-block; padding: 1px 9px; border-radius: 20px; font-size: 11.5px; line-height: 18px;
  white-space: nowrap; border: 1px solid transparent; letter-spacing: .3px;
}
.chip.amber { background: rgba(255,176,32,.12); color: #FFC978; border-color: rgba(255,176,32,.28); }
.chip.green { background: rgba(33,223,166,.12); color: #5bf0c0; border-color: rgba(33,223,166,.26); }
.chip.blue  { background: rgba(46,155,224,.12); color: #8acdea; border-color: rgba(46,155,224,.28); }
.chip.red   { background: rgba(255,92,108,.12); color: #FF9099; border-color: rgba(255,92,108,.28); }
.chip.gray  { background: rgba(127,168,190,.10); color: #9cc3d4; border-color: rgba(127,168,190,.2); }
.chip.sn    { background: rgba(30,130,200,.14); color: #86d8ea; border-color: rgba(30,130,200,.28); font-family: var(--mono); font-size: 11px; padding: 0 7px; margin: 1px 2px 1px 0; }

.hint { font-size: 12px; color: var(--txt-3); }
.mono { font-family: var(--mono); font-size: 12px; color: #a3d5e4; }

.tabbar { display: flex; gap: 7px; margin-bottom: 14px; flex-wrap: wrap; }
.tabbar a {
  padding: 6px 16px; border-radius: 20px; font-size: 13px; cursor: pointer;
  color: var(--txt-2); border: 1px solid var(--line); background: rgba(96,178,216,.04);
  transition: .15s;
}
.tabbar a:hover { border-color: rgba(72,214,238,.45); color: #e4faff; }
.tabbar a.on {
  color: #021826; font-weight: 600; border-color: transparent;
  background: var(--brand-grad); box-shadow: 0 4px 18px rgba(72,214,238,.26);
}

.aging-bar { display: flex; height: 9px; border-radius: 6px; overflow: hidden; background: rgba(96,178,216,.10); margin: 6px 0 2px; }
.empty { padding: 36px 0; text-align: center; color: var(--txt-3); font-size: 12.5px; }
.empty::before { content: "◌"; display: block; font-size: 26px; margin-bottom: 8px; color: rgba(72,214,238,.4); }

/* ---------- 弹窗 ---------- */
.mask {
  position: fixed; inset: 0; z-index: 100; padding: 20px;
  background: rgba(1,10,18,.68); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
.modal {
  position: relative; width: 680px; max-width: 96vw; max-height: 90vh;
  display: flex; flex-direction: column; overflow: hidden; border-radius: 16px;
  background: linear-gradient(170deg, rgba(10,44,72,.96), rgba(5,30,48,.97)), url("ocean-bg.jpg?v=6") center / cover;
  border: 1px solid rgba(72,214,238,.24);
  box-shadow: 0 30px 90px rgba(0,0,0,.7), 0 0 60px rgba(72,214,238,.08);
  animation: pop .2s ease;
}
.modal.w { width: 880px; }
@keyframes pop { from { transform: scale(.965) translateY(6px); opacity: .3; } to { transform: none; opacity: 1; } }
.modal::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; z-index: 2;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--violet), transparent);
}
.modal .mh {
  padding: 15px 20px; display: flex; align-items: center;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(72,214,238,.10), rgba(30,130,200,.10));
}
.modal .mh h3 { font-size: 15px; font-weight: 600; letter-spacing: .8px; color: #f0fbff; }
.modal .mh .x { margin-left: auto; cursor: pointer; font-size: 20px; color: var(--txt-3); padding: 0 3px; line-height: 1; }
.modal .mh .x:hover { color: var(--cyan); }
.modal .mb { padding: 18px 20px; overflow-y: auto; flex: 1; }
.modal .mf { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 9px; background: rgba(2,18,30,.6); }

.itm-row { display: grid; grid-template-columns: 1fr 78px 110px 84px 32px; gap: 8px; align-items: center; margin-bottom: 8px; }
.itm-row.sn-mode { grid-template-columns: 1fr 68px 100px 70px 32px; }
.itm-head { font-size: 11px; color: var(--txt-3); margin-bottom: 5px; letter-spacing: .5px; }
textarea.snlist { font-family: var(--mono); font-size: 12px; }

.sn-pick { max-height: 240px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px 4px; background: rgba(2,18,30,.5); }
.sn-pick label { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 12.5px; border-radius: 7px; cursor: pointer; }
.sn-pick label:hover { background: rgba(72,214,238,.07); }
.sn-pick input[type="checkbox"] { width: auto; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(20px);
  padding: 10px 20px 10px 22px; border-radius: 10px; font-size: 13px; z-index: 320;
  color: #e2f7ff; background: rgba(4,26,44,.96); border: 1px solid rgba(72,214,238,.35);
  box-shadow: 0 12px 40px rgba(0,0,0,.6), 0 0 26px rgba(72,214,238,.14);
  opacity: 0; pointer-events: none; transition: .25s; max-width: 80vw;
}
#toast::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; border-radius: 2px;
  background: var(--brand-grad); box-shadow: 0 0 10px var(--cyan);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.error { border-color: rgba(255,92,108,.5); }
#toast.error::before { background: var(--red); box-shadow: 0 0 10px var(--red); }

/* ---------- 密码锁 ---------- */
#lock {
  position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center;
  color: #fff; overflow: hidden;
  background:
    radial-gradient(760px 560px at 50% 32%, rgba(72,214,238,.12), transparent 62%),
    radial-gradient(620px 480px at 76% 78%, rgba(30,130,200,.16), transparent 60%),
    #02101c;
}
#lock::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(96,178,216,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96,178,216,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(600px 500px at 50% 45%, #000 20%, transparent 76%);
  mask-image: radial-gradient(600px 500px at 50% 45%, #000 20%, transparent 76%);
}
#lock .box { position: relative; text-align: center; z-index: 1; }
#lock .locklogo {
  background: transparent; padding: 0;
  display: inline-block; margin-bottom: 24px;
}
#lock .locklogo img {
  height: 46px; width: auto; display: block;
  filter: drop-shadow(0 0 20px rgba(72, 214, 238, .25)) drop-shadow(0 3px 8px rgba(0,0,0,.5));
}
#lock .box h3 { font-size: 19px; letter-spacing: 3px; margin-bottom: 7px; }
#lock .box p { color: var(--txt-3); font-size: 11.5px; margin-bottom: 22px; letter-spacing: 1.6px; font-family: var(--mono); }
#lock .box input { width: 230px; text-align: center; letter-spacing: 7px; font-size: 17px; height: 42px; }
#lock .box .btn.pri { margin-top: 12px; padding: 8px 30px; }

/* ---------- CRM / SBM ---------- */
.lv {
  display: inline-block; width: 19px; height: 19px; line-height: 19px; text-align: center;
  border-radius: 5px; font-size: 11px; font-weight: 700; color: #021826;
  font-family: var(--mono); background: #6f9ab0;
}
.lv-A { background: linear-gradient(130deg, #FF8A5C, #FF5C6C); color: #fff; box-shadow: 0 0 12px rgba(255,92,108,.4); }
.lv-B { background: linear-gradient(130deg, #FFD166, #FFB020); box-shadow: 0 0 12px rgba(255,176,32,.4); }
.lv-C { background: linear-gradient(130deg, #76d9f0, #2e9be0); box-shadow: 0 0 12px rgba(46,155,224,.4); }
.lv-D { background: rgba(127,168,190,.28); color: #bfe0ec; }

/* 商机漏斗 */
.pipe { display: grid; grid-template-columns: repeat(auto-fit, minmax(162px, 1fr)); gap: 10px; align-items: start; }
.pipe .col {
  position: relative; padding: 11px 10px; border-radius: 11px; min-height: 96px;
  background: linear-gradient(180deg, rgba(6,34,56,.8), rgba(3,22,36,.7));
  border: 1px solid var(--line);
}
.pipe .col::before {
  content: ""; position: absolute; left: 10px; right: 10px; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(72,214,238,.5), transparent);
}
.pipe .col h4 { font-size: 12px; font-weight: 600; color: var(--txt-2); margin-bottom: 2px; letter-spacing: .6px; }
.pipe .col-amt { font-size: 12px; color: #76d9f0; font-variant-numeric: tabular-nums; margin-bottom: 9px; font-family: var(--mono); }
.pcard {
  padding: 8px 10px; margin-bottom: 7px; border-radius: 8px; cursor: pointer; transition: .15s;
  background: rgba(5,28,46,.9); border: 1px solid var(--line); border-left: 2px solid var(--cyan);
}
.pcard:hover {
  border-color: rgba(72,214,238,.45); border-left-color: var(--cyan);
  box-shadow: 0 6px 20px rgba(0,0,0,.4), 0 0 18px rgba(72,214,238,.12); transform: translateY(-1px);
}
.pcard b { font-size: 12.5px; display: block; line-height: 1.5; color: #d4f0fa; font-weight: 500; }
.pcard-amt { font-size: 12.5px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; font-family: var(--mono); color: #a5e6f5; }

/* 360 视图 */
.p360 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.sec-t {
  font-size: 12.5px; font-weight: 600; margin: 16px 0 8px; padding-left: 9px; letter-spacing: .6px;
  border-left: 2px solid var(--cyan); line-height: 1.5; color: #d4f0fa;
}
.kv { display: flex; font-size: 12.5px; padding: 3.5px 0; gap: 8px; }
.kv b { width: 78px; color: var(--txt-3); font-weight: 400; flex-shrink: 0; }
.kv span { color: #cfe9f2; word-break: break-all; }

.rowline {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 2px; border-bottom: 1px dashed var(--line-2); font-size: 12.5px;
}
.rowline:last-child { border-bottom: none; }

/* 跟进时间线 */
.timeline { position: relative; padding-left: 18px; margin-top: 4px; }
.timeline::before {
  content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px;
  background: linear-gradient(180deg, rgba(72,214,238,.6), rgba(30,130,200,.3), transparent);
}
.timeline .ti { position: relative; margin-bottom: 14px; font-size: 12.5px; line-height: 1.7; color: #c2e2ee; }
.timeline .ti::before {
  content: ""; position: absolute; left: -18px; top: 6px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 2px #041c2e, 0 0 12px var(--cyan);
}
.timeline .ti-h { font-size: 11px; color: var(--txt-3); margin-bottom: 2px; font-family: var(--mono); letter-spacing: .4px; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .side { width: 62px; }
  .side .logo .lg, .side .logo .sub, .nav a span:not(.ico), .nav .grp, .nav a .badge, .side .foot, .side::after { display: none; }
  .nav a { justify-content: center; padding: 10px 0; }
  .hero .htxt { padding-left: 20px; }
  .top .company-tag { display: none; }
  .p360 { grid-template-columns: 1fr; }
}

/* ---------- 登录界面 ---------- */
#lock .box input#loginUser, #lock .box input#loginPwd {
  width: 240px; text-align: left; letter-spacing: normal; font-size: 14px; height: 40px;
  display: block; margin: 0 auto 9px;
}
#lock .box .login-err { color: var(--red); font-size: 12px; min-height: 16px; margin-top: 6px; }

/* ---------- 顶栏用户区 ---------- */
.top .userchip {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(72,214,238,.08); border: 1px solid rgba(72,214,238,.25);
}
.top .userchip b { color: var(--txt-1); font-size: 12.5px; font-weight: 600; }
.top .userchip span {
  font-size: 10px; color: #48d6ee; letter-spacing: 1px;
  border: 1px solid rgba(72,214,238,.4); border-radius: 999px; padding: 1px 7px;
}
.btn.ghost {
  background: transparent; border: 1px solid rgba(127,168,190,.35); color: var(--txt-3);
}
.btn.ghost:hover { color: var(--txt-1); border-color: rgba(72,214,238,.5); }
