/* ====================================================================
   BIBLIOTECA PREMIUM — gallery-new- prefix
   Modernized to match cc- design system from onboarding/brand
   ==================================================================== */

/* ====================================================================
   TOKENS (inherits cc- vars from onboarding CSS)
   ==================================================================== */
:root {
  --gn-font-display: 'Space Grotesk', system-ui, sans-serif;
  --gn-font-body: 'Inter', system-ui, sans-serif;
}

/* ====================================================================
   PAGE SHELL — gradient background
   ==================================================================== */
.gallery-new-page-shell {
  position: relative;
  background: linear-gradient(165deg, #f8f6ff 0%, #f0f4ff 35%, #f5f3ff 65%, #eef2ff 100%);
  min-height: calc(100vh - 80px);
  padding: 0;
  overflow-x: hidden;
}

/* ====================================================================
   HEADER
   ==================================================================== */
.gallery-new-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1.5px solid rgba(124, 58, 237, 0.08);
  animation: gnFadeInDown 0.5s ease-out;
}

@keyframes gnFadeInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.gallery-new-header-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gallery-new-header-right {
  display: flex;
  align-items: center;
  height: 44px;
}

.gallery-new-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(59, 130, 246, 0.08) 100%);
  border: 1.5px solid rgba(124, 58, 237, 0.25);
  border-radius: 9999px;
  padding: 0.45rem 1.1rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cc-primary-600, #7c3aed);
  font-family: var(--gn-font-display);
  margin-bottom: 0.75rem;
  backdrop-filter: blur(8px);
}

.gallery-new-title {
  font-family: var(--gn-font-display);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 0.35rem;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #1e3a8a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gallery-new-subtitle {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--cc-neutral-500, #64748b);
  margin: 0;
  font-weight: 400;
}

