:root {
  --bg: #0C0A08;
  --bg-card: #141210;
  --bg-hover: #1a1816;
  --border: #2a2622;
  --gold: #C9A84C;
  --gold-dim: rgba(201, 168, 76, 0.15);
  --text: #F0ECE4;
  --text-muted: #7A7265;
  --navy: #0F172A;
  --green: #22c55e;
  --red: #ef4444;
  --blue: #3b82f6;
  --yellow: #eab308;
}

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

body {
  font-family: 'Montserrat', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}

.nav-brand {
  font-weight: 800;
  font-size: 20px;
  color: var(--gold);
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-link:hover { color: var(--text); background: var(--bg-hover); }
.nav-link.active { color: var(--gold); background: var(--gold-dim); }

/* Container */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* Page Header */
.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 700;
}

.subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
}

/* Card */
.card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}

.card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.card-image {
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--navy);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
}

.card-body {
  padding: 14px;
}

.card-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-date {
  font-size: 12px;
  color: var(--text-muted);
}

.card-reason {
  font-size: 12px;
  color: var(--red);
  margin-top: 6px;
  font-style: italic;
}

/* Badges */
.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-tweet { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.badge-cinematografico { background: var(--gold-dim); color: var(--gold); }
.badge-pending { background: rgba(234, 179, 8, 0.15); color: var(--yellow); }
.badge-approved { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.badge-rejected { background: rgba(239, 68, 68, 0.15); color: var(--red); }
.badge-published { background: rgba(59, 130, 246, 0.15); color: var(--blue); }

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

.back-btn {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.back-btn:hover { color: var(--text); }

.detail-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.detail-date {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.detail-meta {
  display: flex;
  gap: 8px;
}

/* Slider */
.slider-container {
  position: relative;
  margin-bottom: 12px;
}

.slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 0;
  border-radius: 12px;
}

.slider::-webkit-scrollbar { display: none; }

.slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  position: relative;
}

.slide img {
  width: 100%;
  display: block;
  border-radius: 12px;
}

.slide-number {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.6);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-prev { left: 8px; }
.slider-next { right: 8px; }

@media (max-width: 600px) {
  .slider-btn { display: none; }
}

/* Dots */
.slide-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 24px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.4;
  cursor: pointer;
  transition: all 0.2s;
}

.dot.active {
  opacity: 1;
  background: var(--gold);
  width: 20px;
  border-radius: 4px;
}

/* Detail Sections */
.detail-section {
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.detail-section h3 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.detail-caption {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-line;
}

.detail-hashtags {
  font-size: 14px;
  color: var(--gold);
}

.rejection-reason {
  color: var(--red);
  font-style: italic;
}

/* Actions */
.actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  margin-bottom: 40px;
}

.btn {
  flex: 1;
  padding: 14px 24px;
  border: none;
  border-radius: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-approve {
  background: var(--green);
  color: #000;
}

.btn-approve:hover { background: #16a34a; }

.btn-reject {
  background: transparent;
  color: var(--red);
  border: 2px solid var(--red);
}

.btn-reject:hover { background: rgba(239, 68, 68, 0.1); }

.btn-publish {
  background: var(--gold);
  color: #000;
}

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

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

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.open { display: flex; }

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  max-width: 440px;
  width: 100%;
}

.modal-content h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.modal-content p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.modal-content textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  padding: 12px;
  resize: vertical;
  margin-bottom: 16px;
}

.modal-content textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal-actions .btn { flex: none; padding: 10px 20px; }

/* Topic Groups */
.topic-group {
  margin-bottom: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.topic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(201, 168, 76, 0.05);
}

.topic-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  flex: 1;
  margin-right: 12px;
}

.topic-date {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Carousel Block (within topic group) */
.carousel-block {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.carousel-block:last-child {
  border-bottom: none;
}

.carousel-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.carousel-slide-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
}

/* Slides Strip (horizontal thumbnails) */
.slides-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
  margin-bottom: 12px;
}

.slides-strip::-webkit-scrollbar { display: none; }

.strip-slide {
  flex: 0 0 auto;
  width: 80px;
  position: relative;
  scroll-snap-align: start;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.strip-slide:hover {
  border-color: var(--gold);
}

.strip-slide img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  display: block;
}

.strip-number {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0,0,0,0.6);
  color: white;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Inline Actions */
.carousel-actions-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-inline {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-inline-view {
  background: var(--bg-hover);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-inline-view:hover { border-color: var(--gold); color: var(--gold); }

.btn-inline-approve {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
}

.btn-inline-approve:hover { background: rgba(34, 197, 94, 0.25); }

.btn-inline-reject {
  background: transparent;
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-inline-reject:hover { background: rgba(239, 68, 68, 0.1); }

.btn-inline-publish {
  background: var(--gold-dim);
  color: var(--gold);
}

.inline-reason {
  font-size: 11px;
  color: var(--red);
  font-style: italic;
  margin-left: auto;
}

/* Switch format link */
.switch-format {
  font-size: 12px;
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
}

.switch-format:hover { text-decoration: underline; }

/* Slide text viewer (detail page) */
.slide-text-viewer {
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: 10px;
  border: 1px solid var(--border);
  min-height: 60px;
}

.slide-text-item {
  display: none;
}

.slide-text-item.active {
  display: block;
}

.slide-text-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 6px;
}

.slide-text-item p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

/* Badge for cine format */
.badge-cine { background: var(--gold-dim); color: var(--gold); }

/* Correct button */
.btn-correct {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
}
.btn-correct:hover { background: var(--gold-dim); }

/* Editor mode */
.hidden { display: none !important; }

.slide-editor {
  margin-bottom: 24px;
}

.editor-header {
  margin-bottom: 16px;
}

.editor-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
}

.editor-slide {
  margin-bottom: 12px;
}

.editor-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 4px;
}

.editor-textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.5;
}

.editor-textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.editor-caption {
  margin-top: 16px;
  margin-bottom: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.corrections-note {
  font-size: 13px;
  color: var(--gold);
  font-style: italic;
}

@media (max-width: 600px) {
  .strip-slide { width: 64px; }
  .carousel-actions-inline { flex-wrap: wrap; }
  .topic-title { font-size: 14px; }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state p:first-child {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
