/* Admin CSS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #f5f5f5;
}

/* Login Screen */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
  background: #ffffff;
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header h1 {
  font-size: 2rem;
  color: #333;
  margin-bottom: 0.5rem;
}

.login-header p {
  color: #666;
  font-size: 0.9rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 500;
  color: #333;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select.form-control {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  min-height: 2.5rem;
  box-sizing: border-box;
}

.form-group select.form-control {
  width: 100%;
  max-width: 100%;
  cursor: pointer;
  background-color: #fff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select.form-control:focus {
  outline: none;
  border-color: #667eea;
}

.form-help {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #666;
  font-style: italic;
}

.btn-login {
  padding: 0.75rem 1.5rem;
  background: #667eea;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-login:hover {
  background: #5568d3;
}

.error-message {
  background: #fee;
  color: #c33;
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

#login-error {
  display: none;
}

#login-error.login-error-visible {
  display: block;
}

.success-message {
  background: #efe;
  color: #2a5;
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.login-footer {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.link-reset-password {
  color: #667eea;
  text-decoration: none;
}

.link-reset-password:hover {
  text-decoration: underline;
}

.reset-password-block {
  margin-top: 0;
}

.reset-password-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: #333;
}

.reset-password-desc {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1.5rem;
}

/* Admin Container */
.admin-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: 280px;
  background: #222222;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.admin-logo {
  padding: 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid #333;
}

.admin-logo i {
  font-size: 1.75rem;
}

.admin-nav {
  flex: 1;
  padding: 1rem 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: #ffffff;
  text-decoration: none;
  transition: background 0.3s ease;
  cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
  background: #333;
}

.nav-item i {
  width: 20px;
  text-align: center;
}

.nav-item-wrapper {
  position: relative;
}

.nav-submenu {
  display: flex;
  flex-direction: column;
  padding-left: 2.75rem;
  padding-bottom: 0.5rem;
  gap: 0.25rem;
}

