.pgl-wrap { width: 100%; }
.pgl-title { margin: 0 0 14px; font-size: 20px; }

.pgl-searchbar{ display:flex; gap:10px; align-items:center; margin: 0 0 14px; }
.pgl-search{
  width: min(520px, 100%);
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.14);
  outline: none;
  font-size: 14px;
}
.pgl-search:focus{ box-shadow: 0 0 0 3px rgba(0,0,0,.08); }
.pgl-search-meta{ font-size: 12px; opacity: .75; min-width: 90px; }

.pgl-grid { display: grid; gap: 14px; }

.pgl-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.pgl-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pgl-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pgl-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pgl-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pgl-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

@media (max-width: 1024px) {
  .pgl-cols-4, .pgl-cols-5, .pgl-cols-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .pgl-cols-3, .pgl-cols-4, .pgl-cols-5, .pgl-cols-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pgl-searchbar{flex-direction:column; align-items:stretch;}
  .pgl-search-meta{min-width:auto;}
}
@media (max-width: 420px) {
  .pgl-grid { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
}

.pgl-card {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px !important;
}

.pgl-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: .5px;
  background: rgba(220, 38, 38, .10);
  color: rgb(185, 28, 28);
}

.pgl-name {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.pgl-meta { font-size: 12px; opacity: .75; margin-top: -6px; }

.pgl-actions { display: flex; gap: 10px; margin-top: auto; }
.pgl-btn {
  appearance: none;
  border: 1px solid rgba(0,0,0,.14);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: transform .08s ease, box-shadow .12s ease;
}
.pgl-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(0,0,0,.08); }

.pgl-empty {
  padding: 18px;
  border: 1px dashed rgba(0,0,0,.2);
  border-radius: 14px;
  opacity: .85;
  grid-column: 1 / -1;
}

/* Lightbox */
.pgl-lightbox { position: fixed; inset: 0; display: none; z-index: 999999; }
.pgl-lightbox.is-open { display: block; }
.pgl-lightbox-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.pgl-lightbox-panel {
  position: absolute;
  inset: 4%;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
}
@media (max-width: 700px) { .pgl-lightbox-panel { inset: 10px; border-radius: 14px; } }
.pgl-lightbox-bar {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pgl-lightbox-title {
  font-weight: 800;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pgl-lightbox-actions { display: flex; gap: 10px; align-items: center; }
.pgl-lightbox-body { flex: 1; }
.pgl-frame { width: 100%; height: 100%; border: 0; }
