:root {
  --bg-main: #0B0E14;
  --bg-card: #151922;
  --bg-card-hover: #1C222E;
  --bg-card-border: #252D3D;
  --text-main: #F0F4F8;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  
  --primary: #47C7FC;
  --primary-hover: #38B2E6;
  --primary-glow: rgba(71, 199, 252, 0.2);
  
  --accent: #FF8000;
  --accent-glow: rgba(255, 128, 0, 0.2);
  
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  
  --sidebar-width: 260px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family);
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-card);
  border-right: 1px solid var(--bg-card-border);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px 24px;
  border-bottom: 1px solid var(--bg-card-border);
  margin-bottom: 24px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.brand-info h2 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.brand-info span {
  font-size: 11px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.nav-item.active {
  background: rgba(71, 199, 252, 0.12);
  color: var(--primary);
  border-color: rgba(71, 199, 252, 0.25);
  font-weight: 600;
}

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

.sidebar-status {
  padding: 14px;
  background: rgba(21, 25, 34, 0.8);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  font-size: 12px;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
  margin-right: 6px;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.status-dot.warning {
  background: var(--warning);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

/* MAIN CONTENT */
.main-container {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 18px 24px;
  max-width: 1650px;
}

.view-section {
  display: none;
}

.view-section.active {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

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

.header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.page-title h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.page-title p {
  font-size: 14px;
  color: var(--text-muted);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #2BA8E0);
  color: #0B0E14;
  box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #5CD0FF, var(--primary));
  transform: translateY(-1px);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), #E06D00);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-accent:hover {
  background: linear-gradient(135deg, #FF9426, var(--accent));
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--bg-card-border);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-dim);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

/* STATS GRID */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.stat-icon.blue { background: rgba(71, 199, 252, 0.12); color: var(--primary); }
.stat-icon.orange { background: rgba(255, 128, 0, 0.12); color: var(--accent); }
.stat-icon.green { background: rgba(16, 185, 129, 0.12); color: var(--success); }
.stat-icon.purple { background: rgba(168, 85, 247, 0.12); color: #A855F7; }

.stat-info .stat-value {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 2px;
}

.stat-info .stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* CARDS */
.card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 16px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bg-card-border);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* FILTERS */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.search-input-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.search-input-wrap input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 14px;
}

.search-input-wrap input:focus {
  outline: none;
  border-color: var(--primary);
}

.filter-select {
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 14px;
  cursor: pointer;
}

/* TABLE */
.events-table-wrap {
  overflow-x: auto;
}

.events-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.events-table th {
  padding: 12px 16px;
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  border-bottom: 1px solid var(--bg-card-border);
}

.events-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(37, 45, 61, 0.5);
  font-size: 14px;
  vertical-align: middle;
}

.events-table tr:hover td {
  background: rgba(28, 34, 46, 0.5);
}

.event-cell-thumb {
  width: 93px;
  height: 62px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #1A1D26;
  border: 1px solid var(--bg-card-border);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-published {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-draft {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-scheduled {
  background: rgba(71, 199, 252, 0.15);
  color: var(--primary);
  border: 1px solid rgba(71, 199, 252, 0.3);
}

/* DROPZONE */
.dropzone {
  border: 2px dashed var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 40px 24px;
  text-align: center;
  background: rgba(21, 25, 34, 0.5);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 24px;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: rgba(71, 199, 252, 0.05);
}

.dropzone-icon {
  font-size: 42px;
  color: var(--primary);
  margin-bottom: 12px;
}

.dropzone h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.dropzone p {
  font-size: 13px;
  color: var(--text-muted);
}

/* PHOTO GRID */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.photo-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  transition: transform 0.2s ease;
}

.photo-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
}

.photo-card.selected-ig {
  border: 2px solid var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.photo-card.size-warning {
  border-color: var(--warning);
}

.photo-thumb-wrap {
  width: 100%;
  height: 140px;
  position: relative;
  background: #000;
}

.photo-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-orientation-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,0.75);
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.photo-ig-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.photo-size-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,0.75);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
}

.photo-size-badge.exceeded {
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
  font-weight: bold;
}

.photo-info {
  padding: 12px;
  font-size: 11px;
  color: var(--text-muted);
}