.nav-subitem {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-subitem:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-subitem.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.nav-subitem i {
  width: 16px;
  text-align: center;
  opacity: 0.9;
}

.admin-user {
  padding: 1.5rem;
  border-top: 1px solid #333;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.user-info i {
  font-size: 1.5rem;
}

.btn-logout {
  width: 100%;
  padding: 0.75rem;
  background: transparent;
  color: #ffffff;
  border: 1px solid #444;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.3s ease;
  text-decoration: none;
  box-sizing: border-box;
}

.btn-logout:hover {
  background: #333;
}

/* Main Content */
.admin-main {
  flex: 1;
  margin-left: 280px;
  padding: 2rem;
}

.admin-header {
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-header h1 {
  font-size: 2rem;
  color: #333;
  margin-bottom: 0;
}

.admin-header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.content-fetched-at {
  font-size: 0.9rem;
  color: #666;
  white-space: nowrap;
}

.content-fetched-at i {
  margin-right: 0.25rem;
}

.btn-refresh-data {
  padding: 0.5rem 1rem;
  background: #f0f0f0;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.2s ease;
}

.btn-refresh-data:hover {
  background: #e5e5e5;
}

.form-inline-refresh {
  margin: 0;
}

/* Legacy: notificación en header (se mantiene por si algo la usa) */
.notification {
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-weight: 500;
}

.notification.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.notification.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Toasts: Notyf trae sus propios estilos (/vendor/notyf/notyf.min.css) */

/* Admin Sections */
.admin-section {
  background: #ffffff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.admin-section h2 {
  font-size: 1.5rem;
  color: #333;
  margin-bottom: 1.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-description {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #666;
  font-size: 0.95rem;
  line-height: 1.4;
}

.btn-preview {
  padding: 0.75rem 1.5rem;
  background: #17a2b8;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  transition: background 0.3s ease;
}

.btn-preview:hover {
  background: #138496;
}

.editor-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.preview-panel {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  position: sticky;
  top: 2rem;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #ddd;
}

.preview-header h3 {
  font-size: 1.2rem;
  color: #333;
}

.btn-close-preview {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.btn-close-preview:hover {
  background: #e9ecef;
}

.preview-content {
  position: relative;
}

/* Hero Preview Styles */
.hero-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero-image-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-image-preview::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.5) 100%
  );
  z-index: 2;
}

.hero-content-preview {
  position: relative;
  z-index: 3;
  text-align: center;
  color: #ffffff;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.hero-pretitle-preview {
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  opacity: 0.9;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-title-preview {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-actions-preview {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn-hero-preview {
  padding: 0.75rem 2rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
}

.btn-hero-preview:hover {
  background: #ffffff;
  color: #000000;
  border-color: #000000;
  text-decoration: none;
}

.form-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.btn-preview-inline {
  padding: 0.75rem 1.5rem;
  background: #17a2b8;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  transition: background 0.3s ease;
}

.btn-preview-inline:hover {
  background: #138496;
}

@media (min-width: 1200px) {
  .editor-layout {
    grid-template-columns: 1fr 1fr;
  }
}

/* Forms */
.admin-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.admin-subsection {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  background: #fafafa;
}

.admin-subsection legend {
  font-weight: 600;
  padding: 0 0.5rem;
}

.admin-subsection .subsection-hint,
.form-hint {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 0.75rem;
}

.form-hint code {
  background: #eee;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.85em;
}

.icon-picker-row,
.color-input-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.icon-picker-row select { min-width: 220px; }
.icon-picker-row input[name="whatsapp_iconClass"] { flex: 1; min-width: 160px; }
.color-input-row input[type="color"] { width: 48px; height: 38px; padding: 2px; cursor: pointer; }
.color-input-row input[type="text"] { width: 120px; }

.link-type-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.link-type-row .radio-label { display: inline-flex; align-items: center; gap: 0.35rem; cursor: pointer; font-weight: normal; }
.link-input-row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.link-input-row .form-control { flex: 1; min-width: 100%; }
.link-input-row select.form-control { max-width: 100%; }
.link-input-row input.form-control { width: 100%; }
.item-card-child { margin-left: 1.5rem; border-left: 2px solid #e0e0e0; }

.image-upload-group {
  display: flex;
  gap: 0.5rem;
}

.image-source-toggle {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: #444;
}

.image-source-toggle label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.image-url-group {
  display: block;
}

.image-url-group .form-control {
  width: 100%;
  box-sizing: border-box;
}

.image-upload-group .form-control {
  flex: 1;
}

.image-upload-group input:disabled,
.image-url-group input:disabled {
  background: #f0f0f0;
  cursor: not-allowed;
  color: #888;
}

.image-upload-group input[readonly] {
  background: #f5f5f5;
  cursor: default;
  color: #333;
}

.btn-upload {
  padding: 0.75rem 1.5rem;
  background: #667eea;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.3s ease;
}

.btn-upload:hover {
  background: #5568d3;
}

.btn-upload:disabled {
  opacity: 0.8;
  cursor: not-allowed;
}

.upload-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #666;
  font-size: 0.9rem;
  min-height: 1.5rem;
}

.upload-status:not(:empty) {
  margin-left: 0.25rem;
}

.upload-status .fa-spinner {
  color: #667eea;
}

.btn-save:disabled {
  opacity: 0.85;
  cursor: wait;
}

.image-preview {
  margin-top: 0.5rem;
}

.image-preview img {
  max-width: 200px;
  max-height: 200px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid #ddd;
}

.image-preview-status {
  font-size: 0.75rem;
  margin-top: 0.25rem;
  opacity: 0.7;
}

.btn-save {
  padding: 0.75rem 2rem;
  background: #28a745;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  transition: background 0.3s ease;
}

.btn-save:hover {
  background: #218838;
}

.btn-publish {
  padding: 0.75rem 2rem;
  background: #ff6b35;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.3s ease;
  margin-left: auto;
}

.btn-save-current {
  padding: 0.75rem 2rem;
  background: #1f7aec;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.3s ease;
}

.btn-save-current:hover {
  background: #1966c5;
}

.btn-publish:hover {
  background: #e55a2b;
}

.btn-publish:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Items List */
.items-list {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.items-list + .btn-add {
  margin-top: 0.5rem;
}

#projects-section .items-list,
#testimonials-section .items-list {
  margin-top: 1.5rem;
}

/* Submenú de sección: pestañas Configuración / Lista */
.section-subnav {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e0e0e0;
}

.section-subnav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  color: #666;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.section-subnav-link:hover {
  background: #f0f0f0;
  color: #333;
}

.section-subnav-link.active {
  background: #667eea;
  color: #fff;
}

.section-submenu-panels {
  position: relative;
}

.section-submenu-panel {
  display: none;
}

.section-submenu-panel.active {
  display: block;
}

/* Checkbox estándar "Sección activa" y preview de mapa */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  cursor: pointer;
}

.map-preview-group {
  margin-top: 1rem;
}

.map-preview {
  margin-top: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: #f9f9f9;
  min-height: 120px;
}

.map-preview iframe {
  display: block;
}

.map-preview-placeholder {
  padding: 1.5rem;
  color: #666;
  font-size: 0.95rem;
  margin: 0;
}

.item-card {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
}

.item-card-content {
  flex: 1;
}
#testimonials-list .item-card-content img {
  cursor: pointer;
}

.item-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
}

