/* ADMIN SIDEBAR */
.admin-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: #fff;
  box-shadow: -5px 0 30px rgba(0,0,0,0.1);
  z-index: 1000;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  font-family: sans-serif;
}
.admin-sidebar.open {
  right: 0;
}
.admin-sidebar-header {
  background: #333;
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
}
.admin-close-btn {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
}
.admin-close-btn svg { width: 24px; height: 24px; }
.admin-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.admin-tabs {
  display: flex;
  border-bottom: 2px solid #eee;
  margin-bottom: 20px;
}
.admin-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: bold;
  color: #888;
}
.admin-tab.active {
  color: #333;
  border-bottom: 2px solid #333;
}
.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; }
.admin-primary-btn {
  width: 100%;
  padding: 12px;
  background: #e8a87c;
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 20px;
}
.admin-secondary-btn {
  padding: 12px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}

/* Page List Items */
.admin-page-item {
  background: #f9f9f9;
  border: 1px solid #eee;
  padding: 12px 15px;
  border-radius: 6px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.admin-page-info { flex: 1; min-width: 0; }
.admin-page-title { font-weight: bold; margin-bottom: 3px; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-page-type { font-size: 0.75rem; color: #999; text-transform: uppercase; letter-spacing: 1px; }
.admin-page-actions { display: flex; gap: 6px; flex-shrink: 0; }
.admin-action-btn {
  background: #eee; border: none; padding: 5px 10px;
  cursor: pointer; border-radius: 4px; font-size: 0.8rem;
  font-weight: 500; color: #555; transition: background 0.2s;
}
.admin-action-btn:hover { background: #ddd; }
.admin-action-btn.danger { background: #fde8e8; color: #c0392b; }
.admin-action-btn.danger:hover { background: #f5c6c6; }
.admin-info-text { font-size: 0.85rem; color: #999; margin-bottom: 15px; line-height: 1.5; }
.admin-pin-list { margin-top: 10px; }

/* Modal */
.admin-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.5); z-index: 1001; display: none; }
.admin-overlay.active { display: block; }
.admin-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 500px; max-height: 90vh; background: white; border-radius: 10px; z-index: 1002; display: none; flex-direction: column; font-family: sans-serif; box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.admin-modal.active { display: flex; }
.admin-modal-header { padding: 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.admin-modal-header button { color: #333; }
.admin-modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.admin-field { margin-bottom: 15px; }
.admin-field label { display: block; font-weight: bold; margin-bottom: 5px; font-size: 0.9rem; }
.admin-field input[type="text"], .admin-field input[type="number"], .admin-field select, .admin-field textarea { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 5px; font-family: sans-serif; }
.admin-modal-footer { padding: 20px; border-top: 1px solid #eee; display: flex; justify-content: flex-end; gap: 10px; }

/* Image controls */
.image-preview-container { margin-top: 10px; border: 1px dashed #ccc; padding: 10px; border-radius: 5px; text-align: center; }
.image-preview-container img { max-width: 100%; max-height: 200px; object-fit: contain; }
.image-controls { margin-top: 10px; text-align: left; }
.image-controls input[type="range"] { width: 100%; margin-bottom: 10px; }
.admin-page-item.dragging {
  opacity: 0.5;
  background: #f0c0cc;
}
.admin-page-item.drag-over {
  border-top: 2px dashed #d0507a;
}
