/* ==========================================================================
   统一运营中台与模态框样式 (admin.css) · ≤ 250 行
   ========================================================================== */

.admin-container {
  display: flex;
  min-height: calc(100vh - 56px);
}

.admin-sidebar {
  width: 220px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: 20px 12px;
}

.admin-logo {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
  padding: 0 12px 20px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.admin-menu { display: flex; flex-direction: column; gap: 4px; }
.admin-menu-item {
  text-align: left;
  background: transparent;
  border: none;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}
.admin-menu-item.active, .admin-menu-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.admin-body { flex: 1; padding: 32px 40px; overflow-y: auto; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.admin-header h2 { font-size: 24px; font-weight: 800; }
.online-pill {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-left: 12px;
}

.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.admin-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.as-lbl { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.as-val { font-size: 24px; font-weight: 900; color: var(--text-primary); }
.as-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.admin-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.admin-card h3 { font-size: 16px; font-weight: 800; margin-bottom: 16px; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { background: var(--bg-subtle); color: var(--text-secondary); font-weight: 700; }

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.modal-backdrop.hidden { display: none; }

.modal-dialog {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  max-width: 680px;
  width: 90%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  padding: 32px;
  box-shadow: var(--shadow-lg);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--bg-subtle);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
}

.pdp-header h2 { font-size: 22px; font-weight: 900; margin-bottom: 6px; }
.pdp-subtitle { color: var(--primary); font-size: 13px; font-weight: 700; margin-bottom: 20px; }
.pdp-section { margin-bottom: 24px; }
.pdp-section h4 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  border-left: 4px solid var(--primary);
  padding-left: 8px;
  margin-bottom: 12px;
}
.pdp-box { background: var(--bg-subtle); border-radius: var(--radius-md); padding: 16px; font-size: 13px; }
.pdp-report-pdf {
  border: 2px dashed var(--accent);
  background: var(--bg-accent);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 12px;
}

.poster-dialog { max-width: 400px; padding: 20px; }
.poster-card {
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-md);
  margin-bottom: 16px;
}
.poster-tag {
  background: var(--primary);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 12px;
}
.poster-card h2 { font-size: 20px; font-weight: 900; color: #0f172a; margin-bottom: 6px; }
.poster-card p { font-size: 11px; color: #475569; }
.poster-product-img {
  height: 180px;
  background: #e2e8f0;
  border-radius: var(--radius-md);
  margin: 16px 0;
  display: flex;
  align-items: flex-end;
  padding: 12px;
}
.poster-badge-clean {
  background: #059669;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}
.poster-footer { display: flex; justify-content: space-between; align-items: center; text-align: left; }
.poster-user { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.poster-avatar-sm {
  width: 32px;
  height: 32px;
  background: #059669;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.poster-sub { font-size: 10px; color: #64748b; }
.poster-qr-box {
  width: 60px;
  height: 60px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #059669;
  text-align: center;
  font-weight: 700;
}

@media (max-width: 768px) {
  .admin-container { flex-direction: column; }
  .admin-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); padding: 12px; }
  .admin-menu { flex-direction: row; flex-wrap: wrap; }
  .admin-body { padding: 16px; }
  .admin-stats-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .admin-card { padding: 14px; overflow-x: auto; }
  .modal-dialog { padding: 20px 16px; width: 94%; }
}
