/* 2.8.3 界面精修：保留原蓝白配色与全部操作，只收敛视觉——
   中文系统字体、表格化数字、去掉装饰图标块/阴影/眉题、统一圆角与密度。最后加载，覆盖此前各版本样式。 */
:root{
  --tx-r:6px;--tx-r-lg:8px;
  --tx-line:#e3e8f0;--tx-line-strong:#d5dce7;
  --tx-ink:#1f2b3d;--tx-ink-2:#4a586c;--tx-muted:#6f7c90;
  --tx-blue:#2f62d6;--tx-blue-soft:#edf3ff;--tx-canvas:#f4f6f9;
  --tx-font:"PingFang SC","Microsoft YaHei","Noto Sans SC","Hiragino Sans GB",-apple-system,"Segoe UI",sans-serif;
}
html body{font-family:var(--tx-font)!important;color:var(--tx-ink);background:var(--tx-canvas);letter-spacing:0;-webkit-font-smoothing:antialiased}
body button,body input,body select,body textarea{font-family:inherit!important}
body strong,body b,body td,body .badge,body .metric strong{font-variant-numeric:tabular-nums}

/* ---------- 页面标题：去掉英文眉题、日期和口号式问候 ---------- */
body .page-heading .eyebrow,body .page-heading>.hint,body .page-heading>span.hint{display:none!important}
body .page-heading{align-items:flex-end;margin-bottom:18px!important;padding-bottom:0!important}
body .page-heading h1,body .dashboard-heading h1{font-size:22px!important;font-weight:600!important;letter-spacing:0!important;line-height:1.3!important;margin:0!important}
body .page-heading .sub{font-size:13px!important;color:var(--tx-muted)!important;margin:4px 0 0!important;max-width:720px}
body .dashboard-heading>div>p{display:none!important}
body .dashboard-heading{margin-bottom:16px!important;align-items:center!important}