.item-card-subtitle {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.item-card-meta {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #888;
}

.item-card-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-edit,
.btn-delete {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.btn-edit {
  background: #667eea;
  color: #ffffff;
}

.btn-edit:hover {
  background: #5568d3;
}

.btn-delete {
  background: #dc3545;
  color: #ffffff;
}

.btn-delete:hover {
  background: #c82333;
}

.btn-add {
  padding: 0.75rem 1.5rem;
  background: #28a745;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  transition: background 0.3s ease;
}

.btn-add:hover {
  background: #218838;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1001;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #ddd;
}

.modal-header h3 {
  font-size: 1.5rem;
  color: #333;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: #666;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #333;
}

.modal-body {
  padding: 1.5rem;
}

.modal-body .admin-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-body .form-group {
  margin-bottom: 0;
}

/* Modal galería de imágenes (click en .image-preview img) */
.image-gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
}

.image-gallery-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 95vw;
  max-height: 95vh;
  z-index: 1101;
}

.image-gallery-viewport {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-gallery-viewport img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.image-gallery-close {
  position: absolute;
  top: -48px;
  right: 0;
  background: none;
  border: none;
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  padding: 0.5rem;
  z-index: 1102;
  opacity: 0.9;
}

.image-gallery-close:hover {
  opacity: 1;
}

.image-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1102;
  transition: background 0.2s;
}

.image-gallery-nav:hover {
  background: rgba(255, 255, 255, 0.35);
}

.image-gallery-prev {
  left: -56px;
}

.image-gallery-next {
  right: -56px;
}

.image-gallery-counter {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .image-gallery-prev {
    left: 8px;
  }
  .image-gallery-next {
    right: 8px;
  }
  .image-gallery-close {
    top: 8px;
    right: 8px;
  }
}

/* Página Releases */
.section-description {
  color: #666;
  font-size: 0.95rem;
  margin-top: 0.5rem;
  max-width: 640px;
}
.releases-content {
  margin-top: 1rem;
}
.releases-current {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: #f0f7ff;
  border-radius: 8px;
  border: 1px solid #cce0ff;
}
.releases-current-label {
  font-weight: 600;
  margin-right: 0.5rem;
}
.releases-current-id {
  font-family: ui-monospace, monospace;
  font-size: 0.9rem;
}
.releases-loading {
  color: #666;
  padding: 1rem;
}
.releases-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.releases-table th,
.releases-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}
.releases-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #333;
}
.releases-row-current {
  background: #f0f7ff;
}
.releases-id {
  font-size: 0.85rem;
  background: #eee;
  padding: 0.2em 0.4em;
  border-radius: 4px;
}
.releases-date {
  font-size: 0.85rem;
  color: #666;
}
.releases-badge {
  display: inline-block;
  padding: 0.2em 0.5em;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}
.releases-badge-current {
  background: #28a745;
  color: #fff;
}

/* Tabla genérica admin (ej. gestión de usuarios) */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.admin-table th,
.admin-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}
.admin-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #333;
}
.uid-cell-wrap {
  white-space: nowrap;
  width: 1%;
  min-width: 8.5rem;
  padding-right: 0.5rem;
}
.uid-cell-wrap code.uid-cell {
  font-size: 0.85rem;
  background: #eee;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  display: inline-block;
  width: 5.5em;
  min-width: 5.5em;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  box-sizing: border-box;
}
.uid-cell-wrap .btn-copy-uid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  min-width: 1.75rem;
  padding: 0;
  margin-left: 0.35rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f5f5f5;
  color: #666;
  cursor: pointer;
  vertical-align: middle;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.uid-cell-wrap .btn-copy-uid:hover {
  background: #eee;
  color: #333;
  border-color: #ccc;
}
.uid-cell-wrap .btn-copy-uid.uid-copied {
  background: #28a745;
  color: #fff;
  border-color: #28a745;
}
.badge {
  display: inline-block;
  padding: 0.2em 0.5em;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}
