.gallery-admin-filters{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:15px;
}
.gallery-admin-filters select{
  min-width:145px;
}
.gallery-admin-filters input{
  flex:1;
  min-width:180px;
}
.gallery-admin-entry{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:15px 0;
  border-bottom:1px solid var(--line);
}
.gallery-admin-entry:last-child{border-bottom:0}
.gallery-admin-entry strong{display:block}
.gallery-admin-entry small{
  display:block;
  color:var(--muted);
  margin-top:4px;
  overflow-wrap:anywhere;
}
.gallery-admin-stats{
  display:flex;
  gap:8px 14px;
  flex-wrap:wrap;
  margin-top:9px;
  font-size:12px;
  color:var(--muted);
}
.gallery-admin-entry-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink:0;
}
.gallery-admin-state{
  font-size:12px;
  padding:5px 9px;
  border-radius:20px;
  background:#eee8dd;
}
.gallery-admin-state.published{
  background:#e1efe4;
  color:#236b4a;
}
.gallery-admin-publishing{
  margin-top:25px;
  padding-top:18px;
  border-top:1px solid var(--line);
}
.gallery-admin-empty{
  padding:22px;
  text-align:center;
  color:var(--muted);
}
@media(max-width:650px){
  .gallery-admin-entry{
    align-items:flex-start;
    flex-direction:column;
  }
  .gallery-admin-entry-actions{
    width:100%;
    justify-content:space-between;
  }
  .gallery-admin-filters select,
  .gallery-admin-filters input{
    width:100%;
  }
}


/* Galerias: carga masiva y miniaturas */
.gallery-upload-progress{
  margin-top:16px;
}
.gallery-upload-progress progress{
  display:block;
  width:100%;
  height:13px;
  accent-color:var(--green);
}
#galleryUploadCounter{
  margin-top:8px;
  font-size:13px;
  color:var(--muted);
}
.gallery-admin-photo-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-top:14px;
}
.gallery-admin-photo-grid article{
  min-width:0;
  border:1px solid var(--line);
  border-radius:12px;
  overflow:hidden;
  background:var(--surface);
}
.gallery-admin-photo-grid img{
  display:block;
  width:100%;
  height:140px;
  object-fit:contain;
  background:#eeeae1;
}
.gallery-admin-photo-grid small{
  display:block;
  padding:8px;
  overflow-wrap:anywhere;
  font-size:11px;
}
@media(max-width:760px){
  .gallery-admin-photo-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}


/* Controles de portada y orden de fotografias */
.gallery-photo-controls{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
  flex-wrap:wrap;
  padding:8px;
  border-top:1px solid var(--line);
}
.gallery-photo-cover,
.gallery-photo-order button{
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--surface);
  color:var(--green);
  font:inherit;
  font-size:12px;
  font-weight:600;
  cursor:pointer;
  min-height:34px;
}
.gallery-photo-cover{
  padding:6px 9px;
}
.gallery-photo-order{
  display:flex;
  gap:5px;
  margin-left:auto;
}
.gallery-photo-order button{
  width:36px;
  font-size:17px;
}
.gallery-photo-controls button:disabled{
  opacity:.35;
  cursor:default;
}
.gallery-cover-label{
  color:var(--green);
  font-size:12px;
  font-weight:700;
}


/* Seleccion y eliminacion de fotografias */
.gallery-selection-toolbar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 0 16px;
  border-bottom:1px solid var(--line);
}
.gallery-selection-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}
#gallerySelectedCount{
  font-size:13px;
  color:var(--muted);
}
.gallery-photo-select{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:44px;
  padding:6px 9px;
  font-size:12px;
  cursor:pointer;
}
.gallery-photo-select input{
  width:18px;
  height:18px;
  accent-color:var(--green);
}
.gallery-photo-delete{
  border:1px solid #b77c76;
  border-radius:8px;
  background:transparent;
  color:#8f3a31;
  padding:7px 9px;
  min-height:34px;
  font:inherit;
  font-size:12px;
  cursor:pointer;
}
.gallery-photo-delete:hover{
  background:#f8e9e7;
}
.gallery-selection-toolbar button:disabled{
  opacity:.4;
  cursor:default;
}
@media(max-width:650px){
  .gallery-selection-toolbar{
    align-items:stretch;
    flex-direction:column;
  }
  .gallery-selection-actions{
    justify-content:flex-start;
  }
}


/* 1.14.12a - Orden por EXIF, nombre y arrastrar */
.gallery-photo-sort-controls{
  display:grid;
  gap:7px;
  margin:14px 0;
  padding:12px;
  border:1px solid var(--line);
  border-radius:12px;
}
.gallery-photo-sort-controls label{font-weight:650}
.gallery-photo-sort-controls select{width:100%;min-height:42px}
.gallery-photo-sort-controls small{font-size:12px;color:var(--muted);line-height:1.45}
.gallery-photo-sort-inline{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.gallery-photo-sort-inline select{flex:1;min-width:180px;width:auto}
.gallery-photo-exif{color:var(--muted);font-size:11px;padding-top:0!important}
.gallery-photo-extremes{display:flex;gap:6px;width:100%}
.gallery-photo-extremes button{
  flex:1;min-height:37px;border:1px solid var(--line);
  border-radius:8px;background:var(--surface);
  color:var(--green);font:inherit;font-size:12px;cursor:pointer;
}
.gallery-photo-extremes button:disabled{opacity:.35;cursor:default}
.gallery-photo-order .gallery-photo-drag{
  width:44px;min-height:44px;font-size:21px;touch-action:none;
  cursor:grab;user-select:none;-webkit-user-select:none;
}
.gallery-photo-order .gallery-photo-drag:active{cursor:grabbing}
.gallery-admin-photo-grid article.is-dragging{
  outline:2px solid var(--green);opacity:.68;
  box-shadow:0 5px 18px rgba(0,0,0,.15);
}
@media(max-width:650px){
  .gallery-photo-sort-inline{align-items:stretch;flex-direction:column}
  .gallery-photo-sort-inline select,.gallery-photo-sort-inline button{width:100%}
}
