:root {
  --primary: #2f5597;
  --primary-dark: #24447b;
  --primary-soft: #eef3fb;
  --bg: #f6f8fc;
  --card: #ffffff;
  --text: #1d2939;
  --text-sub: #526078;
  --muted: #8792a6;
  --border: #e3e9f1;
  --border-dark: #d3dce8;
  --green: #17855b;
  --green-soft: #edf8f2;
  --red: #d92d20;
  --red-soft: #fff1f0;
  --amber: #b54708;
  --amber-soft: #fff7e8;
  --gray-soft: #f1f3f6;
  --navy: #101b32;
  --nav-text: #9aa8bd;
  --tracking-green: #07c160;
  --tracking-blue: #10aeff;
  --tracking-red: #fa5151;
  --shadow: 0 2px 8px rgba(30, 55, 90, .045);
  --shadow-lg: 0 18px 48px rgba(23, 43, 77, .16);
  --radius: 10px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; color: var(--text); background: var(--bg); font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

/* 登录页 */
.login-view { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.08fr) minmax(480px, .92fr); background: #fff; position: relative; padding-bottom: 44px; }
.login-brand { background: var(--primary); color: #fff; position: relative; display: flex; align-items: center; justify-content: center; padding: 72px; overflow: hidden; }
.login-brand::before, .login-brand::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; pointer-events: none; }
.login-brand::before { width: 520px; height: 520px; left: -250px; bottom: -230px; }
.login-brand::after { width: 360px; height: 360px; right: -170px; top: -140px; }
.login-brand-inner { width: 100%; max-width: 510px; position: relative; z-index: 1; }
.login-logo { width: 180px; height: auto; display: block; margin-bottom: 70px; }
.brand-kicker, .eyebrow { color: var(--primary); font-size: 11px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; }
.login-brand .brand-kicker { color: #c8d6ef; margin-bottom: 14px; }
.login-brand h1 { font-size: 48px; line-height: 1.25; letter-spacing: 4px; margin: 0 0 20px; font-weight: 650; }
.login-brand-inner > p { margin: 0; font-size: 18px; color: #dce6f6; letter-spacing: 1px; }
.brand-features { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 52px; color: #dce6f6; font-size: 13px; }
.brand-features span { display: inline-flex; align-items: center; gap: 7px; }
.brand-features .icon { width: 16px; height: 16px; color: #a8c4ed; }
.brand-caption { position: absolute; left: 72px; bottom: 48px; color: #aebfdd; font-size: 12px; letter-spacing: .5px; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 60px 48px 90px; background: #fff; }
.login-card { width: 100%; max-width: 400px; }
.login-mobile-logo { display: none; }
.login-card h2 { margin: 10px 0 8px; font-size: 28px; letter-spacing: .5px; }
.login-desc { color: var(--text-sub); margin: 0 0 34px; line-height: 1.7; }
.login-security { color: var(--muted); font-size: 12px; text-align: center; margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 7px; }
.security-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.divider { display: flex; align-items: center; color: var(--muted); font-size: 12px; margin: 28px 0; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--border); flex: 1; }
.divider span { padding: 0 14px; }
.demo-note { text-align: center; color: var(--muted); font-size: 12px; line-height: 1.6; margin: 12px 0 0; }
.login-help { border-top: 1px solid var(--border); padding-top: 22px; margin-top: 32px; color: var(--muted); font-size: 12px; line-height: 1.8; text-align: center; }
.inline-alert { padding: 12px 14px; background: var(--red-soft); color: var(--red); border: 1px solid #ffd2ce; border-radius: 8px; font-size: 13px; line-height: 1.6; margin-top: 18px; }
.site-footer { color: #97a1b2; font-size: 11px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--primary); }
.login-footer { position: absolute; bottom: 18px; left: calc(54% + 24px); right: 24px; display: flex; justify-content: center; gap: 18px; }
.login-footer a { display: inline-flex; align-items: center; gap: 4px; }
.login-footer img { width: 13px; height: 13px; }

/* 通用按钮 */
.btn { border: 1px solid transparent; border-radius: 7px; min-height: 36px; padding: 8px 15px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 13px; font-weight: 500; transition: background .16s, border-color .16s, color .16s, box-shadow .16s; white-space: nowrap; }
.btn:focus-visible, .icon-btn:focus-visible, .nav-item:focus-visible, .text-btn:focus-visible { outline: 3px solid rgba(47,85,151,.2); outline-offset: 2px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); box-shadow: 0 3px 8px rgba(47,85,151,.18); }
.btn-secondary { background: #fff; border-color: var(--border-dark); color: var(--text); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.btn-plain { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.btn-plain:hover { background: #e2eaf7; }
.btn-danger { background: #fff; color: var(--red); border-color: #f1b8b3; }
.btn-danger:hover { background: var(--red-soft); }
.btn-lg { min-height: 46px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-sm { min-height: 30px; padding: 5px 10px; font-size: 12px; }
.btn:disabled { cursor: not-allowed; opacity: .48; box-shadow: none; }
.icon-btn { width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 6px; background: transparent; color: var(--text-sub); }
.icon-btn:hover { background: var(--gray-soft); color: var(--primary); }
.text-btn { border: 0; background: transparent; color: var(--text-sub); padding: 4px; font-size: 12px; }
.text-btn:hover { color: var(--primary); }

/* 应用框架 */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 164px minmax(0, 1fr); grid-template-rows: 44px minmax(calc(100vh - 44px), auto); }
.topbar { grid-column: 1 / -1; height: 44px; background: var(--navy); color: #fff; display: flex; align-items: center; padding: 0 14px; position: sticky; top: 0; z-index: 30; gap: 12px; }
.topbar-brand { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.topbar-home { min-height: 32px; display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; color: #d5dce8; padding: 0; font-size: 12px; }
.topbar-home:hover { color: #fff; }
.topbar-home .icon { width: 14px; height: 14px; }
.topbar-title { position: absolute; left: 50%; transform: translateX(-50%); font-size: 14px; font-weight: 600; letter-spacing: 1px; white-space: nowrap; }
.env-badge { padding: 2px 6px; border-radius: 3px; background: rgba(255,255,255,.1); color: #c5cfdf; font-size: 10px; font-weight: 400; }
.env-badge.online { color: #8ee6bd; background: rgba(7,193,96,.14); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.user-avatar { display: none; }
.user-copy { display: flex; align-items: center; gap: 2px; color: #d5dce8; }
.user-copy strong { font-size: 11px; font-weight: 400; }
.user-copy span { font-size: 10px; color: #aebacd; }
.user-role-text { display: inline-flex; }
.topbar .text-btn { color: #d5dce8; font-size: 11px; margin-left: 8px; }
.topbar .text-btn:hover { color: #fff; }
.mobile-menu-btn { display: none; color: #fff; }
.sidebar { grid-column: 1; background: var(--navy); display: flex; flex-direction: column; min-height: calc(100vh - 44px); position: sticky; top: 44px; height: calc(100vh - 44px); z-index: 20; }
.nav-list { padding: 8px 0 14px; overflow-y: auto; flex: 1; }
.nav-group { color: #66758d; font-size: 10px; font-weight: 400; padding: 14px 16px 6px; }
.nav-group:first-child { padding-top: 4px; }
.nav-item { width: 100%; min-height: 40px; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--nav-text); border-radius: 0; padding: 9px 16px; font-size: 12px; text-align: left; margin: 0; position: relative; }
.nav-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-item.active { background: #12a8bd; color: #fff; font-weight: 500; }
.nav-item.active::before { display: none; }
.nav-item .icon { width: 15px; height: 15px; }
.nav-count { margin-left: auto; min-width: 20px; height: 18px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.08); color: #91a0b6; border-radius: 9px; font-size: 10px; font-weight: 400; }
.nav-item.active .nav-count { color: #fff; background: rgba(255,255,255,.16); }
.nav-count.danger { color: #ffacac; background: rgba(250,81,81,.12); }
.sidebar-foot { margin: 12px 16px; padding: 12px 0 2px; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 9px; }
.sidebar-foot-dot { width: 7px; height: 7px; background: var(--amber); border-radius: 50%; }
.sidebar-foot > div { display: flex; flex-direction: column; gap: 3px; }
.sidebar-foot strong { color: #c5cfdf; font-size: 11px; font-weight: 400; }
.sidebar-foot span:last-child { font-size: 10px; color: #66758d; }
.main-area { grid-column: 2; min-width: 0; display: flex; flex-direction: column; background: #f4f5f7; }
.page-content { padding: 12px 16px 20px; flex: 1; width: 100%; }
.app-footer { padding: 12px 16px 18px; display: flex; justify-content: space-between; gap: 12px; }
.app-footer > div { display: flex; gap: 16px; }
.sidebar-overlay { position: fixed; inset: 44px 0 0; background: rgba(15,23,42,.35); z-index: 19; }

/* 页面基础 */
.breadcrumb { color: var(--muted); font-size: 12px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.breadcrumb .icon { width: 12px; height: 12px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.page-heading h1 { font-size: 22px; margin: 0 0 6px; font-weight: 650; letter-spacing: .3px; }
.page-heading p { color: var(--text-sub); font-size: 12px; margin: 0; line-height: 1.6; }
.page-actions { display: flex; gap: 8px; align-items: center; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { padding: 17px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); }
.card-header h2, .card-header h3 { margin: 0; font-size: 14px; font-weight: 600; }
.card-header p { color: var(--muted); font-size: 11px; margin: 5px 0 0; }
.card-body { padding: 20px; }
.card-link { border: 0; background: transparent; color: var(--primary); font-size: 12px; display: inline-flex; align-items: center; gap: 2px; padding: 4px; }
.card-link .icon { width: 13px; height: 13px; }
.muted { color: var(--muted); }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-variant-numeric: tabular-nums; }
.number { font-variant-numeric: tabular-nums; text-align: right; }

/* 首页 */
.home-page { min-height: calc(100vh - 174px); display: flex; flex-direction: column; }
.home-hero { flex: 1; min-height: 330px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 42px 20px 28px; }
.home-hero img { width: 230px; height: auto; margin-bottom: 24px; }
.home-hero h1 { font-size: 24px; font-weight: 500; margin: 0 0 10px; letter-spacing: 1px; }
.home-hero p { color: var(--muted); margin: 0; font-size: 13px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.quick-card { border: 1px solid var(--border); border-radius: 9px; background: #fff; padding: 18px; text-align: left; display: flex; gap: 13px; align-items: center; transition: border-color .16s, box-shadow .16s; }
.quick-card:hover { border-color: #b4c4df; box-shadow: var(--shadow); }
.quick-icon { width: 40px; height: 40px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.quick-icon.red { color: var(--red); background: var(--red-soft); }
.quick-icon.green { color: var(--green); background: var(--green-soft); }
.quick-copy { display: flex; flex-direction: column; gap: 4px; }
.quick-copy strong { font-size: 13px; font-weight: 600; }
.quick-copy span { color: var(--muted); font-size: 11px; }
.quick-card > .icon { margin-left: auto; width: 14px; color: #a4afbf; }

/* 看板 */
.kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi-card { padding: 17px 18px; min-height: 116px; position: relative; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; color: var(--text-sub); font-size: 12px; }
.kpi-icon { width: 30px; height: 30px; border-radius: 7px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.kpi-icon .icon { width: 16px; height: 16px; }
.kpi-icon.red { color: var(--red); background: var(--red-soft); }
.kpi-icon.green { color: var(--green); background: var(--green-soft); }
.kpi-icon.amber { color: var(--amber); background: var(--amber-soft); }
.kpi-value { font-size: 28px; line-height: 1; font-weight: 650; margin: 14px 0 9px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 13px; margin-left: 2px; color: var(--text-sub); font-weight: 500; }
.kpi-foot { color: var(--muted); font-size: 10px; display: flex; align-items: center; gap: 5px; }
.kpi-foot .up { color: var(--red); }
.kpi-foot .good { color: var(--green); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(270px, .8fr); gap: 16px; margin-bottom: 16px; }
.chart-legend { display: flex; align-items: center; gap: 16px; font-size: 11px; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 2px; background: var(--primary); }
.chart-legend span:last-child i { background: #9db5dc; }
.chart-wrap { position: relative; height: 240px; }
.bar-chart { width: 100%; height: 100%; overflow: visible; }
.chart-grid-line { stroke: #e9edf3; stroke-width: 1; }
.chart-axis-text { fill: #8792a6; font-size: 10px; font-family: inherit; }
.chart-bar { fill: #2f5597; cursor: pointer; transition: opacity .15s; }
.chart-bar.secondary { fill: #afc2e2; }
.chart-bar:hover { opacity: .75; }
.chart-tooltip { position: fixed; z-index: 100; background: #1d2939; color: #fff; border-radius: 6px; padding: 8px 10px; font-size: 11px; line-height: 1.6; pointer-events: none; box-shadow: var(--shadow-lg); }
.status-bars { display: flex; flex-direction: column; gap: 20px; padding-top: 8px; }
.status-bar-top { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 8px; }
.status-bar-top span { color: var(--text-sub); }
.status-bar-top strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.progress-track { height: 6px; background: #f0f2f5; border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; background: var(--primary); }
.progress-fill.green { background: var(--green); }
.progress-fill.red { background: var(--red); }
.progress-fill.amber { background: #d68a1f; }
.progress-fill.gray { background: #a2acba; }
.distribution-total { margin-top: 24px; padding-top: 15px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.distribution-total strong { color: var(--text); font-size: 13px; }

/* 筛选与表格 */
.filter-card { padding: 15px 18px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search-field { min-width: 260px; flex: 1; max-width: 420px; height: 36px; border: 1px solid var(--border-dark); border-radius: 7px; display: flex; align-items: center; gap: 8px; padding: 0 11px; color: var(--muted); background: #fff; }
.search-field:focus-within { border-color: #91a9d0; box-shadow: 0 0 0 3px rgba(47,85,151,.07); }
.search-field .icon { width: 16px; height: 16px; }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; color: var(--text); font-size: 12px; }
.select-field, .form-control { height: 36px; border: 1px solid var(--border-dark); border-radius: 7px; background: #fff; color: var(--text); padding: 0 32px 0 11px; outline: 0; font-size: 12px; }
.select-field:focus, .form-control:focus { border-color: #91a9d0; box-shadow: 0 0 0 3px rgba(47,85,151,.07); }
.filter-count { color: var(--muted); font-size: 11px; margin-left: auto; }
.table-card { overflow: hidden; }
.table-scroll { overflow: auto; width: 100%; }
.data-table { width: 100%; min-width: 1040px; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.data-table th { height: 42px; background: #f8fafc; color: #647189; font-weight: 500; text-align: left; padding: 0 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { height: 54px; padding: 8px 16px; border-bottom: 1px solid #edf0f4; color: #344054; white-space: nowrap; background: #fff; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: #f8faff; }
.data-table .sticky-col { position: sticky; left: 0; z-index: 2; box-shadow: 1px 0 0 var(--border); }
.data-table th.sticky-col { z-index: 3; background: #f8fafc; }
.data-table tbody tr:hover .sticky-col { background: #f8faff; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.sort-button { border: 0; padding: 0; background: transparent; color: inherit; font: inherit; display: inline-flex; align-items: center; gap: 5px; }
.sort-button::after { content: "↕"; color: #a5afbe; font-size: 11px; }
.sort-button.active { color: var(--primary); }
.waybill-link { border: 0; padding: 0; background: transparent; color: var(--primary); font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; font-weight: 600; }
.waybill-link:hover { text-decoration: underline; }
.cell-main { color: var(--text); font-weight: 500; }
.cell-sub { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.route { display: flex; align-items: center; gap: 7px; }
.route .icon { width: 14px; height: 14px; color: #9ba7b8; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 4px; padding: 4px 8px; font-size: 11px; line-height: 1; }
.status-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-badge.blue { color: var(--primary); background: var(--primary-soft); }
.status-badge.green { color: var(--green); background: var(--green-soft); }
.status-badge.red { color: var(--red); background: var(--red-soft); }
.status-badge.amber { color: var(--amber); background: var(--amber-soft); }
.status-badge.gray { color: #667085; background: var(--gray-soft); }
.table-actions { display: flex; gap: 8px; }
.table-actions button { border: 0; background: transparent; padding: 2px 0; color: var(--primary); font-size: 11px; }
.table-actions button:hover { text-decoration: underline; }
.table-actions button.danger { color: var(--red); }
.table-actions button:disabled { color: var(--muted); cursor: not-allowed; text-decoration: none; }
.pagination { padding: 13px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.page-buttons { display: flex; align-items: center; gap: 5px; }
.page-buttons button { min-width: 29px; height: 29px; border: 1px solid var(--border); border-radius: 5px; background: #fff; color: var(--text-sub); font-size: 11px; }
.page-buttons button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.page-buttons button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-buttons button:disabled { opacity: .4; cursor: not-allowed; }
.empty-state { padding: 64px 20px; text-align: center; color: var(--muted); }
.empty-state .icon { width: 38px; height: 38px; color: #b2bccb; margin-bottom: 12px; }
.empty-state h3 { color: var(--text-sub); font-size: 14px; margin: 0 0 8px; font-weight: 500; }
.empty-state p { margin: 0; font-size: 12px; }

/* 物流跟踪查询：沿用示例的统计、筛选和卡片列表结构 */
.page-toolbar { min-height: 30px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.page-toolbar .breadcrumb { margin: 5px 0 0; color: #8a8f99; }
.page-toolbar .page-actions { justify-content: flex-end; }
.view-switch { height: 30px; display: inline-flex; padding: 2px; background: #e9edf2; border-radius: 6px; }
.view-switch button { min-width: 44px; border: 0; border-radius: 4px; background: transparent; color: #7b8492; padding: 0 9px; font-size: 11px; }
.view-switch button.active { background: #fff; color: #26364c; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.page-toolbar .btn { min-height: 30px; padding: 5px 10px; font-size: 11px; border-radius: 5px; }
.page-toolbar .btn .icon { width: 13px; height: 13px; }
.page-toolbar .btn-primary { background: var(--tracking-green); border-color: var(--tracking-green); }
.page-toolbar .btn-primary:hover { background: #06ad56; border-color: #06ad56; }
.region-filter { width: 116px; height: 30px; padding-left: 9px; font-size: 11px; border-radius: 5px; }
.tracking-app { max-width: 520px; margin: 0 auto; min-width: 0; padding-bottom: 8px; }
.tracking-app.table-mode { max-width: 100%; }
.tracking-header { background: var(--tracking-green); color: #fff; padding: 12px 16px 11px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.tracking-header h1 { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.tracking-header h1 .icon { width: 16px; height: 16px; }
.tracking-header .hsub { font-size: 11px; line-height: 1.3; color: rgba(255,255,255,.9); font-weight: 400; margin-top: 4px; }
.tracking-app .summary { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0 4px; }
.tracking-app .s-chip { flex: 1 1 28%; min-width: 84px; background: #fff; border-radius: 8px; padding: 8px 6px; text-align: center; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.tracking-app .s-chip b { display: block; font-size: 18px; line-height: 1.2; font-weight: 600; font-variant-numeric: tabular-nums; }
.tracking-app .s-chip span { display: block; color: #8a8f99; font-size: 11px; margin-top: 2px; }
.tracking-app .search { padding: 8px 0; }
.tracking-search { width: 100%; min-height: 40px; display: flex; align-items: center; gap: 8px; border: 0; border-radius: 8px; padding: 0 12px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.05); color: #8a8f99; }
.tracking-search:focus-within { outline: 2px solid rgba(7,193,96,.18); }
.tracking-search .icon { width: 15px; height: 15px; }
.tracking-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: #1f1f1f; font-size: 13px; }
.tracking-search input::placeholder { color: #9aa0a6; }
.tracking-app .filters { display: flex; gap: 7px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; }
.tracking-app .filters::-webkit-scrollbar { display: none; }
.tracking-app .f { min-height: 30px; border: 0; background: #fff; border-radius: 16px; padding: 6px 12px; font-size: 12px; color: #8a8f99; white-space: nowrap; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.tracking-app .f.active { background: var(--tracking-green); color: #fff; font-weight: 600; }
.tracking-app .f:focus-visible { outline: 2px solid rgba(7,193,96,.25); outline-offset: 1px; }
.tracking-app .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.tracking-app .f.active .dot { background: #fff !important; }
.tracking-app .count { min-height: 21px; padding: 2px 2px 6px; font-size: 11px; color: #8a8f99; }
.tracking-app .list { min-width: 0; }
.tracking-app .row { background: #fff; border-radius: 9px; padding: 10px 12px; margin-bottom: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.05); cursor: pointer; transition: box-shadow .15s; }
.tracking-app .row:hover { box-shadow: 0 2px 8px rgba(31,41,55,.1); }
.tracking-app .row:focus-visible { outline: 2px solid rgba(7,193,96,.35); outline-offset: 1px; }
.tracking-app .r-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tracking-app .wb { min-width: 0; color: #1f1f1f; font-family: "SFMono-Regular", Consolas, monospace; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.tracking-app .subno { color: #8a8f99; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 10px; font-weight: 400; margin-left: 7px; }
.tracking-app .badge { flex: none; border-radius: 12px; padding: 3px 9px; font-size: 11px; line-height: 1.2; font-weight: 500; white-space: nowrap; }
.tracking-app .r-cust { color: #1f1f1f; font-size: 13px; font-weight: 500; line-height: 1.45; margin-top: 4px; overflow-wrap: anywhere; }
.tracking-app .r-meta, .tracking-app .r-date { color: #8a8f99; font-size: 11px; line-height: 1.5; margin-top: 3px; overflow-wrap: anywhere; }
.tracking-app .r-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.tracking-app .r-meta span { display: inline-flex; align-items: center; gap: 3px; }
.tracking-app .r-meta .icon { width: 11px; height: 11px; }
.tracking-app .meta-sep { color: #c2c6cc; }
.tracking-app .empty { padding: 40px 12px; text-align: center; color: #8a8f99; font-size: 12px; }
.tracking-app > .pagination { margin-top: 4px; padding: 10px 0; border-top: 0; }
.tracking-app.table-mode .count { padding-left: 0; }
.tracking-table { overflow: hidden; }

/* 异常与待办 */
.summary-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.summary-item { padding: 16px 18px; display: flex; align-items: center; gap: 13px; }
.summary-item .quick-icon { width: 36px; height: 36px; }
.summary-item strong { display: block; font-size: 22px; line-height: 1; margin-bottom: 6px; }
.summary-item span { font-size: 11px; color: var(--muted); }
.todo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.todo-card { padding: 18px; }
.todo-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.todo-priority { color: var(--red); background: var(--red-soft); padding: 3px 7px; border-radius: 4px; font-size: 10px; }
.todo-time { color: var(--muted); font-size: 10px; }
.todo-card h3 { margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.todo-card > p { margin: 0 0 15px; color: var(--text-sub); font-size: 12px; line-height: 1.7; min-height: 40px; }
.todo-meta { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.todo-meta span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.todo-meta .icon { width: 13px; height: 13px; }
.todo-foot { display: flex; justify-content: space-between; align-items: center; }
.todo-owner { color: var(--text-sub); font-size: 11px; }

/* 接入配置 */
.integration-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .7fr); gap: 16px; }
.config-list { padding: 4px 20px; }
.config-row { min-height: 66px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); }
.config-row:last-child { border-bottom: 0; }
.config-status { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--green-soft); color: var(--green); }
.config-status.off { background: var(--gray-soft); color: var(--muted); }
.config-status .icon { width: 14px; height: 14px; }
.config-copy { flex: 1; min-width: 0; }
.config-copy strong { display: block; font-size: 12px; font-weight: 500; margin-bottom: 4px; }
.config-copy span { color: var(--muted); font-size: 11px; word-break: break-all; }
.config-tag { color: var(--green); background: var(--green-soft); font-size: 10px; padding: 3px 7px; border-radius: 4px; }
.config-tag.off { color: var(--muted); background: var(--gray-soft); }
.callback-box { margin: 0 20px 20px; padding: 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 7px; }
.callback-box label { color: var(--muted); font-size: 11px; display: block; margin-bottom: 8px; }
.callback-value { display: flex; align-items: center; gap: 10px; }
.callback-value code { flex: 1; color: var(--primary); font-size: 11px; word-break: break-all; }
.setup-steps { padding: 8px 20px 20px; counter-reset: steps; }
.setup-step { position: relative; padding: 12px 0 12px 32px; counter-increment: steps; }
.setup-step::before { content: counter(steps); position: absolute; left: 0; top: 12px; width: 20px; height: 20px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; }
.setup-step:not(:last-child)::after { content: ""; position: absolute; left: 9px; top: 34px; bottom: -6px; width: 1px; background: var(--border); }
.setup-step strong { display: block; font-size: 12px; font-weight: 500; margin-bottom: 5px; }
.setup-step p { color: var(--muted); font-size: 11px; line-height: 1.7; margin: 0; }
.security-note { margin: 0 20px 20px; padding: 12px; background: var(--amber-soft); color: #87500f; border-radius: 7px; font-size: 11px; line-height: 1.7; }

/* 弹窗与表单 */
.modal-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(16,24,40,.46); display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { width: min(620px, 100%); max-height: calc(100vh - 48px); background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: modal-in .18s ease-out; }
.modal.modal-lg { width: min(820px, 100%); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.modal-header { padding: 20px 22px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.modal-header h3 { margin: 6px 0 0; font-size: 17px; font-weight: 600; }
.modal-body { padding: 22px; overflow-y: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 9px; padding-top: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { color: var(--text-sub); font-size: 12px; }
.form-group label em { color: var(--red); font-style: normal; margin-left: 3px; }
.form-group .form-control { width: 100%; height: 39px; padding: 0 11px; font-size: 13px; }
textarea.form-control { height: auto; min-height: 96px; resize: vertical; padding: 10px 11px; line-height: 1.6; }
.form-hint { color: var(--muted); font-size: 10px; line-height: 1.6; }
.form-error { color: var(--red); font-size: 11px; margin-top: 12px; padding: 9px 11px; border-radius: 6px; background: var(--red-soft); }
.detail-summary { display: grid; grid-template-columns: 1fr auto; gap: 20px; padding: 16px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 20px; }
.detail-route { display: flex; align-items: center; gap: 14px; font-size: 20px; font-weight: 600; }
.detail-route .icon { color: var(--primary); }
.detail-sub { color: var(--muted); font-size: 11px; margin-top: 8px; }
.detail-progress { min-width: 180px; align-self: center; }
.detail-progress-top { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-sub); margin-bottom: 8px; }
.detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.detail-field label { display: block; color: var(--muted); font-size: 10px; margin-bottom: 6px; }
.detail-field span { font-size: 12px; color: var(--text); }
.exception-callout { padding: 12px 14px; background: var(--red-soft); color: #a3261c; border: 1px solid #ffd4d0; border-radius: 7px; font-size: 12px; line-height: 1.7; margin-bottom: 20px; }
.timeline-title { font-size: 13px; font-weight: 600; margin: 0 0 16px; }
.timeline { position: relative; }
.timeline-item { display: grid; grid-template-columns: 126px 20px minmax(0, 1fr); gap: 10px; min-height: 82px; }
.timeline-time { color: var(--muted); font-size: 10px; padding-top: 2px; text-align: right; font-variant-numeric: tabular-nums; }
.timeline-marker { position: relative; display: flex; justify-content: center; }
.timeline-marker::after { content: ""; position: absolute; width: 1px; top: 15px; bottom: 0; background: var(--border-dark); }
.timeline-item:last-child .timeline-marker::after { display: none; }
.timeline-dot { width: 9px; height: 9px; border-radius: 50%; background: #a7b1c0; margin-top: 3px; position: relative; z-index: 1; box-shadow: 0 0 0 4px #f1f3f6; }
.timeline-item.current .timeline-dot { background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.timeline-item.exception .timeline-dot { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.timeline-content { padding-bottom: 20px; }
.timeline-content strong { display: block; font-size: 12px; font-weight: 600; margin-bottom: 5px; }
.timeline-content span { display: block; color: var(--primary); font-size: 10px; margin-bottom: 5px; }
.timeline-content p { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 0; }
.detail-actions { border-top: 1px solid var(--border); padding-top: 18px; display: flex; justify-content: flex-end; gap: 9px; }
.toast-container { position: fixed; right: 24px; top: 82px; z-index: 120; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { width: min(360px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--border); border-left: 3px solid var(--green); border-radius: 8px; box-shadow: 0 8px 28px rgba(23,43,77,.14); padding: 12px 15px; display: flex; gap: 10px; align-items: flex-start; animation: toast-in .2s ease-out; pointer-events: auto; }
.toast.error { border-left-color: var(--red); }
.toast .icon { width: 17px; height: 17px; color: var(--green); margin-top: 1px; }
.toast.error .icon { color: var(--red); }
.toast strong { display: block; font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.toast p { color: var(--text-sub); margin: 0; font-size: 11px; line-height: 1.6; }
@keyframes toast-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }

/* 响应式 */
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .kpi-card:nth-child(4), .kpi-card:nth-child(5) { min-height: 105px; }
  .topbar-brand { width: auto; }
  .system-status { display: none; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .todo-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .topbar { gap: 16px; }
}
@media (max-width: 960px) {
  .app-shell { grid-template-columns: 150px minmax(0,1fr); }
  .topbar-brand { width: auto; }
  .topbar-brand > span:not(.env-badge) { font-size: 16px; }
  .env-badge { display: none; }
  .global-search { width: min(340px, 38vw); }
  .user-copy, .user-divider { display: none; }
  .dashboard-grid, .integration-grid { grid-template-columns: 1fr; }
  .page-content { padding: 18px; }
  .app-footer { padding-left: 18px; padding-right: 18px; }
  .login-brand { padding: 48px; }
  .login-logo { margin-bottom: 52px; }
  .brand-features { flex-direction: column; gap: 12px; margin-top: 36px; }
}
@media (max-width: 760px) {
  .login-view { display: block; min-height: 100vh; background: var(--bg); padding: 22px 16px 70px; }
  .login-brand { display: none; }
  .login-panel { padding: 28px 0 0; background: transparent; }
  .login-card { background: #fff; max-width: 440px; margin: 0 auto; padding: 28px 22px; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
  .login-mobile-logo { display: block; text-align: center; margin-bottom: 26px; }
  .login-mobile-logo img { width: 112px; }
  .login-card .eyebrow { display: block; text-align: center; }
  .login-card h2 { text-align: center; font-size: 24px; }
  .login-desc { text-align: center; }
  .login-footer { position: absolute; left: 12px; right: 12px; bottom: 16px; flex-direction: column; align-items: center; gap: 5px; }
  .app-shell { display: block; min-height: 100vh; padding-top: 58px; }
  .topbar { height: 58px; padding: 0 12px; position: fixed; left: 0; right: 0; top: 0; gap: 10px; }
  .mobile-menu-btn { display: inline-flex; margin-left: -5px; }
  .topbar-brand { gap: 7px; }
  .topbar-brand > img { width: 44px; }
  .topbar-brand > span:not(.env-badge) { font-size: 15px; letter-spacing: 0; }
  .topbar-title { font-size: 14px; letter-spacing: .5px; }
  .topbar-home span { display: none; }
  .topbar-home { min-width: 22px; justify-content: center; }
  .topbar .text-btn { margin-left: 0; font-size: 11px; }
  .global-search { display: none; }
  .topbar-right { gap: 7px; }
  .user-avatar { width: 30px; height: 30px; }
  .sidebar { position: fixed; left: 0; top: 58px; bottom: 0; width: 236px; height: auto; min-height: 0; transform: translateX(-100%); transition: transform .2s; z-index: 40; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { position: fixed; inset: 58px 0 0; z-index: 39; }
  .main-area { min-height: calc(100vh - 58px); }
  .page-content { padding: 16px 12px; }
  .page-heading { align-items: flex-start; gap: 12px; }
  .page-heading h1 { font-size: 20px; }
  .page-actions { flex-wrap: wrap; justify-content: flex-end; }
  .page-actions .btn .btn-label-mobile { display: none; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .kpi-card { min-height: 108px; padding: 14px; }
  .kpi-card:last-child { grid-column: 1 / -1; }
  .kpi-value { font-size: 25px; }
  .card-header, .card-body { padding-left: 14px; padding-right: 14px; }
  .chart-wrap { height: 210px; }
  .quick-grid, .todo-grid { grid-template-columns: 1fr; }
  .home-hero { min-height: 300px; padding-top: 38px; }
  .home-hero img { width: 185px; }
  .home-hero h1 { font-size: 21px; }
  .summary-strip { gap: 10px; }
  .summary-item { padding: 13px; flex-direction: column; align-items: flex-start; gap: 9px; }
  .summary-item .quick-icon { display: none; }
  .summary-item strong { font-size: 20px; }
  .page-toolbar { flex-direction: column; gap: 7px; margin-bottom: 7px; }
  .page-toolbar .breadcrumb { margin-top: 0; }
  .page-toolbar .page-actions { width: 100%; justify-content: flex-start; gap: 6px; }
  .page-toolbar .region-filter { flex: 1; min-width: 96px; max-width: 130px; }
  .page-toolbar .view-switch { margin-right: auto; }
  .tracking-app { margin-top: 0; }
  .tracking-header { padding: 13px 14px 12px; }
  .tracking-app .summary { padding-top: 9px; }
  .tracking-app .s-chip { min-width: 78px; }
  .tracking-app .row { padding: 11px 12px; }
  .tracking-app .wb { font-size: 13px; }
  .tracking-app .subno { display: block; margin: 3px 0 0; }
  .filter-card { padding: 12px; }
  .search-field { min-width: 100%; max-width: none; }
  .select-field { flex: 1; min-width: 110px; }
  .filter-count { width: 100%; margin-left: 0; }
  .pagination { flex-direction: column; align-items: flex-start; }
  .app-footer { flex-direction: column; align-items: center; text-align: center; padding-bottom: 18px; }
  .app-footer > div { flex-direction: column; gap: 4px; }
  .modal-overlay { padding: 10px; align-items: flex-end; }
  .modal { max-height: calc(100vh - 20px); border-radius: 12px; }
  .modal-header { padding: 17px; }
  .modal-body { padding: 17px; }
  .form-grid { grid-template-columns: 1fr; gap: 13px; }
  .form-group.full { grid-column: auto; }
  .detail-summary { grid-template-columns: 1fr; }
  .detail-route { font-size: 18px; }
  .detail-progress { min-width: 0; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .timeline-item { grid-template-columns: 20px minmax(0,1fr); gap: 10px; }
  .timeline-time { grid-column: 2; text-align: left; order: 2; padding: 0; margin-bottom: 4px; }
  .timeline-marker { grid-row: 1 / 3; }
  .timeline-content { grid-column: 2; order: 3; padding-bottom: 16px; }
  .toast-container { top: 68px; right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