.badge-primary {
  background: #667eea;
  color: #fff;
}
.badge-secondary {
  background: #e0e0e0;
  color: #333;
}

.btn-restore-release {
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.btn-restore-release:hover:not(:disabled) {
  background: #0056b3;
}
.btn-restore-release:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Deploys Netlify: mismo estilo que releases */
.btn-restore-deploy {
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.btn-restore-deploy:hover:not(:disabled) {
  background: #0056b3;
}
.btn-restore-deploy:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.deploys-row-current {
  background: #f0f7ff;
}
.deploys-badge-current {
  display: inline-block;
  padding: 0.2em 0.5em;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #28a745;
  color: #fff;
}
.btn-delete-deploy {
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  background: #dc3545;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-left: 0.25rem;
}
.btn-delete-deploy:hover:not(:disabled) {
  background: #c82333;
}
.btn-delete-deploy:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.deploys-site-card {
  margin-bottom: 1.25rem;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.deploys-site-card-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}
.deploys-site-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.deploys-site-card-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #28a745;
  flex-shrink: 0;
}
.deploys-site-card-name {
  font-weight: 600;
  color: #333;
  font-size: 1rem;
}
.deploys-site-card-link {
  color: #667eea;
  font-weight: 500;
  text-decoration: none;
  font-size: 1rem;
}
.deploys-site-card-link:hover {
  text-decoration: underline;
  color: #5568d3;
}
.deploys-site-card-all-links {
  margin-left: auto;
}
.deploys-links-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 60vh;
  overflow-y: auto;
}
.deploys-links-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.deploys-links-list li:last-child {
  border-bottom: none;
}
.deploys-links-list a {
  color: #667eea;
  text-decoration: none;
  word-break: break-all;
}
.deploys-links-list a:hover {
  text-decoration: underline;
}
.deploys-links-list .deploys-links-badge {
  font-size: 0.75rem;
  padding: 0.15em 0.5em;
  border-radius: 4px;
  background: #28a745;
  color: #fff;
  flex-shrink: 0;
}

.releases-empty {
  padding: 1.5rem;
  color: #666;
  background: #f8f9fa;
  border-radius: 8px;
}
.releases-error {
  color: #dc3545;
}

/* Biblioteca Cloudinary (galería de medios) */
.gallery-divider {
  margin: 2rem 0;
  border: none;
  border-top: 1px solid #dee2e6;
}
.cloudinary-library-header {
  margin-bottom: 1rem;
}
.cloudinary-library-header h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1.25rem;
}
.cloudinary-loading,
.cloudinary-empty {
  padding: 1.5rem;
  color: #666;
}
.cloudinary-error {
  color: #dc3545;
  padding: 0.5rem 0;
}
.cloudinary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.cloudinary-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid #eee;
}
.cloudinary-card-preview {
  aspect-ratio: 1;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cloudinary-card-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}
.cloudinary-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem;
  border-top: 1px solid #eee;
}
.cloudinary-card-id {
  font-size: 0.75rem;
  color: #666;
  padding: 0 0.5rem 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cloudinary-card .btn-small {
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}
.cloudinary-card .btn-copy-url {
  background: #e9ecef;
  color: #333;
}
.cloudinary-card .btn-copy-url:hover {
  background: #dee2e6;
}
.cloudinary-card .btn-danger {
  background: #f8d7da;
  color: #721c24;
}
.cloudinary-card .btn-danger:hover {
  background: #f5c6cb;
}
.cloudinary-load-more {
  margin-top: 1rem;
  text-align: center;
}
.cloudinary-load-more .btn-secondary {
  padding: 0.5rem 1rem;
  background: #6c757d;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.cloudinary-load-more .btn-secondary:hover {
  background: #5a6268;
}

/* Página Assets: zona de subida */
.assets-header {
  margin-bottom: 1.5rem;
}
.assets-header h2 {
  margin: 0 0 0.25rem 0;
}
.assets-upload-zone {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px dashed #dee2e6;
}
.assets-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.assets-file-input {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}
.assets-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #0d6efd;
  color: #fff;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.assets-upload-btn:hover {
  background: #0b5ed7;
}
.assets-upload-status {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #666;
}

