:root {
  --pd-primary: #4F46E5;
  --pd-bg: #F8FAFC;
  --pd-card: #FFFFFF;
  --pd-radius: 16px;
}

body.pd-body { background: var(--pd-bg); }

.pd-topbar { background: var(--pd-primary); }

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

.pd-sidebar {
  width: 220px; background: #fff; border-right: 1px solid #e5e7eb;
  padding: 16px 12px; flex-shrink: 0;
}
.pd-nav-link {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px;
  color: #334155; text-decoration: none; font-size: 14px; margin-bottom: 4px;
}
.pd-nav-link:hover { background: #f1f5f9; }
.pd-nav-link.active { background: var(--pd-primary); color: #fff; }

.pd-main { flex: 1; padding: 24px; }

/* Card grid kiểu Pinterest cho Image Library — ưu tiên Card, hạn chế Table */
.pd-image-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px;
}
.pd-image-card {
  position: relative; background: var(--pd-card); border-radius: var(--pd-radius); overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); transition: transform .15s, box-shadow .15s;
}
.pd-image-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.pd-image-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.pd-image-card-body { padding: 10px 12px; }

.pd-slider-row { margin-bottom: 14px; }
.pd-slider-row .form-range { accent-color: var(--pd-primary); }
.pd-slider-value { font-weight: 600; min-width: 34px; text-align: right; display: inline-block; }

.pd-dropzone {
  border: 2px dashed #cbd5e1; border-radius: var(--pd-radius); padding: 32px; text-align: center;
  color: #64748b; cursor: pointer; transition: border-color .15s, background .15s;
}
.pd-dropzone.dragover { border-color: var(--pd-primary); background: #eef2ff; }

@media (max-width: 768px) {
  .pd-shell { flex-direction: column; }
  .pd-sidebar { width: 100%; display: flex; gap: 4px; overflow-x: auto; }
  .pd-nav-link { white-space: nowrap; }
  .pd-main { padding: 14px; }
}
