* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body { font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif; background: #f0f2f5; color: #1a1a1a; display: flex; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
.sidebar { width: 220px; background: linear-gradient(180deg, #0d8a3c 0%, #0a5f2a 100%); color: #fff; display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; transition: width .3s; }
.sidebar.collapsed { width: 60px; }
.sb-brand { padding: 20px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255,255,255,.15); }
.sb-logo { font-size: 32px; }
.sb-title { font-size: 16px; font-weight: 700; line-height: 1.3; }
.sb-title span { font-size: 11px; opacity: .7; }
.sidebar.collapsed .sb-title { display: none; }
.sb-nav { flex: 1; padding: 12px 8px; overflow-y: auto; }
.sb-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; font-size: 14px; cursor: pointer; transition: background .2s; }
.sb-item:hover { background: rgba(255,255,255,.15); }
.sb-item.active { background: rgba(255,255,255,.25); font-weight: 600; }
.sb-icon { font-size: 18px; }
.sidebar.collapsed .sb-icon { font-size: 22px; }
.sidebar.collapsed .sb-item span:not(.sb-icon) { display: none; }
.sb-footer { padding: 16px; border-top: 1px solid rgba(255,255,255,.15); }
.sb-user { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.sb-avatar { font-size: 28px; }
.sb-user span { font-size: 11px; opacity: .7; }
.sidebar.collapsed .sb-user div:last-child { display: none; }
.sidebar.collapsed .sb-brand { justify-content: center; }
.main { flex: 1; margin-left: 220px; transition: margin-left .3s; }
.sidebar.collapsed ~ .main { margin-left: 60px; }
.topbar { background: #fff; padding: 14px 24px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 50; }
.topbar-toggle { font-size: 20px; background: none; border: none; cursor: pointer; color: #666; }
.topbar-title { font-size: 18px; font-weight: 700; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar-date { font-size: 13px; color: #888; }
.topbar-badge { font-size: 12px; padding: 3px 8px; border-radius: 10px; }
.topbar-badge.green { background: #e6f9ee; color: #0a5f2a; }
.tab-content { display: none; padding: 24px; }
.tab-content.active { display: block; }
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi-row.mini { gap: 12px; }
.kpi-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.kpi-card.mini { padding: 14px; }
.kpi-icon { font-size: 28px; margin-bottom: 8px; }
.kpi-val { font-size: 28px; font-weight: 800; color: #0d8a3c; }
.kpi-card.mini .kpi-val { font-size: 22px; }
.kpi-unit { font-size: 14px; font-weight: 400; }
.kpi-label { font-size: 13px; color: #888; margin-top: 4px; }
.kpi-label.red { color: #e5670a; }
.kpi-change { font-size: 12px; margin-top: 6px; }
.kpi-change.up { color: #0d8a3c; }
.kpi-change.down { color: #888; }
.kpi-change.warn { color: #e5670a; }
.dual-row { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; }
.panel { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel-head h3 { font-size: 16px; font-weight: 700; }
.chart-bar { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: flex; align-items: center; gap: 8px; }
.bar-label { font-size: 12px; color: #888; width: 40px; text-align: right; }
.bar-track { flex: 1; height: 28px; background: #f0f2f5; border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; font-size: 11px; color: #fff; font-weight: 600; white-space: nowrap; min-width: 80px; }
.bar-fill.green { background: linear-gradient(90deg, #0d8a3c, #0aaf4a); }
.alert-list { display: flex; flex-direction: column; gap: 10px; }
.alert-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #f8f9fa; border-radius: 8px; font-size: 13px; }
.alert-dot { width: 8px; height: 8px; border-radius: 50%; }
.alert-dot.red { background: #ef4444; }
.alert-dot.warn { background: #f59e0b; }
.alert-dot.ok { background: #0d8a3c; }
.alert-val { font-weight: 600; margin-left: auto; font-size: 12px; }
.alert-item.red { background: #fef2f2; }
.alert-item.warn { background: #fef9ee; }
.btn-sm { background: #0d8a3c; color: #fff; border: none; padding: 6px 14px; border-radius: 8px; font-size: 13px; cursor: pointer; transition: background .2s; }
.btn-sm:hover { background: #0aaf4a; }
.filter-row { display: flex; gap: 10px; align-items: center; }
.sel-sm { padding: 6px 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; background: #fff; }
.data-table { width: 100%; background: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.04); overflow: hidden; border-collapse: separate; border-spacing: 0; }
.data-table th { background: #f8f9fa; padding: 12px 14px; font-size: 13px; font-weight: 600; color: #666; text-align: left; border-bottom: 1px solid #e5e7eb; }
.data-table td { padding: 10px 14px; font-size: 13px; border-bottom: 1px solid #f0f2f5; }
.data-table tr:hover td { background: #f8f9fa; }
.status-badge { font-size: 12px; padding: 3px 8px; border-radius: 10px; font-weight: 600; }
.status-badge.green { background: #e6f9ee; color: #0a5f2a; }
.status-badge.warn { background: #fff3e6; color: #e5670a; }
.status-badge.red { background: #fef2f2; color: #dc2626; }
.status-badge.blue { background: #eff6ff; color: #2563eb; }
.status-badge.purple { background: #f3e8ff; color: #7c3aed; }
.status-badge.gray { background: #f3f4f6; color: #6b7280; }
.star-badge { font-size: 11px; }
.star-badge.gold { color: #f59e0b; }
.tbl-link { color: #0d8a3c; font-weight: 600; cursor: pointer; }
.tbl-link:hover { color: #0aaf4a; }
.text-red { color: #dc2626; font-weight: 600; }
.delivery-list { display: flex; flex-direction: column; gap: 16px; }
.delivery-card { background: #fff; border-radius: 12px; padding: 16px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.dl-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dl-id { font-size: 14px; font-weight: 700; }
.dl-route { display: flex; gap: 8px; margin-bottom: 12px; }
.dl-step { flex: 1; text-align: center; padding: 8px; background: #f0f2f5; border-radius: 8px; font-size: 12px; }
.dl-step.done { background: #e6f9ee; color: #0a5f2a; }
.dl-step.current { background: #eff6ff; color: #2563eb; font-weight: 600; }
.dl-info { display: flex; gap: 16px; font-size: 13px; color: #888; }
.price-list { display: flex; flex-direction: column; gap: 12px; }
.price-item { display: flex; justify-content: space-between; padding: 8px 12px; background: #f8f9fa; border-radius: 8px; font-size: 13px; }
.price-up { color: #dc2626; font-weight: 600; }
.price-down { color: #0d8a3c; font-weight: 600; }
.price-stable { color: #888; }
@media (max-width: 1024px) {
  .sidebar { width: 60px; }
  .sidebar .sb-title, .sidebar .sb-item span:not(.sb-icon), .sidebar .sb-user div:last-child { display: none; }
  .sidebar .sb-icon { font-size: 22px; }
  .sidebar .sb-brand { justify-content: center; }
  .main { margin-left: 60px; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .dual-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { position: relative; width: 100%; flex-direction: row; height: auto; }
  .main { margin-left: 0; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .dl-route { flex-wrap: wrap; }
  .dl-info { flex-wrap: wrap; }
}