/* Sidebar colapsado: solo iconos + tooltip (tablet vertical, ventanas angostas) */
@media (max-width: 1400px) {
  .admin-sidebar {
    width: 64px;
  }

  .admin-main {
    margin-left: 64px;
  }

  .admin-logo {
    justify-content: center;
    padding: 1rem;
  }

  .admin-logo span {
    display: none;
  }

  .admin-nav {
    padding: 0.5rem 0;
  }

  .nav-item {
    justify-content: center;
    padding: 0.75rem;
  }

  .nav-item-label {
    display: none;
  }

  .admin-user {
    padding: 1rem;
  }

  .user-info span {
    display: none;
  }

  .user-info {
    justify-content: center;
  }

  .btn-logout span {
    display: none;
  }

  .btn-logout {
    justify-content: center;
    padding: 0.75rem;
  }
}

/* ——— Footer (admin): secciones e ítems ——— */
.footer-logo-group .form-help { margin-top: 0.5rem; font-size: 0.85rem; color: #666; }
.footer-sections-list { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 1rem; }
.footer-section-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.footer-section-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.footer-section-title { flex: 1; min-width: 200px; }
.footer-section-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.footer-section-items { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.75rem; }
.footer-item-row {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  padding: 0.4rem 0; border-bottom: 1px solid #f0f0f0;
}
.footer-item-row:last-child { border-bottom: none; }
.footer-item-type { width: 100px; flex-shrink: 0; }
.footer-item-text { flex: 1; min-width: 140px; }
.footer-item-link-fields { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; flex: 1; min-width: 0; }
.footer-item-icon-fields { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; flex: 1; min-width: 0; }
.footer-item-type-text .footer-item-link-fields,
.footer-item-type-text .footer-item-icon-fields { display: none; }
.footer-item-type-link .footer-item-icon-fields { display: none; }
.footer-item-type-icon .footer-item-link-fields { display: none; }
.footer-item-type-icon .footer-item-icon-fields { display: flex; }
.footer-item-icon-preset { width: 140px; flex-shrink: 0; }
.footer-item-icon-class { width: 200px; min-width: 140px; }
.footer-item-url { flex: 1; min-width: 160px; }
.footer-item-newtab { white-space: nowrap; font-weight: normal; font-size: 0.9rem; margin: 0; display: flex; align-items: center; gap: 0.35rem; }

/* Botones secundarios (Agregar ítem, Agregar sección) */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #495057;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn-secondary:hover {
  background: #e9ecef;
  border-color: #ced4da;
  color: #212529;
}

/* Agregar ítem: mismo estilo secundario, algo de margen */
.btn-add-item {
  margin-top: 0.25rem;
}
.btn-add-item.btn-secondary {
  padding: 0.45rem 0.9rem;
  font-size: 0.875rem;
}

/* Agregar sección: más visible, tipo CTA secundario */
.btn-add-section.btn-secondary {
  margin-top: 0.5rem;
  padding: 0.65rem 1.25rem;
  width: 100%;
  justify-content: center;
  background: #e9ecef;
  border: 1px dashed #adb5bd;
  color: #495057;
}
.btn-add-section.btn-secondary:hover {
  background: #dee2e6;
  border-color: #868e96;
  border-style: solid;
}

/* Eliminar sección: acción destructiva */
.btn-remove-section.btn-secondary {
  color: #c82333;
  background: #fff;
  border-color: #f5c6cb;
}
.btn-remove-section.btn-secondary:hover {
  background: #f8d7da;
  border-color: #f5c6cb;
  color: #bd2130;
}

/* Icon buttons: subir/bajar sección */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  color: #495057;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn-icon:hover {
  background: #e9ecef;
  border-color: #ced4da;
  color: #212529;
}
.btn-icon i {
  font-size: 0.8rem;
}
.btn-move-section {
  margin-left: 0;
}

/* Eliminar ítem (icono basura) */
.btn-remove-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  color: #c82333;
  background: #fff;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.btn-remove-item:hover {
  background: #f8d7da;
  border-color: #f5c6cb;
  color: #bd2130;
}
.btn-remove-item i {
  font-size: 0.8rem;
}

/* En tablet/móvil el sidebar sigue en 64px (solo iconos) para dar espacio al contenido.
   El modo colapsado de 1200px se mantiene hasta pantallas muy pequeñas. */
