.analytics29{display:flex;flex-direction:column;gap:14px}
.a29-toolbar{display:flex;gap:10px;align-items:end;flex-wrap:wrap;background:#fff;border:1px solid #e5eaf1;border-radius:14px;padding:12px 14px}
.a29-field{display:flex;flex-direction:column;gap:5px;min-width:150px}.a29-field label{font-size:12px;color:#64748b;font-weight:700}
.a29-field input,.a29-field select{height:36px;border:1px solid #dbe3ee;border-radius:9px;padding:0 10px;background:#fff}
.a29-kpis{display:grid;grid-template-columns:repeat(6,minmax(130px,1fr));gap:10px}
.a29-kpi{background:#fff;border:1px solid #e4eaf2;border-radius:14px;padding:14px;cursor:pointer;transition:.18s;min-height:92px}
.a29-kpi:hover{transform:translateY(-2px);box-shadow:0 8px 22px rgba(15,23,42,.08);border-color:#b9d1f4}.a29-kpi.active{outline:2px solid #3b82f6;background:#f5f9ff}
.a29-kpi span{display:block;color:#64748b;font-size:12px}.a29-kpi strong{display:block;font-size:23px;margin-top:7px;color:#0f2747}.a29-kpi small{color:#94a3b8}
.a29-grid2{display:grid;grid-template-columns:1.15fr .85fr;gap:14px}.a29-panel{background:#fff;border:1px solid #e4eaf2;border-radius:14px;padding:14px}
.a29-panel h3{margin:0 0 4px;font-size:15px;color:#142b4b}.a29-sub{font-size:12px;color:#7b8a9e;margin-bottom:12px}
.a29-bars{display:flex;flex-direction:column;gap:9px}.a29-bar-row{display:grid;grid-template-columns:115px 1fr 74px;gap:9px;align-items:center;font-size:12px}
.a29-track{height:12px;background:#eef3f8;border-radius:99px;overflow:hidden}.a29-fill{height:100%;border-radius:99px;background:linear-gradient(90deg,#5b8def,#3b82f6)}
.a29-fill.green{background:linear-gradient(90deg,#55b98b,#22a06b)}.a29-fill.red{background:linear-gradient(90deg,#ef8c8c,#dc5252)}
.a29-donut{width:150px;height:150px;border-radius:50%;display:grid;place-items:center;margin:8px auto;background:conic-gradient(#3b82f6 var(--p),#e9eef5 0)}
.a29-donut:after{content:"";width:102px;height:102px;background:#fff;border-radius:50%;position:absolute}.a29-donut-wrap{position:relative;text-align:center}.a29-donut-label{position:absolute;inset:58px 0 auto;z-index:2;font-size:22px;font-weight:800;color:#17345d}
.a29-table table{width:100%;border-collapse:separate;border-spacing:0}.a29-table th{background:#f6f8fb;color:#607086;font-size:12px}.a29-table td,.a29-table th{padding:10px;border-bottom:1px solid #edf1f5;text-align:left}
.a29-rank{display:inline-flex;min-width:22px;height:22px;border-radius:7px;background:#eef4ff;color:#2563eb;align-items:center;justify-content:center;font-weight:800}
.a29-click{color:#2563eb;font-weight:700;cursor:pointer}.a29-note{padding:10px 12px;border-radius:10px;background:#f7f9fc;color:#64748b;font-size:12px}
@media(max-width:1100px){.a29-kpis{grid-template-columns:repeat(3,1fr)}.a29-grid2{grid-template-columns:1fr}}


/* ===== TMS v3.0 共配 / 任务管理 ===== */
.shared-trip-box,.project-load-section,.co-project-card{border:1px solid #dbe3ee;background:#fff;border-radius:12px;padding:14px;margin:12px 0}
.shared-trip-head,.project-load-head,.co-project-head,.shared-submit-bar{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap}
.shared-trip-head{padding-bottom:10px;border-bottom:1px solid #edf0f5;margin-bottom:10px}
.shared-trip-badge{display:inline-flex;padding:5px 11px;border-radius:999px;border:1px solid #dbe3ee;background:#f8fafc;color:#475569;font-size:12px;font-weight:800}
.shared-trip-badge.shared{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}
.co-project-card{border-left:3px solid #1677ff}
.co-project-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
.co-project-grid>div,.co-project-grid input,.co-project-grid select{min-width:0;width:100%}
.co-store-tools{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:12px 0 8px}
.co-store-tools input{max-width:360px;margin:0}
.co-store-list{width:100%;max-height:280px;overflow:auto;border:1px solid #e5e7eb;border-radius:10px;background:#fff}
.co-store-option{display:grid;grid-template-columns:28px minmax(0,1fr);align-items:start;gap:10px;padding:10px 12px;border-bottom:1px solid #eef2f7;cursor:pointer}
.co-store-option:last-child{border-bottom:0}.co-store-option:hover,.co-store-option.selected{background:#f8fbff}
.co-store-option input[type="checkbox"]{width:18px;height:18px;margin:2px 0 0}
.co-store-option b,.co-store-option small{display:block;white-space:normal;overflow-wrap:anywhere;word-break:break-word}
.co-store-option small{margin-top:3px;color:#64748b}
.shared-submit-bar{position:sticky;bottom:0;z-index:8;background:#fff;border:1px solid #dbe3ee;border-radius:12px;padding:12px 14px;margin-top:14px}
.task-action-row,.task-detail-actions{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.task-manage-note{padding:10px 12px;border:1px solid #e5e7eb;background:#f8fafc;color:#475569;border-radius:9px;margin-bottom:12px}
.task-danger-note{border-color:#fecaca;background:#fff7f7;color:#991b1b}
.task-delete-btn{background:#fff!important;color:#b91c1c!important;border:1px solid #fecaca!important}
@media(max-width:900px){.co-project-grid{grid-template-columns:1fr 1fr!important}.shared-submit-bar{position:static}}
@media(max-width:620px){.co-project-grid{grid-template-columns:1fr!important}.co-store-tools{flex-direction:column;align-items:stretch}.co-store-tools input{max-width:none}}



/* =========================================================
   TMS v3.1 恢复：四套后台视觉主题 + 顶部用户角色
   仅前端视觉，不修改业务接口
   ========================================================= */
:root,
html[data-tms-theme="light"]{
  --ui-bg:#f4f7fb;
  --ui-panel:#ffffff;
  --ui-panel-2:#f8fafc;
  --ui-sidebar:#10243a;
  --ui-sidebar-2:#142d47;
  --ui-top:#ffffff;
  --ui-text:#172033;
  --ui-text-2:#475569;
  --ui-muted:#7b8ca0;
  --ui-line:#dde6ef;
  --ui-primary:#1677ff;
  --ui-primary-2:#3b8cff;
  --ui-nav:#c8d7e5;
  --ui-nav-active:#eaf3ff;
  --ui-shadow:0 4px 18px rgba(15,23,42,.05);
}
html[data-tms-theme="navy"]{
  --ui-bg:#07111f;
  --ui-panel:#0f1d2c;
  --ui-panel-2:#122334;
  --ui-sidebar:#061522;
  --ui-sidebar-2:#0b2134;
  --ui-top:#081724;
  --ui-text:#f2f7fb;
  --ui-text-2:#c0d0dd;
  --ui-muted:#7893aa;
  --ui-line:#29445a;
  --ui-primary:#2f88ff;
  --ui-primary-2:#4aa0ff;
  --ui-nav:#9db3c6;
  --ui-nav-active:#123957;
  --ui-shadow:none;
}
html[data-tms-theme="graphite"]{
  --ui-bg:#101419;
  --ui-panel:#171d23;
  --ui-panel-2:#1c242c;
  --ui-sidebar:#0b0f13;
  --ui-sidebar-2:#151d24;
  --ui-top:#11171d;
  --ui-text:#f2f4f6;
  --ui-text-2:#c2cbd3;
  --ui-muted:#8795a1;
  --ui-line:#34414c;
  --ui-primary:#6097c7;
  --ui-primary-2:#78a8d1;
  --ui-nav:#a4b0ba;
  --ui-nav-active:#283a49;
  --ui-shadow:none;
}
html[data-tms-theme="indigo"]{
  --ui-bg:#0b1020;
  --ui-panel:#131b31;
  --ui-panel-2:#18223b;
  --ui-sidebar:#090e1c;
  --ui-sidebar-2:#151e38;
  --ui-top:#0d1427;
  --ui-text:#f4f5ff;
  --ui-text-2:#c7ccef;
  --ui-muted:#8e97bf;
  --ui-line:#344269;
  --ui-primary:#707cff;
  --ui-primary-2:#8790ff;
  --ui-nav:#aab0d4;
  --ui-nav-active:#2a3562;
  --ui-shadow:none;
}

html[data-tms-theme] body{background:var(--ui-bg)!important;color:var(--ui-text)!important}
html[data-tms-theme] .app{background:var(--ui-bg)!important}
html[data-tms-theme] aside{
  background:var(--ui-sidebar)!important;
  border-right:1px solid var(--ui-line)!important;
  color:var(--ui-text)!important
}
html[data-tms-theme] aside>h3{
  background:var(--ui-sidebar)!important;
  border-bottom:1px solid var(--ui-line)!important;
  color:#fff!important
}
html[data-tms-theme] nav button{
  background:transparent!important;
  color:var(--ui-nav)!important;
  box-shadow:none!important
}
html[data-tms-theme] nav button:hover{
  background:var(--ui-sidebar-2)!important;
  color:#fff!important
}
html[data-tms-theme] .nav-title{
  background:transparent!important;
  color:var(--ui-nav)!important
}
html[data-tms-theme] nav button.active{
  background:var(--ui-nav-active)!important;
  color:html[data-tms-theme="light"] var(--ui-primary)!important
}
html[data-tms-theme="light"] nav button.active{
  color:#1769b2!important;
  box-shadow:inset 3px 0 0 var(--ui-primary)!important
}
html[data-tms-theme="navy"] nav button.active,
html[data-tms-theme="graphite"] nav button.active,
html[data-tms-theme="indigo"] nav button.active{
  color:#fff!important;
  box-shadow:inset 3px 0 0 var(--ui-primary)!important
}
html[data-tms-theme] .nav-user{
  background:var(--ui-sidebar)!important;
  border-top:1px solid var(--ui-line)!important
}
html[data-tms-theme] main{
  background:var(--ui-bg)!important;
  color:var(--ui-text)!important
}
html[data-tms-theme] main>h1{
  background:var(--ui-bg)!important;
  color:var(--ui-text)!important;
  border-color:var(--ui-line)!important;
  padding-top:14px!important
}

/* cards / panels / tables */
html[data-tms-theme] .card,
html[data-tms-theme] .filter-panel,
html[data-tms-theme] .store-picker,
html[data-tms-theme] .alert-card,
html[data-tms-theme] .profile-box,
html[data-tms-theme] .doc-card,
html[data-tms-theme] .customer-section,
html[data-tms-theme] .customer-list-card,
html[data-tms-theme] .ops-card,
html[data-tms-theme] .ops-kpi,
html[data-tms-theme] .v2-panel,
html[data-tms-theme] .v2-kpi,
html[data-tms-theme] .billing-group,
html[data-tms-theme] .bill-section,
html[data-tms-theme] .builder-card,
html[data-tms-theme] .billing-config,
html[data-tms-theme] .billing-preview-card,
html[data-tms-theme] .billing-generate,
html[data-tms-theme] .shared-trip-box,
html[data-tms-theme] .project-load-section,
html[data-tms-theme] .co-project-card,
html[data-tms-theme] table{
  background:var(--ui-panel)!important;
  color:var(--ui-text)!important;
  border-color:var(--ui-line)!important;
  box-shadow:var(--ui-shadow)!important
}
html[data-tms-theme] th{
  background:var(--ui-panel-2)!important;
  color:var(--ui-muted)!important;
  border-color:var(--ui-line)!important
}
html[data-tms-theme] td,
html[data-tms-theme] tr,
html[data-tms-theme] .stop,
html[data-tms-theme] .inspection,
html[data-tms-theme] .detail-item,
html[data-tms-theme] .plan-detail-item{
  border-color:var(--ui-line)!important;
  color:var(--ui-text-2)!important
}
html[data-tms-theme] .detail-item,
html[data-tms-theme] .plan-detail-item,
html[data-tms-theme] .profile-box,
html[data-tms-theme] .inspection,
html[data-tms-theme] .section-note,
html[data-tms-theme] .review-bar{
  background:var(--ui-panel-2)!important
}
html[data-tms-theme] .muted,
html[data-tms-theme] .inline-note,
html[data-tms-theme] .kpi-note,
html[data-tms-theme] .file-note{
  color:var(--ui-muted)!important
}

/* controls */
html[data-tms-theme] input,
html[data-tms-theme] select,
html[data-tms-theme] textarea{
  background:var(--ui-panel-2)!important;
  color:var(--ui-text)!important;
  border-color:var(--ui-line)!important
}
html[data-tms-theme] input::placeholder,
html[data-tms-theme] textarea::placeholder{
  color:var(--ui-muted)!important
}
html[data-tms-theme] button:not(.btn-ghost):not(.danger-btn):not(.danger-outline):not(.task-delete-btn):not(.theme-btn):not(.nav-title){
  background:var(--ui-primary)!important;
  color:#fff!important
}
html[data-tms-theme] .btn-ghost{
  background:var(--ui-panel-2)!important;
  color:var(--ui-text-2)!important;
  border-color:var(--ui-line)!important
}

/* modal */
html[data-tms-theme] .modal>div{
  background:var(--ui-panel)!important;
  color:var(--ui-text)!important;
  border:1px solid var(--ui-line)!important
}
html[data-tms-theme] .modal-actions{
  background:var(--ui-panel)!important;
  border-color:var(--ui-line)!important
}
html[data-tms-theme] .permission-item,
html[data-tms-theme] .ex-photo-picker,
html[data-tms-theme] .csv-drop{
  background:var(--ui-panel-2)!important;
  color:var(--ui-text-2)!important;
  border-color:var(--ui-line)!important
}

/* global topbar */
.app-global-topbar{
  position:sticky;
  top:0;
  z-index:40;
  min-height:50px;
  margin:0 -24px 0;
  padding:7px 14px 7px 16px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  background:var(--ui-top);
  border-bottom:1px solid var(--ui-line);
  color:var(--ui-text)
}
.app-global-left,.app-global-right{display:flex;align-items:center;gap:10px}
.global-search{
  width:290px;
  height:34px;
  display:flex;
  align-items:center;
  gap:7px;
  padding:0 10px;
  border:1px solid var(--ui-line);
  border-radius:8px;
  background:var(--ui-panel-2);
  color:var(--ui-muted);
  font-size:12px
}
.global-clock{display:flex;align-items:center;gap:7px;color:var(--ui-muted);font-size:11px;white-space:nowrap}
.global-clock b{color:var(--ui-text);font-size:14px}
.theme-switcher{position:relative}
.theme-btn{
  display:flex!important;
  align-items:center;
  gap:6px;
  padding:7px 9px!important;
  border:1px solid var(--ui-line)!important;
  background:var(--ui-panel-2)!important;
  color:var(--ui-text-2)!important;
  border-radius:8px!important
}
.theme-dot{width:9px;height:9px;border-radius:50%;display:inline-block;background:#2f88ff}
.theme-dot.light{background:#c8d6e5;border:1px solid #8ea4b8}
.theme-dot.graphite{background:#687988}
.theme-dot.indigo{background:#7c84ef}
.theme-panel{
  position:absolute;
  top:42px;
  right:0;
  width:166px;
  padding:6px;
  border:1px solid var(--ui-line);
  border-radius:10px;
  background:var(--ui-panel);
  box-shadow:0 14px 34px rgba(0,0,0,.20);
  z-index:100
}
.theme-panel button{
  width:100%;
  display:flex!important;
  align-items:center;
  gap:8px;
  padding:8px!important;
  background:transparent!important;
  color:var(--ui-text-2)!important;
  text-align:left
}
.theme-panel button:hover{background:var(--ui-panel-2)!important}
.theme-swatch{width:16px;height:16px;border-radius:5px;display:inline-block}
.theme-swatch.navy{background:#0a2944}.theme-swatch.light{background:#edf3f8;border:1px solid #b8c6d3}
.theme-swatch.graphite{background:#252d34}.theme-swatch.indigo{background:#303b74}
.top-user{
  display:flex;
  align-items:center;
  gap:8px;
  padding-left:10px;
  border-left:1px solid var(--ui-line)
}
.top-avatar{
  width:31px;height:31px;border-radius:50%;
  display:grid;place-items:center;
  background:var(--ui-primary);color:#fff;font-weight:800
}
.top-user-text{display:flex;flex-direction:column;line-height:1.2}
.top-user-text b{font-size:12px;color:var(--ui-text)}
.top-user-text span{font-size:10px;color:var(--ui-muted);margin-top:2px}
.brand-shell{display:flex;align-items:center;gap:9px}
.brand-logo{
  width:36px;height:36px;border-radius:10px;background:#2087f6;color:#fff;
  display:grid;place-items:center;font-size:21px;font-weight:900;flex:none
}
.brand-copy{display:flex;flex-direction:column;min-width:0}
.brand-cn{font-size:14px;font-weight:800;color:#fff;white-space:nowrap}
.brand-en{font-size:7px;letter-spacing:.08em;color:#8fb5d4;margin-top:2px;white-space:nowrap}
@media(max-width:900px){
  .global-search{display:none}
  .app-global-topbar{margin-left:-14px;margin-right:-14px}
  .global-clock span{display:none}
  .top-user-text b{max-width:75px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}