/* Search */
.gallery-new-search {
  min-width: 280px;
  border-radius: 12px;
  padding: 0.7rem 1rem 0.7rem 2.6rem;
  border: 1.5px solid var(--cc-neutral-200, #e2e8f0);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: all 300ms ease-out;
  font-size: 0.88rem;
  font-family: var(--gn-font-body);
  font-weight: 500;
  color: var(--cc-neutral-800, #1e293b);
  background-color: white;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%237c3aed" viewBox="0 0 16 16"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/></svg>');
  background-repeat: no-repeat;
  background-position: 14px center;
}

.gallery-new-search::placeholder {
  color: var(--cc-neutral-400, #94a3b8);
  font-weight: 400;
}

.gallery-new-search:hover {
  border-color: var(--cc-primary-300, #c4b5fd);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.gallery-new-search:focus {
  border-color: var(--cc-primary-500, #8b5cf6);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1), 0 2px 6px rgba(0,0,0,0.06);
  outline: none;
}

/* ====================================================================
   STATS BAR — glassmorphic
   ==================================================================== */
.gallery-new-stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.75rem;
  background: linear-gradient(135deg, rgba(255,255,255,0.88) 0%, rgba(255,255,255,0.78) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1.5px solid rgba(124, 58, 237, 0.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06), 0 0 40px rgba(124, 58, 237, 0.06);
  animation: gnFadeIn 0.5s ease-out 0.15s both;
  position: relative;
  z-index: 50;
}

@keyframes gnFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.gallery-new-stats-left,
.gallery-new-stats-center {
  display: flex;
  align-items: center;
}

.gallery-new-stats-right {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 999;
}

.gallery-new-stat {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.gallery-new-stat-label {
  font-weight: 400;
  color: var(--cc-neutral-500, #64748b);
  font-size: 0.85rem;
}

.gallery-new-stat-value {
  font-weight: 800;
  color: var(--cc-primary-600, #7c3aed);
  font-size: 1.1rem;
  font-family: var(--gn-font-display);
}

/* ====================================================================
   VIEW TOGGLE
   ==================================================================== */
.gallery-new-view-toggle {
  background: white;
  border-radius: 14px;
  padding: 4px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1.5px solid var(--cc-neutral-200, #e2e8f0);
}

.gallery-new-layout-btn {
  padding: 9px 16px !important;
  border-radius: 10px !important;
  border: none !important;
  font-size: 16px;
  color: var(--cc-neutral-400, #94a3b8) !important;
  transition: all 300ms ease-out !important;
  cursor: pointer;
  background: transparent !important;
  min-width: 44px;
}

.gallery-new-layout-btn:hover {
  color: var(--cc-neutral-700, #334155) !important;
  background: rgba(124, 58, 237, 0.04) !important;
}

.gallery-new-layout-btn.active {
  background: linear-gradient(135deg, var(--cc-primary-600, #7c3aed) 0%, var(--cc-secondary-600, #3b82f6) 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35) !important;
}

/* ====================================================================
   SORT DROPDOWN
   ==================================================================== */
.gallery-new-sort-dropdown {
  position: relative;
  z-index: 999 !important;
}

.gallery-new-sort-toggle {
  background: white !important;
  border: 1.5px solid var(--cc-neutral-200, #e2e8f0) !important;
  border-radius: 12px !important;
  padding: 9px 18px !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  color: var(--cc-neutral-700, #334155) !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
  transition: all 250ms ease-out !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  font-family: var(--gn-font-body) !important;
}

.gallery-new-sort-toggle:hover {
  border-color: var(--cc-primary-300, #c4b5fd) !important;
  color: var(--cc-primary-600, #7c3aed) !important;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.1) !important;
}

.gallery-new-sort-toggle::after {
  content: '\f107' !important;
  font-family: 'Font Awesome 5 Free' !important;
  font-weight: 900 !important;
  margin-left: 6px !important;
  font-size: 11px !important;
  transition: transform 0.3s ease !important;
  border: none !important;
}

.gallery-new-sort-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg) !important;
}

.gallery-new-sort-dropdown .dropdown-menu {
  z-index: 999 !important;
  border: 1.5px solid rgba(124, 58, 237, 0.1) !important;
  border-radius: 16px !important;
  box-shadow: 0 16px 48px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.03) !important;
  padding: 8px !important;
  background: white !important;
  min-width: 220px !important;
  margin-top: 8px !important;
  animation: gnDropdown 0.25s ease-out !important;
}

@keyframes gnDropdown {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.gallery-new-sort-item {
  border-radius: 10px !important;
  padding: 10px 14px !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  color: var(--cc-neutral-700, #334155) !important;
  transition: all 200ms ease !important;
  margin: 2px 0 !important;
  display: flex !important;
  align-items: center !important;
  cursor: pointer !important;
  background: transparent !important;
}

.gallery-new-sort-item:hover {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.06) 0%, rgba(59, 130, 246, 0.04) 100%) !important;
  color: var(--cc-primary-600, #7c3aed) !important;
  transform: translateX(3px) !important;
}

/* ====================================================================
   GRID & LIST
   ==================================================================== */
.gallery-new-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 4px;
  animation: gnFadeInUp 0.6s ease-out;
}

@keyframes gnFadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.gallery-new-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: gnFadeInUp 0.6s ease-out;
}

/* ====================================================================
   CARD WRAPPER & BASE
   ==================================================================== */
.gallery-new-card-wrapper {
  position: relative;
  height: 100%;
  animation: gnScaleIn 0.4s ease-out backwards;
  z-index: 1;
}
.gallery-new-card-wrapper:nth-child(1) { animation-delay: 0.05s; }
.gallery-new-card-wrapper:nth-child(2) { animation-delay: 0.1s; }
.gallery-new-card-wrapper:nth-child(3) { animation-delay: 0.15s; }
.gallery-new-card-wrapper:nth-child(4) { animation-delay: 0.2s; }
.gallery-new-card-wrapper:nth-child(5) { animation-delay: 0.25s; }

@keyframes gnScaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.gallery-new-card {
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.85) 100%);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border: 1.5px solid rgba(124, 58, 237, 0.08);
  transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.gallery-new-card:hover {
  box-shadow: 0 16px 40px rgba(124, 58, 237, 0.12), 0 8px 16px rgba(0,0,0,0.06);
  transform: translateY(-6px);
  border-color: rgba(124, 58, 237, 0.2);
}

/* ====================================================================
   CARD IMAGE
   ==================================================================== */
.gallery-new-card-img-container {
  position: relative;
  width: 100%;
  padding-top: 75%;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f3ff 0%, #eef2ff 100%);
}

.gallery-new-card-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: all 500ms cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.gallery-new-card:hover .gallery-new-card-img {
  transform: scale(1.08);
  filter: brightness(1.03);
}

/* ====================================================================
   SOCIAL BADGE
   ==================================================================== */
.gallery-new-social-badge {
  position: absolute;
  top: 12px; right: 12px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  z-index: 10;
  transition: all 300ms ease-out;
  border: 2px solid rgba(255,255,255,0.8);
  color: var(--cc-primary-600, #7c3aed);
  font-size: 0.95rem;
}

.gallery-new-card:hover .gallery-new-social-badge {
  background: linear-gradient(135deg, var(--cc-primary-600, #7c3aed) 0%, var(--cc-secondary-600, #3b82f6) 100%);
  color: white;
  border-color: transparent;
  transform: scale(1.1);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.35);
}

/* ====================================================================
   HOVER ACTIONS
   ==================================================================== */
.gallery-new-card-hover-actions {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
  opacity: 0;
  transform: translateY(16px);
  transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 15;
  pointer-events: none;
}

.gallery-new-card:hover .gallery-new-card-hover-actions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.gallery-new-card-hover-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  color: var(--cc-primary-600, #7c3aed);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 300ms ease-out;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.gallery-new-card-hover-btn:hover {
  background: linear-gradient(135deg, var(--cc-primary-600, #7c3aed) 0%, var(--cc-secondary-600, #3b82f6) 100%);
  color: white;
  border-color: transparent;
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
}

/* ====================================================================
   CARD CONTENT
   ==================================================================== */
.gallery-new-card-content {
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex: 1;
  position: relative;
  z-index: 2;
}

.gallery-new-card-title-container {
  position: relative;
  margin-bottom: 6px;
}

.gallery-new-card-title {
  font-family: var(--gn-font-body);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--cc-neutral-800, #1e293b);
  margin: 0 0 6px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 300ms ease;
}

.gallery-new-card:hover .gallery-new-card-title {
  color: var(--cc-primary-600, #7c3aed);
}

.gallery-new-card-objective {
  font-size: 0.78rem;
  color: var(--cc-neutral-500, #64748b);
  line-height: 1.45;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ====================================================================
   NEW DESIGN CARD — premium CTA
   ==================================================================== */
.gallery-new-card.gallery-new-new-design-card {
  border: 2px dashed rgba(124, 58, 237, 0.2);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.03) 0%, rgba(59, 130, 246, 0.02) 100%);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  transition: all 300ms ease-out;
}

.gallery-new-card.gallery-new-new-design-card:hover {
  border-color: var(--cc-primary-400, #a78bfa);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.06) 0%, rgba(59, 130, 246, 0.04) 100%);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(124, 58, 237, 0.12);
}

.gallery-new-new-design-icon {
  width: 52px; height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cc-primary-600, #7c3aed) 0%, var(--cc-secondary-600, #3b82f6) 100%);
  border-radius: 14px;
  color: white;
  font-size: 1.3rem;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.3);
  margin-bottom: 0.85rem;
  transition: all 300ms ease-out;
}

.gallery-new-card.gallery-new-new-design-card:hover .gallery-new-new-design-icon {
  transform: scale(1.1) rotate(-6deg);
}

.gallery-new-new-design-label {
  font-family: var(--gn-font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--cc-neutral-800, #1e293b);
  margin-bottom: 0.3rem;
}

.gallery-new-new-design-hint {
  font-size: 0.78rem;
  color: var(--cc-neutral-400, #94a3b8);
}

/* ====================================================================
   EMPTY STATE
   ==================================================================== */
.gallery-new-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2.5rem;
  background: linear-gradient(135deg, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.75) 100%);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1.5px solid rgba(124, 58, 237, 0.08);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  animation: gnFadeIn 0.6s ease-out;
}

.gallery-new-empty-state h4 {
  font-family: var(--gn-font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--cc-neutral-800, #1e293b);
  margin-bottom: 0.5rem;
}

.gallery-new-empty-state p {
  font-size: 0.9rem;
  color: var(--cc-neutral-500, #64748b);
  margin-bottom: 1.5rem;
}

.gallery-new-empty-icon {
  width: 120px; height: 120px;
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

.gallery-new-empty-btn {
  background: linear-gradient(135deg, var(--cc-primary-600, #7c3aed) 0%, var(--cc-secondary-600, #3b82f6) 100%) !important;
  color: white !important;
  border: none !important;
  padding: 0.75rem 2rem !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  font-size: 0.88rem !important;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.3) !important;
  transition: all 300ms ease-out !important;
}

.gallery-new-empty-btn:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 12px 36px rgba(124, 58, 237, 0.4) !important;
}


/* ====================================================================
   IMAGE MODAL — premium redesign
   ==================================================================== */
.gallery-new-modal .modal-content {
  border-radius: 20px !important;
  overflow: hidden;
  height: 540px;
  border: 1.5px solid rgba(124, 58, 237, 0.12) !important;
  box-shadow: 0 32px 80px rgba(124, 58, 237, 0.15), 0 0 0 1px rgba(124, 58, 237, 0.05) !important;
}

.gallery-new-modal-header {
  padding: 10px 20px !important;
  border-bottom: 1.5px solid rgba(124, 58, 237, 0.08) !important;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.04) 0%, rgba(59, 130, 246, 0.02) 100%) !important;
  display: flex !important;
  align-items: center !important;
}

.gallery-new-modal-title {
  font-family: var(--gn-font-display) !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
  color: var(--cc-neutral-800, #1e293b) !important;
  margin: 0 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 360px;
  line-height: 1.3 !important;
}


.modal_title_container_gallery_alpha {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.modal_title_wrapper_gallery_alpha {
  flex: 1;
  min-width: 0;
}

.gallery-new-modal-edit-btn {
  width: auto;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1.5px solid rgba(124, 58, 237, 0.12);
  background: rgba(124, 58, 237, 0.04);
  color: var(--cc-neutral-400, #94a3b8);
  cursor: pointer;
  transition: all 250ms ease-out;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--gn-font-body);
  flex-shrink: 0;
  white-space: nowrap;
}


.gallery-new-modal-edit-btn i {
  font-size: 0.65rem;
}

.gallery-new-modal-edit-btn:hover {
  background: linear-gradient(135deg, var(--cc-primary-600, #7c3aed) 0%, var(--cc-secondary-600, #3b82f6) 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
  transform: translateY(-1px);
}

.gallery-new-modal-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--cc-neutral-200, #e2e8f0);
  background: white;
  color: var(--cc-neutral-400, #94a3b8);
  cursor: pointer;
  transition: all 250ms ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 16px;
}

.gallery-new-modal-close:hover {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fecaca;
}

/* Modal body/image area */
.gallery-new-modal-body {
  padding: 0 !important;
  overflow: hidden;
}

.gallery-new-modal-row {
  height: 100%;
  min-height: 100%;
}

.gallery-new-image-col {
  height: 100%;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f3ff 0%, #eef2ff 100%);
  position: relative;
  padding: 0;
}

.gallery-new-image-container {
  width: 100%;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0.5rem;
  box-sizing: border-box;
}

.gallery-new-modal-image {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  display: block;
  margin: auto;
}

/* Nav buttons */
.gallery-new-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);   /* más transparente */
  border: 1.5px solid rgba(124, 58, 237, 0.12);
  color: var(--cc-primary-600, #7c3aed);
  font-size: 18px;
  cursor: pointer;
  transition: all 280ms ease-out;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  opacity: 0;                                /* oculto por default */
  backdrop-filter: blur(4px);
}

.gallery-new-image-container:hover .gallery-new-nav-btn {
  opacity: 1;
}

.gallery-new-nav-btn:hover {
  background: linear-gradient(135deg, var(--cc-primary-600, #7c3aed) 0%, var(--cc-secondary-600, #3b82f6) 100%);
  color: white;
  border-color: transparent;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.35);
  opacity: 1;
}

.gallery-new-nav-prev { left: 14px; }
.gallery-new-nav-next { right: 14px; }

/* Modal sidebar */
.gallery-new-sidebar {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  background: white;
  overflow: hidden;
  row-gap: 0;
}

.gallery-new-sidebar-header {
  padding: 20px 22px 14px;
  border-bottom: 1.5px solid rgba(124, 58, 237, 0.06);
}

.gallery-new-sidebar-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.gallery-new-sidebar-title {
  font-family: var(--gn-font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--cc-neutral-800, #1e293b);
  margin: 0;
}

.gallery-new-sidebar-divider {
  height: 3px;
  background: linear-gradient(90deg, var(--cc-primary-600, #7c3aed), var(--cc-secondary-600, #3b82f6), transparent);
  border-radius: 2px;
  margin-top: 10px;
}

.gallery-new-date-compact {
  display: flex;
  align-items: center;
  color: var(--cc-neutral-500, #64748b);
  font-size: 0.72rem;
  font-weight: 500;
  background: rgba(124, 58, 237, 0.04);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(124, 58, 237, 0.1);
}

/* Badges */
.gallery-new-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 22px;
  background: linear-gradient(135deg, rgba(245,243,255,0.8) 0%, white 100%);
  border-bottom: 1px solid rgba(124, 58, 237, 0.06);
}

.gallery-new-badge-item {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  transition: all 250ms ease;
  cursor: default;
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-new-badge-type {
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
  color: #5b21b6;
  border: 1px solid #c4b5fd;
}
.gallery-new-badge-type::before {
  content: '\f03e'; font-family: 'Font Awesome 5 Free'; font-weight: 400;
  margin-right: 5px; font-size: 10px;
}

.gallery-new-badge-social {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  border: 1px solid #93c5fd;
}
.gallery-new-badge-social::before {
  content: '\f1e0'; font-family: 'Font Awesome 5 Free'; font-weight: 900;
  margin-right: 5px; font-size: 10px;
}

.gallery-new-badge-objective {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
  border: 1px solid #6ee7b7;
  flex: 1 1 auto;
  max-width: 100%;
}
.gallery-new-badge-objective::before {
  content: '\f140'; font-family: 'Font Awesome 5 Free'; font-weight: 900;
  margin-right: 5px; font-size: 10px;
}

.gallery-new-badge-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Sidebar content */
.gallery-new-sidebar-content {
  padding: 16px 22px;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}

.gallery-new-sidebar-content::-webkit-scrollbar { width: 6px; }
.gallery-new-sidebar-content::-webkit-scrollbar-track { background: #f8f9fa; border-radius: 3px; }
.gallery-new-sidebar-content::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

.gallery-new-field-group { margin-bottom: 16px; }

.gallery-new-field-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--cc-neutral-500, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.gallery-new-field-content {
  font-size: 0.82rem;
  color: var(--cc-neutral-700, #334155);
  line-height: 1.5;
  background: rgba(124, 58, 237, 0.02);
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(124, 58, 237, 0.06);
}

.gallery-new-field-with-action {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.gallery-new-field-with-action .gallery-new-field-content { flex: 1; }

.gallery-new-copy-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1.5px solid rgba(124, 58, 237, 0.12);
  background: white;
  color: var(--cc-neutral-400, #94a3b8);
  cursor: pointer;
  transition: all 250ms ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gallery-new-copy-btn:hover {
  background: var(--cc-primary-600, #7c3aed);
  color: white;
  border-color: transparent;
}

/* Action bar */
.gallery-new-action-bar {
  padding: 16px 22px;
  border-top: 1.5px solid rgba(124, 58, 237, 0.06);
  background: linear-gradient(135deg, rgba(245,243,255,0.5) 0%, white 100%);
}

.gallery-new-action-grid { margin-bottom: 10px; }

.gallery-new-btn-share {
  width: 100%;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all 300ms ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--cc-primary-600, #7c3aed) 0%, var(--cc-secondary-600, #3b82f6) 100%);
  color: white;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.3);
  position: relative;
  overflow: hidden;
}

.gallery-new-btn-share::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.gallery-new-btn-share:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.4);
}

.gallery-new-btn-share:hover::before { left: 100%; }

.gallery-new-pro-badge {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #7C2D12;
  font-size: 8px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.gallery-new-secondary-actions {
  display: flex;
  gap: 8px;
}

.gallery-new-btn-secondary {
  flex: 1;
  padding: 10px 14px;
  font-size: 0.82rem;
  border-radius: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 250ms ease-out;
  border: 1.5px solid var(--cc-neutral-200, #e2e8f0) !important;
  background: white !important;
  color: var(--cc-neutral-700, #334155) !important;
  cursor: pointer;
}

.gallery-new-btn-download {
  border-color: var(--cc-primary-500, #8b5cf6) !important;
  color: var(--cc-primary-600, #7c3aed) !important;
}

.gallery-new-btn-download:hover {
  background: linear-gradient(135deg, var(--cc-primary-600, #7c3aed) 0%, var(--cc-secondary-600, #3b82f6) 100%) !important;
  color: white !important;
  border-color: transparent !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}

.gallery-new-btn-delete {
  border-color: #fecaca !important;
  color: #ef4444 !important;
}

.gallery-new-btn-delete:hover {
  background: #ef4444 !important;
  color: white !important;
  border-color: transparent !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

/* ====================================================================
   LOADER MODAL (replaces GIF)
   ==================================================================== */
.gallery-new-loader-modal .modal-content {
  border-radius: 20px !important;
  border: 1.5px solid rgba(124, 58, 237, 0.12) !important;
  box-shadow: 0 24px 64px rgba(124, 58, 237, 0.18) !important;
  overflow: hidden;
}

/* ====================================================================
   NEW DESIGN MODAL
   ==================================================================== */
.gallery-new-new-design-modal .modal-dialog {
  max-width: 620px !important;
}

.gallery-new-new-design-modal .modal-content {
  border-radius: 20px !important;
  border: 1.5px solid rgba(124, 58, 237, 0.12) !important;
  box-shadow: 0 32px 80px rgba(124, 58, 237, 0.18) !important;
  overflow: hidden;
  background: white;
}

.gallery-new-ndm-header {
  padding: 22px 26px 16px !important;
  border-bottom: 1.5px solid rgba(124, 58, 237, 0.08) !important;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.03) 0%, white 100%) !important;
}

.gallery-new-ndm-title {
  font-family: var(--gn-font-display) !important;
  font-size: 1.2rem !important;
  font-weight: 800 !important;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gallery-new-ndm-body {
  padding: 26px 30px 30px !important;
}

.gallery-new-ndm-subtitle {
  text-align: center;
  font-size: 0.88rem;
  color: var(--cc-neutral-500, #64748b);
  margin-bottom: 1.5rem !important;
}

.gallery-new-ndm-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 520px;
  margin: 0 auto;
}

.gallery-new-ndm-option {
  width: 100%;
  height: 160px !important;
  border: none !important;
  border-radius: 16px !important;
  cursor: pointer;
  transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1) !important;
  padding: 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.gallery-new-ndm-option-primary {
  background: linear-gradient(135deg, var(--cc-primary-600, #7c3aed) 0%, var(--cc-secondary-600, #3b82f6) 100%) !important;
  color: white !important;
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.35) !important;
}

.gallery-new-ndm-option-primary:hover {
  transform: translateY(-6px) scale(1.03) !important;
  box-shadow: 0 14px 40px rgba(124, 58, 237, 0.45) !important;
}

.gallery-new-ndm-option-secondary {
  background: white !important;
  color: var(--cc-primary-600, #7c3aed) !important;
  border: 2.5px solid rgba(124, 58, 237, 0.25) !important;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.08) !important;
}

.gallery-new-ndm-option-secondary:hover {
  transform: translateY(-6px) scale(1.03) !important;
  border-color: var(--cc-primary-500, #8b5cf6) !important;
  background: rgba(124, 58, 237, 0.03) !important;
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.2) !important;
}

.gallery-new-ndm-btn-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.gallery-new-ndm-icon {
  font-size: 2.5rem !important;
  transition: transform 400ms ease-out;
}

.gallery-new-ndm-option:hover .gallery-new-ndm-icon {
  transform: scale(1.15) rotate(6deg);
}

.gallery-new-ndm-btn-text {
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  text-align: center;
  line-height: 1.3;
}

#upload-design {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}
#upload-design > button {
  width: 100% !important;
  height: 100% !important;
}

/* ====================================================================
   PREMIUM MODAL — cc-modal style
   ==================================================================== */
.gallery-new-premium-modal .modal-content {
  border-radius: 20px !important;
  border: 1.5px solid rgba(124, 58, 237, 0.15) !important;
  box-shadow: 0 32px 80px rgba(124, 58, 237, 0.2) !important;
  overflow: hidden;
  background: white !important;
}

/* ====================================================================
   RENAME MODAL — premium redesign
   ==================================================================== */
.gallery-new-rename-modal .modal-dialog {
  max-width: 480px !important;
}

.gallery-new-rename-modal .modal-content {
  border-radius: 20px !important;
  border: 1.5px solid rgba(124, 58, 237, 0.12) !important;
  box-shadow: 0 32px 80px rgba(124, 58, 237, 0.18),
              0 0 0 1px rgba(124, 58, 237, 0.05) !important;
  overflow: hidden;
  background: white !important;
}

/* ── Header ── */
.gallery-new-rename-header {
  padding: 20px 24px 16px !important;
  border-bottom: 1.5px solid rgba(124, 58, 237, 0.08) !important;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.04) 0%, rgba(59, 130, 246, 0.02) 100%) !important;
  display: flex !important;
  align-items: center !important;
  position: relative;
}

.gallery-new-rename-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #7c3aed, #3b82f6, #10b981);
  border-radius: 20px 20px 0 0;
}

.gallery-new-rename-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.gallery-new-rename-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.95rem;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.3);
}

.gallery-new-rename-header-text {
  min-width: 0;
}

.gallery-new-rename-title {
  font-family: var(--gn-font-display) !important;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: #1e293b !important;
  margin: 0 !important;
  line-height: 1.3 !important;
}

.gallery-new-rename-hint {
  font-size: 0.78rem;
  color: #64748b;
  margin: 2px 0 0 !important;
  line-height: 1.4;
}

/* ── Body ── */
.gallery-new-rename-body {
  padding: 24px 24px 20px !important;
}

.gallery-new-rename-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gallery-new-rename-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
  font-family: var(--gn-font-body);
}

.gallery-new-rename-input {
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 0.8rem 1rem !important;
  font-size: 0.92rem !important;
  font-weight: 500 !important;
  font-family: var(--gn-font-body) !important;
  color: #1e293b !important;
  transition: all 250ms ease-out !important;
  background: #f8fafc !important;
}

.gallery-new-rename-input::placeholder {
  color: #94a3b8 !important;
  font-weight: 400 !important;
}

.gallery-new-rename-input:focus {
  border-color: #8b5cf6 !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1),
              0 2px 8px rgba(124, 58, 237, 0.08) !important;
  background: white !important;
  outline: none !important;
}

.gallery-new-rename-helper {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 2px;
  font-family: var(--gn-font-body);
}

.gallery-new-rename-helper i {
  font-size: 0.65rem;
  color: #c4b5fd;
  flex-shrink: 0;
}

/* ── Footer ── */
.gallery-new-rename-footer {
  padding: 14px 24px !important;
  border-top: 1.5px solid rgba(124, 58, 237, 0.06) !important;
  background: linear-gradient(135deg, rgba(245, 243, 255, 0.5) 0%, white 100%) !important;
  display: flex !important;
  justify-content: flex-end !important;
  gap: 10px !important;
}

.gallery-new-rename-btn-cancel {
  padding: 9px 20px !important;
  border-radius: 10px !important;
  border: 1.5px solid #e2e8f0 !important;
  background: white !important;
  color: #64748b !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  font-family: var(--gn-font-body) !important;
  cursor: pointer;
  transition: all 250ms ease-out !important;
  display: inline-flex !important;
  align-items: center !important;
}

.gallery-new-rename-btn-cancel:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

.gallery-new-rename-btn-confirm {
  padding: 9px 24px !important;
  border-radius: 10px !important;
  border: none !important;
  background: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%) !important;
  color: white !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  font-family: var(--gn-font-body) !important;
  cursor: pointer;
  transition: all 300ms ease-out !important;
  display: inline-flex !important;
  align-items: center !important;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3) !important;
}

.gallery-new-rename-btn-confirm:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4) !important;
}

.gallery-new-rename-btn-confirm:active {
  transform: translateY(0) !important;
}




/* ====================================================================
   LOADER SPINNER
   ==================================================================== */
.gallery-new-loader-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: none;
  z-index: 20;
}

.gallery-new-spinner {
  width: 44px; height: 44px;
  border: 3px solid rgba(124, 58, 237, 0.1);
  border-top: 3px solid var(--cc-primary-600, #7c3aed);
  border-radius: 50%;
  animation: gnSpin 0.8s linear infinite;
}

@keyframes gnSpin {
  to { transform: rotate(360deg); }
}

/* ====================================================================
   LIST VIEW OVERRIDES
   ==================================================================== */
.gallery-new-list .gallery-new-card {
  flex-direction: row;
  height: 150px;
}

.gallery-new-list .gallery-new-card-img-container {
  width: 200px;
  padding-top: 0;
  height: 100%;
  flex-shrink: 0;
}

.gallery-new-list .gallery-new-card-content {
  flex-direction: row;
  align-items: center;
  padding: 16px;
  flex: 1;
}

.gallery-new-list .gallery-new-card-title-container {
  flex: 0 0 400px;
  margin: 0 16px 0 0;
}

.gallery-new-list .gallery-new-card-title {
  white-space: normal;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.gallery-new-list .gallery-new-card-objective { display: none; }

.gallery-new-list-metadata {
  flex: 1;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-right: 16px;
  padding: 10px;
  background: rgba(124, 58, 237, 0.02);
  border-radius: 10px;
  border: 1px solid rgba(124, 58, 237, 0.06);
}

.gallery-new-list-info-item {
  display: flex;
  align-items: center;
  font-size: 0.78rem;
  color: var(--cc-neutral-500, #64748b);
  gap: 6px;
}

.gallery-new-list-info-item i { width: 14px; flex-shrink: 0; }

.gallery-new-list-info-item.gallery-new-date-item {
  font-weight: 600;
  color: var(--cc-primary-600, #7c3aed);
}

.gallery-new-list .gallery-new-card-hover-actions {
  position: relative;
  opacity: 1 !important;
  transform: none;
  background: none;
  padding: 0;
  flex-direction: column;
  margin-left: auto;
  margin-right: 8px;
  gap: 6px;
  pointer-events: all;
}

.gallery-new-list .gallery-new-social-badge {
  top: 50%; right: auto; left: 10px;
  transform: translateY(-50%);
}

.gallery-new-list .gallery-new-card:hover .gallery-new-social-badge {
  transform: translateY(-50%) scale(1.1);
}

/* ====================================================================
   GALLERY CONTAINER FIX
   ==================================================================== */
.gallery-new-main-container {
  position: relative;
  min-height: 400px;
}

/* ====================================================================
   TOAST
   ==================================================================== */
.gallery-new-toast {
  border-radius: 12px !important;
  border: 1.5px solid rgba(124, 58, 237, 0.1) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1) !important;
}

/* ====================================================================
   RESPONSIVE
   ==================================================================== */
@media (max-width: 1200px) {
  .gallery-new-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
  }
}

@media (max-width: 992px) {
  .gallery-new-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .gallery-new-header-right { width: 100%; }
  .gallery-new-search { width: 100%; min-width: unset; }
  .gallery-new-stats-bar {
    flex-direction: column;
    gap: 1rem;
  }
  .gallery-new-stats-left,
  .gallery-new-stats-center,
  .gallery-new-stats-right {
    width: 100%;
    justify-content: center;
  }
  .gallery-new-modal .modal-content { height: auto !important; }
  .gallery-new-modal-row {
    height: auto !important; min-height: auto !important;
    flex-direction: column !important;
  }
  .gallery-new-image-col {
    height: 50vh !important; min-height: 300px !important;
  }
  .gallery-new-sidebar {
    height: 50vh !important; min-height: 350px !important;
  }
}

@media (max-width: 768px) {
  .gallery-new-title { font-size: 1.35rem; }
  .gallery-new-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }
  .gallery-new-list .gallery-new-card {
    flex-direction: column; height: auto;
  }
  .gallery-new-list .gallery-new-card-img-container {
    width: 100%; padding-top: 75%;
  }
  .gallery-new-list .gallery-new-card-content {
    flex-direction: column; align-items: flex-start;
  }
  .gallery-new-list .gallery-new-card-title-container {
    flex: 1; width: 100%; margin: 0 0 10px 0;
  }
  .gallery-new-pagination-buttons { flex-wrap: wrap; justify-content: center; }
  .gallery-new-ndm-grid { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
  .gallery-new-ndm-option {
    height: 130px !important;
  }
  .gallery-new-badge { font-size: 0.58rem; padding: 0.35rem 0.85rem; }
}


/* ====================================================================
   MODAL PROGRAMAR PUBLICACIÓN (unchanged — schedule_ prefix)
   ==================================================================== */

.schedule_modal_container .modal-dialog {
    max-width: 900px;
}

.schedule_modal_container .modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.schedule_modal_header {
    background: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
    color: white;
    border-bottom: none;
    padding: 16px 24px;
}

.schedule_modal_header h4 { color: white; font-weight: 600; }

.schedule_modal_header .gallery-new-modal-close {
    color: white;
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
}

.schedule_modal_header .gallery-new-modal-close:hover {
    background: rgba(255,255,255,0.3);
}

.schedule_modal_body {
    padding: 24px;
    background: #f8fafc;
    max-height: 70vh;
    overflow-y: auto;
}

.schedule_modal_row { margin: 0; }

.schedule_col_left {
    padding-right: 20px;
    border-right: 1px solid #e2e8f0;
}

.schedule_col_right { padding-left: 20px; }

.schedule_form_group { margin-bottom: 20px; }

.schedule_form_label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.schedule_char_count {
    font-weight: 400;
    color: #94a3b8;
    font-size: 0.8rem;
}

.schedule_image_container {
    background: white;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.schedule_preview_image {
    max-width: 100%;
    max-height: 180px;
    border-radius: 8px;
    object-fit: contain;
}

.schedule_preview_card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.schedule_preview_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.schedule_preview_header_left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.schedule_preview_avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.schedule_preview_user_info {
    display: flex;
    flex-direction: column;
}

.schedule_preview_username {
    font-weight: 600;
    font-size: 0.85rem;
    color: #1e293b;
}

.schedule_preview_time {
    font-size: 0.75rem;
    color: #94a3b8;
}

.schedule_preview_social_icon {
    font-size: 1.2rem;
    color: #7c3aed;
}

.schedule_preview_image_small {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
}

.schedule_preview_caption {
    padding: 12px;
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.5;
}

.schedule_preview_username_inline {
    font-weight: 600;
    color: #1e293b;
}

.schedule_preview_engagement {
    display: flex;
    gap: 16px;
    padding: 8px 12px 12px;
    border-top: 1px solid #f1f5f9;
}

.schedule_preview_stat {
    display: flex;
    align-items: center;
    color: #64748b;
    font-size: 0.85rem;
}

.schedule_textarea {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    font-size: 0.9rem;
    resize: none;
    transition: border-color 0.2s ease;
}

.schedule_textarea:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
    outline: none;
}

.schedule_caption_actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.schedule_btn_ai,
.schedule_btn_hashtags {
    background: white;
    border: 1px solid #e2e8f0;
    color: #64748b;
    border-radius: 8px;
    font-size: 0.8rem;
    padding: 6px 12px;
    transition: all 0.2s ease;
}

.schedule_btn_ai:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
    color: white;
    border-color: transparent;
}

.schedule_btn_hashtags:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
}

.schedule_input {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.9rem;
}

.schedule_input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
    outline: none;
}

.schedule_time_hints {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.schedule_time_hint_label {
    font-size: 0.8rem;
    color: #94a3b8;
}

.schedule_quick_time {
    background: #f1f5f9;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.8rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.schedule_quick_time:hover {
    background: #7c3aed;
    color: white;
}

.schedule_checklist {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.schedule_checklist .form-check { padding-left: 0; }
.schedule_checklist .form-check-input { margin-right: 8px; }
.schedule_checklist .form-check-label { font-size: 0.9rem; color: #475569; }

.schedule_modal_footer {
    background: white;
    border-top: 1px solid #e2e8f0;
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.schedule_btn_secondary {
    background: white;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.schedule_btn_secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.schedule_btn_publish_now {
    background: white;
    border: 2px solid #7c3aed;
    color: #7c3aed;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.schedule_btn_publish_now:hover {
    background: #7c3aed;
    color: white;
}

.schedule_btn_primary {
    background: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
    border: none;
    color: white;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.schedule_btn_primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
    color: white;
}

@media (max-width: 768px) {
    .schedule_col_left {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding-right: 0;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
    .schedule_col_right { padding-left: 0; }
    .schedule_modal_footer { flex-direction: column; }
    .schedule_modal_footer button { width: 100%; }
}

/* Badge — page-level (fit-content) */
.gallery-new-page-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(59, 130, 246, 0.07) 100%);
  border: 1.5px solid rgba(124, 58, 237, 0.2);
  border-radius: 9999px;
  padding: 0.45rem 1.1rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7c3aed;
  font-family: var(--gn-font-display);
  margin-bottom: 0.75rem;
  backdrop-filter: blur(8px);
}

/* ====================================================================
   PAGINACIÓN — clases aisladas gnpag-*
   ==================================================================== */

/* Contenedor padre (viene del Dash div#pagination-container) */
.gallery-new-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2.5rem;
  padding: 1.5rem 2rem;
  overflow: visible;
  animation: gnFadeIn 0.6s ease-out 0.3s both;
}

/* Wrapper columna */
.gnpag-wrap {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 1rem !important;
  width: auto !important;
}

/* Fila: [Anterior] [pill números] [Siguiente] */
.gnpag-row {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  width: auto !important;
  flex-wrap: nowrap !important;
}

/* Botones Anterior / Siguiente */
button.gnpag-arrow {
  all: unset !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  height: 42px !important;
  padding: 0 18px !important;
  white-space: nowrap !important;
  border-radius: 12px !important;
  border: 1.5px solid var(--cc-neutral-200, #e2e8f0) !important;
  background: white !important;
  color: var(--cc-neutral-700, #334155) !important;
  font-weight: 600 !important;
  font-size: 0.82rem !important;
  font-family: var(--gn-font-body) !important;
  cursor: pointer !important;
  transition: all 250ms ease-out !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  flex: 0 0 auto !important;
}

button.gnpag-arrow:hover {
  border-color: var(--cc-primary-300, #c4b5fd) !important;
  color: var(--cc-primary-600, #7c3aed) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.12) !important;
}

button.gnpag-arrow.gnpag-arrow-disabled {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* Pill blanco con los números */
.gnpag-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: white !important;
  padding: 6px !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06) !important;
  border: 1.5px solid rgba(124, 58, 237, 0.08) !important;
  flex: 0 0 auto !important;
  width: auto !important;
}

/* Botones numéricos */
button.gnpag-num {
  all: unset !important;
  box-sizing: border-box !important;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  padding: 0 !important;
  border-radius: 10px !important;
  border: 1.5px solid var(--cc-neutral-200, #e2e8f0) !important;
  background: white !important;
  color: var(--cc-neutral-700, #334155) !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  font-family: var(--gn-font-body) !important;
  cursor: pointer !important;
  transition: all 250ms ease-out !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

button.gnpag-num:hover {
  border-color: var(--cc-primary-300, #c4b5fd) !important;
  color: var(--cc-primary-600, #7c3aed) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.12) !important;
}

button.gnpag-num.gnpag-num-active {
  background: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%) !important;
  color: white !important;
  border-color: transparent !important;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35) !important;
  transform: scale(1.05) !important;
}

button.gnpag-num.gnpag-num-active:hover {
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45) !important;
  transform: scale(1.08) !important;
}

/* Ellipsis */
.gnpag-ellipsis {
  padding: 0 10px !important;
  color: var(--cc-neutral-400, #94a3b8) !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
}

/* Info "Página 2 de 4" */
.gnpag-info {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 4px !important;
  padding: 6px 14px !important;
  background: rgba(124, 58, 237, 0.04) !important;
  border-radius: 20px !important;
  border: 1px solid rgba(124, 58, 237, 0.1) !important;
}

.gnpag-info-label {
  font-size: 0.82rem !important;
  color: var(--cc-neutral-500, #64748b) !important;
  font-weight: 400 !important;
}

.gnpag-info-num {
  font-size: 0.88rem !important;
  color: var(--cc-primary-600, #7c3aed) !important;
  font-weight: 700 !important;
  font-family: var(--gn-font-display) !important;
}

/* Containers */
.gallery-new-main-container {
  position: relative;
  min-height: 400px;
  overflow: visible;
}

#pagination-container {
  overflow: visible;
}

/* Responsive */
@media (max-width: 768px) {
  .gnpag-pill { flex-wrap: wrap !important; justify-content: center !important; }
}


/* ═══════════════════════════════════════════════════════════════
   LIBRARY DOWNLOAD DROPDOWN — Selector de formato en modal
   Mismo diseño que generate_design, adaptado al sidebar del modal
   ═══════════════════════════════════════════════════════════════ */

/* Wrapper */
.gn-dl-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

/* Trigger */
.gn-dl-trigger {
    cursor: pointer;
    user-select: none;
    width: 100%;
}

/* Chevron rota al abrir */
.gn-dl-wrapper:focus-within .gn-dl-trigger .fa-chevron-up {
    transform: rotate(180deg);
}

/* Dropdown — abre hacia ARRIBA */
.gn-dl-dropdown {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: 220px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 6px;
    box-shadow:
        0 -8px 30px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.97);
    transition:
        opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0.2s;
    z-index: 100;
}

/* Flecha del dropdown */
.gn-dl-dropdown::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: rgba(15, 23, 42, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mostrar al focus */
.gn-dl-wrapper:focus-within .gn-dl-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Cada opción */
.gn-dl-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    text-align: left;
}

.gn-dl-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.gn-dl-option:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.15);
}

/* Ícono circular */
.gn-dl-opt-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Texto */
.gn-dl-opt-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.gn-dl-opt-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.02em;
}

.gn-dl-opt-desc {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 400;
}

/* Responsive */
@media (max-width: 768px) {
    .gn-dl-dropdown {
        min-width: 200px;
    }
}