/* ---------- 指标：卡片阵列改成一条带分隔线的数据条 ---------- */
body .tx-metric-glyph,body .metric .tx-has-icon.tx-metric-glyph,body .metric>svg{display:none!important}
body .metrics{gap:0!important;background:#fff!important;border:1px solid var(--tx-line)!important;border-radius:var(--tx-r-lg)!important;overflow:hidden!important;box-shadow:none!important;margin-bottom:18px!important}
body .metrics .metric{border:0!important;border-right:1px solid var(--tx-line)!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;padding:14px 18px!important;min-height:0!important}
body .metrics .metric:last-child{border-right:0!important}
body .metric>span:first-child{font-size:13px!important;color:var(--tx-muted)!important;font-weight:400!important}
body .metric strong{font-size:24px!important;font-weight:600!important;letter-spacing:0!important;line-height:1.35!important;margin:2px 0!important;display:block}
body .metric small{font-size:12px!important;color:var(--tx-muted)!important}
body .metric:hover{transform:none!important;box-shadow:none!important;background:#fafbfd!important}

/* ---------- 卡片：去阴影、统一边框与圆角 ---------- */
body .card,body section.card,body .panel.card,body .metric-card{border-radius:var(--tx-r-lg)!important;box-shadow:none!important;border:1px solid var(--tx-line)!important}
body .card:hover{box-shadow:none!important;transform:none!important}
body .card-head{padding:14px 18px!important;border-bottom:1px solid var(--tx-line)!important;min-height:0!important}
body .card-head h2,body .card h2,body .card h3{font-size:15px!important;font-weight:600!important;letter-spacing:0!important}
body .card-head .sub,body .card .sub{font-size:12.5px!important;color:var(--tx-muted)!important}
body .card-body{padding:16px 18px!important}

/* ---------- 按钮与筛选 ---------- */
body button,body .btn{border-radius:var(--tx-r)!important;box-shadow:none!important;font-weight:500;letter-spacing:0!important}
body button.primary,body .btn-primary{background:var(--tx-blue)!important;border-color:var(--tx-blue)!important}
body button.primary:hover{background:#2754bb!important}
body button.secondary{border:1px solid var(--tx-line-strong)!important;background:#fff!important;color:var(--tx-ink)!important}
body button.secondary:hover{border-color:#b9c4d6!important;background:#f8fafd!important}
body button:hover{transform:none!important}
body .chip,body button.chip{border-radius:4px!important;font-size:13px!important}
body .chip.active{background:var(--tx-blue-soft)!important;color:var(--tx-blue)!important;font-weight:600!important}
body input,body select,body textarea{border-radius:var(--tx-r)!important;box-shadow:none!important}
body .badge,body .mini-tag,body .status-pill{border-radius:4px!important;font-weight:500!important;letter-spacing:0!important}

/* ---------- 表格：更紧凑、表头更轻 ---------- */
body table th{font-size:12px!important;font-weight:500!important;color:var(--tx-muted)!important;text-transform:none!important;letter-spacing:0!important;background:#fafbfc!important;padding-top:9px!important;padding-bottom:9px!important}
body table td{padding-top:10px!important;padding-bottom:10px!important;border-color:#edf0f5!important}
body table tbody tr:hover td{background:#f7f9fc!important}
body .pager{border-radius:0 0 var(--tx-r-lg) var(--tx-r-lg)!important;background:#fff!important}

/* ---------- 侧栏与顶栏 ---------- */
body .sidebar .brand{padding-bottom:14px!important;margin-bottom:6px!important}
body .sidebar .brand img{width:30px!important;height:30px!important}
body .sidebar .brand b{font-size:16px!important;letter-spacing:1px!important}
body .sidebar .brand small{font-size:10px!important;letter-spacing:1px!important;opacity:.7}
body .sidebar nav>button,body .sidebar .nav-group>summary{min-height:38px!important;height:auto!important;padding-top:8px!important;padding-bottom:8px!important;border-radius:var(--tx-r)!important;font-size:14px!important}
body .sidebar .nav-children button{min-height:34px!important;height:auto!important;padding-top:6px!important;padding-bottom:6px!important;border-radius:var(--tx-r)!important;font-size:13px!important}
body .sidebar nav button.active{background:var(--tx-blue-soft)!important;color:var(--tx-blue)!important;font-weight:600!important}
body .sidebar .nav-group{border:0!important;margin:0!important}
body .sidebar-foot .version{font-size:12px!important}
body .topbar{box-shadow:none!important;border-bottom:1px solid var(--tx-line)!important}
body .topbar button,body .topbar input{height:36px!important;min-height:36px!important}

/* ---------- 弹窗 ---------- */
body dialog,body .modal-card,body .tx-support-dialog{border-radius:10px!important;box-shadow:0 12px 40px #1b2a4224!important}

/* ---------- 客服悬浮按钮：更小、不抢眼 ---------- */
body button.tx-support-fab{padding:8px 13px!important;min-height:38px!important;font-size:13px!important;box-shadow:0 2px 10px #1b2a421a!important;border-color:var(--tx-line-strong)!important}

/* ---------- 手机 ---------- */
@media(max-width:760px){
  body .metrics{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body .metrics .metric{border-right:1px solid var(--tx-line)!important;border-bottom:1px solid var(--tx-line)!important}
  body .metrics .metric:nth-child(2n){border-right:0!important}
  body .metric strong{font-size:20px!important}
  body .page-heading h1,body .dashboard-heading h1{font-size:20px!important}
}
@media (prefers-reduced-motion:no-preference){body .card,body button,body .metric{transition:background-color .15s,border-color .15s,color .15s!important}}

/* ---------- 第二轮：顶栏、工具条、链接与细节 ---------- */
/* 没有打开的工单时，不再占一整行显示空的“工单任务 0” */
body #taskbar:has(.task-empty){display:none!important}
body button,body .btn,body .chip{font-weight:500!important}
body button.primary,body .chip.active{font-weight:600!important}
body .topbar{height:60px!important}
body .topbar input{font-size:13.5px!important}
body .toolbar{padding:12px 18px!important;gap:10px!important}
body .search-box input,body .toolbar input,body .toolbar select{height:36px!important;min-height:36px!important;font-size:14px!important}
/* 2.8.8：固定高度的下拉框去掉旧版上下 11px 内边距，否则文字被裁切（卡密中心、财务筛选） */
body .toolbar select,body .search-box select,body form.toolbar select{padding-top:0!important;padding-bottom:0!important;line-height:34px!important;padding-right:30px!important}
body .search-box button,body .toolbar button{height:36px!important;min-height:36px!important;padding-top:0!important;padding-bottom:0!important}
body .order-date-filter{padding:8px 18px!important;background:#fff!important;border-bottom:1px solid var(--tx-line)!important}
body .order-date-filter .filter-label{background:transparent!important;color:var(--tx-muted)!important;padding-left:0!important}
body .attention-count{display:inline!important;min-width:0!important;min-height:0!important;padding:0!important;background:transparent!important;border-radius:0!important}
body .attention-count.pending{background:transparent!important;font-weight:600!important}
/* 表格里的机型链接：去掉粗下划线，悬停再提示 */
body td a,body td .link,body td button.link{text-decoration:none!important;color:var(--tx-ink)!important;font-weight:500!important}
body td a:hover,body td .link:hover{color:var(--tx-blue)!important;text-decoration:underline!important}
body td a[href*="查看"],body td .row-link,body td .view-link{color:var(--tx-blue)!important}
/* 侧栏子菜单：图标与文字留出间距 */
body .sidebar .nav-children button{display:flex!important;align-items:center!important;gap:8px!important}
body .sidebar .nav-children button svg,body .sidebar .nav-children button .tx-lucide{width:15px!important;height:15px!important;flex:none;opacity:.75}
body .sidebar .nav-children{border-left-color:var(--tx-line)!important}
body .metric strong.attention-count{display:block!important;width:auto!important;text-align:left!important}
body .metrics .metric:after,body .metrics .metric:before{display:none!important}

/* ---------- 2.8.4：建单弹窗 ---------- */
body #modalBody .type-select:has([data-type]){grid-template-columns:repeat(3,minmax(0,1fr))!important}
body #modalBody .type-option{padding:12px 14px!important;border-radius:var(--tx-r-lg)!important;box-shadow:none!important}
body #modalBody .type-option.active{border-color:var(--tx-blue)!important;background:var(--tx-blue-soft)!important}
body #modalBody .type-option b{font-size:15px!important}
body #modalBody .fields{margin-bottom:14px!important;row-gap:14px!important}
body #modalBody label{display:flex;flex-direction:column;gap:6px}
body #modalBody .lookup-cell{display:flex!important;align-items:flex-end!important;padding-bottom:2px}
@media(max-width:640px){body #modalBody .type-select:has([data-type]){grid-template-columns:1fr!important}}
body [data-status].notice:empty{display:none!important}

/* ---------- 2.8.8：服务码管理工具栏两行排布、待处理提醒 ---------- */
body .service-toolbar{display:grid!important;grid-template-columns:1fr;gap:12px!important}
body .service-toolbar-actions,body .service-toolbar-filters{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
body .service-toolbar-actions #serviceScript{margin-left:auto}
body .service-toolbar-filters #serviceSearchForm{flex:1 1 320px;max-width:460px}
body .service-toolbar-filters select{flex:0 0 170px!important;min-width:0!important;width:170px!important}
body .service-attention{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 16px 0;padding:10px 14px;border-radius:var(--tx-r);background:#fff6e6;border:1px solid #f3d9a4;color:#7a4a00;font-size:13.5px}
body .service-attention b{font-variant-numeric:tabular-nums}
@media(max-width:700px){body .service-toolbar-filters select{flex:1 1 140px!important;width:auto!important}body .service-toolbar-actions #serviceScript{margin-left:0}body .service-attention{flex-direction:column;align-items:flex-start}}

/* ---------- 2.8.8：服务连接页 ---------- */
/* 宽屏两栏瀑布排布，页面长度约减半；按钮统一按内容宽度，靠左对齐 */
@media(min-width:1180px){
  body[data-route=service_connections] .settings-grid{display:block!important;columns:2;column-gap:20px}
  body[data-route=service_connections] .settings-grid>.card{break-inside:avoid;display:inline-block;width:100%;margin:0 0 20px!important}
}
body[data-route=service_connections] .settings-grid .card-body button,body[data-route=service_connections] .settings-grid form>button{width:auto!important;min-width:0!important;max-width:100%}
body[data-route=service_connections] .settings-grid fieldset{border:1px solid var(--tx-line)!important;border-radius:var(--tx-r-lg)!important;padding:12px 14px!important;margin:0 0 14px!important}
body[data-route=service_connections] .settings-grid legend{font-size:13px!important;font-weight:600!important;color:var(--tx-ink-2)!important;padding:0 6px!important}

/* ---------- 2.8.8：备份检查页 ---------- */
body .tx-audit-layout-head{margin-bottom:16px!important}
body .tx-audit-step3{margin:0 0 4px;font-size:15px;font-weight:600;flex-basis:100%}
body details.tx-audit-config{padding:0!important;margin-top:8px}
body details.tx-audit-config>summary{padding:14px 18px;font-size:15px;font-weight:600;cursor:pointer;color:var(--tx-ink)}
body details.tx-audit-config>.tx-audit-config-body{padding:0 18px 18px;display:grid;gap:14px}
body details.tx-audit-config>.tx-audit-config-body>section{margin:0!important;border:1px solid var(--tx-line)!important;background:#fbfcfe!important}

/* ---------- 2.8.8：统一操作记录 ---------- */
body .tx-audit-tools{display:flex;flex-wrap:wrap;align-items:center;gap:12px 18px;margin-bottom:12px}
body .tx-audit-tools .search-box{flex:1 1 320px;max-width:480px;margin:0}
body .tx-audit-login-toggle{display:inline-flex;align-items:center;gap:6px;font-size:13.5px;color:var(--tx-ink-2);white-space:nowrap}
body .tx-audit-login-toggle input{width:16px;height:16px;min-height:0}
body .tx-audit-tools label.tx-audit-login-toggle{display:inline-flex!important;flex-direction:row!important;align-items:center!important;gap:6px!important;margin:0!important}
body .tx-audit-tools label.tx-audit-login-toggle input{width:16px!important;height:16px!important;min-height:0!important;margin:0!important;flex:none}
body[data-route=service_connections] .settings-grid button{justify-self:start}
