/* ===== VARIABLES & BASE DESIGN SYSTEM ===== */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #dbeafe;
  --primary-dark: #1e40af;
  --accent: #059669;
  --accent-light: #d1fae5;
  --accent-text: #065f46;
  --warning: #d97706;
  --warning-light: #fef3c7;
  
  --urban-fill: #fdf2f8;
  --urban-stroke: #ec4899;
  --urban-hover: #fbcfe8;
  
  --rural-fill: #fefce8;
  --rural-stroke: #eab308;
  --rural-hover: #fef08a;

  --has-works-fill: #dcfce7;
  --has-works-stroke: #16a34a;
  --has-works-hover: #bbf7d0;

  --active-fill: #3b82f6;
  --active-stroke: #1d4ed8;

  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --header-height: 80px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ===== HEADER & STATS COUNTER ===== */
.app-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  z-index: 20;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
  flex-shrink: 0;
}

.brand-logo svg {
  width: 26px;
  height: 26px;
}

.brand-titles h1 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-official {
  background: #eff6ff;
  color: #2563eb;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid #bfdbfe;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.brand-titles p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Header Counters */
.stats-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-chip {
  background: #f8fafc;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.stat-chip:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.stat-chip.stat-highlight {
  background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
  border-color: #bfdbfe;
}

.stat-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.icon-blue { background: #dbeafe; color: #2563eb; }
.stat-icon.icon-green { background: #d1fae5; color: #059669; }
.stat-icon.icon-purple { background: #f3e8ff; color: #7e22ce; }
.stat-icon.icon-amber { background: #fef3c7; color: #d97706; }

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.stat-number {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
  outline: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background: #ffffff;
  color: #334155;
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.78rem;
}

/* ===== MAIN WORKSPACE ===== */
.main-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* ===== MAP CONTAINER ===== */
.map-panel {
  flex: 1;
  position: relative;
  background-color: #f1f5f9;
  background-image: 
    radial-gradient(#cbd5e1 1px, transparent 1px), 
    radial-gradient(#cbd5e1 1px, #f1f5f9 1px);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#quito-map-svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

#quito-map-svg:active {
  cursor: grabbing;
}

/* SVG Elements Styling */
.parish-path {
  transition: fill 0.25s ease, stroke 0.25s ease, stroke-width 0.25s ease, filter 0.25s ease;
  cursor: pointer;
  vector-effect: non-scaling-stroke;
}

.parish-path.rural {
  fill: var(--rural-fill);
  stroke: var(--rural-stroke);
  stroke-width: 0.75px;
}

.parish-path.rural:hover {
  fill: var(--rural-hover);
  stroke: #b45309;
  stroke-width: 1.8px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.15));
}

.parish-path.urbana {
  fill: var(--urban-fill);
  stroke: var(--urban-stroke);
  stroke-width: 0.75px;
}

.parish-path.urbana:hover {
  fill: var(--urban-hover);
  stroke: #be185d;
  stroke-width: 1.8px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.15));
}

/* Parishes with works */
.parish-path.has-works {
  fill: #86efac !important;
  stroke: #15803d !important;
  stroke-width: 1.5px;
}

.parish-path.has-works:hover {
  fill: #4ade80 !important;
  stroke: #166534 !important;
  stroke-width: 2.2px;
  filter: drop-shadow(0 6px 10px rgba(22, 101, 52, 0.3));
}

/* Active / Selected parish */
.parish-path.active {
  fill: #2563eb !important;
  stroke: #1e3a8a !important;
  stroke-width: 2.6px !important;
  filter: drop-shadow(0 0 12px rgba(37, 99, 235, 0.6)) !important;
}

/* Parish center count badge on map */
.parish-pin {
  pointer-events: none;
  transition: transform 0.2s ease;
}

.parish-pin circle {
  fill: #15803d;
  stroke: #ffffff;
  stroke-width: 1.5px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}

.parish-pin text {
  fill: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
}

.parish-pin.pin-active circle {
  fill: #f59e0b;
  stroke: #ffffff;
  stroke-width: 2px;
}

/* Floating Tooltip */
.map-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  color: white;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  box-shadow: var(--shadow-xl);
  z-index: 50;
  opacity: 0;
  transform: translate(-50%, -120%);
  transition: opacity 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.map-tooltip.visible {
  opacity: 1;
}

.tooltip-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tooltip-type {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-bottom: 4px;
}

.tooltip-obras {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #4ade80;
}

.tooltip-obras.none {
  color: #cbd5e1;
}

/* Map Controls Floating Bar */
.map-controls {
  position: absolute;
  bottom: 24px;
  left: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
}

.control-group {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
}

.control-btn {
  width: 38px;
  height: 38px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.control-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.control-btn svg {
  width: 18px;
  height: 18px;
}

/* Map Quick Filter Bar Top-Left */
.map-view-switcher {
  position: absolute;
  top: 20px;
  left: 24px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 4px;
  display: flex;
  gap: 4px;
  box-shadow: var(--shadow-md);
  z-index: 10;
}

.view-btn {
  padding: 6px 14px;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.view-btn:hover {
  color: #0f172a;
  background: #f8fafc;
}

.view-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.parish-select-wrapper {
  margin-left: 4px;
  display: flex;
  align-items: center;
}

.parish-select {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: #ffffff;
  color: #1e293b;
  font-size: 0.78rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
  max-width: 190px;
}

.parish-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* Map Parish Text Labels */
.parish-label {
  pointer-events: none;
  font-family: 'Inter', sans-serif;
  font-size: 8.5px;
  font-weight: 600;
  fill: #334155;
  text-anchor: middle;
  dominant-baseline: central;
  paint-order: stroke fill;
  stroke: #ffffff;
  stroke-width: 1.5px;
  stroke-linejoin: round;
  user-select: none;
  transition: opacity 0.2s ease;
}

.parish-label.label-urban {
  font-size: 7px;
  fill: #475569;
  stroke-width: 1.2px;
}

.parish-label.active {
  fill: #1e40af;
  font-weight: 800;
  stroke: #ffffff;
  stroke-width: 2px;
}

/* Map Legend */
.map-legend {
  position: absolute;
  bottom: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
  font-size: 0.76rem;
  z-index: 10;
  min-width: 180px;
}

.legend-title {
  font-weight: 700;
  margin-bottom: 8px;
  color: #1e293b;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: #475569;
}

.legend-item:last-child {
  margin-bottom: 0;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.15);
  flex-shrink: 0;
}

.legend-color.rural { background: var(--rural-fill); border-color: var(--rural-stroke); }
.legend-color.urban { background: var(--urban-fill); border-color: var(--urban-stroke); }
.legend-color.works { background: #86efac; border-color: #15803d; }
.legend-color.active { background: var(--active-fill); border-color: var(--active-stroke); }

/* ===== SIDEBAR / LIST OF WORKS ===== */
.sidebar-panel {
  width: 440px;
  background: #ffffff;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: -4px 0 15px rgba(0,0,0,0.03);
  z-index: 15;
  transition: width 0.3s ease;
}

.sidebar-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
}

.parish-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.parish-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.btn-clear-selection {
  background: #f1f5f9;
  border: none;
  color: #64748b;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-clear-selection:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.parish-meta-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-urban {
  background: #fce7f3;
  color: #9d174d;
  border: 1px solid #fbcfe8;
}

.badge-rural {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-count {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.badge-all {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* Search bar inside sidebar */
.sidebar-search-box {
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
  display: flex;
  gap: 8px;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  width: 16px;
  height: 16px;
}

.search-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Works Cards Container */
.works-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Work Card */
.work-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: 260px;
}

.work-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.work-card-media {
  position: relative;
  width: 100%;
  height: 180px;
  background: #0f172a;
  overflow: hidden;
  cursor: pointer;
}

.work-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.work-card-media:hover .work-img {
  transform: scale(1.04);
}

.work-img-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  gap: 6px;
}

.work-card-media:hover .work-img-overlay {
  opacity: 1;
}

.work-img-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: #94a3b8;
  gap: 8px;
  font-size: 0.8rem;
}

.work-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.work-name {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

.work-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tag-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: #f1f5f9;
  color: #475569;
}

.tag-item.tag-sector {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #dbeafe;
}

.tag-item.tag-parroquia {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #e2e8f0;
}

/* Empty States */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  gap: 14px;
  color: var(--text-muted);
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  background: #f1f5f9;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

.empty-state h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #334155;
}

.empty-state p {
  font-size: 0.85rem;
  max-width: 300px;
  line-height: 1.4;
}

/* ===== MODAL DIALOGS ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.98);
  transition: all 0.25s ease;
}

.modal-backdrop.active .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Drag & drop upload zone */
.dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 36px 20px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: #eff6ff;
}

.dropzone-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: #e2e8f0;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropzone:hover .dropzone-icon {
  background: #dbeafe;
  color: var(--primary);
}

.dropzone-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
}

.dropzone-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.json-status-alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  display: none;
}

.json-status-alert.alert-success {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.json-status-alert.alert-error {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

/* Lightbox Image Preview Modal */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 30, 0.88);
  backdrop-filter: blur(8px);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.lightbox-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  background: #0f172a;
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 900px;
  width: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-img-wrapper {
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
}

.lightbox-img-wrapper img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.lightbox-caption {
  padding: 18px 24px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1e293b;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .sidebar-panel {
    width: 360px;
  }
}

@media (max-width: 768px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px;
    gap: 12px;
  }
  .stats-container {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .main-layout {
    flex-direction: column;
  }
  .sidebar-panel {
    width: 100%;
    height: 45vh;
    border-left: none;
    border-top: 1px solid var(--border);
  }
}