.photo-id {
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-original-name {
  font-size: 11px;
  color: var(--primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* FORMS */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.form-group {
  margin-bottom: 8px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-main);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

/* CAROUSEL STUDIO */
.carousel-split-box {
  background: rgba(255, 128, 0, 0.06);
  border: 1px solid rgba(255, 128, 0, 0.25);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}

.carousel-post-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.post-slide-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}

/* REORDENADOR DE SLIDES DE INSTAGRAM */
.post-slide-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 4px 14px 4px;
  align-items: flex-start;
}

.slide-item {
  width: 100px;
  height: 125px;
  border-radius: var(--radius-sm);
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  background: #111;
  border: 1px solid var(--bg-card-border);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  cursor: grab;
  user-select: none;
}

.slide-item:active {
  cursor: grabbing;
}

.slide-item.is-cover {
  border: 2px solid var(--accent);
  box-shadow: 0 0 12px rgba(255, 107, 107, 0.35);
}

.slide-item.dragging {
  opacity: 0.4;
  transform: scale(0.92);
}

.slide-item.drag-over {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 4px 14px rgba(71, 199, 252, 0.4);
}

.slide-item .slide-img-wrap {
  width: 100%;
  height: 80px;
  position: relative;
  overflow: hidden;
}

.slide-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.slide-badge-cover {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 9px;
  font-weight: 800;
  background: var(--accent);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
  z-index: 2;
}

.slide-badge-num {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 9px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 1px 5px;
  border-radius: 4px;
  z-index: 2;
}

.slide-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  background: rgba(15, 23, 42, 0.95);
  height: 45px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.btn-slide-ctrl {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-main);
  border-radius: 4px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.btn-slide-ctrl:hover:not(:disabled) {
  background: var(--primary);
  color: #000;
}

.btn-slide-ctrl:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.btn-slide-star {
  background: rgba(255, 107, 107, 0.15);
  border-color: rgba(255, 107, 107, 0.3);
  color: var(--accent);
  width: auto;
  padding: 0 6px;
  font-size: 9px;
  font-weight: 600;
  gap: 3px;
}

.btn-slide-star.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.slide-item.cta-slide {
  cursor: default;
  height: 125px;
  border: 2px dashed var(--primary);
  background: rgba(71, 199, 252, 0.06);
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* MODALS */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
}

.progress-bar-wrap {
  width: 100%;
  height: 10px;
  background: var(--bg-card-border);
  border-radius: 5px;
  overflow: hidden;
  margin: 16px 0;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  width: 0%;
  transition: width 0.2s ease;
}


/* PORTADA & REORDENAMIENTO EN GRILLA PRINCIPAL (PASO 2) */
.photo-card {
  user-select: none;
  transition: all 0.2s ease;
  cursor: grab;
}

.photo-card:active {
  cursor: grabbing;
}

.photo-card.is-main-cover {
  border: 2px solid var(--accent) !important;
  box-shadow: 0 0 16px rgba(255, 107, 107, 0.4) !important;
}

.photo-badge-cover-main {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent);
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.6);
  z-index: 5;
}

.photo-card-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid var(--bg-card-border);
}

.btn-card-ctrl {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-main);
  border-radius: 4px;
  height: 26px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
  gap: 4px;
}

.btn-card-ctrl:hover:not(:disabled) {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
}

.btn-card-ctrl:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.btn-card-cover {
  background: rgba(255, 107, 107, 0.12);
  border-color: rgba(255, 107, 107, 0.3);
  color: var(--accent);
  font-weight: 700;
}

.btn-card-cover.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* CTA SLIDE 10 MEJORADO */
.slide-item.cta-slide-enhanced {
  width: 140px;
  height: 135px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 2px dashed var(--primary);
  background: rgba(15, 23, 42, 0.95);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 8px;
  cursor: default;
}


/* ACTION BUTTONS & TABLE CELLS */
.action-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-action {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--bg-card-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 13px;
}

.btn-action:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--text-dim);
  transform: translateY(-1px);
}

.btn-action-view:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(71, 199, 252, 0.12);
}

.btn-action-edit:hover {
  color: var(--warning);
  border-color: var(--warning);
  background: rgba(245, 158, 11, 0.12);
}

.btn-action-ig:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(255, 128, 0, 0.12);
}

.btn-action-delete:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.12);
}

.event-cell-thumb-placeholder {
  width: 93px;
  height: 62px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bg-card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 18px;
}

/* ==================================================== */
/* MEJORAS DE HISTORIAL Y SELECCION DE INSTAGRAM */
/* ==================================================== */
.photo-ig-published-tag {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(16, 185, 129, 0.92);
  color: #FFFFFF;
  font-size: 8.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 3px;
}

