/* 9webs WMS — 样式 */

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: #f0f2f5; color: #1f1f1f; }

/* Layout */
.wms-layout { display: flex; min-height: 100vh; }
.wms-sidebar { width: 220px; background: #001529; color: #fff; flex-shrink: 0; display: flex; flex-direction: column; }
.wms-main { flex: 1; display: flex; flex-direction: column; overflow-x: hidden; }

/* Sidebar */
.sidebar-logo { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); font-size: 16px; font-weight: 600; }
.sidebar-nav { flex: 1; padding: 8px 0; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 20px; color: rgba(255,255,255,0.65); text-decoration: none; font-size: 14px; transition: all 0.2s; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-item.active { color: #fff; background: #1677ff; }
.nav-icon { font-size: 16px; width: 20px; text-align: center; }

/* Header */
.wms-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; background: #fff; border-bottom: 1px solid #e8e8e8; }
.wms-header h2 { font-size: 18px; font-weight: 600; }
.header-actions { display: flex; gap: 8px; }
.header-badge { padding: 4px 12px; background: #f0f2f5; border-radius: 4px; font-size: 13px; color: #555; }

/* Content */
.wms-content { padding: 24px; }

/* Dashboard Cards */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.stat-card .label { font-size: 13px; color: #888; margin-bottom: 8px; }
.stat-card .value { font-size: 28px; font-weight: 700; color: #1677ff; }
.stat-card.warning .value { color: #fa8c16; }
.stat-card.danger .value { color: #ff4d4f; }
.stat-card.success .value { color: #52c41a; }

/* Charts */
.chart-row { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 24px; }
.chart-box { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.chart-box.full { grid-column: 1 / -1; }
.chart-box h4 { font-size: 15px; margin-bottom: 16px; color: #333; }
.chart-canvas { width: 100%; height: 300px; }

/* Tables */
.data-table { width: 100%; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.data-table table { width: 100%; border-collapse: collapse; }
.data-table th { background: #fafafa; padding: 12px 16px; text-align: left; font-size: 13px; font-weight: 600; color: #555; border-bottom: 1px solid #e8e8e8; white-space: nowrap; }
.data-table td { padding: 10px 16px; font-size: 13px; color: #333; border-bottom: 1px solid #f0f0f0; }
.data-table tr:hover { background: #fafafa; }

/* Status tags */
.tag { display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.tag-pending { background: #fff7e6; color: #fa8c16; border: 1px solid #ffd591; }
.tag-processing { background: #e6f7ff; color: #1677ff; border: 1px solid #91d5ff; }
.tag-completed { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.tag-cancelled { background: #fff1f0; color: #ff4d4f; border: 1px solid #ffa39e; }
.tag-exception { background: #fff1f0; color: #ff4d4f; border: 1px solid #ffa39e; }
.tag-credit-pending { background: #fff7e6; color: #d48806; }
.tag-credit-approved { background: #f6ffed; color: #389e0d; }
.tag-credit-rejected { background: #fff1f0; color: #cf1322; }

/* Filter tabs */
.filter-tabs { display: flex; gap: 0; margin-bottom: 16px; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.filter-tabs a { padding: 10px 18px; text-decoration: none; color: #555; font-size: 13px; border-right: 1px solid #f0f0f0; transition: all 0.2s; }
.filter-tabs a:hover { background: #f0f2f5; }
.filter-tabs a.active { background: #1677ff; color: #fff; }

/* Forms */
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input, .inline-form select { padding: 6px 12px; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 13px; outline: none; }
.inline-form input:focus, .inline-form select:focus { border-color: #1677ff; box-shadow: 0 0 0 2px rgba(22,119,255,0.1); }

.btn { padding: 6px 16px; border: none; border-radius: 6px; font-size: 13px; cursor: pointer; font-weight: 500; transition: all 0.2s; }
.btn-primary { background: #1677ff; color: #fff; }
.btn-primary:hover { background: #4096ff; }
.btn-success { background: #52c41a; color: #fff; }
.btn-danger { background: #ff4d4f; color: #fff; }
.btn-text { background: none; color: #1677ff; padding: 4px 8px; }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }

/* Modal */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1000; align-items: center; justify-content: center; }
.modal-overlay.show { display: flex; }
.modal-box { background: #fff; border-radius: 12px; padding: 24px; width: 500px; max-width: 90vw; box-shadow: 0 6px 30px rgba(0,0,0,0.15); }
.modal-box h3 { margin-bottom: 20px; font-size: 16px; }
.modal-box .form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.modal-box .form-row label { font-size: 13px; color: #555; font-weight: 500; }
.modal-box .form-row input, .modal-box .form-row select { padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

@media (max-width: 768px) {
    .wms-sidebar { width: 60px; }
    .sidebar-logo span, .nav-item span:last-child { display: none; }
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
    .chart-row { grid-template-columns: 1fr; }
}
