/* ============ base ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d7dde6; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #c2cad6; }
::-webkit-scrollbar-track { background: transparent; }
@keyframes gmFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gmSlideR { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes gmPop { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes gmFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
input { font-family: inherit; }
input::placeholder { color: #aab0b8; }
button { font-family: inherit; }
[hidden] { display: none !important; }

.app-shell {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background: #eef2f9;
  color: #15171a;
  display: flex;
  flex-direction: column;
}

/* ============ top bar ============ */
.topbar {
  height: 56px;
  flex: none;
  background: #fff;
  border-bottom: 1px solid #ebeef3;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 14px;
  z-index: 30;
  position: relative;
}
.topbar-brand { display: flex; align-items: center; gap: 9px; }
.brand-logo { width: 35px; height: 29px; display: block; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: .5px; color: #15171a; }
.topbar-divider { width: 1px; height: 18px; background: #e6e9ed; }
.org-btn {
  display: flex; align-items: center; gap: 5px;
  border: none; background: transparent; cursor: pointer;
  color: #3a3f45; font-size: 13px; padding: 6px 8px; border-radius: 6px;
}
.org-btn:hover { background: #f2f5fa; }
.org-name { font-weight: 500; }
.trial-text { font-size: 12px; color: #aab0b8; margin-left: 2px; }
.buy-btn {
  display: flex; align-items: center; gap: 4px;
  background: #2b6af3; color: #fff; border: none;
  padding: 5px 12px; border-radius: 6px;
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  box-shadow: 0 2px 6px rgba(43, 106, 243, .28);
}
.buy-btn:hover { background: #1d54d4; }
.topbar-search {
  flex: 1; max-width: 480px; margin: 0 auto;
  display: flex; align-items: center; gap: 9px;
  height: 36px; background: #f1f4f9;
  border: 1px solid transparent; border-radius: 18px;
  padding: 0 16px; cursor: text;
  color: #9aa1ab; font-size: 13px;
  transition: all .15s;
}
.topbar-search:hover { background: #eaf0fb; border-color: #cfddfb; }
.topbar-search-text { flex: 1; }
.kbd {
  font-size: 11px; font-family: inherit;
  background: #fff; border: 1px solid #e2e7ee; border-radius: 4px;
  padding: 1px 6px; color: #8a9099;
}
.org-manage-btn {
  display: flex; align-items: center; gap: 6px;
  border: none; background: transparent; cursor: pointer;
  color: #5a616a; font-size: 13px; padding: 6px 8px; border-radius: 6px;
}
.org-manage-btn:hover { background: #f2f5fa; }
.org-manage-text { font-weight: 500; }
.topbar-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #34c77b, #16a163);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; cursor: pointer;
  box-shadow: 0 1px 4px rgba(22, 161, 99, .3);
}

/* ============ layout ============ */
.layout { flex: 1; display: flex; min-height: 0; position: relative; }

/* ============ left nav ============ */
.sidenav {
  width: 78px; flex: none;
  background: #fff; border-right: 1px solid #ebeef3;
  display: flex; flex-direction: column; align-items: stretch;
  padding: 10px 8px;
  transition: width .22s cubic-bezier(.4, 0, .2, 1);
  z-index: 20;
}
.sidenav.collapsed { width: 60px; }
.sidenav.collapsed .nav-label { display: none; }
.sidenav.collapsed .nav-collapse-icon { transform: rotate(180deg); }
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 4px; border-radius: 10px;
  text-decoration: none; cursor: pointer;
  color: #5a616a; margin-bottom: 3px;
}
.nav-item:hover { background: #f4f6fa; color: #2b6af3; }
.nav-item.active { background: #eef4ff; color: #2b6af3; }
.nav-item.active:hover { background: #eef4ff; }
.nav-item-last { margin-bottom: 0; }
.nav-label { font-size: 11px; font-weight: 500; }
.nav-label-active { font-weight: 600; }
.nav-spacer { flex: 1; }
.nav-heart {
  display: flex; flex-direction: column; align-items: center;
  padding: 9px 4px; border-radius: 10px; cursor: pointer; color: #ef5da8;
}
.nav-heart:hover { background: #fdeef6; }
.nav-collapse {
  display: flex; align-items: center; justify-content: center;
  padding: 9px 4px; border: none; background: transparent;
  cursor: pointer; color: #8a9099; border-radius: 10px; margin-top: 2px;
}
.nav-collapse:hover { background: #f4f6fa; color: #2b6af3; }
.nav-collapse-icon { transition: transform .22s; }

/* ============ main ============ */
.main { flex: 1; min-width: 0; overflow-y: auto; overflow-x: hidden; padding: 26px 30px 40px; }
.main-inner { max-width: 1080px; margin: 0 auto; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mb-20 { margin-bottom: 20px; }

/* greeting row */
.greeting-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.greeting { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.greeting-light { font-size: 23px; color: #3a3f45; font-weight: 400; }
.greeting-name { font-size: 23px; font-weight: 700; color: #15171a; }
.greeting-tools { display: flex; align-items: center; gap: 14px; }
.seg-group { display: flex; align-items: center; border-radius: 9px; padding: 3px; gap: 2px; }
.seg-group-data { background: #e7ecf4; }
.seg-group-data .seg-btn { padding: 5px 12px; border-radius: 7px; }
.seg-group-todo { background: #f1f4f9; border-radius: 8px; }
.seg-group-todo .seg-btn { padding: 4px 12px; border-radius: 6px; }
.seg-btn {
  border: none; cursor: pointer;
  font-size: 12px; font-weight: 600;
  background: transparent; color: #8a9099;
}
.seg-btn.on { background: #fff; color: #2b6af3; box-shadow: 0 1px 3px rgba(20, 40, 80, .14); }
.mini-btn-row { display: flex; align-items: center; gap: 6px; color: #9aa1ab; }
.mini-btn {
  width: 30px; height: 30px; border: none; background: #fff; border-radius: 8px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 3px rgba(20, 40, 80, .06);
  color: inherit;
}
.mini-btn:hover { color: #2b6af3; }

/* banner */
.banner {
  position: relative; height: 230px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(135deg, #4d8bf5 0%, #2b6af3 55%, #1f5fe0 100%);
  box-shadow: 0 8px 24px rgba(43, 106, 243, .22);
}
.banner-circle-1 { position: absolute; top: -30px; left: -20px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 255, 255, .10); }
.banner-circle-2 { position: absolute; bottom: -40px; left: 30%; width: 90px; height: 90px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .18); }
.banner-dot-yellow { position: absolute; top: 24px; right: 30px; width: 8px; height: 8px; border-radius: 50%; background: #ffd84d; animation: gmFloat 4s ease-in-out infinite; }
.banner-dot-white { position: absolute; top: 60px; left: 28px; width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .7); }
.banner-content { position: absolute; left: 26px; top: 38px; color: #fff; }
.banner-title { font-size: 19px; font-weight: 700; letter-spacing: .5px; }
.banner-sub { font-size: 12.5px; opacity: .82; margin-top: 8px; line-height: 1.7; max-width: 200px; }
.banner-cta {
  margin-top: 18px; display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255, 255, 255, .95); color: #2b6af3;
  font-size: 12px; font-weight: 600; padding: 7px 14px; border-radius: 8px; cursor: pointer;
}
.banner-mock {
  position: absolute; right: 24px; bottom: 24px; top: 30px; width: 185px;
  background: rgba(255, 255, 255, .94); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 40, 120, .25);
  padding: 13px; display: flex; flex-direction: column; gap: 8px;
}
.mock-dots { display: flex; gap: 5px; }
.mock-dot { width: 7px; height: 7px; border-radius: 50%; }
.mock-dot-red { background: #ff6058; }
.mock-dot-yellow { background: #ffbd2e; }
.mock-dot-green { background: #28c840; }
.mock-banner { height: 34px; border-radius: 7px; background: linear-gradient(90deg, #dfeafe, #eef4ff); }
.mock-row { display: flex; gap: 7px; }
.mock-cell { flex: 1; height: 22px; border-radius: 6px; background: #eef3fb; }
.mock-chart { display: flex; align-items: flex-end; gap: 6px; height: 46px; padding-top: 4px; }
.mock-col { flex: 1; border-radius: 3px; }

/* ============ cards ============ */
.card { background: #fff; border-radius: 16px; box-shadow: 0 1px 3px rgba(20, 40, 80, .05); }
.card-title { font-size: 16px; font-weight: 700; color: #15171a; }
.card-head { display: flex; align-items: center; justify-content: space-between; }
.card-body-flex { flex: 1; display: flex; flex-direction: column; }

/* 流程待办 */
.card-todo { padding: 22px 24px; display: flex; flex-direction: column; }
.card-head-todo { margin-bottom: 8px; }
.todo-grid { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; }
.todo-item { display: flex; flex-direction: column; align-items: center; gap: 10px; position: relative; }
.todo-num { font-size: 40px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.todo-label { font-size: 13px; color: #8a9099; font-weight: 500; }

/* 最近使用 / 记录收藏 */
.card-recent { padding: 20px 24px 24px; min-height: 300px; display: flex; flex-direction: column; }
.recent-head { display: flex; align-items: center; gap: 22px; margin-bottom: 18px; }
.tabs { display: flex; align-items: center; gap: 20px; position: relative; top: 1px; }
.tab { font-size: 14px; cursor: pointer; padding-bottom: 8px; color: #8a9099; font-weight: 500; border-bottom: 2.5px solid transparent; }
.tab.on { color: #15171a; font-weight: 700; border-bottom: 2.5px solid #2b6af3; }
.card-head-fav { margin-bottom: 18px; }
.link-all {
  display: flex; align-items: center; gap: 2px;
  border: none; background: transparent; cursor: pointer;
  color: #9aa1ab; font-size: 13px;
}
.link-all:hover { color: #2b6af3; }

.recent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.recent-item {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  padding: 14px 6px; border-radius: 12px; cursor: pointer;
  transition: background .15s;
}
.recent-item:hover { background: #f5f8fd; }
.recent-icon {
  width: 46px; height: 46px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 19px; font-weight: 700;
}
.recent-name { font-size: 12.5px; color: #3a3f45; text-align: center; max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* empty states */
.empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: #bcc3cc; min-height: 180px; }
.empty-charts { min-height: 150px; }
.empty-icon-wrap { position: relative; width: 64px; height: 64px; }
.empty-icon { width: 64px; height: 64px; border-radius: 16px; background: #f1f4f8; display: flex; align-items: center; justify-content: center; }
.empty-badge {
  position: absolute; right: -4px; top: -4px; width: 22px; height: 22px; border-radius: 50%;
  background: #9aa3ad; display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}
.empty-text { font-size: 13px; }

/* 记录收藏 list */
.records { display: flex; flex-direction: column; gap: 8px; }
.record {
  display: flex; align-items: center; gap: 13px;
  padding: 12px; border-radius: 11px; cursor: pointer;
  border: 1px solid #f0f2f6; transition: all .15s;
}
.record:hover { background: #f7faff; border-color: #dce7fb; }
.record-icon { width: 38px; height: 38px; flex: none; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.record-body { flex: 1; min-width: 0; }
.record-title { font-size: 13.5px; font-weight: 600; color: #2a2f35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.record-sub { font-size: 11.5px; color: #9aa1ab; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 图表收藏 */
.card-charts { padding: 20px 24px 24px; min-height: 200px; display: flex; flex-direction: column; }
.charts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.chart-card { border: 1px solid #eef1f5; border-radius: 13px; padding: 16px 18px; cursor: pointer; }
.chart-card:hover { box-shadow: 0 4px 14px rgba(20, 40, 80, .08); }
.chart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.chart-head-ring { margin-bottom: 10px; }
.chart-name { font-size: 13.5px; font-weight: 600; color: #2a2f35; }
.chart-tag { font-size: 11px; padding: 2px 7px; border-radius: 5px; }
.chart-tag-line { color: #2b6af3; background: #eef4ff; }
.chart-tag-bar { color: #7c5cfc; background: #f0ecfe; }
.chart-tag-ring { color: #0e9f6e; background: #e4f6ee; }
.chart-svg { width: 100%; height: 90px; }
.donut-wrap { display: flex; align-items: center; justify-content: center; height: 80px; }
.donut {
  width: 72px; height: 72px; border-radius: 50%;
  background: conic-gradient(#0e9f6e 0 78%, #e4f0eb 78% 100%);
  display: flex; align-items: center; justify-content: center;
}
.donut-inner {
  width: 50px; height: 50px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: #0e9f6e;
}

/* 应用 */
.card-apps { padding: 22px 24px 26px; }
.apps-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 16px; }
.apps-head-tools { display: flex; align-items: center; gap: 12px; }
.apps-search {
  display: flex; align-items: center; gap: 8px;
  height: 36px; background: #f1f4f9; border-radius: 9px;
  padding: 0 14px; width: 230px;
}
.apps-search input { border: none; background: transparent; outline: none; font-size: 13px; flex: 1; color: #3a3f45; }
.new-app-btn {
  display: flex; align-items: center; gap: 5px;
  background: #2b6af3; color: #fff; border: none;
  height: 36px; padding: 0 16px; border-radius: 9px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  box-shadow: 0 2px 8px rgba(43, 106, 243, .26);
}
.new-app-btn:hover { background: #1d54d4; }
.apps-sub { display: flex; align-items: center; gap: 7px; margin-bottom: 16px; color: #5a616a; }
.apps-sub-title { font-size: 13.5px; font-weight: 600; }
.apps-count { font-size: 12px; color: #aab0b8; }
.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 14px; }
.app-tile {
  display: flex; flex-direction: column; align-items: center; gap: 11px;
  padding: 18px 8px; border-radius: 13px;
  border: 1px solid #f0f2f6; cursor: pointer; transition: all .15s;
}
.app-tile:hover { box-shadow: 0 6px 18px rgba(20, 40, 80, .1); border-color: #fff; transform: translateY(-2px); }
.app-icon {
  width: 52px; height: 52px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 21px; font-weight: 700;
}
.app-name { font-size: 13px; color: #3a3f45; font-weight: 500; text-align: center; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-add {
  display: flex; flex-direction: column; align-items: center; gap: 11px;
  padding: 18px 8px; border-radius: 13px;
  border: 1.5px dashed #d3dbe6; cursor: pointer; transition: all .15s;
}
.app-add:hover { border-color: #2b6af3; background: #f7faff; }
.app-add-icon { width: 52px; height: 52px; border-radius: 15px; background: #f1f4f9; display: flex; align-items: center; justify-content: center; color: #9aa1ab; }
.app-add-name { font-size: 13px; color: #8a9099; font-weight: 500; }

/* ============ app view ============ */
.app-view { flex: 1; display: flex; min-width: 0; }

.app-sidebar {
  width: 250px; flex: none;
  background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
  border-right: 1px solid #ebeef3;
  display: flex; flex-direction: column; min-height: 0;
}
.app-sidebar-head {
  height: 54px; flex: none;
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px; border-bottom: 1px solid #f2f4f7;
}
.app-back {
  width: 30px; height: 30px; flex: none;
  border: none; background: transparent; border-radius: 8px;
  cursor: pointer; color: #8a9099;
  display: flex; align-items: center; justify-content: center;
}
.app-back:hover { background: #f4f6fa; color: #2b6af3; }
.app-sidebar-icon {
  width: 32px; height: 32px; flex: none; border-radius: 9px;
  background: linear-gradient(135deg, #f0a868, #e8895d);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 700;
  box-shadow: 0 2px 6px rgba(232, 137, 93, .35);
}
.app-sidebar-title { flex: 1; min-width: 0; }
.app-sidebar-name { font-size: 14px; font-weight: 700; color: #15171a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-sidebar-sub { font-size: 11px; color: #9aa1ab; }
.app-sidebar-search-wrap { padding: 10px 12px; flex: none; }
.app-sidebar-search { display: flex; align-items: center; gap: 8px; height: 34px; background: #f1f4f9; border-radius: 9px; padding: 0 12px; }
.app-sidebar-search input { border: none; background: transparent; outline: none; font-size: 12.5px; flex: 1; color: #3a3f45; }
.app-sidebar-nav { flex: 1; overflow-y: auto; padding: 2px 8px 18px; }
.app-sidebar-nav::-webkit-scrollbar { width: 5px; }
.app-sidebar-nav::-webkit-scrollbar-thumb { background: #dde3ec; border-radius: 3px; }
.app-sidebar-nav::-webkit-scrollbar-thumb:hover { background: #c6cfdc; }

.sn-section {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 8px; border-radius: 9px; cursor: pointer; margin-top: 3px;
  transition: background .15s;
}
.sn-section:hover { background: #f4f7fc; }
.sn-section[data-open="1"] { background: #f4f7fc; }
.sn-section-icon {
  width: 26px; height: 26px; flex: none; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s;
}
.sn-section:hover .sn-section-icon { transform: scale(1.08); }
.sn-section-title { flex: 1; font-size: 13px; font-weight: 600; color: #2a2f35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sn-section-count {
  flex: none; font-size: 10.5px; font-weight: 500; color: #aab0b8;
  background: #f1f4f9; padding: 1px 7px; border-radius: 9px;
  transition: background .15s, color .15s;
}
.sn-section:hover .sn-section-count,
.sn-section[data-open="1"] .sn-section-count { background: #e4edfd; color: #2b6af3; }
.sn-chevron { transition: transform .18s; }
.sn-chevron.open { transform: rotate(90deg); }
.sn-items { padding: 3px 0 8px 10px; margin: 0 0 2px 20px; border-left: 1px solid #edf0f5; }
.sn-leaf {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 6px 10px 10px; border-radius: 8px; cursor: pointer;
  font-size: 13px; color: #4a505a;
  transition: background .15s, color .15s;
}
.sn-leaf:hover { background: #f4f6fa; }
.sn-leaf.sel {
  background: linear-gradient(90deg, #e9f1ff, #f3f8ff);
  color: #2b6af3; font-weight: 600;
}
.sn-leaf.sel::before {
  content: ''; position: absolute; left: 0; top: 9px; bottom: 9px;
  width: 3px; border-radius: 2px; background: #2b6af3;
}
.sn-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; transition: transform .15s; }
.sn-leaf:hover .sn-dot, .sn-leaf.sel .sn-dot { transform: scale(1.3); }
.sn-leaf-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sn-link {
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; flex: none; border-radius: 6px;
  color: #9aa1ab; opacity: 0;
  transition: opacity .15s, background .15s, color .15s;
}
.sn-leaf:hover .sn-link { opacity: 1; }
.sn-leaf.sel .sn-link { opacity: 1; color: #2b6af3; }
.sn-link:hover { background: #dce8fd; color: #2b6af3; }
.sn-group {
  display: flex; align-items: center; gap: 8px;
  padding: 10px; border-radius: 8px; cursor: pointer;
  font-size: 13px; color: #4a505a;
  transition: background .15s;
}
.sn-group:hover { background: #f4f6fa; }
.sn-group-name { flex: 1; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sn-group-count { font-size: 10.5px; color: #aab0b8; background: #f1f4f9; padding: 1px 6px; border-radius: 8px; }
.sn-child {
  position: relative;
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px 9px 28px; border-radius: 8px; cursor: pointer;
  font-size: 12.5px; color: #6a7079;
  transition: background .15s, color .15s;
}
.sn-child:hover { background: #f4f6fa; }
.sn-child.sel { background: linear-gradient(90deg, #e9f1ff, #f3f8ff); color: #2b6af3; font-weight: 600; }
.sn-child.sel::before {
  content: ''; position: absolute; left: 0; top: 7px; bottom: 7px;
  width: 3px; border-radius: 2px; background: #2b6af3;
}
.sn-child-dot { width: 4px; height: 4px; flex: none; border-radius: 50%; background: #c2cad6; }
.sn-child:hover .sn-child-dot, .sn-child.sel .sn-child-dot { background: #2b6af3; }

.app-content { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #f5f7fb; }
.app-content-head {
  flex: none; background: #fff; border-bottom: 1px solid #ebeef3;
  padding: 13px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.app-content-head-text { min-width: 0; }
.app-crumb { font-size: 11.5px; color: #9aa1ab; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-page-title { font-size: 17px; font-weight: 700; color: #15171a; }
.app-content-head-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.app-tool-link {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border: 1px solid #cfddfb; background: #eef4ff; border-radius: 8px;
  color: #2b6af3; text-decoration: none;
}
.app-tool-link:hover { background: #dce8fd; border-color: #b9cdf8; }
.app-tool-btn {
  width: 32px; height: 32px;
  border: 1px solid #eaedf2; background: #fff; border-radius: 8px;
  cursor: pointer; color: #8a9099;
  display: flex; align-items: center; justify-content: center;
}
.app-tool-refresh:hover, .app-tool-more:hover { color: #2b6af3; border-color: #cfddfb; }
.app-tool-star:hover { color: #ffc83d; border-color: #ffe3a3; }
.app-body { flex: 1; overflow-y: auto; padding: 22px 24px 36px; }
.app-body.app-body-frame { display: flex; flex-direction: column; overflow: hidden; padding: 14px 16px 16px; }
.bi-frame-card {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(20, 40, 80, .05);
  border: 1px solid #ebeef3;
}
.bi-frame { flex: 1; width: 100%; border: none; background: #fff; }

/* report page */
.rp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.rp-stat { background: #fff; border-radius: 14px; padding: 18px; box-shadow: 0 1px 3px rgba(20, 40, 80, .05); }
.rp-stat-label { font-size: 12.5px; color: #8a9099; margin-bottom: 10px; }
.rp-stat-value { font-size: 23px; font-weight: 700; color: #15171a; letter-spacing: .3px; }
.rp-stat-delta { display: inline-flex; align-items: center; margin-top: 10px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.rp-mid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 16px; margin-bottom: 16px; }
.rp-card { background: #fff; border-radius: 14px; padding: 20px 22px; box-shadow: 0 1px 3px rgba(20, 40, 80, .05); }
.rp-card-flex { display: flex; flex-direction: column; }
.rp-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.rp-card-title { font-size: 14px; font-weight: 700; color: #15171a; }
.rp-card-tag { font-size: 11px; color: #2b6af3; background: #eef4ff; padding: 3px 9px; border-radius: 6px; }
.rp-card-src { font-size: 11.5px; color: #9aa1ab; }
.rp-trend-svg { width: 100%; height: 180px; }
.rp-bars-svg { width: 100%; height: 150px; }
.rp-donut-title { font-size: 14px; font-weight: 700; color: #15171a; margin-bottom: 8px; }
.rp-donut-wrap { flex: 1; display: flex; align-items: center; justify-content: center; }
.rp-donut {
  width: 128px; height: 128px; border-radius: 50%;
  background: conic-gradient(#0e9f6e 0 78%, #eef1f5 78% 100%);
  display: flex; align-items: center; justify-content: center;
}
.rp-donut-inner {
  width: 92px; height: 92px; border-radius: 50%; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.rp-donut-pct { font-size: 26px; font-weight: 700; color: #0e9f6e; }
.rp-donut-sub { font-size: 11px; color: #9aa1ab; }

/* form page */
.fm-card { background: #fff; border-radius: 14px; box-shadow: 0 1px 3px rgba(20, 40, 80, .05); overflow-x: auto; }
.fm-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid #f0f2f6; }
.fm-toolbar-left { display: flex; gap: 10px; }
.fm-new-btn {
  display: flex; align-items: center; gap: 5px;
  background: #2b6af3; color: #fff; border: none;
  height: 34px; padding: 0 14px; border-radius: 8px;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.fm-new-btn:hover { background: #1d54d4; }
.fm-batch-btn {
  display: flex; align-items: center; gap: 5px;
  background: #fff; border: 1px solid #e2e7ee;
  height: 34px; padding: 0 14px; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: #5a616a; cursor: pointer;
}
.fm-batch-btn:hover { background: #f6f8fc; }
.fm-toolbar-right { display: flex; align-items: center; gap: 9px; }
.fm-search { display: flex; align-items: center; gap: 7px; height: 34px; background: #f1f4f9; border-radius: 8px; padding: 0 12px; width: 180px; }
.fm-search input { border: none; background: transparent; outline: none; font-size: 12.5px; flex: 1; color: #3a3f45; }
.fm-filter-btn {
  width: 34px; height: 34px;
  border: 1px solid #e2e7ee; background: #fff; border-radius: 8px;
  cursor: pointer; color: #8a9099;
  display: flex; align-items: center; justify-content: center;
}
.fm-filter-btn:hover { color: #2b6af3; }
.fm-row { display: grid; min-width: 660px; grid-template-columns: 150px minmax(150px, 1fr) 90px 100px 110px 120px; padding: 13px 18px; border-bottom: 1px solid #f3f5f8; font-size: 13px; color: #3a3f45; align-items: center; cursor: pointer; }
.fm-row:hover { background: #f9fbff; }
.fm-header { display: grid; min-width: 660px; grid-template-columns: 150px minmax(150px, 1fr) 90px 100px 110px 120px; padding: 11px 18px; border-bottom: 1px solid #f0f2f6; background: #fafbfd; font-size: 12px; font-weight: 600; color: #8a9099; }
.fm-id { color: #2b6af3; font-weight: 500; }
.fm-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 12px; }
.fm-status { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 6px; }
.fm-amount { font-variant-numeric: tabular-nums; }
.fm-time { color: #9aa1ab; font-size: 12px; }
.fm-foot { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; }
.fm-total { font-size: 12.5px; color: #9aa1ab; }
.fm-pager { display: flex; align-items: center; gap: 6px; }
.fm-pg-btn {
  width: 28px; height: 28px;
  border: 1px solid #e2e7ee; background: #fff; border-radius: 7px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.fm-pg-prev { color: #aab0b8; }
.fm-pg-next { color: #5a616a; }
.fm-pg-cur { width: 28px; height: 28px; background: #2b6af3; color: #fff; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 600; }

/* flow page */
.fl-card { background: #fff; border-radius: 14px; padding: 32px; box-shadow: 0 1px 3px rgba(20, 40, 80, .05); }
.fl-title { font-size: 14px; font-weight: 700; color: #15171a; margin-bottom: 24px; }
.fl-nodes { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 20px 0; }
.fl-node { border-radius: 10px; padding: 14px 20px; font-size: 13px; font-weight: 600; }
.fl-node-1 { background: #eef4ff; color: #2b6af3; border: 1.5px solid #cfddfb; }
.fl-node-2 { background: #fff7e8; color: #f5a623; border: 1.5px solid #ffe3a3; }
.fl-node-3 { background: #f0ecfe; color: #7c5cfc; border: 1.5px solid #ddd2fc; }
.fl-node-4 { background: #e4f6ee; color: #0e9f6e; border: 1.5px solid #bfe9d4; }
.fl-note { text-align: center; font-size: 12.5px; color: #9aa1ab; margin-top: 20px; }

/* doc page */
.doc-card { background: #fff; border-radius: 14px; padding: 34px 40px; box-shadow: 0 1px 3px rgba(20, 40, 80, .05); max-width: 760px; }
.doc-title { font-size: 19px; font-weight: 700; color: #15171a; margin-bottom: 6px; }
.doc-sub { font-size: 12.5px; color: #9aa1ab; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid #f0f2f6; }
.doc-lines { display: flex; flex-direction: column; gap: 14px; }
.doc-line-h { height: 13px; border-radius: 4px; background: #eef1f5; }
.doc-line { height: 10px; border-radius: 4px; background: #f3f5f8; }
.doc-gap { margin-top: 12px; }

/* ============ right tool rail ============ */
.rail {
  width: 64px; flex: none;
  background: #fff; border-left: 1px solid #ebeef3;
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 0; gap: 4px; z-index: 20;
}
.rail-btn {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  border: none; background: transparent; cursor: pointer;
  color: #5a616a; padding: 8px 4px; border-radius: 10px; width: 50px;
}
.rail-btn:hover { background: #f4f6fa; color: #2b6af3; }
.rail-btn-label { font-size: 10.5px; font-weight: 500; }
.rail-badge {
  position: absolute; top: 3px; right: 7px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: #f5455c; color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid #fff;
}
.rail-divider { width: 30px; height: 1px; background: #eef0f4; margin: 6px 0; }
.rail-bell {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  border: none; background: #eef4ff; cursor: pointer;
  color: #2b6af3; width: 40px; height: 40px; border-radius: 12px;
}
.rail-bell:hover { background: #dde9fe; }
.rail-bell-badge {
  position: absolute; top: -2px; right: -2px;
  min-width: 15px; height: 15px; border-radius: 8px;
  background: #f5455c; color: #fff; font-size: 9.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid #fff;
}
.rail-spacer { flex: 1; }
.rail-num { font-size: 11px; color: #aab0b8; font-weight: 600; }
.rail-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #ff9ec7, #ff6f9c);
  margin-top: 4px; cursor: pointer;
  box-shadow: 0 2px 6px rgba(255, 111, 156, .35);
  display: flex; align-items: center; justify-content: center;
}
.rail-avatar-inner { width: 14px; height: 14px; border-radius: 50%; background: rgba(255, 255, 255, .55); }

/* ============ message drawer ============ */
.drawer-overlay { position: fixed; inset: 0; background: rgba(20, 30, 50, .18); z-index: 50; animation: gmFade .2s ease; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 380px;
  background: #fff; z-index: 51;
  box-shadow: -8px 0 30px rgba(20, 40, 80, .14);
  display: flex; flex-direction: column;
  animation: gmSlideR .26s cubic-bezier(.4, 0, .2, 1);
}
.drawer-head {
  height: 56px; flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; border-bottom: 1px solid #f0f2f6;
}
.drawer-tools { display: flex; align-items: center; gap: 14px; color: #8a9099; }
.drawer-tools svg { cursor: pointer; }
.drawer-close {
  border: none; background: transparent; cursor: pointer; color: #9aa1ab;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
}
.drawer-close:hover { background: #f4f6fa; }
.drawer-search-wrap { padding: 14px 16px; flex: none; }
.drawer-search { display: flex; align-items: center; gap: 9px; height: 38px; background: #f1f4f9; border-radius: 10px; padding: 0 14px; }
.drawer-search input { border: none; background: transparent; outline: none; font-size: 13px; flex: 1; color: #3a3f45; }
.drawer-list { flex: 1; overflow-y: auto; padding: 0 8px 16px; }
.msg-row { display: flex; gap: 12px; padding: 12px 10px; border-radius: 12px; cursor: pointer; }
.msg-row:hover { background: #f6f8fc; }
.msg-avatar-wrap { position: relative; flex: none; }
.msg-avatar {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 600;
}
.msg-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 17px; height: 17px; border-radius: 9px;
  background: #f5455c; color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}
.msg-body { flex: 1; min-width: 0; }
.msg-top { display: flex; align-items: center; justify-content: space-between; }
.msg-name { font-size: 14px; font-weight: 600; color: #2a2f35; }
.msg-time { font-size: 11px; color: #aab0b8; }
.msg-text { font-size: 12.5px; color: #8a9099; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-fab {
  position: absolute; right: 20px; bottom: 22px;
  width: 48px; height: 48px; border-radius: 50%; border: none;
  background: #2b6af3; color: #fff; cursor: pointer;
  box-shadow: 0 6px 18px rgba(43, 106, 243, .4);
  display: flex; align-items: center; justify-content: center;
}
.drawer-fab:hover { background: #1d54d4; }

/* ============ super search overlay ============ */
.search-overlay {
  position: fixed; inset: 0; background: rgba(20, 30, 50, .32); z-index: 60;
  display: flex; justify-content: center; align-items: flex-start;
  padding-top: 14px; animation: gmFade .15s ease;
}
.search-panel {
  width: 620px; max-width: 92vw; background: #fff; border-radius: 14px;
  box-shadow: 0 20px 60px rgba(20, 40, 80, .3);
  animation: gmPop .2s ease; overflow: hidden;
}
.search-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid #f0f2f6; }
.search-head input { flex: 1; border: none; outline: none; font-size: 16px; color: #15171a; }
.search-action { border: none; background: transparent; cursor: pointer; color: #aab0b8; display: flex; padding: 4px; }
.search-action-open:hover { color: #2b6af3; }
.search-action-close:hover { color: #15171a; }
.search-scopes { padding: 12px 14px 8px; display: flex; gap: 8px; }
.scope {
  font-size: 12px; padding: 5px 12px; border-radius: 7px;
  background: #f1f4f9; color: #5a616a; cursor: pointer; font-weight: 500;
}
.scope:hover { background: #eef4ff; color: #2b6af3; }
.search-suggest-wrap { padding: 6px 8px 14px; }
.search-suggest-label { font-size: 11.5px; color: #aab0b8; padding: 8px 12px; font-weight: 600; }
.suggest { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.suggest:hover { background: #f6f8fc; }
.suggest-icon {
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; font-weight: 700;
}
.suggest-body { flex: 1; }
.suggest-title { font-size: 13.5px; font-weight: 500; color: #2a2f35; }
.suggest-sub { font-size: 11.5px; color: #9aa1ab; margin-top: 2px; }

/* ============ new app modal ============ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20, 30, 50, .32); z-index: 60;
  display: flex; justify-content: center; align-items: center;
  animation: gmFade .15s ease;
}
.modal {
  width: 560px; max-width: 92vw; background: #fff; border-radius: 16px;
  box-shadow: 0 20px 60px rgba(20, 40, 80, .3);
  animation: gmPop .2s ease;
  padding: 26px 28px 24px;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.modal-title { font-size: 18px; font-weight: 700; color: #15171a; }
.modal-close {
  border: none; background: transparent; cursor: pointer; color: #aab0b8;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
}
.modal-close:hover { background: #f4f6fa; color: #15171a; }
.modal-desc { font-size: 13px; color: #8a9099; margin-bottom: 20px; }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-bottom: 22px; }
.method { border: 1.5px solid #eef1f5; border-radius: 13px; padding: 18px 14px; cursor: pointer; text-align: center; }
.method:hover { border-color: #cfddfb; background: #fafcff; }
.method-active, .method-active:hover { border-color: #2b6af3; background: #f7faff; }
.method-icon {
  width: 44px; height: 44px; margin: 0 auto 11px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.method-icon-blank { background: #2b6af3; color: #fff; }
.method-icon-template { background: #f0ecfe; color: #7c5cfc; }
.method-icon-excel { background: #e4f6ee; color: #0e9f6e; }
.method-name { font-size: 13.5px; font-weight: 600; color: #2a2f35; }
.method-sub { font-size: 11px; color: #9aa1ab; margin-top: 4px; }
.modal-field { margin-bottom: 22px; }
.field-label { font-size: 12.5px; font-weight: 600; color: #5a616a; display: block; margin-bottom: 8px; }
.field-input {
  width: 100%; height: 42px;
  border: 1.5px solid #e6e9ed; border-radius: 10px;
  padding: 0 14px; font-size: 14px; outline: none; color: #15171a;
}
.field-input:focus { border-color: #2b6af3; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; }
.btn-cancel {
  height: 40px; padding: 0 20px;
  border: 1px solid #e2e7ee; background: #fff; border-radius: 9px;
  font-size: 13.5px; font-weight: 600; color: #5a616a; cursor: pointer;
}
.btn-cancel:hover { background: #f6f8fc; }
.btn-primary {
  height: 40px; padding: 0 22px; border: none;
  background: #2b6af3; color: #fff; border-radius: 9px;
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  box-shadow: 0 2px 8px rgba(43, 106, 243, .28);
}
.btn-primary:hover { background: #1d54d4; }