.photo-ig-unpublished-tag {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(51, 65, 85, 0.85);
  color: #CBD5E1;
  font-size: 8.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  z-index: 4;
}

.post-card-preview {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
  transition: border-color 0.2s ease;
}

.post-card-preview.status-published {
  border-left: 4px solid #10B981;
}

.post-card-preview.status-failed {
  border-left: 4px solid #EF4444;
}

.post-card-preview.status-pending {
  border-left: 4px solid var(--primary);
}

.btn-publish-single-post {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 4px;
  background: rgba(71, 199, 252, 0.12);
  color: var(--primary);
  border: 1px solid rgba(71, 199, 252, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-publish-single-post:hover {
  background: var(--primary);
  color: #000;
}


.brand {
  transition: transform 0.2s ease, filter 0.2s ease;
}
.brand:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.sidebar-quick-links {
  margin-top: auto;
  margin-bottom: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--bg-card-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-section-label {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.8px;
  margin-bottom: 2px;
  padding-left: 4px;
  text-transform: uppercase;
}

.sidebar-quick-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.sidebar-quick-link:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: rgba(71, 199, 252, 0.35);
  transform: translateX(2px);
}

.quick-ext-icon {
  margin-left: auto;
  font-size: 9px;
  opacity: 0.45;
}


/* FILTER TABS EN MODAL DE INSTAGRAM */
.ig-filter-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--bg-card-border);
  flex-wrap: wrap;
}

.ig-filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ig-filter-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
}

.ig-filter-tab.active {
  background: rgba(71, 199, 252, 0.16);
  color: var(--primary);
  border-color: rgba(71, 199, 252, 0.4);
  box-shadow: 0 2px 8px rgba(71, 199, 252, 0.2);
}

.ig-filter-tab.highlight-unpub.active {
  background: rgba(16, 185, 129, 0.2);
  color: #10B981;
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.ig-modal-grid {
  max-height: 300px;
  overflow-y: auto;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
  gap: 10px !important;
  padding: 8px !important;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  border: 1px solid var(--bg-card-border);
}

.ig-modal-grid .photo-thumb-wrap {
  height: 110px !important;
}

/* CTA SLIDE ENHANCED PREVIEW */
.slide-item.cta-slide-enhanced {
  width: 170px !important;
  height: 145px !important;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 2px dashed var(--primary);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.98)) !important;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 8px !important;
  box-shadow: 0 4px 14px rgba(71, 199, 252, 0.18);
}

.cta-title-main {
  font-size: 11px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 3px;
  line-height: 1.2;
}

.cta-sub-text {
  font-size: 8.5px;
  color: #94A3B8;
  margin-bottom: 5px;
}

.cta-url-badge {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--primary);
  background: rgba(71, 199, 252, 0.14);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(71, 199, 252, 0.35);
  margin-bottom: 4px;
}

.cta-link-hint {
  font-size: 8px;
  color: #FFFFFF;
  font-weight: 600;
}


/* CARRUSELES Y STRIP HORIZONTAL (STUDIO Y MODAL DE INSTAGRAM) */
.carousel-preview-track,
.post-slide-strip {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
  overflow-x: auto !important;
  padding: 8px 4px 12px 4px !important;
  align-items: flex-start !important;
  scrollbar-width: thin;
  min-height: 155px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.carousel-preview-track.track-drag-over,
.post-slide-strip.track-drag-over {
  background: rgba(71, 199, 252, 0.08) !important;
  border-color: var(--primary) !important;
}

.carousel-preview-track .slide-item,
.post-slide-strip .slide-item {
  width: 105px !important;
  height: 135px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

.carousel-preview-track .slide-item .slide-img-wrap,
.post-slide-strip .slide-item .slide-img-wrap {
  width: 100% !important;
  height: 85px !important;
  position: relative !important;
  overflow: hidden !important;
}

.carousel-preview-track .slide-item img,
.post-slide-strip .slide-item img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.carousel-preview-track .slide-controls,
.post-slide-strip .slide-controls {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 3px 5px !important;
  background: rgba(15, 23, 42, 0.95) !important;
  height: 50px !important;
}

.slide-item.dragging {
  opacity: 0.35 !important;
  transform: scale(0.92) !important;
}

.slide-item.drag-over {
  border-color: var(--accent) !important;
  transform: translateY(-4px) !important;
  box-shadow: 0 4px 16px rgba(255, 128, 0, 0.4) !important;
}


/* FIXES FOR IG REPUBLISH MODAL AND UI DENSITY */
.carousel-preview-track {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    gap: 10px;
    padding: 10px;
}
.carousel-preview-track .slide-item {
    flex: 0 0 auto !important;
    width: 100px !important;
    height: 100px !important;
}
/* Reduce padding and margins to make UI less annoying */
.view-section {
    padding: 10px !important;
}
.card {
    padding: 15px !important;
    margin-bottom: 10px !important;
}
/* Increase thumbnail sizes in grid */
.photo-thumb-wrap {
    height: 150px !important;
}
.photo-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#photo-preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
}




#edit-photos-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
#edit-photos-grid .photo-thumb-wrap {
  height: auto !important;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
#edit-photos-grid .photo-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
}




