/* 供销集市管理后台样式 */
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background:#f5f6fa; color:#333; }
a { text-decoration:none; color:inherit; }

/* 登录页 */
.login-page { min-height:100vh; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg,#667eea,#764ba2); }
.login-box { background:#fff; border-radius:16px; padding:48px 40px; width:400px; box-shadow:0 20px 60px rgba(0,0,0,.2); text-align:center; }
.login-box h1 { font-size:28px; margin-bottom:8px; }
.login-box .subtitle { color:#999; margin-bottom:32px; }
.form-group { margin-bottom:16px; }
.form-group input { width:100%; padding:12px 16px; border:1px solid #ddd; border-radius:8px; font-size:15px; outline:none; transition:border .2s; }
.form-group input:focus { border-color:#667eea; }

/* 按钮 */
.btn { padding:10px 20px; border:none; border-radius:8px; cursor:pointer; font-size:14px; transition:all .2s; }
.btn-primary { background:#667eea; color:#fff; }
.btn-primary:hover { background:#5a6fd6; }
.btn-block { width:100%; padding:14px; font-size:16px; }
.btn-sm { padding:6px 14px; font-size:13px; }
.btn-danger { background:#e74c3c; color:#fff; }
.btn-danger:hover { background:#c0392b; }
.btn-success { background:#27ae60; color:#fff; }
.btn-success:hover { background:#219a52; }
.btn-warning { background:#f39c12; color:#fff; }
.btn-warning:hover { background:#d68910; }
.btn-outline { background:transparent; border:1px solid #ddd; color:#666; }
.btn-outline:hover { border-color:#667eea; color:#667eea; }
.btn-xs { padding:4px 10px; font-size:12px; }
.msg { color:#e74c3c; margin-top:12px; font-size:13px; }

/* 布局 */
.sidebar { position:fixed; left:0; top:0; bottom:0; width:220px; background:#fff; border-right:1px solid #e8e8e8; display:flex; flex-direction:column; z-index:100; }
.sidebar-header { padding:24px 20px; border-bottom:1px solid #eee; }
.sidebar-header h2 { font-size:18px; }
.role-tag { display:inline-block; background:#667eea; color:#fff; padding:2px 8px; border-radius:4px; font-size:11px; margin-top:6px; }
.sidebar nav { flex:1; padding:12px 0; overflow-y:auto; }
.nav-item { display:block; padding:12px 20px; color:#666; font-size:14px; transition:all .15s; }
.nav-item:hover { background:#f5f6fa; color:#333; }
.nav-item.active { background:#f0f0ff; color:#667eea; font-weight:600; border-right:3px solid #667eea; }
.sidebar-footer { padding:16px 20px; border-top:1px solid #eee; }

.main-content { margin-left:220px; min-height:100vh; }
.topbar { background:#fff; padding:16px 24px; border-bottom:1px solid #eee; display:flex; justify-content:space-between; align-items:center; position:sticky; top:0; z-index:50; }
#pageTitle { font-size:18px; font-weight:600; }
#adminName { color:#999; font-size:13px; }
.content { padding:24px; }

/* 统计卡片 */
.stat-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:16px; margin-bottom:24px; }
.stat-card { background:#fff; border-radius:12px; padding:20px; box-shadow:0 2px 8px rgba(0,0,0,.04); }
.stat-card .label { color:#999; font-size:13px; margin-bottom:8px; }
.stat-card .value { font-size:28px; font-weight:700; color:#333; }
.stat-card .value.blue { color:#667eea; }
.stat-card .value.green { color:#27ae60; }
.stat-card .value.orange { color:#f39c12; }
.stat-card .value.red { color:#e74c3c; }

/* 表格 */
.table-wrap { background:#fff; border-radius:12px; box-shadow:0 2px 8px rgba(0,0,0,.04); overflow:hidden; }
.table-header { padding:16px 20px; display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid #f0f0f0; }
.table-header h3 { font-size:16px; }
.toolbar { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.toolbar input, .toolbar select { padding:8px 12px; border:1px solid #ddd; border-radius:6px; font-size:13px; outline:none; }
.toolbar input:focus, .toolbar select:focus { border-color:#667eea; }

table { width:100%; border-collapse:collapse; }
th { background:#fafafa; padding:12px 16px; text-align:left; font-size:13px; color:#999; font-weight:600; border-bottom:1px solid #eee; }
td { padding:12px 16px; border-bottom:1px solid #f5f5f5; font-size:13px; }
tr:hover { background:#fafafa; }
.badge { display:inline-block; padding:3px 10px; border-radius:12px; font-size:12px; }
.badge-green { background:#e8f8f0; color:#27ae60; }
.badge-yellow { background:#fef9e7; color:#f39c12; }
.badge-red { background:#fdedec; color:#e74c3c; }
.badge-gray { background:#eee; color:#999; }
.badge-blue { background:#eaf2fd; color:#667eea; }

/* 分页 */
.pagination { padding:16px 20px; display:flex; justify-content:center; gap:4px; }
.page-btn { padding:6px 12px; border:1px solid #ddd; border-radius:6px; background:#fff; cursor:pointer; font-size:13px; }
.page-btn.active { background:#667eea; color:#fff; border-color:#667eea; }
.page-btn:hover { border-color:#667eea; }

/* 模态框 */
.modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,.4); display:flex; align-items:center; justify-content:center; z-index:200; }
.modal { background:#fff; border-radius:12px; width:520px; max-width:90vw; max-height:85vh; overflow-y:auto; }
.modal-header { padding:20px 24px; border-bottom:1px solid #eee; display:flex; justify-content:space-between; align-items:center; }
.modal-header h3 { font-size:16px; }
.modal-close { background:none; border:none; font-size:20px; cursor:pointer; color:#999; }
.modal-body { padding:24px; }
.modal-footer { padding:16px 24px; border-top:1px solid #eee; display:flex; justify-content:flex-end; gap:8px; }
.form-group { margin-bottom:16px; }
.form-group label { display:block; margin-bottom:6px; font-size:13px; color:#666; font-weight:500; }
.form-group input, .form-group textarea, .form-group select { width:100%; padding:10px 12px; border:1px solid #ddd; border-radius:8px; font-size:14px; outline:none; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color:#667eea; }
.form-group textarea { resize:vertical; min-height:80px; }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }

/* 空状态 */
.empty { text-align:center; padding:60px 20px; color:#999; }
.empty .icon { font-size:48px; margin-bottom:12px; }

/* 图片缩略图 */
.thumb { width:50px; height:50px; border-radius:6px; object-fit:cover; }

/* 备案信息 */
.beian { text-align:center; padding:16px; font-size:12px; color:#bbb; }

/* 详情页网格 */
.detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:16px; }
.detail-item { display:flex; flex-direction:column; gap:4px; }
.detail-item label { font-size:12px; color:#999; }
.detail-item span { font-size:14px; color:#333; }

/* 响应式 */
@media(max-width:768px) {
  .sidebar { width:60px; }
  .sidebar h2, .sidebar .role-tag, .sidebar-footer, .nav-item span { display:none; }
  .nav-item { padding:14px 20px; text-align:center; }
  .main-content { margin-left:60px; }
  .stat-grid { grid-template-columns:1fr 1fr; }
}

.badge-orange { background: #FFF3E0; color: #E65100; }
