:root {
  --bg: #fafbfc; --blue: #4285f4; --green: #34a853; --yellow: #fbbc05; --red: #ea4335;
  --ink: #202124; --muted: #5f6368; --line: #e0e3e7; --pale: #e8f0fe; --card: #fff;
  --shadow: 0 5px 18px rgba(32, 33, 36, .06); --radius: 14px; --sidebar: 248px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.55 Inter, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar); background: #fff; border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; flex-shrink: 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 9px 23px; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; background: conic-gradient(var(--blue) 0 25%, var(--green) 0 50%, var(--yellow) 0 75%, var(--red) 0); padding: 7px; position: relative; }
.brand-mark:after { content: "百"; background: #fff; color: var(--blue); border-radius: 7px; width: 25px; height: 25px; display: grid; place-items: center; font-weight: 800; }
.brand strong { display: block; font-size: 16px; } .brand small { display: block; color: var(--muted); font-size: 11px; }
.nav { display: grid; gap: 3px; } .nav-label { color: #9aa0a6; font-size: 11px; padding: 13px 10px 4px; letter-spacing: .08em; }
.nav button { border: 0; background: transparent; color: var(--muted); text-align: left; padding: 10px; border-radius: 9px; display: flex; align-items: center; gap: 10px; }
.nav button:hover, .nav button.active { background: var(--pale); color: var(--blue); font-weight: 600; } .nav svg { width: 18px; height: 18px; flex: none; }
.side-foot { margin-top: auto; color: #9aa0a6; font-size: 11px; padding: 16px 10px; }
.main { min-width: 0; flex: 1; } .topbar { height: 68px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 26px; position: sticky; top: 0; z-index: 10; }
.search { max-width: 360px; flex: 1; } .search input, .field input, .field select, .field textarea, .filters input, .filters select { width: 100%; border: 1px solid var(--line); border-radius: 9px; background: #fff; padding: 9px 11px; color: var(--ink); outline: 0; }
.search input:focus, .field input:focus, .field select:focus, .field textarea:focus, .filters input:focus, .filters select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--pale); }
.top-spacer { flex: 1; } .warehouse, .icon-btn, .hamb { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 9px 11px; color: var(--ink); }
.icon-btn { width: 38px; height: 38px; padding: 8px; display: grid; place-items: center; } .hamb { display: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--pale); color: var(--blue); display: grid; place-items: center; font-weight: 700; }
.page { max-width: 1660px; margin: auto; padding: 28px; } .page-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 22px; }
.eyebrow { font-size: 11px; color: var(--blue); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.page h1 { font-size: 28px; line-height: 1.2; margin: 5px 0 7px; } .page h2, .page h3 { margin-top: 0; } .sub, .muted { color: var(--muted); } .sub { margin: 0; }
.actions, .filters, .metric-row { display: flex; gap: 9px; flex-wrap: wrap; } .btn { border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); padding: 9px 13px; font-weight: 600; }
.btn:hover { border-color: var(--blue); color: var(--blue); } .btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; } .btn.green { background: var(--green); border-color: var(--green); color: #fff; } .btn.danger { color: var(--red); } .btn:disabled { opacity: .5; cursor: not-allowed; }
.grid { display: grid; gap: 16px; } .kpis { grid-template-columns: repeat(6, minmax(125px, 1fr)); margin-bottom: 16px; } .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.kpi .label { color: var(--muted); } .kpi strong { display: block; font-size: 25px; margin: 8px 0; } .dashboard-grid { grid-template-columns: 2fr 1fr 1fr; } .wide { grid-column: span 2; }
.card-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; } .card-title h3 { font-size: 16px; margin: 0; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 99px; background: #f1f3f4; color: var(--muted); font-size: 12px; white-space: nowrap; }
.badge.success { background: #e6f4ea; color: #137333; } .badge.warn { background: #fef7e0; color: #a15c00; } .badge.danger { background: #fce8e6; color: #b3261e; } .badge.info { background: var(--pale); color: #185abc; }
.chart { height: 190px; display: flex; align-items: end; gap: 10px; border-bottom: 1px solid var(--line); padding: 15px 4px 0; background: linear-gradient(#fff, #f7faff); } .bar { flex: 1; min-height: 18px; border-radius: 6px 6px 0 0; background: var(--blue); position: relative; } .bar span { position: absolute; bottom: -25px; width: 100%; text-align: center; color: var(--muted); font-size: 11px; }
.donut { width: 132px; height: 132px; border-radius: 50%; background: conic-gradient(var(--blue) 0 44%, var(--green) 44% 72%, var(--yellow) 72% 88%, #edf0f2 88%); display: grid; place-items: center; margin: 16px auto; } .donut:after { content: "1,286\A订单"; white-space: pre; text-align: center; display: grid; place-items: center; background: #fff; border-radius: 50%; width: 82px; height: 82px; font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 12px; } .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); margin-right: 4px; }
.progress { height: 7px; background: #edf0f2; border-radius: 99px; overflow: hidden; } .progress i { display: block; height: 100%; background: var(--green); border-radius: inherit; } .stats > div { margin: 17px 0; }
.stat-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; } .table-wrap { overflow: auto; } .table { width: 100%; border-collapse: collapse; min-width: 700px; }
.table th, .table td { text-align: left; padding: 11px 9px; border-bottom: 1px solid #edf0f2; white-space: nowrap; } .table th { font-size: 12px; color: var(--muted); font-weight: 600; } .table tr:hover td { background: #fafcff; }
.module-grid { grid-template-columns: repeat(3, 1fr); } .module-grid .card:first-child { grid-column: span 2; } .mini { flex: 1; min-width: 140px; } .mini strong { display: block; font-size: 21px; margin: 3px 0; }
.portal { background: #eef5ff; border: 1px solid #d8e6ff; border-radius: 16px; padding: 23px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; } .portal h2 { margin: 4px 0; }
.product-grid { grid-template-columns: repeat(4, 1fr); } .product-img { height: 110px; border-radius: 11px; background: #f1f6ff; display: grid; place-items: center; margin-bottom: 12px; } .product-glyph { width: 52px; height: 52px; border-radius: 15px; background: #fff; display: grid; place-items: center; color: var(--blue); font-size: 25px; font-weight: 700; box-shadow: 0 2px 8px #4285f41c; }
.product h3 { font-size: 15px; margin: 8px 0 2px; } .price { font-weight: 800; font-size: 19px; color: var(--green); margin-top: 8px; } .old { text-decoration: line-through; color: var(--muted); font-size: 12px; margin-left: 6px; font-weight: 400; }
.cart { position: fixed; right: 24px; bottom: 24px; background: var(--ink); color: #fff; border: 0; border-radius: 12px; padding: 13px 17px; box-shadow: 0 8px 24px #20212440; z-index: 9; } .cart b { background: var(--green); padding: 2px 7px; border-radius: 99px; margin-left: 4px; }
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; } .flow-step { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fff; min-height: 104px; cursor: pointer; position: relative; transition: border-color .2s, box-shadow .2s, transform .2s; } .flow-step:hover { border-color: var(--blue); box-shadow: var(--shadow); transform: translateY(-1px); } .flow-step strong { display: block; font-size: 13px; margin-top: 7px; } .flow-step small { display: block; color: var(--muted); margin-top: 5px; font-size: 12px; } .flow-index { color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.flow-insight { width: 100%; margin-top: 12px; border: 1px solid #d8e6ff; border-radius: 12px; padding: 13px 15px; background: var(--pale); color: var(--ink); text-align: left; display: flex; align-items: center; gap: 14px; } .flow-insight strong { min-width: 70px; } .flow-insight small { color: var(--muted); } .flow-insight:hover { border-color: var(--blue); }
.sales-flow-grid { display:grid; grid-template-columns:minmax(0,1.7fr) minmax(280px,.8fr); gap:16px; }
.sales-order-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.sales-order-summary .mini { min-width:0; }
.sales-stage-nav { display:flex; gap:8px; overflow-x:auto; padding:2px 2px 8px; scroll-snap-type:x proximity; }
.sales-stage { flex:1 0 150px; min-height:112px; border:1px solid var(--line); border-radius:12px; padding:12px; background:#fff; text-align:left; scroll-snap-align:start; position:relative; }
.sales-stage strong { display:block; margin-top:7px; font-size:13px; }
.sales-stage small { display:block; color:var(--muted); margin-top:5px; }
.sales-stage.current { border-color:var(--blue); background:var(--pale); box-shadow:0 0 0 2px #4285f41c; }
.sales-stage.done { border-color:#b7dfc2; background:#f4fbf6; }
.sales-stage.alert { border-color:#f2b8b5; background:#fff7f6; }
.sales-stage .stage-mark { position:absolute; right:10px; top:10px; font-weight:700; color:var(--green); }
.sales-detail { min-height:360px; }
.sales-detail-head { display:flex; justify-content:space-between; gap:14px; align-items:flex-start; }
.sales-detail-head h2 { margin:3px 0; font-size:22px; }
.sales-detail-meta { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin:18px 0; }
.sales-checklist { display:grid; gap:8px; }
.sales-check { padding:9px 11px; border-radius:9px; background:#f7f9fa; display:flex; justify-content:space-between; gap:10px; }
.sales-check.warn { background:#fff8e8; }
.sales-actions { display:flex; flex-wrap:wrap; gap:9px; margin-top:20px; }
.sales-timeline { max-height:470px; overflow:auto; }
.sales-event { padding:11px 0 11px 16px; border-left:2px solid #dfe5eb; position:relative; }
.sales-event:before { content:""; position:absolute; left:-6px; top:15px; width:8px; height:8px; border-radius:50%; background:var(--blue); }
.sales-event time { display:block; color:var(--muted); font-size:11px; margin-bottom:3px; }
.sales-branch { margin-top:16px; padding:13px; border:1px dashed #c9d2da; border-radius:12px; background:#fcfdff; }
.sales-flow-note { color:var(--muted); font-size:12px; margin-top:20px; }
@media (max-width:900px) { .sales-flow-grid { grid-template-columns:1fr; } .sales-order-summary { grid-template-columns:repeat(2,1fr); } .sales-detail-meta { grid-template-columns:1fr 1fr; } }
@media (max-width:460px) { .sales-order-summary,.sales-detail-meta { grid-template-columns:1fr; } .sales-stage { flex-basis:220px; } }
.timeline { border-left: 2px solid #dfe5eb; margin: 15px 0 15px 8px; padding-left: 18px; } .timeline .event { position: relative; padding-bottom: 14px; } .timeline .event:before { content: ""; position: absolute; left: -25px; top: 5px; width: 9px; height: 9px; border: 3px solid #fff; background: var(--blue); box-shadow: 0 0 0 1px #9bbcf4; border-radius: 50%; }
.warning { border-left: 4px solid var(--yellow); background: #fffaf0; padding: 12px; } .kanban { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; } .kanban-col { background: #f1f3f4; border-radius: 12px; padding: 11px; min-height: 250px; } .task { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 9px; } .task strong { display: block; } .task small { color: var(--muted); }
.route-map { min-height: 300px; border: 1px solid #d7e3f3; border-radius: 12px; background: #f6f9fd; overflow: hidden; } .route-map svg { width: 100%; height: 250px; display: block; } .route-label { font-size: 12px; fill: var(--ink); } .route-line { fill: none; stroke: var(--blue); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 8 7; } .route-node { fill: #fff; stroke: var(--green); stroke-width: 4; }
.modal, .drawer-backdrop { position: fixed; inset: 0; background: #20212466; z-index: 30; } .modal { display: grid; place-items: center; padding: 18px; } .modal-box { background: #fff; width: min(620px, 100%); max-height: 90vh; overflow: auto; border-radius: 16px; padding: 24px; } .drawer { margin-left: auto; width: min(580px, 94vw); height: 100%; overflow: auto; background: #fff; padding: 23px; } .drawer-head { display: flex; justify-content: space-between; align-items: center; } .close { border: 0; background: #f1f3f4; border-radius: 8px; width: 34px; height: 34px; font-size: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; } .field label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; } .field.full { grid-column: 1 / -1; } .modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; } .empty { text-align: center; color: var(--muted); padding: 35px; } .toast { position: fixed; right: 24px; top: 84px; z-index: 50; background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; transform: translateX(150%); transition: transform .2s; } .toast.show { transform: none; } .footer-note { color: #9aa0a6; font-size: 12px; margin-top: 26px; }
@media (max-width: 1180px) { .sidebar { width: 220px; } .kpis { grid-template-columns: repeat(3, 1fr); } .product-grid { grid-template-columns: repeat(3, 1fr); } .dashboard-grid { grid-template-columns: 1fr 1fr; } .wide { grid-column: span 2; } .module-grid { grid-template-columns: 1fr 1fr; } .kanban { grid-template-columns: repeat(3, 1fr); } .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .sidebar { position: fixed; inset: 0 auto 0 -270px; width: 260px; z-index: 25; transition: transform .2s; } .sidebar.open { transform: translateX(270px); } .topbar { padding: 0 14px; } .hamb { display: grid; place-items: center; width: 38px; height: 38px; } .topbar .warehouse, .topbar .portal-switch { display: none; } .page { padding: 18px 14px; } .page-head { display: block; } .actions { margin-top: 13px; } .kpis, .dashboard-grid, .module-grid { grid-template-columns: 1fr 1fr; } .wide { grid-column: span 2; } .product-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } .portal { display: block; } .portal .btn { margin-top: 12px; } .kanban { grid-template-columns: 1fr; } .form-grid { grid-template-columns: 1fr; } .field.full { grid-column: auto; } .search { max-width: none; } .role-select { display: none; } .card { padding: 14px; } }
@media (max-width: 460px) { .kpis, .dashboard-grid, .module-grid, .product-grid { grid-template-columns: 1fr; } .wide { grid-column: auto; } .flow { grid-template-columns: 1fr; } .page h1 { font-size: 24px; } .topbar .search { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