/* =========================================================
   DAERBON / DAVID BONUCCI ADMIN SUITE - DESIGN SYSTEM
   ========================================================= */

/* Modal Dimensions & Layout */
#edit-event-modal .modal-content {
  max-width: min(1500px, 96vw) !important;
  width: 96vw !important;
  max-height: 94vh !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 18px 24px !important;
}

#edit-event-modal .form-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
  gap: 10px !important;
}

#edit-event-modal .form-group {
  margin-bottom: 6px !important;
}

#edit-event-modal .form-group label {
  font-size: 11px !important;
  margin-bottom: 2px !important;
  color: var(--text-muted) !important;
}

#edit-event-modal .form-control {
  padding: 6px 10px !important;
  font-size: 13px !important;
}

#edit-event-modal textarea.form-control {
  padding: 6px 10px !important;
  font-size: 12px !important;
  min-height: 40px !important;
  height: 42px !important;
}

/* Photo Grid & Mathematical Squares (Aspect Ratio 1:1) */
.edit-photos-grid-container {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(var(--grid-item-size, 256px), 1fr)) !important;
  gap: 12px !important;
  align-content: start !important;
  padding: 6px !important;
}

.edit-photo-square {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  background: #08090d !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  border: none !important;
  outline: none !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.edit-photo-square:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.75) !important;
}

.edit-photo-square.is-cover-item {
  box-shadow: 0 0 0 3px #ffb703, 0 4px 18px rgba(255, 183, 3, 0.5) !important;
}

.edit-photo-square img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
  pointer-events: none !important;
}

/* Floating Overlays INSIDE image */
.edit-photo-top-bar {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  padding: 8px !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 6px !important;
  background: linear-gradient(180deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0) 100%) !important;
  z-index: 3 !important;
  pointer-events: none !important;
}

.edit-photo-bottom-bar {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  padding: 18px 8px 8px 8px !important;
  background: linear-gradient(0deg, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0) 100%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  z-index: 3 !important;
  pointer-events: none !important;
}

.btn-overlay-action {
  pointer-events: auto !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 6px !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.btn-overlay-action:hover {
  transform: scale(1.1) !important;
}

.btn-overlay-star {
  background: rgba(18, 18, 24, 0.82) !important;
  color: #cbd5e1 !important;
}

.btn-overlay-star.active {
  background: #ffb703 !important;
  color: #000 !important;
  box-shadow: 0 0 12px rgba(255, 183, 3, 0.7) !important;
}

.btn-overlay-delete {
  background: rgba(220, 53, 69, 0.85) !important;
  color: #fff !important;
}

/* Dashboard Table & Badges */
.event-cell-thumb {
  width: 112px !important;
  height: 75px !important;
  border-radius: var(--radius-sm) !important;
  object-fit: cover !important;
  background: #1A1D26 !important;
  border: 1px solid var(--bg-card-border) !important;
  display: block !important;
}

.events-table td {
  padding: 6px 10px !important;
  border-bottom: 1px solid var(--bg-card-border) !important;
  vertical-align: middle !important;
}

/* Instagram Column Badges with Exact Colors */
.badge-ig-none {
  background: rgba(148, 163, 184, 0.15) !important;
  color: #94a3b8 !important;
  border: 1px solid rgba(148, 163, 184, 0.35) !important;
}

.badge-ig-pending {
  background: rgba(234, 179, 8, 0.16) !important;
  color: #eab308 !important;
  border: 1px solid rgba(234, 179, 8, 0.4) !important;
}

.badge-ig-published {
  background: rgba(34, 197, 94, 0.15) !important;
  color: #22c55e !important;
  border: 1px solid rgba(34, 197, 94, 0.35) !important;
}
