:root {
  --bg: #f4f6fa;
  --card: #ffffff;
  --line: #e4e8f1;
  --line-soft: #eef1f7;
  --text: #1a2337;
  --muted: #77839a;
  --accent: #3f6bf6;
  --accent-soft: #eaf0ff;
  --nav: #121c30;
  --nav-2: #1b2740;
  --green: #12a37a;
  --green-soft: #e4f7f0;
  --orange: #e8871e;
  --orange-soft: #fdf1e0;
  --red: #e05252;
  --red-soft: #fdeaea;
  --gray-soft: #eef1f6;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 32, 55, .06), 0 8px 24px rgba(20, 32, 55, .05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cfd6e4; border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 登录 ---------------- */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--nav);
}
.login-hero {
  padding: 64px 56px;
  color: #fff;
  background:
    radial-gradient(900px 400px at 10% 90%, rgba(63, 107, 246, .35), transparent 60%),
    radial-gradient(700px 340px at 90% 0%, rgba(18, 163, 122, .22), transparent 60%),
    var(--nav);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.brand-mark { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; letter-spacing: .3px; }
.brand-dot {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, #5b83ff, #2f55d4);
  display: grid; place-items: center; font-size: 15px; font-weight: 700;
}
.brand-logo { width: 30px; height: 30px; object-fit: contain; flex: none; }
.login-logo { width: 84px; height: 84px; display: block; margin: 0 0 10px -2px; }
.login-brand { font-size: 19px; font-weight: 600; letter-spacing: .2px; }
.login-brand-sub { color: var(--muted); font-size: 12.5px; margin: 3px 0 20px; }
.brand .full { font-size: 13.5px; letter-spacing: 0; line-height: 1.25; }
@media (max-width: 720px) { .brand-logo { width: 26px; height: 26px; } }
.login-hero h1 { font-size: 34px; line-height: 1.35; margin-bottom: 14px; }
.login-hero p { color: #9dabc7; max-width: 420px; margin: 0; }
.hero-points { display: grid; gap: 12px; margin-top: 34px; }
.hero-point { display: flex; gap: 10px; align-items: flex-start; color: #c8d3e8; font-size: 13.5px; }
.hero-point b { color: #fff; font-weight: 600; }
.hero-point::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #5b83ff; margin-top: 8px; flex: none; }
.login-panel { display: grid; place-items: center; padding: 40px 28px; background: #fff; }
.login-card { width: 100%; max-width: 356px; }
.login-card h2 { font-size: 22px; margin-bottom: 6px; }
.login-card .sub { color: var(--muted); margin: 0 0 26px; font-size: 13px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: #5d6a83; margin-bottom: 6px; font-weight: 500; }
.input, .select, .textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 9px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.textarea { min-height: 82px; resize: vertical; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 15px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-weight: 500; transition: .14s; white-space: nowrap;
}
.btn:hover { border-color: #c7d0e2; background: #fafbfe; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #345cd8; border-color: #345cd8; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); border-color: #f3c9c9; }
.btn.danger:hover { background: var(--red-soft); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.login-demo { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line); }
.login-demo .t { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.demo-chip {
  display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; margin-bottom: 6px;
  border: 1px solid var(--line-soft); border-radius: 8px; background: #fafbfe;
  font-size: 12.5px; cursor: pointer; color: #47546d;
}
.demo-chip:hover { border-color: #c9d6f8; background: #f4f7ff; }
.demo-chip span:last-child { color: var(--muted); }

/* ---------------- 框架 ---------------- */
.app { display: grid; grid-template-columns: 226px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--nav); color: #c3cde0; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { padding: 20px 18px 16px; color: #fff; }
.sidebar .brand small { display: block; color: #6f7f9e; font-size: 11px; font-weight: 400; margin-top: 2px; letter-spacing: .4px; }
.nav-group { padding: 6px 12px; }
.nav-title { font-size: 10.5px; letter-spacing: 1.2px; color: #5d6d8c; padding: 14px 8px 6px; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
  color: #c3cde0; cursor: pointer; margin-bottom: 2px; font-size: 13.5px; user-select: none;
}
.nav-item:hover { background: var(--nav-2); color: #fff; text-decoration: none; }
.nav-item.active { background: #25355a; color: #fff; font-weight: 500; }
.nav-item .ico { width: 18px; display: inline-flex; align-items: center; justify-content: center; opacity: .8; }
.nav-item.active .ico { opacity: 1; }
.nav-badge {
  margin-left: auto; background: var(--red); color: #fff; font-size: 11px;
  padding: 0 6px; border-radius: 9px; line-height: 17px; min-width: 18px; text-align: center;
}
.sidebar-foot { margin-top: auto; padding: 14px 16px; border-top: 1px solid #1e2b45; font-size: 12px; color: #6f7f9e; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px;
  padding: 0 22px; position: sticky; top: 0; z-index: 20;
}
.topbar .crumb { color: var(--muted); font-size: 13px; }
.topbar .spacer { flex: 1; }
.user-box { display: flex; align-items: center; gap: 10px; position: relative; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 600; font-size: 13px;
}
.user-box .who { font-size: 13px; line-height: 1.25; }
.user-box .who small { color: var(--muted); font-size: 11.5px; display: block; }
.menu {
  position: absolute; right: 0; top: 44px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow); min-width: 160px; padding: 6px; display: none; z-index: 50;
}
.menu.open { display: block; }
.menu-item { padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.menu-item:hover { background: #f4f6fb; }
.content { padding: 22px; max-width: 1500px; width: 100%; }

/* ---------------- 通用组件 ---------------- */
.page-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { font-size: 20px; }
.page-head .desc { color: var(--muted); font-size: 12.5px; }
.page-head .spacer { flex: 1; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 16px 18px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.card-head h3 { font-size: 14px; }
.card-head .spacer { flex: 1; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.grid { display: grid; gap: 14px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); }
.kpi { padding: 15px 16px; }
.kpi .label { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 23px; font-weight: 650; margin-top: 6px; letter-spacing: -.4px; }
.kpi .foot { font-size: 12px; color: var(--muted); margin-top: 4px; }
.kpi.alert .value { color: var(--red); }
.kpi .value .unit { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.two-col { grid-template-columns: 1.55fr 1fr; }
.three-col { grid-template-columns: repeat(3, 1fr); }

.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 20px;
  font-size: 12px; background: var(--gray-soft); color: #5b687f; white-space: nowrap;
}
.pill.blue { background: var(--accent-soft); color: #2f55d4; }
.pill.green { background: var(--green-soft); color: #0c7f5f; }
.pill.orange { background: var(--orange-soft); color: #b46812; }
.pill.red { background: var(--red-soft); color: #b83a3a; }
.pill.gray { background: var(--gray-soft); color: #5b687f; }
.pill.purple { background: #efeaff; color: #6247c9; }
.level { font-weight: 700; font-size: 12px; width: 20px; height: 20px; border-radius: 6px; display: inline-grid; place-items: center; }
.level.A { background: #fff0e6; color: #c25f18; }
.level.B { background: #eaf0ff; color: #2f55d4; }
.level.C { background: #eef1f6; color: #6b778c; }

table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 12px; color: var(--muted); font-weight: 500;
  padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fbfcfe; white-space: nowrap;
}
td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: #f8faff; }
.table-wrap { overflow-x: auto; }
.cell-main { font-weight: 500; }
.copy-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; margin-left: 6px; border: 0; border-radius: 5px;
  background: transparent; color: var(--muted); cursor: pointer; vertical-align: -3px;
}
.copy-btn:hover { background: var(--accent-soft); color: var(--accent); }
.cell-sub { color: var(--muted); font-size: 12px; }
.empty { padding: 40px; text-align: center; color: var(--muted); font-size: 13px; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input, .toolbar .select { width: auto; min-width: 130px; }
.toolbar .search { min-width: 230px; }
.toolbar .spacer { flex: 1; }

.bar-row { display: grid; grid-template-columns: 74px 1fr 62px; align-items: center; gap: 10px; margin-bottom: 9px; font-size: 12.5px; }
.bar { height: 8px; background: var(--line-soft); border-radius: 5px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 5px; background: var(--accent); }
.bar-row .val { text-align: right; color: var(--muted); }

.chart { display: flex; align-items: flex-end; gap: 14px; height: 170px; padding: 8px 4px 0; }
.chart .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.chart .col .bar-v {
  width: 100%; max-width: 42px; border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #6d8dff, #3f6bf6); min-height: 3px; transition: height .4s;
  position: relative;
}
.chart .col .bar-v:hover { filter: brightness(1.06); }
.chart .col .lbl { font-size: 11.5px; color: var(--muted); }
.chart .col .amt { font-size: 11px; color: #4a5a76; font-weight: 500; }

.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item::before {
  content: ""; position: absolute; left: -19px; top: 5px; width: 9px; height: 9px;
  border-radius: 50%; background: #fff; border: 2px solid var(--accent);
}
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-body { margin-top: 4px; color: #3c4a63; }
.tl-meta { color: var(--muted); font-size: 12px; margin-top: 4px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab {
  padding: 9px 14px; cursor: pointer; font-size: 13.5px; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }

.kanban { display: grid; grid-template-columns: repeat(6, minmax(174px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.kb-col { background: #eef1f7; border-radius: 11px; padding: 10px; min-height: 180px; }
.kb-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 8px; font-size: 13px; font-weight: 600; }
.kb-head .n { color: var(--muted); font-weight: 400; font-size: 12px; }
.kb-card {
  background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 10px;
  margin-bottom: 8px; cursor: pointer; box-shadow: 0 1px 1px rgba(20, 32, 55, .03);
}
.kb-card:hover { border-color: #c9d6f8; box-shadow: 0 4px 12px rgba(63, 107, 246, .1); }
.kb-card .t { font-weight: 500; font-size: 13px; }
.kb-card .s { color: var(--muted); font-size: 12px; margin-top: 2px; }
.kb-card .row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 6px; }
.kb-card .money { font-size: 12.5px; font-weight: 600; color: #2f55d4; }

.rem-group { margin-bottom: 18px; }
.rem-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rem-head h3 { font-size: 14px; }
.rem-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line-soft);
}
.rem-item:last-child { border-bottom: none; }
.rem-item .spacer { flex: 1; }
.rem-item .name { font-weight: 500; }
.rem-item.overdue .name::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--red); border-radius: 50%; margin-right: 7px; vertical-align: 2px; }

/* ---------------- 弹窗 / 提示 ---------------- */
.mask {
  position: fixed; inset: 0; background: rgba(16, 26, 44, .42); z-index: 100;
  display: grid; place-items: center; padding: 24px; opacity: 0; animation: fade .16s forwards;
}
@keyframes fade { to { opacity: 1; } }
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 560px; max-height: 88vh;
  display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(16, 26, 44, .25);
}
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.modal-head h3 { font-size: 15.5px; }
.modal-head .x { margin-left: auto; cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; padding: 4px; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line-soft); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(14px);
  background: #16223a; color: #fff; padding: 10px 16px; border-radius: 9px; font-size: 13px;
  opacity: 0; pointer-events: none; transition: .22s; z-index: 200; max-width: 80vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #a92f2f; }
.loading { padding: 50px; text-align: center; color: var(--muted); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px 20px; }
.info-grid .k { font-size: 12px; color: var(--muted); }
.info-grid .v { margin-top: 2px; }
.stat-line { display: flex; gap: 22px; flex-wrap: wrap; }
.stat-line .item .n { font-size: 17px; font-weight: 600; }
.stat-line .item .l { font-size: 12px; color: var(--muted); }

@media (max-width: 1080px) {
  .two-col, .three-col { grid-template-columns: 1fr; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .kanban { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
}
@media (max-width: 720px) {
  .app { grid-template-columns: 64px 1fr; }
  .sidebar .brand span.full, .nav-item span.label, .nav-title, .sidebar-foot { display: none; }
  .nav-item { justify-content: center; }
  .content { padding: 14px; }
  .kanban { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
}


/* ---------------- AI 助理 ---------------- */
.ai-card { display:flex; flex-direction:column; height:calc(100vh - 210px); min-height:380px; overflow:hidden; }
.ai-body { flex:1; overflow-y:auto; padding:18px 16px; background:#fbfcff; }
.ai-row { display:flex; gap:10px; margin-bottom:14px; align-items:flex-start; }
.ai-row.me { flex-direction:row-reverse; }
.ai-avatar { width:30px; height:30px; border-radius:9px; background:#e8eefc; color:#3f6bf6;
  display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:600; flex:0 0 auto; }
.ai-row.me .ai-avatar { background:#e6f7f1; color:#12a37a; }
.ai-bubble { max-width:min(760px,78%); background:#fff; border:1px solid var(--line);
  border-radius:12px; padding:10px 13px; font-size:13.5px; line-height:1.75; white-space:normal; }
.ai-row.me .ai-bubble { background:#3f6bf6; border-color:#3f6bf6; color:#fff; }
.ai-input { display:flex; gap:10px; padding:12px 14px; border-top:1px solid var(--line); background:#fff; }
.ai-input textarea { flex:1; border:1px solid var(--line); border-radius:10px; padding:9px 11px;
  font-family:inherit; font-size:13.5px; resize:none; outline:none; }
.ai-input textarea:focus { border-color:#3f6bf6; }
.ai-empty { text-align:center; padding:34px 10px 10px; }
.ai-hi { font-size:16px; font-weight:600; margin-bottom:6px; }
.ai-quick { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; margin-top:18px; }
.ai-chip { border:1px solid var(--line); background:#fff; border-radius:999px; padding:7px 13px;
  font-size:12.5px; color:#3b4657; cursor:pointer; }
.ai-chip:hover { border-color:#3f6bf6; color:#3f6bf6; }


/* ---------------- 知识库 ---------------- */
.kb-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(258px,1fr)); gap:14px; }
.kb-card { background:#fff; border:1px solid var(--line); border-radius:12px; overflow:hidden;
  display:flex; flex-direction:column; transition:box-shadow .15s,transform .15s; }
.kb-card:hover { box-shadow:0 6px 20px rgba(31,45,70,.08); transform:translateY(-1px); }
.kb-thumb { height:86px; display:flex; align-items:center; justify-content:space-between; padding:0 16px; }
.kb-icon { font-size:26px; font-weight:700; }
.kb-kind { font-size:12px; padding:2px 8px; border-radius:999px; background:#fff; color:#4b5a70;
  border:1px solid rgba(0,0,0,.06); }

/* 视频卡片：显示真实封面（前端截取 1 秒处首帧） */
.kb-thumb.is-video { position:relative; height:146px; padding:0; cursor:pointer;
  background:linear-gradient(135deg,#26334d 0%,#141c2e 55%,#0f172a 100%); }
.kb-cover { width:100%; height:100%; object-fit:cover; display:block; background:#0f172a; }
.kb-thumb.is-video .kb-kind { position:absolute; top:8px; right:8px; background:rgba(255,255,255,.94); }
.kb-thumb.is-video.is-error { background:linear-gradient(135deg,#dbe6fb,#eef2fb); }
.kb-thumb.is-video.is-error .kb-play { background:rgba(63,107,246,.85); }
.kb-thumb.is-video.has-cover .kb-play { background:rgba(17,24,39,.42); }
.kb-thumb.is-video.has-cover:hover .kb-play { background:rgba(63,107,246,.92); }
.kb-play { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  width:36px; height:36px; border-radius:50%; background:rgba(17,24,39,.5); color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:13px; padding-left:2px;
  pointer-events:none; transition:background .15s, transform .15s; }
.kb-card:hover .kb-play { background:rgba(63,107,246,.9); transform:translate(-50%,-50%) scale(1.06); }
.kb-body { padding:12px 14px 14px; display:flex; flex-direction:column; gap:6px; flex:1; }
.kb-title { font-weight:600; font-size:14px; line-height:1.45; overflow:hidden;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.kb-meta { font-size:11.5px; color:var(--muted); }
.kb-tags { display:flex; flex-wrap:wrap; gap:5px; }
.kb-actions { display:flex; gap:8px; margin-top:auto; padding-top:8px; }
.kb-actions .btn { flex:1; justify-content:center; }
.kb-filters { display:flex; gap:6px; flex-wrap:wrap; }
.kb-chip { border:1px solid var(--line); border-radius:999px; padding:5px 12px; font-size:12.5px;
  cursor:pointer; background:#fff; color:#42506a; }
.kb-chip.active { background:#3f6bf6; border-color:#3f6bf6; color:#fff; }

.level.D { background: #f1f2f4; color: #6b7280; }

/* ---------------- 顶部固定栏：蓝色主题 ---------------- */
.topbar {
  /* 藏青色：比侧边栏略浅一档，形成层次但不抢内容 */
  background: linear-gradient(96deg, #16233f 0%, #1b2b4b 55%, #22355c 100%);
  border-bottom: 0;
  box-shadow: 0 2px 12px rgba(11, 21, 40, .28);
}
.topbar .crumb { color: rgba(255, 255, 255, .92); font-size: 13.5px; font-weight: 500; letter-spacing: .2px; }
.topbar .user-box .who { color: #fff; }
.topbar .user-box .who small { color: rgba(255, 255, 255, .72); }
.topbar .avatar {
  background: rgba(255, 255, 255, .22); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
}
.topbar .user-box:hover .avatar { background: rgba(255, 255, 255, .3); }
.topbar .menu { border-color: #dfe6f5; }
.topbar .menu-item { color: var(--text); }

/* ---------------- AI 思考中 / 流式输出 ---------------- */
.ai-thinking { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.ai-thinking em { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 2px; }
.ai-dots { display: inline-flex; gap: 3px; align-items: flex-end; height: 12px; }
.ai-dots i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: .3;
  animation: ai-blink 1.15s infinite ease-in-out;
}
.ai-dots i:nth-child(2) { animation-delay: .18s; }
.ai-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes ai-blink {
  0%, 80%, 100% { opacity: .25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}
.ai-caret {
  display: inline-block; width: 7px; height: 15px; margin-left: 2px; vertical-align: -2px;
  background: var(--accent); border-radius: 1px;
  animation: ai-caret 1s steps(1) infinite;
}
@keyframes ai-caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* 客户续签：整行可点开客户资料 */
#rn-table tbody tr.row-click { cursor: pointer; }
#rn-table tbody tr.row-click:hover { background: #f7f9ff; }
#rn-table tbody tr.row-click:hover td:first-child a { text-decoration: underline; }


/* 顶栏标语专用字体：站酷快乐体，仅含标语用字（约 2KB） */
@font-face {
  font-family: 'ZhiXingSlogan';
  src: url('/slogan.woff2?v=1') format('woff2');
  font-display: swap;
}

/* 顶栏标语：居中、白色 */
.topbar { position: relative; }
.topbar-slogan {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-family: "ZhiXingSlogan", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 20px;
  letter-spacing: 1px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}
@media (max-width: 980px) { .topbar-slogan { display: none; } }
@media (max-width: 1280px) { .topbar-slogan { font-size: 17px; letter-spacing: .5px; } }

/* ------------------------- 经营异常解除（天眼查拓客） ------------------------- */
.abn-filter { padding: 14px 18px 10px; margin-bottom: 14px; }
.abn-row { display: flex; align-items: flex-start; gap: 14px; padding: 6px 0; }
.abn-label { width: 118px; flex: none; color: var(--muted); font-size: 12.5px; line-height: 26px; text-align: right; }
.abn-opts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1; }
.abn-inline { display: inline-flex; align-items: center; gap: 6px; }
.abn-inline .input { width: 140px; }
.chip {
  display: inline-block; padding: 4px 11px; border-radius: 6px; font-size: 12.5px;
  color: #4b5b76; background: transparent; border: 1px solid transparent; line-height: 18px;
}
.chip:hover { background: #f2f6ff; color: var(--accent); }
.chip.on { background: var(--accent-soft); color: #2f55d4; font-weight: 600; }
.abn-more-toggle { padding: 2px 0 6px 132px; font-size: 12.5px; }
.abn-more { padding-bottom: 6px; border-top: 1px dashed var(--line-soft); }
.abn-selected {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  border-top: 1px solid var(--line-soft); padding-top: 10px; margin-top: 4px; font-size: 12.5px;
}
.abn-tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 4px;
  background: #eef3ff; color: #33507e; font-size: 12px;
}
.abn-tag a { color: #7b8aa5; text-decoration: none; font-size: 13px; }
.abn-tag a:hover { color: var(--red); }
.abn-reset { margin-left: 6px; font-size: 12.5px; }

.abn-result {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 16px; margin-bottom: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.abn-result .abn-num { color: var(--accent); font-size: 17px; }
.abn-result .spacer { flex: 1; }

.abn-list { display: flex; flex-direction: column; gap: 10px; }
.abn-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; transition: box-shadow .15s, border-color .15s;
}
.abn-card:hover { border-color: #c9d8f5; box-shadow: 0 2px 10px rgba(35,70,140,.06); }
.abn-card.on { border-color: #8fb1ee; background: #fbfdff; }
.abn-check { padding-top: 16px; }
.abn-check input { width: 16px; height: 16px; cursor: pointer; }
.abn-logo {
  width: 46px; height: 46px; flex: none; border-radius: 8px;
  background: linear-gradient(135deg, #4d8bf5, #2f66d6); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600; letter-spacing: -.5px;
}
.abn-main { flex: 1; min-width: 0; }
.abn-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.abn-title .nm { font-size: 15px; font-weight: 650; color: #17233a; }
.abn-meta {
  display: flex; flex-wrap: wrap; gap: 6px 26px;
  margin-top: 7px; font-size: 12.5px; color: var(--muted);
}
.abn-meta b { color: #33425e; font-weight: 600; }
.abn-meta .wide { flex: 1 1 380px; min-width: 0; }
.abn-reason {
  margin-top: 9px; padding: 7px 10px; border-radius: 6px;
  background: #f7f9fc; font-size: 12.5px; color: #46536b;
}
.abn-side { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex: none; }
.abn-bar { height: 8px; border-radius: 5px; background: #e8eefb; overflow: hidden; margin: 8px 0 6px; }
.abn-bar i { display: block; height: 100%; background: linear-gradient(90deg, #4d8bf5, #2f66d6); transition: width .3s; }
@media (max-width: 900px) {
  .abn-label { width: 88px; }
  .abn-more-toggle { padding-left: 102px; }
  .abn-side { display: none; }
}

.abn-opts .select { width: auto; min-width: 200px; }
.abn-all { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.abn-all input { width: 15px; height: 15px; }

/* --------------------------- 税务异常解除（天眼查） --------------------------- */
.tax-cats {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 14px;
}
.tax-cat {
  display: block; padding: 14px 16px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); text-align: center; color: #33425e;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.tax-cat b { display: block; font-size: 14px; font-weight: 650; }
.tax-cat span { display: block; margin-top: 5px; font-size: 12px; color: var(--muted); }
.tax-cat:hover { border-color: #c9d8f5; box-shadow: 0 2px 10px rgba(35,70,140,.06); }
.tax-cat.on {
  border-color: #f0c98a; background: #fffaf2;
  box-shadow: 0 2px 10px rgba(200,140,40,.08);
}
.tax-cat.on b { color: #b46812; }
@media (max-width: 1100px) {
  .tax-cats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------------- 我的新签：入口卡片 + 三模块切换条 ---------------------- */
.hub-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.hub-card {
  position: relative; display: flex; gap: 14px; align-items: flex-start;
  padding: 18px 36px 16px 18px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); color: inherit; text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.hub-card:hover {
  border-color: #b9cdf2; box-shadow: 0 6px 20px rgba(35,70,140,.09); transform: translateY(-1px);
}
.hub-ico {
  width: 44px; height: 44px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center;
}
.hub-ico svg { width: 22px; height: 22px; }
.tone-blue .hub-ico { background: #e8f0ff; color: #2f5fd0; }
.tone-orange .hub-ico { background: #fff2e2; color: #b46812; }
.tone-red .hub-ico { background: #ffecec; color: #c33b3b; }
.hub-body { flex: 1; min-width: 0; }
.hub-title { font-size: 15px; font-weight: 650; color: #17233a; }
.hub-num { margin-top: 6px; }
.hub-num b { font-size: 24px; font-weight: 700; letter-spacing: -.5px; color: #1b2b4b; }
.hub-num span { margin-left: 5px; font-size: 12.5px; color: var(--muted); }
.hub-desc { margin-top: 8px; font-size: 12.5px; color: #5b687f; line-height: 1.75; }
.hub-meta {
  display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px;
  font-size: 12px; color: var(--muted);
}
.hub-meta b { color: #33425e; }
.hub-arrow {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 22px; color: #b9c6dd;
}
.hub-card:hover .hub-arrow { color: var(--accent); }
@media (max-width: 1400px) { .hub-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 780px) { .hub-grid { grid-template-columns: 1fr; } }

.subnav {
  display: flex; gap: 6px; margin-bottom: 14px; padding: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
}
.subnav-item {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 7px; color: #5b687f;
  font-size: 13px; text-decoration: none; transition: background .15s, color .15s;
}
.subnav-item:hover { background: #f4f7fe; color: var(--accent); }
.subnav-item.on { background: var(--accent-soft); color: #2f55d4; font-weight: 600; }
.subnav-item svg { width: 15px; height: 15px; }

.tone-green .hub-ico { background: #e9f7ef; color: #1f8a4c; }

/* ---------------------- 备案号 / 内部使用声明 ---------------------- */
.icp-link {
  color: #7c8aa5; font-size: 11.5px; text-decoration: none; letter-spacing: .2px;
}
.icp-link:hover { color: #3f6bf6; text-decoration: underline; }
.login-legal {
  margin-top: 18px; color: #8494b0; font-size: 11.5px; line-height: 1.9;
}
.login-legal-line { color: #9aa8c0; }
.login-legal .icp-link { color: #8494b0; }
.sidebar-icp { margin-top: 6px; }
.sidebar-icp .icp-link { color: #6b7a96; font-size: 11px; }
.sidebar-icp .icp-link:hover { color: #c9d6ee; }

/* ---------------------- 登录页左侧：企业文化 ---------------------- */
.login-culture { margin-top: 64px; }
.login-motto {
  font-size: 40px; font-weight: 800; line-height: 1.4; letter-spacing: 1.5px;
  color: #fff; text-shadow: 0 8px 30px rgba(63, 107, 246, .38);
}
.login-culture-block { margin-top: 46px; }
.login-culture-label {
  display: inline-block; font-size: 12.5px; letter-spacing: 6px; color: #93a6c9;
  padding-left: 14px; border-left: 3px solid #3f6bf6; line-height: 1;
}
.login-values { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; max-width: 600px; }
.login-values span {
  font-size: 13.5px; color: #dbe4f6; padding: 6px 13px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .05);
  letter-spacing: 1px; white-space: nowrap;
}
.login-values span:last-child {
  color: #fff; border-color: rgba(120, 160, 255, .5); background: rgba(63, 107, 246, .26);
}
.login-motto2 {
  margin-top: 38px; font-size: 17px; letter-spacing: 4px; color: #a9badd;
  display: flex; align-items: center; gap: 12px;
}
.login-motto2::before { content: ""; width: 28px; height: 1px; background: #3f6bf6; }
